@elliemae/ds-treeview 3.51.0-rc.15 → 3.51.0-rc.16

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.
@@ -42,6 +42,7 @@ const defaultProps = {
42
42
  selection: {},
43
43
  instanceRef: (0, import_react.createRef)(),
44
44
  isItemDisabled: () => false,
45
+ removeWidthMaxContent: false,
45
46
  disableIcons: false,
46
47
  disableActions: false,
47
48
  isMultiSelect: false,
@@ -68,11 +69,6 @@ const defaultProps = {
68
69
  itemIcon: null,
69
70
  searchQuery: "",
70
71
  applyAriaDisabled: false
71
- // workaround on the typings over the fact that
72
- // when we instantiate the context we can't have all the props
73
- // we only have a part of them but the final typings will include missing props
74
- // this is safe to do because
75
- // we will "mergeWithDefaults" + "validatePropTypes" when we do instantiate the context
76
72
  };
77
73
  const defaultRelativeMouseCoord = {
78
74
  isBefore: false,
@@ -85,6 +81,7 @@ const defaultRelativeMouseCoord = {
85
81
  relativeElementIndex: null
86
82
  };
87
83
  const defaultContext = {
84
+ // @ts-expect-error - this context handling is outdated, this should be an empty object anyway. Not touching treeview for now.
88
85
  props: defaultProps,
89
86
  visibleItems: [],
90
87
  flattenedItems: [],
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/TreeViewContext.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable no-unused-vars */\nimport { createContext, createRef } from 'react';\nimport type { DSTreeviewT } from './react-desc-prop-types.js';\nimport type { DSTreeviewInternalsT } from './sharedTypes.js';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction noop<T extends unknown[]>(..._args: T): void {}\n\nexport const defaultProps = {\n plugins: [],\n selection: {},\n instanceRef: createRef(),\n isItemDisabled: () => false,\n disableIcons: false,\n disableActions: false,\n isMultiSelect: false,\n isSingleSelect: false,\n getIsDropValid: () => true,\n showChildrenAmount: false,\n isLoading: false,\n highlightOnlyQuery: false,\n onItemClick: noop,\n onItemActivate: noop,\n onItemFocus: noop,\n onVisibleItemsChange: noop,\n onOrderChange: noop,\n onSelectionChange: noop,\n onExpandChange: noop,\n onInstanceRefInitialized: noop,\n rowSize: 'normal',\n labelOverflow: 'wrap',\n noItemsPlaceholder: 'No items found',\n nameKey: 'name',\n width: '100%',\n height: '100%',\n groupIcon: null,\n itemIcon: null,\n searchQuery: '',\n applyAriaDisabled: false,\n // workaround on the typings over the fact that\n // when we instantiate the context we can't have all the props\n // we only have a part of them but the final typings will include missing props\n // this is safe to do because\n // we will \"mergeWithDefaults\" + \"validatePropTypes\" when we do instantiate the context\n} as unknown as DSTreeviewT.Props;\n\nexport const defaultRelativeMouseCoord = {\n isBefore: false,\n isAfter: false,\n isValid: true,\n item: null,\n x: null,\n y: null,\n relativeElementDOMRect: null,\n relativeElementIndex: null,\n};\n\nconst defaultContext: DSTreeviewInternalsT.CTX = {\n props: defaultProps,\n visibleItems: [],\n flattenedItems: [],\n withRadioChecks: false,\n withCheckboxChecks: false,\n withDragAndDrop: false,\n triggerTreeRerender: noop,\n tree: undefined,\n treeRoot: undefined,\n virtualListHelpers: {\n virtualItems: [],\n totalSize: 0,\n scrollToOffset: noop,\n scrollToIndex: noop,\n measure: noop,\n },\n virtualListRef: undefined,\n uniqueTreeViewUUID: '',\n selectedItem: null,\n setSelectedItem: noop,\n focusedItem: null,\n setFocusedItem: noop,\n selectedCheckboxes: {},\n setInternallySelectedCheckboxes: noop,\n expandedGroups: {},\n setExpandedGroups: noop,\n latestToggledItem: null,\n setLatestToggledItem: noop,\n hoverItem: null,\n setHoverItem: noop,\n handleExpandGroup: noop,\n updateUserExpandedState: noop,\n};\n\n/** Context for cross component communication */\nconst TreeViewContext = createContext(defaultContext);\n\nexport default TreeViewContext;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;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;AAAA,EACpB,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,oBAAoB,CAAC;AAAA,EACrB,iCAAiC;AAAA,EACjC,gBAAgB,CAAC;AAAA,EACjB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,WAAW;AAAA,EACX,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,yBAAyB;AAC3B;AAGA,MAAM,sBAAkB,4BAAc,cAAc;AAEpD,IAAO,0BAAQ;",
4
+ "sourcesContent": ["/* eslint-disable no-unused-vars */\nimport { createContext, createRef } from 'react';\nimport type { DSTreeviewT } from './react-desc-prop-types.js';\nimport type { DSTreeviewInternalsT } from './sharedTypes.js';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction noop<T extends unknown[]>(..._args: T): void {}\n\nexport const defaultProps: DSTreeviewT.DefaultProps = {\n plugins: [],\n selection: {},\n instanceRef: createRef() as React.MutableRefObject<DSTreeviewT.InstanceRef>,\n isItemDisabled: () => false,\n removeWidthMaxContent: false,\n disableIcons: false,\n disableActions: false,\n isMultiSelect: false,\n isSingleSelect: false,\n getIsDropValid: () => true,\n showChildrenAmount: false,\n isLoading: false,\n highlightOnlyQuery: false,\n onItemClick: noop,\n onItemActivate: noop,\n onItemFocus: noop,\n onVisibleItemsChange: noop,\n onOrderChange: noop,\n onSelectionChange: noop,\n onExpandChange: noop,\n onInstanceRefInitialized: noop,\n rowSize: 'normal',\n labelOverflow: 'wrap',\n noItemsPlaceholder: 'No items found',\n nameKey: 'name',\n width: '100%',\n height: '100%',\n groupIcon: null,\n itemIcon: null,\n searchQuery: '',\n applyAriaDisabled: false,\n};\n\nexport const defaultRelativeMouseCoord = {\n isBefore: false,\n isAfter: false,\n isValid: true,\n item: null,\n x: null,\n y: null,\n relativeElementDOMRect: null,\n relativeElementIndex: null,\n};\n\nconst defaultContext: DSTreeviewInternalsT.CTX = {\n // @ts-expect-error - this context handling is outdated, this should be an empty object anyway. Not touching treeview for now.\n props: defaultProps,\n visibleItems: [],\n flattenedItems: [],\n withRadioChecks: false,\n withCheckboxChecks: false,\n withDragAndDrop: false,\n triggerTreeRerender: noop,\n tree: undefined,\n treeRoot: undefined,\n virtualListHelpers: {\n virtualItems: [],\n totalSize: 0,\n scrollToOffset: noop,\n scrollToIndex: noop,\n measure: noop,\n },\n virtualListRef: undefined,\n uniqueTreeViewUUID: '',\n selectedItem: null,\n setSelectedItem: noop,\n focusedItem: null,\n setFocusedItem: noop,\n selectedCheckboxes: {},\n setInternallySelectedCheckboxes: noop,\n expandedGroups: {},\n setExpandedGroups: noop,\n latestToggledItem: null,\n setLatestToggledItem: noop,\n hoverItem: null,\n setHoverItem: noop,\n handleExpandGroup: noop,\n updateUserExpandedState: noop,\n};\n\n/** Context for cross component communication */\nconst TreeViewContext = createContext(defaultContext);\n\nexport default TreeViewContext;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAyC;AAKzC,SAAS,QAA6B,OAAgB;AAAC;AAEhD,MAAM,eAAyC;AAAA,EACpD,SAAS,CAAC;AAAA,EACV,WAAW,CAAC;AAAA,EACZ,iBAAa,wBAAU;AAAA,EACvB,gBAAgB,MAAM;AAAA,EACtB,uBAAuB;AAAA,EACvB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB,MAAM;AAAA,EACtB,oBAAoB;AAAA,EACpB,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,sBAAsB;AAAA,EACtB,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,0BAA0B;AAAA,EAC1B,SAAS;AAAA,EACT,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,UAAU;AAAA,EACV,aAAa;AAAA,EACb,mBAAmB;AACrB;AAEO,MAAM,4BAA4B;AAAA,EACvC,UAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA,EACT,MAAM;AAAA,EACN,GAAG;AAAA,EACH,GAAG;AAAA,EACH,wBAAwB;AAAA,EACxB,sBAAsB;AACxB;AAEA,MAAM,iBAA2C;AAAA;AAAA,EAE/C,OAAO;AAAA,EACP,cAAc,CAAC;AAAA,EACf,gBAAgB,CAAC;AAAA,EACjB,iBAAiB;AAAA,EACjB,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,MAAM;AAAA,EACN,UAAU;AAAA,EACV,oBAAoB;AAAA,IAClB,cAAc,CAAC;AAAA,IACf,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,SAAS;AAAA,EACX;AAAA,EACA,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,oBAAoB,CAAC;AAAA,EACrB,iCAAiC;AAAA,EACjC,gBAAgB,CAAC;AAAA,EACjB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,WAAW;AAAA,EACX,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,yBAAyB;AAC3B;AAGA,MAAM,sBAAkB,4BAAc,cAAc;AAEpD,IAAO,0BAAQ;",
6
6
  "names": []
7
7
  }
@@ -56,7 +56,7 @@ const LegacyTreeListWrapper = (0, import_ds_classnames.aggregatedClasses)("ul",
56
56
  [`rowsize-${rowSize}`]: rowSize
57
57
  }));
58
58
  const TreeListWrapper = import_ds_system.styled.div`
59
- width: max-content;
59
+ ${({ $removeWidthMaxContent }) => $removeWidthMaxContent ? "" : "width: max-content;"}
60
60
  height: 100%;
61
61
 
62
62
  // Item content
@@ -109,12 +109,12 @@ const TreeListComp = () => {
109
109
  virtualListRef,
110
110
  virtualListHelpers,
111
111
  visibleItems: flattenedVisibleItems,
112
- props: { width, height, rowSize, noItemsPlaceholder, isLoading }
112
+ props: { width, height, rowSize, noItemsPlaceholder, isLoading, removeWidthMaxContent }
113
113
  } = ctx;
114
114
  const { totalSize, virtualItems } = virtualListHelpers;
115
115
  const className = `${rowSize === "compact" ? `${compactRowClass}` : `${normaRowClass}`}`;
116
116
  const { visibleItems } = (0, import_react.useContext)(import_DnDTreeContext.DnDTreeContext);
117
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TreeListWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
117
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TreeListWrapper, { $removeWidthMaxContent: removeWidthMaxContent, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
118
118
  LegacyTreeListWrapper,
119
119
  {
120
120
  ref: virtualListRef,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/TreeList.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
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';\nimport { styled } from '@elliemae/ds-system';\nimport TreeViewContext from '../TreeViewContext.js';\nimport { DSTreeViewPrefix, treeListBlockName } from '../config/cssClassesConstants.js';\nimport TreeItem from './TreeItem.js';\nimport type { DSTreeviewT } from '../react-desc-prop-types.js';\nimport { withConditionalDnDRowContext } from '../hoc/WithConditionalDnDContext.js';\nimport { DnDTreeContext } from '../hoc/DnDTreeContext.js';\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}\nconst LegacyTreeListWrapper = 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\nexport const TreeListWrapper = styled.div`\n width: max-content;\n height: 100%;\n\n // Item content\n .em-ds-tree-item.hover {\n &[aria-disabled='true'] {\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n }\n }\n\n .em-ds-tree-item.selected {\n &[aria-disabled='true'] {\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n }\n }\n\n .em-ds-tree-item.hover.selected {\n &[aria-disabled='true'] {\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n }\n }\n\n // DnD Handle\n .em-ds-icon.drag-handle {\n &[aria-disabled='true'] {\n cursor: not-allowed;\n fill: ${({ theme }) => theme.colors.neutral['500']};\n }\n }\n\n // Item left icon\n .em-ds-icon.tree-item-icon.tree-item-icon-disabled {\n fill: ${({ theme }) => theme.colors.neutral['500']};\n }\n\n // Rigth addons\n .em-ds-tree-item--dragging.em-ds-tree-item__addons.em-ds-icon {\n fill: ${({ theme }) => theme.colors.neutral['600']};\n }\n\n //Count displayer\n .em-ds-tree-item-children-count-displayer {\n color: ${({ theme }) => theme.colors.neutral['700']};\n }\n`;\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 <LegacyTreeListWrapper\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 </LegacyTreeListWrapper>\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;ADwGjB;AAvGN,mBAAkC;AAClC,2BAAkC;AAClC,4CAA4C;AAC5C,uBAAuB;AACvB,6BAA4B;AAC5B,iCAAoD;AACpD,sBAAqB;AAErB,uCAA6C;AAC7C,4BAA+B;AAExB,MAAM,oBAAoB,GAAG,4CAAiB;AAC9C,MAAM,sBAAkB,wCAAkB,OAAO;AAAA,EACtD,eAAe;AACjB,CAAC,EAAE,iBAAiB;AAOpB,MAAM,4BAAwB,wCAAkB,MAAM;AAAA,EACpD,eAAe;AAAA,EACf,MAAM;AACR,CAAC,EAAE,8CAAmB,MAAM,CAAC,EAAE,QAAQ,OAA0C;AAAA,EAC/E,CAAC,WAAW,OAAO,EAAE,GAAG;AAC1B,EAAE;AAEK,MAAM,kBAAkB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAOZ,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAM1C,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAM1C,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAQtD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAM5C,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAA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AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,QAAQ,GAAG,SAAS;AAAA,cACpB,OAAO;AAAA,cACP,UAAU;AAAA,YACZ;AAAA,YAEC,uBAAa,IAAI,CAAC,gBAAgB;AACjC,oBAAM,EAAE,OAAO,YAAY,MAAM,IAAI;AACrC,oBAAM,QAAQ,gBAAgB,uBAAuB,KAAK;AAC1D,kBAAI,CAAC,KAAM,QAAO;AAClB,mBAAK,eAAe;AACpB,oBAAM,EAAE,GAAG,IAAI;AAEf,oBAAM,QAAQ;AAAA,gBACZ,UAAU;AAAA,gBACV,KAAK,GAAG,KAAK;AAAA,gBACb,MAAM;AAAA,gBACN,OAAO;AAAA,cACT;AAEA,oBAAM,gBAAgB;AAAA,gBACpB,KAAK,yBAAyB,EAAE;AAAA,gBAChC,gBAAgB;AAAA,gBAChB;AAAA;AAAA,gBACA,WAAW;AAAA,gBACX;AAAA,gBACA,kBAAkB;AAAA,cACpB;AAEA,qBAAO,4CAAC,gBAAAC,SAAA,EAAU,GAAG,eAAe;AAAA,YACtC,CAAC;AAAA;AAAA,QACH,IACE;AAAA;AAAA;AAAA,EACN,GACF;AAEJ;AAEO,MAAM,eAAW,+DAA6B,YAAY;",
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';\nimport { styled } from '@elliemae/ds-system';\nimport TreeViewContext from '../TreeViewContext.js';\nimport { DSTreeViewPrefix, treeListBlockName } from '../config/cssClassesConstants.js';\nimport TreeItem from './TreeItem.js';\nimport type { DSTreeviewT } from '../react-desc-prop-types.js';\nimport { withConditionalDnDRowContext } from '../hoc/WithConditionalDnDContext.js';\nimport { DnDTreeContext } from '../hoc/DnDTreeContext.js';\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}\nconst LegacyTreeListWrapper = 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\nexport const TreeListWrapper = styled.div<{ $removeWidthMaxContent?: boolean }>`\n ${({ $removeWidthMaxContent }) => ($removeWidthMaxContent ? '' : 'width: max-content;')}\n height: 100%;\n\n // Item content\n .em-ds-tree-item.hover {\n &[aria-disabled='true'] {\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n }\n }\n\n .em-ds-tree-item.selected {\n &[aria-disabled='true'] {\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n }\n }\n\n .em-ds-tree-item.hover.selected {\n &[aria-disabled='true'] {\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n }\n }\n\n // DnD Handle\n .em-ds-icon.drag-handle {\n &[aria-disabled='true'] {\n cursor: not-allowed;\n fill: ${({ theme }) => theme.colors.neutral['500']};\n }\n }\n\n // Item left icon\n .em-ds-icon.tree-item-icon.tree-item-icon-disabled {\n fill: ${({ theme }) => theme.colors.neutral['500']};\n }\n\n // Rigth addons\n .em-ds-tree-item--dragging.em-ds-tree-item__addons.em-ds-icon {\n fill: ${({ theme }) => theme.colors.neutral['600']};\n }\n\n //Count displayer\n .em-ds-tree-item-children-count-displayer {\n color: ${({ theme }) => theme.colors.neutral['700']};\n }\n`;\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, removeWidthMaxContent },\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 $removeWidthMaxContent={removeWidthMaxContent}>\n <LegacyTreeListWrapper\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 </LegacyTreeListWrapper>\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;ADwGjB;AAvGN,mBAAkC;AAClC,2BAAkC;AAClC,4CAA4C;AAC5C,uBAAuB;AACvB,6BAA4B;AAC5B,iCAAoD;AACpD,sBAAqB;AAErB,uCAA6C;AAC7C,4BAA+B;AAExB,MAAM,oBAAoB,GAAG,4CAAiB;AAC9C,MAAM,sBAAkB,wCAAkB,OAAO;AAAA,EACtD,eAAe;AACjB,CAAC,EAAE,iBAAiB;AAOpB,MAAM,4BAAwB,wCAAkB,MAAM;AAAA,EACpD,eAAe;AAAA,EACf,MAAM;AACR,CAAC,EAAE,8CAAmB,MAAM,CAAC,EAAE,QAAQ,OAA0C;AAAA,EAC/E,CAAC,WAAW,OAAO,EAAE,GAAG;AAC1B,EAAE;AAEK,MAAM,kBAAkB,wBAAO;AAAA,IAClC,CAAC,EAAE,uBAAuB,MAAO,yBAAyB,KAAK,qBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAM/D,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAM1C,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAM1C,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,cAQtD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK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AO,aAAa,OAAO;AAAA;AAAA,QAC3G,IACE;AAAA,QACH,CAAC,aAAa,aAAa,WAAW,IAAI,4CAAC,mBAAiB,8BAAmB,IAAqB;AAAA,QACpG,CAAC,aAAa,aAAa,WAAW,IACrC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,QAAQ,GAAG,SAAS;AAAA,cACpB,OAAO;AAAA,cACP,UAAU;AAAA,YACZ;AAAA,YAEC,uBAAa,IAAI,CAAC,gBAAgB;AACjC,oBAAM,EAAE,OAAO,YAAY,MAAM,IAAI;AACrC,oBAAM,QAAQ,gBAAgB,uBAAuB,KAAK;AAC1D,kBAAI,CAAC,KAAM,QAAO;AAClB,mBAAK,eAAe;AACpB,oBAAM,EAAE,GAAG,IAAI;AAEf,oBAAM,QAAQ;AAAA,gBACZ,UAAU;AAAA,gBACV,KAAK,GAAG,KAAK;AAAA,gBACb,MAAM;AAAA,gBACN,OAAO;AAAA,cACT;AAEA,oBAAM,gBAAgB;AAAA,gBACpB,KAAK,yBAAyB,EAAE;AAAA,gBAChC,gBAAgB;AAAA,gBAChB;AAAA;AAAA,gBACA,WAAW;AAAA,gBACX;AAAA,gBACA,kBAAkB;AAAA,cACpB;AAEA,qBAAO,4CAAC,gBAAAC,SAAA,EAAU,GAAG,eAAe;AAAA,YACtC,CAAC;AAAA;AAAA,QACH,IACE;AAAA;AAAA;AAAA,EACN,GACF;AAEJ;AAEO,MAAM,eAAW,+DAA6B,YAAY;",
6
6
  "names": ["TreeViewContext", "TreeItem"]
7
7
  }
@@ -88,6 +88,7 @@ const TreeViewPropTypes = {
88
88
  highlightOnlyQuery: import_ds_props_helpers.PropTypes.bool.description("whether to highlight results or not").defaultValue(false),
89
89
  applyAriaDisabled: import_ds_props_helpers.PropTypes.bool.description(
90
90
  "Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION"
91
- ).defaultValue(false)
91
+ ).defaultValue(false),
92
+ removeWidthMaxContent: import_ds_props_helpers.PropTypes.bool.description("Whether the list wrapper should apply width:max-content to the list items.").defaultValue(false)
92
93
  };
93
94
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-lines */\nimport type React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport type TreeModel from 'tree-model';\nimport type { useVirtual } from 'react-virtual';\nexport declare namespace DSTreeviewT {\n export type StringOrNum = string | number;\n export type SelectionState = boolean | 'mixed';\n export type SelectionItems = Record<StringOrNum, SelectionState>;\n export type ScrollToFunc = ReturnType<typeof useVirtual>['scrollToIndex'];\n export type ScrollToItemOptions = Parameters<ReturnType<typeof useVirtual>['scrollToIndex']>[1];\n export type ScrollToItemFunc = (options: ScrollToItemOptions) => void;\n export type ExpandedItems = Record<StringOrNum, true>; // { [id]:true } -> e.g. {1:true; 2:true} // false are not listed\n export interface SimpleItem {\n [key: string]: unknown;\n name: string;\n children?: SimpleItem[];\n id: StringOrNum;\n }\n\n export interface Item extends SimpleItem {\n children: Item[];\n treeDepth?: number;\n virtualIndex?: number;\n isChecked?: boolean | 'mixed';\n isGroup?: boolean;\n isExpanded?: boolean;\n disableActions?: boolean;\n childrenMatchesSearchQuery?: boolean;\n matchesSearchQuery?: boolean;\n nodeItemRef?: React.RefObject<HTMLLIElement>;\n model: TreeModel.Node<Item>['model'];\n node: TreeModel.Node<Item> & { parent?: TreeModel.Node<Item> };\n nodePath: TreeModel.Node<Item>[];\n }\n\n export interface DndItem {\n uid: string;\n depth: number;\n realIndex: number;\n childrenCount: number;\n parentId: string | null;\n original: DSTreeviewT.Item;\n }\n\n export interface Actions {\n toggleExpandAll: (isExpand: boolean) => Promise<DSTreeviewT.Item[]>;\n scrollTo: DSTreeviewT.ScrollToFunc;\n setSelectedItemByVirtualIndex: (index: number) => void;\n setFocusedItemByVirtualIndex: (\n index: number,\n scrollOpts: DSTreeviewT.ScrollToItemOptions & { withScroll?: boolean },\n ) => void;\n }\n export interface InstanceRef {\n actions: Actions;\n }\n\n export interface DefaultProps {\n plugins: string[];\n selection: SelectionItems;\n instanceRef: React.MutableRefObject<InstanceRef>;\n isItemDisabled: (item: Item) => boolean;\n disableIcons: boolean;\n isMultiSelect: boolean;\n isSingleSelect: boolean;\n getIsDropValid: (\n active: DndItem,\n over: DndItem,\n dropIndicatorPosition: 'none' | 'before' | 'after' | 'inside',\n ) => boolean;\n showChildrenAmount: boolean;\n isLoading: boolean;\n highlightOnlyQuery: boolean;\n onItemClick: (item: Item, e: React.MouseEvent<HTMLLIElement>) => void;\n onItemActivate: (item: Item, e?: React.MouseEvent<HTMLLIElement> | React.KeyboardEvent<HTMLLIElement>) => void;\n onItemFocus: (meta: { scrollToItem: ScrollToItemFunc; itemIndex: number; item: Item }) => void;\n onVisibleItemsChange: (newVisibleItems: Item[]) => void;\n onOrderChange: (newData: SimpleItem[], oldData: SimpleItem[], draggedItem: DndItem) => void;\n onSelectionChange: (\n selection: SelectionItems,\n item: Item,\n meta: { scrollToItem: ScrollToItemFunc; itemIndex: number },\n ) => void;\n onExpandChange: (expandedHashmap: ExpandedItems, itemToggled: Item | null | undefined) => void;\n onInstanceRefInitialized: (instanceRef: React.MutableRefObject<InstanceRef>) => void;\n rowSize: 'normal' | 'compact';\n labelOverflow: 'wrap' | 'wrap-all' | 'truncate';\n noItemsPlaceholder: string;\n nameKey: string;\n width: StringOrNum;\n height: StringOrNum;\n groupIcon: JSX.Element | null;\n itemIcon: JSX.Element | null;\n searchQuery: string;\n applyAriaDisabled: boolean;\n }\n export interface PropsOptional {\n controlledSelection: SelectionItems;\n expanded: ExpandedItems;\n rightAddons: ((item: Item) => React.ReactNode[]) | JSX.Element;\n RightAddons: React.ComponentType<{ item: Item }>;\n }\n export interface PropsRequired {\n data: Item[];\n }\n export interface Props extends DefaultProps, PropsOptional, PropsRequired {}\n}\n\nexport const TreeViewPropTypes = {\n data: PropTypes.arrayOf(\n PropTypes.shape({\n children: PropTypes.arrayOf(PropTypes.object),\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n isGroup: PropTypes.oneOfType([PropTypes.oneOf([undefined, null]), PropTypes.bool]),\n disableActions: PropTypes.bool.description('whether to disable drag & drop and expand/collapse actions or not'),\n name: PropTypes.string,\n node: PropTypes.object,\n }),\n ).description('data to populate tree view').isRequired,\n plugins: PropTypes.tuple([PropTypes.oneOf(['tree-dnd'])])\n .description(\n 'only accepted value is TreeDndPlugin constant\\nother legacy plugins are now supported via different props',\n )\n .defaultValue([]),\n selection: PropTypes.object.description('pre selected items').defaultValue({}),\n RightAddons: PropTypes.func\n .description('A React component that will be rendered on the right side of each rows')\n .signature('React.ComponentType<{item}>'),\n expanded: PropTypes.object.description('control what items are expanded').defaultValue(undefined),\n instanceRef: PropTypes.shape({\n current: PropTypes.oneOfType([\n PropTypes.oneOf([null, undefined]),\n PropTypes.shape({\n actions: PropTypes.shape({\n toggleExpandAll: PropTypes.func,\n scrollTo: PropTypes.func,\n }).description('').isRequired,\n }),\n ]),\n }).description('instance ref'),\n isItemDisabled: PropTypes.func\n .description('Function that receives an item, and returns whether that item should be disabled')\n .defaultValue('() => false'),\n disableIcons: PropTypes.bool.description('disable icons').defaultValue(false),\n isMultiSelect: PropTypes.bool.description('whether the tree view is multi select or not').defaultValue(false),\n isSingleSelect: PropTypes.bool.description('wheter the tree view is single select or not').defaultValue(false),\n isLoading: PropTypes.bool.description('wheter the tree should show the loading state or not').defaultValue(false),\n getIsDropValid: PropTypes.func\n .description(\"Function that returns true if the drop is valid and false if it's not\")\n .defaultValue('() => true'),\n showChildrenAmount: PropTypes.bool.description('whether to show the amount of children or not').defaultValue(false),\n onItemClick: PropTypes.func.description('function executed when clicking on an item').defaultValue('() => {}'),\n onItemActivate: PropTypes.func.description('function executed when an item gets activated').defaultValue('() => {}'),\n onItemFocus: PropTypes.func.description('function executed when focusing on an item').defaultValue('() => {}'),\n onVisibleItemsChange: PropTypes.func\n .description('function executed when the visible items change')\n .defaultValue('() => {}'),\n onOrderChange: PropTypes.func.description('function executed when the items order changes').defaultValue('() => {}'),\n onSelectionChange: PropTypes.func\n .description('function executed when the selection changes')\n .defaultValue('() => {}'),\n onExpandChange: PropTypes.func.description('function executed when expanding an item').defaultValue('() => {}'),\n onInstanceRefInitialized: PropTypes.func\n .description('function executed when instanceRef has terminated instanciation')\n .defaultValue('() => {}'),\n rowSize: PropTypes.oneOf(['normal', 'compact']).description('size of the row').defaultValue('normal'),\n labelOverflow: PropTypes.oneOf(['wrap', 'wrap-all', 'truncate'])\n .description('label truncation preference')\n .defaultValue('wrap'),\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('components width').defaultValue('100%'),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('components height')\n .defaultValue('100%'),\n groupIcon: PropTypes.node.description('icon for groups'),\n itemIcon: PropTypes.node.description('icon for items'),\n searchQuery: PropTypes.string.description('search query value'),\n noItemsPlaceholder: PropTypes.string\n .description('message to be shown when there are no items in the treeview to be displayed')\n .defaultValue('No items found'),\n nameKey: PropTypes.string.description('property key to identifier for items labels').defaultValue('name'),\n highlightOnlyQuery: PropTypes.bool.description('whether to highlight results or not').defaultValue(false),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION',\n )\n .defaultValue(false),\n} as ValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAA0B;AA4GnB,MAAM,oBAAoB;AAAA,EAC/B,MAAM,kCAAU;AAAA,IACd,kCAAU,MAAM;AAAA,MACd,UAAU,k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AU,KAAK,YAAY,iBAAiB;AAAA,EACvD,UAAU,kCAAU,KAAK,YAAY,gBAAgB;AAAA,EACrD,aAAa,kCAAU,OAAO,YAAY,oBAAoB;AAAA,EAC9D,oBAAoB,kCAAU,OAC3B,YAAY,6EAA6E,EACzF,aAAa,gBAAgB;AAAA,EAChC,SAAS,kCAAU,OAAO,YAAY,6CAA6C,EAAE,aAAa,MAAM;AAAA,EACxG,oBAAoB,kCAAU,KAAK,YAAY,qCAAqC,EAAE,aAAa,KAAK;AAAA,EACxG,mBAAmB,kCAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AACvB;",
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport type React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport type TreeModel from 'tree-model';\nimport type { useVirtual } from 'react-virtual';\nexport declare namespace DSTreeviewT {\n export type StringOrNum = string | number;\n export type SelectionState = boolean | 'mixed';\n export type SelectionItems = Record<StringOrNum, SelectionState>;\n export type ScrollToFunc = ReturnType<typeof useVirtual>['scrollToIndex'];\n export type ScrollToItemOptions = Parameters<ReturnType<typeof useVirtual>['scrollToIndex']>[1];\n export type ScrollToItemFunc = (options: ScrollToItemOptions) => void;\n export type ExpandedItems = Record<StringOrNum, true>; // { [id]:true } -> e.g. {1:true; 2:true} // false are not listed\n export interface SimpleItem {\n [key: string]: unknown;\n name: string;\n children?: SimpleItem[];\n id: StringOrNum;\n }\n\n export interface Item extends SimpleItem {\n children: Item[];\n treeDepth?: number;\n virtualIndex?: number;\n isChecked?: boolean | 'mixed';\n isGroup?: boolean;\n isExpanded?: boolean;\n disableActions?: boolean;\n childrenMatchesSearchQuery?: boolean;\n matchesSearchQuery?: boolean;\n nodeItemRef?: React.RefObject<HTMLLIElement>;\n model: TreeModel.Node<Item>['model'];\n node: TreeModel.Node<Item> & { parent?: TreeModel.Node<Item> };\n nodePath: TreeModel.Node<Item>[];\n }\n\n export interface DndItem {\n uid: string;\n depth: number;\n realIndex: number;\n childrenCount: number;\n parentId: string | null;\n original: DSTreeviewT.Item;\n }\n\n export interface Actions {\n toggleExpandAll: (isExpand: boolean) => Promise<DSTreeviewT.Item[]>;\n scrollTo: DSTreeviewT.ScrollToFunc;\n setSelectedItemByVirtualIndex: (index: number) => void;\n setFocusedItemByVirtualIndex: (\n index: number,\n scrollOpts: DSTreeviewT.ScrollToItemOptions & { withScroll?: boolean },\n ) => void;\n }\n export interface InstanceRef {\n actions: Actions;\n }\n\n export interface DefaultProps {\n plugins: string[];\n selection: SelectionItems;\n instanceRef: React.MutableRefObject<InstanceRef>;\n isItemDisabled: (item: Item) => boolean;\n disableActions: boolean;\n disableIcons: boolean;\n isMultiSelect: boolean;\n isSingleSelect: boolean;\n getIsDropValid: (\n active: DndItem,\n over: DndItem,\n dropIndicatorPosition: 'none' | 'before' | 'after' | 'inside',\n ) => boolean;\n showChildrenAmount: boolean;\n isLoading: boolean;\n highlightOnlyQuery: boolean;\n onItemClick: (item: Item, e: React.MouseEvent<HTMLLIElement>) => void;\n onItemActivate: (item: Item, e?: React.MouseEvent<HTMLLIElement> | React.KeyboardEvent<HTMLLIElement>) => void;\n onItemFocus: (meta: { scrollToItem: ScrollToItemFunc; itemIndex: number; item: Item }) => void;\n onVisibleItemsChange: (newVisibleItems: Item[]) => void;\n onOrderChange: (newData: SimpleItem[], oldData: SimpleItem[], draggedItem: DndItem) => void;\n onSelectionChange: (\n selection: SelectionItems,\n item: Item,\n meta: { scrollToItem: ScrollToItemFunc; itemIndex: number },\n ) => void;\n onExpandChange: (expandedHashmap: ExpandedItems, itemToggled: Item | null | undefined) => void;\n onInstanceRefInitialized: (instanceRef: React.MutableRefObject<InstanceRef>) => void;\n rowSize: 'normal' | 'compact';\n labelOverflow: 'wrap' | 'wrap-all' | 'truncate';\n noItemsPlaceholder: string;\n nameKey: string;\n width: StringOrNum;\n height: StringOrNum;\n groupIcon: JSX.Element | null;\n itemIcon: JSX.Element | null;\n searchQuery: string;\n applyAriaDisabled: boolean;\n removeWidthMaxContent: boolean;\n }\n export interface PropsOptional {\n controlledSelection: SelectionItems;\n expanded: ExpandedItems;\n rightAddons: ((item: Item) => React.ReactNode[]) | JSX.Element;\n RightAddons: React.ComponentType<{ item: Item }>;\n }\n export interface PropsRequired {\n data: Item[];\n }\n export interface Props extends DefaultProps, PropsOptional, PropsRequired {}\n}\n\nexport const TreeViewPropTypes = {\n data: PropTypes.arrayOf(\n PropTypes.shape({\n children: PropTypes.arrayOf(PropTypes.object),\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n isGroup: PropTypes.oneOfType([PropTypes.oneOf([undefined, null]), PropTypes.bool]),\n disableActions: PropTypes.bool.description('whether to disable drag & drop and expand/collapse actions or not'),\n name: PropTypes.string,\n node: PropTypes.object,\n }),\n ).description('data to populate tree view').isRequired,\n plugins: PropTypes.tuple([PropTypes.oneOf(['tree-dnd'])])\n .description(\n 'only accepted value is TreeDndPlugin constant\\nother legacy plugins are now supported via different props',\n )\n .defaultValue([]),\n selection: PropTypes.object.description('pre selected items').defaultValue({}),\n RightAddons: PropTypes.func\n .description('A React component that will be rendered on the right side of each rows')\n .signature('React.ComponentType<{item}>'),\n expanded: PropTypes.object.description('control what items are expanded').defaultValue(undefined),\n instanceRef: PropTypes.shape({\n current: PropTypes.oneOfType([\n PropTypes.oneOf([null, undefined]),\n PropTypes.shape({\n actions: PropTypes.shape({\n toggleExpandAll: PropTypes.func,\n scrollTo: PropTypes.func,\n }).description('').isRequired,\n }),\n ]),\n }).description('instance ref'),\n isItemDisabled: PropTypes.func\n .description('Function that receives an item, and returns whether that item should be disabled')\n .defaultValue('() => false'),\n disableIcons: PropTypes.bool.description('disable icons').defaultValue(false),\n isMultiSelect: PropTypes.bool.description('whether the tree view is multi select or not').defaultValue(false),\n isSingleSelect: PropTypes.bool.description('wheter the tree view is single select or not').defaultValue(false),\n isLoading: PropTypes.bool.description('wheter the tree should show the loading state or not').defaultValue(false),\n getIsDropValid: PropTypes.func\n .description(\"Function that returns true if the drop is valid and false if it's not\")\n .defaultValue('() => true'),\n showChildrenAmount: PropTypes.bool.description('whether to show the amount of children or not').defaultValue(false),\n onItemClick: PropTypes.func.description('function executed when clicking on an item').defaultValue('() => {}'),\n onItemActivate: PropTypes.func.description('function executed when an item gets activated').defaultValue('() => {}'),\n onItemFocus: PropTypes.func.description('function executed when focusing on an item').defaultValue('() => {}'),\n onVisibleItemsChange: PropTypes.func\n .description('function executed when the visible items change')\n .defaultValue('() => {}'),\n onOrderChange: PropTypes.func.description('function executed when the items order changes').defaultValue('() => {}'),\n onSelectionChange: PropTypes.func\n .description('function executed when the selection changes')\n .defaultValue('() => {}'),\n onExpandChange: PropTypes.func.description('function executed when expanding an item').defaultValue('() => {}'),\n onInstanceRefInitialized: PropTypes.func\n .description('function executed when instanceRef has terminated instanciation')\n .defaultValue('() => {}'),\n rowSize: PropTypes.oneOf(['normal', 'compact']).description('size of the row').defaultValue('normal'),\n labelOverflow: PropTypes.oneOf(['wrap', 'wrap-all', 'truncate'])\n .description('label truncation preference')\n .defaultValue('wrap'),\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('components width').defaultValue('100%'),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('components height')\n .defaultValue('100%'),\n groupIcon: PropTypes.node.description('icon for groups'),\n itemIcon: PropTypes.node.description('icon for items'),\n searchQuery: PropTypes.string.description('search query value'),\n noItemsPlaceholder: PropTypes.string\n .description('message to be shown when there are no items in the treeview to be displayed')\n .defaultValue('No items found'),\n nameKey: PropTypes.string.description('property key to identifier for items labels').defaultValue('name'),\n highlightOnlyQuery: PropTypes.bool.description('whether to highlight results or not').defaultValue(false),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION',\n )\n .defaultValue(false),\n removeWidthMaxContent: PropTypes.bool\n .description('Whether the list wrapper should apply width:max-content to the list items.')\n .defaultValue(false),\n} as ValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAA0B;AA8GnB,MAAM,oBAAoB;AAAA,EAC/B,MAAM,kCAAU;AAAA,IACd,kCAAU,MAAM;AAAA,MACd,UAAU,kCAAU,QAAQ,kCAAU,MAAM;AAAA,MAC5C,IAAI,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC;AAAA,MAC5D,SAAS,kCAAU,UAAU,CAAC,kCAAU,MAAM,CAAC,QAAW,IAAI,CAAC,GAAG,kCAAU,IAAI,CAAC;AAAA,MACjF,gBAAgB,kCAAU,KAAK,YAAY,mEAAmE;AAAA,MAC9G,MAAM,kCAAU;AAAA,MAChB,MAAM,kCAAU;AAAA,IAClB,CAAC;AAAA,EACH,EAAE,YAAY,4BAA4B,EAAE;AAAA,EAC5C,SAAS,kCAAU,MAAM,CAAC,kCAAU,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EACrD;AAAA,IACC;AAAA,EACF,EACC,aAAa,CAAC,CAAC;AAAA,EAClB,WAAW,kCAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,CAAC,CAAC;AAAA,EAC7E,aAAa,kCAAU,KACpB,YAAY,wEAAwE,EACpF,UAAU,6BAA6B;AAAA,EAC1C,UAAU,kCAAU,OAAO,YAAY,iCAAiC,EAAE,aAAa,MAAS;AAAA,EAChG,aAAa,kCAAU,MAAM;AAAA,IAC3B,SAAS,kCAAU,UAAU;AAAA,MAC3B,kCAAU,MAAM,CAAC,MAAM,MAAS,CAAC;AAAA,MACjC,kCAAU,MAAM;AAAA,QACd,SAAS,kCAAU,MAAM;AAAA,UACvB,iBAAiB,kCAAU;AAAA,UAC3B,UAAU,kCAAU;AAAA,QACtB,CAAC,EAAE,YAAY,EAA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,EAC5D,YAAY,6BAA6B,EACzC,aAAa,MAAM;AAAA,EACtB,OAAO,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAAE,YAAY,kBAAkB,EAAE,aAAa,MAAM;AAAA,EACpH,QAAQ,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAC7D,YAAY,mBAAmB,EAC/B,aAAa,MAAM;AAAA,EACtB,WAAW,kCAAU,KAAK,YAAY,iBAAiB;AAAA,EACvD,UAAU,kCAAU,KAAK,YAAY,gBAAgB;AAAA,EACrD,aAAa,kCAAU,OAAO,YAAY,oBAAoB;AAAA,EAC9D,oBAAoB,kCAAU,OAC3B,YAAY,6EAA6E,EACzF,aAAa,gBAAgB;AAAA,EAChC,SAAS,kCAAU,OAAO,YAAY,6CAA6C,EAAE,aAAa,MAAM;AAAA,EACxG,oBAAoB,kCAAU,KAAK,YAAY,qCAAqC,EAAE,aAAa,KAAK;AAAA,EACxG,mBAAmB,kCAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,uBAAuB,kCAAU,KAC9B,YAAY,4EAA4E,EACxF,aAAa,KAAK;AACvB;",
6
6
  "names": []
7
7
  }
@@ -7,6 +7,7 @@ const defaultProps = {
7
7
  selection: {},
8
8
  instanceRef: createRef(),
9
9
  isItemDisabled: () => false,
10
+ removeWidthMaxContent: false,
10
11
  disableIcons: false,
11
12
  disableActions: false,
12
13
  isMultiSelect: false,
@@ -33,11 +34,6 @@ const defaultProps = {
33
34
  itemIcon: null,
34
35
  searchQuery: "",
35
36
  applyAriaDisabled: false
36
- // workaround on the typings over the fact that
37
- // when we instantiate the context we can't have all the props
38
- // we only have a part of them but the final typings will include missing props
39
- // this is safe to do because
40
- // we will "mergeWithDefaults" + "validatePropTypes" when we do instantiate the context
41
37
  };
42
38
  const defaultRelativeMouseCoord = {
43
39
  isBefore: false,
@@ -50,6 +46,7 @@ const defaultRelativeMouseCoord = {
50
46
  relativeElementIndex: null
51
47
  };
52
48
  const defaultContext = {
49
+ // @ts-expect-error - this context handling is outdated, this should be an empty object anyway. Not touching treeview for now.
53
50
  props: defaultProps,
54
51
  visibleItems: [],
55
52
  flattenedItems: [],
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/TreeViewContext.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\nimport { createContext, createRef } from 'react';\nimport type { DSTreeviewT } from './react-desc-prop-types.js';\nimport type { DSTreeviewInternalsT } from './sharedTypes.js';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction noop<T extends unknown[]>(..._args: T): void {}\n\nexport const defaultProps = {\n plugins: [],\n selection: {},\n instanceRef: createRef(),\n isItemDisabled: () => false,\n disableIcons: false,\n disableActions: false,\n isMultiSelect: false,\n isSingleSelect: false,\n getIsDropValid: () => true,\n showChildrenAmount: false,\n isLoading: false,\n highlightOnlyQuery: false,\n onItemClick: noop,\n onItemActivate: noop,\n onItemFocus: noop,\n onVisibleItemsChange: noop,\n onOrderChange: noop,\n onSelectionChange: noop,\n onExpandChange: noop,\n onInstanceRefInitialized: noop,\n rowSize: 'normal',\n labelOverflow: 'wrap',\n noItemsPlaceholder: 'No items found',\n nameKey: 'name',\n width: '100%',\n height: '100%',\n groupIcon: null,\n itemIcon: null,\n searchQuery: '',\n applyAriaDisabled: false,\n // workaround on the typings over the fact that\n // when we instantiate the context we can't have all the props\n // we only have a part of them but the final typings will include missing props\n // this is safe to do because\n // we will \"mergeWithDefaults\" + \"validatePropTypes\" when we do instantiate the context\n} as unknown as DSTreeviewT.Props;\n\nexport const defaultRelativeMouseCoord = {\n isBefore: false,\n isAfter: false,\n isValid: true,\n item: null,\n x: null,\n y: null,\n relativeElementDOMRect: null,\n relativeElementIndex: null,\n};\n\nconst defaultContext: DSTreeviewInternalsT.CTX = {\n props: defaultProps,\n visibleItems: [],\n flattenedItems: [],\n withRadioChecks: false,\n withCheckboxChecks: false,\n withDragAndDrop: false,\n triggerTreeRerender: noop,\n tree: undefined,\n treeRoot: undefined,\n virtualListHelpers: {\n virtualItems: [],\n totalSize: 0,\n scrollToOffset: noop,\n scrollToIndex: noop,\n measure: noop,\n },\n virtualListRef: undefined,\n uniqueTreeViewUUID: '',\n selectedItem: null,\n setSelectedItem: noop,\n focusedItem: null,\n setFocusedItem: noop,\n selectedCheckboxes: {},\n setInternallySelectedCheckboxes: noop,\n expandedGroups: {},\n setExpandedGroups: noop,\n latestToggledItem: null,\n setLatestToggledItem: noop,\n hoverItem: null,\n setHoverItem: noop,\n handleExpandGroup: noop,\n updateUserExpandedState: noop,\n};\n\n/** Context for cross component communication */\nconst TreeViewContext = createContext(defaultContext);\n\nexport default TreeViewContext;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,eAAe,iBAAiB;AAKzC,SAAS,QAA6B,OAAgB;AAAC;AAEhD,MAAM,eAAe;AAAA,EAC1B,SAAS,CAAC;AAAA,EACV,WAAW,CAAC;AAAA,EACZ,aAAa,UAAU;AAAA,EACvB,gBAAgB,MAAM;AAAA,EACtB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB,MAAM;AAAA,EACtB,oBAAoB;AAAA,EACpB,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,sBAAsB;AAAA,EACtB,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,0BAA0B;AAAA,EAC1B,SAAS;AAAA,EACT,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,UAAU;AAAA,EACV,aAAa;AAAA,EACb,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAMrB;AAEO,MAAM,4BAA4B;AAAA,EACvC,UAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA,EACT,MAAM;AAAA,EACN,GAAG;AAAA,EACH,GAAG;AAAA,EACH,wBAAwB;AAAA,EACxB,sBAAsB;AACxB;AAEA,MAAM,iBAA2C;AAAA,EAC/C,OAAO;AAAA,EACP,cAAc,CAAC;AAAA,EACf,gBAAgB,CAAC;AAAA,EACjB,iBAAiB;AAAA,EACjB,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,MAAM;AAAA,EACN,UAAU;AAAA,EACV,oBAAoB;AAAA,IAClB,cAAc,CAAC;AAAA,IACf,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,SAAS;AAAA,EACX;AAAA,EACA,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,oBAAoB,CAAC;AAAA,EACrB,iCAAiC;AAAA,EACjC,gBAAgB,CAAC;AAAA,EACjB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,WAAW;AAAA,EACX,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,yBAAyB;AAC3B;AAGA,MAAM,kBAAkB,cAAc,cAAc;AAEpD,IAAO,0BAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\nimport { createContext, createRef } from 'react';\nimport type { DSTreeviewT } from './react-desc-prop-types.js';\nimport type { DSTreeviewInternalsT } from './sharedTypes.js';\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction noop<T extends unknown[]>(..._args: T): void {}\n\nexport const defaultProps: DSTreeviewT.DefaultProps = {\n plugins: [],\n selection: {},\n instanceRef: createRef() as React.MutableRefObject<DSTreeviewT.InstanceRef>,\n isItemDisabled: () => false,\n removeWidthMaxContent: false,\n disableIcons: false,\n disableActions: false,\n isMultiSelect: false,\n isSingleSelect: false,\n getIsDropValid: () => true,\n showChildrenAmount: false,\n isLoading: false,\n highlightOnlyQuery: false,\n onItemClick: noop,\n onItemActivate: noop,\n onItemFocus: noop,\n onVisibleItemsChange: noop,\n onOrderChange: noop,\n onSelectionChange: noop,\n onExpandChange: noop,\n onInstanceRefInitialized: noop,\n rowSize: 'normal',\n labelOverflow: 'wrap',\n noItemsPlaceholder: 'No items found',\n nameKey: 'name',\n width: '100%',\n height: '100%',\n groupIcon: null,\n itemIcon: null,\n searchQuery: '',\n applyAriaDisabled: false,\n};\n\nexport const defaultRelativeMouseCoord = {\n isBefore: false,\n isAfter: false,\n isValid: true,\n item: null,\n x: null,\n y: null,\n relativeElementDOMRect: null,\n relativeElementIndex: null,\n};\n\nconst defaultContext: DSTreeviewInternalsT.CTX = {\n // @ts-expect-error - this context handling is outdated, this should be an empty object anyway. Not touching treeview for now.\n props: defaultProps,\n visibleItems: [],\n flattenedItems: [],\n withRadioChecks: false,\n withCheckboxChecks: false,\n withDragAndDrop: false,\n triggerTreeRerender: noop,\n tree: undefined,\n treeRoot: undefined,\n virtualListHelpers: {\n virtualItems: [],\n totalSize: 0,\n scrollToOffset: noop,\n scrollToIndex: noop,\n measure: noop,\n },\n virtualListRef: undefined,\n uniqueTreeViewUUID: '',\n selectedItem: null,\n setSelectedItem: noop,\n focusedItem: null,\n setFocusedItem: noop,\n selectedCheckboxes: {},\n setInternallySelectedCheckboxes: noop,\n expandedGroups: {},\n setExpandedGroups: noop,\n latestToggledItem: null,\n setLatestToggledItem: noop,\n hoverItem: null,\n setHoverItem: noop,\n handleExpandGroup: noop,\n updateUserExpandedState: noop,\n};\n\n/** Context for cross component communication */\nconst TreeViewContext = createContext(defaultContext);\n\nexport default TreeViewContext;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,eAAe,iBAAiB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AAA,EACd,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,oBAAoB,CAAC;AAAA,EACrB,iCAAiC;AAAA,EACjC,gBAAgB,CAAC;AAAA,EACjB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,WAAW;AAAA,EACX,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,yBAAyB;AAC3B;AAGA,MAAM,kBAAkB,cAAc,cAAc;AAEpD,IAAO,0BAAQ;",
6
6
  "names": []
7
7
  }
@@ -20,7 +20,7 @@ const LegacyTreeListWrapper = aggregatedClasses("ul", {
20
20
  [`rowsize-${rowSize}`]: rowSize
21
21
  }));
22
22
  const TreeListWrapper = styled.div`
23
- width: max-content;
23
+ ${({ $removeWidthMaxContent }) => $removeWidthMaxContent ? "" : "width: max-content;"}
24
24
  height: 100%;
25
25
 
26
26
  // Item content
@@ -73,12 +73,12 @@ const TreeListComp = () => {
73
73
  virtualListRef,
74
74
  virtualListHelpers,
75
75
  visibleItems: flattenedVisibleItems,
76
- props: { width, height, rowSize, noItemsPlaceholder, isLoading }
76
+ props: { width, height, rowSize, noItemsPlaceholder, isLoading, removeWidthMaxContent }
77
77
  } = ctx;
78
78
  const { totalSize, virtualItems } = virtualListHelpers;
79
79
  const className = `${rowSize === "compact" ? `${compactRowClass}` : `${normaRowClass}`}`;
80
80
  const { visibleItems } = useContext(DnDTreeContext);
81
- return /* @__PURE__ */ jsx(TreeListWrapper, { children: /* @__PURE__ */ jsxs(
81
+ return /* @__PURE__ */ jsx(TreeListWrapper, { $removeWidthMaxContent: removeWidthMaxContent, children: /* @__PURE__ */ jsxs(
82
82
  LegacyTreeListWrapper,
83
83
  {
84
84
  ref: virtualListRef,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/TreeList.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSCircularProgressIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport { styled } from '@elliemae/ds-system';\nimport TreeViewContext from '../TreeViewContext.js';\nimport { DSTreeViewPrefix, treeListBlockName } from '../config/cssClassesConstants.js';\nimport TreeItem from './TreeItem.js';\nimport type { DSTreeviewT } from '../react-desc-prop-types.js';\nimport { withConditionalDnDRowContext } from '../hoc/WithConditionalDnDContext.js';\nimport { DnDTreeContext } from '../hoc/DnDTreeContext.js';\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}\nconst LegacyTreeListWrapper = 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\nexport const TreeListWrapper = styled.div`\n width: max-content;\n height: 100%;\n\n // Item content\n .em-ds-tree-item.hover {\n &[aria-disabled='true'] {\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n }\n }\n\n .em-ds-tree-item.selected {\n &[aria-disabled='true'] {\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n }\n }\n\n .em-ds-tree-item.hover.selected {\n &[aria-disabled='true'] {\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n }\n }\n\n // DnD Handle\n .em-ds-icon.drag-handle {\n &[aria-disabled='true'] {\n cursor: not-allowed;\n fill: ${({ theme }) => theme.colors.neutral['500']};\n }\n }\n\n // Item left icon\n .em-ds-icon.tree-item-icon.tree-item-icon-disabled {\n fill: ${({ theme }) => theme.colors.neutral['500']};\n }\n\n // Rigth addons\n .em-ds-tree-item--dragging.em-ds-tree-item__addons.em-ds-icon {\n fill: ${({ theme }) => theme.colors.neutral['600']};\n }\n\n //Count displayer\n .em-ds-tree-item-children-count-displayer {\n color: ${({ theme }) => theme.colors.neutral['700']};\n }\n`;\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 <LegacyTreeListWrapper\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 </LegacyTreeListWrapper>\n </TreeListWrapper>\n );\n};\n\nexport const TreeList = withConditionalDnDRowContext(TreeListComp);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACwGjB,SAmBM,KAnBN;AAvGN,SAAgB,kBAAkB;AAClC,SAAS,yBAAyB;AAClC,SAAS,mCAAmC;AAC5C,SAAS,cAAc;AACvB,OAAO,qBAAqB;AAC5B,SAAS,kBAAkB,yBAAyB;AACpD,OAAO,cAAc;AAErB,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAExB,MAAM,oBAAoB,GAAG,iBAAiB;AAC9C,MAAM,kBAAkB,kBAAkB,OAAO;AAAA,EACtD,eAAe;AACjB,CAAC,EAAE,iBAAiB;AAOpB,MAAM,wBAAwB,kBAAkB,MAAM;AAAA,EACpD,eAAe;AAAA,EACf,MAAM;AACR,CAAC,EAAE,mBAAmB,MAAM,CAAC,EAAE,QAAQ,OAA0C;AAAA,EAC/E,CAAC,WAAW,OAAO,EAAE,GAAG;AAC1B,EAAE;AAEK,MAAM,kBAAkB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAOZ,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BA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AEC;AAAA,oBACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,SAAS;AAAA,cACT,YAAY;AAAA,cACZ,gBAAgB;AAAA,YAClB;AAAA,YAEA,8BAAC,+BAA4B,MAAK,MAAK,SAAS,WAAW,WAAS,MAAC,SAAS,OAAO,aAAa,OAAO;AAAA;AAAA,QAC3G,IACE;AAAA,QACH,CAAC,aAAa,aAAa,WAAW,IAAI,oBAAC,mBAAiB,8BAAmB,IAAqB;AAAA,QACpG,CAAC,aAAa,aAAa,WAAW,IACrC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,QAAQ,GAAG,SAAS;AAAA,cACpB,OAAO;AAAA,cACP,UAAU;AAAA,YACZ;AAAA,YAEC,uBAAa,IAAI,CAAC,gBAAgB;AACjC,oBAAM,EAAE,OAAO,YAAY,MAAM,IAAI;AACrC,oBAAM,QAAQ,gBAAgB,uBAAuB,KAAK;AAC1D,kBAAI,CAAC,KAAM,QAAO;AAClB,mBAAK,eAAe;AACpB,oBAAM,EAAE,GAAG,IAAI;AAEf,oBAAM,QAAQ;AAAA,gBACZ,UAAU;AAAA,gBACV,KAAK,GAAG,KAAK;AAAA,gBACb,MAAM;AAAA,gBACN,OAAO;AAAA,cACT;AAEA,oBAAM,gBAAgB;AAAA,gBACpB,KAAK,yBAAyB,EAAE;AAAA,gBAChC,gBAAgB;AAAA,gBAChB;AAAA;AAAA,gBACA,WAAW;AAAA,gBACX;AAAA,gBACA,kBAAkB;AAAA,cACpB;AAEA,qBAAO,oBAAC,YAAU,GAAG,eAAe;AAAA,YACtC,CAAC;AAAA;AAAA,QACH,IACE;AAAA;AAAA;AAAA,EACN,GACF;AAEJ;AAEO,MAAM,WAAW,6BAA6B,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { useContext } from 'react';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { DSCircularProgressIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport { styled } from '@elliemae/ds-system';\nimport TreeViewContext from '../TreeViewContext.js';\nimport { DSTreeViewPrefix, treeListBlockName } from '../config/cssClassesConstants.js';\nimport TreeItem from './TreeItem.js';\nimport type { DSTreeviewT } from '../react-desc-prop-types.js';\nimport { withConditionalDnDRowContext } from '../hoc/WithConditionalDnDContext.js';\nimport { DnDTreeContext } from '../hoc/DnDTreeContext.js';\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}\nconst LegacyTreeListWrapper = 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\nexport const TreeListWrapper = styled.div<{ $removeWidthMaxContent?: boolean }>`\n ${({ $removeWidthMaxContent }) => ($removeWidthMaxContent ? '' : 'width: max-content;')}\n height: 100%;\n\n // Item content\n .em-ds-tree-item.hover {\n &[aria-disabled='true'] {\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n }\n }\n\n .em-ds-tree-item.selected {\n &[aria-disabled='true'] {\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n }\n }\n\n .em-ds-tree-item.hover.selected {\n &[aria-disabled='true'] {\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n }\n }\n\n // DnD Handle\n .em-ds-icon.drag-handle {\n &[aria-disabled='true'] {\n cursor: not-allowed;\n fill: ${({ theme }) => theme.colors.neutral['500']};\n }\n }\n\n // Item left icon\n .em-ds-icon.tree-item-icon.tree-item-icon-disabled {\n fill: ${({ theme }) => theme.colors.neutral['500']};\n }\n\n // Rigth addons\n .em-ds-tree-item--dragging.em-ds-tree-item__addons.em-ds-icon {\n fill: ${({ theme }) => theme.colors.neutral['600']};\n }\n\n //Count displayer\n .em-ds-tree-item-children-count-displayer {\n color: ${({ theme }) => theme.colors.neutral['700']};\n }\n`;\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, removeWidthMaxContent },\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 $removeWidthMaxContent={removeWidthMaxContent}>\n <LegacyTreeListWrapper\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 </LegacyTreeListWrapper>\n </TreeListWrapper>\n );\n};\n\nexport const TreeList = withConditionalDnDRowContext(TreeListComp);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACwGjB,SAmBM,KAnBN;AAvGN,SAAgB,kBAAkB;AAClC,SAAS,yBAAyB;AAClC,SAAS,mCAAmC;AAC5C,SAAS,cAAc;AACvB,OAAO,qBAAqB;AAC5B,SAAS,kBAAkB,yBAAyB;AACpD,OAAO,cAAc;AAErB,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAExB,MAAM,oBAAoB,GAAG,iBAAiB;AAC9C,MAAM,kBAAkB,kBAAkB,OAAO;AAAA,EACtD,eAAe;AACjB,CAAC,EAAE,iBAAiB;AAOpB,MAAM,wBAAwB,kBAAkB,MAAM;AAAA,EACpD,eAAe;AAAA,EACf,MAAM;AACR,CAAC,EAAE,mBAAmB,MAAM,CAAC,EAAE,QAAQ,OAA0C;AAAA,EAC/E,CAAC,WAAW,OAAO,EAAE,GAAG;AAC1B,EAAE;AAEK,MAAM,kBAAkB,OAAO;AAAA,IAClC,CAAC,EAAE,uBAAuB,MAAO,yBAAyB,KAAK,qBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAM/D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AA6B,YAAY;",
6
6
  "names": []
7
7
  }
@@ -55,7 +55,8 @@ const TreeViewPropTypes = {
55
55
  highlightOnlyQuery: PropTypes.bool.description("whether to highlight results or not").defaultValue(false),
56
56
  applyAriaDisabled: PropTypes.bool.description(
57
57
  "Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION"
58
- ).defaultValue(false)
58
+ ).defaultValue(false),
59
+ removeWidthMaxContent: PropTypes.bool.description("Whether the list wrapper should apply width:max-content to the list items.").defaultValue(false)
59
60
  };
60
61
  export {
61
62
  TreeViewPropTypes
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport type TreeModel from 'tree-model';\nimport type { useVirtual } from 'react-virtual';\nexport declare namespace DSTreeviewT {\n export type StringOrNum = string | number;\n export type SelectionState = boolean | 'mixed';\n export type SelectionItems = Record<StringOrNum, SelectionState>;\n export type ScrollToFunc = ReturnType<typeof useVirtual>['scrollToIndex'];\n export type ScrollToItemOptions = Parameters<ReturnType<typeof useVirtual>['scrollToIndex']>[1];\n export type ScrollToItemFunc = (options: ScrollToItemOptions) => void;\n export type ExpandedItems = Record<StringOrNum, true>; // { [id]:true } -> e.g. {1:true; 2:true} // false are not listed\n export interface SimpleItem {\n [key: string]: unknown;\n name: string;\n children?: SimpleItem[];\n id: StringOrNum;\n }\n\n export interface Item extends SimpleItem {\n children: Item[];\n treeDepth?: number;\n virtualIndex?: number;\n isChecked?: boolean | 'mixed';\n isGroup?: boolean;\n isExpanded?: boolean;\n disableActions?: boolean;\n childrenMatchesSearchQuery?: boolean;\n matchesSearchQuery?: boolean;\n nodeItemRef?: React.RefObject<HTMLLIElement>;\n model: TreeModel.Node<Item>['model'];\n node: TreeModel.Node<Item> & { parent?: TreeModel.Node<Item> };\n nodePath: TreeModel.Node<Item>[];\n }\n\n export interface DndItem {\n uid: string;\n depth: number;\n realIndex: number;\n childrenCount: number;\n parentId: string | null;\n original: DSTreeviewT.Item;\n }\n\n export interface Actions {\n toggleExpandAll: (isExpand: boolean) => Promise<DSTreeviewT.Item[]>;\n scrollTo: DSTreeviewT.ScrollToFunc;\n setSelectedItemByVirtualIndex: (index: number) => void;\n setFocusedItemByVirtualIndex: (\n index: number,\n scrollOpts: DSTreeviewT.ScrollToItemOptions & { withScroll?: boolean },\n ) => void;\n }\n export interface InstanceRef {\n actions: Actions;\n }\n\n export interface DefaultProps {\n plugins: string[];\n selection: SelectionItems;\n instanceRef: React.MutableRefObject<InstanceRef>;\n isItemDisabled: (item: Item) => boolean;\n disableIcons: boolean;\n isMultiSelect: boolean;\n isSingleSelect: boolean;\n getIsDropValid: (\n active: DndItem,\n over: DndItem,\n dropIndicatorPosition: 'none' | 'before' | 'after' | 'inside',\n ) => boolean;\n showChildrenAmount: boolean;\n isLoading: boolean;\n highlightOnlyQuery: boolean;\n onItemClick: (item: Item, e: React.MouseEvent<HTMLLIElement>) => void;\n onItemActivate: (item: Item, e?: React.MouseEvent<HTMLLIElement> | React.KeyboardEvent<HTMLLIElement>) => void;\n onItemFocus: (meta: { scrollToItem: ScrollToItemFunc; itemIndex: number; item: Item }) => void;\n onVisibleItemsChange: (newVisibleItems: Item[]) => void;\n onOrderChange: (newData: SimpleItem[], oldData: SimpleItem[], draggedItem: DndItem) => void;\n onSelectionChange: (\n selection: SelectionItems,\n item: Item,\n meta: { scrollToItem: ScrollToItemFunc; itemIndex: number },\n ) => void;\n onExpandChange: (expandedHashmap: ExpandedItems, itemToggled: Item | null | undefined) => void;\n onInstanceRefInitialized: (instanceRef: React.MutableRefObject<InstanceRef>) => void;\n rowSize: 'normal' | 'compact';\n labelOverflow: 'wrap' | 'wrap-all' | 'truncate';\n noItemsPlaceholder: string;\n nameKey: string;\n width: StringOrNum;\n height: StringOrNum;\n groupIcon: JSX.Element | null;\n itemIcon: JSX.Element | null;\n searchQuery: string;\n applyAriaDisabled: boolean;\n }\n export interface PropsOptional {\n controlledSelection: SelectionItems;\n expanded: ExpandedItems;\n rightAddons: ((item: Item) => React.ReactNode[]) | JSX.Element;\n RightAddons: React.ComponentType<{ item: Item }>;\n }\n export interface PropsRequired {\n data: Item[];\n }\n export interface Props extends DefaultProps, PropsOptional, PropsRequired {}\n}\n\nexport const TreeViewPropTypes = {\n data: PropTypes.arrayOf(\n PropTypes.shape({\n children: PropTypes.arrayOf(PropTypes.object),\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n isGroup: PropTypes.oneOfType([PropTypes.oneOf([undefined, null]), PropTypes.bool]),\n disableActions: PropTypes.bool.description('whether to disable drag & drop and expand/collapse actions or not'),\n name: PropTypes.string,\n node: PropTypes.object,\n }),\n ).description('data to populate tree view').isRequired,\n plugins: PropTypes.tuple([PropTypes.oneOf(['tree-dnd'])])\n .description(\n 'only accepted value is TreeDndPlugin constant\\nother legacy plugins are now supported via different props',\n )\n .defaultValue([]),\n selection: PropTypes.object.description('pre selected items').defaultValue({}),\n RightAddons: PropTypes.func\n .description('A React component that will be rendered on the right side of each rows')\n .signature('React.ComponentType<{item}>'),\n expanded: PropTypes.object.description('control what items are expanded').defaultValue(undefined),\n instanceRef: PropTypes.shape({\n current: PropTypes.oneOfType([\n PropTypes.oneOf([null, undefined]),\n PropTypes.shape({\n actions: PropTypes.shape({\n toggleExpandAll: PropTypes.func,\n scrollTo: PropTypes.func,\n }).description('').isRequired,\n }),\n ]),\n }).description('instance ref'),\n isItemDisabled: PropTypes.func\n .description('Function that receives an item, and returns whether that item should be disabled')\n .defaultValue('() => false'),\n disableIcons: PropTypes.bool.description('disable icons').defaultValue(false),\n isMultiSelect: PropTypes.bool.description('whether the tree view is multi select or not').defaultValue(false),\n isSingleSelect: PropTypes.bool.description('wheter the tree view is single select or not').defaultValue(false),\n isLoading: PropTypes.bool.description('wheter the tree should show the loading state or not').defaultValue(false),\n getIsDropValid: PropTypes.func\n .description(\"Function that returns true if the drop is valid and false if it's not\")\n .defaultValue('() => true'),\n showChildrenAmount: PropTypes.bool.description('whether to show the amount of children or not').defaultValue(false),\n onItemClick: PropTypes.func.description('function executed when clicking on an item').defaultValue('() => {}'),\n onItemActivate: PropTypes.func.description('function executed when an item gets activated').defaultValue('() => {}'),\n onItemFocus: PropTypes.func.description('function executed when focusing on an item').defaultValue('() => {}'),\n onVisibleItemsChange: PropTypes.func\n .description('function executed when the visible items change')\n .defaultValue('() => {}'),\n onOrderChange: PropTypes.func.description('function executed when the items order changes').defaultValue('() => {}'),\n onSelectionChange: PropTypes.func\n .description('function executed when the selection changes')\n .defaultValue('() => {}'),\n onExpandChange: PropTypes.func.description('function executed when expanding an item').defaultValue('() => {}'),\n onInstanceRefInitialized: PropTypes.func\n .description('function executed when instanceRef has terminated instanciation')\n .defaultValue('() => {}'),\n rowSize: PropTypes.oneOf(['normal', 'compact']).description('size of the row').defaultValue('normal'),\n labelOverflow: PropTypes.oneOf(['wrap', 'wrap-all', 'truncate'])\n .description('label truncation preference')\n .defaultValue('wrap'),\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('components width').defaultValue('100%'),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('components height')\n .defaultValue('100%'),\n groupIcon: PropTypes.node.description('icon for groups'),\n itemIcon: PropTypes.node.description('icon for items'),\n searchQuery: PropTypes.string.description('search query value'),\n noItemsPlaceholder: PropTypes.string\n .description('message to be shown when there are no items in the treeview to be displayed')\n .defaultValue('No items found'),\n nameKey: PropTypes.string.description('property key to identifier for items labels').defaultValue('name'),\n highlightOnlyQuery: PropTypes.bool.description('whether to highlight results or not').defaultValue(false),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE F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AAkB,EAAE,aAAa,MAAM;AAAA,EACpH,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAC7D,YAAY,mBAAmB,EAC/B,aAAa,MAAM;AAAA,EACtB,WAAW,UAAU,KAAK,YAAY,iBAAiB;AAAA,EACvD,UAAU,UAAU,KAAK,YAAY,gBAAgB;AAAA,EACrD,aAAa,UAAU,OAAO,YAAY,oBAAoB;AAAA,EAC9D,oBAAoB,UAAU,OAC3B,YAAY,6EAA6E,EACzF,aAAa,gBAAgB;AAAA,EAChC,SAAS,UAAU,OAAO,YAAY,6CAA6C,EAAE,aAAa,MAAM;AAAA,EACxG,oBAAoB,UAAU,KAAK,YAAY,qCAAqC,EAAE,aAAa,KAAK;AAAA,EACxG,mBAAmB,UAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AACvB;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport type React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport type TreeModel from 'tree-model';\nimport type { useVirtual } from 'react-virtual';\nexport declare namespace DSTreeviewT {\n export type StringOrNum = string | number;\n export type SelectionState = boolean | 'mixed';\n export type SelectionItems = Record<StringOrNum, SelectionState>;\n export type ScrollToFunc = ReturnType<typeof useVirtual>['scrollToIndex'];\n export type ScrollToItemOptions = Parameters<ReturnType<typeof useVirtual>['scrollToIndex']>[1];\n export type ScrollToItemFunc = (options: ScrollToItemOptions) => void;\n export type ExpandedItems = Record<StringOrNum, true>; // { [id]:true } -> e.g. {1:true; 2:true} // false are not listed\n export interface SimpleItem {\n [key: string]: unknown;\n name: string;\n children?: SimpleItem[];\n id: StringOrNum;\n }\n\n export interface Item extends SimpleItem {\n children: Item[];\n treeDepth?: number;\n virtualIndex?: number;\n isChecked?: boolean | 'mixed';\n isGroup?: boolean;\n isExpanded?: boolean;\n disableActions?: boolean;\n childrenMatchesSearchQuery?: boolean;\n matchesSearchQuery?: boolean;\n nodeItemRef?: React.RefObject<HTMLLIElement>;\n model: TreeModel.Node<Item>['model'];\n node: TreeModel.Node<Item> & { parent?: TreeModel.Node<Item> };\n nodePath: TreeModel.Node<Item>[];\n }\n\n export interface DndItem {\n uid: string;\n depth: number;\n realIndex: number;\n childrenCount: number;\n parentId: string | null;\n original: DSTreeviewT.Item;\n }\n\n export interface Actions {\n toggleExpandAll: (isExpand: boolean) => Promise<DSTreeviewT.Item[]>;\n scrollTo: DSTreeviewT.ScrollToFunc;\n setSelectedItemByVirtualIndex: (index: number) => void;\n setFocusedItemByVirtualIndex: (\n index: number,\n scrollOpts: DSTreeviewT.ScrollToItemOptions & { withScroll?: boolean },\n ) => void;\n }\n export interface InstanceRef {\n actions: Actions;\n }\n\n export interface DefaultProps {\n plugins: string[];\n selection: SelectionItems;\n instanceRef: React.MutableRefObject<InstanceRef>;\n isItemDisabled: (item: Item) => boolean;\n disableActions: boolean;\n disableIcons: boolean;\n isMultiSelect: boolean;\n isSingleSelect: boolean;\n getIsDropValid: (\n active: DndItem,\n over: DndItem,\n dropIndicatorPosition: 'none' | 'before' | 'after' | 'inside',\n ) => boolean;\n showChildrenAmount: boolean;\n isLoading: boolean;\n highlightOnlyQuery: boolean;\n onItemClick: (item: Item, e: React.MouseEvent<HTMLLIElement>) => void;\n onItemActivate: (item: Item, e?: React.MouseEvent<HTMLLIElement> | React.KeyboardEvent<HTMLLIElement>) => void;\n onItemFocus: (meta: { scrollToItem: ScrollToItemFunc; itemIndex: number; item: Item }) => void;\n onVisibleItemsChange: (newVisibleItems: Item[]) => void;\n onOrderChange: (newData: SimpleItem[], oldData: SimpleItem[], draggedItem: DndItem) => void;\n onSelectionChange: (\n selection: SelectionItems,\n item: Item,\n meta: { scrollToItem: ScrollToItemFunc; itemIndex: number },\n ) => void;\n onExpandChange: (expandedHashmap: ExpandedItems, itemToggled: Item | null | undefined) => void;\n onInstanceRefInitialized: (instanceRef: React.MutableRefObject<InstanceRef>) => void;\n rowSize: 'normal' | 'compact';\n labelOverflow: 'wrap' | 'wrap-all' | 'truncate';\n noItemsPlaceholder: string;\n nameKey: string;\n width: StringOrNum;\n height: StringOrNum;\n groupIcon: JSX.Element | null;\n itemIcon: JSX.Element | null;\n searchQuery: string;\n applyAriaDisabled: boolean;\n removeWidthMaxContent: boolean;\n }\n export interface PropsOptional {\n controlledSelection: SelectionItems;\n expanded: ExpandedItems;\n rightAddons: ((item: Item) => React.ReactNode[]) | JSX.Element;\n RightAddons: React.ComponentType<{ item: Item }>;\n }\n export interface PropsRequired {\n data: Item[];\n }\n export interface Props extends DefaultProps, PropsOptional, PropsRequired {}\n}\n\nexport const TreeViewPropTypes = {\n data: PropTypes.arrayOf(\n PropTypes.shape({\n children: PropTypes.arrayOf(PropTypes.object),\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n isGroup: PropTypes.oneOfType([PropTypes.oneOf([undefined, null]), PropTypes.bool]),\n disableActions: PropTypes.bool.description('whether to disable drag & drop and expand/collapse actions or not'),\n name: PropTypes.string,\n node: PropTypes.object,\n }),\n ).description('data to populate tree view').isRequired,\n plugins: PropTypes.tuple([PropTypes.oneOf(['tree-dnd'])])\n .description(\n 'only accepted value is TreeDndPlugin constant\\nother legacy plugins are now supported via different props',\n )\n .defaultValue([]),\n selection: PropTypes.object.description('pre selected items').defaultValue({}),\n RightAddons: PropTypes.func\n .description('A React component that will be rendered on the right side of each rows')\n .signature('React.ComponentType<{item}>'),\n expanded: PropTypes.object.description('control what items are expanded').defaultValue(undefined),\n instanceRef: PropTypes.shape({\n current: PropTypes.oneOfType([\n PropTypes.oneOf([null, undefined]),\n PropTypes.shape({\n actions: PropTypes.shape({\n toggleExpandAll: PropTypes.func,\n scrollTo: PropTypes.func,\n }).description('').isRequired,\n }),\n ]),\n }).description('instance ref'),\n isItemDisabled: PropTypes.func\n .description('Function that receives an item, and returns whether that item should be disabled')\n .defaultValue('() => false'),\n disableIcons: PropTypes.bool.description('disable icons').defaultValue(false),\n isMultiSelect: PropTypes.bool.description('whether the tree view is multi select or not').defaultValue(false),\n isSingleSelect: PropTypes.bool.description('wheter the tree view is single select or not').defaultValue(false),\n isLoading: PropTypes.bool.description('wheter the tree should show the loading state or not').defaultValue(false),\n getIsDropValid: PropTypes.func\n .description(\"Function that returns true if the drop is valid and false if it's not\")\n .defaultValue('() => true'),\n showChildrenAmount: PropTypes.bool.description('whether to show the amount of children or not').defaultValue(false),\n onItemClick: PropTypes.func.description('function executed when clicking on an item').defaultValue('() => {}'),\n onItemActivate: PropTypes.func.description('function executed when an item gets activated').defaultValue('() => {}'),\n onItemFocus: PropTypes.func.description('function executed when focusing on an item').defaultValue('() => {}'),\n onVisibleItemsChange: PropTypes.func\n .description('function executed when the visible items change')\n .defaultValue('() => {}'),\n onOrderChange: PropTypes.func.description('function executed when the items order changes').defaultValue('() => {}'),\n onSelectionChange: PropTypes.func\n .description('function executed when the selection changes')\n .defaultValue('() => {}'),\n onExpandChange: PropTypes.func.description('function executed when expanding an item').defaultValue('() => {}'),\n onInstanceRefInitialized: PropTypes.func\n .description('function executed when instanceRef has terminated instanciation')\n .defaultValue('() => {}'),\n rowSize: PropTypes.oneOf(['normal', 'compact']).description('size of the row').defaultValue('normal'),\n labelOverflow: PropTypes.oneOf(['wrap', 'wrap-all', 'truncate'])\n .description('label truncation preference')\n .defaultValue('wrap'),\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).description('components width').defaultValue('100%'),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n .description('components height')\n .defaultValue('100%'),\n groupIcon: PropTypes.node.description('icon for groups'),\n itemIcon: PropTypes.node.description('icon for items'),\n searchQuery: PropTypes.string.description('search query value'),\n noItemsPlaceholder: PropTypes.string\n .description('message to be shown when there are no items in the treeview to be displayed')\n .defaultValue('No items found'),\n nameKey: PropTypes.string.description('property key to identifier for items labels').defaultValue('name'),\n highlightOnlyQuery: PropTypes.bool.description('whether to highlight results or not').defaultValue(false),\n applyAriaDisabled: PropTypes.bool\n .description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION',\n )\n .defaultValue(false),\n removeWidthMaxContent: PropTypes.bool\n .description('Whether the list wrapper should apply width:max-content to the list items.')\n .defaultValue(false),\n} as ValidationMap<unknown>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,iBAAiB;AA8GnB,MAAM,oBAAoB;AAAA,EAC/B,MAAM,UAAU;AAAA,IACd,UAAU,MAAM;AAAA,MACd,UAAU,UAAU,QAAQ,UAAU,MAAM;AAAA,MAC5C,IAAI,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAAA,MAC5D,SAAS,UAAU,UAAU,CAAC,UAAU,MAAM,CAAC,QAAW,IAAI,CAAC,GAAG,UAAU,IAAI,CAAC;AAAA,MACjF,gBAAgB,UAAU,KAAK,YAAY,mEAAmE;AAAA,MAC9G,MAAM,UAAU;AAAA,MAChB,MAAM,UAAU;AAAA,IAClB,CAAC;AAAA,EACH,EAAE,YAAY,4BAA4B,EAAE;AAAA,EAC5C,SAAS,UAAU,MAAM,CAAC,UAAU,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EACrD;AAAA,IACC;AAAA,EACF,EACC,aAAa,CAAC,CAAC;AAAA,EAClB,WAAW,UAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,CAAC,CAAC;AAAA,EAC7E,aAAa,UAAU,KACpB,YAAY,wEAAwE,EACpF,UAAU,6BAA6B;AAAA,EAC1C,UAAU,UAAU,OAAO,YAAY,iCAAiC,EAAE,aAAa,MAAS;AAAA,EAChG,aAAa,UAAU,MAAM;AAAA,IAC3B,SAAS,UAAU,UAAU;AAAA,MAC3B,UAAU,MAAM,CAAC,MAAM,MAAS,CAAC;AAAA,MACjC,UAAU,MAAM;AAAA,QACd,SAAS,UAAU,MAAM;AAAA,UACvB,iBAAiB,U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,UAAU,MAAM,CAAC,QAAQ,YAAY,UAAU,CAAC,EAC5D,YAAY,6BAA6B,EACzC,aAAa,MAAM;AAAA,EACtB,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAAY,kBAAkB,EAAE,aAAa,MAAM;AAAA,EACpH,QAAQ,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAC7D,YAAY,mBAAmB,EAC/B,aAAa,MAAM;AAAA,EACtB,WAAW,UAAU,KAAK,YAAY,iBAAiB;AAAA,EACvD,UAAU,UAAU,KAAK,YAAY,gBAAgB;AAAA,EACrD,aAAa,UAAU,OAAO,YAAY,oBAAoB;AAAA,EAC9D,oBAAoB,UAAU,OAC3B,YAAY,6EAA6E,EACzF,aAAa,gBAAgB;AAAA,EAChC,SAAS,UAAU,OAAO,YAAY,6CAA6C,EAAE,aAAa,MAAM;AAAA,EACxG,oBAAoB,UAAU,KAAK,YAAY,qCAAqC,EAAE,aAAa,KAAK;AAAA,EACxG,mBAAmB,UAAU,KAC1B;AAAA,IACC;AAAA,EACF,EACC,aAAa,KAAK;AAAA,EACrB,uBAAuB,UAAU,KAC9B,YAAY,4EAA4E,EACxF,aAAa,KAAK;AACvB;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { DSTreeviewT } from './react-desc-prop-types.js';
3
3
  import type { DSTreeviewInternalsT } from './sharedTypes.js';
4
- export declare const defaultProps: DSTreeviewT.Props;
4
+ export declare const defaultProps: DSTreeviewT.DefaultProps;
5
5
  export declare const defaultRelativeMouseCoord: {
6
6
  isBefore: boolean;
7
7
  isAfter: boolean;
@@ -3,7 +3,9 @@ import React from 'react';
3
3
  import type { DSTreeviewT } from '../react-desc-prop-types.js';
4
4
  export declare const treeListNoItemsBn = "tree-list-no-items";
5
5
  export declare const TreeListNoItems: React.ComponentType<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
6
- export declare const TreeListWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
6
+ export declare const TreeListWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, {
7
+ $removeWidthMaxContent?: boolean | undefined;
8
+ } & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
7
9
  interface PropsT {
8
10
  onMouseDragOverItem?: (opts: {
9
11
  event: React.MouseEvent<HTMLLIElement>;
@@ -58,6 +58,7 @@ export declare namespace DSTreeviewT {
58
58
  selection: SelectionItems;
59
59
  instanceRef: React.MutableRefObject<InstanceRef>;
60
60
  isItemDisabled: (item: Item) => boolean;
61
+ disableActions: boolean;
61
62
  disableIcons: boolean;
62
63
  isMultiSelect: boolean;
63
64
  isSingleSelect: boolean;
@@ -90,6 +91,7 @@ export declare namespace DSTreeviewT {
90
91
  itemIcon: JSX.Element | null;
91
92
  searchQuery: string;
92
93
  applyAriaDisabled: boolean;
94
+ removeWidthMaxContent: boolean;
93
95
  }
94
96
  interface PropsOptional {
95
97
  controlledSelection: SelectionItems;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-treeview",
3
- "version": "3.51.0-rc.15",
3
+ "version": "3.51.0-rc.16",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Tree View",
6
6
  "files": [
@@ -44,23 +44,23 @@
44
44
  "react-virtual": "~2.10.4",
45
45
  "tree-model": "~1.0.7",
46
46
  "uid": "~2.0.1",
47
- "@elliemae/ds-button-v2": "3.51.0-rc.15",
48
- "@elliemae/ds-controlled-form": "3.51.0-rc.15",
49
- "@elliemae/ds-classnames": "3.51.0-rc.15",
50
- "@elliemae/ds-icons": "3.51.0-rc.15",
51
- "@elliemae/ds-form": "3.51.0-rc.15",
52
- "@elliemae/ds-circular-progress-indicator": "3.51.0-rc.15",
53
- "@elliemae/ds-props-helpers": "3.51.0-rc.15",
54
- "@elliemae/ds-drag-and-drop": "3.51.0-rc.15",
55
- "@elliemae/ds-system": "3.51.0-rc.15",
56
- "@elliemae/ds-typescript-helpers": "3.51.0-rc.15",
57
- "@elliemae/ds-truncated-tooltip-text": "3.51.0-rc.15"
47
+ "@elliemae/ds-circular-progress-indicator": "3.51.0-rc.16",
48
+ "@elliemae/ds-form": "3.51.0-rc.16",
49
+ "@elliemae/ds-button-v2": "3.51.0-rc.16",
50
+ "@elliemae/ds-classnames": "3.51.0-rc.16",
51
+ "@elliemae/ds-drag-and-drop": "3.51.0-rc.16",
52
+ "@elliemae/ds-icons": "3.51.0-rc.16",
53
+ "@elliemae/ds-controlled-form": "3.51.0-rc.16",
54
+ "@elliemae/ds-truncated-tooltip-text": "3.51.0-rc.16",
55
+ "@elliemae/ds-system": "3.51.0-rc.16",
56
+ "@elliemae/ds-typescript-helpers": "3.51.0-rc.16",
57
+ "@elliemae/ds-props-helpers": "3.51.0-rc.16"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@elliemae/pui-cli": "9.0.0-next.55",
61
61
  "jest": "~29.7.0",
62
62
  "styled-components": "~5.3.9",
63
- "@elliemae/ds-monorepo-devops": "3.51.0-rc.15"
63
+ "@elliemae/ds-monorepo-devops": "3.51.0-rc.16"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "lodash": "^4.17.21",