@elliemae/ds-global-header 3.70.0-next.52 → 3.70.0-next.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js +1 -1
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js +1 -1
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/types/react-desc-prop-types.d.ts +1 -1
- package/package.json +12 -12
|
@@ -88,7 +88,7 @@ const PopupMenu = ({
|
|
|
88
88
|
}, [hideTooltip, refs.reference, userIsOpen]);
|
|
89
89
|
const handleTriggerOnClick = (0, import_react.useCallback)(
|
|
90
90
|
(e) => {
|
|
91
|
-
if (userIsOpen === void 0) showTooltip();
|
|
91
|
+
if (userIsOpen === void 0) showTooltip(e);
|
|
92
92
|
if (onClick) onClick(e);
|
|
93
93
|
},
|
|
94
94
|
[onClick, userIsOpen, showTooltip]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.tsx", "../../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { useFloatingContext, PopoverArrow, FloatingWrapper } from '@elliemae/ds-floating-context';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport React, { useCallback } from 'react';\nimport { GLOBAL_HEADER_DATA_TESTID } from '../../../../constants/index.js';\nimport type { DSGlobalHeaderT } from '../../../../react-desc-prop-types.js';\nimport { StyledButton } from '../../../styles.js';\nimport { PopupMenuContent } from './menuContent/PopupMenuContent.js';\n\nexport const PopupMenu = ({\n Icon,\n onClick,\n setRef,\n componentProps,\n ownerProps,\n ...otherProps\n}: DSGlobalHeaderT.PopupProps): JSX.Element => {\n const {\n onClickOutside = () => null,\n onKeyPress,\n popupOnKeyPress,\n isOpen: userIsOpen,\n options,\n closeOnClick,\n } = componentProps;\n\n // We need to declare the floating context before we can reference its hideTooltip in\n // handleOutside; but handleOutside is passed into the same hook call. We resolve this by\n // pulling hideTooltip / refs.reference via the latest-ref pattern of the hook itself \u2014\n // see comments on `onClickOutside` below.\n const { arrowStyles, floatingStyles, isOpen, refs, context, showTooltip, hideTooltip } = useFloatingContext({\n externallyControlledIsOpen: componentProps.isOpen,\n placement: 'bottom',\n withoutAnimation: true,\n withoutPortal: true,\n // The hook auto-excludes clicks inside the floating element and the reference, so the\n // outside boundary is now { reference, floating } \u2014 no boundary <div> needed.\n // Gated internally on `isOpen`, so it only fires while open.\n onClickOutside: (event) => {\n onClickOutside(event);\n if (userIsOpen === undefined) {\n hideTooltip();\n (refs.reference as HTMLElement)?.focus();\n }\n },\n });\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.code === 'ArrowDown') {\n showTooltip();\n }\n if (onKeyPress) onKeyPress(e);\n },\n [onKeyPress, showTooltip],\n );\n\n const handleOnClose = useCallback(() => {\n if (userIsOpen === undefined) {\n hideTooltip();\n }\n (refs.reference as HTMLElement)?.focus();\n }, [hideTooltip, refs.reference, userIsOpen]);\n\n const handleTriggerOnClick = useCallback(\n (e: React.MouseEvent) => {\n if (userIsOpen === undefined) showTooltip();\n if (onClick) onClick(e);\n },\n [onClick, userIsOpen, showTooltip],\n );\n\n const handleItemClick = useCallback(() => {\n if (closeOnClick && userIsOpen === undefined) handleOnClose();\n }, [closeOnClick, handleOnClose, userIsOpen]);\n\n const handleRefs = useCallback(\n (ref: HTMLButtonElement) => {\n setRef(ref);\n refs.setReference(ref);\n },\n [refs, setRef],\n );\n return (\n <div>\n <StyledButton\n onClick={handleTriggerOnClick}\n onKeyDown={handleOnKeyDown}\n innerRef={handleRefs}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM_BUTTON}\n aria-haspopup\n aria-expanded={userIsOpen ?? isOpen}\n {...useGetGlobalAttributes(otherProps)}\n type=\"button\"\n {...ownerProps}\n >\n {Icon && <Icon size=\"m\" />}\n </StyledButton>\n\n {refs.reference ? (\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={userIsOpen ?? isOpen}\n floatingStyles={floatingStyles}\n context={context}\n >\n <PopupMenuContent\n options={options}\n onItemClick={handleItemClick}\n onClose={handleOnClose}\n setIsOpen={hideTooltip}\n popupOnKeyPress={popupOnKeyPress}\n ownerProps={ownerProps}\n />\n <PopoverArrow {...arrowStyles} />\n </FloatingWrapper>\n ) : null}\n </div>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+FN;AA/FjB,iCAAkE;AAClE,8BAAuC;AACvC,mBAAmC;AACnC,uBAA0C;AAE1C,oBAA6B;AAC7B,8BAAiC;AAE1B,MAAM,YAAY,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA+C;AAC7C,QAAM;AAAA,IACJ,iBAAiB,MAAM;AAAA,IACvB;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,EACF,IAAI;AAMJ,QAAM,EAAE,aAAa,gBAAgB,QAAQ,MAAM,SAAS,aAAa,YAAY,QAAI,+CAAmB;AAAA,IAC1G,4BAA4B,eAAe;AAAA,IAC3C,WAAW;AAAA,IACX,kBAAkB;AAAA,IAClB,eAAe;AAAA;AAAA;AAAA;AAAA,IAIf,gBAAgB,CAAC,UAAU;AACzB,qBAAe,KAAK;AACpB,UAAI,eAAe,QAAW;AAC5B,oBAAY;AACZ,QAAC,KAAK,WAA2B,MAAM;AAAA,MACzC;AAAA,IACF;AAAA,EACF,CAAC;AAED,QAAM,sBAAkB;AAAA,IACtB,CAAC,MAA2B;AAC1B,UAAI,EAAE,SAAS,aAAa;AAC1B,oBAAY;AAAA,MACd;AACA,UAAI,WAAY,YAAW,CAAC;AAAA,IAC9B;AAAA,IACA,CAAC,YAAY,WAAW;AAAA,EAC1B;AAEA,QAAM,oBAAgB,0BAAY,MAAM;AACtC,QAAI,eAAe,QAAW;AAC5B,kBAAY;AAAA,IACd;AACA,IAAC,KAAK,WAA2B,MAAM;AAAA,EACzC,GAAG,CAAC,aAAa,KAAK,WAAW,UAAU,CAAC;AAE5C,QAAM,2BAAuB;AAAA,IAC3B,CAAC,MAAwB;AACvB,UAAI,eAAe,OAAW,aAAY;
|
|
4
|
+
"sourcesContent": ["import { useFloatingContext, PopoverArrow, FloatingWrapper } from '@elliemae/ds-floating-context';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport React, { useCallback } from 'react';\nimport { GLOBAL_HEADER_DATA_TESTID } from '../../../../constants/index.js';\nimport type { DSGlobalHeaderT } from '../../../../react-desc-prop-types.js';\nimport { StyledButton } from '../../../styles.js';\nimport { PopupMenuContent } from './menuContent/PopupMenuContent.js';\n\nexport const PopupMenu = ({\n Icon,\n onClick,\n setRef,\n componentProps,\n ownerProps,\n ...otherProps\n}: DSGlobalHeaderT.PopupProps): JSX.Element => {\n const {\n onClickOutside = () => null,\n onKeyPress,\n popupOnKeyPress,\n isOpen: userIsOpen,\n options,\n closeOnClick,\n } = componentProps;\n\n // We need to declare the floating context before we can reference its hideTooltip in\n // handleOutside; but handleOutside is passed into the same hook call. We resolve this by\n // pulling hideTooltip / refs.reference via the latest-ref pattern of the hook itself \u2014\n // see comments on `onClickOutside` below.\n const { arrowStyles, floatingStyles, isOpen, refs, context, showTooltip, hideTooltip } = useFloatingContext({\n externallyControlledIsOpen: componentProps.isOpen,\n placement: 'bottom',\n withoutAnimation: true,\n withoutPortal: true,\n // The hook auto-excludes clicks inside the floating element and the reference, so the\n // outside boundary is now { reference, floating } \u2014 no boundary <div> needed.\n // Gated internally on `isOpen`, so it only fires while open.\n onClickOutside: (event) => {\n onClickOutside(event);\n if (userIsOpen === undefined) {\n hideTooltip();\n (refs.reference as HTMLElement)?.focus();\n }\n },\n });\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.code === 'ArrowDown') {\n showTooltip();\n }\n if (onKeyPress) onKeyPress(e);\n },\n [onKeyPress, showTooltip],\n );\n\n const handleOnClose = useCallback(() => {\n if (userIsOpen === undefined) {\n hideTooltip();\n }\n (refs.reference as HTMLElement)?.focus();\n }, [hideTooltip, refs.reference, userIsOpen]);\n\n const handleTriggerOnClick = useCallback(\n (e: React.MouseEvent) => {\n if (userIsOpen === undefined) showTooltip(e);\n if (onClick) onClick(e);\n },\n [onClick, userIsOpen, showTooltip],\n );\n\n const handleItemClick = useCallback(() => {\n if (closeOnClick && userIsOpen === undefined) handleOnClose();\n }, [closeOnClick, handleOnClose, userIsOpen]);\n\n const handleRefs = useCallback(\n (ref: HTMLButtonElement) => {\n setRef(ref);\n refs.setReference(ref);\n },\n [refs, setRef],\n );\n return (\n <div>\n <StyledButton\n onClick={handleTriggerOnClick}\n onKeyDown={handleOnKeyDown}\n innerRef={handleRefs}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM_BUTTON}\n aria-haspopup\n aria-expanded={userIsOpen ?? isOpen}\n {...useGetGlobalAttributes(otherProps)}\n type=\"button\"\n {...ownerProps}\n >\n {Icon && <Icon size=\"m\" />}\n </StyledButton>\n\n {refs.reference ? (\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={userIsOpen ?? isOpen}\n floatingStyles={floatingStyles}\n context={context}\n >\n <PopupMenuContent\n options={options}\n onItemClick={handleItemClick}\n onClose={handleOnClose}\n setIsOpen={hideTooltip}\n popupOnKeyPress={popupOnKeyPress}\n ownerProps={ownerProps}\n />\n <PopoverArrow {...arrowStyles} />\n </FloatingWrapper>\n ) : null}\n </div>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+FN;AA/FjB,iCAAkE;AAClE,8BAAuC;AACvC,mBAAmC;AACnC,uBAA0C;AAE1C,oBAA6B;AAC7B,8BAAiC;AAE1B,MAAM,YAAY,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA+C;AAC7C,QAAM;AAAA,IACJ,iBAAiB,MAAM;AAAA,IACvB;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,EACF,IAAI;AAMJ,QAAM,EAAE,aAAa,gBAAgB,QAAQ,MAAM,SAAS,aAAa,YAAY,QAAI,+CAAmB;AAAA,IAC1G,4BAA4B,eAAe;AAAA,IAC3C,WAAW;AAAA,IACX,kBAAkB;AAAA,IAClB,eAAe;AAAA;AAAA;AAAA;AAAA,IAIf,gBAAgB,CAAC,UAAU;AACzB,qBAAe,KAAK;AACpB,UAAI,eAAe,QAAW;AAC5B,oBAAY;AACZ,QAAC,KAAK,WAA2B,MAAM;AAAA,MACzC;AAAA,IACF;AAAA,EACF,CAAC;AAED,QAAM,sBAAkB;AAAA,IACtB,CAAC,MAA2B;AAC1B,UAAI,EAAE,SAAS,aAAa;AAC1B,oBAAY;AAAA,MACd;AACA,UAAI,WAAY,YAAW,CAAC;AAAA,IAC9B;AAAA,IACA,CAAC,YAAY,WAAW;AAAA,EAC1B;AAEA,QAAM,oBAAgB,0BAAY,MAAM;AACtC,QAAI,eAAe,QAAW;AAC5B,kBAAY;AAAA,IACd;AACA,IAAC,KAAK,WAA2B,MAAM;AAAA,EACzC,GAAG,CAAC,aAAa,KAAK,WAAW,UAAU,CAAC;AAE5C,QAAM,2BAAuB;AAAA,IAC3B,CAAC,MAAwB;AACvB,UAAI,eAAe,OAAW,aAAY,CAAC;AAC3C,UAAI,QAAS,SAAQ,CAAC;AAAA,IACxB;AAAA,IACA,CAAC,SAAS,YAAY,WAAW;AAAA,EACnC;AAEA,QAAM,sBAAkB,0BAAY,MAAM;AACxC,QAAI,gBAAgB,eAAe,OAAW,eAAc;AAAA,EAC9D,GAAG,CAAC,cAAc,eAAe,UAAU,CAAC;AAE5C,QAAM,iBAAa;AAAA,IACjB,CAAC,QAA2B;AAC1B,aAAO,GAAG;AACV,WAAK,aAAa,GAAG;AAAA,IACvB;AAAA,IACA,CAAC,MAAM,MAAM;AAAA,EACf;AACA,SACE,6CAAC,SACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT,WAAW;AAAA,QACX,UAAU;AAAA,QACV,eAAa,2CAA0B;AAAA,QACvC,iBAAa;AAAA,QACb,iBAAe,cAAc;AAAA,QAC5B,OAAG,gDAAuB,UAAU;AAAA,QACrC,MAAK;AAAA,QACJ,GAAG;AAAA,QAEH,kBAAQ,4CAAC,QAAK,MAAK,KAAI;AAAA;AAAA,IAC1B;AAAA,IAEC,KAAK,YACJ;AAAA,MAAC;AAAA;AAAA,QACC,UAAU,KAAK;AAAA,QACf,QAAQ,cAAc;AAAA,QACtB;AAAA,QACA;AAAA,QAEA;AAAA;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA,aAAa;AAAA,cACb,SAAS;AAAA,cACT,WAAW;AAAA,cACX;AAAA,cACA;AAAA;AAAA,UACF;AAAA,UACA,4CAAC,2CAAc,GAAG,aAAa;AAAA;AAAA;AAAA,IACjC,IACE;AAAA,KACN;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport type { DSAppPicker } from '@elliemae/ds-app-picker';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n getPropsPerSlotPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type React from 'react';\nimport { DSGlobalHeaderName, GLOBAL_HEADER_SLOTS } from './constants/index.js';\n\nconst noop = () => null;\n\nexport const defaultProps = {\n breadcrumb: [],\n toolbar: [],\n LogoWithBrand: noop,\n Logo: noop,\n};\n\nexport declare namespace DSGlobalHeaderT {\n export interface Context {\n showIconOnly: boolean;\n fontDetector: number;\n setShowIconOnly: React.Dispatch<React.SetStateAction<boolean>>;\n instanceUID: string;\n globalHeaderToolbarGrid: string[];\n props: InternalProps;\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n }\n /* *************************************************************************************\n \"Breadcrumb widget\" configuration types\n ****************************************************************************************\n The breadcrumb items ARE SPREADING GLOBAL PROPS!!!\n + The breadcrumb items have a logic that force the onClick to be invoked on spacebar/enter too\n forcing it even if not the standard browser behaviour as per our buttons too\n ************************************************************************************** */\n export interface BreadcrumbItemOptionals {\n hasNext?: boolean;\n isSelected?: boolean;\n onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;\n }\n export interface BreadcrumbItemRequired {\n label: string;\n }\n export interface BreadcrumbItemOptionalsGlobals\n extends Omit<GlobalAttributesT, keyof BreadcrumbItemOptionals | keyof BreadcrumbItemRequired> {}\n\n export interface BreadcrumbItem\n extends BreadcrumbItemRequired,\n BreadcrumbItemOptionals,\n BreadcrumbItemOptionalsGlobals {}\n /* *************************************************************************************\n \"Toolbar widget\" configuration types\n ****************************************************************************************\n The toolbar item can be mainly of 4 different types\n - app-picker \n more or less map to ds-app-picker interface\n - popup-menu\n should more less map to dropdownmenu-v2 but should be changed to menu-button when possible\n - search-toggle\n a custom ad hoc implementation that expands in place and expose an input text,\n kinda problematic and force-added due to unrestrained \"yes man\" attitude with PM/PO\n we will be suggesting against using it officially in the later releases and try to find a better solution.\n - custom\n a way to allow app to provide their own render props along other pre-configured widgets out of the box\n ************************************************************************************** */\n\n /* *************************************************************************************\n toolbar -> type === 'custom'\n ************************************************************************************** */\n export interface ToolbarCustomComponentProps {\n item: Record<string, unknown> & {\n type: 'custom';\n CustomComponent: React.ComponentType<ToolbarCustomComponentProps>;\n };\n setRef: (ref: HTMLElement | null) => void;\n }\n export interface ToolbarCustomItem extends Record<string, unknown> {\n type: 'custom';\n label: string;\n CustomComponent: React.ComponentType<ToolbarCustomComponentProps>;\n }\n /* *************************************************************************************\n toolbar -> type === 'ds-search-toggle'\n ************************************************************************************** */\n // this props are actually required for the out-of-the-box to actually do what it needs to do\n // it's meant to be provided from the application, so this is kind of a weird way to do controlled components\n export interface ToggleSearchComponentProps {\n onNext: () => void;\n onPrevious: () => void;\n currentResultIndex: number;\n totalResults: number;\n placeholder: string;\n value: string;\n onChange: (value: string) => void;\n onBlur?: () => void;\n onClear: () => void;\n isOpen: boolean;\n onKeyDown: (event: React.KeyboardEvent) => void;\n onClick: (event: React.MouseEvent) => void;\n triggerRef: React.MutableRefObject<HTMLButtonElement>;\n searchContainerRef: React.MutableRefObject<HTMLDivElement>;\n }\n // WE ARE SPREADING GLOBAL PROPS!!!\n export interface SearchToggleProps extends GlobalAttributesT {\n setRef: (ref: HTMLButtonElement | null) => void;\n label: string;\n componentProps: ToggleSearchComponentProps;\n // https://jira.elliemae.io/browse/PUI-17852\n // - Generic aria-labels\n // -> allows users to specify a custom aria-label when the search toggle is expanded\n // -> it's an incremental change, so its \"optional\", we fall back to the previous hardcoded \"Close search\" if not provided\n // but authors are encouraged to improve the Aria-label with context-specific information when possible, to improve the overall accessibility of the component.\n ariaLabelExpanded?: string;\n // aria-controls needs to point to a DOM id, we need to make sure there are no conflicts in case of multiple search toggles on the same page\n instanceUID: Context['instanceUID'];\n }\n export interface ToolbarSearchToggleItem {\n type: 'ds-search-toggle';\n label: string;\n componentProps: ToggleSearchComponentProps;\n }\n /* *************************************************************************************\n toolbar -> type === 'ds-popup-menu'\n ************************************************************************************** */\n\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface PopupMenuContentItem extends Omit<GlobalAttributesT, 'type' | 'label' | 'onClick'> {\n type?: 'separator' | 'custom';\n Icon?: React.ComponentType<{ fill?: string; size?: string }>;\n label?: string;\n onClick?: (event: React.MouseEvent) => void;\n closeOnClick?: boolean;\n Content?: React.ComponentType;\n }\n export interface PopupMenuComponentProps {\n onClickOutside?: (e: MouseEvent | TouchEvent) => void;\n onKeyPress: (event: React.KeyboardEvent) => void;\n popupOnKeyPress: (event: React.KeyboardEvent) => void;\n isOpen: boolean;\n options: PopupMenuContentItem[];\n closeOnClick: boolean;\n }\n // this is the only type that was pre-existing (even if differently defined)\n // and that's why it doesn't include Toolbar at the start\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface PopupMenuItem extends Omit<GlobalAttributesT, 'type' | 'label' | 'onClick'> {\n type: 'ds-popup-menu';\n Icon?: React.ComponentType<{ fill?: string; size?: string }>;\n label?: string;\n onClick?: (event: React.MouseEvent) => void;\n Content?: React.ComponentType;\n componentProps: PopupMenuComponentProps;\n }\n\n export interface PopupMenuContentProps {\n options: PopupMenuContentItem[];\n onItemClick: () => void;\n onClose: () => void;\n popupOnKeyPress: (event: React.KeyboardEvent) => void;\n setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n }\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface PopupProps extends Omit<GlobalAttributesT, 'title' | 'label' | 'onClick'> {\n Icon?: React.ComponentType<{ fill?: string; size?: string }>;\n onClick?: (event: React.MouseEvent) => void;\n setRef: (ref: HTMLElement) => void;\n componentProps: PopupMenuComponentProps;\n title?: string; // this was probably not intended, but removing this means the HTML will not print the title={label}\n // keeping this for now, if A11y says otherwise we will do the proper steps to remove it\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n }\n\n /* *************************************************************************************\n toolbar -> type === 'ds-app-picker'\n ************************************************************************************** */\n export type AppPickerComponentProps = React.ComponentProps<typeof DSAppPicker> & {\n triggerOnClick?: React.MouseEventHandler<HTMLButtonElement>;\n };\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface AppPickerProps extends Omit<GlobalAttributesT, 'label'> {\n label: string;\n componentProps: AppPickerComponentProps;\n }\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface ToolbarAppPickerItem extends Omit<GlobalAttributesT, 'type' | 'label'> {\n type: 'ds-app-picker';\n label: string;\n componentProps: AppPickerComponentProps;\n }\n\n /* *************************************************************************************\n toolbar -> type === undefined (fallback default)\n ************************************************************************************** */\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface ToolbarItemTypelessDefault extends Omit<GlobalAttributesT, 'label'> {\n type?: undefined;\n label: string;\n Icon: React.ComponentType<{ fill?: string; size?: string }>;\n }\n\n export type ToolbarItem =\n | ToolbarCustomItem\n | ToolbarSearchToggleItem\n | ToolbarAppPickerItem\n | PopupMenuItem // this is the only type that was pre-existing and that's why it doesn't include Toolbar at the start\n | ToolbarItemTypelessDefault;\n\n export type SlotFunctionArguments = {\n dsGlobalheaderRoot: () => Record<string, never>;\n dsGlobalheaderLogoContainer: () => Record<string, never>;\n dsGlobalheaderBreadcrumbContainer: () => Record<string, never>;\n dsGlobalheaderBreadcrumbPipe: () => Record<string, never>;\n dsGlobalheaderBreadcrumbChevron: () => Record<string, never>;\n dsGlobalheaderBreadcrumbList: () => Record<string, never>;\n dsGlobalheaderBreadcrumbItem: () => Record<string, never>;\n dsGlobalheaderBreadcrumbItemLink: () => Record<string, never>;\n dsGlobalheaderBreadcrumbItemLinkLabel: () => Record<string, never>;\n dsGlobalheaderMenubarContainer: () => Record<string, never>;\n dsGlobalheaderMenubarList: () => Record<string, never>;\n dsGlobalheaderMenubarItem: () => Record<string, never>;\n dsGlobalheaderMenubarItemButton: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuList: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuItem: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuItemButton: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuSeparator: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuItemLabel: () => Record<string, never>;\n dsGlobalheaderMenubarItemSearchtoggleContainer: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonWrapper: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonText: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonSeparator: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonPrev: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonNext: () => Record<string, never>;\n dsGlobalheaderSearchtoggleTextinput: () => Record<string, never>;\n dsGlobalheaderSearchtoggleTriggerButton: () => Record<string, never>;\n dsGlobalheaderSearchtoggleExpandedContentWrapper: () => Record<string, never>;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n Logo: React.ComponentType;\n LogoWithBrand: React.ComponentType;\n breadcrumb: DSGlobalHeaderT.BreadcrumbItem[];\n toolbar: DSGlobalHeaderT.ToolbarItem[];\n CustomNavigation: React.ComponentType;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSGlobalHeaderName, typeof GLOBAL_HEADER_SLOTS> {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const DSGlobalHeaderPropTypes: DSPropTypesSchema<DSGlobalHeaderT.Props> = {\n ...getPropsPerSlotPropTypes(DSGlobalHeaderName, GLOBAL_HEADER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n CustomNavigation: PropTypes.func\n .description(\n 'Component to use instead of the standard breadcrumb out of the box configuration for custom scenarios',\n )\n .defaultValue('() => JSX.Element'),\n Logo: PropTypes.func\n .description('Global Header Logo to render. Logo and LogoWithBrand are going to swap during window resizing.')\n .defaultValue('() => JSX.Element'),\n LogoWithBrand: PropTypes.func\n .description(\n 'Global Header Logo With Brand title to render. Logo and LogoWithBrand are going to swap during window resizing.',\n )\n .defaultValue('() => JSX.Element'),\n breadcrumb: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string.description('breadrcrumb item label'),\n hasNext: PropTypes.bool.description('whether the item has a child or not'),\n isSelected: PropTypes.bool.description('whether the item is selected or not'),\n onClick: PropTypes.func.description('Callback executed on click'),\n }),\n )\n .description('Breadcrumb items to display. Max 3 levels. Compatible with GlobalAttributes.')\n .defaultValue('[]'),\n toolbar: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string.description('title tag description'),\n type: PropTypes.oneOf(['ds-app-picker', 'ds-popup-menu', 'ds-search-toggle', 'custom']).description(\n 'use to select one of the out-of-the-box types of items',\n ),\n componentProps: PropTypes.object.description('props of out-of-the-box component'),\n Icon: PropTypes.func.description('Icon to display'),\n onClick: PropTypes.func.description('Callback executed on click'),\n }),\n )\n .description('Toolbar items. Compatible with GlobalAttributes.')\n .defaultValue('[]'),\n};\n// kept for legacy reasons, this is now named differently, but we want no breaking changes.\nexport const propTypes = DSGlobalHeaderPropTypes;\n\nexport const DSGlobalHeaderPropTypesSchema = DSGlobalHeaderPropTypes as unknown as ValidationMap<DSGlobalHeaderT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAKO;AAGP,uBAAwD;AAExD,MAAM,OAAO,MAAM;AAEZ,MAAM,eAAe;AAAA,EAC1B,YAAY,CAAC;AAAA,EACb,SAAS,CAAC;AAAA,EACV,eAAe;AAAA,EACf,MAAM;AACR;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport type { DSAppPicker } from '@elliemae/ds-app-picker';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n getPropsPerSlotPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type React from 'react';\nimport { DSGlobalHeaderName, GLOBAL_HEADER_SLOTS } from './constants/index.js';\n\nconst noop = () => null;\n\nexport const defaultProps = {\n breadcrumb: [],\n toolbar: [],\n LogoWithBrand: noop,\n Logo: noop,\n};\n\nexport declare namespace DSGlobalHeaderT {\n export interface Context {\n showIconOnly: boolean;\n fontDetector: number;\n setShowIconOnly: React.Dispatch<React.SetStateAction<boolean>>;\n instanceUID: string;\n globalHeaderToolbarGrid: string[];\n props: InternalProps;\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n }\n /* *************************************************************************************\n \"Breadcrumb widget\" configuration types\n ****************************************************************************************\n The breadcrumb items ARE SPREADING GLOBAL PROPS!!!\n + The breadcrumb items have a logic that force the onClick to be invoked on spacebar/enter too\n forcing it even if not the standard browser behaviour as per our buttons too\n ************************************************************************************** */\n export interface BreadcrumbItemOptionals {\n hasNext?: boolean;\n isSelected?: boolean;\n onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;\n }\n export interface BreadcrumbItemRequired {\n label: string;\n }\n export interface BreadcrumbItemOptionalsGlobals extends Omit<\n GlobalAttributesT,\n keyof BreadcrumbItemOptionals | keyof BreadcrumbItemRequired\n > {}\n\n export interface BreadcrumbItem\n extends BreadcrumbItemRequired, BreadcrumbItemOptionals, BreadcrumbItemOptionalsGlobals {}\n /* *************************************************************************************\n \"Toolbar widget\" configuration types\n ****************************************************************************************\n The toolbar item can be mainly of 4 different types\n - app-picker \n more or less map to ds-app-picker interface\n - popup-menu\n should more less map to dropdownmenu-v2 but should be changed to menu-button when possible\n - search-toggle\n a custom ad hoc implementation that expands in place and expose an input text,\n kinda problematic and force-added due to unrestrained \"yes man\" attitude with PM/PO\n we will be suggesting against using it officially in the later releases and try to find a better solution.\n - custom\n a way to allow app to provide their own render props along other pre-configured widgets out of the box\n ************************************************************************************** */\n\n /* *************************************************************************************\n toolbar -> type === 'custom'\n ************************************************************************************** */\n export interface ToolbarCustomComponentProps {\n item: Record<string, unknown> & {\n type: 'custom';\n CustomComponent: React.ComponentType<ToolbarCustomComponentProps>;\n };\n setRef: (ref: HTMLElement | null) => void;\n }\n export interface ToolbarCustomItem extends Record<string, unknown> {\n type: 'custom';\n label: string;\n CustomComponent: React.ComponentType<ToolbarCustomComponentProps>;\n }\n /* *************************************************************************************\n toolbar -> type === 'ds-search-toggle'\n ************************************************************************************** */\n // this props are actually required for the out-of-the-box to actually do what it needs to do\n // it's meant to be provided from the application, so this is kind of a weird way to do controlled components\n export interface ToggleSearchComponentProps {\n onNext: () => void;\n onPrevious: () => void;\n currentResultIndex: number;\n totalResults: number;\n placeholder: string;\n value: string;\n onChange: (value: string) => void;\n onBlur?: () => void;\n onClear: () => void;\n isOpen: boolean;\n onKeyDown: (event: React.KeyboardEvent) => void;\n onClick: (event: React.MouseEvent) => void;\n triggerRef: React.MutableRefObject<HTMLButtonElement>;\n searchContainerRef: React.MutableRefObject<HTMLDivElement>;\n }\n // WE ARE SPREADING GLOBAL PROPS!!!\n export interface SearchToggleProps extends GlobalAttributesT {\n setRef: (ref: HTMLButtonElement | null) => void;\n label: string;\n componentProps: ToggleSearchComponentProps;\n // https://jira.elliemae.io/browse/PUI-17852\n // - Generic aria-labels\n // -> allows users to specify a custom aria-label when the search toggle is expanded\n // -> it's an incremental change, so its \"optional\", we fall back to the previous hardcoded \"Close search\" if not provided\n // but authors are encouraged to improve the Aria-label with context-specific information when possible, to improve the overall accessibility of the component.\n ariaLabelExpanded?: string;\n // aria-controls needs to point to a DOM id, we need to make sure there are no conflicts in case of multiple search toggles on the same page\n instanceUID: Context['instanceUID'];\n }\n export interface ToolbarSearchToggleItem {\n type: 'ds-search-toggle';\n label: string;\n componentProps: ToggleSearchComponentProps;\n }\n /* *************************************************************************************\n toolbar -> type === 'ds-popup-menu'\n ************************************************************************************** */\n\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface PopupMenuContentItem extends Omit<GlobalAttributesT, 'type' | 'label' | 'onClick'> {\n type?: 'separator' | 'custom';\n Icon?: React.ComponentType<{ fill?: string; size?: string }>;\n label?: string;\n onClick?: (event: React.MouseEvent) => void;\n closeOnClick?: boolean;\n Content?: React.ComponentType;\n }\n export interface PopupMenuComponentProps {\n onClickOutside?: (e: MouseEvent | TouchEvent) => void;\n onKeyPress: (event: React.KeyboardEvent) => void;\n popupOnKeyPress: (event: React.KeyboardEvent) => void;\n isOpen: boolean;\n options: PopupMenuContentItem[];\n closeOnClick: boolean;\n }\n // this is the only type that was pre-existing (even if differently defined)\n // and that's why it doesn't include Toolbar at the start\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface PopupMenuItem extends Omit<GlobalAttributesT, 'type' | 'label' | 'onClick'> {\n type: 'ds-popup-menu';\n Icon?: React.ComponentType<{ fill?: string; size?: string }>;\n label?: string;\n onClick?: (event: React.MouseEvent) => void;\n Content?: React.ComponentType;\n componentProps: PopupMenuComponentProps;\n }\n\n export interface PopupMenuContentProps {\n options: PopupMenuContentItem[];\n onItemClick: () => void;\n onClose: () => void;\n popupOnKeyPress: (event: React.KeyboardEvent) => void;\n setIsOpen: () => void;\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n }\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface PopupProps extends Omit<GlobalAttributesT, 'title' | 'label' | 'onClick'> {\n Icon?: React.ComponentType<{ fill?: string; size?: string }>;\n onClick?: (event: React.MouseEvent) => void;\n setRef: (ref: HTMLElement) => void;\n componentProps: PopupMenuComponentProps;\n title?: string; // this was probably not intended, but removing this means the HTML will not print the title={label}\n // keeping this for now, if A11y says otherwise we will do the proper steps to remove it\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n }\n\n /* *************************************************************************************\n toolbar -> type === 'ds-app-picker'\n ************************************************************************************** */\n export type AppPickerComponentProps = React.ComponentProps<typeof DSAppPicker> & {\n triggerOnClick?: React.MouseEventHandler<HTMLButtonElement>;\n };\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface AppPickerProps extends Omit<GlobalAttributesT, 'label'> {\n label: string;\n componentProps: AppPickerComponentProps;\n }\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface ToolbarAppPickerItem extends Omit<GlobalAttributesT, 'type' | 'label'> {\n type: 'ds-app-picker';\n label: string;\n componentProps: AppPickerComponentProps;\n }\n\n /* *************************************************************************************\n toolbar -> type === undefined (fallback default)\n ************************************************************************************** */\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface ToolbarItemTypelessDefault extends Omit<GlobalAttributesT, 'label'> {\n type?: undefined;\n label: string;\n Icon: React.ComponentType<{ fill?: string; size?: string }>;\n }\n\n export type ToolbarItem =\n | ToolbarCustomItem\n | ToolbarSearchToggleItem\n | ToolbarAppPickerItem\n | PopupMenuItem // this is the only type that was pre-existing and that's why it doesn't include Toolbar at the start\n | ToolbarItemTypelessDefault;\n\n export type SlotFunctionArguments = {\n dsGlobalheaderRoot: () => Record<string, never>;\n dsGlobalheaderLogoContainer: () => Record<string, never>;\n dsGlobalheaderBreadcrumbContainer: () => Record<string, never>;\n dsGlobalheaderBreadcrumbPipe: () => Record<string, never>;\n dsGlobalheaderBreadcrumbChevron: () => Record<string, never>;\n dsGlobalheaderBreadcrumbList: () => Record<string, never>;\n dsGlobalheaderBreadcrumbItem: () => Record<string, never>;\n dsGlobalheaderBreadcrumbItemLink: () => Record<string, never>;\n dsGlobalheaderBreadcrumbItemLinkLabel: () => Record<string, never>;\n dsGlobalheaderMenubarContainer: () => Record<string, never>;\n dsGlobalheaderMenubarList: () => Record<string, never>;\n dsGlobalheaderMenubarItem: () => Record<string, never>;\n dsGlobalheaderMenubarItemButton: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuList: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuItem: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuItemButton: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuSeparator: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuItemLabel: () => Record<string, never>;\n dsGlobalheaderMenubarItemSearchtoggleContainer: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonWrapper: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonText: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonSeparator: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonPrev: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonNext: () => Record<string, never>;\n dsGlobalheaderSearchtoggleTextinput: () => Record<string, never>;\n dsGlobalheaderSearchtoggleTriggerButton: () => Record<string, never>;\n dsGlobalheaderSearchtoggleExpandedContentWrapper: () => Record<string, never>;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n Logo: React.ComponentType;\n LogoWithBrand: React.ComponentType;\n breadcrumb: DSGlobalHeaderT.BreadcrumbItem[];\n toolbar: DSGlobalHeaderT.ToolbarItem[];\n CustomNavigation: React.ComponentType;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSGlobalHeaderName,\n typeof GLOBAL_HEADER_SLOTS\n > {}\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const DSGlobalHeaderPropTypes: DSPropTypesSchema<DSGlobalHeaderT.Props> = {\n ...getPropsPerSlotPropTypes(DSGlobalHeaderName, GLOBAL_HEADER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n CustomNavigation: PropTypes.func\n .description(\n 'Component to use instead of the standard breadcrumb out of the box configuration for custom scenarios',\n )\n .defaultValue('() => JSX.Element'),\n Logo: PropTypes.func\n .description('Global Header Logo to render. Logo and LogoWithBrand are going to swap during window resizing.')\n .defaultValue('() => JSX.Element'),\n LogoWithBrand: PropTypes.func\n .description(\n 'Global Header Logo With Brand title to render. Logo and LogoWithBrand are going to swap during window resizing.',\n )\n .defaultValue('() => JSX.Element'),\n breadcrumb: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string.description('breadrcrumb item label'),\n hasNext: PropTypes.bool.description('whether the item has a child or not'),\n isSelected: PropTypes.bool.description('whether the item is selected or not'),\n onClick: PropTypes.func.description('Callback executed on click'),\n }),\n )\n .description('Breadcrumb items to display. Max 3 levels. Compatible with GlobalAttributes.')\n .defaultValue('[]'),\n toolbar: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string.description('title tag description'),\n type: PropTypes.oneOf(['ds-app-picker', 'ds-popup-menu', 'ds-search-toggle', 'custom']).description(\n 'use to select one of the out-of-the-box types of items',\n ),\n componentProps: PropTypes.object.description('props of out-of-the-box component'),\n Icon: PropTypes.func.description('Icon to display'),\n onClick: PropTypes.func.description('Callback executed on click'),\n }),\n )\n .description('Toolbar items. Compatible with GlobalAttributes.')\n .defaultValue('[]'),\n};\n// kept for legacy reasons, this is now named differently, but we want no breaking changes.\nexport const propTypes = DSGlobalHeaderPropTypes;\n\nexport const DSGlobalHeaderPropTypesSchema = DSGlobalHeaderPropTypes as unknown as ValidationMap<DSGlobalHeaderT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAKO;AAGP,uBAAwD;AAExD,MAAM,OAAO,MAAM;AAEZ,MAAM,eAAe;AAAA,EAC1B,YAAY,CAAC;AAAA,EACb,SAAS,CAAC;AAAA,EACV,eAAe;AAAA,EACf,MAAM;AACR;AA6QO,MAAM,0BAAoE;AAAA,EAC/E,OAAG,kDAAyB,qCAAoB,oCAAmB;AAAA,EACnE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,kBAAkB,kCAAU,KACzB;AAAA,IACC;AAAA,EACF,EACC,aAAa,mBAAmB;AAAA,EACnC,MAAM,kCAAU,KACb,YAAY,gGAAgG,EAC5G,aAAa,mBAAmB;AAAA,EACnC,eAAe,kCAAU,KACtB;AAAA,IACC;AAAA,EACF,EACC,aAAa,mBAAmB;AAAA,EACnC,YAAY,kCAAU;AAAA,IACpB,kCAAU,MAAM;AAAA,MACd,OAAO,kCAAU,OAAO,YAAY,wBAAwB;AAAA,MAC5D,SAAS,kCAAU,KAAK,YAAY,qCAAqC;AAAA,MACzE,YAAY,kCAAU,KAAK,YAAY,qCAAqC;AAAA,MAC5E,SAAS,kCAAU,KAAK,YAAY,4BAA4B;AAAA,IAClE,CAAC;AAAA,EACH,EACG,YAAY,8EAA8E,EAC1F,aAAa,IAAI;AAAA,EACpB,SAAS,kCAAU;AAAA,IACjB,kCAAU,MAAM;AAAA,MACd,OAAO,kCAAU,OAAO,YAAY,uBAAuB;AAAA,MAC3D,MAAM,kCAAU,MAAM,CAAC,iBAAiB,iBAAiB,oBAAoB,QAAQ,CAAC,EAAE;AAAA,QACtF;AAAA,MACF;AAAA,MACA,gBAAgB,kCAAU,OAAO,YAAY,mCAAmC;AAAA,MAChF,MAAM,kCAAU,KAAK,YAAY,iBAAiB;AAAA,MAClD,SAAS,kCAAU,KAAK,YAAY,4BAA4B;AAAA,IAClE,CAAC;AAAA,EACH,EACG,YAAY,kDAAkD,EAC9D,aAAa,IAAI;AACtB;AAEO,MAAM,YAAY;AAElB,MAAM,gCAAgC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -55,7 +55,7 @@ const PopupMenu = ({
|
|
|
55
55
|
}, [hideTooltip, refs.reference, userIsOpen]);
|
|
56
56
|
const handleTriggerOnClick = useCallback(
|
|
57
57
|
(e) => {
|
|
58
|
-
if (userIsOpen === void 0) showTooltip();
|
|
58
|
+
if (userIsOpen === void 0) showTooltip(e);
|
|
59
59
|
if (onClick) onClick(e);
|
|
60
60
|
},
|
|
61
61
|
[onClick, userIsOpen, showTooltip]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../src/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useFloatingContext, PopoverArrow, FloatingWrapper } from '@elliemae/ds-floating-context';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport React, { useCallback } from 'react';\nimport { GLOBAL_HEADER_DATA_TESTID } from '../../../../constants/index.js';\nimport type { DSGlobalHeaderT } from '../../../../react-desc-prop-types.js';\nimport { StyledButton } from '../../../styles.js';\nimport { PopupMenuContent } from './menuContent/PopupMenuContent.js';\n\nexport const PopupMenu = ({\n Icon,\n onClick,\n setRef,\n componentProps,\n ownerProps,\n ...otherProps\n}: DSGlobalHeaderT.PopupProps): JSX.Element => {\n const {\n onClickOutside = () => null,\n onKeyPress,\n popupOnKeyPress,\n isOpen: userIsOpen,\n options,\n closeOnClick,\n } = componentProps;\n\n // We need to declare the floating context before we can reference its hideTooltip in\n // handleOutside; but handleOutside is passed into the same hook call. We resolve this by\n // pulling hideTooltip / refs.reference via the latest-ref pattern of the hook itself \u2014\n // see comments on `onClickOutside` below.\n const { arrowStyles, floatingStyles, isOpen, refs, context, showTooltip, hideTooltip } = useFloatingContext({\n externallyControlledIsOpen: componentProps.isOpen,\n placement: 'bottom',\n withoutAnimation: true,\n withoutPortal: true,\n // The hook auto-excludes clicks inside the floating element and the reference, so the\n // outside boundary is now { reference, floating } \u2014 no boundary <div> needed.\n // Gated internally on `isOpen`, so it only fires while open.\n onClickOutside: (event) => {\n onClickOutside(event);\n if (userIsOpen === undefined) {\n hideTooltip();\n (refs.reference as HTMLElement)?.focus();\n }\n },\n });\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.code === 'ArrowDown') {\n showTooltip();\n }\n if (onKeyPress) onKeyPress(e);\n },\n [onKeyPress, showTooltip],\n );\n\n const handleOnClose = useCallback(() => {\n if (userIsOpen === undefined) {\n hideTooltip();\n }\n (refs.reference as HTMLElement)?.focus();\n }, [hideTooltip, refs.reference, userIsOpen]);\n\n const handleTriggerOnClick = useCallback(\n (e: React.MouseEvent) => {\n if (userIsOpen === undefined) showTooltip();\n if (onClick) onClick(e);\n },\n [onClick, userIsOpen, showTooltip],\n );\n\n const handleItemClick = useCallback(() => {\n if (closeOnClick && userIsOpen === undefined) handleOnClose();\n }, [closeOnClick, handleOnClose, userIsOpen]);\n\n const handleRefs = useCallback(\n (ref: HTMLButtonElement) => {\n setRef(ref);\n refs.setReference(ref);\n },\n [refs, setRef],\n );\n return (\n <div>\n <StyledButton\n onClick={handleTriggerOnClick}\n onKeyDown={handleOnKeyDown}\n innerRef={handleRefs}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM_BUTTON}\n aria-haspopup\n aria-expanded={userIsOpen ?? isOpen}\n {...useGetGlobalAttributes(otherProps)}\n type=\"button\"\n {...ownerProps}\n >\n {Icon && <Icon size=\"m\" />}\n </StyledButton>\n\n {refs.reference ? (\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={userIsOpen ?? isOpen}\n floatingStyles={floatingStyles}\n context={context}\n >\n <PopupMenuContent\n options={options}\n onItemClick={handleItemClick}\n onClose={handleOnClose}\n setIsOpen={hideTooltip}\n popupOnKeyPress={popupOnKeyPress}\n ownerProps={ownerProps}\n />\n <PopoverArrow {...arrowStyles} />\n </FloatingWrapper>\n ) : null}\n </div>\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC+FN,cAIT,YAJS;AA/FjB,SAAS,oBAAoB,cAAc,uBAAuB;AAClE,SAAS,8BAA8B;AACvC,SAAgB,mBAAmB;AACnC,SAAS,iCAAiC;AAE1C,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AAE1B,MAAM,YAAY,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA+C;AAC7C,QAAM;AAAA,IACJ,iBAAiB,MAAM;AAAA,IACvB;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,EACF,IAAI;AAMJ,QAAM,EAAE,aAAa,gBAAgB,QAAQ,MAAM,SAAS,aAAa,YAAY,IAAI,mBAAmB;AAAA,IAC1G,4BAA4B,eAAe;AAAA,IAC3C,WAAW;AAAA,IACX,kBAAkB;AAAA,IAClB,eAAe;AAAA;AAAA;AAAA;AAAA,IAIf,gBAAgB,CAAC,UAAU;AACzB,qBAAe,KAAK;AACpB,UAAI,eAAe,QAAW;AAC5B,oBAAY;AACZ,QAAC,KAAK,WAA2B,MAAM;AAAA,MACzC;AAAA,IACF;AAAA,EACF,CAAC;AAED,QAAM,kBAAkB;AAAA,IACtB,CAAC,MAA2B;AAC1B,UAAI,EAAE,SAAS,aAAa;AAC1B,oBAAY;AAAA,MACd;AACA,UAAI,WAAY,YAAW,CAAC;AAAA,IAC9B;AAAA,IACA,CAAC,YAAY,WAAW;AAAA,EAC1B;AAEA,QAAM,gBAAgB,YAAY,MAAM;AACtC,QAAI,eAAe,QAAW;AAC5B,kBAAY;AAAA,IACd;AACA,IAAC,KAAK,WAA2B,MAAM;AAAA,EACzC,GAAG,CAAC,aAAa,KAAK,WAAW,UAAU,CAAC;AAE5C,QAAM,uBAAuB;AAAA,IAC3B,CAAC,MAAwB;AACvB,UAAI,eAAe,OAAW,aAAY;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useFloatingContext, PopoverArrow, FloatingWrapper } from '@elliemae/ds-floating-context';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport React, { useCallback } from 'react';\nimport { GLOBAL_HEADER_DATA_TESTID } from '../../../../constants/index.js';\nimport type { DSGlobalHeaderT } from '../../../../react-desc-prop-types.js';\nimport { StyledButton } from '../../../styles.js';\nimport { PopupMenuContent } from './menuContent/PopupMenuContent.js';\n\nexport const PopupMenu = ({\n Icon,\n onClick,\n setRef,\n componentProps,\n ownerProps,\n ...otherProps\n}: DSGlobalHeaderT.PopupProps): JSX.Element => {\n const {\n onClickOutside = () => null,\n onKeyPress,\n popupOnKeyPress,\n isOpen: userIsOpen,\n options,\n closeOnClick,\n } = componentProps;\n\n // We need to declare the floating context before we can reference its hideTooltip in\n // handleOutside; but handleOutside is passed into the same hook call. We resolve this by\n // pulling hideTooltip / refs.reference via the latest-ref pattern of the hook itself \u2014\n // see comments on `onClickOutside` below.\n const { arrowStyles, floatingStyles, isOpen, refs, context, showTooltip, hideTooltip } = useFloatingContext({\n externallyControlledIsOpen: componentProps.isOpen,\n placement: 'bottom',\n withoutAnimation: true,\n withoutPortal: true,\n // The hook auto-excludes clicks inside the floating element and the reference, so the\n // outside boundary is now { reference, floating } \u2014 no boundary <div> needed.\n // Gated internally on `isOpen`, so it only fires while open.\n onClickOutside: (event) => {\n onClickOutside(event);\n if (userIsOpen === undefined) {\n hideTooltip();\n (refs.reference as HTMLElement)?.focus();\n }\n },\n });\n\n const handleOnKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.code === 'ArrowDown') {\n showTooltip();\n }\n if (onKeyPress) onKeyPress(e);\n },\n [onKeyPress, showTooltip],\n );\n\n const handleOnClose = useCallback(() => {\n if (userIsOpen === undefined) {\n hideTooltip();\n }\n (refs.reference as HTMLElement)?.focus();\n }, [hideTooltip, refs.reference, userIsOpen]);\n\n const handleTriggerOnClick = useCallback(\n (e: React.MouseEvent) => {\n if (userIsOpen === undefined) showTooltip(e);\n if (onClick) onClick(e);\n },\n [onClick, userIsOpen, showTooltip],\n );\n\n const handleItemClick = useCallback(() => {\n if (closeOnClick && userIsOpen === undefined) handleOnClose();\n }, [closeOnClick, handleOnClose, userIsOpen]);\n\n const handleRefs = useCallback(\n (ref: HTMLButtonElement) => {\n setRef(ref);\n refs.setReference(ref);\n },\n [refs, setRef],\n );\n return (\n <div>\n <StyledButton\n onClick={handleTriggerOnClick}\n onKeyDown={handleOnKeyDown}\n innerRef={handleRefs}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM_BUTTON}\n aria-haspopup\n aria-expanded={userIsOpen ?? isOpen}\n {...useGetGlobalAttributes(otherProps)}\n type=\"button\"\n {...ownerProps}\n >\n {Icon && <Icon size=\"m\" />}\n </StyledButton>\n\n {refs.reference ? (\n <FloatingWrapper\n innerRef={refs.setFloating}\n isOpen={userIsOpen ?? isOpen}\n floatingStyles={floatingStyles}\n context={context}\n >\n <PopupMenuContent\n options={options}\n onItemClick={handleItemClick}\n onClose={handleOnClose}\n setIsOpen={hideTooltip}\n popupOnKeyPress={popupOnKeyPress}\n ownerProps={ownerProps}\n />\n <PopoverArrow {...arrowStyles} />\n </FloatingWrapper>\n ) : null}\n </div>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC+FN,cAIT,YAJS;AA/FjB,SAAS,oBAAoB,cAAc,uBAAuB;AAClE,SAAS,8BAA8B;AACvC,SAAgB,mBAAmB;AACnC,SAAS,iCAAiC;AAE1C,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AAE1B,MAAM,YAAY,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA+C;AAC7C,QAAM;AAAA,IACJ,iBAAiB,MAAM;AAAA,IACvB;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,EACF,IAAI;AAMJ,QAAM,EAAE,aAAa,gBAAgB,QAAQ,MAAM,SAAS,aAAa,YAAY,IAAI,mBAAmB;AAAA,IAC1G,4BAA4B,eAAe;AAAA,IAC3C,WAAW;AAAA,IACX,kBAAkB;AAAA,IAClB,eAAe;AAAA;AAAA;AAAA;AAAA,IAIf,gBAAgB,CAAC,UAAU;AACzB,qBAAe,KAAK;AACpB,UAAI,eAAe,QAAW;AAC5B,oBAAY;AACZ,QAAC,KAAK,WAA2B,MAAM;AAAA,MACzC;AAAA,IACF;AAAA,EACF,CAAC;AAED,QAAM,kBAAkB;AAAA,IACtB,CAAC,MAA2B;AAC1B,UAAI,EAAE,SAAS,aAAa;AAC1B,oBAAY;AAAA,MACd;AACA,UAAI,WAAY,YAAW,CAAC;AAAA,IAC9B;AAAA,IACA,CAAC,YAAY,WAAW;AAAA,EAC1B;AAEA,QAAM,gBAAgB,YAAY,MAAM;AACtC,QAAI,eAAe,QAAW;AAC5B,kBAAY;AAAA,IACd;AACA,IAAC,KAAK,WAA2B,MAAM;AAAA,EACzC,GAAG,CAAC,aAAa,KAAK,WAAW,UAAU,CAAC;AAE5C,QAAM,uBAAuB;AAAA,IAC3B,CAAC,MAAwB;AACvB,UAAI,eAAe,OAAW,aAAY,CAAC;AAC3C,UAAI,QAAS,SAAQ,CAAC;AAAA,IACxB;AAAA,IACA,CAAC,SAAS,YAAY,WAAW;AAAA,EACnC;AAEA,QAAM,kBAAkB,YAAY,MAAM;AACxC,QAAI,gBAAgB,eAAe,OAAW,eAAc;AAAA,EAC9D,GAAG,CAAC,cAAc,eAAe,UAAU,CAAC;AAE5C,QAAM,aAAa;AAAA,IACjB,CAAC,QAA2B;AAC1B,aAAO,GAAG;AACV,WAAK,aAAa,GAAG;AAAA,IACvB;AAAA,IACA,CAAC,MAAM,MAAM;AAAA,EACf;AACA,SACE,qBAAC,SACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT,WAAW;AAAA,QACX,UAAU;AAAA,QACV,eAAa,0BAA0B;AAAA,QACvC,iBAAa;AAAA,QACb,iBAAe,cAAc;AAAA,QAC5B,GAAG,uBAAuB,UAAU;AAAA,QACrC,MAAK;AAAA,QACJ,GAAG;AAAA,QAEH,kBAAQ,oBAAC,QAAK,MAAK,KAAI;AAAA;AAAA,IAC1B;AAAA,IAEC,KAAK,YACJ;AAAA,MAAC;AAAA;AAAA,QACC,UAAU,KAAK;AAAA,QACf,QAAQ,cAAc;AAAA,QACtB;AAAA,QACA;AAAA,QAEA;AAAA;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA,aAAa;AAAA,cACb,SAAS;AAAA,cACT,WAAW;AAAA,cACX;AAAA,cACA;AAAA;AAAA,UACF;AAAA,UACA,oBAAC,gBAAc,GAAG,aAAa;AAAA;AAAA;AAAA,IACjC,IACE;AAAA,KACN;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { DSAppPicker } from '@elliemae/ds-app-picker';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n getPropsPerSlotPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type React from 'react';\nimport { DSGlobalHeaderName, GLOBAL_HEADER_SLOTS } from './constants/index.js';\n\nconst noop = () => null;\n\nexport const defaultProps = {\n breadcrumb: [],\n toolbar: [],\n LogoWithBrand: noop,\n Logo: noop,\n};\n\nexport declare namespace DSGlobalHeaderT {\n export interface Context {\n showIconOnly: boolean;\n fontDetector: number;\n setShowIconOnly: React.Dispatch<React.SetStateAction<boolean>>;\n instanceUID: string;\n globalHeaderToolbarGrid: string[];\n props: InternalProps;\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n }\n /* *************************************************************************************\n \"Breadcrumb widget\" configuration types\n ****************************************************************************************\n The breadcrumb items ARE SPREADING GLOBAL PROPS!!!\n + The breadcrumb items have a logic that force the onClick to be invoked on spacebar/enter too\n forcing it even if not the standard browser behaviour as per our buttons too\n ************************************************************************************** */\n export interface BreadcrumbItemOptionals {\n hasNext?: boolean;\n isSelected?: boolean;\n onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;\n }\n export interface BreadcrumbItemRequired {\n label: string;\n }\n export interface BreadcrumbItemOptionalsGlobals\n extends Omit<GlobalAttributesT, keyof BreadcrumbItemOptionals | keyof BreadcrumbItemRequired> {}\n\n export interface BreadcrumbItem\n extends BreadcrumbItemRequired,\n BreadcrumbItemOptionals,\n BreadcrumbItemOptionalsGlobals {}\n /* *************************************************************************************\n \"Toolbar widget\" configuration types\n ****************************************************************************************\n The toolbar item can be mainly of 4 different types\n - app-picker \n more or less map to ds-app-picker interface\n - popup-menu\n should more less map to dropdownmenu-v2 but should be changed to menu-button when possible\n - search-toggle\n a custom ad hoc implementation that expands in place and expose an input text,\n kinda problematic and force-added due to unrestrained \"yes man\" attitude with PM/PO\n we will be suggesting against using it officially in the later releases and try to find a better solution.\n - custom\n a way to allow app to provide their own render props along other pre-configured widgets out of the box\n ************************************************************************************** */\n\n /* *************************************************************************************\n toolbar -> type === 'custom'\n ************************************************************************************** */\n export interface ToolbarCustomComponentProps {\n item: Record<string, unknown> & {\n type: 'custom';\n CustomComponent: React.ComponentType<ToolbarCustomComponentProps>;\n };\n setRef: (ref: HTMLElement | null) => void;\n }\n export interface ToolbarCustomItem extends Record<string, unknown> {\n type: 'custom';\n label: string;\n CustomComponent: React.ComponentType<ToolbarCustomComponentProps>;\n }\n /* *************************************************************************************\n toolbar -> type === 'ds-search-toggle'\n ************************************************************************************** */\n // this props are actually required for the out-of-the-box to actually do what it needs to do\n // it's meant to be provided from the application, so this is kind of a weird way to do controlled components\n export interface ToggleSearchComponentProps {\n onNext: () => void;\n onPrevious: () => void;\n currentResultIndex: number;\n totalResults: number;\n placeholder: string;\n value: string;\n onChange: (value: string) => void;\n onBlur?: () => void;\n onClear: () => void;\n isOpen: boolean;\n onKeyDown: (event: React.KeyboardEvent) => void;\n onClick: (event: React.MouseEvent) => void;\n triggerRef: React.MutableRefObject<HTMLButtonElement>;\n searchContainerRef: React.MutableRefObject<HTMLDivElement>;\n }\n // WE ARE SPREADING GLOBAL PROPS!!!\n export interface SearchToggleProps extends GlobalAttributesT {\n setRef: (ref: HTMLButtonElement | null) => void;\n label: string;\n componentProps: ToggleSearchComponentProps;\n // https://jira.elliemae.io/browse/PUI-17852\n // - Generic aria-labels\n // -> allows users to specify a custom aria-label when the search toggle is expanded\n // -> it's an incremental change, so its \"optional\", we fall back to the previous hardcoded \"Close search\" if not provided\n // but authors are encouraged to improve the Aria-label with context-specific information when possible, to improve the overall accessibility of the component.\n ariaLabelExpanded?: string;\n // aria-controls needs to point to a DOM id, we need to make sure there are no conflicts in case of multiple search toggles on the same page\n instanceUID: Context['instanceUID'];\n }\n export interface ToolbarSearchToggleItem {\n type: 'ds-search-toggle';\n label: string;\n componentProps: ToggleSearchComponentProps;\n }\n /* *************************************************************************************\n toolbar -> type === 'ds-popup-menu'\n ************************************************************************************** */\n\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface PopupMenuContentItem extends Omit<GlobalAttributesT, 'type' | 'label' | 'onClick'> {\n type?: 'separator' | 'custom';\n Icon?: React.ComponentType<{ fill?: string; size?: string }>;\n label?: string;\n onClick?: (event: React.MouseEvent) => void;\n closeOnClick?: boolean;\n Content?: React.ComponentType;\n }\n export interface PopupMenuComponentProps {\n onClickOutside?: (e: MouseEvent | TouchEvent) => void;\n onKeyPress: (event: React.KeyboardEvent) => void;\n popupOnKeyPress: (event: React.KeyboardEvent) => void;\n isOpen: boolean;\n options: PopupMenuContentItem[];\n closeOnClick: boolean;\n }\n // this is the only type that was pre-existing (even if differently defined)\n // and that's why it doesn't include Toolbar at the start\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface PopupMenuItem extends Omit<GlobalAttributesT, 'type' | 'label' | 'onClick'> {\n type: 'ds-popup-menu';\n Icon?: React.ComponentType<{ fill?: string; size?: string }>;\n label?: string;\n onClick?: (event: React.MouseEvent) => void;\n Content?: React.ComponentType;\n componentProps: PopupMenuComponentProps;\n }\n\n export interface PopupMenuContentProps {\n options: PopupMenuContentItem[];\n onItemClick: () => void;\n onClose: () => void;\n popupOnKeyPress: (event: React.KeyboardEvent) => void;\n setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n }\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface PopupProps extends Omit<GlobalAttributesT, 'title' | 'label' | 'onClick'> {\n Icon?: React.ComponentType<{ fill?: string; size?: string }>;\n onClick?: (event: React.MouseEvent) => void;\n setRef: (ref: HTMLElement) => void;\n componentProps: PopupMenuComponentProps;\n title?: string; // this was probably not intended, but removing this means the HTML will not print the title={label}\n // keeping this for now, if A11y says otherwise we will do the proper steps to remove it\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n }\n\n /* *************************************************************************************\n toolbar -> type === 'ds-app-picker'\n ************************************************************************************** */\n export type AppPickerComponentProps = React.ComponentProps<typeof DSAppPicker> & {\n triggerOnClick?: React.MouseEventHandler<HTMLButtonElement>;\n };\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface AppPickerProps extends Omit<GlobalAttributesT, 'label'> {\n label: string;\n componentProps: AppPickerComponentProps;\n }\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface ToolbarAppPickerItem extends Omit<GlobalAttributesT, 'type' | 'label'> {\n type: 'ds-app-picker';\n label: string;\n componentProps: AppPickerComponentProps;\n }\n\n /* *************************************************************************************\n toolbar -> type === undefined (fallback default)\n ************************************************************************************** */\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface ToolbarItemTypelessDefault extends Omit<GlobalAttributesT, 'label'> {\n type?: undefined;\n label: string;\n Icon: React.ComponentType<{ fill?: string; size?: string }>;\n }\n\n export type ToolbarItem =\n | ToolbarCustomItem\n | ToolbarSearchToggleItem\n | ToolbarAppPickerItem\n | PopupMenuItem // this is the only type that was pre-existing and that's why it doesn't include Toolbar at the start\n | ToolbarItemTypelessDefault;\n\n export type SlotFunctionArguments = {\n dsGlobalheaderRoot: () => Record<string, never>;\n dsGlobalheaderLogoContainer: () => Record<string, never>;\n dsGlobalheaderBreadcrumbContainer: () => Record<string, never>;\n dsGlobalheaderBreadcrumbPipe: () => Record<string, never>;\n dsGlobalheaderBreadcrumbChevron: () => Record<string, never>;\n dsGlobalheaderBreadcrumbList: () => Record<string, never>;\n dsGlobalheaderBreadcrumbItem: () => Record<string, never>;\n dsGlobalheaderBreadcrumbItemLink: () => Record<string, never>;\n dsGlobalheaderBreadcrumbItemLinkLabel: () => Record<string, never>;\n dsGlobalheaderMenubarContainer: () => Record<string, never>;\n dsGlobalheaderMenubarList: () => Record<string, never>;\n dsGlobalheaderMenubarItem: () => Record<string, never>;\n dsGlobalheaderMenubarItemButton: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuList: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuItem: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuItemButton: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuSeparator: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuItemLabel: () => Record<string, never>;\n dsGlobalheaderMenubarItemSearchtoggleContainer: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonWrapper: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonText: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonSeparator: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonPrev: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonNext: () => Record<string, never>;\n dsGlobalheaderSearchtoggleTextinput: () => Record<string, never>;\n dsGlobalheaderSearchtoggleTriggerButton: () => Record<string, never>;\n dsGlobalheaderSearchtoggleExpandedContentWrapper: () => Record<string, never>;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n Logo: React.ComponentType;\n LogoWithBrand: React.ComponentType;\n breadcrumb: DSGlobalHeaderT.BreadcrumbItem[];\n toolbar: DSGlobalHeaderT.ToolbarItem[];\n CustomNavigation: React.ComponentType;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSGlobalHeaderName, typeof GLOBAL_HEADER_SLOTS> {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const DSGlobalHeaderPropTypes: DSPropTypesSchema<DSGlobalHeaderT.Props> = {\n ...getPropsPerSlotPropTypes(DSGlobalHeaderName, GLOBAL_HEADER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n CustomNavigation: PropTypes.func\n .description(\n 'Component to use instead of the standard breadcrumb out of the box configuration for custom scenarios',\n )\n .defaultValue('() => JSX.Element'),\n Logo: PropTypes.func\n .description('Global Header Logo to render. Logo and LogoWithBrand are going to swap during window resizing.')\n .defaultValue('() => JSX.Element'),\n LogoWithBrand: PropTypes.func\n .description(\n 'Global Header Logo With Brand title to render. Logo and LogoWithBrand are going to swap during window resizing.',\n )\n .defaultValue('() => JSX.Element'),\n breadcrumb: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string.description('breadrcrumb item label'),\n hasNext: PropTypes.bool.description('whether the item has a child or not'),\n isSelected: PropTypes.bool.description('whether the item is selected or not'),\n onClick: PropTypes.func.description('Callback executed on click'),\n }),\n )\n .description('Breadcrumb items to display. Max 3 levels. Compatible with GlobalAttributes.')\n .defaultValue('[]'),\n toolbar: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string.description('title tag description'),\n type: PropTypes.oneOf(['ds-app-picker', 'ds-popup-menu', 'ds-search-toggle', 'custom']).description(\n 'use to select one of the out-of-the-box types of items',\n ),\n componentProps: PropTypes.object.description('props of out-of-the-box component'),\n Icon: PropTypes.func.description('Icon to display'),\n onClick: PropTypes.func.description('Callback executed on click'),\n }),\n )\n .description('Toolbar items. Compatible with GlobalAttributes.')\n .defaultValue('[]'),\n};\n// kept for legacy reasons, this is now named differently, but we want no breaking changes.\nexport const propTypes = DSGlobalHeaderPropTypes;\n\nexport const DSGlobalHeaderPropTypesSchema = DSGlobalHeaderPropTypes as unknown as ValidationMap<DSGlobalHeaderT.Props>;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,oBAAoB,2BAA2B;AAExD,MAAM,OAAO,MAAM;AAEZ,MAAM,eAAe;AAAA,EAC1B,YAAY,CAAC;AAAA,EACb,SAAS,CAAC;AAAA,EACV,eAAe;AAAA,EACf,MAAM;AACR;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type { DSAppPicker } from '@elliemae/ds-app-picker';\nimport type { DSPropTypesSchema, GlobalAttributesT, ValidationMap, XstyledProps } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n globalAttributesPropTypes,\n getPropsPerSlotPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type React from 'react';\nimport { DSGlobalHeaderName, GLOBAL_HEADER_SLOTS } from './constants/index.js';\n\nconst noop = () => null;\n\nexport const defaultProps = {\n breadcrumb: [],\n toolbar: [],\n LogoWithBrand: noop,\n Logo: noop,\n};\n\nexport declare namespace DSGlobalHeaderT {\n export interface Context {\n showIconOnly: boolean;\n fontDetector: number;\n setShowIconOnly: React.Dispatch<React.SetStateAction<boolean>>;\n instanceUID: string;\n globalHeaderToolbarGrid: string[];\n props: InternalProps;\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n }\n /* *************************************************************************************\n \"Breadcrumb widget\" configuration types\n ****************************************************************************************\n The breadcrumb items ARE SPREADING GLOBAL PROPS!!!\n + The breadcrumb items have a logic that force the onClick to be invoked on spacebar/enter too\n forcing it even if not the standard browser behaviour as per our buttons too\n ************************************************************************************** */\n export interface BreadcrumbItemOptionals {\n hasNext?: boolean;\n isSelected?: boolean;\n onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;\n }\n export interface BreadcrumbItemRequired {\n label: string;\n }\n export interface BreadcrumbItemOptionalsGlobals extends Omit<\n GlobalAttributesT,\n keyof BreadcrumbItemOptionals | keyof BreadcrumbItemRequired\n > {}\n\n export interface BreadcrumbItem\n extends BreadcrumbItemRequired, BreadcrumbItemOptionals, BreadcrumbItemOptionalsGlobals {}\n /* *************************************************************************************\n \"Toolbar widget\" configuration types\n ****************************************************************************************\n The toolbar item can be mainly of 4 different types\n - app-picker \n more or less map to ds-app-picker interface\n - popup-menu\n should more less map to dropdownmenu-v2 but should be changed to menu-button when possible\n - search-toggle\n a custom ad hoc implementation that expands in place and expose an input text,\n kinda problematic and force-added due to unrestrained \"yes man\" attitude with PM/PO\n we will be suggesting against using it officially in the later releases and try to find a better solution.\n - custom\n a way to allow app to provide their own render props along other pre-configured widgets out of the box\n ************************************************************************************** */\n\n /* *************************************************************************************\n toolbar -> type === 'custom'\n ************************************************************************************** */\n export interface ToolbarCustomComponentProps {\n item: Record<string, unknown> & {\n type: 'custom';\n CustomComponent: React.ComponentType<ToolbarCustomComponentProps>;\n };\n setRef: (ref: HTMLElement | null) => void;\n }\n export interface ToolbarCustomItem extends Record<string, unknown> {\n type: 'custom';\n label: string;\n CustomComponent: React.ComponentType<ToolbarCustomComponentProps>;\n }\n /* *************************************************************************************\n toolbar -> type === 'ds-search-toggle'\n ************************************************************************************** */\n // this props are actually required for the out-of-the-box to actually do what it needs to do\n // it's meant to be provided from the application, so this is kind of a weird way to do controlled components\n export interface ToggleSearchComponentProps {\n onNext: () => void;\n onPrevious: () => void;\n currentResultIndex: number;\n totalResults: number;\n placeholder: string;\n value: string;\n onChange: (value: string) => void;\n onBlur?: () => void;\n onClear: () => void;\n isOpen: boolean;\n onKeyDown: (event: React.KeyboardEvent) => void;\n onClick: (event: React.MouseEvent) => void;\n triggerRef: React.MutableRefObject<HTMLButtonElement>;\n searchContainerRef: React.MutableRefObject<HTMLDivElement>;\n }\n // WE ARE SPREADING GLOBAL PROPS!!!\n export interface SearchToggleProps extends GlobalAttributesT {\n setRef: (ref: HTMLButtonElement | null) => void;\n label: string;\n componentProps: ToggleSearchComponentProps;\n // https://jira.elliemae.io/browse/PUI-17852\n // - Generic aria-labels\n // -> allows users to specify a custom aria-label when the search toggle is expanded\n // -> it's an incremental change, so its \"optional\", we fall back to the previous hardcoded \"Close search\" if not provided\n // but authors are encouraged to improve the Aria-label with context-specific information when possible, to improve the overall accessibility of the component.\n ariaLabelExpanded?: string;\n // aria-controls needs to point to a DOM id, we need to make sure there are no conflicts in case of multiple search toggles on the same page\n instanceUID: Context['instanceUID'];\n }\n export interface ToolbarSearchToggleItem {\n type: 'ds-search-toggle';\n label: string;\n componentProps: ToggleSearchComponentProps;\n }\n /* *************************************************************************************\n toolbar -> type === 'ds-popup-menu'\n ************************************************************************************** */\n\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface PopupMenuContentItem extends Omit<GlobalAttributesT, 'type' | 'label' | 'onClick'> {\n type?: 'separator' | 'custom';\n Icon?: React.ComponentType<{ fill?: string; size?: string }>;\n label?: string;\n onClick?: (event: React.MouseEvent) => void;\n closeOnClick?: boolean;\n Content?: React.ComponentType;\n }\n export interface PopupMenuComponentProps {\n onClickOutside?: (e: MouseEvent | TouchEvent) => void;\n onKeyPress: (event: React.KeyboardEvent) => void;\n popupOnKeyPress: (event: React.KeyboardEvent) => void;\n isOpen: boolean;\n options: PopupMenuContentItem[];\n closeOnClick: boolean;\n }\n // this is the only type that was pre-existing (even if differently defined)\n // and that's why it doesn't include Toolbar at the start\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface PopupMenuItem extends Omit<GlobalAttributesT, 'type' | 'label' | 'onClick'> {\n type: 'ds-popup-menu';\n Icon?: React.ComponentType<{ fill?: string; size?: string }>;\n label?: string;\n onClick?: (event: React.MouseEvent) => void;\n Content?: React.ComponentType;\n componentProps: PopupMenuComponentProps;\n }\n\n export interface PopupMenuContentProps {\n options: PopupMenuContentItem[];\n onItemClick: () => void;\n onClose: () => void;\n popupOnKeyPress: (event: React.KeyboardEvent) => void;\n setIsOpen: () => void;\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n }\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface PopupProps extends Omit<GlobalAttributesT, 'title' | 'label' | 'onClick'> {\n Icon?: React.ComponentType<{ fill?: string; size?: string }>;\n onClick?: (event: React.MouseEvent) => void;\n setRef: (ref: HTMLElement) => void;\n componentProps: PopupMenuComponentProps;\n title?: string; // this was probably not intended, but removing this means the HTML will not print the title={label}\n // keeping this for now, if A11y says otherwise we will do the proper steps to remove it\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n }\n\n /* *************************************************************************************\n toolbar -> type === 'ds-app-picker'\n ************************************************************************************** */\n export type AppPickerComponentProps = React.ComponentProps<typeof DSAppPicker> & {\n triggerOnClick?: React.MouseEventHandler<HTMLButtonElement>;\n };\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface AppPickerProps extends Omit<GlobalAttributesT, 'label'> {\n label: string;\n componentProps: AppPickerComponentProps;\n }\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface ToolbarAppPickerItem extends Omit<GlobalAttributesT, 'type' | 'label'> {\n type: 'ds-app-picker';\n label: string;\n componentProps: AppPickerComponentProps;\n }\n\n /* *************************************************************************************\n toolbar -> type === undefined (fallback default)\n ************************************************************************************** */\n // WE ARE SPREADING GLOBAL PROPS!!!\n // WE ARE ALSO OVERRIDING SOME GLOBAL KEYS!\n export interface ToolbarItemTypelessDefault extends Omit<GlobalAttributesT, 'label'> {\n type?: undefined;\n label: string;\n Icon: React.ComponentType<{ fill?: string; size?: string }>;\n }\n\n export type ToolbarItem =\n | ToolbarCustomItem\n | ToolbarSearchToggleItem\n | ToolbarAppPickerItem\n | PopupMenuItem // this is the only type that was pre-existing and that's why it doesn't include Toolbar at the start\n | ToolbarItemTypelessDefault;\n\n export type SlotFunctionArguments = {\n dsGlobalheaderRoot: () => Record<string, never>;\n dsGlobalheaderLogoContainer: () => Record<string, never>;\n dsGlobalheaderBreadcrumbContainer: () => Record<string, never>;\n dsGlobalheaderBreadcrumbPipe: () => Record<string, never>;\n dsGlobalheaderBreadcrumbChevron: () => Record<string, never>;\n dsGlobalheaderBreadcrumbList: () => Record<string, never>;\n dsGlobalheaderBreadcrumbItem: () => Record<string, never>;\n dsGlobalheaderBreadcrumbItemLink: () => Record<string, never>;\n dsGlobalheaderBreadcrumbItemLinkLabel: () => Record<string, never>;\n dsGlobalheaderMenubarContainer: () => Record<string, never>;\n dsGlobalheaderMenubarList: () => Record<string, never>;\n dsGlobalheaderMenubarItem: () => Record<string, never>;\n dsGlobalheaderMenubarItemButton: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuList: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuItem: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuItemButton: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuSeparator: () => Record<string, never>;\n dsGlobalheaderMenubarItemPopupmenuItemLabel: () => Record<string, never>;\n dsGlobalheaderMenubarItemSearchtoggleContainer: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonWrapper: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonText: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonSeparator: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonPrev: () => Record<string, never>;\n dsGlobalheaderSearchtoggleSpinbuttonNext: () => Record<string, never>;\n dsGlobalheaderSearchtoggleTextinput: () => Record<string, never>;\n dsGlobalheaderSearchtoggleTriggerButton: () => Record<string, never>;\n dsGlobalheaderSearchtoggleExpandedContentWrapper: () => Record<string, never>;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n Logo: React.ComponentType;\n LogoWithBrand: React.ComponentType;\n breadcrumb: DSGlobalHeaderT.BreadcrumbItem[];\n toolbar: DSGlobalHeaderT.ToolbarItem[];\n CustomNavigation: React.ComponentType;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSGlobalHeaderName,\n typeof GLOBAL_HEADER_SLOTS\n > {}\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const DSGlobalHeaderPropTypes: DSPropTypesSchema<DSGlobalHeaderT.Props> = {\n ...getPropsPerSlotPropTypes(DSGlobalHeaderName, GLOBAL_HEADER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n CustomNavigation: PropTypes.func\n .description(\n 'Component to use instead of the standard breadcrumb out of the box configuration for custom scenarios',\n )\n .defaultValue('() => JSX.Element'),\n Logo: PropTypes.func\n .description('Global Header Logo to render. Logo and LogoWithBrand are going to swap during window resizing.')\n .defaultValue('() => JSX.Element'),\n LogoWithBrand: PropTypes.func\n .description(\n 'Global Header Logo With Brand title to render. Logo and LogoWithBrand are going to swap during window resizing.',\n )\n .defaultValue('() => JSX.Element'),\n breadcrumb: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string.description('breadrcrumb item label'),\n hasNext: PropTypes.bool.description('whether the item has a child or not'),\n isSelected: PropTypes.bool.description('whether the item is selected or not'),\n onClick: PropTypes.func.description('Callback executed on click'),\n }),\n )\n .description('Breadcrumb items to display. Max 3 levels. Compatible with GlobalAttributes.')\n .defaultValue('[]'),\n toolbar: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string.description('title tag description'),\n type: PropTypes.oneOf(['ds-app-picker', 'ds-popup-menu', 'ds-search-toggle', 'custom']).description(\n 'use to select one of the out-of-the-box types of items',\n ),\n componentProps: PropTypes.object.description('props of out-of-the-box component'),\n Icon: PropTypes.func.description('Icon to display'),\n onClick: PropTypes.func.description('Callback executed on click'),\n }),\n )\n .description('Toolbar items. Compatible with GlobalAttributes.')\n .defaultValue('[]'),\n};\n// kept for legacy reasons, this is now named differently, but we want no breaking changes.\nexport const propTypes = DSGlobalHeaderPropTypes;\n\nexport const DSGlobalHeaderPropTypesSchema = DSGlobalHeaderPropTypes as unknown as ValidationMap<DSGlobalHeaderT.Props>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,oBAAoB,2BAA2B;AAExD,MAAM,OAAO,MAAM;AAEZ,MAAM,eAAe;AAAA,EAC1B,YAAY,CAAC;AAAA,EACb,SAAS,CAAC;AAAA,EACV,eAAe;AAAA,EACf,MAAM;AACR;AA6QO,MAAM,0BAAoE;AAAA,EAC/E,GAAG,yBAAyB,oBAAoB,mBAAmB;AAAA,EACnE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,kBAAkB,UAAU,KACzB;AAAA,IACC;AAAA,EACF,EACC,aAAa,mBAAmB;AAAA,EACnC,MAAM,UAAU,KACb,YAAY,gGAAgG,EAC5G,aAAa,mBAAmB;AAAA,EACnC,eAAe,UAAU,KACtB;AAAA,IACC;AAAA,EACF,EACC,aAAa,mBAAmB;AAAA,EACnC,YAAY,UAAU;AAAA,IACpB,UAAU,MAAM;AAAA,MACd,OAAO,UAAU,OAAO,YAAY,wBAAwB;AAAA,MAC5D,SAAS,UAAU,KAAK,YAAY,qCAAqC;AAAA,MACzE,YAAY,UAAU,KAAK,YAAY,qCAAqC;AAAA,MAC5E,SAAS,UAAU,KAAK,YAAY,4BAA4B;AAAA,IAClE,CAAC;AAAA,EACH,EACG,YAAY,8EAA8E,EAC1F,aAAa,IAAI;AAAA,EACpB,SAAS,UAAU;AAAA,IACjB,UAAU,MAAM;AAAA,MACd,OAAO,UAAU,OAAO,YAAY,uBAAuB;AAAA,MAC3D,MAAM,UAAU,MAAM,CAAC,iBAAiB,iBAAiB,oBAAoB,QAAQ,CAAC,EAAE;AAAA,QACtF;AAAA,MACF;AAAA,MACA,gBAAgB,UAAU,OAAO,YAAY,mCAAmC;AAAA,MAChF,MAAM,UAAU,KAAK,YAAY,iBAAiB;AAAA,MAClD,SAAS,UAAU,KAAK,YAAY,4BAA4B;AAAA,IAClE,CAAC;AAAA,EACH,EACG,YAAY,kDAAkD,EAC9D,aAAa,IAAI;AACtB;AAEO,MAAM,YAAY;AAElB,MAAM,gCAAgC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -109,7 +109,7 @@ export declare namespace DSGlobalHeaderT {
|
|
|
109
109
|
onItemClick: () => void;
|
|
110
110
|
onClose: () => void;
|
|
111
111
|
popupOnKeyPress: (event: React.KeyboardEvent) => void;
|
|
112
|
-
setIsOpen:
|
|
112
|
+
setIsOpen: () => void;
|
|
113
113
|
ownerProps: {
|
|
114
114
|
getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;
|
|
115
115
|
getOwnerPropsArguments: () => object;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-global-header",
|
|
3
|
-
"version": "3.70.0-next.
|
|
3
|
+
"version": "3.70.0-next.54",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Global Header",
|
|
6
6
|
"files": [
|
|
@@ -37,21 +37,21 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"uid": "^2.0.2",
|
|
40
|
-
"@elliemae/ds-app-picker": "3.70.0-next.
|
|
41
|
-
"@elliemae/ds-
|
|
42
|
-
"@elliemae/ds-
|
|
43
|
-
"@elliemae/ds-
|
|
44
|
-
"@elliemae/ds-
|
|
45
|
-
"@elliemae/ds-
|
|
46
|
-
"@elliemae/ds-
|
|
47
|
-
"@elliemae/ds-
|
|
48
|
-
"@elliemae/ds-system": "3.70.0-next.
|
|
40
|
+
"@elliemae/ds-app-picker": "3.70.0-next.54",
|
|
41
|
+
"@elliemae/ds-floating-context": "3.70.0-next.54",
|
|
42
|
+
"@elliemae/ds-form-input-text": "3.70.0-next.54",
|
|
43
|
+
"@elliemae/ds-hooks-fontsize-media": "3.70.0-next.54",
|
|
44
|
+
"@elliemae/ds-grid": "3.70.0-next.54",
|
|
45
|
+
"@elliemae/ds-icons": "3.70.0-next.54",
|
|
46
|
+
"@elliemae/ds-button-v2": "3.70.0-next.54",
|
|
47
|
+
"@elliemae/ds-props-helpers": "3.70.0-next.54",
|
|
48
|
+
"@elliemae/ds-system": "3.70.0-next.54"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"jest": "^30.0.0",
|
|
52
52
|
"styled-components": "~5.3.9",
|
|
53
|
-
"@elliemae/ds-monorepo-devops": "3.70.0-next.
|
|
54
|
-
"@elliemae/ds-test-utils": "3.70.0-next.
|
|
53
|
+
"@elliemae/ds-monorepo-devops": "3.70.0-next.54",
|
|
54
|
+
"@elliemae/ds-test-utils": "3.70.0-next.54"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"lodash-es": "^4.18.1",
|