@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
package/cjs/LeftNavigation.js
CHANGED
|
@@ -2,73 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
require('react');
|
|
6
7
|
var reactDesc = require('react-desc');
|
|
7
8
|
var propTypes = require('./prop-types.js');
|
|
8
9
|
var LeftNavigationContext = require('./LeftNavigationContext.js');
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
require('./outOfTheBox/index.js');
|
|
12
|
-
require('@babel/runtime/helpers/defineProperty');
|
|
13
|
-
require('./exported-related/constants.js');
|
|
14
|
-
require('@elliemae/ds-grid');
|
|
15
|
-
require('styled-components');
|
|
16
|
-
require('@babel/runtime/helpers/extends');
|
|
17
|
-
require('@elliemae/ds-icons');
|
|
18
|
-
require('./outOfTheBox/ItemControlledDrilldown/index.js');
|
|
19
|
-
require('@elliemae/ds-truncated-tooltip-text');
|
|
20
|
-
require('./exported-related/ItemRenderer/index.js');
|
|
21
|
-
require('./exported-related/ItemRenderer/styled.js');
|
|
22
|
-
require('./exported-related/ItemRenderer/usePropsWithDefaults.js');
|
|
23
|
-
require('./hooks/useKeyboardNavigation.js');
|
|
24
|
-
require('./outOfTheBox/ItemControlledDrilldown/styled.js');
|
|
25
|
-
require('./outOfTheBox/ItemSeparator/index.js');
|
|
26
|
-
require('./outOfTheBox/ItemWithDate/index.js');
|
|
27
|
-
require('./outOfTheBox/ItemWithDate/styled.js');
|
|
28
|
-
require('./outOfTheBox/ItemTextLabel/index.js');
|
|
29
|
-
require('./outOfTheBox/ItemTextLabel/styled.js');
|
|
30
|
-
require('./outOfTheBox/ItemUncontrolledDrilldown/index.js');
|
|
31
|
-
require('@babel/runtime/helpers/toConsumableArray');
|
|
32
|
-
require('./outOfTheBox/ItemUncontrolledDrilldown/styled.js');
|
|
33
|
-
require('./outOfTheBox/ItemHeader/index.js');
|
|
34
|
-
require('./outOfTheBox/ItemHeader/styled.js');
|
|
35
|
-
require('./outOfTheBox/ItemLink/index.js');
|
|
36
|
-
require('./outOfTheBox/ItemLink/styled.js');
|
|
37
|
-
require('./outOfTheBox/ItemSection/index.js');
|
|
38
|
-
require('./outOfTheBox/ItemSection/styled.js');
|
|
39
|
-
require('./outOfTheBox/ItemSubmenu/index.js');
|
|
40
|
-
require('./outOfTheBox/ItemSubmenu/styled.js');
|
|
41
|
-
require('@babel/runtime/helpers/slicedToArray');
|
|
42
|
-
require('./configs/useLeftNavItems.js');
|
|
43
|
-
require('./configs/useLeftNavSmoothExpand.js');
|
|
44
|
-
require('./hooks/useSelectFirstBodyItem.js');
|
|
45
|
-
require('./parts/LeftNavFooterItem/index.js');
|
|
46
|
-
require('./parts/LeftNavFooterItem/styled.js');
|
|
47
|
-
require('./common/getItemBackgroundStyle.js');
|
|
48
|
-
require('./common/getLeftBorderStyle.js');
|
|
49
|
-
require('./parts/LeftNavContentWithScrollbar/index.js');
|
|
50
|
-
require('overlayscrollbars/css/OverlayScrollbars.css');
|
|
51
|
-
require('overlayscrollbars');
|
|
52
|
-
require('./parts/OutOfTheBoxMapItem.js');
|
|
53
|
-
require('./parts/LeftNavContent/styled.js');
|
|
54
|
-
require('./parts/LeftNavLoading/index.js');
|
|
55
|
-
require('@elliemae/ds-circular-progress-indicator');
|
|
10
|
+
var useLeftNavConfig = require('./configs/useLeftNavConfig.js');
|
|
11
|
+
var index = require('./parts/LeftNavContent/index.js');
|
|
56
12
|
|
|
57
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
58
14
|
|
|
59
|
-
var
|
|
15
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
60
16
|
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
|
|
17
|
+
var _LeftNavContent;
|
|
18
|
+
const LeftNavigation = props => {
|
|
19
|
+
const leftNavConfig = useLeftNavConfig.useLeftNavConfig(props);
|
|
20
|
+
return /*#__PURE__*/_jsx__default["default"](LeftNavigationContext.LeftNavContext.Provider, {
|
|
64
21
|
value: leftNavConfig
|
|
65
|
-
}, /*#__PURE__*/
|
|
22
|
+
}, void 0, _LeftNavContent || (_LeftNavContent = /*#__PURE__*/_jsx__default["default"](index, {})));
|
|
66
23
|
};
|
|
67
|
-
LeftNavigation.propTypes = propTypes.leftNavigationProps;
|
|
68
24
|
LeftNavigation.defaultProps = LeftNavigationContext.defaultProps;
|
|
69
|
-
|
|
25
|
+
const LeftNavigationWithSchema = reactDesc.describe(LeftNavigation).description('Left Navigation');
|
|
70
26
|
LeftNavigationWithSchema.propTypes = propTypes.leftNavigationProps;
|
|
71
27
|
|
|
72
28
|
exports.LeftNavigation = LeftNavigation;
|
|
73
29
|
exports.LeftNavigationWithSchema = LeftNavigationWithSchema;
|
|
74
|
-
//# sourceMappingURL=LeftNavigation.js.map
|
|
@@ -4,55 +4,38 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const defaultProps = {
|
|
8
8
|
expandedWidth: '240px',
|
|
9
9
|
tabIndex: 0,
|
|
10
10
|
loading: false,
|
|
11
11
|
expanded: false,
|
|
12
12
|
openedItem: null,
|
|
13
13
|
footerLabel: '',
|
|
14
|
-
onSelectedChange:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return null;
|
|
19
|
-
},
|
|
20
|
-
onFooterExpand: function onFooterExpand() {
|
|
21
|
-
return null;
|
|
22
|
-
},
|
|
23
|
-
onFooterClose: function onFooterClose() {
|
|
24
|
-
return null;
|
|
25
|
-
},
|
|
14
|
+
onSelectedChange: () => null,
|
|
15
|
+
onFocusChange: () => null,
|
|
16
|
+
onFooterExpand: () => null,
|
|
17
|
+
onFooterClose: () => null,
|
|
26
18
|
items: [],
|
|
27
19
|
labelOverflow: 'wrap',
|
|
28
|
-
onItemClick:
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
20
|
+
onItemClick: () => null
|
|
31
21
|
};
|
|
32
|
-
|
|
22
|
+
const defaultContext = {
|
|
33
23
|
leftNavProps: defaultProps,
|
|
34
24
|
selectedItem: null,
|
|
35
|
-
setSelectedItem:
|
|
36
|
-
return null;
|
|
37
|
-
},
|
|
25
|
+
setSelectedItem: () => null,
|
|
38
26
|
focusedItem: null,
|
|
39
|
-
setFocusedItem:
|
|
40
|
-
return null;
|
|
41
|
-
},
|
|
27
|
+
setFocusedItem: () => null,
|
|
42
28
|
expandedForAnimation: true,
|
|
43
29
|
openedDrilldowns: [],
|
|
44
|
-
setOpenedDrilldowns:
|
|
45
|
-
return null;
|
|
46
|
-
},
|
|
30
|
+
setOpenedDrilldowns: () => null,
|
|
47
31
|
visibleItems: [],
|
|
48
32
|
visibleItemsRefs: {
|
|
49
33
|
current: {}
|
|
50
34
|
}
|
|
51
35
|
};
|
|
52
|
-
|
|
36
|
+
const LeftNavContext = /*#__PURE__*/React.createContext(defaultContext);
|
|
53
37
|
|
|
54
38
|
exports.LeftNavContext = LeftNavContext;
|
|
55
|
-
exports[
|
|
39
|
+
exports["default"] = LeftNavContext;
|
|
56
40
|
exports.defaultContext = defaultContext;
|
|
57
41
|
exports.defaultProps = defaultProps;
|
|
58
|
-
//# sourceMappingURL=LeftNavigationContext.js.map
|
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
return "\n\n background: ".concat(color, ";\n\n :hover {\n background: ").concat(hoverColor, ";\n }\n\n :active {\n background: ").concat(activeColor, ";\n }\n");
|
|
7
|
-
};
|
|
5
|
+
const commonItemBackgroundStyle = (color, hoverColor, activeColor) => "\n\n background: ".concat(color, ";\n\n :hover {\n background: ").concat(hoverColor, ";\n }\n\n :active {\n background: ").concat(activeColor, ";\n }\n");
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
const getItemBackgroundStyle = props => {
|
|
10
8
|
if (props.selected && !props.opened) return commonItemBackgroundStyle(props.theme.colors.brand[200], props.theme.colors.brand[200], props.theme.colors.brand[200]);
|
|
11
9
|
return commonItemBackgroundStyle(props.theme.colors.neutral['000'], props.theme.colors.neutral['080'], props.theme.colors.brand[200]);
|
|
12
10
|
};
|
|
13
11
|
|
|
14
12
|
exports.getItemBackgroundStyle = getItemBackgroundStyle;
|
|
15
|
-
//# sourceMappingURL=getItemBackgroundStyle.js.map
|
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
return "\n\n -webkit-box-shadow: inset 4px 0 0 0 ".concat(color, ";\n box-shadow: inset 4px 0 0 0 ").concat(color, ";\n\n :hover {\n -webkit-box-shadow: inset 4px 0 0 0 ").concat(hoverColor, ";\n box-shadow: inset 4px 0 0 0 ").concat(hoverColor, ";\n }\n\n :active {\n -webkit-box-shadow: inset 4px 0 0 0 ").concat(activeColor, ";\n box-shadow: inset 4px 0 0 0 ").concat(activeColor, ";\n }\n");
|
|
7
|
-
};
|
|
5
|
+
const commonLeftBorderStyle = (color, hoverColor, activeColor) => "\n\n -webkit-box-shadow: inset 4px 0 0 0 ".concat(color, ";\n box-shadow: inset 4px 0 0 0 ").concat(color, ";\n\n :hover {\n -webkit-box-shadow: inset 4px 0 0 0 ").concat(hoverColor, ";\n box-shadow: inset 4px 0 0 0 ").concat(hoverColor, ";\n }\n\n :active {\n -webkit-box-shadow: inset 4px 0 0 0 ").concat(activeColor, ";\n box-shadow: inset 4px 0 0 0 ").concat(activeColor, ";\n }\n");
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
const getLeftBorderStyle = props => {
|
|
10
8
|
if (props.selected || props.selectedParent) return commonLeftBorderStyle(props.theme.colors.brand[400], props.theme.colors.brand[400], props.theme.colors.brand[400]);
|
|
11
9
|
return commonLeftBorderStyle(props.theme.colors.neutral['000'], props.theme.colors.brand[300], props.theme.colors.brand[400]);
|
|
12
10
|
};
|
|
13
11
|
|
|
14
12
|
exports.getLeftBorderStyle = getLeftBorderStyle;
|
|
15
|
-
//# sourceMappingURL=getLeftBorderStyle.js.map
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
return "\n ::-webkit-scrollbar {\n width: 14px;\n }\n ::-webkit-scrollbar-thumb {\n height: 6px;\n border: 4px solid rgba(0, 0, 0, 0);\n\n background-clip: padding-box;\n\n background-color: rgba(105, 116, 137, 0.5);\n\n border-radius: 7px;\n -webkit-border-radius: 7px;\n }\n ::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n display: none;\n }\n ::-webkit-scrollbar-corner {\n background-color: transparent;\n }\n";
|
|
7
|
-
};
|
|
5
|
+
const getScrolbarStyle = () => "\n ::-webkit-scrollbar {\n width: 14px;\n }\n ::-webkit-scrollbar-thumb {\n height: 6px;\n border: 4px solid rgba(0, 0, 0, 0);\n\n background-clip: padding-box;\n\n background-color: rgba(105, 116, 137, 0.5);\n\n border-radius: 7px;\n -webkit-border-radius: 7px;\n }\n ::-webkit-scrollbar-button {\n width: 0;\n height: 0;\n display: none;\n }\n ::-webkit-scrollbar-corner {\n background-color: transparent;\n }\n";
|
|
8
6
|
|
|
9
7
|
exports.getScrolbarStyle = getScrolbarStyle;
|
|
10
|
-
//# sourceMappingURL=getScrollbarStyle.js.map
|
package/cjs/common/index.js
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var getItemBackgroundStyle = require('./getItemBackgroundStyle.js');
|
|
6
|
+
var getLeftBorderStyle = require('./getLeftBorderStyle.js');
|
|
7
|
+
var getScrollbarStyle = require('./getScrollbarStyle.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.getItemBackgroundStyle =
|
|
12
|
-
exports.getLeftBorderStyle =
|
|
13
|
-
exports.getScrolbarStyle =
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
11
|
+
exports.getItemBackgroundStyle = getItemBackgroundStyle.getItemBackgroundStyle;
|
|
12
|
+
exports.getLeftBorderStyle = getLeftBorderStyle.getLeftBorderStyle;
|
|
13
|
+
exports.getScrolbarStyle = getScrollbarStyle.getScrolbarStyle;
|
package/cjs/configs/index.js
CHANGED
|
@@ -2,22 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('@babel/runtime/helpers/slicedToArray');
|
|
7
|
-
require('react');
|
|
8
|
-
require('./useLeftNavItems.js');
|
|
9
|
-
require('@babel/runtime/helpers/toConsumableArray');
|
|
10
|
-
require('../exported-related/constants.js');
|
|
11
|
-
require('@elliemae/ds-grid');
|
|
12
|
-
require('styled-components');
|
|
13
|
-
require('@babel/runtime/helpers/defineProperty');
|
|
14
|
-
require('@babel/runtime/helpers/extends');
|
|
15
|
-
require('@elliemae/ds-icons');
|
|
16
|
-
require('./useLeftNavSmoothExpand.js');
|
|
17
|
-
require('../hooks/useSelectFirstBodyItem.js');
|
|
5
|
+
var useLeftNavConfig = require('./useLeftNavConfig.js');
|
|
18
6
|
|
|
19
7
|
|
|
20
8
|
|
|
21
|
-
exports
|
|
22
|
-
exports.useLeftNavConfig =
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
9
|
+
exports["default"] = useLeftNavConfig.useLeftNavConfig;
|
|
10
|
+
exports.useLeftNavConfig = useLeftNavConfig.useLeftNavConfig;
|
|
@@ -2,134 +2,97 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
require('@babel/runtime/helpers/toConsumableArray');
|
|
11
|
-
require('../exported-related/constants.js');
|
|
12
|
-
require('@elliemae/ds-grid');
|
|
13
|
-
require('styled-components');
|
|
14
|
-
require('@babel/runtime/helpers/defineProperty');
|
|
15
|
-
require('@babel/runtime/helpers/extends');
|
|
16
|
-
require('@elliemae/ds-icons');
|
|
7
|
+
var useLeftNavItems = require('./useLeftNavItems.js');
|
|
8
|
+
var useLeftNavSmoothExpand = require('./useLeftNavSmoothExpand.js');
|
|
9
|
+
var useSelectFirstBodyItem = require('../hooks/useSelectFirstBodyItem.js');
|
|
17
10
|
|
|
18
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
12
|
|
|
20
|
-
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
21
13
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
14
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
const useLeftNavConfig = props => {
|
|
16
|
+
const {
|
|
17
|
+
expanded,
|
|
18
|
+
openedItem,
|
|
19
|
+
onSelectedChange,
|
|
20
|
+
onFocusChange,
|
|
21
|
+
items
|
|
22
|
+
} = props; // -----------------------------------------------------------------------------
|
|
29
23
|
// ************************** ------------ **************************
|
|
30
24
|
// * INTERNAL STATE *
|
|
31
25
|
// ************************** ------------ **************************
|
|
32
26
|
// Selection related
|
|
33
27
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
setSelectedItem = _React$useState2[1];
|
|
28
|
+
const [selectedItem, setSelectedItem] = React__default["default"].useState(null);
|
|
29
|
+
React__default["default"].useState(null);
|
|
30
|
+
const [selectedParent, setSelectedParent] = React__default["default"].useState(null); // Focus related
|
|
38
31
|
|
|
39
|
-
|
|
40
|
-
_React$useState4 = _slicedToArray__default['default'](_React$useState3, 2);
|
|
41
|
-
_React$useState4[0];
|
|
42
|
-
_React$useState4[1];
|
|
32
|
+
const [focusedItem, setFocusedItem] = React__default["default"].useState(null); // Opened uncontrolled drilldowns
|
|
43
33
|
|
|
44
|
-
|
|
45
|
-
_React$useState6 = _slicedToArray__default['default'](_React$useState5, 2),
|
|
46
|
-
selectedParent = _React$useState6[0],
|
|
47
|
-
setSelectedParent = _React$useState6[1]; // Focus related
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
var _React$useState7 = React__default['default'].useState(null),
|
|
51
|
-
_React$useState8 = _slicedToArray__default['default'](_React$useState7, 2),
|
|
52
|
-
focusedItem = _React$useState8[0],
|
|
53
|
-
setFocusedItem = _React$useState8[1]; // Opened uncontrolled drilldowns
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
var _React$useState9 = React__default['default'].useState([]),
|
|
57
|
-
_React$useState10 = _slicedToArray__default['default'](_React$useState9, 2),
|
|
58
|
-
openedDrilldowns = _React$useState10[0],
|
|
59
|
-
setOpenedDrilldowns = _React$useState10[1]; // -----------------------------------------------------------------------------
|
|
34
|
+
const [openedDrilldowns, setOpenedDrilldowns] = React__default["default"].useState([]); // -----------------------------------------------------------------------------
|
|
60
35
|
// ************************** ------------ **************************
|
|
61
36
|
// * EXPAND ANIMATION *
|
|
62
37
|
// ************************** ------------ **************************
|
|
63
38
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return {
|
|
73
|
-
expandedForAnimation: expandedForAnimation,
|
|
74
|
-
timeoutRef: timeoutRef,
|
|
75
|
-
setExpandedForAnimation: setExpandedForAnimation
|
|
76
|
-
};
|
|
77
|
-
}, [expandedForAnimation, timeoutRef, setExpandedForAnimation]);
|
|
78
|
-
configs_useLeftNavSmoothExpand.useLeftNavSmoothExpand(props, smoothExpandOpts); // -----------------------------------------------------------------------------
|
|
39
|
+
const [expandedForAnimation, setExpandedForAnimation] = React__default["default"].useState(expanded);
|
|
40
|
+
const timeoutRef = React__default["default"].useRef(null);
|
|
41
|
+
const smoothExpandOpts = React__default["default"].useMemo(() => ({
|
|
42
|
+
expandedForAnimation,
|
|
43
|
+
timeoutRef,
|
|
44
|
+
setExpandedForAnimation
|
|
45
|
+
}), [expandedForAnimation, timeoutRef, setExpandedForAnimation]);
|
|
46
|
+
useLeftNavSmoothExpand.useLeftNavSmoothExpand(props, smoothExpandOpts); // -----------------------------------------------------------------------------
|
|
79
47
|
// ************************** ------------ **************************
|
|
80
48
|
// * SIDE EFFECTS *
|
|
81
49
|
// ************************** ------------ **************************
|
|
82
50
|
|
|
83
|
-
React__default[
|
|
51
|
+
React__default["default"].useEffect(() => {
|
|
84
52
|
onSelectedChange(selectedItem);
|
|
85
53
|
}, [selectedItem, onSelectedChange]);
|
|
86
|
-
React__default[
|
|
54
|
+
React__default["default"].useEffect(() => {
|
|
87
55
|
if (openedItem !== null) setSelectedParent(openedItem);
|
|
88
56
|
}, [openedItem]);
|
|
89
|
-
React__default[
|
|
57
|
+
React__default["default"].useEffect(() => {
|
|
90
58
|
onFocusChange(focusedItem);
|
|
91
59
|
}, [focusedItem, onFocusChange]);
|
|
92
|
-
|
|
60
|
+
useSelectFirstBodyItem.useSelectFirstBodyItem(items, openedItem, props.selectedItem !== undefined ? props.selectedItem : selectedItem, setSelectedItem, props.disableDefaultSelection); // -----------------------------------------------------------------------------
|
|
93
61
|
// ************************** ------------ **************************
|
|
94
62
|
// * ITEMS MANAGEMENT *
|
|
95
63
|
// ************************** ------------ **************************
|
|
96
64
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
visibleItemsRefs = _useLeftNavItems.visibleItemsRefs; // -----------------------------------------------------------------------------
|
|
65
|
+
const leftNavItemsProps = React__default["default"].useMemo(() => ({
|
|
66
|
+
headerItem: props.HeaderComponent,
|
|
67
|
+
bodyHeaderItem: props.BodyHeaderComponent,
|
|
68
|
+
items: props.items,
|
|
69
|
+
openedDrilldowns
|
|
70
|
+
}), [props.HeaderComponent, props.BodyHeaderComponent, props.items, openedDrilldowns]); // We need to know the current visible items since we have drilldowns
|
|
71
|
+
|
|
72
|
+
const {
|
|
73
|
+
visibleItems,
|
|
74
|
+
visibleItemsRefs
|
|
75
|
+
} = useLeftNavItems.useLeftNavItems(leftNavItemsProps); // -----------------------------------------------------------------------------
|
|
109
76
|
// ************************** ------------ **************************
|
|
110
77
|
// * LEFTNAV CONFIG *
|
|
111
78
|
// ************************** ------------ **************************
|
|
112
79
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
visibleItemsRefs: visibleItemsRefs
|
|
128
|
-
};
|
|
129
|
-
}, [props, expandedForAnimation, selectedItem, setSelectedItem, setSelectedParent, selectedParent, focusedItem, setFocusedItem, openedDrilldowns, setOpenedDrilldowns, visibleItems, visibleItemsRefs]);
|
|
80
|
+
const finalConfig = React__default["default"].useMemo(() => ({
|
|
81
|
+
leftNavProps: props,
|
|
82
|
+
expandedForAnimation,
|
|
83
|
+
selectedItem: props.selectedItem !== undefined ? props.selectedItem : selectedItem,
|
|
84
|
+
setSelectedItem,
|
|
85
|
+
selectedParent: props.selectedParent !== undefined ? props.selectedParent : selectedParent,
|
|
86
|
+
setSelectedParent,
|
|
87
|
+
focusedItem,
|
|
88
|
+
setFocusedItem,
|
|
89
|
+
openedDrilldowns,
|
|
90
|
+
setOpenedDrilldowns,
|
|
91
|
+
visibleItems,
|
|
92
|
+
visibleItemsRefs
|
|
93
|
+
}), [props, expandedForAnimation, selectedItem, setSelectedItem, setSelectedParent, selectedParent, focusedItem, setFocusedItem, openedDrilldowns, setOpenedDrilldowns, visibleItems, visibleItemsRefs]);
|
|
130
94
|
return finalConfig;
|
|
131
95
|
};
|
|
132
96
|
|
|
133
|
-
exports[
|
|
97
|
+
exports["default"] = useLeftNavConfig;
|
|
134
98
|
exports.useLeftNavConfig = useLeftNavConfig;
|
|
135
|
-
//# sourceMappingURL=useLeftNavConfig.js.map
|
|
@@ -2,24 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
8
|
+
require('core-js/modules/web.dom-collections.iterator.js');
|
|
6
9
|
var React = require('react');
|
|
7
|
-
var
|
|
10
|
+
var constants = require('../exported-related/constants.js');
|
|
11
|
+
require('@babel/runtime/helpers/jsx');
|
|
8
12
|
require('@elliemae/ds-grid');
|
|
9
13
|
require('styled-components');
|
|
14
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
15
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
10
16
|
require('@babel/runtime/helpers/defineProperty');
|
|
11
|
-
require('
|
|
17
|
+
require('react/jsx-runtime');
|
|
12
18
|
require('@elliemae/ds-icons');
|
|
13
19
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
17
|
-
|
|
18
|
-
var notFocuseableItems = [exportedRelated_constants.ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR, exportedRelated_constants.ITEM_TYPES.LEFT_NAV_ITEM_SECTION]; // Walks the array of items
|
|
20
|
+
const notFocuseableItems = [constants.ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR, constants.ITEM_TYPES.LEFT_NAV_ITEM_SECTION]; // Walks the array of items
|
|
19
21
|
// Drilldowns are tree-like structures
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
items.forEach(
|
|
23
|
+
const walkItems = (items, openedDrilldowns, callback) => {
|
|
24
|
+
items.forEach(item => {
|
|
23
25
|
if (typeof item.type === 'string') {
|
|
24
26
|
var _item$itemOpts$items, _item$itemOpts, _item$itemOpts2, _item$itemOpts$items2, _item$itemOpts3;
|
|
25
27
|
|
|
@@ -28,9 +30,9 @@ var walkItems = function walkItems(items, openedDrilldowns, callback) {
|
|
|
28
30
|
|
|
29
31
|
callback(item.dsId); // If it's an opened uncontrolled drilldown
|
|
30
32
|
|
|
31
|
-
if (item.type ===
|
|
33
|
+
if (item.type === constants.ITEM_TYPES.LEFT_NAV_ITEM_UNCONTROLLED_DRILLDOWN && openedDrilldowns.includes(item.dsId)) walkItems((_item$itemOpts$items = (_item$itemOpts = item.itemOpts) === null || _item$itemOpts === void 0 ? void 0 : _item$itemOpts.items) !== null && _item$itemOpts$items !== void 0 ? _item$itemOpts$items : [], openedDrilldowns, callback); // If it's an opened controlled drilldown
|
|
32
34
|
|
|
33
|
-
if (item.type ===
|
|
35
|
+
if (item.type === constants.ITEM_TYPES.LEFT_NAV_ITEM_CONTROLLED_DRILLDOWN && (_item$itemOpts2 = item.itemOpts) !== null && _item$itemOpts2 !== void 0 && _item$itemOpts2.isOpened) walkItems((_item$itemOpts$items2 = (_item$itemOpts3 = item.itemOpts) === null || _item$itemOpts3 === void 0 ? void 0 : _item$itemOpts3.items) !== null && _item$itemOpts$items2 !== void 0 ? _item$itemOpts$items2 : [], openedDrilldowns, callback);
|
|
34
36
|
} else {
|
|
35
37
|
var _item$itemOpts4;
|
|
36
38
|
|
|
@@ -42,37 +44,37 @@ var walkItems = function walkItems(items, openedDrilldowns, callback) {
|
|
|
42
44
|
});
|
|
43
45
|
};
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
var itemsArray = _toConsumableArray__default['default'](bodyItems);
|
|
47
|
+
const useLeftNavItems = props => {
|
|
48
|
+
const {
|
|
49
|
+
headerItem,
|
|
50
|
+
bodyHeaderItem,
|
|
51
|
+
items: bodyItems,
|
|
52
|
+
openedDrilldowns
|
|
53
|
+
} = props; // Place the header and body header items into the array of items
|
|
53
54
|
|
|
55
|
+
const items = React.useMemo(() => {
|
|
56
|
+
const itemsArray = [...bodyItems];
|
|
54
57
|
if (bodyHeaderItem) itemsArray.unshift(bodyHeaderItem);
|
|
55
58
|
if (headerItem) itemsArray.unshift(headerItem);
|
|
56
59
|
return itemsArray;
|
|
57
60
|
}, [headerItem, bodyHeaderItem, bodyItems]);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
walkItems(items, openedDrilldowns,
|
|
61
|
+
const visibleItemsRefs = React.useRef({});
|
|
62
|
+
const visibleItems = React.useMemo(() => {
|
|
63
|
+
const visibleItemsArray = [];
|
|
64
|
+
walkItems(items, openedDrilldowns, dsId => {
|
|
62
65
|
visibleItemsArray.push(dsId);
|
|
63
66
|
});
|
|
64
|
-
visibleItemsArray.push(
|
|
67
|
+
visibleItemsArray.push(constants.FOOTER_DS_ID);
|
|
65
68
|
return visibleItemsArray;
|
|
66
69
|
}, [items, openedDrilldowns]);
|
|
67
|
-
visibleItems.forEach(
|
|
70
|
+
visibleItems.forEach(dsId => {
|
|
68
71
|
if (!(dsId in visibleItemsRefs.current)) visibleItemsRefs.current[dsId] = /*#__PURE__*/React.createRef();
|
|
69
72
|
});
|
|
70
73
|
return {
|
|
71
|
-
visibleItems
|
|
72
|
-
visibleItemsRefs
|
|
74
|
+
visibleItems,
|
|
75
|
+
visibleItemsRefs
|
|
73
76
|
};
|
|
74
77
|
};
|
|
75
78
|
|
|
76
|
-
exports[
|
|
79
|
+
exports["default"] = useLeftNavItems;
|
|
77
80
|
exports.useLeftNavItems = useLeftNavItems;
|
|
78
|
-
//# sourceMappingURL=useLeftNavItems.js.map
|
|
@@ -8,28 +8,25 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
8
8
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
const useLeftNavSmoothExpand = (props, smoothExpandOpts) => {
|
|
12
|
+
const {
|
|
13
|
+
expanded
|
|
14
|
+
} = props;
|
|
15
|
+
const {
|
|
16
|
+
expandedForAnimation,
|
|
17
|
+
timeoutRef,
|
|
18
|
+
setExpandedForAnimation
|
|
19
|
+
} = smoothExpandOpts;
|
|
20
|
+
React__default["default"].useEffect(() => {
|
|
17
21
|
// If expanded changes, we need to smoothly transition to the non-expanded state
|
|
18
22
|
// so we need to wait for 350ms
|
|
19
23
|
if (!expanded && expandedForAnimation) {
|
|
20
24
|
clearTimeout(timeoutRef.current);
|
|
21
|
-
timeoutRef.current = setTimeout(
|
|
22
|
-
return setExpandedForAnimation(false);
|
|
23
|
-
}, 350);
|
|
25
|
+
timeoutRef.current = setTimeout(() => setExpandedForAnimation(false), 350);
|
|
24
26
|
} else if (expanded) setExpandedForAnimation(true);
|
|
25
27
|
}, [expanded]);
|
|
26
|
-
React__default[
|
|
27
|
-
return function () {
|
|
28
|
-
return clearTimeout(timeoutRef.current);
|
|
29
|
-
};
|
|
30
|
-
}, []);
|
|
28
|
+
React__default["default"].useEffect(() => () => clearTimeout(timeoutRef.current), []);
|
|
31
29
|
};
|
|
32
30
|
|
|
33
|
-
exports[
|
|
31
|
+
exports["default"] = useLeftNavSmoothExpand;
|
|
34
32
|
exports.useLeftNavSmoothExpand = useLeftNavSmoothExpand;
|
|
35
|
-
//# sourceMappingURL=useLeftNavSmoothExpand.js.map
|
|
@@ -2,22 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
11
|
+
require('react');
|
|
7
12
|
var dsIcons = require('@elliemae/ds-icons');
|
|
13
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
14
|
|
|
9
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
16
|
|
|
11
|
-
var
|
|
12
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
13
18
|
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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; }
|
|
20
|
+
|
|
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__default["default"](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; }
|
|
22
|
+
const ChevronItem = props => /*#__PURE__*/jsxRuntime.jsx(dsIcons.ChevronSmallRight, _objectSpread({
|
|
23
|
+
size: "m",
|
|
24
|
+
color: ['brand-primary', 800]
|
|
25
|
+
}, props));
|
|
20
26
|
|
|
21
27
|
exports.ChevronItem = ChevronItem;
|
|
22
|
-
exports[
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
|
28
|
+
exports["default"] = ChevronItem;
|