@elliemae/ds-left-navigation 3.3.0-next.4 → 3.3.0-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/exported-related/ChevronItem/index.js +4 -17
- package/dist/cjs/exported-related/ChevronItem/index.js.map +1 -1
- package/dist/cjs/exported-related/Icon/index.js +4 -17
- package/dist/cjs/exported-related/Icon/index.js.map +1 -1
- package/dist/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +9 -26
- package/dist/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +1 -1
- package/dist/cjs/exported-related/OpenWindowItem/index.js +4 -17
- package/dist/cjs/exported-related/OpenWindowItem/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js +11 -26
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemHeader/index.js +7 -23
- package/dist/cjs/outOfTheBox/ItemHeader/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemLink/index.js +7 -23
- package/dist/cjs/outOfTheBox/ItemLink/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemSection/index.js +4 -20
- package/dist/cjs/outOfTheBox/ItemSection/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemSeparator/index.js +6 -21
- package/dist/cjs/outOfTheBox/ItemSeparator/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js +6 -21
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js +3 -19
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +11 -26
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js +3 -19
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js.map +1 -1
- package/dist/cjs/parts/OutOfTheBoxMapItem.js +1 -15
- package/dist/cjs/parts/OutOfTheBoxMapItem.js.map +1 -1
- package/dist/esm/exported-related/ChevronItem/index.js +4 -19
- package/dist/esm/exported-related/ChevronItem/index.js.map +1 -1
- package/dist/esm/exported-related/Icon/index.js +4 -19
- package/dist/esm/exported-related/Icon/index.js.map +1 -1
- package/dist/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +9 -28
- package/dist/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +1 -1
- package/dist/esm/exported-related/OpenWindowItem/index.js +4 -19
- package/dist/esm/exported-related/OpenWindowItem/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js +11 -28
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemHeader/index.js +7 -25
- package/dist/esm/outOfTheBox/ItemHeader/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemLink/index.js +7 -25
- package/dist/esm/outOfTheBox/ItemLink/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemSection/index.js +4 -22
- package/dist/esm/outOfTheBox/ItemSection/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemSeparator/index.js +6 -23
- package/dist/esm/outOfTheBox/ItemSeparator/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js +6 -23
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js +3 -21
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +11 -28
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemWithDate/index.js +3 -21
- package/dist/esm/outOfTheBox/ItemWithDate/index.js.map +1 -1
- package/dist/esm/parts/OutOfTheBoxMapItem.js +1 -17
- package/dist/esm/parts/OutOfTheBoxMapItem.js.map +1 -1
- package/package.json +8 -8
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemSubmenu/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledLabel, StyledChevronLeft } from './styled';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: any) =>\n `\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : 'transparent'};\n\n :hover {\n box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : theme.colors.brand[300]};\n }\n\n :active {\n box-shadow: inset 4px 0 0 0 ${theme.colors.brand[400]};\n }\n`;\n\nexport const ItemSubmenu = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, BottomComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { openedItem, labelOverflow: leftNavLabelOverflow, onItemClick },\n expandedForAnimation,\n selectedItem,\n selectedParent,\n setFocusedItem,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const isSelected = selectedItem === dsId;\n\n const shadowStyle = useCallback(\n (opened) => (theme: any) =>\n !opened ? notOpenedShadowStyle(isSelected || selectedParent === dsId)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [dsId, isSelected, openedItem, selectedParent],\n );\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? label : 'menuitem');\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ...item.itemOpts,\n ariaLabel,\n ariaExpanded: opened,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n shadowStyle={shadowStyle}\n hasBorderBottom={opened}\n borderBottomMr=\"12px\"\n >\n <Grid\n cols={opened ? ['auto', 'auto'] : ['38px']}\n gutter=\"1px\"\n pl={opened ? 'xxs' : 0}\n justifyItems=\"center\"\n data-testid=\"leftnav-leftcomponent\"\n >\n {opened && (\n <StyledChevronLeft\n size=\"m\"\n color={['brand-primary', 800]}\n onClick={(e) => {\n onItemClick(item, e);\n }}\n data-testid=\"leftnav-leftcomponent-chevron\"\n tabIndex={0}\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n role=\"button\"\n aria-label={`Close ${ariaLabel}`}\n />\n )}\n <CollapsedComponent item={item} ctx={ctx} />\n </Grid>\n <StyledLabel\n ml={opened ? 'xxs' : '1px'}\n mt=\"xxxs\"\n mb=\"15px\"\n data-testid={labelDataTestId || 'leftnav-itemlabel'}\n labelOverflow={labelOverflow}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n <Grid\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(null);\n }}\n onKeyDown={(e) => e.stopPropagation()}\n onClick={(e) => (openedItem === dsId) && e.stopPropagation()}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n {BottomComponent && (\n <Grid\n style={{ gridColumn: 'span 3' }}\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e) => {\n e.stopPropagation();\n setFocusedItem(null);\n }}\n onKeyDown={(e) => e.stopPropagation()}\n onClick={(e) => openedItem && e.stopPropagation()}\n >\n <BottomComponent ctx={ctx} item={item} />\n </Grid>\n )}\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAmC;AACnC,qBAAiB;AACjB,uCAA2C;AAC3C,8BAA6B;AAE7B,oBAA+C;AAC/C,uBAAmC;AAGnC,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,OAAO;AAAA;AAAA;AAAA,kCAGrC,aAAa,MAAM,OAAO,MAAM,OAAO,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA,kCAI1D,MAAM,OAAO,MAAM;AAAA;AAAA;AAI9C,MAAM,cAAc,CAAC,UAAuC;AACjE,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,OAAO,gBAAgB,iBAAiB,iBAAiB,eAAe;AAAA,MACpF,qBAAqB,MAAM;AAAA;AAAA,IAE7B;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,YAAY,eAAe,sBAAsB;AAAA,MACjE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,MAEA;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,QAAM,SAAS,eAAe;AAE9B,QAAM,aAAa,iBAAiB;AAEpC,QAAM,cAAc,8BAClB,CAAC,YAAW,CAAC,UACX,CAAC,UAAS,qBAAqB,cAAc,mBAAmB,IAAI,EAAE,KAAK,IAAI,uCACjF,CAAC,MAAM,YAAY,YAAY,cAAc,CAC/C;AAEA,QAAM,YAAY,KAAK,SAAS,aAAc,QAAO,UAAU,WAAW,QAAQ;AAElF,SAC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,EAAE,gBAAgB;AAAA,IAC3D,eAAY;AAAA,KAEX,kBAAkB,mDAAC;AAAA,IAAe;AAAA,IAAU;AAAA,GAAY,CAC3D,GACC,mBACC,mDAAC;AAAA,IACC,OAAO,EAAE,YAAY,SAAS;AAAA,IAC9B,IAAG;AAAA,IACH,IAAG;AAAA,IACH,IAAG;AAAA,IACH,SAAS,CAAC,MAAM;AACd,QAAE,gBAAgB;AAClB,qBAAe,IAAI;AAAA,IACrB;AAAA,IACA,WAAW,CAAC,MAAM,EAAE,gBAAgB;AAAA,IACpC,SAAS,CAAC,MAAM,cAAc,EAAE,gBAAgB;AAAA,KAEhD,mDAAC;AAAA,IAAgB;AAAA,IAAU;AAAA,GAAY,CACzC,CAEJ;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
8
|
var __export = (target, all) => {
|
|
26
9
|
for (var name in all)
|
|
27
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -58,9 +41,10 @@ const ItemTextLabel = (props) => {
|
|
|
58
41
|
} = props;
|
|
59
42
|
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
60
43
|
return /* @__PURE__ */ import_react.default.createElement(import_exported_related.ItemRenderer, {
|
|
61
|
-
item:
|
|
44
|
+
item: {
|
|
45
|
+
...item,
|
|
62
46
|
CollapsedComponent: null
|
|
63
|
-
}
|
|
47
|
+
},
|
|
64
48
|
minHeight: "32px",
|
|
65
49
|
paddingTop: "8px"
|
|
66
50
|
}, " ", /* @__PURE__ */ import_react.default.createElement("div", null), /* @__PURE__ */ import_react.default.createElement(import_styled.StyledLabel, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemTextLabel/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledLabel } from './styled';\n\nexport const ItemTextLabel = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: { label, labelOverflow: itemLabelOverflow, labelBold, labelColor, labelDataTestId },\n },\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n return (\n <ItemRenderer\n item={{\n ...item,\n CollapsedComponent: null,\n }}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n {/* Empty LeftComponent */} <div />\n <StyledLabel\n data-testid={labelDataTestId || 'leftnav-list-item-label'}\n pl=\"24px\"\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n mr=\"xxs2\"\n pb=\"xxxs\"\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,uCAA2C;AAC3C,8BAA6B;AAE7B,oBAA4B;AAErB,MAAM,gBAAgB,CAAC,UAAuC;AACnE,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ,UAAU,EAAE,OAAO,eAAe,mBAAmB,WAAW,YAAY;AAAA;AAAA,IAE9E,KAAK;AAAA,MACH,cAAc,EAAE,eAAe;AAAA;AAAA,MAE/B;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,SACE,mDAAC;AAAA,IACC,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,oBAAoB;AAAA,IACtB;AAAA,IACA,WAAU;AAAA,IACV,YAAW;AAAA,KAEgB,KAAC,mDAAC,WAAI,GACjC,mDAAC;AAAA,IACC,eAAa,mBAAmB;AAAA,IAChC,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA,IAAG;AAAA,IACH,IAAG;AAAA,KAEF,kBAAkB,aAAa,mDAAC;AAAA,IAA2B,OAAO;AAAA,IAAO,WAAU;AAAA,GAAe,IAAK,KAC1G,CACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
8
|
var __export = (target, all) => {
|
|
26
9
|
for (var name in all)
|
|
27
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -65,9 +48,10 @@ const OutOfTheBoxMapSubitem = (props) => {
|
|
|
65
48
|
if (typeof type === "string" && !!outOfTheBoxSubitemsComponents[type]) {
|
|
66
49
|
const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];
|
|
67
50
|
const currentIndent = item.itemOpts?.indent ?? 0;
|
|
68
|
-
const newItem =
|
|
69
|
-
|
|
70
|
-
|
|
51
|
+
const newItem = {
|
|
52
|
+
...item,
|
|
53
|
+
itemOpts: { ...item.itemOpts, indent: currentIndent + 44 }
|
|
54
|
+
};
|
|
71
55
|
return /* @__PURE__ */ import_react.default.createElement(OutOfTheBoxComponent, {
|
|
72
56
|
item: newItem,
|
|
73
57
|
ctx
|
|
@@ -132,16 +116,17 @@ const ItemUncontrolledDrilldown = (props) => {
|
|
|
132
116
|
setOpenedDrilldowns([...openedDrilldowns, dsId]);
|
|
133
117
|
}, [opened, setOpenedDrilldowns, openedDrilldowns]);
|
|
134
118
|
return /* @__PURE__ */ import_react.default.createElement(import_exported_related.ItemRenderer, {
|
|
135
|
-
item:
|
|
136
|
-
|
|
119
|
+
item: {
|
|
120
|
+
...item,
|
|
121
|
+
itemOpts: {
|
|
137
122
|
ariaExpanded: opened,
|
|
138
|
-
ariaRole: "menuitem"
|
|
139
|
-
|
|
123
|
+
ariaRole: "menuitem",
|
|
124
|
+
...item.itemOpts,
|
|
140
125
|
openable: !opened,
|
|
141
126
|
closable: opened
|
|
142
|
-
}
|
|
127
|
+
},
|
|
143
128
|
CollapsedComponent: null
|
|
144
|
-
}
|
|
129
|
+
},
|
|
145
130
|
subitems,
|
|
146
131
|
minHeight: "32px",
|
|
147
132
|
paddingTop: "8px",
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemUncontrolledDrilldown/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useMemo, useCallback, useEffect } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { ItemRenderer, ITEM_TYPES } from '../../exported-related/index';\nimport { StyledLabel, StyledDate } from './styled';\nimport { ItemSeparator } from '../ItemSeparator';\nimport { ItemWithDate } from '../ItemWithDate';\nimport { ItemTextLabel } from '../ItemTextLabel';\nimport type { ComponentProps } from '../../index.d';\n\n// Subitem mapping\nconst outOfTheBoxSubitemsComponents: Record<string, React.ComponentType<ComponentProps>> = {\n [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n [ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n};\n\nconst OutOfTheBoxMapSubitem = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: { type, Component },\n ctx,\n } = props;\n\n if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];\n const currentIndent = item.itemOpts?.indent ?? 0;\n const newItem = {\n ...item,\n itemOpts: { ...item.itemOpts, indent: currentIndent + 44 },\n };\n return <OutOfTheBoxComponent item={newItem} ctx={ctx} />;\n }\n // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n\nexport const ItemUncontrolledDrilldown = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n startOpened,\n items,\n labelDataTestId,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n openedDrilldowns,\n setOpenedDrilldowns,\n },\n } = props;\n\n // Start opened functionality\n useEffect(() => {\n if (startOpened) setOpenedDrilldowns([...openedDrilldowns, dsId]);\n }, []);\n\n const opened = openedDrilldowns.includes(dsId);\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const arrowIcon = useMemo(() => {\n const Component = opened ? ArrowheadDown : ArrowheadRight;\n return <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />;\n }, [opened]);\n\n // Array of subitems\n const subitems = useMemo(() => {\n if (!opened || !items) return [];\n return items.map((subitem) => <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />);\n }, [items, opened]);\n\n const handleOnClick = useCallback(() => {\n if (opened) setOpenedDrilldowns(openedDrilldowns.filter((openedDrilldown) => openedDrilldown !== dsId));\n else setOpenedDrilldowns([...openedDrilldowns, dsId]);\n }, [opened, setOpenedDrilldowns, openedDrilldowns]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: opened,\n ariaRole: 'menuitem',\n ...item.itemOpts,\n openable: !opened,\n closable: opened,\n },\n CollapsedComponent: null,\n }}\n subitems={subitems}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n onClick={handleOnClick}\n >\n <Grid pl=\"xxs\" mt=\"-2px\">\n {arrowIcon}\n </Grid>\n <StyledLabel\n pb=\"xxxs\"\n data-testid={labelDataTestId || 'leftnav-list-item-label'}\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n <Grid pr=\"xxs2\" cols={['auto', 'auto']} alignItems=\"center\">\n <StyledDate ml=\"xxs\" data-testid=\"leftnav-list-item-date\">\n {labelRightSection}\n </StyledDate>\n <Grid pl={RightComponent ? 'xxs' : '0px'}>{RightComponent && <RightComponent ctx={ctx} item={item} />}</Grid>\n </Grid>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAuD;AACvD,qBAAiB;AACjB,uCAA2C;AAC3C,sBAA8C;AAC9C,8BAAyC;AACzC,oBAAwC;AACxC,2BAA8B;AAC9B,0BAA6B;AAC7B,2BAA8B;AAI9B,MAAM,gCAAqF;AAAA,EACzF,CAAC,mCAAW,0BAA0B;AAAA,EACtC,CAAC,mCAAW,0BAA0B;AAAA,E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AU;AAAA,GAAY,CAAG,CACxG,CACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
8
|
var __export = (target, all) => {
|
|
26
9
|
for (var name in all)
|
|
27
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -68,9 +51,10 @@ const ItemWithDate = (props) => {
|
|
|
68
51
|
} = props;
|
|
69
52
|
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
70
53
|
return /* @__PURE__ */ import_react.default.createElement(import_exported_related.ItemRenderer, {
|
|
71
|
-
item:
|
|
54
|
+
item: {
|
|
55
|
+
...item,
|
|
72
56
|
CollapsedComponent: null
|
|
73
|
-
}
|
|
57
|
+
},
|
|
74
58
|
minHeight: "32px",
|
|
75
59
|
paddingTop: "8px"
|
|
76
60
|
}, " ", /* @__PURE__ */ import_react.default.createElement("div", null), /* @__PURE__ */ import_react.default.createElement(import_styled.StyledLabel, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemWithDate/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledLabel, StyledDate } from './styled';\n\nexport const ItemWithDate = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n labelDataTestId,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n return (\n <ItemRenderer\n item={{\n ...item,\n CollapsedComponent: null,\n }}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n {/* Empty LeftComponent */} <div />\n <StyledLabel\n pl=\"xxs\"\n pb=\"xxxs\"\n data-testid={labelDataTestId || 'leftnav-list-item-label'}\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n <Grid pr=\"xxs2\" cols={['auto', 'auto']} alignItems=\"center\">\n <StyledDate ml=\"xxs\" data-testid=\"leftnav-list-item-date\">\n {labelRightSection}\n </StyledDate>\n <Grid pl={RightComponent ? 'xxs' : '0px'} data-testid=\"leftnav-right-component\">\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </Grid>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,qBAAiB;AACjB,uCAA2C;AAC3C,8BAA6B;AAE7B,oBAAwC;AAEjC,MAAM,eAAe,CAAC,UAAuC;AAClE,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ,UAAU;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA,IAGJ;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,eAAe;AAAA;AAAA,MAE/B;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,SACE,mDAAC;AAAA,IACC,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,oBAAoB;AAAA,IACtB;AAAA,IACA,WAAU;AAAA,IACV,YAAW;AAAA,KAEgB,KAAC,mDAAC,WAAI,GACjC,mDAAC;AAAA,IACC,IAAG;AAAA,IACH,IAAG;AAAA,IACH,eAAa,mBAAmB;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,KAEC,kBAAkB,aAAa,mDAAC;AAAA,IAA2B,OAAO;AAAA,IAAO,WAAU;AAAA,GAAe,IAAK,KAC1G,GACA,mDAAC;AAAA,IAAK,IAAG;AAAA,IAAO,MAAM,CAAC,QAAQ,MAAM;AAAA,IAAG,YAAW;AAAA,KACjD,mDAAC;AAAA,IAAW,IAAG;AAAA,IAAM,eAAY;AAAA,KAC9B,iBACH,GACA,mDAAC;AAAA,IAAK,IAAI,iBAAiB,QAAQ;AAAA,IAAO,eAAY;AAAA,KACnD,kBAAkB,mDAAC;AAAA,IAAe;AAAA,IAAU;AAAA,GAAY,CAC3D,CACF,CACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,22 +3,8 @@ var __create = Object.create;
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
-
var __spreadValues = (a, b) => {
|
|
12
|
-
for (var prop in b || (b = {}))
|
|
13
|
-
if (__hasOwnProp.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
if (__getOwnPropSymbols)
|
|
16
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
-
if (__propIsEnum.call(b, prop))
|
|
18
|
-
__defNormalProp(a, prop, b[prop]);
|
|
19
|
-
}
|
|
20
|
-
return a;
|
|
21
|
-
};
|
|
22
8
|
var __export = (target, all) => {
|
|
23
9
|
for (var name in all)
|
|
24
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -51,7 +37,7 @@ const OutOfTheBoxMapItem = (props) => {
|
|
|
51
37
|
if (typeof type === "string" && !!import_outOfTheBox.outOfTheBoxComponents[type]) {
|
|
52
38
|
const OutOfTheBoxComponent = import_outOfTheBox.outOfTheBoxComponents[type];
|
|
53
39
|
return /* @__PURE__ */ import_react.default.createElement(OutOfTheBoxComponent, {
|
|
54
|
-
item:
|
|
40
|
+
item: { itemOpts: {}, ...item },
|
|
55
41
|
ctx
|
|
56
42
|
});
|
|
57
43
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/OutOfTheBoxMapItem.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\nimport { outOfTheBoxComponents } from '../outOfTheBox';\nimport { OutOfTheBoxMapItemT } from '../index.d';\nimport { LeftNavContext } from '../LeftNavigationContext';\n\nexport const OutOfTheBoxMapItem = (props: OutOfTheBoxMapItemT): JSX.Element => {\n const {\n item,\n item: { type, Component },\n } = props;\n const ctx = React.useContext(LeftNavContext);\n\n if (typeof type === 'string' && !!outOfTheBoxComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxComponents[type];\n return <OutOfTheBoxComponent item={{ itemOpts: {}, ...item }} ctx={ctx} />;\n }\n // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,yBAAsC;AAEtC,mCAA+B;AAExB,MAAM,qBAAqB,CAAC,UAA4C;AAC7E,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM;AAAA,MACZ;AACJ,QAAM,MAAM,qBAAM,WAAW,2CAAc;AAE3C,MAAI,OAAO,SAAS,YAAY,CAAC,CAAC,yCAAsB,OAAO;AAC7D,UAAM,uBAAuB,yCAAsB;AACnD,WAAO,mDAAC;AAAA,MAAqB,MAAM,EAAE,UAAU,CAAC,GAAG,GAAG,KAAK;AAAA,MAAG;AAAA,KAAU;AAAA,EAC1E;AAEA,SAAO,mDAAC;AAAA,IAAU;AAAA,IAAY;AAAA,GAAU;AAC1C;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,27 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
6
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
-
var __spreadValues = (a, b) => {
|
|
8
|
-
for (var prop in b || (b = {}))
|
|
9
|
-
if (__hasOwnProp.call(b, prop))
|
|
10
|
-
__defNormalProp(a, prop, b[prop]);
|
|
11
|
-
if (__getOwnPropSymbols)
|
|
12
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
13
|
-
if (__propIsEnum.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
}
|
|
16
|
-
return a;
|
|
17
|
-
};
|
|
18
2
|
import * as React from "react";
|
|
19
3
|
import React2 from "react";
|
|
20
4
|
import { ChevronSmallRight } from "@elliemae/ds-icons";
|
|
21
|
-
const ChevronItem = (props) => /* @__PURE__ */ React2.createElement(ChevronSmallRight,
|
|
5
|
+
const ChevronItem = (props) => /* @__PURE__ */ React2.createElement(ChevronSmallRight, {
|
|
22
6
|
size: "m",
|
|
23
|
-
color: ["brand-primary", 800]
|
|
24
|
-
|
|
7
|
+
color: ["brand-primary", 800],
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
25
10
|
var ChevronItem_default = ChevronItem;
|
|
26
11
|
export {
|
|
27
12
|
ChevronItem,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/ChevronItem/index.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ChevronSmallRight } from '@elliemae/ds-icons';\n\nexport const ChevronItem = (props: unknown): JSX.Element => (\n <ChevronSmallRight size=\"m\" color={['brand-primary', 800]} {...props} />\n);\n\nexport default ChevronItem;\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA;ACAA;AACA;AAEO,MAAM,cAAc,CAAC,UAC1B,qCAAC;AAAA,EAAkB,MAAK;AAAA,EAAI,OAAO,CAAC,iBAAiB,GAAG;AAAA,EAAI,GAAG;AAAA,CAAO;AAGxE,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
6
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
-
var __spreadValues = (a, b) => {
|
|
8
|
-
for (var prop in b || (b = {}))
|
|
9
|
-
if (__hasOwnProp.call(b, prop))
|
|
10
|
-
__defNormalProp(a, prop, b[prop]);
|
|
11
|
-
if (__getOwnPropSymbols)
|
|
12
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
13
|
-
if (__propIsEnum.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
}
|
|
16
|
-
return a;
|
|
17
|
-
};
|
|
18
2
|
import * as React from "react";
|
|
19
3
|
import React2 from "react";
|
|
20
4
|
import { styled } from "@elliemae/ds-system";
|
|
@@ -29,10 +13,11 @@ const AugmentedIcon = (Icon2) => styled(Icon2)`
|
|
|
29
13
|
`;
|
|
30
14
|
const Icon = (IconComponent) => (props) => {
|
|
31
15
|
const StyledComponent = AugmentedIcon(IconComponent);
|
|
32
|
-
return /* @__PURE__ */ React2.createElement(StyledComponent,
|
|
16
|
+
return /* @__PURE__ */ React2.createElement(StyledComponent, {
|
|
33
17
|
color: ["brand-primary", 800],
|
|
34
|
-
tabIndex: 0
|
|
35
|
-
|
|
18
|
+
tabIndex: 0,
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
36
21
|
};
|
|
37
22
|
export {
|
|
38
23
|
Icon
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/Icon/index.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\n\nconst AugmentedIcon = (\n Icon: React.ComponentType<{ color: unknown; tabIndex: number }>,\n) => styled(Icon)`\n cursor: pointer;\n\n outline: 0;\n :focus,\n :active {\n outline: 1px solid #1e79c2;\n }\n`;\n\nexport const Icon = (\n IconComponent: React.ComponentType<{ color: unknown; tabIndex: number }>,\n) => (props: unknown): JSX.Element => {\n const StyledComponent = AugmentedIcon(IconComponent);\n return (\n <StyledComponent color={['brand-primary', 800]} tabIndex={0} {...props} />\n );\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA;ACAA;AACA;AAEA,MAAM,gBAAgB,CACpB,UACG,OAAO,KAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUT,MAAM,OAAO,CAClB,kBACG,CAAC,UAAgC;AACpC,QAAM,kBAAkB,cAAc,aAAa;AACnD,SACE,qCAAC;AAAA,IAAgB,OAAO,CAAC,iBAAiB,GAAG;AAAA,IAAG,UAAU;AAAA,IAAI,GAAG;AAAA,GAAO;AAE5E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
2
|
import * as React from "react";
|
|
22
3
|
import { useMemo } from "react";
|
|
23
4
|
const itemDefaultProps = {
|
|
@@ -36,21 +17,21 @@ const itemDefaultProps = {
|
|
|
36
17
|
const itemWithoutShadows = ["ds-left-nav-item-header", "ds-left-nav-item-link", "ds-left-nav-item-submenu"];
|
|
37
18
|
const usePropsWithDefaults = (props) => {
|
|
38
19
|
const propsWithDefault = useMemo(() => {
|
|
39
|
-
const itemWithDefaults =
|
|
40
|
-
CollapsedComponent: () => null
|
|
41
|
-
|
|
42
|
-
itemOpts:
|
|
43
|
-
}
|
|
44
|
-
return
|
|
20
|
+
const itemWithDefaults = {
|
|
21
|
+
CollapsedComponent: () => null,
|
|
22
|
+
...props.item,
|
|
23
|
+
itemOpts: { ...itemDefaultProps, ...props.item.itemOpts }
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
45
26
|
minHeight: "48px",
|
|
46
27
|
paddingTop: "12px",
|
|
47
28
|
subitems: [],
|
|
48
29
|
shadowStyle: (opened, type) => (theme) => `box-shadow: ${opened || !itemWithoutShadows.includes(type) ? "inset 4px 0 0 0 #52A6EC" : "inset 4px 0 0 0 white"}`,
|
|
49
30
|
hasBorderBottom: false,
|
|
50
|
-
borderBottomMr: "0px"
|
|
51
|
-
|
|
31
|
+
borderBottomMr: "0px",
|
|
32
|
+
...props,
|
|
52
33
|
item: itemWithDefaults
|
|
53
|
-
}
|
|
34
|
+
};
|
|
54
35
|
}, [props]);
|
|
55
36
|
return propsWithDefault;
|
|
56
37
|
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/ItemRenderer/usePropsWithDefaults.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useMemo } from 'react';\nimport { itemOptsT, ItemRendererT } from '../../index.d';\n\nconst itemDefaultProps: itemOptsT = {\n label: '',\n labelOverflow: 'truncate',\n selectable: true,\n focuseable: true,\n openable: false,\n closable: false,\n ariaLabel: '',\n ariaRole: 'menuitem',\n ariaLive: 'off',\n ariaExpanded: undefined,\n ariaDescribedBy: undefined,\n};\n\nconst itemWithoutShadows = ['ds-left-nav-item-header', 'ds-left-nav-item-link', 'ds-left-nav-item-submenu'];\n\n// Make use Item props with defaults\nexport const usePropsWithDefaults = (props: ItemRendererT): ItemRendererT => {\n const propsWithDefault = useMemo(() => {\n const itemWithDefaults = {\n CollapsedComponent: () => null,\n ...props.item,\n itemOpts: { ...itemDefaultProps, ...props.item.itemOpts },\n };\n return {\n minHeight: '48px',\n paddingTop: '12px',\n subitems: [],\n shadowStyle: (opened: boolean, type: string) => (theme: any) =>\n `box-shadow: ${\n opened || !itemWithoutShadows.includes(type) ? 'inset 4px 0 0 0 #52A6EC' : 'inset 4px 0 0 0 white'\n }`,\n hasBorderBottom: false,\n borderBottomMr: '0px',\n ...props,\n item: itemWithDefaults,\n };\n }, [props]);\n\n return propsWithDefault;\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA;ACAA;AAGA,MAAM,mBAA8B;AAAA,EAClC,OAAO;AAAA,EACP,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,iBAAiB;AACnB;AAEA,MAAM,qBAAqB,CAAC,2BAA2B,yBAAyB,0BAA0B;AAGnG,MAAM,uBAAuB,CAAC,UAAwC;AAC3E,QAAM,mBAAmB,QAAQ,MAAM;AACrC,UAAM,mBAAmB;AAAA,MACvB,oBAAoB,MAAM;AAAA,MAC1B,GAAG,MAAM;AAAA,MACT,UAAU,EAAE,GAAG,kBAAkB,GAAG,MAAM,KAAK,SAAS;AAAA,IAC1D;AACA,WAAO;AAAA,MACL,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,UAAU,CAAC;AAAA,MACX,aAAa,CAAC,QAAiB,SAAiB,CAAC,UAC/C,eACE,UAAU,CAAC,mBAAmB,SAAS,IAAI,IAAI,4BAA4B;AAAA,MAE/E,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,MAChB,GAAG;AAAA,MACH,MAAM;AAAA,IACR;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
6
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
-
var __spreadValues = (a, b) => {
|
|
8
|
-
for (var prop in b || (b = {}))
|
|
9
|
-
if (__hasOwnProp.call(b, prop))
|
|
10
|
-
__defNormalProp(a, prop, b[prop]);
|
|
11
|
-
if (__getOwnPropSymbols)
|
|
12
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
13
|
-
if (__propIsEnum.call(b, prop))
|
|
14
|
-
__defNormalProp(a, prop, b[prop]);
|
|
15
|
-
}
|
|
16
|
-
return a;
|
|
17
|
-
};
|
|
18
2
|
import * as React from "react";
|
|
19
3
|
import React2 from "react";
|
|
20
4
|
import { styled } from "@elliemae/ds-system";
|
|
@@ -25,10 +9,11 @@ const StyledOpenWindow = styled(OpenWindowIcon)`
|
|
|
25
9
|
outline: 1px solid ${(props) => props.theme.colors.brand[800]};
|
|
26
10
|
}
|
|
27
11
|
`;
|
|
28
|
-
const OpenWindow = (props) => /* @__PURE__ */ React2.createElement(StyledOpenWindow,
|
|
12
|
+
const OpenWindow = (props) => /* @__PURE__ */ React2.createElement(StyledOpenWindow, {
|
|
29
13
|
size: "s",
|
|
30
|
-
color: ["brand-primary", 800]
|
|
31
|
-
|
|
14
|
+
color: ["brand-primary", 800],
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
32
17
|
var OpenWindowItem_default = OpenWindow;
|
|
33
18
|
export {
|
|
34
19
|
OpenWindow,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/OpenWindowItem/index.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { OpenWindow as OpenWindowIcon } from '@elliemae/ds-icons';\n\nconst StyledOpenWindow = styled(OpenWindowIcon)`\n cursor: pointer;\n :focus {\n outline: 1px solid ${(props) => props.theme.colors.brand[800]};\n }\n`;\n\nexport const OpenWindow = (props: unknown): JSX.Element => (\n <StyledOpenWindow size=\"s\" color={['brand-primary', 800]} {...props} />\n);\n\nexport default OpenWindow;\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA;ACAA;AACA;AACA;AAEA,MAAM,mBAAmB,OAAO,cAAc;AAAA;AAAA;AAAA,yBAGrB,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAItD,MAAM,aAAa,CAAC,UACzB,qCAAC;AAAA,EAAiB,MAAK;AAAA,EAAI,OAAO,CAAC,iBAAiB,GAAG;AAAA,EAAI,GAAG;AAAA,CAAO;AAGvE,IAAO,yBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
2
|
import * as React from "react";
|
|
22
3
|
import React2, { useMemo } from "react";
|
|
23
4
|
import Grid from "@elliemae/ds-grid";
|
|
@@ -42,9 +23,10 @@ const OutOfTheBoxMapSubitem = (props) => {
|
|
|
42
23
|
if (typeof type === "string" && !!outOfTheBoxSubitemsComponents[type]) {
|
|
43
24
|
const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];
|
|
44
25
|
const currentIndent = item.itemOpts?.indent ?? 0;
|
|
45
|
-
const newItem =
|
|
46
|
-
|
|
47
|
-
|
|
26
|
+
const newItem = {
|
|
27
|
+
...item,
|
|
28
|
+
itemOpts: { ...item.itemOpts, indent: currentIndent + 44 }
|
|
29
|
+
};
|
|
48
30
|
return /* @__PURE__ */ React2.createElement(OutOfTheBoxComponent, {
|
|
49
31
|
item: newItem,
|
|
50
32
|
ctx
|
|
@@ -95,16 +77,17 @@ const ItemControlledDrilldown = (props) => {
|
|
|
95
77
|
}));
|
|
96
78
|
}, [items, isOpened]);
|
|
97
79
|
return /* @__PURE__ */ React2.createElement(ItemRenderer, {
|
|
98
|
-
item:
|
|
99
|
-
|
|
80
|
+
item: {
|
|
81
|
+
...item,
|
|
82
|
+
itemOpts: {
|
|
100
83
|
ariaExpanded: isOpened,
|
|
101
|
-
ariaRole: "menuitem"
|
|
102
|
-
|
|
84
|
+
ariaRole: "menuitem",
|
|
85
|
+
...item.itemOpts,
|
|
103
86
|
openable: !isOpened,
|
|
104
87
|
closable: isOpened
|
|
105
|
-
}
|
|
88
|
+
},
|
|
106
89
|
CollapsedComponent: null
|
|
107
|
-
}
|
|
90
|
+
},
|
|
108
91
|
subitems,
|
|
109
92
|
minHeight: "32px",
|
|
110
93
|
paddingTop: "8px"
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/outOfTheBox/ItemControlledDrilldown/index.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo } from 'react';\nimport Grid from '@elliemae/ds-grid';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';\nimport { ItemRenderer, ITEM_TYPES } from '../../exported-related/index';\nimport { StyledLabel, StyledDate } from './styled';\nimport { ItemSeparator } from '../ItemSeparator';\nimport { ItemWithDate } from '../ItemWithDate';\nimport { ItemTextLabel } from '../ItemTextLabel';\nimport type { ComponentProps } from '../../index.d';\n\nconst outOfTheBoxSubitemsComponents: Record<string, React.ComponentType<ComponentProps>> = {\n [ITEM_TYPES.LEFT_NAV_ITEM_SEPARATOR]: ItemSeparator,\n [ITEM_TYPES.LEFT_NAV_ITEM_WITH_DATE]: ItemWithDate,\n [ITEM_TYPES.LEFT_NAV_ITEM_TEXT_LABEL]: ItemTextLabel,\n};\n\nconst OutOfTheBoxMapSubitem = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: { type, Component },\n ctx,\n } = props;\n\n if (typeof type === 'string' && !!outOfTheBoxSubitemsComponents[type]) {\n const OutOfTheBoxComponent = outOfTheBoxSubitemsComponents[type];\n const currentIndent = item.itemOpts?.indent ?? 0;\n const newItem = {\n ...item,\n itemOpts: { ...item.itemOpts, indent: currentIndent + 44 },\n };\n return <OutOfTheBoxComponent item={newItem} ctx={ctx} />;\n }\n // we expect an error to be threw if Component is not defined and type is not a valid out-of-the-box...\n return <Component item={item} ctx={ctx} />;\n};\n\nexport const ItemControlledDrilldown = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: {\n label,\n RightComponent,\n labelRightSection,\n labelOverflow: itemLabelOverflow,\n labelBold,\n labelColor,\n isOpened,\n items,\n labelDataTestId,\n },\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const arrowIcon = useMemo(() => {\n const Component = isOpened ? ArrowheadDown : ArrowheadRight;\n return <Component width=\"24px\" height=\"18px\" color={['brand-primary', '800']} />;\n }, [isOpened]);\n\n const subitems = useMemo(() => {\n if (!isOpened || !items) return [];\n return items.map((subitem) => <OutOfTheBoxMapSubitem item={subitem} ctx={ctx} key={subitem.dsId} />);\n }, [items, isOpened]);\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaExpanded: isOpened,\n ariaRole: 'menuitem',\n ...item.itemOpts,\n openable: !isOpened,\n closable: isOpened,\n },\n CollapsedComponent: null,\n }}\n subitems={subitems}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n <Grid pl=\"xxs\" mt=\"-2px\">\n {arrowIcon}\n </Grid>\n <StyledLabel\n pb=\"xxxs\"\n data-testid={labelDataTestId || 'leftnav-list-item-label'}\n labelOverflow={labelOverflow}\n labelBold={labelBold}\n labelColor={labelColor}\n >\n {labelOverflow === 'truncate' ? <SimpleTruncatedTooltipText value={label} placement=\"bottom-start\" /> : label}\n </StyledLabel>\n <Grid pr=\"xxs2\" cols={['auto', 'auto']} alignItems=\"center\">\n <StyledDate ml=\"xxs\" data-testid=\"leftnav-list-item-date\">\n {labelRightSection}\n </StyledDate>\n <Grid pl={RightComponent ? 'xxs' : '0px'} data-testid=\"leftnav-right-component\">\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </Grid>\n </Grid>\n </ItemRenderer>\n );\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,MAAM,gCAAqF;AAAA,EACzF,CAAC,WAAW,0BAA0B;AAAA,EACtC,CAAC,WAAW,0BAA0B;AAAA,EACtC,CAAC,WAAW,2BAA2B;AACzC;AAEA,MAAM,wBAAwB,CAAC,UAAuC;AACpE,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM;AAAA,IACd;AAAA,MACE;AAEJ,MAAI,OAAO,SAAS,YAAY,CAAC,CAAC,8BAA8B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UAAU,CAAC;AAAA,QACX,UAAU;AAAA,MACZ;AAAA,MACA,oBAAoB;AAAA,IACtB;AAAA,IACA;AAAA,IACA,WAAU;AAAA,IACV,YAAW;AAAA,KAEX,qCAAC;AAAA,IAAK,IAAG;AAAA,IAAM,IAAG;AAAA,KACf,SACH,GACA,qCAAC;AAAA,IACC,IAAG;AAAA,IACH,eAAa,mBAAmB;AAAA,IAChC;AAAA,IACA;AAAA,IACA;AAAA,KAEC,kBAAkB,aAAa,qCAAC;AAAA,IAA2B,OAAO;AAAA,IAAO,WAAU;AAAA,GAAe,IAAK,KAC1G,GACA,qCAAC;AAAA,IAAK,IAAG;AAAA,IAAO,MAAM,CAAC,QAAQ,MAAM;AAAA,IAAG,YAAW;AAAA,KACjD,qCAAC;AAAA,IAAW,IAAG;AAAA,IAAM,eAAY;AAAA,KAC9B,iBACH,GACA,qCAAC;AAAA,IAAK,IAAI,iBAAiB,QAAQ;AAAA,IAAO,eAAY;AAAA,KACnD,kBAAkB,qCAAC;AAAA,IAAe;AAAA,IAAU;AAAA,GAAY,CAC3D,CACF,CACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
2
|
import * as React from "react";
|
|
22
3
|
import React2, { useCallback } from "react";
|
|
23
4
|
import Grid from "@elliemae/ds-grid";
|
|
@@ -59,16 +40,17 @@ const ItemHeader = (props) => {
|
|
|
59
40
|
const isSelected = selectedItem === dsId || selectedParent === dsId;
|
|
60
41
|
const shadowStyle = useCallback((opened2) => (theme) => !opened2 ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`, [isSelected, openedItem]);
|
|
61
42
|
return /* @__PURE__ */ React2.createElement(ItemRenderer, {
|
|
62
|
-
item:
|
|
63
|
-
|
|
43
|
+
item: {
|
|
44
|
+
...item,
|
|
45
|
+
itemOpts: {
|
|
64
46
|
ariaLabel,
|
|
65
|
-
ariaExpanded: opened
|
|
66
|
-
|
|
47
|
+
ariaExpanded: opened,
|
|
48
|
+
...item.itemOpts,
|
|
67
49
|
openable: expandedForAnimation && !opened,
|
|
68
50
|
closable: expandedForAnimation && opened,
|
|
69
51
|
selectable: !opened
|
|
70
|
-
}
|
|
71
|
-
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
72
54
|
hasBorderBottom: true,
|
|
73
55
|
borderBottomMr: opened ? "12px" : "0px",
|
|
74
56
|
shadowStyle
|