@elliemae/ds-left-navigation 3.11.0-next.2 → 3.11.0-next.4
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/LeftNavigationContext.js +2 -1
- package/dist/cjs/LeftNavigationContext.js.map +2 -2
- package/dist/cjs/common/getItemBackgroundStyle.js.map +2 -2
- package/dist/cjs/common/getLeftBorderStyle.js +1 -5
- package/dist/cjs/common/getLeftBorderStyle.js.map +2 -2
- package/dist/cjs/constants/constants.js +65 -0
- package/dist/cjs/constants/constants.js.map +7 -0
- package/dist/cjs/{outOfTheBox/ItemLink/styled.js → constants/index.js} +5 -17
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/exported-related/ItemRenderer/index.js +36 -44
- package/dist/cjs/exported-related/ItemRenderer/index.js.map +3 -3
- package/dist/cjs/exported-related/ItemRenderer/styled.js +24 -9
- package/dist/cjs/exported-related/ItemRenderer/styled.js.map +2 -2
- package/dist/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js +1 -1
- package/dist/cjs/exported-related/ItemRenderer/usePropsWithDefaults.js.map +2 -2
- package/dist/cjs/exported-related/Notifications/index.js +9 -5
- package/dist/cjs/exported-related/Notifications/index.js.map +2 -2
- package/dist/cjs/index.d.js.map +1 -1
- package/dist/cjs/index.js +7 -4
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js +11 -12
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemHeader/index.js +8 -10
- package/dist/cjs/outOfTheBox/ItemHeader/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemLink/index.js +8 -10
- package/dist/cjs/outOfTheBox/ItemLink/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemSection/index.js +4 -5
- package/dist/cjs/outOfTheBox/ItemSection/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemSeparator/index.js +2 -1
- package/dist/cjs/outOfTheBox/ItemSeparator/index.js.map +2 -2
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js +8 -9
- package/dist/cjs/outOfTheBox/ItemSubmenu/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js +1 -1
- package/dist/cjs/outOfTheBox/ItemTextLabel/index.js.map +1 -1
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js +12 -12
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js +7 -10
- package/dist/cjs/outOfTheBox/ItemWithDate/index.js.map +3 -3
- package/dist/cjs/outOfTheBox/styled.js +122 -0
- package/dist/cjs/outOfTheBox/styled.js.map +7 -0
- package/dist/cjs/parts/LeftNavContent/index.js +14 -7
- package/dist/cjs/parts/LeftNavContent/index.js.map +2 -2
- package/dist/cjs/parts/LeftNavContent/styled.js +32 -43
- package/dist/cjs/parts/LeftNavContent/styled.js.map +2 -2
- package/dist/cjs/parts/LeftNavFooterItem/index.js +54 -67
- package/dist/cjs/parts/LeftNavFooterItem/index.js.map +3 -3
- package/dist/cjs/parts/LeftNavFooterItem/styled.js +22 -15
- package/dist/cjs/parts/LeftNavFooterItem/styled.js.map +2 -2
- package/dist/cjs/parts/LeftNavLoading/index.js +2 -1
- package/dist/cjs/parts/LeftNavLoading/index.js.map +2 -2
- package/dist/cjs/parts/OutOfTheBoxMapItem.js +2 -0
- package/dist/cjs/parts/OutOfTheBoxMapItem.js.map +2 -2
- package/dist/cjs/prop-types.js +0 -1
- package/dist/cjs/prop-types.js.map +2 -2
- package/dist/esm/LeftNavigationContext.js +2 -1
- package/dist/esm/LeftNavigationContext.js.map +2 -2
- package/dist/esm/common/getItemBackgroundStyle.js.map +2 -2
- package/dist/esm/common/getLeftBorderStyle.js +1 -5
- package/dist/esm/common/getLeftBorderStyle.js.map +2 -2
- package/dist/esm/constants/constants.js +39 -0
- package/dist/esm/constants/constants.js.map +7 -0
- package/dist/esm/constants/index.js +3 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/exported-related/ItemRenderer/index.js +37 -45
- package/dist/esm/exported-related/ItemRenderer/index.js.map +2 -2
- package/dist/esm/exported-related/ItemRenderer/styled.js +24 -9
- package/dist/esm/exported-related/ItemRenderer/styled.js.map +2 -2
- package/dist/esm/exported-related/ItemRenderer/usePropsWithDefaults.js +1 -1
- package/dist/esm/exported-related/ItemRenderer/usePropsWithDefaults.js.map +2 -2
- package/dist/esm/exported-related/Notifications/index.js +9 -5
- package/dist/esm/exported-related/Notifications/index.js.map +2 -2
- package/dist/esm/index.js +6 -3
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js +11 -12
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemHeader/index.js +14 -10
- package/dist/esm/outOfTheBox/ItemHeader/index.js.map +3 -3
- package/dist/esm/outOfTheBox/ItemLink/index.js +8 -10
- package/dist/esm/outOfTheBox/ItemLink/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemSection/index.js +10 -5
- package/dist/esm/outOfTheBox/ItemSection/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemSeparator/index.js +2 -1
- package/dist/esm/outOfTheBox/ItemSeparator/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js +14 -9
- package/dist/esm/outOfTheBox/ItemSubmenu/index.js.map +3 -3
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js +1 -1
- package/dist/esm/outOfTheBox/ItemTextLabel/index.js.map +1 -1
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js +12 -12
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/index.js.map +2 -2
- package/dist/esm/outOfTheBox/ItemWithDate/index.js +7 -10
- package/dist/esm/outOfTheBox/ItemWithDate/index.js.map +2 -2
- package/dist/esm/outOfTheBox/styled.js +96 -0
- package/dist/esm/outOfTheBox/styled.js.map +7 -0
- package/dist/esm/parts/LeftNavContent/index.js +14 -8
- package/dist/esm/parts/LeftNavContent/index.js.map +2 -2
- package/dist/esm/parts/LeftNavContent/styled.js +33 -48
- package/dist/esm/parts/LeftNavContent/styled.js.map +2 -2
- package/dist/esm/parts/LeftNavFooterItem/index.js +57 -71
- package/dist/esm/parts/LeftNavFooterItem/index.js.map +2 -2
- package/dist/esm/parts/LeftNavFooterItem/styled.js +22 -15
- package/dist/esm/parts/LeftNavFooterItem/styled.js.map +2 -2
- package/dist/esm/parts/LeftNavLoading/index.js +2 -1
- package/dist/esm/parts/LeftNavLoading/index.js.map +2 -2
- package/dist/esm/parts/OutOfTheBoxMapItem.js +2 -0
- package/dist/esm/parts/OutOfTheBoxMapItem.js.map +2 -2
- package/dist/esm/prop-types.js +0 -1
- package/dist/esm/prop-types.js.map +2 -2
- package/package.json +8 -8
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/styled.js +0 -46
- package/dist/cjs/outOfTheBox/ItemControlledDrilldown/styled.js.map +0 -7
- package/dist/cjs/outOfTheBox/ItemHeader/styled.js +0 -46
- package/dist/cjs/outOfTheBox/ItemHeader/styled.js.map +0 -7
- package/dist/cjs/outOfTheBox/ItemLink/styled.js.map +0 -7
- package/dist/cjs/outOfTheBox/ItemSection/styled.js +0 -50
- package/dist/cjs/outOfTheBox/ItemSection/styled.js.map +0 -7
- package/dist/cjs/outOfTheBox/ItemSubmenu/styled.js +0 -46
- package/dist/cjs/outOfTheBox/ItemSubmenu/styled.js.map +0 -7
- package/dist/cjs/outOfTheBox/ItemTextLabel/styled.js +0 -40
- package/dist/cjs/outOfTheBox/ItemTextLabel/styled.js.map +0 -7
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js +0 -46
- package/dist/cjs/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +0 -7
- package/dist/cjs/outOfTheBox/ItemWithDate/styled.js +0 -46
- package/dist/cjs/outOfTheBox/ItemWithDate/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/styled.js +0 -20
- package/dist/esm/outOfTheBox/ItemControlledDrilldown/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemHeader/styled.js +0 -20
- package/dist/esm/outOfTheBox/ItemHeader/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemLink/styled.js +0 -12
- package/dist/esm/outOfTheBox/ItemLink/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemSection/styled.js +0 -24
- package/dist/esm/outOfTheBox/ItemSection/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemSubmenu/styled.js +0 -20
- package/dist/esm/outOfTheBox/ItemSubmenu/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemTextLabel/styled.js +0 -14
- package/dist/esm/outOfTheBox/ItemTextLabel/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js +0 -20
- package/dist/esm/outOfTheBox/ItemUncontrolledDrilldown/styled.js.map +0 -7
- package/dist/esm/outOfTheBox/ItemWithDate/styled.js +0 -20
- package/dist/esm/outOfTheBox/ItemWithDate/styled.js.map +0 -7
|
@@ -30,11 +30,10 @@ module.exports = __toCommonJS(ItemControlledDrilldown_exports);
|
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
32
|
var import_react = require("react");
|
|
33
|
-
var import_ds_grid = __toESM(require("@elliemae/ds-grid"));
|
|
34
33
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
35
34
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
36
35
|
var import_exported_related = require("../../exported-related/index");
|
|
37
|
-
var import_styled = require("
|
|
36
|
+
var import_styled = require("../styled");
|
|
38
37
|
var import_ItemSeparator = require("../ItemSeparator");
|
|
39
38
|
var import_ItemWithDate = require("../ItemWithDate");
|
|
40
39
|
var import_ItemTextLabel = require("../ItemTextLabel");
|
|
@@ -61,6 +60,8 @@ const OutOfTheBoxMapSubitem = (props) => {
|
|
|
61
60
|
ctx
|
|
62
61
|
});
|
|
63
62
|
}
|
|
63
|
+
if (!Component)
|
|
64
|
+
return null;
|
|
64
65
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {
|
|
65
66
|
item,
|
|
66
67
|
ctx
|
|
@@ -103,7 +104,7 @@ const ItemControlledDrilldown = (props) => {
|
|
|
103
104
|
item: subitem,
|
|
104
105
|
ctx
|
|
105
106
|
}, subitem.dsId));
|
|
106
|
-
}, [items,
|
|
107
|
+
}, [isOpened, items, ctx]);
|
|
107
108
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_exported_related.ItemRenderer, {
|
|
108
109
|
item: {
|
|
109
110
|
...item,
|
|
@@ -120,7 +121,7 @@ const ItemControlledDrilldown = (props) => {
|
|
|
120
121
|
minHeight: "32px",
|
|
121
122
|
paddingTop: "8px",
|
|
122
123
|
children: [
|
|
123
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
124
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledArrowContainer, {
|
|
124
125
|
pl: "xxs",
|
|
125
126
|
mt: "-2px",
|
|
126
127
|
children: arrowIcon
|
|
@@ -136,23 +137,21 @@ const ItemControlledDrilldown = (props) => {
|
|
|
136
137
|
placement: "bottom-start"
|
|
137
138
|
}) : label
|
|
138
139
|
}),
|
|
139
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
140
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledRightContainer, {
|
|
140
141
|
pr: "xxs2",
|
|
141
142
|
cols: ["auto", "auto"],
|
|
142
143
|
alignItems: "center",
|
|
144
|
+
gutter: "xxs",
|
|
145
|
+
"data-testid": "leftnav-right-component",
|
|
143
146
|
children: [
|
|
144
147
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledDate, {
|
|
145
148
|
ml: "xxs",
|
|
146
149
|
"data-testid": "leftnav-list-item-date",
|
|
147
150
|
children: labelRightSection
|
|
148
151
|
}),
|
|
149
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
children: RightComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RightComponent, {
|
|
153
|
-
ctx,
|
|
154
|
-
item
|
|
155
|
-
})
|
|
152
|
+
RightComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RightComponent, {
|
|
153
|
+
ctx,
|
|
154
|
+
item
|
|
156
155
|
})
|
|
157
156
|
]
|
|
158
157
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemControlledDrilldown/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useMemo } from 'react';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAAA,mBAA+B;AAC/B,
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react';\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, StyledArrowContainer, StyledRightContainer } 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: React.ComponentType<ComponentProps> = (props) => {\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 if (!Component) return null;\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 }, [isOpened, items, ctx]);\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 <StyledArrowContainer pl=\"xxs\" mt=\"-2px\">\n {arrowIcon}\n </StyledArrowContainer>\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 <StyledRightContainer\n pr=\"xxs2\"\n cols={['auto', 'auto']}\n alignItems=\"center\"\n gutter=\"xxs\"\n data-testid=\"leftnav-right-component\"\n >\n <StyledDate ml=\"xxs\" data-testid=\"leftnav-list-item-date\">\n {labelRightSection}\n </StyledDate>\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAAA,mBAA+B;AAC/B,uCAA2C;AAC3C,sBAA8C;AAC9C,8BAAyC;AACzC,oBAAoF;AACpF,2BAA8B;AAC9B,0BAA6B;AAC7B,2BAA8B;AAG9B,MAAM,gCAAqF;AAAA,EACzF,CAAC,mCAAW,0BAA0B;AAAA,EACtC,CAAC,mCAAW,0BAA0B;AAAA,EACtC,CAAC,mCAAW,2BAA2B;AACzC;AAEA,MAAM,wBAA6D,CAAC,UAAU;AAC5E,QAAM;AAAA,IACJ;AAAA,IACA,MAAM,EAAE,MAAM,UAAU;AAAA,IACxB;AAAA,EACF,IAAI;AAEJ,MAAI,OAAO,SAAS,YAAY,CAAC,CAAC,8BAA8B,OAAO;AACrE,UAAM,uBAAuB,8BAA8B;AAC3D,UAAM,gBAAgB,KAAK,UAAU,UAAU;AAC/C,UAAM,UAAU;AAAA,MACd,GAAG;AAAA,MACH,UAAU,EAAE,GAAG,KAAK,UAAU,QAAQ,gBAAgB,GAAG;AAAA,IAC3D;AACA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C;AAAA,QAAqB,IAAG;AAAA,QAAM,IAAG;AAAA,QAC/B;AAAA,OACH;AAAA,MACA,4CAAC;AAAA,QACC,IAAG;AAAA,QACH,eAAa,mBAAmB;AAAA,QAChC;AAAA,QACA;AAAA,QACA;AAAA,QAEC,4BAAkB,aAAa,4CAAC;AAAA,UAA2B,OAAO;AAAA,UAAO,WAAU;AAAA,SAAe,IAAK;AAAA,OAC1G;AAAA,MACA,6CAAC;AAAA,QACC,IAAG;AAAA,QACH,MAAM,CAAC,QAAQ,MAAM;AAAA,QACrB,YAAW;AAAA,QACX,QAAO;AAAA,QACP,eAAY;AAAA,QAEZ;AAAA,sDAAC;AAAA,YAAW,IAAG;AAAA,YAAM,eAAY;AAAA,YAC9B;AAAA,WACH;AAAA,UACC,kBAAkB,4CAAC;AAAA,YAAe;AAAA,YAAU;AAAA,WAAY;AAAA;AAAA,OAC3D;AAAA;AAAA,GACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -30,10 +30,9 @@ module.exports = __toCommonJS(ItemHeader_exports);
|
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
32
|
var import_react = require("react");
|
|
33
|
-
var import_ds_grid = __toESM(require("@elliemae/ds-grid"));
|
|
34
33
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
35
34
|
var import_exported_related = require("../../exported-related/index");
|
|
36
|
-
var import_styled = require("
|
|
35
|
+
var import_styled = require("../styled");
|
|
37
36
|
var import_constants = require("../../exported-related/constants");
|
|
38
37
|
const notOpenedShadowStyle = (isSelected) => (theme) => `
|
|
39
38
|
box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : "transparent"};
|
|
@@ -68,8 +67,8 @@ const ItemHeader = (props) => {
|
|
|
68
67
|
const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === "string" ? label : "menuitem");
|
|
69
68
|
const isSelected = selectedItem === dsId || selectedParent === dsId;
|
|
70
69
|
const shadowStyle = (0, import_react.useCallback)(
|
|
71
|
-
(
|
|
72
|
-
[isSelected
|
|
70
|
+
(opened_) => (theme) => !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,
|
|
71
|
+
[isSelected]
|
|
73
72
|
);
|
|
74
73
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_exported_related.ItemRenderer, {
|
|
75
74
|
item: {
|
|
@@ -87,7 +86,7 @@ const ItemHeader = (props) => {
|
|
|
87
86
|
borderBottomMr: opened ? "12px" : "0px",
|
|
88
87
|
shadowStyle,
|
|
89
88
|
children: [
|
|
90
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledLeftContainer, {
|
|
91
90
|
cols: opened ? ["auto", "auto"] : ["38px"],
|
|
92
91
|
gutter: "1px",
|
|
93
92
|
pl: opened ? "xxs" : 0,
|
|
@@ -109,13 +108,13 @@ const ItemHeader = (props) => {
|
|
|
109
108
|
role: "button",
|
|
110
109
|
"aria-label": `Close ${ariaLabel}`
|
|
111
110
|
}),
|
|
112
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsedComponent, {
|
|
111
|
+
CollapsedComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsedComponent, {
|
|
113
112
|
item,
|
|
114
113
|
ctx
|
|
115
114
|
})
|
|
116
115
|
]
|
|
117
116
|
}),
|
|
118
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.
|
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledItemLabel, {
|
|
119
118
|
ml: opened ? "xxs" : "1px",
|
|
120
119
|
mt: "xxxs",
|
|
121
120
|
mb: "15px",
|
|
@@ -126,7 +125,7 @@ const ItemHeader = (props) => {
|
|
|
126
125
|
placement: "bottom-start"
|
|
127
126
|
}) : label
|
|
128
127
|
}),
|
|
129
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledRightContainer, {
|
|
130
129
|
pl: "xs",
|
|
131
130
|
pr: opened ? "xxs2" : "xxs",
|
|
132
131
|
onFocus: (e) => {
|
|
@@ -140,8 +139,7 @@ const ItemHeader = (props) => {
|
|
|
140
139
|
item
|
|
141
140
|
})
|
|
142
141
|
}),
|
|
143
|
-
BottomComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
144
|
-
style: { gridColumn: "span 3" },
|
|
142
|
+
BottomComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledBottomContainer, {
|
|
145
143
|
pb: "xxxs",
|
|
146
144
|
pl: "xxs",
|
|
147
145
|
pr: "xxs",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemHeader/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAEA,mBAAmC;AACnC,
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport {\n StyledItemLabel,\n StyledChevronLeft,\n StyledBottomContainer,\n StyledLeftContainer,\n StyledRightContainer,\n} from '../styled';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\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 ItemHeader = (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 setFocusedItem,\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const opened = openedItem === dsId;\n\n const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === 'string' ? label : 'menuitem');\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel,\n ariaExpanded: opened,\n ...item.itemOpts,\n openable: expandedForAnimation && !opened,\n closable: expandedForAnimation && opened,\n selectable: !opened,\n },\n }}\n hasBorderBottom\n borderBottomMr={opened ? '12px' : '0px'}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer\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: React.MouseEvent<HTMLElement>) => {\n onItemClick(item, e);\n }}\n data-testid=\"leftnav-leftcomponent-chevron\"\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n role=\"button\"\n aria-label={`Close ${ariaLabel}`}\n />\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\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 </StyledItemLabel>\n <StyledRightContainer\n pl=\"xs\"\n pr={opened ? 'xxs2' : 'xxs'}\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\n pb=\"xxxs\"\n pl=\"xxs\"\n pr=\"xxs\"\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n >\n <BottomComponent ctx={ctx} item={item} />\n </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAEA,mBAAmC;AACnC,uCAA2C;AAE3C,8BAA6B;AAE7B,oBAMO;AACP,uBAAmC;AAEnC,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,MAAM,OAAO;AAAA;AAAA;AAAA,kCAGrC,aAAa,MAAM,OAAO,MAAM,OAAO,MAAM,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
|
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
32
|
var import_react = require("react");
|
|
33
|
-
var import_ds_grid = __toESM(require("@elliemae/ds-grid"));
|
|
34
33
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
35
34
|
var import_exported_related = require("../../exported-related/index");
|
|
36
|
-
var import_styled = require("
|
|
35
|
+
var import_styled = require("../styled");
|
|
37
36
|
const notOpenedShadowStyle = (isSelected) => (theme) => `
|
|
38
37
|
box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : "transparent"};
|
|
39
38
|
|
|
@@ -55,7 +54,7 @@ const ItemLink = (props) => {
|
|
|
55
54
|
},
|
|
56
55
|
ctx,
|
|
57
56
|
ctx: {
|
|
58
|
-
leftNavProps: { labelOverflow: leftNavLabelOverflow
|
|
57
|
+
leftNavProps: { labelOverflow: leftNavLabelOverflow },
|
|
59
58
|
selectedItem,
|
|
60
59
|
selectedParent
|
|
61
60
|
}
|
|
@@ -63,8 +62,8 @@ const ItemLink = (props) => {
|
|
|
63
62
|
const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;
|
|
64
63
|
const isSelected = selectedItem === dsId || selectedParent === dsId;
|
|
65
64
|
const shadowStyle = (0, import_react.useCallback)(
|
|
66
|
-
(
|
|
67
|
-
[isSelected
|
|
65
|
+
(opened_) => (theme) => !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,
|
|
66
|
+
[isSelected]
|
|
68
67
|
);
|
|
69
68
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_exported_related.ItemRenderer, {
|
|
70
69
|
item: {
|
|
@@ -78,18 +77,17 @@ const ItemLink = (props) => {
|
|
|
78
77
|
},
|
|
79
78
|
shadowStyle,
|
|
80
79
|
children: [
|
|
81
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledLeftContainer, {
|
|
82
81
|
cols: ["38px"],
|
|
83
82
|
gutter: "1px",
|
|
84
|
-
pl: 0,
|
|
85
83
|
justifyItems: "center",
|
|
86
84
|
"data-testid": "leftnav-leftcomponent",
|
|
87
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsedComponent, {
|
|
85
|
+
children: CollapsedComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsedComponent, {
|
|
88
86
|
item,
|
|
89
87
|
ctx
|
|
90
88
|
})
|
|
91
89
|
}),
|
|
92
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.
|
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledItemLabel, {
|
|
93
91
|
ml: "1px",
|
|
94
92
|
mt: "xxxs",
|
|
95
93
|
mb: "15px",
|
|
@@ -100,7 +98,7 @@ const ItemLink = (props) => {
|
|
|
100
98
|
placement: "bottom-start"
|
|
101
99
|
}) : label
|
|
102
100
|
}),
|
|
103
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledRightContainer, {
|
|
104
102
|
mt: "xxxs",
|
|
105
103
|
pr: "xxs2",
|
|
106
104
|
"data-testid": "leftnav-right-component",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemLink/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,mBAAmC;AACnC,
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { StyledItemLabel, StyledLeftContainer, StyledRightContainer } from '../styled';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\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 ItemLink = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n dsId,\n itemOpts: { label, RightComponent, labelDataTestId, labelOverflow: itemLabelOverflow },\n CollapsedComponent = () => null,\n },\n ctx,\n ctx: {\n leftNavProps: { labelOverflow: leftNavLabelOverflow },\n selectedItem,\n selectedParent,\n },\n } = props;\n\n const labelOverflow = itemLabelOverflow || leftNavLabelOverflow;\n\n const isSelected = selectedItem === dsId || selectedParent === dsId;\n\n const shadowStyle = useCallback(\n (opened_: boolean) => (theme: Theme) =>\n !opened_ ? notOpenedShadowStyle(isSelected)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [isSelected],\n );\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ariaLabel: typeof label === 'string' ? label : '',\n ariaRole: 'link',\n ...item.itemOpts,\n selectable: true,\n },\n }}\n shadowStyle={shadowStyle}\n >\n <StyledLeftContainer cols={['38px']} gutter=\"1px\" justifyItems=\"center\" data-testid=\"leftnav-leftcomponent\">\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\n ml=\"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 </StyledItemLabel>\n <StyledRightContainer mt=\"xxxs\" pr=\"xxs2\" data-testid=\"leftnav-right-component\">\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,mBAAmC;AACnC,uCAA2C;AAE3C,8BAA6B;AAE7B,oBAA2E;AAE3E,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,WAAW,CAAC,UAAuC;AAC9D,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA,UAAU,EAAE,OAAO,gBAAgB,iBAAiB,eAAe,kBAAkB;AAAA,MACrF,qBAAqB,MAAM;AAAA,IAC7B;AAAA,IACA;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,eAAe,qBAAqB;AAAA,MACpD;AAAA,MACA;AAAA,IACF;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,QAAM,aAAa,iBAAiB,QAAQ,mBAAmB;AAE/D,QAAM,kBAAc;AAAA,IAClB,CAAC,YAAqB,CAAC,UACrB,CAAC,UAAU,qBAAqB,UAAU,EAAE,KAAK,IAAI;AAAA,IACvD,CAAC,UAAU;AAAA,EACb;AAEA,SACE,6CAAC;AAAA,IACC,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,UAAU;AAAA,QACR,WAAW,OAAO,UAAU,WAAW,QAAQ;AAAA,QAC/C,UAAU;AAAA,QACV,GAAG,KAAK;AAAA,QACR,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IACA;AAAA,IAEA;AAAA,kDAAC;AAAA,QAAoB,MAAM,CAAC,MAAM;AAAA,QAAG,QAAO;AAAA,QAAM,cAAa;AAAA,QAAS,eAAY;AAAA,QACjF,gCAAsB,4CAAC;AAAA,UAAmB;AAAA,UAAY;AAAA,SAAU;AAAA,OACnE;AAAA,MACA,4CAAC;AAAA,QACC,IAAG;AAAA,QACH,IAAG;AAAA,QACH,IAAG;AAAA,QACH,eAAa,mBAAmB;AAAA,QAChC;AAAA,QAEC,4BAAkB,aAAa,4CAAC;AAAA,UAA2B,OAAO;AAAA,UAAO,WAAU;AAAA,SAAe,IAAK;AAAA,OAC1G;AAAA,MACA,4CAAC;AAAA,QAAqB,IAAG;AAAA,QAAO,IAAG;AAAA,QAAO,eAAY;AAAA,QACnD,4BAAkB,4CAAC;AAAA,UAAe;AAAA,UAAU;AAAA,SAAY;AAAA,OAC3D;AAAA;AAAA,GACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -29,9 +29,8 @@ __export(ItemSection_exports, {
|
|
|
29
29
|
module.exports = __toCommonJS(ItemSection_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
-
var import_ds_grid = __toESM(require("@elliemae/ds-grid"));
|
|
33
32
|
var import_exported_related = require("../../exported-related/index");
|
|
34
|
-
var import_styled = require("
|
|
33
|
+
var import_styled = require("../styled");
|
|
35
34
|
const ItemSection = (props) => {
|
|
36
35
|
const {
|
|
37
36
|
item,
|
|
@@ -50,7 +49,7 @@ const ItemSection = (props) => {
|
|
|
50
49
|
minHeight: "32px",
|
|
51
50
|
paddingTop: "8px",
|
|
52
51
|
children: [
|
|
53
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledSectionContainer, {
|
|
54
53
|
cols: ["min-content", "auto", "min-content", "auto"],
|
|
55
54
|
pl: "xxs",
|
|
56
55
|
alignItems: "center",
|
|
@@ -59,7 +58,7 @@ const ItemSection = (props) => {
|
|
|
59
58
|
ctx,
|
|
60
59
|
item
|
|
61
60
|
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}),
|
|
62
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledSectionLabel, {
|
|
63
62
|
"data-testid": labelDataTestId || "leftnav-section-item-label",
|
|
64
63
|
children: label
|
|
65
64
|
}),
|
|
@@ -69,7 +68,7 @@ const ItemSection = (props) => {
|
|
|
69
68
|
})
|
|
70
69
|
]
|
|
71
70
|
}),
|
|
72
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledRightContainer, {
|
|
73
72
|
ml: "auto",
|
|
74
73
|
onFocus: (e) => {
|
|
75
74
|
setFocusedItem(null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemSection/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport {\n StyledSectionLabel,\n StyledRightLabel,\n StyledVerticalSeparator,\n StyledRightContainer,\n StyledSectionContainer,\n} from '../styled';\n\nexport const ItemSection = (props: ComponentProps): JSX.Element => {\n const {\n item,\n item: {\n itemOpts: { label, LeftComponent, RightComponent, labelRightSection, labelDataTestId },\n },\n ctx,\n ctx: { setFocusedItem },\n } = props;\n\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: { ...item.itemOpts, selectable: false, focuseable: false },\n CollapsedComponent: null,\n }}\n minHeight=\"32px\"\n paddingTop=\"8px\"\n >\n <StyledSectionContainer cols={['min-content', 'auto', 'min-content', 'auto']} pl=\"xxs\" alignItems=\"center\">\n {LeftComponent ? <LeftComponent ctx={ctx} item={item} /> : <div />}\n <StyledSectionLabel data-testid={labelDataTestId || 'leftnav-section-item-label'}>{label}</StyledSectionLabel>\n <StyledVerticalSeparator />\n <StyledRightLabel>{labelRightSection}</StyledRightLabel>\n </StyledSectionContainer>\n <StyledRightContainer\n ml=\"auto\"\n onFocus={(e) => {\n setFocusedItem(null);\n e.stopPropagation();\n }}\n onKeyDown={(e) => e.stopPropagation()}\n pr=\"xxs2\"\n alignItems=\"center\"\n data-testid=\"leftnav-right-component\"\n >\n {RightComponent && <RightComponent ctx={ctx} item={item} />}\n </StyledRightContainer>\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,8BAA6B;AAE7B,oBAMO;AAEA,MAAM,cAAc,CAAC,UAAuC;AACjE,QAAM;AAAA,IACJ;AAAA,IACA,MAAM;AAAA,MACJ,UAAU,EAAE,OAAO,eAAe,gBAAgB,mBAAmB,gBAAgB;AAAA,IACvF;AAAA,IACA;AAAA,IACA,KAAK,EAAE,eAAe;AAAA,EACxB,IAAI;AAEJ,SACE,6CAAC;AAAA,IACC,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,UAAU,EAAE,GAAG,KAAK,UAAU,YAAY,OAAO,YAAY,MAAM;AAAA,MACnE,oBAAoB;AAAA,IACtB;AAAA,IACA,WAAU;AAAA,IACV,YAAW;AAAA,IAEX;AAAA,mDAAC;AAAA,QAAuB,MAAM,CAAC,eAAe,QAAQ,eAAe,MAAM;AAAA,QAAG,IAAG;AAAA,QAAM,YAAW;AAAA,QAC/F;AAAA,0BAAgB,4CAAC;AAAA,YAAc;AAAA,YAAU;AAAA,WAAY,IAAK,4CAAC,SAAI;AAAA,UAChE,4CAAC;AAAA,YAAmB,eAAa,mBAAmB;AAAA,YAA+B;AAAA,WAAM;AAAA,UACzF,4CAAC,yCAAwB;AAAA,UACzB,4CAAC;AAAA,YAAkB;AAAA,WAAkB;AAAA;AAAA,OACvC;AAAA,MACA,4CAAC;AAAA,QACC,IAAG;AAAA,QACH,SAAS,CAAC,MAAM;AACd,yBAAe,IAAI;AACnB,YAAE,gBAAgB;AAAA,QACpB;AAAA,QACA,WAAW,CAAC,MAAM,EAAE,gBAAgB;AAAA,QACpC,IAAG;AAAA,QACH,YAAW;AAAA,QACX,eAAY;AAAA,QAEX,4BAAkB,4CAAC;AAAA,UAAe;AAAA,UAAU;AAAA,SAAY;AAAA,OAC3D;AAAA;AAAA,GACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -31,7 +31,8 @@ var React = __toESM(require("react"));
|
|
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
32
|
var import_ds_system = require("@elliemae/ds-system");
|
|
33
33
|
var import_exported_related = require("../../exported-related/index");
|
|
34
|
-
|
|
34
|
+
var import_constants = require("../../constants");
|
|
35
|
+
const StyledSeparator = (0, import_ds_system.styled)("div", { name: import_constants.DSLeftNavigationName, slot: import_constants.DSLeftNavigationSlots.ITEM_SEPARATOR })`
|
|
35
36
|
height: 1px;
|
|
36
37
|
background-color: ${(props) => props.theme.colors.neutral[100]};
|
|
37
38
|
width: auto;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemSeparator/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\n\nconst StyledSeparator = styled.
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,uBAAuB;AACvB,8BAA6B;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport { DSLeftNavigationName, DSLeftNavigationSlots } from '../../constants';\nimport type { ComponentProps } from '../../index.d';\n\nconst StyledSeparator = styled('div', { name: DSLeftNavigationName, slot: DSLeftNavigationSlots.ITEM_SEPARATOR })`\n height: 1px;\n background-color: ${(props) => props.theme.colors.neutral[100]};\n width: auto;\n margin: ${(props) => props.theme.space.xxxs} 0;\n margin-left: ${(props) => props.theme.space.xxxs};\n grid-column: span 3;\n`;\n\nexport const ItemSeparator = (props: ComponentProps): JSX.Element => {\n const { item } = props;\n return (\n <ItemRenderer\n item={{\n ...item,\n itemOpts: {\n ...item.itemOpts,\n selectable: false,\n focuseable: false,\n },\n CollapsedComponent: null,\n }}\n minHeight=\"1px\"\n paddingTop=\"0px\"\n >\n <StyledSeparator data-testid=\"leftnav-separator-subitem\" />\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,uBAAuB;AACvB,8BAA6B;AAC7B,uBAA4D;AAG5D,MAAM,sBAAkB,yBAAO,OAAO,EAAE,MAAM,uCAAsB,MAAM,uCAAsB,eAAe,CAAC;AAAA;AAAA,sBAE1F,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA,YAEhD,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,iBACxB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAIvC,MAAM,gBAAgB,CAAC,UAAuC;AACnE,QAAM,EAAE,KAAK,IAAI;AACjB,SACE,4CAAC;AAAA,IACC,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,UAAU;AAAA,QACR,GAAG,KAAK;AAAA,QACR,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,MACA,oBAAoB;AAAA,IACtB;AAAA,IACA,WAAU;AAAA,IACV,YAAW;AAAA,IAEX,sDAAC;AAAA,MAAgB,eAAY;AAAA,KAA4B;AAAA,GAC3D;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -30,11 +30,10 @@ module.exports = __toCommonJS(ItemSubmenu_exports);
|
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
32
|
var import_react = require("react");
|
|
33
|
-
var import_ds_grid = __toESM(require("@elliemae/ds-grid"));
|
|
34
33
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
35
34
|
var import_exported_related = require("../../exported-related/index");
|
|
36
|
-
var import_styled = require("./styled");
|
|
37
35
|
var import_constants = require("../../exported-related/constants");
|
|
36
|
+
var import_styled = require("../styled");
|
|
38
37
|
const notOpenedShadowStyle = (isSelected) => (theme) => `
|
|
39
38
|
box-shadow: inset 4px 0 0 0 ${isSelected ? theme.colors.brand[400] : "transparent"};
|
|
40
39
|
|
|
@@ -67,8 +66,8 @@ const ItemSubmenu = (props) => {
|
|
|
67
66
|
const opened = openedItem === dsId;
|
|
68
67
|
const isSelected = selectedItem === dsId;
|
|
69
68
|
const shadowStyle = (0, import_react.useCallback)(
|
|
70
|
-
(
|
|
71
|
-
[dsId, isSelected,
|
|
69
|
+
(opened_) => (theme) => !opened_ ? notOpenedShadowStyle(isSelected || selectedParent === dsId)(theme) : `box-shadow: inset 4px 0 0 0 #52A6EC`,
|
|
70
|
+
[dsId, isSelected, selectedParent]
|
|
72
71
|
);
|
|
73
72
|
const ariaLabel = item.itemOpts.ariaLabel ?? (typeof label === "string" ? label : "menuitem");
|
|
74
73
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_exported_related.ItemRenderer, {
|
|
@@ -87,7 +86,7 @@ const ItemSubmenu = (props) => {
|
|
|
87
86
|
hasBorderBottom: opened,
|
|
88
87
|
borderBottomMr: "12px",
|
|
89
88
|
children: [
|
|
90
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledLeftContainer, {
|
|
91
90
|
cols: opened ? ["auto", "auto"] : ["38px"],
|
|
92
91
|
gutter: "1px",
|
|
93
92
|
pl: opened ? "xxs" : 0,
|
|
@@ -109,13 +108,13 @@ const ItemSubmenu = (props) => {
|
|
|
109
108
|
role: "button",
|
|
110
109
|
"aria-label": `Close ${ariaLabel}`
|
|
111
110
|
}),
|
|
112
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsedComponent, {
|
|
111
|
+
CollapsedComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsedComponent, {
|
|
113
112
|
item,
|
|
114
113
|
ctx
|
|
115
114
|
})
|
|
116
115
|
]
|
|
117
116
|
}),
|
|
118
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.
|
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledItemLabel, {
|
|
119
118
|
ml: opened ? "xxs" : "1px",
|
|
120
119
|
mt: "xxxs",
|
|
121
120
|
mb: "15px",
|
|
@@ -126,7 +125,7 @@ const ItemSubmenu = (props) => {
|
|
|
126
125
|
placement: "bottom-start"
|
|
127
126
|
}) : label
|
|
128
127
|
}),
|
|
129
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledRightContainer, {
|
|
130
129
|
pl: "xs",
|
|
131
130
|
pr: opened ? "xxs2" : "xxs",
|
|
132
131
|
onFocus: (e) => {
|
|
@@ -141,7 +140,7 @@ const ItemSubmenu = (props) => {
|
|
|
141
140
|
item
|
|
142
141
|
})
|
|
143
142
|
}),
|
|
144
|
-
BottomComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
143
|
+
BottomComponent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledBottomContainer, {
|
|
145
144
|
style: { gridColumn: "span 3" },
|
|
146
145
|
pb: "xxxs",
|
|
147
146
|
pl: "xxs",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemSubmenu/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAGA,mBAAmC;AACnC,
|
|
6
|
-
"names": [
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable indent */\nimport React, { useCallback } from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { Theme } from '@elliemae/ds-system';\nimport { ItemRenderer } from '../../exported-related/index';\nimport type { ComponentProps } from '../../index.d';\nimport { CHEVRON_BACK_DS_ID } from '../../exported-related/constants';\nimport {\n StyledLeftContainer,\n StyledChevronLeft,\n StyledItemLabel,\n StyledBottomContainer,\n StyledRightContainer,\n} from '../styled';\n\nconst notOpenedShadowStyle = (isSelected: boolean) => (theme: Theme) =>\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_: boolean) => (theme: Theme) =>\n !opened_\n ? notOpenedShadowStyle(isSelected || selectedParent === dsId)(theme)\n : `box-shadow: inset 4px 0 0 0 #52A6EC`,\n [dsId, isSelected, 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 <StyledLeftContainer\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: React.MouseEvent<HTMLElement>) => {\n onItemClick(item, e);\n }}\n data-testid=\"leftnav-leftcomponent-chevron\"\n tabIndex={0}\n onFocus={(e: React.FocusEvent) => {\n e.stopPropagation();\n setFocusedItem(CHEVRON_BACK_DS_ID);\n }}\n role=\"button\"\n aria-label={`Close ${ariaLabel}`}\n />\n )}\n {CollapsedComponent && <CollapsedComponent item={item} ctx={ctx} />}\n </StyledLeftContainer>\n <StyledItemLabel\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 </StyledItemLabel>\n <StyledRightContainer\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 </StyledRightContainer>\n {BottomComponent && (\n <StyledBottomContainer\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 </StyledBottomContainer>\n )}\n </ItemRenderer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAGA,mBAAmC;AACnC,uCAA2C;AAE3C,8BAA6B;AAE7B,uBAAmC;AACnC,oBAMO;AAEP,MAAM,uBAAuB,CAAC,eAAwB,CAAC,UACrD;AAAA,gCAC8B,aAAa,MAAM,OAAO,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AS,CAAC,MAAM,cAAc,EAAE,gBAAgB;AAAA,QAEhD,sDAAC;AAAA,UAAgB;AAAA,UAAU;AAAA,SAAY;AAAA,OACzC;AAAA;AAAA,GAEJ;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -31,7 +31,7 @@ var React = __toESM(require("react"));
|
|
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
32
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
33
33
|
var import_exported_related = require("../../exported-related/index");
|
|
34
|
-
var import_styled = require("
|
|
34
|
+
var import_styled = require("../styled");
|
|
35
35
|
const ItemTextLabel = (props) => {
|
|
36
36
|
const {
|
|
37
37
|
item,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/outOfTheBox/ItemTextLabel/index.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
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 '
|
|
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
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,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,gBAAgB;AAAA,IAC9F;AAAA,IACA,KAAK;AAAA,MACH,cAAc,EAAE,eAAe,qBAAqB;AAAA,IACtD;AAAA,EACF,IAAI;AAEJ,QAAM,gBAAgB,qBAAqB;AAE3C,SACE,6CAAC;AAAA,IACC,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,oBAAoB;AAAA,IACtB;AAAA,IACA,WAAU;AAAA,IACV,YAAW;AAAA,IAEgB;AAAA;AAAA,MAAC,4CAAC,SAAI;AAAA,MACjC,4CAAC;AAAA,QACC,eAAa,mBAAmB;AAAA,QAChC,IAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,QACA,IAAG;AAAA,QACH,IAAG;AAAA,QAEF,4BAAkB,aAAa,4CAAC;AAAA,UAA2B,OAAO;AAAA,UAAO,WAAU;AAAA,SAAe,IAAK;AAAA,OAC1G;AAAA;AAAA,GACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|