+
({
type="button"
ref={triggerButtonRef}
data-testid={id}
- className="grouped-filter-select-picker__button dc__transparent px-7 py-5 border__primary br-4 flex dc__gap-6 bg__hover bg__secondary"
+ className="grouped-filter-select-picker__button dc__transparent px-7 py-5 border__primary br-4 flex left dc__gap-6 bg__hover bg__secondary w-100"
>
Filter
diff --git a/src/Shared/Components/SelectPicker/SelectPicker.component.tsx b/src/Shared/Components/SelectPicker/SelectPicker.component.tsx
index 42874ca2c..72e2b2ef1 100644
--- a/src/Shared/Components/SelectPicker/SelectPicker.component.tsx
+++ b/src/Shared/Components/SelectPicker/SelectPicker.component.tsx
@@ -40,8 +40,7 @@ import {
SelectPickerGroupHeading,
SelectPickerInput,
SelectPickerMenuList,
- SelectPickerMultiValueLabel,
- SelectPickerMultiValueRemove,
+ SelectPickerMultiValue,
SelectPickerOption,
SelectPickerValueContainer,
} from './common'
@@ -186,6 +185,7 @@ import { getCommonSelectStyle, getSelectPickerOptionByValue } from './utils'
const SelectPicker = ({
error,
icon,
+ keyboardShortcut,
helperText,
placeholder = 'Select an option',
label,
@@ -212,7 +212,7 @@ const SelectPicker = ({
menuListFooterConfig,
isCreatable = false,
onCreateOption,
- closeMenuOnSelect = false,
+ closeMenuOnSelect: _closeMenuOnSelect,
shouldShowNoOptionsMessage = true,
shouldRenderTextArea = false,
onKeyDown,
@@ -226,6 +226,7 @@ const SelectPicker = ({
labelTooltipConfig,
hideFormFieldInfo,
autoFocus,
+ showCheckboxForMultiSelect = true,
...props
}: SelectPickerProps) => {
const innerRef = useRef['selectRef']['current']>(null)
@@ -249,26 +250,25 @@ const SelectPicker = ({
getIsOptionValid = () => true,
customDisplayText = null,
} = multiSelectProps
- const controlShouldRenderValue = _controlShouldRenderValue && !customDisplayText
- // Only large variant is supported for multi select picker
- const selectSize = isMulti && controlShouldRenderValue ? ComponentSizeType.large : size
+ const controlShouldRenderValue = _controlShouldRenderValue && !customDisplayText
const shouldShowSelectedOptionIcon = !isMulti && showSelectedOptionIcon
const isSelectSearchable = !shouldRenderCustomOptions && isSearchable
+ const closeMenuOnSelect = _closeMenuOnSelect ?? !isMulti
// Option disabled, group null state, checkbox hover, create option visibility (scroll reset on search)
const selectStyles = useMemo(
() =>
getCommonSelectStyle({
error,
- size: selectSize,
+ size,
menuSize,
variant,
getIsOptionValid,
isGroupHeadingSelectable,
shouldMenuAlignRight,
}),
- [error, selectSize, menuSize, variant, isGroupHeadingSelectable, shouldMenuAlignRight],
+ [error, size, menuSize, variant, isGroupHeadingSelectable, shouldMenuAlignRight],
)
// Used to show the create new option for creatable select and the option(s) doesn't have the input value
@@ -307,9 +307,9 @@ const SelectPicker = ({
[disableDescriptionEllipsis],
)
- const renderMultiValueLabel = (
- multiValueLabelProps: MultiValueProps, true>,
- ) =>
+ const renderMultiValue = (multiValueProps: MultiValueProps, true>) => (
+
+ )
const renderGroupHeading = useCallback(
(groupHeadingProps: GroupHeadingProps>) => (
@@ -463,7 +463,6 @@ const SelectPicker = ({
shouldRenderCustomOptions={shouldRenderCustomOptions || false}
isMulti={isMulti}
ref={selectRef}
- autoFocus={autoFocus}
components={{
IndicatorSeparator: null,
LoadingIndicator: null,
@@ -473,8 +472,7 @@ const SelectPicker = ({
MenuList: SelectPickerMenuList,
ClearIndicator: SelectPickerClearIndicator,
ValueContainer: renderValueContainer,
- MultiValueLabel: renderMultiValueLabel,
- MultiValueRemove: SelectPickerMultiValueRemove,
+ MultiValue: renderMultiValue,
GroupHeading: renderGroupHeading,
NoOptionsMessage: renderNoOptionsMessage,
LoadingMessage: renderLoadingMessage,
@@ -484,7 +482,7 @@ const SelectPicker = ({
DropdownIndicator: () => null,
}),
}}
- closeMenuOnSelect={!isMulti || closeMenuOnSelect}
+ closeMenuOnSelect={closeMenuOnSelect}
allowCreateWhileLoading={false}
isValidNewOption={isValidNewOption}
createOptionPosition="first"
@@ -493,6 +491,8 @@ const SelectPicker = ({
inputValue={props.inputValue ?? inputValue}
onInputChange={handleInputChange}
icon={icon}
+ keyboardShortcut={keyboardShortcut}
+ showCheckboxForMultiSelect={showCheckboxForMultiSelect}
showSelectedOptionIcon={shouldShowSelectedOptionIcon}
onKeyDown={handleKeyDown}
shouldRenderTextArea={shouldRenderTextArea}
diff --git a/src/Shared/Components/SelectPicker/common.tsx b/src/Shared/Components/SelectPicker/common.tsx
index af8245887..38d0d32af 100644
--- a/src/Shared/Components/SelectPicker/common.tsx
+++ b/src/Shared/Components/SelectPicker/common.tsx
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import { ChangeEvent, Children } from 'react'
+import { ChangeEvent, Children, MouseEventHandler } from 'react'
import {
ClearIndicatorProps,
components,
@@ -24,14 +24,12 @@ import {
MenuListProps,
MultiValue,
MultiValueProps,
- MultiValueRemoveProps,
OptionProps,
ValueContainerProps,
} from 'react-select'
import { ReactComponent as ICCaretDown } from '@Icons/ic-caret-down.svg'
import { ReactComponent as ICClose } from '@Icons/ic-close.svg'
-import { ReactComponent as ICErrorExclamation } from '@Icons/ic-error-exclamation.svg'
import { Checkbox } from '@Common/Checkbox'
import { ReactSelectInputAction } from '@Common/Constants'
import { noop } from '@Common/Helper'
@@ -42,6 +40,7 @@ import { ComponentSizeType } from '@Shared/constants'
import { isNullOrUndefined } from '@Shared/Helpers'
import { Button, ButtonProps, ButtonVariantType } from '../Button'
+import { Chip } from '../Chip'
import { Icon } from '../Icon'
import { SelectPickerGroupHeadingProps, SelectPickerOptionType, SelectPickerProps } from './type'
import { getGroupCheckboxValue } from './utils'
@@ -71,9 +70,13 @@ export const SelectPickerDropdownIndicator = (
) => {
const {
isDisabled,
- selectProps: { isLoading },
+ selectProps: { isLoading, keyboardShortcut },
} = props
+ if (keyboardShortcut) {
+ return null
+ }
+
return (
{isLoading ? (
@@ -97,7 +100,7 @@ export const SelectPickerControl = (props: ControlProps(props: ControlProps{iconToDisplay}
)}
{children}
+ {keyboardShortcut && (
+
+ {keyboardShortcut}
+
+ )}
)
}
@@ -189,7 +197,7 @@ export const SelectPickerOption =
({
const {
label,
data,
- selectProps: { isMulti },
+ selectProps: { isMulti, showCheckboxForMultiSelect },
selectOption,
isDisabled,
isSelected,
@@ -211,7 +219,7 @@ export const SelectPickerOption = ({
- {isMulti && !isCreatableOption && (
+ {isMulti && showCheckboxForMultiSelect && !isCreatableOption && (
(props: MenuListProps({
+export const SelectPickerMultiValue = ({
getIsOptionValid,
...props
}: MultiValueProps, true> &
Pick['multiSelectProps'], 'getIsOptionValid'>) => {
- const { data, selectProps } = props
- const isOptionValid = getIsOptionValid(data)
- const iconToDisplay = isOptionValid ? ((data.startIcon || data.endIcon) ?? null) :
+ const {
+ data,
+ isMulti,
+ removeProps: { onClick },
+ } = props
+ const isOptionValid = getIsOptionValid?.(data) ?? true
+ const { startIcon, endIcon } = data
+ const iconToDisplay = (startIcon || endIcon) ?? null
+
+ const renderStartIcon = () =>
+ iconToDisplay && (
+
+ {iconToDisplay}
+
+ )
return (
-
- {iconToDisplay && (
-
- {iconToDisplay}
-
- )}
-
-
+ }
+ />
)
}
-export const SelectPickerMultiValueRemove = (props: MultiValueRemoveProps) => (
-
-
-
-
-
-)
-
export const SelectPickerGroupHeading = ({
isGroupHeadingSelectable,
...props
diff --git a/src/Shared/Components/SelectPicker/constants.ts b/src/Shared/Components/SelectPicker/constants.ts
index 6419e79cc..3c96e5cc5 100644
--- a/src/Shared/Components/SelectPicker/constants.ts
+++ b/src/Shared/Components/SelectPicker/constants.ts
@@ -40,3 +40,11 @@ export const SELECT_PICKER_CONTROL_SIZE_MAP: Record =
+ {
+ [ComponentSizeType.small]: '16px',
+ [ComponentSizeType.medium]: '16px',
+ [ComponentSizeType.large]: '20px',
+ [ComponentSizeType.xl]: '20px',
+ }
diff --git a/src/Shared/Components/SelectPicker/type.ts b/src/Shared/Components/SelectPicker/type.ts
index 6e03d1fee..f32436e92 100644
--- a/src/Shared/Components/SelectPicker/type.ts
+++ b/src/Shared/Components/SelectPicker/type.ts
@@ -30,7 +30,8 @@ import { ActionMenuProps } from '../ActionMenu'
import { ButtonComponentType, ButtonProps, ButtonVariantType } from '../Button'
import { FormFieldWrapperProps } from '../FormFieldWrapper/types'
-export interface SelectPickerOptionType extends OptionType {
+export interface SelectPickerOptionType
+ extends OptionType {
/**
* Description to be displayed for the option
*/
@@ -105,6 +106,17 @@ declare module 'react-select/base' {
* Icon to be rendered in the control
*/
icon?: ReactElement
+ /**
+ * Renders the keyboard shortcut key that opens the select picker \
+ * Shortcut key needs to be defined first in order to use it.
+ * @note This is displayed in place of the dropdown indicator
+ */
+ keyboardShortcut?: string
+ /**
+ * If true, checkboxes are shown for options in multi-select mode.
+ * @default true
+ */
+ showCheckboxForMultiSelect?: boolean
/**
* If true, the selected option icon is shown in the container.
* startIcon has higher priority than endIcon.
@@ -182,6 +194,8 @@ export type SelectPickerProps
> &
Required, 'inputId'>> &
@@ -364,6 +378,6 @@ export interface GroupedFilterSelectPickerProps
+ Omit
>
}
diff --git a/src/Shared/Components/SelectPicker/utils.ts b/src/Shared/Components/SelectPicker/utils.ts
index 207a09331..1bc998734 100644
--- a/src/Shared/Components/SelectPicker/utils.ts
+++ b/src/Shared/Components/SelectPicker/utils.ts
@@ -20,7 +20,12 @@ import { noop } from '@Common/Helper'
import { CHECKBOX_VALUE } from '@Common/Types'
import { ComponentSizeType } from '@Shared/constants'
-import { SELECT_PICKER_CONTROL_SIZE_MAP, SELECT_PICKER_FONT_SIZE_MAP, SELECT_PICKER_ICON_SIZE_MAP } from './constants'
+import {
+ SELECT_PICKER_CONTROL_SIZE_MAP,
+ SELECT_PICKER_FONT_SIZE_MAP,
+ SELECT_PICKER_ICON_SIZE_MAP,
+ SELECT_PICKER_MULTI_VALUE_LABEL_SIZE_MAP,
+} from './constants'
import { SelectPickerOptionType, SelectPickerProps, SelectPickerVariantType } from './type'
const getMenuWidthFromSize = (
@@ -268,7 +273,7 @@ export const getCommonSelectStyle = ({
color: 'var(--N900)',
fontSize: '12px',
fontWeight: 400,
- lineHeight: '20px',
+ lineHeight: SELECT_PICKER_MULTI_VALUE_LABEL_SIZE_MAP[size],
padding: 0,
paddingLeft: 0,
}),
@@ -366,6 +371,10 @@ export const getCommonSelectStyle = ({
lineHeight: '20px',
...(singleValue(base, state) || {}),
}),
+ menuPortal: (base) => ({
+ ...base,
+ zIndex: 2,
+ }),
}
}
diff --git a/src/Shared/Components/Table/InternalTable.tsx b/src/Shared/Components/Table/InternalTable.tsx
index 4dc77479c..1c79ea682 100644
--- a/src/Shared/Components/Table/InternalTable.tsx
+++ b/src/Shared/Components/Table/InternalTable.tsx
@@ -76,13 +76,13 @@ const InternalTable = <
// inputs, buttons, etc. from the user, but when we blur any element by pressing Escape, we want to focus the table
// Keep in mind that if we tab focus onto a div/span with tabIndex then the relatedTarget will be that null
if (
- !container.contains(document.activeElement) &&
+ !container?.contains(document.activeElement) &&
(!related || related.tagName === 'BODY' || document.activeElement === document.body)
) {
- const tableElement = wrapperDivRef.current.getElementsByClassName(
+ const tableElement = wrapperDivRef.current?.getElementsByClassName(
'generic-table',
- )[0] as HTMLDivElement
- tableElement?.focus()
+ )?.[0] as HTMLDivElement
+ tableElement?.focus({ preventScroll: true })
}
}, 0)
}
@@ -187,6 +187,7 @@ const InternalTable = <
> & {
areRowsLoading: boolean
filteredRows: RowsType | null
+ rows: RowsType | null
} & (FilterVariant extends FiltersTypeEnum.URL
? Pick, 'updateSearchParams'>
: {})
diff --git a/src/Shared/Components/Table/useTableWithKeyboardShortcuts.ts b/src/Shared/Components/Table/useTableWithKeyboardShortcuts.ts
index 2f38870c3..1f5f62f6f 100644
--- a/src/Shared/Components/Table/useTableWithKeyboardShortcuts.ts
+++ b/src/Shared/Components/Table/useTableWithKeyboardShortcuts.ts
@@ -171,7 +171,7 @@ const useTableWithKeyboardShortcuts = <
callback: () => {
if (showPagination) {
bulkSelectionButtonRef.current?.click()
- bulkSelectionButtonRef.current?.focus()
+ bulkSelectionButtonRef.current?.focus({ preventScroll: true })
return
}
diff --git a/src/Shared/Components/TempAppWindow/TempAppWindow.tsx b/src/Shared/Components/TempAppWindow/TempAppWindow.tsx
new file mode 100644
index 000000000..85046d8ec
--- /dev/null
+++ b/src/Shared/Components/TempAppWindow/TempAppWindow.tsx
@@ -0,0 +1,81 @@
+import { useEffect, useRef } from 'react'
+import { useLocation } from 'react-router-dom'
+
+import { ComponentSizeType } from '@Shared/constants'
+import { useMainContext } from '@Shared/Providers'
+
+import { Button, ButtonComponentType, ButtonStyleType, ButtonVariantType } from '../Button'
+import { PageHeader } from '../Header'
+import { Icon } from '../Icon'
+
+const getCurrentPathName = ({ pathname, search }: { pathname: string; search: string }) => `${pathname}${search}`
+
+const additionalHeaderInfo = (url: string) => () => (
+
+ }
+ variant={ButtonVariantType.borderLess}
+ style={ButtonStyleType.neutral}
+ size={ComponentSizeType.xs}
+ component={ButtonComponentType.anchor}
+ anchorProps={{
+ href: url,
+ }}
+ />
+
+)
+
+export const TempAppWindow = () => {
+ // HOOKS
+ const { pathname, search } = useLocation()
+ const { tempAppWindowConfig, setTempAppWindowConfig } = useMainContext()
+
+ // REFS
+ const currentPathName = useRef(getCurrentPathName({ pathname, search }))
+
+ // HANDLERS
+ const handleClose = () => {
+ setTempAppWindowConfig({ open: false, title: null, url: null, component: null, image: null })
+ }
+
+ useEffect(() => {
+ if (getCurrentPathName({ pathname, search }) !== currentPathName.current) {
+ handleClose()
+ }
+ }, [pathname])
+
+ if (!tempAppWindowConfig.open) {
+ return null
+ }
+
+ const { title, url, image, showOpenInNewTab = false, component } = tempAppWindowConfig
+
+ return (
+
+
+ {!!url && (
+
+ )}
+ {component}
+
+ )
+}
diff --git a/src/Shared/Components/TempAppWindow/index.ts b/src/Shared/Components/TempAppWindow/index.ts
new file mode 100644
index 000000000..8b81f7479
--- /dev/null
+++ b/src/Shared/Components/TempAppWindow/index.ts
@@ -0,0 +1 @@
+export * from './TempAppWindow'
diff --git a/src/Shared/Components/index.ts b/src/Shared/Components/index.ts
index 16d6f49a6..0cd4af28e 100644
--- a/src/Shared/Components/index.ts
+++ b/src/Shared/Components/index.ts
@@ -29,6 +29,7 @@ export * from './BulkSelection'
export * from './Button'
export * from './ButtonWithLoader'
export * from './ButtonWithSelector'
+export * from './Chip'
export * from './CICDHistory'
export * from './CMCS'
export * from './CodeEditor'
@@ -101,6 +102,7 @@ export * from './TabGroup'
export * from './Table'
export * from './TagsKeyValueTable'
export * from './TargetPlatforms'
+export * from './TempAppWindow'
export * from './Textarea'
export * from './ThemeSwitcher'
export * from './ToggleResolveScopedVariables'
diff --git a/src/Shared/Helpers.tsx b/src/Shared/Helpers.tsx
index 7f48d0c01..cfad6edf5 100644
--- a/src/Shared/Helpers.tsx
+++ b/src/Shared/Helpers.tsx
@@ -63,7 +63,6 @@ import {
IntersectionOptions,
Node,
Nodes,
- PreventOutsideFocusProps,
TargetPlatformItemDTO,
TargetPlatformsDTO,
WebhookEventNameType,
@@ -111,18 +110,6 @@ export const preventBodyScroll = (lock: boolean): void => {
}
}
-export const preventOutsideFocus = ({ identifier, preventFocus }: PreventOutsideFocusProps) => {
- const identifierElement = document.getElementById(identifier)
- if (!identifierElement) {
- return
- }
- if (preventFocus) {
- identifierElement.setAttribute('inert', 'true')
- } else {
- identifierElement.removeAttribute('inert')
- }
-}
-
const getIsMaterialInfoValid = (materialInfo: MaterialInfo): boolean =>
!!(
materialInfo.webhookData ||
diff --git a/src/Shared/Hooks/UseDownload/UseDownload.tsx b/src/Shared/Hooks/UseDownload/UseDownload.tsx
index 6e18ad782..6a01a5bc0 100644
--- a/src/Shared/Hooks/UseDownload/UseDownload.tsx
+++ b/src/Shared/Hooks/UseDownload/UseDownload.tsx
@@ -19,6 +19,7 @@ import { useState } from 'react'
import { API_STATUS_CODES, Host } from '@Common/Constants'
import { showError } from '@Common/Helper'
import { ServerErrors } from '@Common/ServerError'
+import { ALLOW_ACTION_OUTSIDE_FOCUS_TRAP } from '@Shared/constants'
import { getFileNameFromHeaders } from '@Shared/Helpers'
import { ToastManager, ToastVariantType } from '@Shared/Services'
@@ -30,7 +31,7 @@ const useDownload = ({ shouldOpenInNewTab }: UseDownloadProps = {}): UseDownload
/**
* @param downloadUrl - API url for downloading file
- * @param filterType - Show toast 'Preparing file for download'
+ * @param showFilePreparingToast - Show toast 'Preparing file for download'
* @param fileName - fileName of the downloaded file
* @param showSuccessfulToast - show toast on successful download
* @param downloadSuccessToastContent - Content to show in toast on successful download
@@ -69,6 +70,8 @@ const useDownload = ({ shouldOpenInNewTab }: UseDownloadProps = {}): UseDownload
// Create a link element
const a = document.createElement('a')
a.href = blobUrl
+ // Add class so that link is clickable outside focus
+ a.classList.add(ALLOW_ACTION_OUTSIDE_FOCUS_TRAP)
a.download = fileName || getFileNameFromHeaders(response.headers) || 'file.tgz'
diff --git a/src/Shared/Providers/MainContextProvider/index.ts b/src/Shared/Providers/MainContextProvider/index.ts
index 7bd1e1720..d3c989e63 100644
--- a/src/Shared/Providers/MainContextProvider/index.ts
+++ b/src/Shared/Providers/MainContextProvider/index.ts
@@ -1,3 +1,3 @@
export * from './MainContextProvider'
-export type { MainContext, ReloadVersionConfigTypes, SidePanelConfig } from './types'
+export type { MainContext, ReloadVersionConfigTypes, SidePanelConfig, TempAppWindowConfig } from './types'
export { SidePanelTab } from './types'
diff --git a/src/Shared/Providers/MainContextProvider/types.ts b/src/Shared/Providers/MainContextProvider/types.ts
index 20687c703..257ecf14e 100644
--- a/src/Shared/Providers/MainContextProvider/types.ts
+++ b/src/Shared/Providers/MainContextProvider/types.ts
@@ -54,7 +54,21 @@ type AIAgentContextType = {
context: Record
}
-// Please make sure to make it optional if not required in gatekeeper
+export interface TempAppWindowConfig {
+ /** Whether the temporary window is open */
+ open: boolean
+ /** Title of the temporary window */
+ title: string
+ /** URL to load in iframe in the window */
+ url?: string
+ /** Image URL to display in the window header */
+ image?: string
+ /** Whether to show an "Open in new tab" button */
+ showOpenInNewTab?: boolean
+ /** React component to render in the window */
+ component?: JSX.Element
+}
+
type CommonMainContextProps = {
setServerMode: (serverMode: SERVER_MODE) => void
isHelpGettingStartedClicked: boolean
@@ -127,6 +141,8 @@ export type MainContext = CommonMainContextProps &
*/
isFELibAvailable: boolean
aiAgentContext: AIAgentContextType
+ tempAppWindowConfig: TempAppWindowConfig
+ setTempAppWindowConfig: Dispatch>
}
| {
isLicenseDashboard: true
@@ -143,6 +159,8 @@ export type MainContext = CommonMainContextProps &
isEnterprise: false
isFELibAvailable: false
aiAgentContext: null
+ tempAppWindowConfig: null
+ setTempAppWindowConfig: null
}
)
diff --git a/src/Shared/Services/ToastManager/constants.tsx b/src/Shared/Services/ToastManager/constants.tsx
index 0deeaf82b..6d9a23758 100644
--- a/src/Shared/Services/ToastManager/constants.tsx
+++ b/src/Shared/Services/ToastManager/constants.tsx
@@ -24,7 +24,7 @@ import { ReactComponent as ICLocked } from '@Icons/ic-locked.svg'
import { ReactComponent as ICSuccess } from '@Icons/ic-success.svg'
import { ReactComponent as ICWarning } from '@Icons/ic-warning.svg'
import { Button, ButtonStyleType, ButtonVariantType } from '@Shared/Components'
-import { ComponentSizeType } from '@Shared/constants'
+import { ALLOW_ACTION_OUTSIDE_FOCUS_TRAP, ComponentSizeType } from '@Shared/constants'
import { ToastProps, ToastVariantType } from './types'
@@ -40,7 +40,8 @@ export const TOAST_BASE_CONFIG: ToastContainerProps = {
closeButton: ({ closeToast }) => (
}
+ // do not use icon component as class is required
+ icon={}
onClick={closeToast}
dataTestId="close-toast"
ariaLabel="Close toast"
diff --git a/src/Shared/constants.tsx b/src/Shared/constants.tsx
index d8c8e4d3d..c5bfd815e 100644
--- a/src/Shared/constants.tsx
+++ b/src/Shared/constants.tsx
@@ -602,3 +602,6 @@ export const STRATEGY_TYPE_TO_TITLE_MAP: Record
>
-export interface PreventOutsideFocusProps {
- identifier: string
- preventFocus: boolean
-}
-
export interface PolicyBlockInfo {
isBlocked: boolean
blockedBy: TriggerBlockType
diff --git a/src/index.ts b/src/index.ts
index 43a66d78d..294afab0a 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -16,6 +16,8 @@
import { OverrideMergeStrategyType } from '@Pages/Applications'
+import '@tanstack/react-query'
+
export interface customEnv {
SENTRY_ENV?: string
SENTRY_ERROR_ENABLED?: boolean
@@ -132,12 +134,6 @@ export interface customEnv {
* @default false
*/
FEATURE_SWAP_TRAFFIC_ENABLE?: boolean
- /**
- * Enable cluster map
- *
- * @default true
- */
- FEATURE_CLUSTER_MAP_ENABLE?: boolean
/**
* @default true
*/
@@ -198,6 +194,23 @@ declare global {
}
}
+declare module '@tanstack/react-query' {
+ export interface QueryMeta {
+ /**
+ * Optional flag indicating whether to display a toast notification for errors.
+ * @default true
+ */
+ showToastError?: boolean
+ }
+ export interface MutationMeta {
+ /**
+ * Optional flag indicating whether to display a toast notification for errors.
+ * @default true
+ */
+ showToastError?: boolean
+ }
+}
+
export * from './Common'
export * from './Pages'
export * from './Shared'