@elliemae/ds-left-navigation 1.60.0 → 2.0.0-alpha.12
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/cjs/LeftNavigation.js +11 -56
- package/cjs/LeftNavigationContext.js +12 -29
- package/cjs/common/getItemBackgroundStyle.js +2 -5
- package/cjs/common/getLeftBorderStyle.js +2 -5
- package/cjs/common/getScrollbarStyle.js +1 -4
- package/cjs/common/index.js +6 -7
- package/cjs/configs/index.js +3 -16
- package/cjs/configs/useLeftNavConfig.js +55 -92
- package/cjs/configs/useLeftNavItems.js +32 -30
- package/cjs/configs/useLeftNavSmoothExpand.js +13 -16
- package/cjs/exported-related/ChevronItem/index.js +17 -12
- package/cjs/exported-related/Icon/index.js +22 -18
- package/cjs/exported-related/ItemRenderer/index.js +99 -98
- package/cjs/exported-related/ItemRenderer/styled.js +26 -33
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +14 -16
- package/cjs/exported-related/Notifications/index.js +19 -20
- package/cjs/exported-related/OpenWindowItem/index.js +19 -16
- package/cjs/exported-related/constants.js +5 -6
- package/cjs/exported-related/index.js +16 -27
- package/cjs/hooks/index.js +6 -10
- package/cjs/hooks/useExpandableOnClickHandler.js +16 -15
- package/cjs/hooks/useKeyboardNavigation.js +39 -43
- package/cjs/hooks/useOpenableOnClickHandler.js +18 -16
- package/cjs/hooks/useSelectFirstBodyItem.js +16 -22
- package/cjs/index.d.js +0 -1
- package/cjs/index.js +17 -66
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js +76 -64
- package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js +9 -14
- package/cjs/outOfTheBox/ItemHeader/index.js +61 -69
- package/cjs/outOfTheBox/ItemHeader/styled.js +4 -11
- package/cjs/outOfTheBox/ItemLink/index.js +43 -48
- package/cjs/outOfTheBox/ItemLink/styled.js +2 -7
- package/cjs/outOfTheBox/ItemSection/index.js +40 -30
- package/cjs/outOfTheBox/ItemSection/styled.js +5 -14
- package/cjs/outOfTheBox/ItemSeparator/index.js +22 -24
- package/cjs/outOfTheBox/ItemSubmenu/index.js +63 -75
- package/cjs/outOfTheBox/ItemSubmenu/styled.js +4 -11
- package/cjs/outOfTheBox/ItemTextLabel/index.js +36 -25
- package/cjs/outOfTheBox/ItemTextLabel/styled.js +7 -10
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +86 -79
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js +9 -14
- package/cjs/outOfTheBox/ItemWithDate/index.js +43 -32
- package/cjs/outOfTheBox/ItemWithDate/styled.js +9 -14
- package/cjs/outOfTheBox/index.js +50 -53
- package/cjs/parts/LeftNavContent/index.js +58 -90
- package/cjs/parts/LeftNavContent/styled.js +16 -27
- package/cjs/parts/LeftNavContentWithScrollbar/index.js +53 -48
- package/cjs/parts/LeftNavFooterItem/index.js +69 -83
- package/cjs/parts/LeftNavFooterItem/styled.js +14 -33
- package/cjs/parts/LeftNavLoading/index.js +9 -7
- package/cjs/parts/OutOfTheBoxMapItem.js +23 -42
- package/cjs/prop-types.js +10 -50
- package/esm/LeftNavigation.js +8 -53
- package/esm/LeftNavigationContext.js +11 -28
- package/esm/common/getItemBackgroundStyle.js +2 -5
- package/esm/common/getLeftBorderStyle.js +2 -5
- package/esm/common/getScrollbarStyle.js +1 -4
- package/esm/common/index.js +0 -1
- package/esm/configs/index.js +0 -13
- package/esm/configs/useLeftNavConfig.js +49 -85
- package/esm/configs/useLeftNavItems.js +27 -21
- package/esm/configs/useLeftNavSmoothExpand.js +12 -15
- package/esm/exported-related/ChevronItem/index.js +15 -9
- package/esm/exported-related/Icon/index.js +21 -16
- package/esm/exported-related/ItemRenderer/index.js +96 -95
- package/esm/exported-related/ItemRenderer/styled.js +25 -32
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +12 -14
- package/esm/exported-related/Notifications/index.js +17 -18
- package/esm/exported-related/OpenWindowItem/index.js +17 -13
- package/esm/exported-related/constants.js +5 -6
- package/esm/exported-related/index.js +0 -11
- package/esm/hooks/index.js +0 -4
- package/esm/hooks/useExpandableOnClickHandler.js +16 -15
- package/esm/hooks/useKeyboardNavigation.js +36 -40
- package/esm/hooks/useOpenableOnClickHandler.js +18 -16
- package/esm/hooks/useSelectFirstBodyItem.js +15 -21
- package/esm/index.d.js +0 -1
- package/esm/index.js +0 -49
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js +69 -57
- package/esm/outOfTheBox/ItemControlledDrilldown/styled.js +9 -14
- package/esm/outOfTheBox/ItemHeader/index.js +56 -64
- package/esm/outOfTheBox/ItemHeader/styled.js +4 -11
- package/esm/outOfTheBox/ItemLink/index.js +40 -45
- package/esm/outOfTheBox/ItemLink/styled.js +2 -7
- package/esm/outOfTheBox/ItemSection/index.js +36 -26
- package/esm/outOfTheBox/ItemSection/styled.js +5 -14
- package/esm/outOfTheBox/ItemSeparator/index.js +19 -21
- package/esm/outOfTheBox/ItemSubmenu/index.js +58 -70
- package/esm/outOfTheBox/ItemSubmenu/styled.js +4 -11
- package/esm/outOfTheBox/ItemTextLabel/index.js +32 -21
- package/esm/outOfTheBox/ItemTextLabel/styled.js +7 -10
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +78 -70
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js +9 -14
- package/esm/outOfTheBox/ItemWithDate/index.js +39 -28
- package/esm/outOfTheBox/ItemWithDate/styled.js +9 -14
- package/esm/outOfTheBox/index.js +31 -30
- package/esm/parts/LeftNavContent/index.js +52 -85
- package/esm/parts/LeftNavContent/styled.js +16 -27
- package/esm/parts/LeftNavContentWithScrollbar/index.js +52 -46
- package/esm/parts/LeftNavFooterItem/index.js +65 -79
- package/esm/parts/LeftNavFooterItem/styled.js +12 -31
- package/esm/parts/LeftNavLoading/index.js +8 -6
- package/esm/parts/OutOfTheBoxMapItem.js +18 -38
- package/esm/prop-types.js +8 -48
- package/package.json +235 -16
- package/types/LeftNavigation.d.ts +55 -0
- package/types/LeftNavigationContext.d.ts +18 -0
- package/types/common/getItemBackgroundStyle.d.ts +5 -0
- package/types/common/getLeftBorderStyle.d.ts +4 -0
- package/types/common/getScrollbarStyle.d.ts +1 -0
- package/types/common/index.d.ts +3 -0
- package/types/configs/index.d.ts +3 -0
- package/types/configs/useLeftNavConfig.d.ts +4 -0
- package/types/configs/useLeftNavItems.d.ts +12 -0
- package/types/configs/useLeftNavSmoothExpand.d.ts +10 -0
- package/types/exported-related/ChevronItem/index.d.ts +3 -0
- package/types/exported-related/Icon/index.d.ts +5 -0
- package/types/exported-related/ItemRenderer/index.d.ts +3 -0
- package/types/exported-related/ItemRenderer/styled.d.ts +16 -0
- package/types/exported-related/ItemRenderer/usePropsWithDefaults.d.ts +2 -0
- package/types/exported-related/Notifications/index.d.ts +8 -0
- package/types/exported-related/OpenWindowItem/index.d.ts +3 -0
- package/types/exported-related/constants.d.ts +19 -0
- package/types/exported-related/index.d.ts +6 -0
- package/types/hooks/index.d.ts +3 -0
- package/types/hooks/useExpandableOnClickHandler.d.ts +9 -0
- package/types/hooks/useKeyboardNavigation.d.ts +8 -0
- package/types/hooks/useOpenableOnClickHandler.d.ts +10 -0
- package/types/hooks/useSelectFirstBodyItem.d.ts +3 -0
- package/types/index.d.d.ts +74 -0
- package/types/index.d.ts +3 -0
- package/types/outOfTheBox/ItemControlledDrilldown/index.d.ts +3 -0
- package/types/outOfTheBox/ItemControlledDrilldown/styled.d.ts +5 -0
- package/types/outOfTheBox/ItemHeader/index.d.ts +3 -0
- package/types/outOfTheBox/ItemHeader/styled.d.ts +3 -0
- package/types/outOfTheBox/ItemLink/index.d.ts +3 -0
- package/types/outOfTheBox/ItemLink/styled.d.ts +2 -0
- package/types/outOfTheBox/ItemSection/index.d.ts +3 -0
- package/types/outOfTheBox/ItemSection/styled.d.ts +3 -0
- package/types/outOfTheBox/ItemSeparator/index.d.ts +3 -0
- package/types/outOfTheBox/ItemSubmenu/index.d.ts +3 -0
- package/types/outOfTheBox/ItemSubmenu/styled.d.ts +3 -0
- package/types/outOfTheBox/ItemTextLabel/index.d.ts +3 -0
- package/types/outOfTheBox/ItemTextLabel/styled.d.ts +2 -0
- package/types/outOfTheBox/ItemUncontrolledDrilldown/index.d.ts +3 -0
- package/types/outOfTheBox/ItemUncontrolledDrilldown/styled.d.ts +5 -0
- package/types/outOfTheBox/ItemWithDate/index.d.ts +3 -0
- package/types/outOfTheBox/ItemWithDate/styled.d.ts +5 -0
- package/types/outOfTheBox/index.d.ts +13 -0
- package/types/parts/LeftNavContent/index.d.ts +3 -0
- package/types/parts/LeftNavContent/styled.d.ts +14 -0
- package/types/parts/LeftNavContentWithScrollbar/index.d.ts +6 -0
- package/types/parts/LeftNavFooterItem/index.d.ts +8 -0
- package/types/parts/LeftNavFooterItem/styled.d.ts +14 -0
- package/types/parts/LeftNavLoading/index.d.ts +4 -0
- package/types/parts/OutOfTheBoxMapItem.d.ts +3 -0
- package/types/prop-types.d.ts +91 -0
- package/types/tests/LeftNavigation.collapsed.test.d.ts +1 -0
- package/types/tests/LeftNavigation.expanded.test.d.ts +1 -0
- package/types/tests/LeftNavigation.opened.test.d.ts +1 -0
- package/types/tests/events/LeftNavigation.events.keyboard.test.d.ts +1 -0
- package/types/tests/events/LeftNavigation.events.subitems.test.d.ts +1 -0
- package/types/tests/events/LeftNavigation.events.test.d.ts +1 -0
- package/types/tests/events/LeftNavigation.focus.events.test.d.ts +1 -0
- package/LeftNavigation/package.json +0 -10
- package/LeftNavigationContext/package.json +0 -10
- package/cjs/LeftNavigation.js.map +0 -1
- package/cjs/LeftNavigationContext.js.map +0 -1
- package/cjs/common/getItemBackgroundStyle.js.map +0 -1
- package/cjs/common/getLeftBorderStyle.js.map +0 -1
- package/cjs/common/getScrollbarStyle.js.map +0 -1
- package/cjs/common/index.js.map +0 -1
- package/cjs/configs/index.js.map +0 -1
- package/cjs/configs/useLeftNavConfig.js.map +0 -1
- package/cjs/configs/useLeftNavItems.js.map +0 -1
- package/cjs/configs/useLeftNavSmoothExpand.js.map +0 -1
- package/cjs/exported-related/ChevronItem/index.js.map +0 -1
- package/cjs/exported-related/Icon/index.js.map +0 -1
- package/cjs/exported-related/ItemRenderer/index.js.map +0 -1
- package/cjs/exported-related/ItemRenderer/styled.js.map +0 -1
- package/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +0 -1
- package/cjs/exported-related/Notifications/index.js.map +0 -1
- package/cjs/exported-related/OpenWindowItem/index.js.map +0 -1
- package/cjs/exported-related/constants.js.map +0 -1
- package/cjs/exported-related/index.js.map +0 -1
- package/cjs/hooks/index.js.map +0 -1
- package/cjs/hooks/useExpandableOnClickHandler.js.map +0 -1
- package/cjs/hooks/useKeyboardNavigation.js.map +0 -1
- package/cjs/hooks/useOpenableOnClickHandler.js.map +0 -1
- package/cjs/hooks/useSelectFirstBodyItem.js.map +0 -1
- package/cjs/index.d.js.map +0 -1
- package/cjs/index.js.map +0 -1
- package/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +0 -1
- package/cjs/outOfTheBox/ItemControlledDrilldown/styled.js.map +0 -1
- package/cjs/outOfTheBox/ItemHeader/index.js.map +0 -1
- package/cjs/outOfTheBox/ItemHeader/styled.js.map +0 -1
- package/cjs/outOfTheBox/ItemLink/index.js.map +0 -1
- package/cjs/outOfTheBox/ItemLink/styled.js.map +0 -1
- package/cjs/outOfTheBox/ItemSection/index.js.map +0 -1
- package/cjs/outOfTheBox/ItemSection/styled.js.map +0 -1
- package/cjs/outOfTheBox/ItemSeparator/index.js.map +0 -1
- package/cjs/outOfTheBox/ItemSubmenu/index.js.map +0 -1
- package/cjs/outOfTheBox/ItemSubmenu/styled.js.map +0 -1
- package/cjs/outOfTheBox/ItemTextLabel/index.js.map +0 -1
- package/cjs/outOfTheBox/ItemTextLabel/styled.js.map +0 -1
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +0 -1
- package/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +0 -1
- package/cjs/outOfTheBox/ItemWithDate/index.js.map +0 -1
- package/cjs/outOfTheBox/ItemWithDate/styled.js.map +0 -1
- package/cjs/outOfTheBox/index.js.map +0 -1
- package/cjs/parts/LeftNavContent/index.js.map +0 -1
- package/cjs/parts/LeftNavContent/styled.js.map +0 -1
- package/cjs/parts/LeftNavContentWithScrollbar/index.js.map +0 -1
- package/cjs/parts/LeftNavFooterItem/index.js.map +0 -1
- package/cjs/parts/LeftNavFooterItem/styled.js.map +0 -1
- package/cjs/parts/LeftNavLoading/index.js.map +0 -1
- package/cjs/parts/OutOfTheBoxMapItem.js.map +0 -1
- package/cjs/prop-types.js.map +0 -1
- package/common/getItemBackgroundStyle/package.json +0 -10
- package/common/getLeftBorderStyle/package.json +0 -10
- package/common/getScrollbarStyle/package.json +0 -10
- package/common/package.json +0 -10
- package/configs/package.json +0 -10
- package/configs/useLeftNavConfig/package.json +0 -10
- package/configs/useLeftNavItems/package.json +0 -10
- package/configs/useLeftNavSmoothExpand/package.json +0 -10
- package/esm/LeftNavigation.js.map +0 -1
- package/esm/LeftNavigationContext.js.map +0 -1
- package/esm/common/getItemBackgroundStyle.js.map +0 -1
- package/esm/common/getLeftBorderStyle.js.map +0 -1
- package/esm/common/getScrollbarStyle.js.map +0 -1
- package/esm/common/index.js.map +0 -1
- package/esm/configs/index.js.map +0 -1
- package/esm/configs/useLeftNavConfig.js.map +0 -1
- package/esm/configs/useLeftNavItems.js.map +0 -1
- package/esm/configs/useLeftNavSmoothExpand.js.map +0 -1
- package/esm/exported-related/ChevronItem/index.js.map +0 -1
- package/esm/exported-related/Icon/index.js.map +0 -1
- package/esm/exported-related/ItemRenderer/index.js.map +0 -1
- package/esm/exported-related/ItemRenderer/styled.js.map +0 -1
- package/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +0 -1
- package/esm/exported-related/Notifications/index.js.map +0 -1
- package/esm/exported-related/OpenWindowItem/index.js.map +0 -1
- package/esm/exported-related/constants.js.map +0 -1
- package/esm/exported-related/index.js.map +0 -1
- package/esm/hooks/index.js.map +0 -1
- package/esm/hooks/useExpandableOnClickHandler.js.map +0 -1
- package/esm/hooks/useKeyboardNavigation.js.map +0 -1
- package/esm/hooks/useOpenableOnClickHandler.js.map +0 -1
- package/esm/hooks/useSelectFirstBodyItem.js.map +0 -1
- package/esm/index.d.js.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +0 -1
- package/esm/outOfTheBox/ItemControlledDrilldown/styled.js.map +0 -1
- package/esm/outOfTheBox/ItemHeader/index.js.map +0 -1
- package/esm/outOfTheBox/ItemHeader/styled.js.map +0 -1
- package/esm/outOfTheBox/ItemLink/index.js.map +0 -1
- package/esm/outOfTheBox/ItemLink/styled.js.map +0 -1
- package/esm/outOfTheBox/ItemSection/index.js.map +0 -1
- package/esm/outOfTheBox/ItemSection/styled.js.map +0 -1
- package/esm/outOfTheBox/ItemSeparator/index.js.map +0 -1
- package/esm/outOfTheBox/ItemSubmenu/index.js.map +0 -1
- package/esm/outOfTheBox/ItemSubmenu/styled.js.map +0 -1
- package/esm/outOfTheBox/ItemTextLabel/index.js.map +0 -1
- package/esm/outOfTheBox/ItemTextLabel/styled.js.map +0 -1
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +0 -1
- package/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +0 -1
- package/esm/outOfTheBox/ItemWithDate/index.js.map +0 -1
- package/esm/outOfTheBox/ItemWithDate/styled.js.map +0 -1
- package/esm/outOfTheBox/index.js.map +0 -1
- package/esm/parts/LeftNavContent/index.js.map +0 -1
- package/esm/parts/LeftNavContent/styled.js.map +0 -1
- package/esm/parts/LeftNavContentWithScrollbar/index.js.map +0 -1
- package/esm/parts/LeftNavFooterItem/index.js.map +0 -1
- package/esm/parts/LeftNavFooterItem/styled.js.map +0 -1
- package/esm/parts/LeftNavLoading/index.js.map +0 -1
- package/esm/parts/OutOfTheBoxMapItem.js.map +0 -1
- package/esm/prop-types.js.map +0 -1
- package/exported-related/ChevronItem/package.json +0 -10
- package/exported-related/Icon/package.json +0 -10
- package/exported-related/ItemRenderer/package.json +0 -10
- package/exported-related/ItemRenderer/styled/package.json +0 -10
- package/exported-related/ItemRenderer/usePropsWithDefaults/package.json +0 -10
- package/exported-related/Notifications/package.json +0 -10
- package/exported-related/OpenWindowItem/package.json +0 -10
- package/exported-related/constants/package.json +0 -10
- package/exported-related/package.json +0 -10
- package/hooks/package.json +0 -10
- package/hooks/useExpandableOnClickHandler/package.json +0 -10
- package/hooks/useKeyboardNavigation/package.json +0 -10
- package/hooks/useOpenableOnClickHandler/package.json +0 -10
- package/hooks/useSelectFirstBodyItem/package.json +0 -10
- package/outOfTheBox/ItemControlledDrilldown/package.json +0 -10
- package/outOfTheBox/ItemControlledDrilldown/styled/package.json +0 -10
- package/outOfTheBox/ItemHeader/package.json +0 -10
- package/outOfTheBox/ItemHeader/styled/package.json +0 -10
- package/outOfTheBox/ItemLink/package.json +0 -10
- package/outOfTheBox/ItemLink/styled/package.json +0 -10
- package/outOfTheBox/ItemSection/package.json +0 -10
- package/outOfTheBox/ItemSection/styled/package.json +0 -10
- package/outOfTheBox/ItemSeparator/package.json +0 -10
- package/outOfTheBox/ItemSubmenu/package.json +0 -10
- package/outOfTheBox/ItemSubmenu/styled/package.json +0 -10
- package/outOfTheBox/ItemTextLabel/package.json +0 -10
- package/outOfTheBox/ItemTextLabel/styled/package.json +0 -10
- package/outOfTheBox/ItemUncontrolledDrilldown/package.json +0 -10
- package/outOfTheBox/ItemUncontrolledDrilldown/styled/package.json +0 -10
- package/outOfTheBox/ItemWithDate/package.json +0 -10
- package/outOfTheBox/ItemWithDate/styled/package.json +0 -10
- package/outOfTheBox/package.json +0 -10
- package/parts/LeftNavContent/package.json +0 -10
- package/parts/LeftNavContent/styled/package.json +0 -10
- package/parts/LeftNavContentWithScrollbar/package.json +0 -10
- package/parts/LeftNavFooterItem/package.json +0 -10
- package/parts/LeftNavFooterItem/styled/package.json +0 -10
- package/parts/LeftNavLoading/package.json +0 -10
- package/parts/OutOfTheBoxMapItem/package.json +0 -10
- package/prop-types/package.json +0 -10
|
@@ -1,114 +1,123 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
3
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
4
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
|
-
import
|
|
5
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
6
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
8
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
9
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
10
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
11
|
+
import { useEffect, useMemo, useCallback } from 'react';
|
|
4
12
|
import Grid from '@elliemae/ds-grid';
|
|
5
13
|
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
6
14
|
import { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';
|
|
7
15
|
import { ITEM_TYPES } from '../../exported-related/constants.js';
|
|
8
16
|
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
9
|
-
import '
|
|
17
|
+
import 'react/jsx-runtime';
|
|
10
18
|
import 'styled-components';
|
|
11
19
|
import { StyledLabel, StyledDate } from './styled.js';
|
|
12
20
|
import { ItemSeparator } from '../ItemSeparator/index.js';
|
|
13
21
|
import { ItemWithDate } from '../ItemWithDate/index.js';
|
|
14
22
|
import { ItemTextLabel } from '../ItemTextLabel/index.js';
|
|
15
|
-
import '../../exported-related/ItemRenderer/styled.js';
|
|
16
|
-
import '../../LeftNavigationContext.js';
|
|
17
|
-
import '../../exported-related/ItemRenderer/usePropsWithDefaults.js';
|
|
18
|
-
import '../../hooks/useKeyboardNavigation.js';
|
|
19
|
-
import '../ItemWithDate/styled.js';
|
|
20
|
-
import '../ItemTextLabel/styled.js';
|
|
21
|
-
|
|
22
|
-
var _outOfTheBoxSubitemsC;
|
|
23
23
|
|
|
24
24
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
25
25
|
|
|
26
26
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
27
27
|
// Subitem mapping
|
|
28
|
-
|
|
28
|
+
const outOfTheBoxSubitemsComponents = {
|
|
29
|
+
[ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,
|
|
30
|
+
[ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,
|
|
31
|
+
[ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel
|
|
32
|
+
};
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
const OutOfTheBoxMapSubitem = props => {
|
|
35
|
+
const {
|
|
36
|
+
item,
|
|
37
|
+
item: {
|
|
38
|
+
type,
|
|
39
|
+
Component
|
|
40
|
+
},
|
|
41
|
+
ctx
|
|
42
|
+
} = props;
|
|
36
43
|
|
|
37
44
|
if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {
|
|
38
45
|
var _item$itemOpts$indent, _item$itemOpts;
|
|
39
46
|
|
|
40
|
-
|
|
41
|
-
|
|
47
|
+
const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];
|
|
48
|
+
const currentIndent = (_item$itemOpts$indent = (_item$itemOpts = item.itemOpts) === null || _item$itemOpts === void 0 ? void 0 : _item$itemOpts.indent) !== null && _item$itemOpts$indent !== void 0 ? _item$itemOpts$indent : 0;
|
|
42
49
|
|
|
43
|
-
|
|
50
|
+
const newItem = _objectSpread(_objectSpread({}, item), {}, {
|
|
44
51
|
itemOpts: _objectSpread(_objectSpread({}, item.itemOpts), {}, {
|
|
45
52
|
indent: currentIndent + 44
|
|
46
53
|
})
|
|
47
54
|
});
|
|
48
55
|
|
|
49
|
-
return /*#__PURE__*/
|
|
56
|
+
return /*#__PURE__*/_jsx(OutOfTheBoxComponent, {
|
|
50
57
|
item: newItem,
|
|
51
58
|
ctx: ctx
|
|
52
59
|
});
|
|
53
60
|
} // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...
|
|
54
61
|
|
|
55
62
|
|
|
56
|
-
return /*#__PURE__*/
|
|
63
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
57
64
|
item: item,
|
|
58
65
|
ctx: ctx
|
|
59
66
|
});
|
|
60
67
|
};
|
|
61
68
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
69
|
+
const ItemUncontrolledDrilldown = props => {
|
|
70
|
+
const {
|
|
71
|
+
item,
|
|
72
|
+
item: {
|
|
73
|
+
dsId,
|
|
74
|
+
itemOpts: {
|
|
75
|
+
label,
|
|
76
|
+
RightComponent,
|
|
77
|
+
labelRightSection,
|
|
78
|
+
labelOverflow: itemLabelOverflow,
|
|
79
|
+
labelBold,
|
|
80
|
+
labelColor,
|
|
81
|
+
startOpened,
|
|
82
|
+
items,
|
|
83
|
+
labelDataTestId
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
ctx,
|
|
87
|
+
ctx: {
|
|
88
|
+
leftNavProps: {
|
|
89
|
+
labelOverflow: leftNavLabelOverflow
|
|
90
|
+
},
|
|
91
|
+
openedDrilldowns,
|
|
92
|
+
setOpenedDrilldowns
|
|
93
|
+
}
|
|
94
|
+
} = props; // Start opened functionality
|
|
81
95
|
|
|
82
|
-
useEffect(
|
|
83
|
-
if (startOpened) setOpenedDrilldowns([
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
if (startOpened) setOpenedDrilldowns([...openedDrilldowns, dsId]);
|
|
84
98
|
}, []);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
return /*#__PURE__*/
|
|
99
|
+
const opened = openedDrilldowns.includes(dsId);
|
|
100
|
+
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
101
|
+
const arrowIcon = useMemo(() => {
|
|
102
|
+
const Component = opened ? ArrowheadDown : ArrowheadRight;
|
|
103
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
90
104
|
width: "24px",
|
|
91
105
|
height: "18px",
|
|
92
106
|
color: ['brand-primary', '800']
|
|
93
107
|
});
|
|
94
108
|
}, [opened]); // Array of subitems
|
|
95
109
|
|
|
96
|
-
|
|
110
|
+
const subitems = useMemo(() => {
|
|
97
111
|
if (!opened || !items) return [];
|
|
98
|
-
return items.map(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
key: subitem.dsId
|
|
103
|
-
});
|
|
104
|
-
});
|
|
112
|
+
return items.map(subitem => /*#__PURE__*/_jsx(OutOfTheBoxMapSubitem, {
|
|
113
|
+
item: subitem,
|
|
114
|
+
ctx: ctx
|
|
115
|
+
}, subitem.dsId));
|
|
105
116
|
}, [items, opened]);
|
|
106
|
-
|
|
107
|
-
if (opened) setOpenedDrilldowns(openedDrilldowns.filter(
|
|
108
|
-
return openedDrilldown !== dsId;
|
|
109
|
-
}));else setOpenedDrilldowns([].concat(_toConsumableArray(openedDrilldowns), [dsId]));
|
|
117
|
+
const handleOnClick = useCallback(() => {
|
|
118
|
+
if (opened) setOpenedDrilldowns(openedDrilldowns.filter(openedDrilldown => openedDrilldown !== dsId));else setOpenedDrilldowns([...openedDrilldowns, dsId]);
|
|
110
119
|
}, [opened, setOpenedDrilldowns, openedDrilldowns]);
|
|
111
|
-
return /*#__PURE__*/
|
|
120
|
+
return /*#__PURE__*/_jsx(ItemRenderer, {
|
|
112
121
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
113
122
|
itemOpts: _objectSpread(_objectSpread({
|
|
114
123
|
ariaExpanded: opened,
|
|
@@ -123,32 +132,31 @@ var ItemUncontrolledDrilldown = function ItemUncontrolledDrilldown(props) {
|
|
|
123
132
|
minHeight: "32px",
|
|
124
133
|
paddingTop: "8px",
|
|
125
134
|
onClick: handleOnClick
|
|
126
|
-
}, /*#__PURE__*/
|
|
135
|
+
}, void 0, /*#__PURE__*/_jsx(Grid, {
|
|
127
136
|
pl: "xxs",
|
|
128
137
|
mt: "-2px"
|
|
129
|
-
}, arrowIcon), /*#__PURE__*/
|
|
138
|
+
}, void 0, arrowIcon), /*#__PURE__*/_jsx(StyledLabel, {
|
|
130
139
|
pb: "xxxs",
|
|
131
140
|
"data-testid": labelDataTestId || 'leftnav-list-item-label',
|
|
132
141
|
labelOverflow: labelOverflow,
|
|
133
142
|
labelBold: labelBold,
|
|
134
143
|
labelColor: labelColor
|
|
135
|
-
}, labelOverflow === 'truncate' ? /*#__PURE__*/
|
|
144
|
+
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
136
145
|
value: label,
|
|
137
146
|
placement: "bottom-start"
|
|
138
|
-
}) : label), /*#__PURE__*/
|
|
147
|
+
}) : label), /*#__PURE__*/_jsx(Grid, {
|
|
139
148
|
pr: "xxs2",
|
|
140
149
|
cols: ['auto', 'auto'],
|
|
141
150
|
alignItems: "center"
|
|
142
|
-
}, /*#__PURE__*/
|
|
151
|
+
}, void 0, /*#__PURE__*/_jsx(StyledDate, {
|
|
143
152
|
ml: "xxs",
|
|
144
153
|
"data-testid": "leftnav-list-item-date"
|
|
145
|
-
}, labelRightSection), /*#__PURE__*/
|
|
154
|
+
}, void 0, labelRightSection), /*#__PURE__*/_jsx(Grid, {
|
|
146
155
|
pl: RightComponent ? 'xxs' : '0px'
|
|
147
|
-
}, RightComponent && /*#__PURE__*/
|
|
156
|
+
}, void 0, RightComponent && /*#__PURE__*/_jsx(RightComponent, {
|
|
148
157
|
ctx: ctx,
|
|
149
158
|
item: item
|
|
150
159
|
}))));
|
|
151
160
|
};
|
|
152
161
|
|
|
153
162
|
export { ItemUncontrolledDrilldown };
|
|
154
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import Grid from '@elliemae/ds-grid';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
|
|
5
5
|
componentId: "sc-17rk89j-0"
|
|
6
|
-
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"],
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular, _ref => {
|
|
7
|
+
let {
|
|
8
|
+
labelColor,
|
|
9
|
+
theme
|
|
10
|
+
} = _ref;
|
|
11
11
|
return labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800];
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
});
|
|
15
|
-
var StyledDate = /*#__PURE__*/styled(Grid).withConfig({
|
|
12
|
+
}, props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
13
|
+
const StyledDate = /*#__PURE__*/styled(Grid).withConfig({
|
|
16
14
|
componentId: "sc-17rk89j-1"
|
|
17
|
-
})(["font-size:12px;color:", ";line-height:14px;"],
|
|
18
|
-
return props.theme.colors.neutral[600];
|
|
19
|
-
});
|
|
15
|
+
})(["font-size:12px;color:", ";line-height:14px;"], props => props.theme.colors.neutral[600]);
|
|
20
16
|
|
|
21
17
|
export { StyledDate, StyledLabel };
|
|
22
|
-
//# sourceMappingURL=styled.js.map
|
|
@@ -1,65 +1,76 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
1
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
|
-
import
|
|
8
|
+
import 'react';
|
|
3
9
|
import Grid from '@elliemae/ds-grid';
|
|
4
10
|
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
5
11
|
import { ItemRenderer } from '../../exported-related/ItemRenderer/index.js';
|
|
6
|
-
import '@babel/runtime/helpers/esm/extends';
|
|
7
12
|
import '@elliemae/ds-icons';
|
|
13
|
+
import 'react/jsx-runtime';
|
|
8
14
|
import 'styled-components';
|
|
9
15
|
import { StyledLabel, StyledDate } from './styled.js';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import '../../exported-related/ItemRenderer/usePropsWithDefaults.js';
|
|
13
|
-
import '../../hooks/useKeyboardNavigation.js';
|
|
14
|
-
import '../../exported-related/constants.js';
|
|
16
|
+
|
|
17
|
+
var _div;
|
|
15
18
|
|
|
16
19
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
20
|
|
|
18
21
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
const ItemWithDate = props => {
|
|
23
|
+
const {
|
|
24
|
+
item,
|
|
25
|
+
item: {
|
|
26
|
+
itemOpts: {
|
|
27
|
+
label,
|
|
28
|
+
RightComponent,
|
|
29
|
+
labelRightSection,
|
|
30
|
+
labelOverflow: itemLabelOverflow,
|
|
31
|
+
labelBold,
|
|
32
|
+
labelColor,
|
|
33
|
+
labelDataTestId
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
ctx,
|
|
37
|
+
ctx: {
|
|
38
|
+
leftNavProps: {
|
|
39
|
+
labelOverflow: leftNavLabelOverflow
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
} = props;
|
|
43
|
+
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
44
|
+
return /*#__PURE__*/_jsx(ItemRenderer, {
|
|
33
45
|
item: _objectSpread(_objectSpread({}, item), {}, {
|
|
34
46
|
CollapsedComponent: null
|
|
35
47
|
}),
|
|
36
48
|
minHeight: "32px",
|
|
37
49
|
paddingTop: "8px"
|
|
38
|
-
}, " ", /*#__PURE__*/
|
|
50
|
+
}, void 0, " ", _div || (_div = /*#__PURE__*/_jsx("div", {})), /*#__PURE__*/_jsx(StyledLabel, {
|
|
39
51
|
pl: "xxs",
|
|
40
52
|
pb: "xxxs",
|
|
41
53
|
"data-testid": labelDataTestId || 'leftnav-list-item-label',
|
|
42
54
|
labelOverflow: labelOverflow,
|
|
43
55
|
labelBold: labelBold,
|
|
44
56
|
labelColor: labelColor
|
|
45
|
-
}, labelOverflow === 'truncate' ? /*#__PURE__*/
|
|
57
|
+
}, void 0, labelOverflow === 'truncate' ? /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
46
58
|
value: label,
|
|
47
59
|
placement: "bottom-start"
|
|
48
|
-
}) : label), /*#__PURE__*/
|
|
60
|
+
}) : label), /*#__PURE__*/_jsx(Grid, {
|
|
49
61
|
pr: "xxs2",
|
|
50
62
|
cols: ['auto', 'auto'],
|
|
51
63
|
alignItems: "center"
|
|
52
|
-
}, /*#__PURE__*/
|
|
64
|
+
}, void 0, /*#__PURE__*/_jsx(StyledDate, {
|
|
53
65
|
ml: "xxs",
|
|
54
66
|
"data-testid": "leftnav-list-item-date"
|
|
55
|
-
}, labelRightSection), /*#__PURE__*/
|
|
67
|
+
}, void 0, labelRightSection), /*#__PURE__*/_jsx(Grid, {
|
|
56
68
|
pl: RightComponent ? 'xxs' : '0px',
|
|
57
69
|
"data-testid": "leftnav-right-component"
|
|
58
|
-
}, RightComponent && /*#__PURE__*/
|
|
70
|
+
}, void 0, RightComponent && /*#__PURE__*/_jsx(RightComponent, {
|
|
59
71
|
ctx: ctx,
|
|
60
72
|
item: item
|
|
61
73
|
}))));
|
|
62
74
|
};
|
|
63
75
|
|
|
64
76
|
export { ItemWithDate };
|
|
65
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import Grid from '@elliemae/ds-grid';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const StyledLabel = /*#__PURE__*/styled(Grid).withConfig({
|
|
5
5
|
componentId: "sc-govmsc-0"
|
|
6
|
-
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"],
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
})(["font-size:13px;font-weight:", ";color:", ";line-height:14px;word-break:", ";"], props => props.labelBold ? props.theme.fontWeights.semibold : props.theme.fontWeights.regular, _ref => {
|
|
7
|
+
let {
|
|
8
|
+
labelColor,
|
|
9
|
+
theme
|
|
10
|
+
} = _ref;
|
|
11
11
|
return labelColor ? theme.colors[labelColor[0]][labelColor[1]] : theme.colors.neutral[800];
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
});
|
|
15
|
-
var StyledDate = /*#__PURE__*/styled(Grid).withConfig({
|
|
12
|
+
}, props => props.labelOverflow === 'wrapAll' ? 'break-all' : 'normal');
|
|
13
|
+
const StyledDate = /*#__PURE__*/styled(Grid).withConfig({
|
|
16
14
|
componentId: "sc-govmsc-1"
|
|
17
|
-
})(["font-size:12px;color:", ";line-height:14px;"],
|
|
18
|
-
return props.theme.colors.neutral[600];
|
|
19
|
-
});
|
|
15
|
+
})(["font-size:12px;color:", ";line-height:14px;"], props => props.theme.colors.neutral[600]);
|
|
20
16
|
|
|
21
17
|
export { StyledDate, StyledLabel };
|
|
22
|
-
//# sourceMappingURL=styled.js.map
|
package/esm/outOfTheBox/index.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
1
|
import { ITEM_TYPES } from '../exported-related/constants.js';
|
|
2
|
+
import '@babel/runtime/helpers/esm/jsx';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@elliemae/ds-grid';
|
|
5
5
|
import 'styled-components';
|
|
6
|
-
import '
|
|
6
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
7
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
8
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
9
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
10
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
11
|
+
import '@babel/runtime/helpers/esm/defineProperty';
|
|
12
|
+
import 'react/jsx-runtime';
|
|
7
13
|
import '@elliemae/ds-icons';
|
|
8
14
|
import { ItemControlledDrilldown } from './ItemControlledDrilldown/index.js';
|
|
9
15
|
export { ItemControlledDrilldown } from './ItemControlledDrilldown/index.js';
|
|
@@ -23,34 +29,29 @@ import { ItemTextLabel } from './ItemTextLabel/index.js';
|
|
|
23
29
|
export { ItemTextLabel } from './ItemTextLabel/index.js';
|
|
24
30
|
import { ItemWithDate } from './ItemWithDate/index.js';
|
|
25
31
|
export { ItemWithDate } from './ItemWithDate/index.js';
|
|
26
|
-
import '@elliemae/ds-truncated-tooltip-text';
|
|
27
|
-
import '../exported-related/ItemRenderer/index.js';
|
|
28
|
-
import '../exported-related/ItemRenderer/styled.js';
|
|
29
|
-
import '../LeftNavigationContext.js';
|
|
30
|
-
import '../exported-related/ItemRenderer/usePropsWithDefaults.js';
|
|
31
|
-
import '../hooks/useKeyboardNavigation.js';
|
|
32
|
-
import './ItemControlledDrilldown/styled.js';
|
|
33
|
-
import '@babel/runtime/helpers/esm/toConsumableArray';
|
|
34
|
-
import './ItemUncontrolledDrilldown/styled.js';
|
|
35
|
-
import './ItemHeader/styled.js';
|
|
36
|
-
import './ItemLink/styled.js';
|
|
37
|
-
import './ItemSection/styled.js';
|
|
38
|
-
import './ItemSubmenu/styled.js';
|
|
39
|
-
import './ItemTextLabel/styled.js';
|
|
40
|
-
import './ItemWithDate/styled.js';
|
|
41
32
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
33
|
+
const outOfTheBoxTypes = Object.values(ITEM_TYPES);
|
|
34
|
+
const {
|
|
35
|
+
LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN,
|
|
36
|
+
LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN,
|
|
37
|
+
LEFT_NAV_ITEM_HEADER,
|
|
38
|
+
LEFT_NAV_ITEM_LINK,
|
|
39
|
+
LEFT_NAV_ITEM_SECTION,
|
|
40
|
+
LEFT_NAV_ITEM_SEPARATOR,
|
|
41
|
+
LEFT_NAV_ITEM_SUBMENU,
|
|
42
|
+
LEFT_NAV_ITEM_TEXT_LABEL,
|
|
43
|
+
LEFT_NAV_ITEM_WITH_DATE
|
|
44
|
+
} = ITEM_TYPES;
|
|
45
|
+
const outOfTheBoxComponents = {
|
|
46
|
+
[LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN]: ItemControlledDrilldown,
|
|
47
|
+
[LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN]: ItemUncontrolledDrilldown,
|
|
48
|
+
[LEFT_NAV_ITEM_HEADER]: ItemHeader,
|
|
49
|
+
[LEFT_NAV_ITEM_LINK]: ItemLink,
|
|
50
|
+
[LEFT_NAV_ITEM_SECTION]: ItemSection,
|
|
51
|
+
[LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,
|
|
52
|
+
[LEFT_NAV_ITEM_SUBMENU]: ItemSubmenu,
|
|
53
|
+
[LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,
|
|
54
|
+
[LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate
|
|
55
|
+
};
|
|
54
56
|
|
|
55
57
|
export { outOfTheBoxComponents, outOfTheBoxTypes };
|
|
56
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
1
4
|
import React from 'react';
|
|
2
5
|
import { LeftNavContext } from '../../LeftNavigationContext.js';
|
|
3
6
|
import { LeftNavFooterItem } from '../LeftNavFooterItem/index.js';
|
|
@@ -5,101 +8,66 @@ import { LeftNavContentWithScrollbar } from '../LeftNavContentWithScrollbar/inde
|
|
|
5
8
|
import { OutOfTheBoxMapItem } from '../OutOfTheBoxMapItem.js';
|
|
6
9
|
import { StyledLeftNavExpandAnimationWrapper, StyledLeftNavAreasContainer, StyledLeftNavFooterArea, StyledLeftNavHeaderArea, StyledLeftNavBodyAreasContainer, StyledLeftNavBodyHeaderArea, StyledLeftNavBodyItemsArea } from './styled.js';
|
|
7
10
|
import { LeftNavLoading } from '../LeftNavLoading/index.js';
|
|
8
|
-
import '
|
|
9
|
-
import 'react-desc';
|
|
10
|
-
import '@elliemae/ds-grid';
|
|
11
|
-
import '@elliemae/ds-truncated-tooltip-text';
|
|
12
|
-
import '../LeftNavFooterItem/styled.js';
|
|
13
|
-
import 'styled-components';
|
|
14
|
-
import '../../common/getItemBackgroundStyle.js';
|
|
15
|
-
import '../../common/getLeftBorderStyle.js';
|
|
16
|
-
import '../../hooks/useKeyboardNavigation.js';
|
|
17
|
-
import '../../exported-related/constants.js';
|
|
18
|
-
import '@babel/runtime/helpers/esm/defineProperty';
|
|
19
|
-
import '@babel/runtime/helpers/esm/slicedToArray';
|
|
20
|
-
import 'overlayscrollbars/css/OverlayScrollbars.css';
|
|
21
|
-
import 'overlayscrollbars';
|
|
22
|
-
import '../../outOfTheBox/index.js';
|
|
23
|
-
import '@babel/runtime/helpers/esm/extends';
|
|
24
|
-
import '../../outOfTheBox/ItemControlledDrilldown/index.js';
|
|
25
|
-
import '../../exported-related/ItemRenderer/index.js';
|
|
26
|
-
import '../../exported-related/ItemRenderer/styled.js';
|
|
27
|
-
import '../../exported-related/ItemRenderer/usePropsWithDefaults.js';
|
|
28
|
-
import '../../outOfTheBox/ItemControlledDrilldown/styled.js';
|
|
29
|
-
import '../../outOfTheBox/ItemSeparator/index.js';
|
|
30
|
-
import '../../outOfTheBox/ItemWithDate/index.js';
|
|
31
|
-
import '../../outOfTheBox/ItemWithDate/styled.js';
|
|
32
|
-
import '../../outOfTheBox/ItemTextLabel/index.js';
|
|
33
|
-
import '../../outOfTheBox/ItemTextLabel/styled.js';
|
|
34
|
-
import '../../outOfTheBox/ItemUncontrolledDrilldown/index.js';
|
|
35
|
-
import '@babel/runtime/helpers/esm/toConsumableArray';
|
|
36
|
-
import '../../outOfTheBox/ItemUncontrolledDrilldown/styled.js';
|
|
37
|
-
import '../../outOfTheBox/ItemHeader/index.js';
|
|
38
|
-
import '../../outOfTheBox/ItemHeader/styled.js';
|
|
39
|
-
import '../../outOfTheBox/ItemLink/index.js';
|
|
40
|
-
import '../../outOfTheBox/ItemLink/styled.js';
|
|
41
|
-
import '../../outOfTheBox/ItemSection/index.js';
|
|
42
|
-
import '../../outOfTheBox/ItemSection/styled.js';
|
|
43
|
-
import '../../outOfTheBox/ItemSubmenu/index.js';
|
|
44
|
-
import '../../outOfTheBox/ItemSubmenu/styled.js';
|
|
45
|
-
import '@elliemae/ds-circular-progress-indicator';
|
|
11
|
+
import { jsxs, Fragment } from 'react/jsx-runtime';
|
|
46
12
|
|
|
47
|
-
var
|
|
13
|
+
var _LeftNavInnerContent;
|
|
14
|
+
const leftNavScreenReaderInstructions = 'Left Navigation. You can navigate through the items using the Up/Down arrows. ' + 'To expand or select an item, use the Enter/Return or Space keys. ' + 'Expandable items can also be opened/closed with the Right/Left arrows. ' + 'The Home and End keys will take you to the first and last item respectively.';
|
|
48
15
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
HeaderComponent
|
|
53
|
-
BodyHeaderComponent
|
|
54
|
-
openedItem
|
|
55
|
-
items
|
|
56
|
-
withoutBodyShadow
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
})
|
|
78
|
-
})
|
|
16
|
+
const LeftNavInnerContent = () => {
|
|
17
|
+
const {
|
|
18
|
+
leftNavProps: {
|
|
19
|
+
HeaderComponent,
|
|
20
|
+
BodyHeaderComponent,
|
|
21
|
+
openedItem,
|
|
22
|
+
items,
|
|
23
|
+
withoutBodyShadow
|
|
24
|
+
},
|
|
25
|
+
selectedItem
|
|
26
|
+
} = React.useContext(LeftNavContext);
|
|
27
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
28
|
+
children: [/*#__PURE__*/_jsx(StyledLeftNavHeaderArea, {
|
|
29
|
+
"data-testid": "leftnav-header-area",
|
|
30
|
+
selected: HeaderComponent && [selectedItem, openedItem].includes(HeaderComponent.dsId)
|
|
31
|
+
}, void 0, HeaderComponent ? /*#__PURE__*/_jsx(OutOfTheBoxMapItem, {
|
|
32
|
+
item: HeaderComponent
|
|
33
|
+
}) : null), /*#__PURE__*/_jsx(StyledLeftNavBodyAreasContainer, {}, void 0, /*#__PURE__*/_jsx(StyledLeftNavBodyHeaderArea, {
|
|
34
|
+
"data-testid": "leftnav-body-header-area",
|
|
35
|
+
selected: BodyHeaderComponent && [selectedItem, openedItem].includes(BodyHeaderComponent.dsId)
|
|
36
|
+
}, void 0, BodyHeaderComponent ? /*#__PURE__*/_jsx(OutOfTheBoxMapItem, {
|
|
37
|
+
item: BodyHeaderComponent
|
|
38
|
+
}) : null), /*#__PURE__*/_jsx(StyledLeftNavBodyItemsArea, {
|
|
39
|
+
selected: !withoutBodyShadow && openedItem !== null,
|
|
40
|
+
"data-testid": "leftnav-body-items-area",
|
|
41
|
+
tabIndex: -1
|
|
42
|
+
}, void 0, /*#__PURE__*/_jsx(LeftNavContentWithScrollbar, {}, void 0, items.map(item => /*#__PURE__*/_jsx(OutOfTheBoxMapItem, {
|
|
43
|
+
item: item
|
|
44
|
+
}, item.dsId)))))]
|
|
45
|
+
});
|
|
79
46
|
};
|
|
80
47
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
expanded
|
|
86
|
-
expandedWidth
|
|
87
|
-
footerLabel
|
|
88
|
-
onFooterExpand
|
|
89
|
-
onFooterClose
|
|
90
|
-
loading
|
|
91
|
-
|
|
92
|
-
|
|
48
|
+
const LeftNavContent = () => {
|
|
49
|
+
const {
|
|
50
|
+
expandedForAnimation,
|
|
51
|
+
leftNavProps: {
|
|
52
|
+
expanded,
|
|
53
|
+
expandedWidth,
|
|
54
|
+
footerLabel,
|
|
55
|
+
onFooterExpand,
|
|
56
|
+
onFooterClose,
|
|
57
|
+
loading
|
|
58
|
+
}
|
|
59
|
+
} = React.useContext(LeftNavContext);
|
|
60
|
+
return /*#__PURE__*/_jsx(StyledLeftNavExpandAnimationWrapper, {
|
|
93
61
|
expandedWidth: expandedWidth,
|
|
94
62
|
expanded: expanded,
|
|
95
63
|
"data-testid": "leftnav-component",
|
|
96
64
|
"aria-label": leftNavScreenReaderInstructions
|
|
97
|
-
}, /*#__PURE__*/
|
|
65
|
+
}, void 0, /*#__PURE__*/_jsx(StyledLeftNavAreasContainer, {
|
|
98
66
|
expandedWidth: expandedWidth,
|
|
99
67
|
expanded: expandedForAnimation
|
|
100
|
-
}, loading && /*#__PURE__*/
|
|
68
|
+
}, void 0, loading && /*#__PURE__*/_jsx(LeftNavLoading, {
|
|
101
69
|
expanded: expandedForAnimation
|
|
102
|
-
}), !loading && /*#__PURE__*/
|
|
70
|
+
}), !loading && (_LeftNavInnerContent || (_LeftNavInnerContent = /*#__PURE__*/_jsx(LeftNavInnerContent, {}))), /*#__PURE__*/_jsx(StyledLeftNavFooterArea, {}, void 0, /*#__PURE__*/_jsx(LeftNavFooterItem, {
|
|
103
71
|
footerLabel: footerLabel,
|
|
104
72
|
onFooterExpand: onFooterExpand,
|
|
105
73
|
onFooterClose: onFooterClose
|
|
@@ -107,4 +75,3 @@ var LeftNavContent = function LeftNavContent() {
|
|
|
107
75
|
};
|
|
108
76
|
|
|
109
77
|
export { LeftNavContent as default };
|
|
110
|
-
//# sourceMappingURL=index.js.map
|