@elliemae/ds-treeview 3.5.0-rc.7 → 3.5.1-next.0
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/TreeView.js +5 -4
- package/dist/cjs/TreeView.js.map +2 -2
- package/dist/cjs/hoc/WithConditionalDnDContext.js +31 -23
- package/dist/cjs/hoc/WithConditionalDnDContext.js.map +2 -2
- package/dist/cjs/hoc/WithDnDSortableItemContext.js +8 -6
- package/dist/cjs/hoc/WithDnDSortableItemContext.js.map +2 -2
- package/dist/cjs/parts/CheckboxSelectable.js +12 -9
- package/dist/cjs/parts/CheckboxSelectable.js.map +2 -2
- package/dist/cjs/parts/ChildrenCountDisplayer.js +8 -4
- package/dist/cjs/parts/ChildrenCountDisplayer.js.map +2 -2
- package/dist/cjs/parts/DnDHandle.js +3 -2
- package/dist/cjs/parts/DnDHandle.js.map +2 -2
- package/dist/cjs/parts/DropIndicator.js +20 -14
- package/dist/cjs/parts/DropIndicator.js.map +2 -2
- package/dist/cjs/parts/ExpandCaret.js +7 -7
- package/dist/cjs/parts/ExpandCaret.js.map +2 -2
- package/dist/cjs/parts/NestingSpace.js +2 -2
- package/dist/cjs/parts/NestingSpace.js.map +2 -2
- package/dist/cjs/parts/RadioSelectable.js +3 -2
- package/dist/cjs/parts/RadioSelectable.js.map +2 -2
- package/dist/cjs/parts/TreeItem.js +43 -25
- package/dist/cjs/parts/TreeItem.js.map +2 -2
- package/dist/cjs/parts/TreeItemText.js +54 -30
- package/dist/cjs/parts/TreeItemText.js.map +2 -2
- package/dist/cjs/parts/TreeList.js +58 -48
- package/dist/cjs/parts/TreeList.js.map +2 -2
- package/dist/cjs/related-components/TreeViewSearchBar.js +2 -2
- package/dist/cjs/related-components/TreeViewSearchBar.js.map +2 -2
- package/dist/esm/TreeView.js +5 -4
- package/dist/esm/TreeView.js.map +2 -2
- package/dist/esm/hoc/WithConditionalDnDContext.js +31 -23
- package/dist/esm/hoc/WithConditionalDnDContext.js.map +2 -2
- package/dist/esm/hoc/WithDnDSortableItemContext.js +8 -6
- package/dist/esm/hoc/WithDnDSortableItemContext.js.map +2 -2
- package/dist/esm/parts/CheckboxSelectable.js +12 -9
- package/dist/esm/parts/CheckboxSelectable.js.map +2 -2
- package/dist/esm/parts/ChildrenCountDisplayer.js +8 -4
- package/dist/esm/parts/ChildrenCountDisplayer.js.map +2 -2
- package/dist/esm/parts/DnDHandle.js +3 -2
- package/dist/esm/parts/DnDHandle.js.map +2 -2
- package/dist/esm/parts/DropIndicator.js +20 -14
- package/dist/esm/parts/DropIndicator.js.map +2 -2
- package/dist/esm/parts/ExpandCaret.js +7 -7
- package/dist/esm/parts/ExpandCaret.js.map +2 -2
- package/dist/esm/parts/NestingSpace.js +2 -2
- package/dist/esm/parts/NestingSpace.js.map +2 -2
- package/dist/esm/parts/RadioSelectable.js +3 -2
- package/dist/esm/parts/RadioSelectable.js.map +2 -2
- package/dist/esm/parts/TreeItem.js +43 -25
- package/dist/esm/parts/TreeItem.js.map +2 -2
- package/dist/esm/parts/TreeItemText.js +54 -30
- package/dist/esm/parts/TreeItemText.js.map +2 -2
- package/dist/esm/parts/TreeList.js +58 -48
- package/dist/esm/parts/TreeList.js.map +2 -2
- package/dist/esm/related-components/TreeViewSearchBar.js +2 -2
- package/dist/esm/related-components/TreeViewSearchBar.js.map +2 -2
- package/package.json +10 -10
|
@@ -31,7 +31,8 @@ __export(TreeItem_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(TreeItem_exports);
|
|
33
33
|
var React = __toESM(require("react"));
|
|
34
|
-
var
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_react = require("react");
|
|
35
36
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
36
37
|
var import_RadioSelectable = __toESM(require("./RadioSelectable"));
|
|
37
38
|
var import_CheckboxSelectable = __toESM(require("./CheckboxSelectable"));
|
|
@@ -150,7 +151,7 @@ const TreeItem = (props) => {
|
|
|
150
151
|
);
|
|
151
152
|
const childrenLength = (0, import_react.useMemo)(() => children?.length ?? 0, [children]);
|
|
152
153
|
const ariaLabel = `${itemLabelText}${showChildrenAmount && childrenLength > 0 ? `, ${childrenLength} Items` : ""}`;
|
|
153
|
-
return /* @__PURE__ */
|
|
154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TreeListItem, {
|
|
154
155
|
tabIndex: 0,
|
|
155
156
|
onMouseLeave: () => {
|
|
156
157
|
if (hoverItem?.id === item.id) {
|
|
@@ -170,29 +171,46 @@ const TreeItem = (props) => {
|
|
|
170
171
|
"aria-label": ariaLabel,
|
|
171
172
|
"data-id": item.id,
|
|
172
173
|
"data-index": item.virtualIndex,
|
|
173
|
-
onKeyDown: onItemKeyDown
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
174
|
+
onKeyDown: onItemKeyDown,
|
|
175
|
+
children: [
|
|
176
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TreeListItemAddonsWrapper, {
|
|
177
|
+
children: [
|
|
178
|
+
withDragAndDrop ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DnDHandle.DnDHandle, {
|
|
179
|
+
id,
|
|
180
|
+
isDragOverlay
|
|
181
|
+
}) : null,
|
|
182
|
+
withRadioChecks && !isDragOverlay ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_RadioSelectable.default, {
|
|
183
|
+
item,
|
|
184
|
+
itemIndex
|
|
185
|
+
}) : null,
|
|
186
|
+
withCheckboxChecks && !isDragOverlay ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CheckboxSelectable.default, {
|
|
187
|
+
item,
|
|
188
|
+
itemIndex
|
|
189
|
+
}) : null,
|
|
190
|
+
!isDragOverlay && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_NestingSpace.NestingSpace, {
|
|
191
|
+
item,
|
|
192
|
+
spaceForNestingLevel
|
|
193
|
+
}),
|
|
194
|
+
!isDragOverlay && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ExpandCaret.ExpandCaret, {
|
|
195
|
+
item
|
|
196
|
+
}),
|
|
197
|
+
!disableIcons ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Icon.Icon, {
|
|
198
|
+
item
|
|
199
|
+
}) : null
|
|
200
|
+
]
|
|
201
|
+
}),
|
|
202
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TreeItemText.TreeItemText, {
|
|
203
|
+
item
|
|
204
|
+
}),
|
|
205
|
+
rightAddons && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TreeListItemAddonsWrapper, {
|
|
206
|
+
children: typeof rightAddons === "function" ? rightAddons(item) : rightAddons
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DropIndicator.default, {
|
|
209
|
+
dropIndicatorPosition,
|
|
210
|
+
isDropValid
|
|
211
|
+
})
|
|
212
|
+
]
|
|
213
|
+
});
|
|
196
214
|
};
|
|
197
215
|
var TreeItem_default = (0, import_WithDnDSortableItemContext.withDnDSortableItemContext)(TreeItem);
|
|
198
216
|
//# sourceMappingURL=TreeItem.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/TreeItem.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable complexity */\n/* eslint-disable max-lines */\nimport React, { useContext, useMemo, useCallback } from 'react';\n\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nimport RadioSelectable from './RadioSelectable';\nimport CheckboxSelectable from './CheckboxSelectable';\nimport TreeViewContext from '../TreeViewContext';\nimport { setMultipleRefs } from '../utils/refs-helpers';\nimport { useOnItemKeyDown } from '../utils/keyboard-helpers';\nimport { NestingSpace } from './NestingSpace';\nimport { Icon } from './Icon';\nimport { ExpandCaret } from './ExpandCaret';\nimport { TreeItemText } from './TreeItemText';\nimport { DSTreeViewPrefix, treeItemBlockName } from '../config/cssClassesConstants';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\nimport { DnDHandle } from './DnDHandle';\nimport { withDnDSortableItemContext } from '../hoc/WithDnDSortableItemContext';\nimport { DropIndicatorPosition, SortableItemContext } from '../hoc/SortableItemContext';\nimport DropIndicator from './DropIndicator';\n\nexport const TreeListItem = aggregatedClasses('li', {\n 'data-testid': treeItemBlockName,\n role: 'treeitem',\n // temp fix untill we move to styled components\n})(treeItemBlockName) as unknown as React.ComponentType<React.ComponentProps<'li'>>;\n\nexport const TreeListItemAddonsWrapper = aggregatedClasses('div')(\n treeItemBlockName,\n 'addons',\n // temp fix untill we move to styled components\n) as unknown as React.ComponentType;\n\ninterface PropsT {\n item: DSTreeviewT.Item;\n itemIndex: number;\n isDragOverlay?: boolean;\n virtualItemRef?: React.RefObject<HTMLLIElement>;\n itemWrapperStyle?: { [key: string]: unknown };\n spaceForNestingLevel?: number;\n}\nexport const TreeItem = (props: PropsT): JSX.Element => {\n const {\n item,\n itemIndex,\n itemWrapperStyle = {},\n virtualItemRef,\n spaceForNestingLevel = 1.5,\n isDragOverlay = false,\n } = props;\n const { id, node, children } = item;\n const { nodeItemRef } = node.model;\n\n const { draggableProps } = useContext(SortableItemContext);\n\n const onItemKeyDown = useOnItemKeyDown(item, draggableProps);\n\n const ctx = useContext(TreeViewContext);\n const {\n props: { disableIcons, rightAddons, onItemClick, onItemFocus, rowSize, labelOverflow, nameKey, showChildrenAmount },\n withRadioChecks,\n withCheckboxChecks,\n withDragAndDrop,\n selectedItem,\n selectedCheckboxes,\n hoverItem,\n virtualListHelpers: { scrollToIndex },\n setHoverItem,\n setSelectedItem,\n setFocusedItem,\n } = ctx;\n const itemLabelText = item[nameKey] as DSTreeviewT.Item['name'];\n\n // Sortable Items needs to update\n // - the virtual list ref (for react-virtual requirement)\n // - nodeItemRef which is a prop avaiable in the TreeModel nodes\n // - the drag and drop node reference\n const setItemRefs: React.LegacyRef<HTMLLIElement> | undefined = (ref: HTMLLIElement) => {\n setMultipleRefs(\n virtualItemRef,\n !isDragOverlay && nodeItemRef,\n !isDragOverlay && draggableProps && draggableProps.setNodeRef,\n )(ref);\n };\n\n const dropIndicatorPosition =\n draggableProps && draggableProps.shouldShowDropIndicatorPosition && draggableProps.dropIndicatorPosition;\n\n const isDropIndicatorPositionInside = dropIndicatorPosition === DropIndicatorPosition.Inside;\n\n const isDragging = draggableProps && draggableProps.isDragging;\n\n const isDropValid = draggableProps && draggableProps.isDropValid;\n\n const dropPreviewClassName = useMemo(() => {\n if (isDropIndicatorPositionInside) {\n const className = `${DSTreeViewPrefix}-${treeItemBlockName}${isDropValid ? '--valid' : '--invalid'}-drop-in`;\n return className;\n }\n return '';\n }, [isDropIndicatorPositionInside, isDropValid]);\n\n const dragOverlayClassName = useMemo(() => (isDragOverlay ? 'drag-overlay' : ''), [isDragOverlay]);\n\n const selectedClassName = useMemo(\n () => (selectedItem?.id === item.id && !isDragOverlay ? 'selected' : ''),\n [isDragOverlay, item.id, selectedItem?.id],\n );\n const hoverClassName = useMemo(\n () => (!isDragOverlay && hoverItem?.id === item.id && !isDragging ? 'hover' : ''),\n [isDragOverlay, hoverItem?.id, item.id, isDragging],\n );\n const fixedHeightClassname = useMemo(() => {\n if (labelOverflow === 'truncate') {\n if (rowSize === 'compact') return `${DSTreeViewPrefix}-${treeItemBlockName}--fixed-height-compact`;\n return `${DSTreeViewPrefix}-${treeItemBlockName}--fixed-height`;\n }\n return '';\n }, [labelOverflow, rowSize]);\n\n const isDraggingClassname = useMemo(() => {\n if (isDragging) return `${DSTreeViewPrefix}-${treeItemBlockName}--dragging`;\n return '';\n }, [isDragging]);\n\n const finalClassName = useMemo(\n () =>\n `${dropPreviewClassName} ${fixedHeightClassname} ${selectedClassName} ${hoverClassName} ${dragOverlayClassName} ${isDraggingClassname}`,\n [\n dropPreviewClassName,\n fixedHeightClassname,\n selectedClassName,\n hoverClassName,\n dragOverlayClassName,\n isDraggingClassname,\n ],\n );\n\n const handleItemClick = useCallback(\n (e: React.MouseEvent<HTMLLIElement>) => {\n onItemClick(item, e);\n setFocusedItem(item);\n setSelectedItem(item);\n const itemVirtualIndex = typeof item.virtualIndex === 'number' ? item.virtualIndex : -1;\n onItemFocus({\n itemIndex: itemVirtualIndex,\n scrollToItem: (opts = { align: 'start' }) => scrollToIndex(itemVirtualIndex, opts),\n item,\n });\n },\n [item, scrollToIndex, onItemClick, onItemFocus, setSelectedItem, setFocusedItem],\n );\n\n const childrenLength = useMemo(() => children?.length ?? 0, [children]);\n\n const ariaLabel = `${itemLabelText}${showChildrenAmount && childrenLength > 0 ? `, ${childrenLength} Items` : ''}`;\n\n return (\n <TreeListItem\n tabIndex={0}\n onMouseLeave={() => {\n if (hoverItem?.id === item.id) {\n setHoverItem(null);\n }\n }}\n onMouseEnter={() => {\n setHoverItem(item);\n }}\n onClick={handleItemClick}\n onBlur={() => setFocusedItem(null)}\n ref={setItemRefs}\n style={{ ...itemWrapperStyle }}\n className={finalClassName}\n aria-expanded={!!item.isExpanded}\n aria-selected={!!selectedCheckboxes[item.id]}\n aria-label={ariaLabel}\n data-id={item.id}\n data-index={item.virtualIndex}\n onKeyDown={onItemKeyDown}\n >\n <TreeListItemAddonsWrapper>\n {withDragAndDrop ? <DnDHandle id={id} isDragOverlay={isDragOverlay} /> : null}\n {withRadioChecks && !isDragOverlay ? <RadioSelectable item={item} itemIndex={itemIndex} /> : null}\n {withCheckboxChecks && !isDragOverlay ? <CheckboxSelectable item={item} itemIndex={itemIndex} /> : null}\n {!isDragOverlay && <NestingSpace item={item} spaceForNestingLevel={spaceForNestingLevel} />}\n {!isDragOverlay && <ExpandCaret item={item} />}\n {!disableIcons ? <Icon item={item} /> : null}\n </TreeListItemAddonsWrapper>\n <TreeItemText item={item} />\n {rightAddons && (\n <TreeListItemAddonsWrapper>\n {typeof rightAddons === 'function' ? rightAddons(item) : rightAddons}\n </TreeListItemAddonsWrapper>\n )}\n <DropIndicator dropIndicatorPosition={dropIndicatorPosition} isDropValid={isDropValid} />\n </TreeListItem>\n );\n};\n\nexport default withDnDSortableItemContext(TreeItem);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
6
|
-
"names": ["TreeViewContext", "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAGA,mBAAwD;AAExD,2BAAkC;AAElC,6BAA4B;AAC5B,gCAA+B;AAC/B,6BAA4B;AAC5B,0BAAgC;AAChC,8BAAiC;AACjC,0BAA6B;AAC7B,kBAAqB;AACrB,yBAA4B;AAC5B,0BAA6B;AAC7B,iCAAoD;AAEpD,uBAA0B;AAC1B,wCAA2C;AAC3C,iCAA2D;AAC3D,2BAA0B;AAEnB,MAAM,mBAAe,wCAAkB,MAAM;AAAA,EAClD,eAAe;AAAA,EACf,MAAM;AAER,CAAC,EAAE,4CAAiB;AAEb,MAAM,gCAA4B,wCAAkB,KAAK;AAAA,EAC9D;AAAA,EACA;AAEF;AAUO,MAAM,WAAW,CAAC,UAA+B;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,mBAAmB,CAAC;AAAA,IACpB;AAAA,IACA,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,EAClB,IAAI;AACJ,QAAM,EAAE,IAAI,MAAM,SAAS,IA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 @@ __export(TreeItemText_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(TreeItemText_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
|
-
var
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
var import_react = require("react");
|
|
32
33
|
var import_react_highlight_words = __toESM(require("react-highlight-words"));
|
|
33
34
|
var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
|
|
34
35
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
@@ -39,10 +40,11 @@ const ItemContent = (0, import_ds_classnames.aggregatedClasses)("div")(`${import
|
|
|
39
40
|
const ItemValue = (0, import_ds_classnames.aggregatedClasses)("span")(import_cssClassesConstants.treeItemBlockName, "value");
|
|
40
41
|
const classNameModifierWrapAll = `${import_cssClassesConstants.DSTreeViewPrefix}-${import_cssClassesConstants.treeItemBlockName}__value--wrap-all`;
|
|
41
42
|
const classNameModifierTruncate = `${import_cssClassesConstants.DSTreeViewPrefix}-${import_cssClassesConstants.treeItemBlockName}__value--truncate`;
|
|
42
|
-
const CustomHighlight = ({ children }) => /* @__PURE__ */
|
|
43
|
+
const CustomHighlight = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("mark", {
|
|
43
44
|
className: "tree-text-highlight",
|
|
44
|
-
"data-testid": "tree-text-highlight"
|
|
45
|
-
|
|
45
|
+
"data-testid": "tree-text-highlight",
|
|
46
|
+
children
|
|
47
|
+
});
|
|
46
48
|
const TreeItemText = (props) => {
|
|
47
49
|
const { item } = props;
|
|
48
50
|
const ctx = (0, import_react.useContext)(import_TreeViewContext.default);
|
|
@@ -53,46 +55,68 @@ const TreeItemText = (props) => {
|
|
|
53
55
|
const itemLabelText = item[nameKey];
|
|
54
56
|
if (searchQuery) {
|
|
55
57
|
if (labelOverflow === "truncate") {
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
value: /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, {
|
|
59
|
+
value: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_highlight_words.default, {
|
|
62
|
+
autoEscape: true,
|
|
63
|
+
highlightTag: CustomHighlight,
|
|
64
|
+
searchWords: [searchQuery],
|
|
65
|
+
textToHighlight: itemLabelText
|
|
66
|
+
}),
|
|
67
|
+
showChildrenAmount ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ChildrenCountDisplayer.ChildrenCountDisplayer, {
|
|
68
|
+
item
|
|
69
|
+
}) : null
|
|
70
|
+
]
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_highlight_words.default, {
|
|
58
77
|
autoEscape: true,
|
|
59
78
|
highlightTag: CustomHighlight,
|
|
60
79
|
searchWords: [searchQuery],
|
|
61
80
|
textToHighlight: itemLabelText
|
|
62
|
-
}),
|
|
81
|
+
}),
|
|
82
|
+
showChildrenAmount ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ChildrenCountDisplayer.ChildrenCountDisplayer, {
|
|
63
83
|
item
|
|
64
|
-
}) : null
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_react_highlight_words.default, {
|
|
68
|
-
autoEscape: true,
|
|
69
|
-
highlightTag: CustomHighlight,
|
|
70
|
-
searchWords: [searchQuery],
|
|
71
|
-
textToHighlight: itemLabelText
|
|
72
|
-
}), showChildrenAmount ? /* @__PURE__ */ import_react.default.createElement(import_ChildrenCountDisplayer.ChildrenCountDisplayer, {
|
|
73
|
-
item
|
|
74
|
-
}) : null);
|
|
84
|
+
}) : null
|
|
85
|
+
]
|
|
86
|
+
});
|
|
75
87
|
}
|
|
76
88
|
if (labelOverflow === "truncate") {
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
value: /* @__PURE__ */
|
|
79
|
-
|
|
80
|
-
|
|
89
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, {
|
|
90
|
+
value: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
91
|
+
children: [
|
|
92
|
+
itemLabelText,
|
|
93
|
+
showChildrenAmount ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ChildrenCountDisplayer.ChildrenCountDisplayer, {
|
|
94
|
+
item
|
|
95
|
+
}) : null
|
|
96
|
+
]
|
|
97
|
+
})
|
|
81
98
|
});
|
|
82
99
|
}
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
-
|
|
85
|
-
|
|
100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
101
|
+
children: [
|
|
102
|
+
itemLabelText,
|
|
103
|
+
showChildrenAmount ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ChildrenCountDisplayer.ChildrenCountDisplayer, {
|
|
104
|
+
item
|
|
105
|
+
}) : null
|
|
106
|
+
]
|
|
107
|
+
});
|
|
86
108
|
}, [item, searchQuery, nameKey, showChildrenAmount, labelOverflow]);
|
|
87
109
|
let className = "";
|
|
88
110
|
if (labelOverflow === "wrap-all")
|
|
89
111
|
className += `${classNameModifierWrapAll} `;
|
|
90
112
|
if (labelOverflow === "truncate")
|
|
91
113
|
className += `${classNameModifierTruncate} `;
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
-
"data-testid": `${import_cssClassesConstants.treeItemBlockName}-content
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemContent, {
|
|
115
|
+
"data-testid": `${import_cssClassesConstants.treeItemBlockName}-content`,
|
|
116
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemValue, {
|
|
117
|
+
className,
|
|
118
|
+
children: Text
|
|
119
|
+
})
|
|
120
|
+
});
|
|
97
121
|
};
|
|
98
122
|
//# sourceMappingURL=TreeItemText.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/TreeItemText.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useMemo, useContext } from 'react';\nimport Highlighter from 'react-highlight-words';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nimport { ChildrenCountDisplayer } from './ChildrenCountDisplayer';\nimport { DSTreeViewPrefix, treeItemBlockName } from '../config/cssClassesConstants';\n\nimport TreeViewContext from '../TreeViewContext';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\n\nconst ItemContent = aggregatedClasses('div')(`${treeItemBlockName}-content`) as unknown as React.ComponentType<\n React.ComponentProps<'div'>\n>;\nconst ItemValue = aggregatedClasses('span')(treeItemBlockName, 'value') as unknown as React.ComponentType<\n React.ComponentProps<'span'>\n>;\n\n// const wrapperClassName = `${DSTreeViewPrefix}-${treeItemBlockName}-content`;\nconst classNameModifierWrapAll = `${DSTreeViewPrefix}-${treeItemBlockName}__value--wrap-all`;\nconst classNameModifierTruncate = `${DSTreeViewPrefix}-${treeItemBlockName}__value--truncate`;\n\n// eslint-disable-next-line react/prop-types\nconst CustomHighlight = ({ children }: { children: React.ReactNode }) => (\n <mark className=\"tree-text-highlight\" data-testid=\"tree-text-highlight\">\n {children}\n </mark>\n);\ninterface PropsT {\n item: DSTreeviewT.Item;\n}\nexport const TreeItemText = (props: PropsT): JSX.Element => {\n const { item } = props;\n const ctx = useContext(TreeViewContext);\n const {\n props: { searchQuery, showChildrenAmount, labelOverflow, nameKey },\n } = ctx;\n\n const Text = useMemo(() => {\n const itemLabelText = item[nameKey] as DSTreeviewT.Item['name'];\n if (searchQuery) {\n if (labelOverflow === 'truncate') {\n return (\n <SimpleTruncatedTooltipText\n value={\n <>\n <Highlighter\n autoEscape\n highlightTag={CustomHighlight}\n searchWords={[searchQuery]}\n textToHighlight={itemLabelText}\n />\n {showChildrenAmount ? <ChildrenCountDisplayer item={item} /> : null}\n </>\n }\n />\n );\n }\n return (\n <>\n <Highlighter\n autoEscape\n highlightTag={CustomHighlight}\n searchWords={[searchQuery]}\n textToHighlight={itemLabelText}\n />\n {showChildrenAmount ? <ChildrenCountDisplayer item={item} /> : null}\n </>\n );\n }\n if (labelOverflow === 'truncate') {\n return (\n <SimpleTruncatedTooltipText\n value={\n <>\n {itemLabelText}\n {showChildrenAmount ? <ChildrenCountDisplayer item={item} /> : null}\n </>\n }\n />\n );\n }\n return (\n <>\n {itemLabelText}\n {showChildrenAmount ? <ChildrenCountDisplayer item={item} /> : null}\n </>\n );\n }, [item, searchQuery, nameKey, showChildrenAmount, labelOverflow]);\n\n let className = '';\n if (labelOverflow === 'wrap-all') className += `${classNameModifierWrapAll} `;\n if (labelOverflow === 'truncate') className += `${classNameModifierTruncate} `;\n\n return (\n <ItemContent data-testid={`${treeItemBlockName}-content`}>\n <ItemValue className={className}>{Text}</ItemValue>\n </ItemContent>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
6
|
-
"names": ["
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,mBAA2C;AA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C,OACE;AAAA,UACG;AAAA;AAAA,YACA,qBAAqB,4CAAC;AAAA,cAAuB;AAAA,aAAY,IAAK;AAAA;AAAA,SACjE;AAAA,OAEJ;AAAA,IAEJ;AACA,WACE;AAAA,MACG;AAAA;AAAA,QACA,qBAAqB,4CAAC;AAAA,UAAuB;AAAA,SAAY,IAAK;AAAA;AAAA,KACjE;AAAA,EAEJ,GAAG,CAAC,MAAM,aAAa,SAAS,oBAAoB,aAAa,CAAC;AAElE,MAAI,YAAY;AAChB,MAAI,kBAAkB;AAAY,iBAAa,GAAG;AAClD,MAAI,kBAAkB;AAAY,iBAAa,GAAG;AAElD,SACE,4CAAC;AAAA,IAAY,eAAa,GAAG;AAAA,IAC3B,sDAAC;AAAA,MAAU;AAAA,MAAuB;AAAA,KAAK;AAAA,GACzC;AAEJ;",
|
|
6
|
+
"names": ["TreeViewContext", "Highlighter"]
|
|
7
7
|
}
|
|
@@ -31,7 +31,8 @@ __export(TreeList_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(TreeList_exports);
|
|
33
33
|
var React = __toESM(require("react"));
|
|
34
|
-
var
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_react = require("react");
|
|
35
36
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
36
37
|
var import_ds_circular_progress_indicator = require("@elliemae/ds-circular-progress-indicator");
|
|
37
38
|
var import_TreeViewContext = __toESM(require("../TreeViewContext"));
|
|
@@ -62,59 +63,68 @@ const TreeListComp = () => {
|
|
|
62
63
|
const { totalSize, virtualItems } = virtualListHelpers;
|
|
63
64
|
const className = `${rowSize === "compact" ? `${compactRowClass}` : `${normaRowClass}`}`;
|
|
64
65
|
const { visibleItems } = (0, import_react.useContext)(import_DnDTreeContext.DnDTreeContext);
|
|
65
|
-
return /* @__PURE__ */
|
|
66
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TreeListWrapper, {
|
|
66
67
|
ref: virtualListRef,
|
|
67
68
|
className,
|
|
68
69
|
style: {
|
|
69
70
|
height: `${typeof height === "number" ? `${height}px` : height}`,
|
|
70
71
|
width: `${typeof width === "number" ? `${width}px` : width}`,
|
|
71
72
|
overflow: "auto"
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
73
|
+
},
|
|
74
|
+
children: [
|
|
75
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
76
|
+
style: {
|
|
77
|
+
width: "100%",
|
|
78
|
+
height: "100%",
|
|
79
|
+
display: "flex",
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
justifyContent: "center"
|
|
82
|
+
},
|
|
83
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_circular_progress_indicator.DSCircularProgressIndicator, {
|
|
84
|
+
size: "xl",
|
|
85
|
+
loading: isLoading,
|
|
86
|
+
showLabel: true,
|
|
87
|
+
waiting: false,
|
|
88
|
+
showTooltip: false
|
|
89
|
+
})
|
|
90
|
+
}) : null,
|
|
91
|
+
!isLoading && virtualItems.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TreeListNoItems, {
|
|
92
|
+
children: noItemsPlaceholder
|
|
93
|
+
}) : null,
|
|
94
|
+
!isLoading && virtualItems.length !== 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
95
|
+
style: {
|
|
96
|
+
height: `${totalSize}px`,
|
|
97
|
+
width: "100%",
|
|
98
|
+
position: "relative"
|
|
99
|
+
},
|
|
100
|
+
children: virtualItems.map((virtualItem) => {
|
|
101
|
+
const { index, measureRef, start } = virtualItem;
|
|
102
|
+
const item = (visibleItems || flattenedVisibleItems)[index];
|
|
103
|
+
if (!item)
|
|
104
|
+
return null;
|
|
105
|
+
item.virtualIndex = index;
|
|
106
|
+
const { id } = item;
|
|
107
|
+
const style = {
|
|
108
|
+
position: "absolute",
|
|
109
|
+
top: `${start}px`,
|
|
110
|
+
left: 0,
|
|
111
|
+
width: "100%"
|
|
112
|
+
};
|
|
113
|
+
const listItemProps = {
|
|
114
|
+
key: `DS-TreeView-List-Item-${id}`,
|
|
115
|
+
virtualItemRef: measureRef,
|
|
116
|
+
index,
|
|
117
|
+
itemIndex: index,
|
|
118
|
+
item,
|
|
119
|
+
itemWrapperStyle: style
|
|
120
|
+
};
|
|
121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TreeItem.default, {
|
|
122
|
+
...listItemProps
|
|
123
|
+
});
|
|
124
|
+
})
|
|
125
|
+
}) : null
|
|
126
|
+
]
|
|
127
|
+
});
|
|
118
128
|
};
|
|
119
129
|
const TreeList = (0, import_WithConditionalDnDContext.withConditionalDnDRowContext)(TreeListComp);
|
|
120
130
|
//# sourceMappingURL=TreeList.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/TreeList.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSCircularProgressIndicator } from '@elliemae/ds-circular-progress-indicator';\n\nimport TreeViewContext from '../TreeViewContext';\nimport { DSTreeViewPrefix, treeListBlockName } from '../config/cssClassesConstants';\nimport TreeItem from './TreeItem';\n\nimport type { DSTreeviewT } from '../react-desc-prop-types';\nimport { withConditionalDnDRowContext } from '../hoc/WithConditionalDnDContext';\nimport { DnDTreeContext } from '../hoc/DnDTreeContext';\n\nexport const treeListNoItemsBn = `${treeListBlockName}-no-items`;\nexport const TreeListNoItems = aggregatedClasses('div', {\n 'data-testid': treeListNoItemsBn,\n})(treeListNoItemsBn) as unknown as React.ComponentType<React.ComponentProps<'div'>>;\n\n// React.ComponentProps<'ul'> uses LegacyRef typings that existed pre-hook era\n// we omit the LegacyRef typings in favor of hook-era typings\ninterface UlProps extends Omit<React.ComponentProps<'ul'>, 'ref'> {\n ref: React.MutableRefObject<HTMLUListElement | undefined> | undefined;\n}\nexport const TreeListWrapper = aggregatedClasses('ul', {\n 'data-testid': treeListBlockName,\n role: 'tree',\n})(treeListBlockName, null, ({ rowSize }: { rowSize: 'normal' | 'compact' }) => ({\n [`rowsize-${rowSize}`]: rowSize,\n})) as unknown as React.ComponentType<UlProps>;\n\nconst compactRowClass = `${DSTreeViewPrefix}-tv-row-size-compact`;\nconst normaRowClass = `${DSTreeViewPrefix}-tv-row-size-normal`;\n\ninterface PropsT {\n onMouseDragOverItem?: (opts: {\n event: React.MouseEvent<HTMLLIElement>;\n item: DSTreeviewT.Item;\n itemIndex: number;\n setIsDraggingOverThis: React.Dispatch<React.SetStateAction<boolean>>;\n openFolderOnHoverTimeout: React.MutableRefObject<NodeJS.Timeout | null>;\n }) => void;\n}\n\nconst TreeListComp: React.ComponentType<PropsT> = () => {\n const ctx = useContext(TreeViewContext);\n const {\n virtualListRef,\n virtualListHelpers,\n visibleItems: flattenedVisibleItems,\n props: { width, height, rowSize, noItemsPlaceholder, isLoading },\n } = ctx;\n const { totalSize, virtualItems } = virtualListHelpers;\n const className = `${rowSize === 'compact' ? `${compactRowClass}` : `${normaRowClass}`}`;\n\n const { visibleItems } = useContext(DnDTreeContext);\n\n return (\n <TreeListWrapper\n ref={virtualListRef}\n className={className}\n style={{\n height: `${typeof height === 'number' ? `${height}px` : height}`,\n width: `${typeof width === 'number' ? `${width}px` : width}`,\n overflow: 'auto',\n }}\n >\n {isLoading ? (\n <div\n style={{\n width: '100%',\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n >\n <DSCircularProgressIndicator size=\"xl\" loading={isLoading} showLabel waiting={false} showTooltip={false} />\n </div>\n ) : null}\n {!isLoading && virtualItems.length === 0 ? <TreeListNoItems>{noItemsPlaceholder}</TreeListNoItems> : null}\n {!isLoading && virtualItems.length !== 0 ? (\n <div\n style={{\n height: `${totalSize}px`,\n width: '100%',\n position: 'relative',\n }}\n >\n {virtualItems.map((virtualItem) => {\n const { index, measureRef, start } = virtualItem;\n const item = (visibleItems || flattenedVisibleItems)[index];\n if (!item) return null;\n item.virtualIndex = index;\n const { id } = item;\n\n const style = {\n position: 'absolute',\n top: `${start}px`,\n left: 0,\n width: '100%',\n };\n\n const listItemProps = {\n key: `DS-TreeView-List-Item-${id}`,\n virtualItemRef: measureRef,\n index, // this is consumed by the DnD HOC\n itemIndex: index,\n item,\n itemWrapperStyle: style,\n };\n\n return <TreeItem {...listItemProps} />;\n })}\n </div>\n ) : null}\n </TreeListWrapper>\n );\n};\n\nexport const TreeList = withConditionalDnDRowContext(TreeListComp);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
6
|
-
"names": ["TreeViewContext", "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,mBAAkC;AAClC,2BAAkC;AAClC,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3G,IACE;AAAA,MACH,CAAC,aAAa,aAAa,WAAW,IAAI,4CAAC;AAAA,QAAiB;AAAA,OAAmB,IAAqB;AAAA,MACpG,CAAC,aAAa,aAAa,WAAW,IACrC,4CAAC;AAAA,QACC,OAAO;AAAA,UACL,QAAQ,GAAG;AAAA,UACX,OAAO;AAAA,UACP,UAAU;AAAA,QACZ;AAAA,QAEC,uBAAa,IAAI,CAAC,gBAAgB;AACjC,gBAAM,EAAE,OAAO,YAAY,MAAM,IAAI;AACrC,gBAAM,QAAQ,gBAAgB,uBAAuB;AACrD,cAAI,CAAC;AAAM,mBAAO;AAClB,eAAK,eAAe;AACpB,gBAAM,EAAE,GAAG,IAAI;AAEf,gBAAM,QAAQ;AAAA,YACZ,UAAU;AAAA,YACV,KAAK,GAAG;AAAA,YACR,MAAM;AAAA,YACN,OAAO;AAAA,UACT;AAEA,gBAAM,gBAAgB;AAAA,YACpB,KAAK,yBAAyB;AAAA,YAC9B,gBAAgB;AAAA,YAChB;AAAA,YACA,WAAW;AAAA,YACX;AAAA,YACA,kBAAkB;AAAA,UACpB;AAEA,iBAAO,4CAAC,gBAAAC,SAAA;AAAA,YAAU,GAAG;AAAA,WAAe;AAAA,QACtC,CAAC;AAAA,OACH,IACE;AAAA;AAAA,GACN;AAEJ;AAEO,MAAM,eAAW,+DAA6B,YAAY;",
|
|
6
|
+
"names": ["TreeViewContext", "TreeItem"]
|
|
7
7
|
}
|
|
@@ -28,11 +28,11 @@ __export(TreeViewSearchBar_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(TreeViewSearchBar_exports);
|
|
30
30
|
var React = __toESM(require("react"));
|
|
31
|
-
var
|
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
32
|
var import_ds_form = require("@elliemae/ds-form");
|
|
33
33
|
function TreeViewSearchBar(props) {
|
|
34
34
|
const { handleChange, onNext, onPrevious, onClear, currentResultIndex, totalResults, value } = props;
|
|
35
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form.DSNavSearchBox, {
|
|
36
36
|
onChange: (v) => {
|
|
37
37
|
handleChange({ target: { value: v } });
|
|
38
38
|
},
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/related-components/TreeViewSearchBar.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\nimport React from 'react';\nimport { DSNavSearchBox } from '@elliemae/ds-form';\n\ninterface PropsT {\n handleChange: (opt: { target: { value: string } }) => void;\n onNext: () => void;\n onPrevious: () => void;\n onClear: () => void;\n currentResultIndex: number;\n totalResults: number;\n value: string;\n}\n\nexport function TreeViewSearchBar(props: PropsT) {\n const { handleChange, onNext, onPrevious, onClear, currentResultIndex, totalResults, value } = props;\n\n return (\n <DSNavSearchBox\n onChange={(v: string) => {\n handleChange({ target: { value: v } });\n }}\n onNext={onNext}\n onPrevious={onPrevious}\n onClear={onClear}\n currentResultIndex={currentResultIndex}\n totalResults={totalResults}\n value={value}\n />\n );\n}\n\n// TreeViewSearchBar.propTypes = {\n// value: PropTypes.string.isRequired,\n// handleChange: PropTypes.func.isRequired,\n// onNext: PropTypes.func.isRequired,\n// onPrevious: PropTypes.func.isRequired,\n// onClear: PropTypes.func.isRequired,\n// currentResultIndex: PropTypes.number.isRequired,\n// totalResults: PropTypes.number.isRequired,\n// };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAEA,qBAA+B;AAYxB,SAAS,kBAAkB,OAAe;AAC/C,QAAM,EAAE,cAAc,QAAQ,YAAY,SAAS,oBAAoB,cAAc,MAAM,IAAI;AAE/F,SACE,4CAAC;AAAA,IACC,UAAU,CAAC,MAAc;AACvB,mBAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,GACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/esm/TreeView.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { describe } from "@elliemae/ds-utilities";
|
|
4
4
|
import { TreeViewPropTypes } from "./react-desc-prop-types";
|
|
5
5
|
import TreeViewContext from "./TreeViewContext";
|
|
@@ -7,9 +7,10 @@ import { useTreeview } from "./config/useTreeview";
|
|
|
7
7
|
import { TreeList } from "./parts/TreeList";
|
|
8
8
|
function TreeView(props) {
|
|
9
9
|
const { ctx } = useTreeview(props);
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
value: ctx
|
|
12
|
-
|
|
10
|
+
return /* @__PURE__ */ jsx(TreeViewContext.Provider, {
|
|
11
|
+
value: ctx,
|
|
12
|
+
children: /* @__PURE__ */ jsx(TreeList, {})
|
|
13
|
+
});
|
|
13
14
|
}
|
|
14
15
|
TreeView.propTypes = TreeViewPropTypes;
|
|
15
16
|
TreeView.displayName = "TreeView";
|
package/dist/esm/TreeView.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/TreeView.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport { describe } from '@elliemae/ds-utilities';\nimport { TreeViewPropTypes } from './react-desc-prop-types';\nimport TreeViewContext from './TreeViewContext';\nimport { useTreeview } from './config/useTreeview';\nimport { TreeList } from './parts/TreeList';\nimport type { DSTreeviewT } from './react-desc-prop-types';\nexport function TreeView(props: DSTreeviewT.Props) {\n const { ctx } = useTreeview(props);\n\n return (\n <TreeViewContext.Provider value={ctx}>\n <TreeList />\n </TreeViewContext.Provider>\n );\n}\n\nTreeView.propTypes = TreeViewPropTypes as WeakValidationMap<unknown>;\nTreeView.displayName = 'TreeView';\nconst TreeViewWithSchema = describe(TreeView);\nTreeViewWithSchema.propTypes = TreeViewPropTypes;\n\nexport { TreeViewWithSchema };\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,gBAAgB;AACzB,SAAS,yBAAyB;AAClC,OAAO,qBAAqB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;AAElB,SAAS,SAAS,OAA0B;AACjD,QAAM,EAAE,IAAI,IAAI,YAAY,KAAK;AAEjC,SACE,oBAAC,gBAAgB,UAAhB;AAAA,IAAyB,OAAO;AAAA,IAC/B,8BAAC,YAAS;AAAA,GACZ;AAEJ;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useContext, useEffect, useMemo, useRef } from "react";
|
|
3
4
|
import { DndContext, DragOverlay, SortableContext, useTreeDndkitConfig } from "@elliemae/ds-drag-and-drop";
|
|
4
5
|
import TreeViewContext from "../TreeViewContext";
|
|
5
6
|
import { TreeItem } from "../parts/TreeItem";
|
|
@@ -89,28 +90,35 @@ const withConditionalDnDRowContext = (Component) => (props) => {
|
|
|
89
90
|
}
|
|
90
91
|
}, [overId, dropIndicatorPosition, triggerTreeRerender, visibleItems, updateUserExpandedState]);
|
|
91
92
|
if (withDragAndDrop)
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
-
...dndContextProps
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
93
|
+
return /* @__PURE__ */ jsxs(DndContext, {
|
|
94
|
+
...dndContextProps,
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ jsx(SortableContext, {
|
|
97
|
+
...sortableContextProps,
|
|
98
|
+
children: /* @__PURE__ */ jsx(DnDTreeContext.Provider, {
|
|
99
|
+
value: {
|
|
100
|
+
activeIndex,
|
|
101
|
+
depth,
|
|
102
|
+
visibleItems: visibleItems.map((item) => item.original),
|
|
103
|
+
dropIndicatorPosition,
|
|
104
|
+
isDropValid
|
|
105
|
+
},
|
|
106
|
+
children: /* @__PURE__ */ jsx(Component, {
|
|
107
|
+
...props
|
|
108
|
+
})
|
|
109
|
+
})
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ jsx(DragOverlay, {
|
|
112
|
+
style: { width: "auto" },
|
|
113
|
+
children: activeId ? /* @__PURE__ */ jsx(TreeItem, {
|
|
114
|
+
itemIndex: activeIndex,
|
|
115
|
+
item: ensure(flattenedVisibleTree.find((item) => item.id.toString() === activeId)),
|
|
116
|
+
isDragOverlay: true
|
|
117
|
+
}) : null
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
});
|
|
121
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
114
122
|
...props
|
|
115
123
|
});
|
|
116
124
|
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hoc/WithConditionalDnDContext.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useContext, useEffect, useMemo, useRef } from 'react';\nimport { DndContext, DragOverlay, SortableContext, useTreeDndkitConfig } from '@elliemae/ds-drag-and-drop';\nimport { DSTreeviewT } from '../react-desc-prop-types';\nimport TreeViewContext from '../TreeViewContext';\nimport { TreeItem } from '../parts/TreeItem';\nimport { DnDTreeContext } from './DnDTreeContext';\nimport { DropIndicatorPosition } from './SortableItemContext';\nimport { toggleItemExpand } from '../utils/group-expands-helpers';\n\ntype FunctionalHOC = <T = unknown>(Component: React.ComponentType<T>, ...other: unknown[]) => (props: T) => JSX.Element;\n\nconst ensure = <T,>(argument: T | undefined | null, message = 'This should never happen'): T => {\n if (argument === undefined || argument === null) {\n throw new TypeError(message);\n }\n\n return argument;\n};\n\n// only wraps in \"DnDContext\" and \"DnDTreeContext\" if any Drag and Drop functionality is requested\nexport const withConditionalDnDRowContext: FunctionalHOC = (Component) => (props) => {\n const {\n props: { data, onOrderChange, getIsDropValid },\n flattenedItems,\n updateUserExpandedState,\n triggerTreeRerender,\n visibleItems: flattenedVisibleTree,\n withDragAndDrop,\n } = useContext(TreeViewContext);\n\n const flattenedVisibleTreeForDnD = useMemo(\n () =>\n flattenedVisibleTree.map((item, index) => ({\n uid: item.id.toString(),\n depth: (item.treeDepth ?? 1) - 1,\n realIndex: index,\n childrenCount: item.children?.length ?? 0,\n parentId: item.node.parent?.model?.id?.toString() ?? null,\n original: item,\n })),\n [flattenedVisibleTree],\n );\n\n const onReorder = useCallback(\n (tree: DSTreeviewT.DndItem[], indexes: { targetIndex: number; fromIndex: number }) => {\n // Pull the row's original data into an object\n const nodes: Record<DSTreeviewT.StringOrNum, DSTreeviewT.SimpleItem> = {};\n tree.forEach((item) => {\n const originalItem = item.original.model;\n originalItem.children = [];\n nodes[item.uid] = originalItem;\n });\n\n const newUserTree: DSTreeviewT.SimpleItem[] = [];\n tree.forEach((item) => {\n // If row has parent, insert it to it's subrows\n // otherwise append it to the new user data\n if (item.parentId !== null && item.parentId !== undefined && item.parentId !== '__ds_tree_root') {\n const parentNode = nodes[item.parentId];\n parentNode.children?.push(item.original.model);\n } else if (item.uid !== '__ds_tree_root') {\n newUserTree.push(item.original.model);\n }\n });\n // Tell the user that the order has change, he can chose to commit it or not\n onOrderChange(newUserTree, data, flattenedItems[indexes.fromIndex]);\n },\n [onOrderChange, data, flattenedItems],\n );\n\n const {\n dndContextProps,\n sortableContextProps,\n activeId,\n activeIndex,\n depth,\n dropIndicatorPosition,\n visibleItems,\n isDropValid,\n overId,\n } = useTreeDndkitConfig({\n flattenedItems,\n visibleItems: flattenedVisibleTreeForDnD,\n isHorizontalDnD: false,\n isExpandable: true,\n onReorder,\n getIsDropValid,\n maxDragAndDropLevel: Infinity,\n });\n\n const timeoutRef = useRef<NodeJS.Timeout>();\n\n useEffect(() => {\n if (timeoutRef.current) clearTimeout(timeoutRef.current);\n if (dropIndicatorPosition === DropIndicatorPosition.Inside && overId) {\n timeoutRef.current = setTimeout(() => {\n const overItem = visibleItems.find((item) => item.uid === overId);\n if (overItem) {\n const realOverItem = overItem.original;\n if (realOverItem.isGroup && !realOverItem.isExpanded) {\n toggleItemExpand(realOverItem, triggerTreeRerender, updateUserExpandedState);\n }\n }\n }, 1000);\n }\n }, [overId, dropIndicatorPosition, triggerTreeRerender, visibleItems, updateUserExpandedState]);\n\n if (withDragAndDrop)\n return (\n <DndContext {...dndContextProps}>\n <SortableContext {...sortableContextProps}>\n <DnDTreeContext.Provider\n value={{\n activeIndex,\n depth,\n visibleItems: visibleItems.map((item) => item.original),\n dropIndicatorPosition,\n isDropValid,\n }}\n >\n <Component {...props} />\n </DnDTreeContext.Provider>\n </SortableContext>\n <DragOverlay style={{ width: 'auto' }}>\n {activeId ? (\n <TreeItem\n itemIndex={activeIndex}\n item={ensure(flattenedVisibleTree.find((item) => item.id.toString() === activeId))}\n isDragOverlay\n />\n ) : null}\n </DragOverlay>\n </DndContext>\n );\n return <Component {...props} />;\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,SAAgB,aAAa,YAAY,WAAW,SAAS,cAAc;AAC3E,SAAS,YAAY,aAAa,iBAAiB,2BAA2B;AAE9E,OAAO,qBAAqB;AAC5B,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAC/B,SAAS,6BAA6B;AACtC,SAAS,wBAAwB;AAIjC,MAAM,SAAS,CAAK,UAAgC,UAAU,+BAAkC;AAC9F,MAAI,aAAa,UAAa,aAAa,MAAM;AAC/C,UAAM,IAAI,UAAU,OAAO;AAAA,EAC7B;AAEA,SAAO;AACT;AAGO,MAAM,+BAA8C,CAAC,cAAc,CAAC,UAAU;AACnF,QAAM;AAAA,IACJ,OAAO,EAAE,MAAM,eAAe,eAAe;AAAA,IAC7C;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,EACF,IAAI,WAAW,eAAe;AAE9B,QAAM,6BAA6B;AAAA,IACjC,MACE,qBAAqB,IAAI,CAAC,MAAM,WAAW;AAAA,MACzC,KAAK,KAAK,GAAG,SAAS;AAAA,MACtB,QAAQ,KAAK,aAAa,KAAK;AAAA,MAC/B,WAAW;AAAA,MACX,eAAe,KAAK,UAAU,UAAU;AAAA,MACxC,UAAU,KAAK,KAAK,QAAQ,OAAO,IAAI,SAAS,KAAK;AAAA,MACrD,UAAU;AAAA,IACZ,EAAE;AAAA,IACJ,CAAC,oBAAoB;AAAA,EACvB;AAEA,QAAM,YAAY;AAAA,IAChB,CAAC,MAA6B,YAAwD;AAEpF,YAAM,QAAiE,CAAC;AACxE,WAAK,QAAQ,CAAC,SAAS;AACrB,cAAM,eAAe,KAAK,SAAS;AACnC,qBAAa,WAAW,CAAC;AACzB,cAAM,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