@elliemae/ds-global-header 3.70.0-next.7 → 3.70.0-next.71
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/DSGlobalHeader.js +16 -2
- package/dist/cjs/DSGlobalHeader.js.map +2 -2
- package/dist/cjs/DSGlobalHeaderContext.js.map +2 -2
- package/dist/cjs/config/useGlobalHeader.js +13 -2
- package/dist/cjs/config/useGlobalHeader.js.map +2 -2
- package/dist/cjs/constants/index.js +11 -5
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/index.js +3 -6
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/package.json +1 -4
- package/dist/cjs/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js +33 -1
- package/dist/cjs/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js.map +2 -2
- package/dist/cjs/parts/Logo/GlobalHeaderLogo.js +16 -2
- package/dist/cjs/parts/Logo/GlobalHeaderLogo.js.map +2 -2
- package/dist/cjs/parts/Toolbar/GlobalHeaderToolbar.js +54 -16
- package/dist/cjs/parts/Toolbar/GlobalHeaderToolbar.js.map +2 -2
- package/dist/cjs/{utils/useCallbackAfterRender.js → parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTX.js} +7 -16
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTX.js.map +7 -0
- package/dist/cjs/{hooks/useOnClickOutside.js → parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTXRenderer.js} +13 -30
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTXRenderer.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/AppPickerRenderer.js +53 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/AppPickerRenderer.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/TriggerDefaultComponent.js +84 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/TriggerDefaultComponent.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/react-desc-prop-types.js +50 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/useAppPickerCTX.js +66 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/useAppPickerCTX.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js +118 -71
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js.map +3 -3
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.js +27 -11
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.js.map +2 -2
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/react-desc-prop-types.js +52 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.js +23 -15
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.js.map +2 -2
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/react-desc-prop-types.js +54 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/PopupMenu/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.js +28 -16
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.js.map +2 -2
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.js +61 -50
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.js.map +2 -2
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/react-desc-prop-types.js +58 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.js +33 -25
- package/dist/cjs/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.js.map +2 -2
- package/dist/cjs/parts/Toolbar/outOfTheBox/index.js +12 -4
- package/dist/cjs/parts/Toolbar/outOfTheBox/index.js.map +2 -2
- package/dist/cjs/parts/Toolbar/styles.js +6 -1
- package/dist/cjs/parts/Toolbar/styles.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/sharedTypes.js.map +1 -1
- package/dist/cjs/typescript-testing/typescript-global-header-toolbar-types.js +52 -0
- package/dist/cjs/typescript-testing/typescript-global-header-toolbar-types.js.map +2 -2
- package/dist/esm/DSGlobalHeader.js +16 -2
- package/dist/esm/DSGlobalHeader.js.map +2 -2
- package/dist/esm/DSGlobalHeaderContext.js.map +2 -2
- package/dist/esm/config/useGlobalHeader.js +13 -2
- package/dist/esm/config/useGlobalHeader.js.map +2 -2
- package/dist/esm/constants/index.js +11 -5
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/index.js +3 -6
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/package.json +1 -4
- package/dist/esm/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js +34 -2
- package/dist/esm/parts/Breadcrumb/useGlobalHeaderBreadcrumb.js.map +2 -2
- package/dist/esm/parts/Logo/GlobalHeaderLogo.js +16 -2
- package/dist/esm/parts/Logo/GlobalHeaderLogo.js.map +2 -2
- package/dist/esm/parts/Toolbar/GlobalHeaderToolbar.js +55 -17
- package/dist/esm/parts/Toolbar/GlobalHeaderToolbar.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTX.js +8 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTX.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTXRenderer.js +13 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTXRenderer.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPickerRenderer.js +23 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPickerRenderer.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/TriggerDefaultComponent.js +54 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/TriggerDefaultComponent.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/react-desc-prop-types.js +20 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/useAppPickerCTX.js +36 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/useAppPickerCTX.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js +119 -72
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.js +28 -12
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/react-desc-prop-types.js +22 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.js +24 -16
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/react-desc-prop-types.js +24 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/PopupMenu/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.js +34 -17
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.js +61 -50
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/react-desc-prop-types.js +28 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.js +33 -25
- package/dist/esm/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.js.map +2 -2
- package/dist/esm/parts/Toolbar/outOfTheBox/index.js +8 -3
- package/dist/esm/parts/Toolbar/outOfTheBox/index.js.map +2 -2
- package/dist/esm/parts/Toolbar/styles.js +6 -1
- package/dist/esm/parts/Toolbar/styles.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/typescript-global-header-toolbar-types.js +52 -0
- package/dist/esm/typescript-testing/typescript-global-header-toolbar-types.js.map +2 -2
- package/dist/types/DSGlobalHeaderContext.d.ts +10 -2
- package/dist/types/config/useGlobalHeader.d.ts +3 -4
- package/dist/types/constants/index.d.ts +4 -3
- package/dist/types/index.d.ts +0 -2
- package/dist/types/parts/Breadcrumb/PureBreadcrumb.d.ts +1 -1
- package/dist/types/parts/Breadcrumb/styles.d.ts +1 -1
- package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTX.d.ts +4 -0
- package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTXRenderer.d.ts +2 -0
- package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/AppPickerRenderer.d.ts +1 -0
- package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/TriggerDefaultComponent.d.ts +2 -0
- package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/react-desc-prop-types.d.ts +23 -0
- package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/useAppPickerCTX.d.ts +456 -0
- package/dist/types/parts/Toolbar/outOfTheBox/PopupMenu/PopupMenu.d.ts +2 -2
- package/dist/types/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/PopupMenuContent.d.ts +2 -2
- package/dist/types/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/react-desc-prop-types.d.ts +28 -0
- package/dist/types/parts/Toolbar/outOfTheBox/PopupMenu/menuContent/usePopupMenuContent.d.ts +9 -1
- package/dist/types/parts/Toolbar/outOfTheBox/PopupMenu/react-desc-prop-types.d.ts +26 -0
- package/dist/types/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggle.d.ts +2 -2
- package/dist/types/parts/Toolbar/outOfTheBox/SearchToggle/SearchToggleSpinButton.d.ts +3 -1
- package/dist/types/parts/Toolbar/outOfTheBox/SearchToggle/react-desc-prop-types.d.ts +26 -0
- package/dist/types/parts/Toolbar/outOfTheBox/SearchToggle/useSearchToggle.d.ts +2 -3
- package/dist/types/parts/Toolbar/outOfTheBox/index.d.ts +3 -3
- package/dist/types/parts/Toolbar/styles.d.ts +1 -0
- package/dist/types/react-desc-prop-types.d.ts +63 -72
- package/dist/types/sharedTypes.d.ts +16 -6
- package/package.json +20 -17
- package/dist/cjs/hooks/useOnClickOutside.js.map +0 -7
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.js +0 -127
- package/dist/cjs/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.js.map +0 -7
- package/dist/cjs/utils/useCallbackAfterRender.js.map +0 -7
- package/dist/esm/hooks/useOnClickOutside.js +0 -30
- package/dist/esm/hooks/useOnClickOutside.js.map +0 -7
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.js +0 -97
- package/dist/esm/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.js.map +0 -7
- package/dist/esm/utils/useCallbackAfterRender.js +0 -17
- package/dist/esm/utils/useCallbackAfterRender.js.map +0 -7
- package/dist/types/hooks/useOnClickOutside.d.ts +0 -1
- package/dist/types/parts/Toolbar/outOfTheBox/AppPicker/AppPicker.d.ts +0 -6
- package/dist/types/tests/GlobalHeader.a11y.test.d.ts +0 -1
- package/dist/types/tests/GlobalHeader.callback.test.d.ts +0 -1
- package/dist/types/tests/GlobalHeader.getOwnerProps.test.d.ts +0 -1
- package/dist/types/tests/GlobalHeader.keyboard.test.d.ts +0 -1
- package/dist/types/tests/GlobalHeader.setup.test.d.ts +0 -113
- package/dist/types/typescript-testing/typescript-global-header-breadcrumb-types.d.ts +0 -3
- package/dist/types/typescript-testing/typescript-global-header-deprecated.d.ts +0 -1
- package/dist/types/typescript-testing/typescript-global-header-toolbar-types.d.ts +0 -3
- package/dist/types/typescript-testing/typescript-global-header-valid.d.ts +0 -1
- package/dist/types/utils/useCallbackAfterRender.d.ts +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useGlobalHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useFontsizeMedia } from '@elliemae/ds-hooks-fontsize-media';\nimport { useMemoMergePropsWithDefault, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { useMemo, useState } from 'react';\nimport { uid } from 'uid';\nimport { defaultProps, type DSGlobalHeaderT } from '../react-desc-prop-types.js';\nimport { FONT_DETECTOR } from '../constants/index.js';\n\nexport const useGlobalHeader = (props: DSGlobalHeaderT.Props) => {\n const [showIconOnly, setShowIconOnly] = useState<boolean>(false);\n\n const propsWithDefaults = useMemoMergePropsWithDefault<DSGlobalHeaderT.InternalProps>(props, defaultProps);\n\n const instanceUID = useMemo(() => `ds-global-header-${uid(5)}`, []);\n\n const globalHeaderToolbarGrid = useMemo(\n () => new Array(propsWithDefaults.toolbar.length).fill('auto') as string[],\n [propsWithDefaults.toolbar],\n );\n\n const ownerProps = useOwnerProps(props);\n\n const fontDetector = useFontsizeMedia({\n largeFont: FONT_DETECTOR.LARGE,\n mediumFont: FONT_DETECTOR.MEDIUM,\n smallFont: FONT_DETECTOR.SMALL,\n });\n\n return useMemo(\n () => ({\n props: propsWithDefaults,\n showIconOnly,\n setShowIconOnly,\n instanceUID,\n globalHeaderToolbarGrid,\n fontDetector,\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,wBAAwB;AACjC,SAAS,8BAA8B,qBAAqB;AAC5D,SAAS,SAAS,gBAAgB;AAClC,SAAS,WAAW;AACpB,SAAS,oBAA0C;AACnD,SAAS,qBAAqB;AAEvB,MAAM,kBAAkB,CAAC,UAAiC;AAC/D,QAAM,CAAC,cAAc,eAAe,IAAI,SAAkB,KAAK;AAE/D,QAAM,oBAAoB,6BAA4D,OAAO,YAAY;AAEzG,QAAM,cAAc,QAAQ,MAAM,oBAAoB,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAElE,QAAM,0BAA0B;AAAA,IAC9B,MAAM,IAAI,MAAM,kBAAkB,QAAQ,MAAM,EAAE,KAAK,MAAM;AAAA,IAC7D,CAAC,kBAAkB,OAAO;AAAA,EAC5B;AAEA,QAAM,aAAa,cAAc,KAAK;AAEtC,QAAM,eAAe,iBAAiB;AAAA,IACpC,WAAW,cAAc;AAAA,IACzB,YAAY,cAAc;AAAA,IAC1B,WAAW,cAAc;AAAA,EAC3B,CAAC;AAED,SAAO;AAAA,IACL,OAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useFontsizeMedia } from '@elliemae/ds-hooks-fontsize-media';\nimport { useMemoMergePropsWithDefault, useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { useMemo, useState } from 'react';\nimport { uid } from 'uid';\nimport { defaultProps, type DSGlobalHeaderT } from '../react-desc-prop-types.js';\nimport { FONT_DETECTOR } from '../constants/index.js';\n\nexport const useGlobalHeader = (props: DSGlobalHeaderT.Props) => {\n const [showIconOnly, setShowIconOnly] = useState<boolean>(false);\n\n const propsWithDefaults = useMemoMergePropsWithDefault<DSGlobalHeaderT.InternalProps>(props, defaultProps);\n\n const instanceUID = useMemo(() => `ds-global-header-${uid(5)}`, []);\n\n const globalHeaderToolbarGrid = useMemo(\n () => new Array(propsWithDefaults.toolbar.length).fill('auto') as string[],\n [propsWithDefaults.toolbar],\n );\n\n const ownerProps = useOwnerProps(props);\n\n const getOwnerPropsAwareOfPropsPassedToGlobalHeader = ownerProps.getOwnerProps;\n const noSlotArguments = ownerProps.getOwnerPropsArguments;\n\n const fontDetector = useFontsizeMedia({\n largeFont: FONT_DETECTOR.LARGE,\n mediumFont: FONT_DETECTOR.MEDIUM,\n smallFont: FONT_DETECTOR.SMALL,\n });\n\n return useMemo(\n () => ({\n props: propsWithDefaults,\n showIconOnly,\n setShowIconOnly,\n instanceUID,\n globalHeaderToolbarGrid,\n fontDetector,\n getOwnerPropsAwareOfPropsPassedToGlobalHeader,\n noSlotArguments,\n }),\n [\n propsWithDefaults,\n showIconOnly,\n instanceUID,\n globalHeaderToolbarGrid,\n fontDetector,\n getOwnerPropsAwareOfPropsPassedToGlobalHeader,\n noSlotArguments,\n ],\n );\n};\n\nexport type GlobalHeaderCTX = ReturnType<typeof useGlobalHeader>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,wBAAwB;AACjC,SAAS,8BAA8B,qBAAqB;AAC5D,SAAS,SAAS,gBAAgB;AAClC,SAAS,WAAW;AACpB,SAAS,oBAA0C;AACnD,SAAS,qBAAqB;AAEvB,MAAM,kBAAkB,CAAC,UAAiC;AAC/D,QAAM,CAAC,cAAc,eAAe,IAAI,SAAkB,KAAK;AAE/D,QAAM,oBAAoB,6BAA4D,OAAO,YAAY;AAEzG,QAAM,cAAc,QAAQ,MAAM,oBAAoB,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAElE,QAAM,0BAA0B;AAAA,IAC9B,MAAM,IAAI,MAAM,kBAAkB,QAAQ,MAAM,EAAE,KAAK,MAAM;AAAA,IAC7D,CAAC,kBAAkB,OAAO;AAAA,EAC5B;AAEA,QAAM,aAAa,cAAc,KAAK;AAEtC,QAAM,gDAAgD,WAAW;AACjE,QAAM,kBAAkB,WAAW;AAEnC,QAAM,eAAe,iBAAiB;AAAA,IACpC,WAAW,cAAc;AAAA,IACzB,YAAY,cAAc;AAAA,IAC1B,WAAW,cAAc;AAAA,EAC3B,CAAC;AAED,SAAO;AAAA,IACL,OAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -80,7 +80,6 @@ const DSGlobalHeaderDatatestid = {
|
|
|
80
80
|
SEPARATOR: "ds-global-header-menubar-item-popupmenu-separator"
|
|
81
81
|
},
|
|
82
82
|
SEARCH_TOGGLE: {
|
|
83
|
-
CONTAINER: "ds-global-header-menubar-item-searchtoggle-container",
|
|
84
83
|
ITEM_BUTTON: "gh-toolbar-item"
|
|
85
84
|
}
|
|
86
85
|
}
|
|
@@ -104,7 +103,6 @@ const DSGlobalHeaderDatatestidFlattened = {
|
|
|
104
103
|
MENUBAR_POPUP_MENU_ITEM_BUTTON: "ds-global-header-menubar-item-popupmenu-item-button",
|
|
105
104
|
MENUBAR_POPUP_MENU_ITEM_LABEL: "ds-global-header-menubar-item-popupmenu-item-label",
|
|
106
105
|
MENUBAR_POPUP_MENU_SEPARATOR: "ds-global-header-menubar-item-popupmenu-separator",
|
|
107
|
-
MENUBAR_SEARCH_TOGGLE_CONTAINER: "ds-global-header-menubar-item-searchtoggle-container",
|
|
108
106
|
MENUBAR_SEARCH_TOGGLE_ITEM_BUTTON: "gh-toolbar-item"
|
|
109
107
|
};
|
|
110
108
|
const FONT_DETECTOR = {
|
|
@@ -125,13 +123,20 @@ const GLOBAL_HEADER_SLOTS = {
|
|
|
125
123
|
SEARCH_TOGGLE_SPINBUTTON_NEXT: "searchtoggle-spinbutton-next",
|
|
126
124
|
SEARCH_TOGGLE_TEXTINPUT: "searchtoggle-textinput",
|
|
127
125
|
SEARCH_TOGGLE_TRIGGER_BUTTON: "searchtoggle-trigger-button",
|
|
128
|
-
SEARCH_TOGGLE_EXPANDED_CONTENT_WRAPPER: "searchtoggle-expanded-content-wrapper"
|
|
126
|
+
SEARCH_TOGGLE_EXPANDED_CONTENT_WRAPPER: "searchtoggle-expanded-content-wrapper",
|
|
127
|
+
// The popup menu item's own root — the element consumers target to reach the whole item, and the one
|
|
128
|
+
// that receives its xstyled props. Post-convention slot, so it carries no legacy data-testid override.
|
|
129
|
+
MENUBAR_ITEM_POPUPMENU_CONTAINER: "menubar-item-popupmenu-container"
|
|
129
130
|
};
|
|
131
|
+
const SEARCH_TOGGLE_DEFAULT_ARIA_LABEL = "Search. Press Tab twice to reach the result navigation.";
|
|
130
132
|
const GLOBAL_HEADER_DATA_TESTID = {
|
|
131
133
|
...slotObjectToDataTestIds(DSGlobalHeaderName, GLOBAL_HEADER_SLOTS),
|
|
132
134
|
// this are the "hardcoded" data-testid that maps to the slots in the component that we keep as they were for backwards compatibility
|
|
133
135
|
...DSGlobalHeaderDatatestidFlattened,
|
|
134
|
-
SEARCH_TOGGLE_TRIGGER_BUTTON: "gh-toolbar-item"
|
|
136
|
+
SEARCH_TOGGLE_TRIGGER_BUTTON: "gh-toolbar-item",
|
|
137
|
+
MENUBAR_SEARCH_TOGGLE_CONTAINER: "ds-global-header-menubar-item-searchtoggle-container"
|
|
138
|
+
// /\ PUI-19020 was ds-global-header-... changed to ds-globalheader ...
|
|
139
|
+
// unexpected and unwanted change in the data-testid existing testid detected by QA.
|
|
135
140
|
};
|
|
136
141
|
export {
|
|
137
142
|
DSGlobalHeaderDatatestid,
|
|
@@ -141,6 +146,7 @@ export {
|
|
|
141
146
|
DSGlobalHeaderSlotsFlattened,
|
|
142
147
|
FONT_DETECTOR,
|
|
143
148
|
GLOBAL_HEADER_DATA_TESTID,
|
|
144
|
-
GLOBAL_HEADER_SLOTS
|
|
149
|
+
GLOBAL_HEADER_SLOTS,
|
|
150
|
+
SEARCH_TOGGLE_DEFAULT_ARIA_LABEL
|
|
145
151
|
};
|
|
146
152
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSGlobalHeaderName = 'DSGlobalheader';\n\n/* ************************************************************************************************\n * LEGACY VARIABLES\n * ************************************************************************************************\n * WE KEEP THIS AROUND TO AVOID BREAKING CHANGES\n * THE NEW VARIABLES INHERIT FROM THIS TO AVOID BREAKING CHANGES!!!\n ************************************************************************************************ */\n\n/**\n * @deprecated - use GLOBAL_HEADER_SLOTS instead, it containse the full list and is flat.\n */\nexport const DSGlobalHeaderSlots = {\n CONTAINER: 'root',\n LOGO: {\n CONTAINER: 'logo-container',\n },\n BREADCRUMB: {\n CONTAINER: 'breadcrumb-container',\n PIPE: 'breadcrumb-pipe',\n CHEVRON: 'breadcrumb-chevron',\n LIST: 'breadcrumb-list',\n ITEM: 'breadcrumb-item',\n ITEM_LINK: 'breadcrumb-item-link',\n ITEM_LINK_LABEL: 'breadcrumb-item-link-label',\n },\n MENUBAR: {\n CONTAINER: 'menubar-container',\n LIST: 'menubar-list',\n ITEM: 'menubar-item',\n ITEM_BUTTON: 'menubar-item-button',\n POPUP_MENU: {\n LIST: 'menubar-item-popupmenu-list',\n ITEM: 'menubar-item-popupmenu-item',\n ITEM_BUTTON: 'menubar-item-popupmenu-item-button',\n SEPARATOR: 'menubar-item-popupmenu-separator',\n ITEM_BUTTON_LABEL: 'menubar-item-popupmenu-item-label',\n },\n SEARCH_TOGGLE: {\n CONTAINER: 'menubar-item-searchtoggle-container',\n },\n },\n};\n/**\n * @deprecated - use GLOBAL_HEADER_SLOTS instead, it containse the full list.\n */\nexport const DSGlobalHeaderSlotsFlattened = {\n CONTAINER: DSGlobalHeaderSlots.CONTAINER,\n LOGO_CONTAINER: DSGlobalHeaderSlots.LOGO.CONTAINER,\n BREADCRUMB_CONTAINER: DSGlobalHeaderSlots.BREADCRUMB.CONTAINER,\n BREADCRUMB_PIPE: DSGlobalHeaderSlots.BREADCRUMB.PIPE,\n BREADCRUMB_CHEVRON: DSGlobalHeaderSlots.BREADCRUMB.CHEVRON,\n BREADCRUMB_LIST: DSGlobalHeaderSlots.BREADCRUMB.LIST,\n BREADCRUMB_ITEM: DSGlobalHeaderSlots.BREADCRUMB.ITEM,\n BREADCRUMB_ITEM_LINK: DSGlobalHeaderSlots.BREADCRUMB.ITEM_LINK,\n BREADCRUMB_ITEM_LINK_LABEL: DSGlobalHeaderSlots.BREADCRUMB.ITEM_LINK_LABEL,\n MENUBAR_CONTAINER: DSGlobalHeaderSlots.MENUBAR.CONTAINER,\n MENUBAR_LIST: DSGlobalHeaderSlots.MENUBAR.LIST,\n MENUBAR_ITEM: DSGlobalHeaderSlots.MENUBAR.ITEM,\n MENUBAR_ITEM_BUTTON: DSGlobalHeaderSlots.MENUBAR.ITEM_BUTTON,\n MENUBAR_POPUP_MENU_LIST: DSGlobalHeaderSlots.MENUBAR.POPUP_MENU.LIST,\n MENUBAR_POPUP_MENU_ITEM: DSGlobalHeaderSlots.MENUBAR.POPUP_MENU.ITEM,\n MENUBAR_POPUP_MENU_ITEM_BUTTON: DSGlobalHeaderSlots.MENUBAR.POPUP_MENU.ITEM_BUTTON,\n MENUBAR_POPUP_MENU_SEPARATOR: DSGlobalHeaderSlots.MENUBAR.POPUP_MENU.SEPARATOR,\n MENUBAR_POPUP_MENU_ITEM_BUTTON_LABEL: DSGlobalHeaderSlots.MENUBAR.POPUP_MENU.ITEM_BUTTON_LABEL,\n MENUBAR_SEARCH_TOGGLE_CONTAINER: DSGlobalHeaderSlots.MENUBAR.SEARCH_TOGGLE.CONTAINER,\n};\n// maintain the same order as the original object\n// for slots showcase purpose\n/**\n * @deprecated - use GLOBAL_HEADER_DATA_TESTID instead, it containse the full list and is flat.\n */\nexport const DSGlobalHeaderDatatestid = {\n CONTAINER: 'ds-global-header',\n LOGO: {\n CONTAINER: 'ds-global-header-logo-container',\n },\n BREADCRUMB: {\n CHEVRON: 'ds-globalheader-breadcrumb-chevron',\n CONTAINER: 'ds-global-header-breadcrumb-container',\n PIPE: 'ds-global-header-breadcrumb-pipe',\n LIST: 'ds-global-header-breadcrumb-list',\n ITEM: 'ds-global-header-breadcrumb-item',\n ITEM_LINK: 'gh-breadcrumb-btn',\n ITEM_LINK_LABEL: 'ds-global-header-breadcrumb-item-link-label',\n },\n MENUBAR: {\n CONTAINER: 'ds-global-header-menubar-container',\n LIST: 'ds-global-header-menubar-list',\n ITEM: 'ds-global-header-menubar-item',\n ITEM_BUTTON: 'gh-toolbar-item',\n POPUP_MENU: {\n LIST: 'ds-global-header-menubar-item-popupmenu-list',\n ITEM: 'ds-global-header-menubar-item-popupmenu-item',\n ITEM_BUTTON: 'ds-global-header-menubar-item-popupmenu-item-button',\n ITEM_BUTTON_LABEL: 'ds-global-header-menubar-item-popupmenu-item-label',\n SEPARATOR: 'ds-global-header-menubar-item-popupmenu-separator',\n },\n SEARCH_TOGGLE: {\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,M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c;AAC7E;AAMO,MAAM,2BAA2B;AAAA,EACtC,WAAW;AAAA,EACX,MAAM;AAAA,IACJ,WAAW;AAAA,EACb;AAAA,EACA,YAAY;AAAA,IACV,SAAS;AAAA,IACT,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,WAAW;AAAA,IACX,iBAAiB;AAAA,EACnB;AAAA,EACA,SAAS;AAAA,IACP,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,aAAa;AAAA,IACb,YAAY;AAAA,MACV,MAAM;AAAA,MACN,MAAM;AAAA,MACN,aAAa;AAAA,MACb,mBAAmB;AAAA,MACnB,WAAW;AAAA,IACb;AAAA,IACA,eAAe;AAAA,MACb,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSGlobalHeaderName = 'DSGlobalheader';\n\n/* ************************************************************************************************\n * LEGACY VARIABLES\n * ************************************************************************************************\n * WE KEEP THIS AROUND TO AVOID BREAKING CHANGES\n * THE NEW VARIABLES INHERIT FROM THIS TO AVOID BREAKING CHANGES!!!\n ************************************************************************************************ */\n\n/**\n * @deprecated - use GLOBAL_HEADER_SLOTS instead, it containse the full list and is flat.\n */\nexport const DSGlobalHeaderSlots = {\n CONTAINER: 'root',\n LOGO: {\n CONTAINER: 'logo-container',\n },\n BREADCRUMB: {\n CONTAINER: 'breadcrumb-container',\n PIPE: 'breadcrumb-pipe',\n CHEVRON: 'breadcrumb-chevron',\n LIST: 'breadcrumb-list',\n ITEM: 'breadcrumb-item',\n ITEM_LINK: 'breadcrumb-item-link',\n ITEM_LINK_LABEL: 'breadcrumb-item-link-label',\n },\n MENUBAR: {\n CONTAINER: 'menubar-container',\n LIST: 'menubar-list',\n ITEM: 'menubar-item',\n ITEM_BUTTON: 'menubar-item-button',\n POPUP_MENU: {\n LIST: 'menubar-item-popupmenu-list',\n ITEM: 'menubar-item-popupmenu-item',\n ITEM_BUTTON: 'menubar-item-popupmenu-item-button',\n SEPARATOR: 'menubar-item-popupmenu-separator',\n ITEM_BUTTON_LABEL: 'menubar-item-popupmenu-item-label',\n },\n SEARCH_TOGGLE: {\n CONTAINER: 'menubar-item-searchtoggle-container',\n },\n },\n};\n/**\n * @deprecated - use GLOBAL_HEADER_SLOTS instead, it containse the full list.\n */\nexport const DSGlobalHeaderSlotsFlattened = {\n CONTAINER: DSGlobalHeaderSlots.CONTAINER,\n LOGO_CONTAINER: DSGlobalHeaderSlots.LOGO.CONTAINER,\n BREADCRUMB_CONTAINER: DSGlobalHeaderSlots.BREADCRUMB.CONTAINER,\n BREADCRUMB_PIPE: DSGlobalHeaderSlots.BREADCRUMB.PIPE,\n BREADCRUMB_CHEVRON: DSGlobalHeaderSlots.BREADCRUMB.CHEVRON,\n BREADCRUMB_LIST: DSGlobalHeaderSlots.BREADCRUMB.LIST,\n BREADCRUMB_ITEM: DSGlobalHeaderSlots.BREADCRUMB.ITEM,\n BREADCRUMB_ITEM_LINK: DSGlobalHeaderSlots.BREADCRUMB.ITEM_LINK,\n BREADCRUMB_ITEM_LINK_LABEL: DSGlobalHeaderSlots.BREADCRUMB.ITEM_LINK_LABEL,\n MENUBAR_CONTAINER: DSGlobalHeaderSlots.MENUBAR.CONTAINER,\n MENUBAR_LIST: DSGlobalHeaderSlots.MENUBAR.LIST,\n MENUBAR_ITEM: DSGlobalHeaderSlots.MENUBAR.ITEM,\n MENUBAR_ITEM_BUTTON: DSGlobalHeaderSlots.MENUBAR.ITEM_BUTTON,\n MENUBAR_POPUP_MENU_LIST: DSGlobalHeaderSlots.MENUBAR.POPUP_MENU.LIST,\n MENUBAR_POPUP_MENU_ITEM: DSGlobalHeaderSlots.MENUBAR.POPUP_MENU.ITEM,\n MENUBAR_POPUP_MENU_ITEM_BUTTON: DSGlobalHeaderSlots.MENUBAR.POPUP_MENU.ITEM_BUTTON,\n MENUBAR_POPUP_MENU_SEPARATOR: DSGlobalHeaderSlots.MENUBAR.POPUP_MENU.SEPARATOR,\n MENUBAR_POPUP_MENU_ITEM_BUTTON_LABEL: DSGlobalHeaderSlots.MENUBAR.POPUP_MENU.ITEM_BUTTON_LABEL,\n MENUBAR_SEARCH_TOGGLE_CONTAINER: DSGlobalHeaderSlots.MENUBAR.SEARCH_TOGGLE.CONTAINER,\n};\n// maintain the same order as the original object\n// for slots showcase purpose\n/**\n * @deprecated - use GLOBAL_HEADER_DATA_TESTID instead, it containse the full list and is flat.\n */\nexport const DSGlobalHeaderDatatestid = {\n CONTAINER: 'ds-global-header',\n LOGO: {\n CONTAINER: 'ds-global-header-logo-container',\n },\n BREADCRUMB: {\n CHEVRON: 'ds-globalheader-breadcrumb-chevron',\n CONTAINER: 'ds-global-header-breadcrumb-container',\n PIPE: 'ds-global-header-breadcrumb-pipe',\n LIST: 'ds-global-header-breadcrumb-list',\n ITEM: 'ds-global-header-breadcrumb-item',\n ITEM_LINK: 'gh-breadcrumb-btn',\n ITEM_LINK_LABEL: 'ds-global-header-breadcrumb-item-link-label',\n },\n MENUBAR: {\n CONTAINER: 'ds-global-header-menubar-container',\n LIST: 'ds-global-header-menubar-list',\n ITEM: 'ds-global-header-menubar-item',\n ITEM_BUTTON: 'gh-toolbar-item',\n POPUP_MENU: {\n LIST: 'ds-global-header-menubar-item-popupmenu-list',\n ITEM: 'ds-global-header-menubar-item-popupmenu-item',\n ITEM_BUTTON: 'ds-global-header-menubar-item-popupmenu-item-button',\n ITEM_BUTTON_LABEL: 'ds-global-header-menubar-item-popupmenu-item-label',\n SEPARATOR: 'ds-global-header-menubar-item-popupmenu-separator',\n },\n SEARCH_TOGGLE: {\n ITEM_BUTTON: 'gh-toolbar-item',\n },\n },\n};\n\n// maintain the same order as the original object\n// for slots showcase purpose\n/**\n * @deprecated - use GLOBAL_HEADER_DATA_TESTID instead, it containse the full list\n */\nexport const DSGlobalHeaderDatatestidFlattened = {\n CONTAINER: 'ds-global-header',\n LOGO_CONTAINER: 'ds-global-header-logo-container',\n BREADCRUMB_CONTAINER: 'ds-global-header-breadcrumb-container',\n BREADCRUMB_PIPE: 'ds-global-header-breadcrumb-pipe',\n BREADCRUMB_LIST: 'ds-global-header-breadcrumb-list',\n BREADCRUMB_ITEM: 'ds-global-header-breadcrumb-item',\n BREADCRUMB_ITEM_LINK: 'gh-breadcrumb-btn',\n BREADCRUMB_ITEM_LINK_LABEL: 'ds-global-header-breadcrumb-item-link-label',\n BREADCRUMB_CHEVRON: 'ds-globalheader-breadcrumb-chevron',\n MENUBAR_CONTAINER: 'ds-global-header-menubar-container',\n MENUBAR_LIST: 'ds-global-header-menubar-list',\n MENUBAR_ITEM: 'ds-global-header-menubar-item',\n MENUBAR_ITEM_BUTTON: 'gh-toolbar-item',\n MENUBAR_POPUP_MENU_LIST: 'ds-global-header-menubar-item-popupmenu-list',\n MENUBAR_POPUP_MENU_ITEM: 'ds-global-header-menubar-item-popupmenu-item',\n MENUBAR_POPUP_MENU_ITEM_BUTTON: 'ds-global-header-menubar-item-popupmenu-item-button',\n MENUBAR_POPUP_MENU_ITEM_LABEL: 'ds-global-header-menubar-item-popupmenu-item-label',\n MENUBAR_POPUP_MENU_SEPARATOR: 'ds-global-header-menubar-item-popupmenu-separator',\n MENUBAR_SEARCH_TOGGLE_ITEM_BUTTON: 'gh-toolbar-item',\n};\n\n/* ************************************************************************************************\n * From here on our it's the \"new\" convention, but adapted to inherit from the legacy variables\n ************************************************************************************************ */\nexport const FONT_DETECTOR = {\n SMALL: 1,\n MEDIUM: 2,\n LARGE: 3,\n} as const;\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const GLOBAL_HEADER_SLOTS = {\n ...DSGlobalHeaderSlotsFlattened,\n // the following slots are completely new, added to the component post BREAKING CHANGES\n // https://confluence.ice.com/x/6SqFPQ\n // [Breaking Changes] Global Header - Search Toggle\n // hence, given they are new, we are not adding them to the legacy variables, we are not going to overwrite the auto-generation pattern.\n SEARCH_TOGGLE_SPINBUTTON_WRAPPER: 'searchtoggle-spinbutton-wrapper',\n SEARCH_TOGGLE_SPINBUTTON_TEXT: 'searchtoggle-spinbutton-text',\n SEARCH_TOGGLE_SPINBUTTON_SEPARATOR: 'searchtoggle-spinbutton-separator',\n SEARCH_TOGGLE_SPINBUTTON_PREV: 'searchtoggle-spinbutton-prev',\n SEARCH_TOGGLE_SPINBUTTON_NEXT: 'searchtoggle-spinbutton-next',\n SEARCH_TOGGLE_TEXTINPUT: 'searchtoggle-textinput',\n SEARCH_TOGGLE_TRIGGER_BUTTON: 'searchtoggle-trigger-button',\n SEARCH_TOGGLE_EXPANDED_CONTENT_WRAPPER: 'searchtoggle-expanded-content-wrapper',\n // The popup menu item's own root \u2014 the element consumers target to reach the whole item, and the one\n // that receives its xstyled props. Post-convention slot, so it carries no legacy data-testid override.\n MENUBAR_ITEM_POPUPMENU_CONTAINER: 'menubar-item-popupmenu-container',\n} as const;\n\n// PUI-17973 \u2014 default accessible name for the search input, applied when the consumer does not\n// supply their own aria-label (a consumer aria-label overrides it). Guides screen-reader users to\n// the result navigation (the spinbutton), which announces the result count/position natively.\nexport const SEARCH_TOGGLE_DEFAULT_ARIA_LABEL = 'Search. Press Tab twice to reach the result navigation.';\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const GLOBAL_HEADER_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSGlobalHeaderName, GLOBAL_HEADER_SLOTS),\n // this are the \"hardcoded\" data-testid that maps to the slots in the component that we keep as they were for backwards compatibility\n ...DSGlobalHeaderDatatestidFlattened,\n SEARCH_TOGGLE_TRIGGER_BUTTON: 'gh-toolbar-item',\n MENUBAR_SEARCH_TOGGLE_CONTAINER: 'ds-global-header-menubar-item-searchtoggle-container',\n // /\\ PUI-19020 was ds-global-header-... changed to ds-globalheader ...\n // unexpected and unwanted change in the data-testid existing testid detected by QA.\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;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AAA,EAC9B,wCAAwC;AAAA;AAAA;AAAA,EAGxC,kCAAkC;AACpC;AAKO,MAAM,mCAAmC;AAEzC,MAAM,4BAA4B;AAAA,EACvC,GAAG,wBAAwB,oBAAoB,mBAAmB;AAAA;AAAA,EAElE,GAAG;AAAA,EACH,8BAA8B;AAAA,EAC9B,iCAAiC;AAAA;AAAA;AAGnC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { DSGlobalHeader } from "./DSGlobalHeader.js";
|
|
3
|
-
var index_default = DSGlobalHeader;
|
|
4
|
-
import { DSGlobalHeader as DSGlobalHeader2, DSGlobalHeaderWithSchema, GlobalHeader } from "./DSGlobalHeader.js";
|
|
2
|
+
import { DSGlobalHeader, DSGlobalHeaderWithSchema, GlobalHeader } from "./DSGlobalHeader.js";
|
|
5
3
|
import {
|
|
6
4
|
DSGlobalHeaderDatatestid,
|
|
7
5
|
DSGlobalHeaderDatatestidFlattened,
|
|
@@ -12,7 +10,7 @@ import {
|
|
|
12
10
|
GLOBAL_HEADER_DATA_TESTID
|
|
13
11
|
} from "./constants/index.js";
|
|
14
12
|
export {
|
|
15
|
-
|
|
13
|
+
DSGlobalHeader,
|
|
16
14
|
DSGlobalHeaderDatatestid,
|
|
17
15
|
DSGlobalHeaderDatatestidFlattened,
|
|
18
16
|
DSGlobalHeaderName,
|
|
@@ -21,7 +19,6 @@ export {
|
|
|
21
19
|
DSGlobalHeaderWithSchema,
|
|
22
20
|
GLOBAL_HEADER_DATA_TESTID,
|
|
23
21
|
GLOBAL_HEADER_SLOTS,
|
|
24
|
-
GlobalHeader
|
|
25
|
-
index_default as default
|
|
22
|
+
GlobalHeader
|
|
26
23
|
};
|
|
27
24
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSGlobalHeader, DSGlobalHeaderWithSchema, GlobalHeader } from './DSGlobalHeader.js';\nexport {\n // LEGACY VARIABLES\n DSGlobalHeaderDatatestid,\n DSGlobalHeaderDatatestidFlattened,\n DSGlobalHeaderSlots,\n DSGlobalHeaderSlotsFlattened,\n // NEW PATTERNS INHERITING FROM THE LEGACY VARIABLES:\n DSGlobalHeaderName,\n GLOBAL_HEADER_SLOTS,\n GLOBAL_HEADER_DATA_TESTID,\n} from './constants/index.js';\nexport type { DSGlobalHeaderT } from './react-desc-prop-types.js';\nexport type { DSGlobalHeaderInternalsT } from './sharedTypes.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,gBAAgB,0BAA0B,oBAAoB;AACvE;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/esm/package.json
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { useCallback, useContext, useEffect, useRef } from "react";
|
|
2
|
+
import { useMemo, useCallback, useContext, useEffect, useRef } from "react";
|
|
3
3
|
import { FONT_DETECTOR } from "../../constants/index.js";
|
|
4
4
|
import { DSGlobalHeaderContext } from "../../DSGlobalHeaderContext.js";
|
|
5
5
|
const useGlobalHeaderBreadcrumb = () => {
|
|
6
6
|
const {
|
|
7
7
|
props: { breadcrumb, CustomNavigation },
|
|
8
|
-
|
|
8
|
+
/*
|
|
9
|
+
* The slot layer, split into its two genuinely separate halves.
|
|
10
|
+
*
|
|
11
|
+
* `getOwnerProps` is the lookup table getPartProps indexes by data-dimsum-slot to find a consumer's
|
|
12
|
+
* slot prop, so it can only come from DSGlobalHeader — that is what the verbose drilled name says out
|
|
13
|
+
* loud when it reaches the out-of-the-box parts.
|
|
14
|
+
*
|
|
15
|
+
* `getOwnerPropsArguments` is the hydrator for function-form slot props and is used for nothing else,
|
|
16
|
+
* so it belongs to whichever element renders the slot. Explicit and empty here: none of the toolbar's
|
|
17
|
+
* own elements have render-time values worth passing. Stated rather than omitted, so "what arguments
|
|
18
|
+
* does this slot get?" always has a visible answer.
|
|
19
|
+
*/
|
|
20
|
+
getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
21
|
+
noSlotArguments,
|
|
9
22
|
instanceUID,
|
|
10
23
|
showIconOnly,
|
|
11
24
|
setShowIconOnly,
|
|
@@ -35,6 +48,25 @@ const useGlobalHeaderBreadcrumb = () => {
|
|
|
35
48
|
},
|
|
36
49
|
[]
|
|
37
50
|
);
|
|
51
|
+
const ownerProps = useMemo(
|
|
52
|
+
() => ({
|
|
53
|
+
/*
|
|
54
|
+
* The slot layer, split into its two genuinely separate halves.
|
|
55
|
+
*
|
|
56
|
+
* `getOwnerProps` is the lookup table getPartProps indexes by data-dimsum-slot to find a consumer's
|
|
57
|
+
* slot prop, so it can only come from DSGlobalHeader — that is what the verbose drilled name says out
|
|
58
|
+
* loud when it reaches the out-of-the-box parts.
|
|
59
|
+
*
|
|
60
|
+
* `getOwnerPropsArguments` is the hydrator for function-form slot props and is used for nothing else,
|
|
61
|
+
* so it belongs to whichever element renders the slot. Explicit and empty here: none of the toolbar's
|
|
62
|
+
* own elements have render-time values worth passing. Stated rather than omitted, so "what arguments
|
|
63
|
+
* does this slot get?" always has a visible answer.
|
|
64
|
+
*/
|
|
65
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
66
|
+
getOwnerPropsArguments: noSlotArguments
|
|
67
|
+
}),
|
|
68
|
+
[getOwnerPropsAwareOfPropsPassedToGlobalHeader, noSlotArguments]
|
|
69
|
+
);
|
|
38
70
|
return {
|
|
39
71
|
breadcrumb,
|
|
40
72
|
CustomNavigation,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Breadcrumb/useGlobalHeaderBreadcrumb.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\nimport { useCallback, useContext, useEffect, useRef } from 'react';\nimport { FONT_DETECTOR } from '../../constants/index.js';\nimport { DSGlobalHeaderContext } from '../../DSGlobalHeaderContext.js';\nimport type { DSGlobalHeaderT } from '../../react-desc-prop-types.js';\n\ninterface UseGlobalHeaderBreadcrumbReturnT {\n breadcrumb: DSGlobalHeaderT.BreadcrumbItem[];\n CustomNavigation: React.ComponentType;\n showIconOnly: boolean;\n flexRegionRef: React.MutableRefObject<HTMLDivElement | null>;\n handleOnKeyDown: (\n onClick: (event: React.MouseEvent | React.KeyboardEvent) => void,\n ) => (event: React.KeyboardEvent) => void;\n instanceUID: string;\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n}\n\nexport const useGlobalHeaderBreadcrumb = (): UseGlobalHeaderBreadcrumbReturnT => {\n const {\n props: { breadcrumb, CustomNavigation },\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,aAAa,YAAY,WAAW,cAAc;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\nimport { useMemo, useCallback, useContext, useEffect, useRef } from 'react';\nimport { FONT_DETECTOR } from '../../constants/index.js';\nimport { DSGlobalHeaderContext } from '../../DSGlobalHeaderContext.js';\nimport type { DSGlobalHeaderT } from '../../react-desc-prop-types.js';\n\ninterface UseGlobalHeaderBreadcrumbReturnT {\n breadcrumb: DSGlobalHeaderT.BreadcrumbItem[];\n CustomNavigation: React.ComponentType;\n showIconOnly: boolean;\n flexRegionRef: React.MutableRefObject<HTMLDivElement | null>;\n handleOnKeyDown: (\n onClick: (event: React.MouseEvent | React.KeyboardEvent) => void,\n ) => (event: React.KeyboardEvent) => void;\n instanceUID: string;\n ownerProps: {\n getOwnerProps: () => Partial<DSGlobalHeaderT.DefaultProps>;\n getOwnerPropsArguments: () => object;\n };\n}\n\nexport const useGlobalHeaderBreadcrumb = (): UseGlobalHeaderBreadcrumbReturnT => {\n const {\n props: { breadcrumb, CustomNavigation },\n /*\n * The slot layer, split into its two genuinely separate halves.\n *\n * `getOwnerProps` is the lookup table getPartProps indexes by data-dimsum-slot to find a consumer's\n * slot prop, so it can only come from DSGlobalHeader \u2014 that is what the verbose drilled name says out\n * loud when it reaches the out-of-the-box parts.\n *\n * `getOwnerPropsArguments` is the hydrator for function-form slot props and is used for nothing else,\n * so it belongs to whichever element renders the slot. Explicit and empty here: none of the toolbar's\n * own elements have render-time values worth passing. Stated rather than omitted, so \"what arguments\n * does this slot get?\" always has a visible answer.\n */\n getOwnerPropsAwareOfPropsPassedToGlobalHeader,\n noSlotArguments,\n instanceUID,\n showIconOnly,\n setShowIconOnly,\n fontDetector,\n } = useContext(DSGlobalHeaderContext);\n\n const breakpointRef = useRef<number | null>(null);\n const flexRegionRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const evaluateShowIconOnly = () => {\n if (\n (flexRegionRef.current && flexRegionRef.current.offsetWidth <= 0 && !breakpointRef.current) ||\n fontDetector === FONT_DETECTOR.LARGE ||\n fontDetector === FONT_DETECTOR.MEDIUM\n ) {\n setShowIconOnly(true);\n breakpointRef.current = window.innerWidth;\n } else if (breakpointRef.current && window.innerWidth >= breakpointRef.current) {\n setShowIconOnly(false);\n breakpointRef.current = null;\n }\n };\n\n evaluateShowIconOnly();\n\n window.addEventListener('resize', evaluateShowIconOnly);\n return () => window.removeEventListener('resize', evaluateShowIconOnly);\n }, [breakpointRef, flexRegionRef, setShowIconOnly, fontDetector]);\n\n const handleOnKeyDown = useCallback(\n (onClick: (event: React.MouseEvent | React.KeyboardEvent) => void) => (e: React.KeyboardEvent) => {\n if (e.key === ' ' || e.key === 'Enter') {\n onClick(e);\n }\n },\n [],\n );\n\n const ownerProps = useMemo(\n () => ({\n /*\n * The slot layer, split into its two genuinely separate halves.\n *\n * `getOwnerProps` is the lookup table getPartProps indexes by data-dimsum-slot to find a consumer's\n * slot prop, so it can only come from DSGlobalHeader \u2014 that is what the verbose drilled name says out\n * loud when it reaches the out-of-the-box parts.\n *\n * `getOwnerPropsArguments` is the hydrator for function-form slot props and is used for nothing else,\n * so it belongs to whichever element renders the slot. Explicit and empty here: none of the toolbar's\n * own elements have render-time values worth passing. Stated rather than omitted, so \"what arguments\n * does this slot get?\" always has a visible answer.\n */\n getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,\n getOwnerPropsArguments: noSlotArguments,\n }),\n [getOwnerPropsAwareOfPropsPassedToGlobalHeader, noSlotArguments],\n );\n\n return {\n breadcrumb,\n CustomNavigation,\n showIconOnly,\n flexRegionRef,\n handleOnKeyDown,\n instanceUID,\n ownerProps,\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,SAAS,aAAa,YAAY,WAAW,cAAc;AACpE,SAAS,qBAAqB;AAC9B,SAAS,6BAA6B;AAkB/B,MAAM,4BAA4B,MAAwC;AAC/E,QAAM;AAAA,IACJ,OAAO,EAAE,YAAY,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAatC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,qBAAqB;AAEpC,QAAM,gBAAgB,OAAsB,IAAI;AAChD,QAAM,gBAAgB,OAAuB,IAAI;AAEjD,YAAU,MAAM;AACd,UAAM,uBAAuB,MAAM;AACjC,UACG,cAAc,WAAW,cAAc,QAAQ,eAAe,KAAK,CAAC,cAAc,WACnF,iBAAiB,cAAc,SAC/B,iBAAiB,cAAc,QAC/B;AACA,wBAAgB,IAAI;AACpB,sBAAc,UAAU,OAAO;AAAA,MACjC,WAAW,cAAc,WAAW,OAAO,cAAc,cAAc,SAAS;AAC9E,wBAAgB,KAAK;AACrB,sBAAc,UAAU;AAAA,MAC1B;AAAA,IACF;AAEA,yBAAqB;AAErB,WAAO,iBAAiB,UAAU,oBAAoB;AACtD,WAAO,MAAM,OAAO,oBAAoB,UAAU,oBAAoB;AAAA,EACxE,GAAG,CAAC,eAAe,eAAe,iBAAiB,YAAY,CAAC;AAEhE,QAAM,kBAAkB;AAAA,IACtB,CAAC,YAAqE,CAAC,MAA2B;AAChG,UAAI,EAAE,QAAQ,OAAO,EAAE,QAAQ,SAAS;AACtC,gBAAQ,CAAC;AAAA,MACX;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AAEA,QAAM,aAAa;AAAA,IACjB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAaL,eAAe;AAAA,MACf,wBAAwB;AAAA,IAC1B;AAAA,IACA,CAAC,+CAA+C,eAAe;AAAA,EACjE;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -9,7 +9,20 @@ const GlobalHeaderLogo = () => {
|
|
|
9
9
|
const {
|
|
10
10
|
props: { Logo, LogoWithBrand },
|
|
11
11
|
showIconOnly,
|
|
12
|
-
|
|
12
|
+
/*
|
|
13
|
+
* The slot layer, split into its two genuinely separate halves.
|
|
14
|
+
*
|
|
15
|
+
* `getOwnerProps` is the lookup table getPartProps indexes by data-dimsum-slot to find a consumer's
|
|
16
|
+
* slot prop, so it can only come from DSGlobalHeader — that is what the verbose drilled name says out
|
|
17
|
+
* loud when it reaches the out-of-the-box parts.
|
|
18
|
+
*
|
|
19
|
+
* `getOwnerPropsArguments` is the hydrator for function-form slot props and is used for nothing else,
|
|
20
|
+
* so it belongs to whichever element renders the slot. Explicit and empty here: none of the toolbar's
|
|
21
|
+
* own elements have render-time values worth passing. Stated rather than omitted, so "what arguments
|
|
22
|
+
* does this slot get?" always has a visible answer.
|
|
23
|
+
*/
|
|
24
|
+
getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
25
|
+
noSlotArguments
|
|
13
26
|
} = useContext(DSGlobalHeaderContext);
|
|
14
27
|
const layoutMode = useGetLayoutMode();
|
|
15
28
|
const smalScreen = React2.useMemo(() => {
|
|
@@ -24,7 +37,8 @@ const GlobalHeaderLogo = () => {
|
|
|
24
37
|
alignItems: "center",
|
|
25
38
|
pr: smalScreen ? "0px" : "36px",
|
|
26
39
|
cols: smalScreen ? ["auto"] : ["auto", "1fr"],
|
|
27
|
-
|
|
40
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
41
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
28
42
|
children: [
|
|
29
43
|
Logo && smalScreen && /* @__PURE__ */ jsx(Logo, {}),
|
|
30
44
|
LogoWithBrand && !smalScreen && /* @__PURE__ */ jsx(LogoWithBrand, {})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Logo/GlobalHeaderLogo.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { useGetLayoutMode } from '@elliemae/ds-system';\nimport { DSGlobalHeaderContext } from '../../DSGlobalHeaderContext.js';\nimport { StyledLogoContainer } from './styles.js';\nimport { GLOBAL_HEADER_DATA_TESTID } from '../../constants/index.js';\n\nexport const GlobalHeaderLogo = (): JSX.Element => {\n const {\n props: { Logo, LogoWithBrand },\n showIconOnly,\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { useGetLayoutMode } from '@elliemae/ds-system';\nimport { DSGlobalHeaderContext } from '../../DSGlobalHeaderContext.js';\nimport { StyledLogoContainer } from './styles.js';\nimport { GLOBAL_HEADER_DATA_TESTID } from '../../constants/index.js';\n\nexport const GlobalHeaderLogo = (): JSX.Element => {\n const {\n props: { Logo, LogoWithBrand },\n showIconOnly,\n /*\n * The slot layer, split into its two genuinely separate halves.\n *\n * `getOwnerProps` is the lookup table getPartProps indexes by data-dimsum-slot to find a consumer's\n * slot prop, so it can only come from DSGlobalHeader \u2014 that is what the verbose drilled name says out\n * loud when it reaches the out-of-the-box parts.\n *\n * `getOwnerPropsArguments` is the hydrator for function-form slot props and is used for nothing else,\n * so it belongs to whichever element renders the slot. Explicit and empty here: none of the toolbar's\n * own elements have render-time values worth passing. Stated rather than omitted, so \"what arguments\n * does this slot get?\" always has a visible answer.\n */\n getOwnerPropsAwareOfPropsPassedToGlobalHeader,\n noSlotArguments,\n } = useContext(DSGlobalHeaderContext);\n const layoutMode = useGetLayoutMode();\n\n const smalScreen = React.useMemo(() => {\n if (!layoutMode) return showIconOnly;\n if (layoutMode === 'xs' || layoutMode === 's') return true;\n return false;\n }, [layoutMode, showIconOnly]);\n\n return (\n <StyledLogoContainer\n data-testid={GLOBAL_HEADER_DATA_TESTID.LOGO_CONTAINER}\n alignItems=\"center\"\n pr={smalScreen ? '0px' : '36px'}\n cols={smalScreen ? ['auto'] : ['auto', '1fr']}\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n {Logo && smalScreen && <Logo />}\n {LogoWithBrand && !smalScreen && <LogoWithBrand />}\n </StyledLogoContainer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACkCnB,SAQyB,KARzB;AAlCJ,OAAOA,UAAS,kBAAkB;AAClC,SAAS,wBAAwB;AACjC,SAAS,6BAA6B;AACtC,SAAS,2BAA2B;AACpC,SAAS,iCAAiC;AAEnC,MAAM,mBAAmB,MAAmB;AACjD,QAAM;AAAA,IACJ,OAAO,EAAE,MAAM,cAAc;AAAA,IAC7B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,qBAAqB;AACpC,QAAM,aAAa,iBAAiB;AAEpC,QAAM,aAAaA,OAAM,QAAQ,MAAM;AACrC,QAAI,CAAC,WAAY,QAAO;AACxB,QAAI,eAAe,QAAQ,eAAe,IAAK,QAAO;AACtD,WAAO;AAAA,EACT,GAAG,CAAC,YAAY,YAAY,CAAC;AAE7B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,0BAA0B;AAAA,MACvC,YAAW;AAAA,MACX,IAAI,aAAa,QAAQ;AAAA,MACzB,MAAM,aAAa,CAAC,MAAM,IAAI,CAAC,QAAQ,KAAK;AAAA,MAC5C,eAAe;AAAA,MACf,wBAAwB;AAAA,MAEvB;AAAA,gBAAQ,cAAc,oBAAC,QAAK;AAAA,QAC5B,iBAAiB,CAAC,cAAc,oBAAC,iBAAc;AAAA;AAAA;AAAA,EAClD;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -5,16 +5,29 @@ import { useContext } from "react";
|
|
|
5
5
|
import { FONT_DETECTOR, GLOBAL_HEADER_DATA_TESTID } from "../../constants/index.js";
|
|
6
6
|
import { DSGlobalHeaderContext } from "../../DSGlobalHeaderContext.js";
|
|
7
7
|
import { StyledButton } from "../styles.js";
|
|
8
|
-
import {
|
|
8
|
+
import { AppPickerCTXRenderer, PopupMenu, SearchToggle } from "./outOfTheBox/index.js";
|
|
9
9
|
import { StyledList, StyledMenubarContainer, StyledToolbarItem } from "./styles.js";
|
|
10
10
|
import { useGlobalHeaderToolbar } from "./useGlobalHeaderToolbar.js";
|
|
11
11
|
const GlobalHeaderToolbar = () => {
|
|
12
12
|
const {
|
|
13
13
|
props: { toolbar },
|
|
14
|
-
ownerProps,
|
|
15
14
|
instanceUID,
|
|
16
15
|
globalHeaderToolbarGrid,
|
|
17
|
-
fontDetector
|
|
16
|
+
fontDetector,
|
|
17
|
+
/*
|
|
18
|
+
* The slot layer, split into its two genuinely separate halves.
|
|
19
|
+
*
|
|
20
|
+
* `getOwnerProps` is the lookup table getPartProps indexes by data-dimsum-slot to find a consumer's
|
|
21
|
+
* slot prop, so it can only come from DSGlobalHeader — that is what the verbose drilled name says out
|
|
22
|
+
* loud when it reaches the out-of-the-box parts.
|
|
23
|
+
*
|
|
24
|
+
* `getOwnerPropsArguments` is the hydrator for function-form slot props and is used for nothing else,
|
|
25
|
+
* so it belongs to whichever element renders the slot. Explicit and empty here: none of the toolbar's
|
|
26
|
+
* own elements have render-time values worth passing. Stated rather than omitted, so "what arguments
|
|
27
|
+
* does this slot get?" always has a visible answer.
|
|
28
|
+
*/
|
|
29
|
+
getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
30
|
+
noSlotArguments
|
|
18
31
|
} = useContext(DSGlobalHeaderContext);
|
|
19
32
|
const { listRef, setRef, keyboardNavigation } = useGlobalHeaderToolbar();
|
|
20
33
|
return /* @__PURE__ */ jsx(
|
|
@@ -23,7 +36,8 @@ const GlobalHeaderToolbar = () => {
|
|
|
23
36
|
"data-testid": GLOBAL_HEADER_DATA_TESTID.MENUBAR_CONTAINER,
|
|
24
37
|
"aria-label": "menubar",
|
|
25
38
|
withSpan: fontDetector > FONT_DETECTOR.SMALL,
|
|
26
|
-
|
|
39
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
40
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
27
41
|
children: /* @__PURE__ */ jsx(
|
|
28
42
|
StyledList,
|
|
29
43
|
{
|
|
@@ -36,25 +50,27 @@ const GlobalHeaderToolbar = () => {
|
|
|
36
50
|
onKeyDown: keyboardNavigation,
|
|
37
51
|
innerRef: listRef,
|
|
38
52
|
"data-testid": GLOBAL_HEADER_DATA_TESTID.MENUBAR_LIST,
|
|
39
|
-
|
|
53
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
54
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
40
55
|
children: toolbar.map((item, index) => {
|
|
41
56
|
const { type } = item;
|
|
42
57
|
const setRefIndex = setRef(index);
|
|
43
58
|
if (type === "ds-popup-menu") {
|
|
44
|
-
const { label: label2, ...otherProps2 } = item;
|
|
59
|
+
const { label: label2, type: strippedDiscriminator, ...otherProps2 } = item;
|
|
45
60
|
return /* @__PURE__ */ jsx(
|
|
46
61
|
StyledToolbarItem,
|
|
47
62
|
{
|
|
48
63
|
role: "menuitem",
|
|
49
64
|
"data-testid": GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM,
|
|
50
|
-
|
|
65
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
66
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
51
67
|
children: /* @__PURE__ */ jsx(
|
|
52
68
|
PopupMenu,
|
|
53
69
|
{
|
|
54
70
|
title: label2,
|
|
55
71
|
setRef: setRefIndex,
|
|
56
72
|
...otherProps2,
|
|
57
|
-
|
|
73
|
+
getOwnerPropsAwareOfPropsPassedToGlobalHeader
|
|
58
74
|
}
|
|
59
75
|
)
|
|
60
76
|
},
|
|
@@ -62,27 +78,46 @@ const GlobalHeaderToolbar = () => {
|
|
|
62
78
|
);
|
|
63
79
|
}
|
|
64
80
|
if (type === "ds-app-picker") {
|
|
65
|
-
const { label: label2, ...otherProps2 } = item;
|
|
81
|
+
const { label: label2, type: strippedDiscriminator, ...otherProps2 } = item;
|
|
66
82
|
return /* @__PURE__ */ jsx(
|
|
67
83
|
StyledToolbarItem,
|
|
68
84
|
{
|
|
69
85
|
role: "menuitem",
|
|
70
86
|
"data-testid": GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM,
|
|
71
|
-
|
|
72
|
-
|
|
87
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
88
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
89
|
+
children: /* @__PURE__ */ jsx(
|
|
90
|
+
AppPickerCTXRenderer,
|
|
91
|
+
{
|
|
92
|
+
label: label2,
|
|
93
|
+
setRef: setRefIndex,
|
|
94
|
+
...otherProps2,
|
|
95
|
+
getOwnerPropsAwareOfPropsPassedToGlobalHeader
|
|
96
|
+
}
|
|
97
|
+
)
|
|
73
98
|
},
|
|
74
99
|
`${instanceUID}-ds-toolbar-item-${label2}`
|
|
75
100
|
);
|
|
76
101
|
}
|
|
77
102
|
if (type === "ds-search-toggle") {
|
|
78
|
-
const { label: label2, ...otherProps2 } = item;
|
|
103
|
+
const { label: label2, type: strippedDiscriminator, ...otherProps2 } = item;
|
|
79
104
|
return /* @__PURE__ */ jsx(
|
|
80
105
|
StyledToolbarItem,
|
|
81
106
|
{
|
|
82
107
|
role: "menuitem",
|
|
83
108
|
"data-testid": GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM,
|
|
84
|
-
|
|
85
|
-
|
|
109
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
110
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
111
|
+
children: /* @__PURE__ */ jsx(
|
|
112
|
+
SearchToggle,
|
|
113
|
+
{
|
|
114
|
+
instanceUID,
|
|
115
|
+
label: label2,
|
|
116
|
+
setRef: setRefIndex,
|
|
117
|
+
...otherProps2,
|
|
118
|
+
getOwnerPropsAwareOfPropsPassedToGlobalHeader
|
|
119
|
+
}
|
|
120
|
+
)
|
|
86
121
|
},
|
|
87
122
|
`${instanceUID}-ds-toolbar-item-${label2}`
|
|
88
123
|
);
|
|
@@ -95,7 +130,8 @@ const GlobalHeaderToolbar = () => {
|
|
|
95
130
|
{
|
|
96
131
|
role: "menuitem",
|
|
97
132
|
"data-testid": GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM,
|
|
98
|
-
|
|
133
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
134
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
99
135
|
children: CustomComponent && /* @__PURE__ */ jsx(CustomComponent, { item, setRef: setRefIndex })
|
|
100
136
|
},
|
|
101
137
|
`${instanceUID}-ds-toolbar-item-${label2}`
|
|
@@ -107,7 +143,8 @@ const GlobalHeaderToolbar = () => {
|
|
|
107
143
|
{
|
|
108
144
|
role: "menuitem",
|
|
109
145
|
"data-testid": GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM,
|
|
110
|
-
|
|
146
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
147
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
111
148
|
children: /* @__PURE__ */ jsx(
|
|
112
149
|
StyledButton,
|
|
113
150
|
{
|
|
@@ -116,7 +153,8 @@ const GlobalHeaderToolbar = () => {
|
|
|
116
153
|
innerRef: setRefIndex,
|
|
117
154
|
...getGlobalAttributes(otherProps),
|
|
118
155
|
type: "button",
|
|
119
|
-
|
|
156
|
+
getOwnerProps: getOwnerPropsAwareOfPropsPassedToGlobalHeader,
|
|
157
|
+
getOwnerPropsArguments: noSlotArguments,
|
|
120
158
|
children: Icon && /* @__PURE__ */ jsx(Icon, { size: "m" })
|
|
121
159
|
}
|
|
122
160
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/Toolbar/GlobalHeaderToolbar.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { getGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { useContext } from 'react';\nimport { FONT_DETECTOR, GLOBAL_HEADER_DATA_TESTID } from '../../constants/index.js';\nimport { DSGlobalHeaderContext } from '../../DSGlobalHeaderContext.js';\nimport { StyledButton } from '../styles.js';\nimport {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { getGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { useContext } from 'react';\nimport { FONT_DETECTOR, GLOBAL_HEADER_DATA_TESTID } from '../../constants/index.js';\nimport { DSGlobalHeaderContext } from '../../DSGlobalHeaderContext.js';\nimport { StyledButton } from '../styles.js';\nimport { AppPickerCTXRenderer, PopupMenu, SearchToggle } from './outOfTheBox/index.js';\nimport { StyledList, StyledMenubarContainer, StyledToolbarItem } from './styles.js';\nimport { useGlobalHeaderToolbar } from './useGlobalHeaderToolbar.js';\n\nexport const GlobalHeaderToolbar = (): JSX.Element => {\n const {\n props: { toolbar },\n instanceUID,\n globalHeaderToolbarGrid,\n fontDetector,\n /*\n * The slot layer, split into its two genuinely separate halves.\n *\n * `getOwnerProps` is the lookup table getPartProps indexes by data-dimsum-slot to find a consumer's\n * slot prop, so it can only come from DSGlobalHeader \u2014 that is what the verbose drilled name says out\n * loud when it reaches the out-of-the-box parts.\n *\n * `getOwnerPropsArguments` is the hydrator for function-form slot props and is used for nothing else,\n * so it belongs to whichever element renders the slot. Explicit and empty here: none of the toolbar's\n * own elements have render-time values worth passing. Stated rather than omitted, so \"what arguments\n * does this slot get?\" always has a visible answer.\n */\n getOwnerPropsAwareOfPropsPassedToGlobalHeader,\n noSlotArguments,\n } = useContext(DSGlobalHeaderContext);\n\n const { listRef, setRef, keyboardNavigation } = useGlobalHeaderToolbar();\n\n return (\n <StyledMenubarContainer\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_CONTAINER}\n aria-label=\"menubar\"\n withSpan={fontDetector > FONT_DETECTOR.SMALL}\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n <StyledList\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gutter=\"xxs\"\n cols={globalHeaderToolbarGrid}\n role=\"menubar\"\n onKeyDown={keyboardNavigation}\n innerRef={listRef}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_LIST}\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n {toolbar.map((item, index) => {\n const { type } = item;\n /*\n * Each branch below strips `type` rather than forwarding it. It is toolbar configuration, but it\n * is ALSO a member of GlobalAttributesT \u2014 so any part that spreads item-level global attributes\n * onto a non-button element renders `type=\"ds-search-toggle\"` into the DOM. The button-rooted\n * parts escape that only incidentally, by re-declaring `type=\"button\"` after their spread.\n * Stripping here is what stops the outcome depending on that accident.\n */\n // inside a toolbar items needs to be navigable via arrow keys.\n // this setRef(index) is generating an index of references that can be \"focused\" when user is navigating with arrows\n // NOTE:\n // focus management based on DOM nodes.focus() in react is problematic due to unpredictable timing of refs assignment and react rendering\n // we should be using the \"focus tracker\" approach where we keep track of \"what we want to focuse\",\n // then have the ref callback functions invoke the focus to the element AFTER the LAST element is rendered, not tracking the DOM nodes directly.\n // We aren't changing this right now, but let's keep this in mind.\n const setRefIndex = setRef(index);\n\n if (type === 'ds-popup-menu') {\n const { label, type: strippedDiscriminator, ...otherProps } = item;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM}\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n <PopupMenu\n title={label} // this is captured as the standard HTML \"title\" attribute and is printed in output HTML\n setRef={setRefIndex}\n {...otherProps}\n getOwnerPropsAwareOfPropsPassedToGlobalHeader={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n />\n </StyledToolbarItem>\n );\n }\n if (type === 'ds-app-picker') {\n const { label, type: strippedDiscriminator, ...otherProps } = item;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM}\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n <AppPickerCTXRenderer\n label={label}\n setRef={setRefIndex}\n {...otherProps}\n getOwnerPropsAwareOfPropsPassedToGlobalHeader={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n />\n </StyledToolbarItem>\n );\n }\n if (type === 'ds-search-toggle') {\n const { label, type: strippedDiscriminator, ...otherProps } = item;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM}\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n <SearchToggle\n instanceUID={instanceUID}\n label={label}\n setRef={setRefIndex}\n {...otherProps}\n getOwnerPropsAwareOfPropsPassedToGlobalHeader={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n />\n </StyledToolbarItem>\n );\n }\n if (type === 'custom') {\n const { label, CustomComponent } = item;\n if (!CustomComponent) return null;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM}\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n {CustomComponent && <CustomComponent item={item} setRef={setRefIndex} />}\n </StyledToolbarItem>\n );\n }\n\n const { label, Icon, ...otherProps } = item;\n return (\n <StyledToolbarItem\n role=\"menuitem\"\n key={`${instanceUID}-ds-toolbar-item-${label}`}\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM}\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n <StyledButton\n title={label} // this is captured as the standard HTML \"title\" attribute and is printed in output HTML\n data-testid={GLOBAL_HEADER_DATA_TESTID.MENUBAR_ITEM_BUTTON}\n innerRef={setRefIndex}\n {...getGlobalAttributes(otherProps)}\n type=\"button\"\n getOwnerProps={getOwnerPropsAwareOfPropsPassedToGlobalHeader}\n getOwnerPropsArguments={noSlotArguments}\n >\n {Icon && <Icon size=\"m\" />}\n </StyledButton>\n </StyledToolbarItem>\n );\n })}\n </StyledList>\n </StyledMenubarContainer>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACkFP;AAlFhB,SAAS,2BAA2B;AACpC,SAAS,kBAAkB;AAC3B,SAAS,eAAe,iCAAiC;AACzD,SAAS,6BAA6B;AACtC,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB,WAAW,oBAAoB;AAC9D,SAAS,YAAY,wBAAwB,yBAAyB;AACtE,SAAS,8BAA8B;AAEhC,MAAM,sBAAsB,MAAmB;AACpD,QAAM;AAAA,IACJ,OAAO,EAAE,QAAQ;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,qBAAqB;AAEpC,QAAM,EAAE,SAAS,QAAQ,mBAAmB,IAAI,uBAAuB;AAEvE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,0BAA0B;AAAA,MACvC,cAAW;AAAA,MACX,UAAU,eAAe,cAAc;AAAA,MACvC,eAAe;AAAA,MACf,wBAAwB;AAAA,MAExB;AAAA,QAAC;AAAA;AAAA,UACC,QAAO;AAAA,UAC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 -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../src/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTX.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createContext } from 'react';\nimport type { useAppPickerCTX } from './useAppPickerCTX.js';\n\nexport interface AppPickerCTX extends ReturnType<typeof useAppPickerCTX> {}\n\n// `{} as AppPickerCTX` rather than `null`, matching DSAppPickerContext and DSGlobalHeaderContext: the\n// provider always wraps the consumers, so a nullable context would only buy every reader a null check\n// that can never be true.\nconst defaultContext = {} as AppPickerCTX;\n\nexport const AppPickerCtx = createContext<AppPickerCTX>(defaultContext);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,qBAAqB;AAQ9B,MAAM,iBAAiB,CAAC;AAEjB,MAAM,eAAe,cAA4B,cAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { AppPickerRenderer } from "./AppPickerRenderer.js";
|
|
4
|
+
import { useAppPickerCTX } from "./useAppPickerCTX.js";
|
|
5
|
+
import { AppPickerCtx } from "./AppPickerCTX.js";
|
|
6
|
+
const AppPickerCTXRenderer = (appPickerProps) => {
|
|
7
|
+
const appPickerCTX = useAppPickerCTX(appPickerProps);
|
|
8
|
+
return /* @__PURE__ */ jsx(AppPickerCtx.Provider, { value: appPickerCTX, children: /* @__PURE__ */ jsx(AppPickerRenderer, {}) });
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
AppPickerCTXRenderer
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=AppPickerCTXRenderer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../../src/parts/Toolbar/outOfTheBox/AppPicker/AppPickerCTXRenderer.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { AppPickerRenderer } from './AppPickerRenderer.js';\nimport type { AppPickerT } from './react-desc-prop-types.js';\nimport { useAppPickerCTX } from './useAppPickerCTX.js';\nimport { AppPickerCtx } from './AppPickerCTX.js';\n\nexport const AppPickerCTXRenderer = (appPickerProps: AppPickerT.Props): JSX.Element => {\n const appPickerCTX = useAppPickerCTX(appPickerProps);\n\n return (\n <AppPickerCtx.Provider value={appPickerCTX}>\n <AppPickerRenderer />\n </AppPickerCtx.Provider>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACUjB;AAVN,SAAS,yBAAyB;AAElC,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAEtB,MAAM,uBAAuB,CAAC,mBAAkD;AACrF,QAAM,eAAe,gBAAgB,cAAc;AAEnD,SACE,oBAAC,aAAa,UAAb,EAAsB,OAAO,cAC5B,8BAAC,qBAAkB,GACrB;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { DSAppPicker } from "@elliemae/ds-app-picker";
|
|
4
|
+
import React2 from "react";
|
|
5
|
+
import { AppPickerCtx } from "./AppPickerCTX.js";
|
|
6
|
+
import { TriggerDefaultComponent } from "./TriggerDefaultComponent.js";
|
|
7
|
+
const AppPickerRenderer = () => {
|
|
8
|
+
const { contractProps, id } = React2.useContext(AppPickerCtx);
|
|
9
|
+
const consumerOwnsTheTrigger = Boolean(contractProps.renderTrigger || contractProps.TriggerComponent);
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
DSAppPicker,
|
|
12
|
+
{
|
|
13
|
+
openAndFocusOnArrowKeys: true,
|
|
14
|
+
...consumerOwnsTheTrigger ? {} : { TriggerComponent: TriggerDefaultComponent },
|
|
15
|
+
...id ? { id } : {},
|
|
16
|
+
...contractProps
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
AppPickerRenderer
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=AppPickerRenderer.js.map
|