@elliemae/ds-treeview 3.1.0-next.1 → 3.1.0-next.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,7 @@ __export(TreeView_exports, {
26
26
  module.exports = __toCommonJS(TreeView_exports);
27
27
  var React = __toESM(require("react"));
28
28
  var import_react = __toESM(require("react"));
29
- var import_react_desc = require("react-desc");
29
+ var import_ds_utilities = require("@elliemae/ds-utilities");
30
30
  var import_react_desc_prop_types = require("./react-desc-prop-types");
31
31
  var import_TreeViewContext = __toESM(require("./TreeViewContext"));
32
32
  var import_useTreeview = require("./config/useTreeview");
@@ -39,6 +39,6 @@ function TreeView(props) {
39
39
  }
40
40
  TreeView.propTypes = import_react_desc_prop_types.TreeViewPropTypes;
41
41
  TreeView.displayName = "TreeView";
42
- const TreeViewWithSchema = (0, import_react_desc.describe)(TreeView);
42
+ const TreeViewWithSchema = (0, import_ds_utilities.describe)(TreeView);
43
43
  TreeViewWithSchema.propTypes = import_react_desc_prop_types.TreeViewPropTypes;
44
44
  //# sourceMappingURL=TreeView.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/TreeView.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { WeakValidationMap } from 'react';\n\nimport { describe } from 'react-desc';\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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyC;AAEzC,wBAAyB;AACzB,mCAAkC;AAClC,6BAA4B;AAC5B,yBAA4B;AAC5B,sBAAyB;AAElB,kBAAkB,OAA0B;AACjD,QAAM,EAAE,QAAQ,oCAAY,KAAK;AAEjC,SACE,mDAAC,+BAAgB,UAAhB;AAAA,IAAyB,OAAO;AAAA,KAC/B,mDAAC,8BAAS,CACZ;AAEJ;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,gCAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
4
+ "sourcesContent": ["import React, { WeakValidationMap } from 'react';\n\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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyC;AAEzC,0BAAyB;AACzB,mCAAkC;AAClC,6BAA4B;AAC5B,yBAA4B;AAC5B,sBAAyB;AAElB,kBAAkB,OAA0B;AACjD,QAAM,EAAE,QAAQ,oCAAY,KAAK;AAEjC,SACE,mDAAC,+BAAgB,UAAhB;AAAA,IAAyB,OAAO;AAAA,KAC/B,mDAAC,8BAAS,CACZ;AAEJ;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,kCAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -40,11 +40,11 @@ module.exports = __toCommonJS(CheckboxSelectable_exports);
40
40
  var React = __toESM(require("react"));
41
41
  var import_react = __toESM(require("react"));
42
42
  var import_ds_form = require("@elliemae/ds-form");
43
- var import_styled_components = __toESM(require("styled-components"));
43
+ var import_ds_system = require("@elliemae/ds-system");
44
44
  var import_TreeViewContext = __toESM(require("../TreeViewContext"));
45
45
  var import_selectable_helper = require("../utils/selectable-helper");
46
46
  var import_object_helpers = require("../utils/object-helpers");
47
- const StyledCheckboxWrapper = import_styled_components.default.span`
47
+ const StyledCheckboxWrapper = import_ds_system.styled.span`
48
48
  padding-top: 3px;
49
49
  `;
50
50
  function CheckboxSelectable(props) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/CheckboxSelectable.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useContext, useCallback, useMemo } from 'react';\nimport { DSCheckbox } from '@elliemae/ds-form';\nimport styled from 'styled-components';\nimport TreeViewContext from '../TreeViewContext';\nimport { toggleCheckboxItem } from '../utils/selectable-helper';\nimport { filterObject } from '../utils/object-helpers';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\nconst StyledCheckboxWrapper = styled.span`\n padding-top: 3px;\n`;\ninterface PropsT {\n item: DSTreeviewT.Item;\n itemIndex: number;\n}\nfunction CheckboxSelectable(props: PropsT): JSX.Element | null {\n const { item, itemIndex } = props;\n const { id } = item;\n\n const ctx = useContext(TreeViewContext);\n const {\n props: { onSelectionChange, isItemDisabled },\n virtualListHelpers: { scrollToIndex },\n triggerTreeRerender,\n selectedCheckboxes,\n setSelectedCheckboxes,\n } = ctx;\n\n const onCheckboxChange = useCallback(() => {\n const newSelections = toggleCheckboxItem(item);\n const newSelectionHasmap = filterObject<DSTreeviewT.SelectionState>(\n { ...selectedCheckboxes, ...newSelections },\n (value) => value !== false,\n );\n setSelectedCheckboxes(newSelectionHasmap);\n triggerTreeRerender();\n\n const indexAndScrollTo = {\n scrollToItem: () => {\n if (typeof item.virtualIndex === 'number') scrollToIndex(item.virtualIndex);\n },\n itemIndex,\n };\n if (onSelectionChange) onSelectionChange(newSelectionHasmap, item, indexAndScrollTo);\n }, [\n item,\n triggerTreeRerender,\n onSelectionChange,\n itemIndex,\n scrollToIndex,\n selectedCheckboxes,\n setSelectedCheckboxes,\n ]);\n const isChecked = useMemo(() => {\n if (selectedCheckboxes[id] === 'mixed') {\n return 'mixed' as const;\n }\n if (selectedCheckboxes[id] === true) {\n return true;\n }\n return false;\n }, [selectedCheckboxes, id]);\n\n const isDisabled = useMemo(() => isItemDisabled(item), [item, isItemDisabled]);\n\n return (\n <StyledCheckboxWrapper>\n <DSCheckbox\n checked={isChecked}\n disabled={isDisabled}\n className=\"em-ds-tree-item-checkbox\"\n data-testid=\"tree-item-checkbox\"\n onChange={onCheckboxChange}\n tabIndex=\"0\"\n />\n </StyledCheckboxWrapper>\n );\n}\n\nexport default CheckboxSelectable;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwD;AACxD,qBAA2B;AAC3B,+BAAmB;AACnB,6BAA4B;AAC5B,+BAAmC;AACnC,4BAA6B;AAE7B,MAAM,wBAAwB,iCAAO;AAAA;AAAA;AAOrC,4BAA4B,OAAmC;AAC7D,QAAM,EAAE,MAAM,cAAc;AAC5B,QAAM,EAAE,OAAO;AAEf,QAAM,MAAM,6BAAW,8BAAe;AACtC,QAAM;AAAA,IACJ,OAAO,EAAE,mBAAmB;AAAA,IAC5B,oBAAoB,EAAE;AAAA,IACtB;AAAA,IACA;AAAA,IACA;AAAA,MACE;AAEJ,QAAM,mBAAmB,8BAAY,MAAM;AACzC,UAAM,gBAAgB,iDAAmB,IAAI;AAC7C,UAAM,qBAAqB,wCACzB,kCAAK,qBAAuB,gBAC5B,CAAC,UAAU,UAAU,KACvB;AACA,0BAAsB,kBAAkB;AACxC,wBAAoB;AAEpB,UAAM,mBAAmB;AAAA,MACvB,cAAc,MAAM;AAClB,YAAI,OAAO,KAAK,iBAAiB;AAAU,wBAAc,KAAK,YAAY;AAAA,MAC5E;AAAA,MACA;AAAA,IACF;AACA,QAAI;AAAmB,wBAAkB,oBAAoB,MAAM,gBAAgB;AAAA,EACrF,GAAG;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,YAAY,0BAAQ,MAAM;AAC9B,QAAI,mBAAmB,QAAQ,SAAS;AACtC,aAAO;AAAA,IACT;AACA,QAAI,mBAAmB,QAAQ,MAAM;AACnC,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT,GAAG,CAAC,oBAAoB,EAAE,CAAC;AAE3B,QAAM,aAAa,0BAAQ,MAAM,eAAe,IAAI,GAAG,CAAC,MAAM,cAAc,CAAC;AAE7E,SACE,mDAAC,6BACC,mDAAC;AAAA,IACC,SAAS;AAAA,IACT,UAAU;AAAA,IACV,WAAU;AAAA,IACV,eAAY;AAAA,IACZ,UAAU;AAAA,IACV,UAAS;AAAA,GACX,CACF;AAEJ;AAEA,IAAO,6BAAQ;",
4
+ "sourcesContent": ["import React, { useContext, useCallback, useMemo } from 'react';\nimport { DSCheckbox } from '@elliemae/ds-form';\nimport { styled } from '@elliemae/ds-system';\nimport TreeViewContext from '../TreeViewContext';\nimport { toggleCheckboxItem } from '../utils/selectable-helper';\nimport { filterObject } from '../utils/object-helpers';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\nconst StyledCheckboxWrapper = styled.span`\n padding-top: 3px;\n`;\ninterface PropsT {\n item: DSTreeviewT.Item;\n itemIndex: number;\n}\nfunction CheckboxSelectable(props: PropsT): JSX.Element | null {\n const { item, itemIndex } = props;\n const { id } = item;\n\n const ctx = useContext(TreeViewContext);\n const {\n props: { onSelectionChange, isItemDisabled },\n virtualListHelpers: { scrollToIndex },\n triggerTreeRerender,\n selectedCheckboxes,\n setSelectedCheckboxes,\n } = ctx;\n\n const onCheckboxChange = useCallback(() => {\n const newSelections = toggleCheckboxItem(item);\n const newSelectionHasmap = filterObject<DSTreeviewT.SelectionState>(\n { ...selectedCheckboxes, ...newSelections },\n (value) => value !== false,\n );\n setSelectedCheckboxes(newSelectionHasmap);\n triggerTreeRerender();\n\n const indexAndScrollTo = {\n scrollToItem: () => {\n if (typeof item.virtualIndex === 'number') scrollToIndex(item.virtualIndex);\n },\n itemIndex,\n };\n if (onSelectionChange) onSelectionChange(newSelectionHasmap, item, indexAndScrollTo);\n }, [\n item,\n triggerTreeRerender,\n onSelectionChange,\n itemIndex,\n scrollToIndex,\n selectedCheckboxes,\n setSelectedCheckboxes,\n ]);\n const isChecked = useMemo(() => {\n if (selectedCheckboxes[id] === 'mixed') {\n return 'mixed' as const;\n }\n if (selectedCheckboxes[id] === true) {\n return true;\n }\n return false;\n }, [selectedCheckboxes, id]);\n\n const isDisabled = useMemo(() => isItemDisabled(item), [item, isItemDisabled]);\n\n return (\n <StyledCheckboxWrapper>\n <DSCheckbox\n checked={isChecked}\n disabled={isDisabled}\n className=\"em-ds-tree-item-checkbox\"\n data-testid=\"tree-item-checkbox\"\n onChange={onCheckboxChange}\n tabIndex=\"0\"\n />\n </StyledCheckboxWrapper>\n );\n}\n\nexport default CheckboxSelectable;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAwD;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S;AAAA,GACX,CACF;AAEJ;AAEA,IAAO,6BAAQ;",
6
6
  "names": []
7
7
  }
@@ -25,9 +25,9 @@ __export(ChildrenCountDisplayer_exports, {
25
25
  module.exports = __toCommonJS(ChildrenCountDisplayer_exports);
26
26
  var React = __toESM(require("react"));
27
27
  var import_react = __toESM(require("react"));
28
- var import_styled_components = __toESM(require("styled-components"));
28
+ var import_ds_system = require("@elliemae/ds-system");
29
29
  var import_cssClassesConstants = require("../config/cssClassesConstants");
30
- const Separator = import_styled_components.default.span`
30
+ const Separator = import_ds_system.styled.span`
31
31
  width: 1px;
32
32
  height: 12px;
33
33
  margin: 0 8px;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/ChildrenCountDisplayer.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/function-component-definition */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { DSTreeViewPrefix, treeItemBlockName } from '../config/cssClassesConstants';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\n\nconst Separator = styled.span`\n width: 1px;\n height: 12px;\n margin: 0 8px;\n border-left: 1px solid ${(props) => props.theme.colors.neutral['600']};\n font-size: 12px;\n`;\n\nconst className = `${DSTreeViewPrefix}-${treeItemBlockName}-children-count-displayer`;\n\ninterface PropsT {\n item: DSTreeviewT.Item;\n}\n\nexport const ChildrenCountDisplayer: React.ComponentType<PropsT> = (props) => {\n const { item } = props;\n const { isGroup, children } = item;\n\n if (!isGroup) return null;\n return (\n <span data-testid=\"tree-item-children-count-displayer\" className={className}>\n <Separator />\n {`${children.length} Items`}\n </span>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,+BAAmB;AACnB,iCAAoD;AAGpD,MAAM,YAAY,iCAAO;AAAA;AAAA;AAAA;AAAA,2BAIE,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAIjE,MAAM,YAAY,GAAG,+CAAoB;AAMlC,MAAM,yBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,SAAS;AACjB,QAAM,EAAE,SAAS,aAAa;AAE9B,MAAI,CAAC;AAAS,WAAO;AACrB,SACE,mDAAC;AAAA,IAAK,eAAY;AAAA,IAAqC;AAAA,KACrD,mDAAC,eAAU,GACV,GAAG,SAAS,cACf;AAEJ;",
4
+ "sourcesContent": ["/* eslint-disable react/function-component-definition */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTreeViewPrefix, treeItemBlockName } from '../config/cssClassesConstants';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\n\nconst Separator = styled.span`\n width: 1px;\n height: 12px;\n margin: 0 8px;\n border-left: 1px solid ${(props) => props.theme.colors.neutral['600']};\n font-size: 12px;\n`;\n\nconst className = `${DSTreeViewPrefix}-${treeItemBlockName}-children-count-displayer`;\n\ninterface PropsT {\n item: DSTreeviewT.Item;\n}\n\nexport const ChildrenCountDisplayer: React.ComponentType<PropsT> = (props) => {\n const { item } = props;\n const { isGroup, children } = item;\n\n if (!isGroup) return null;\n return (\n <span data-testid=\"tree-item-children-count-displayer\" className={className}>\n <Separator />\n {`${children.length} Items`}\n </span>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,uBAAuB;AACvB,iCAAoD;AAGpD,MAAM,YAAY,wBAAO;AAAA;AAAA;AAAA;AAAA,2BAIE,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAIjE,MAAM,YAAY,GAAG,+CAAoB;AAMlC,MAAM,yBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,SAAS;AACjB,QAAM,EAAE,SAAS,aAAa;AAE9B,MAAI,CAAC;AAAS,WAAO;AACrB,SACE,mDAAC;AAAA,IAAK,eAAY;AAAA,IAAqC;AAAA,KACrD,mDAAC,eAAU,GACV,GAAG,SAAS,cACf;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -25,7 +25,7 @@ __export(DropIndicator_exports, {
25
25
  module.exports = __toCommonJS(DropIndicator_exports);
26
26
  var React = __toESM(require("react"));
27
27
  var import_react = __toESM(require("react"));
28
- var import_styled_components = __toESM(require("styled-components"));
28
+ var import_ds_system = require("@elliemae/ds-system");
29
29
  var import_SortableItemContext = require("../hoc/SortableItemContext");
30
30
  const getPositionStyles = ({ dropIndicatorPosition }) => `
31
31
  top: ${dropIndicatorPosition === import_SortableItemContext.DropIndicatorPosition.Before ? "0" : "unset"};
@@ -40,7 +40,7 @@ const getCircleStyles = ({ dropIndicatorPosition }) => ({
40
40
  left: "0px",
41
41
  opacity: 1
42
42
  });
43
- const StyledIndicator = import_styled_components.default.div`
43
+ const StyledIndicator = import_ds_system.styled.div`
44
44
  position: absolute;
45
45
  ${getPositionStyles}
46
46
  box-sizing: border-box;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/DropIndicator.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport styled from 'styled-components';\nimport { DropIndicatorPosition } from '../hoc/SortableItemContext';\n\ninterface DropIndicatorProps {\n vertical?: boolean;\n dropIndicatorPosition: DropIndicatorPosition | false;\n isLast?: boolean;\n isDropValid?: boolean;\n}\n\nconst getPositionStyles = ({ dropIndicatorPosition }: DropIndicatorProps) => `\n top: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};\n bottom: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};\n left: -2px;\n `;\n\nconst getCircleStyles = ({ dropIndicatorPosition }: DropIndicatorProps) => ({\n position: 'absolute',\n zIndex: 20,\n top: dropIndicatorPosition === DropIndicatorPosition.After ? 'unset' : '-2px',\n bottom: dropIndicatorPosition === DropIndicatorPosition.Before ? 'unset' : '-2px',\n left: '0px',\n opacity: 1,\n});\n\nconst StyledIndicator = styled.div<DropIndicatorProps>`\n position: absolute;\n ${getPositionStyles}\n box-sizing: border-box;\n width: ${(props) => (props.vertical ? '2px' : '100%')};\n height: ${(props) => (props.vertical ? '100%' : '2px')};\n background-color: ${({ isDropValid, theme }) => (isDropValid ? theme.colors.brand[600] : theme.colors.danger[900])};\n z-index: 20;\n`;\n\nconst CircleIndicator = (style: Record<string, unknown>, isDropValid: boolean | null | undefined) => (\n <svg height=\"6\" width=\"6\" style={style}>\n <circle cx=\"3\" cy=\"3\" r=\"3\" strokeWidth=\"0\" fill={isDropValid ? '#1E79C2' : '#C64252'} />\n </svg>\n);\n\nconst DropIndicator: React.ComponentType<DropIndicatorProps> = ({ dropIndicatorPosition, isLast, isDropValid }) => {\n if (\n ![DropIndicatorPosition.After, DropIndicatorPosition.Before].includes(\n dropIndicatorPosition as DropIndicatorPosition,\n )\n )\n return null;\n\n const safeDropIndicatorPosition = isLast ? DropIndicatorPosition.Before : dropIndicatorPosition;\n\n return (\n <>\n {CircleIndicator(getCircleStyles({ dropIndicatorPosition: safeDropIndicatorPosition }), isDropValid)}\n <StyledIndicator dropIndicatorPosition={safeDropIndicatorPosition} isDropValid={isDropValid} />\n </>\n );\n};\n\nexport default DropIndicator;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,+BAAmB;AACnB,iCAAsC;AAStC,MAAM,oBAAoB,CAAC,EAAE,4BAAgD;AAAA,aAChE,0BAA0B,iDAAsB,SAAS,MAAM;AAAA,gBAC5D,0BAA0B,iDAAsB,QAAQ,MAAM;AAAA;AAAA;AAI9E,MAAM,kBAAkB,CAAC,EAAE,4BAAiD;AAAA,EAC1E,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,KAAK,0BAA0B,iDAAsB,QAAQ,UAAU;AAAA,EACvE,QAAQ,0BAA0B,iDAAsB,SAAS,UAAU;AAAA,EAC3E,MAAM;AAAA,EACN,SAAS;AACX;AAEA,MAAM,kBAAkB,iCAAO;AAAA;AAAA,IAE3B;AAAA;AAAA,WAEO,CAAC,UAAW,MAAM,WAAW,QAAQ;AAAA,YACpC,CAAC,UAAW,MAAM,WAAW,SAAS;AAAA,sBAC5B,CAAC,EAAE,aAAa,YAAa,cAAc,MAAM,OAAO,MAAM,OAAO,MAAM,OAAO,OAAO;AAAA;AAAA;AAI/G,MAAM,kBAAkB,CAAC,OAAgC,gBACvD,mDAAC;AAAA,EAAI,QAAO;AAAA,EAAI,OAAM;AAAA,EAAI;AAAA,GACxB,mDAAC;AAAA,EAAO,IAAG;AAAA,EAAI,IAAG;AAAA,EAAI,GAAE;AAAA,EAAI,aAAY;AAAA,EAAI,MAAM,cAAc,YAAY;AAAA,CAAW,CACzF;AAGF,MAAM,gBAAyD,CAAC,EAAE,uBAAuB,QAAQ,kBAAkB;AACjH,MACE,CAAC,CAAC,iDAAsB,OAAO,iDAAsB,MAAM,EAAE,SAC3D,qBACF;AAEA,WAAO;AAET,QAAM,4BAA4B,SAAS,iDAAsB,SAAS;AAE1E,SACE,wFACG,gBAAgB,gBAAgB,EAAE,uBAAuB,0BAA0B,CAAC,GAAG,WAAW,GACnG,mDAAC;AAAA,IAAgB,uBAAuB;AAAA,IAA2B;AAAA,GAA0B,CAC/F;AAEJ;AAEA,IAAO,wBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DropIndicatorPosition } from '../hoc/SortableItemContext';\n\ninterface DropIndicatorProps {\n vertical?: boolean;\n dropIndicatorPosition: DropIndicatorPosition | false;\n isLast?: boolean;\n isDropValid?: boolean;\n}\n\nconst getPositionStyles = ({ dropIndicatorPosition }: DropIndicatorProps) => `\n top: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};\n bottom: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};\n left: -2px;\n `;\n\nconst getCircleStyles = ({ dropIndicatorPosition }: DropIndicatorProps) => ({\n position: 'absolute',\n zIndex: 20,\n top: dropIndicatorPosition === DropIndicatorPosition.After ? 'unset' : '-2px',\n bottom: dropIndicatorPosition === DropIndicatorPosition.Before ? 'unset' : '-2px',\n left: '0px',\n opacity: 1,\n});\n\nconst StyledIndicator = styled.div<DropIndicatorProps>`\n position: absolute;\n ${getPositionStyles}\n box-sizing: border-box;\n width: ${(props) => (props.vertical ? '2px' : '100%')};\n height: ${(props) => (props.vertical ? '100%' : '2px')};\n background-color: ${({ isDropValid, theme }) => (isDropValid ? theme.colors.brand[600] : theme.colors.danger[900])};\n z-index: 20;\n`;\n\nconst CircleIndicator = (style: Record<string, unknown>, isDropValid: boolean | null | undefined) => (\n <svg height=\"6\" width=\"6\" style={style}>\n <circle cx=\"3\" cy=\"3\" r=\"3\" strokeWidth=\"0\" fill={isDropValid ? '#1E79C2' : '#C64252'} />\n </svg>\n);\n\nconst DropIndicator: React.ComponentType<DropIndicatorProps> = ({ dropIndicatorPosition, isLast, isDropValid }) => {\n if (\n ![DropIndicatorPosition.After, DropIndicatorPosition.Before].includes(\n dropIndicatorPosition as DropIndicatorPosition,\n )\n )\n return null;\n\n const safeDropIndicatorPosition = isLast ? DropIndicatorPosition.Before : dropIndicatorPosition;\n\n return (\n <>\n {CircleIndicator(getCircleStyles({ dropIndicatorPosition: safeDropIndicatorPosition }), isDropValid)}\n <StyledIndicator dropIndicatorPosition={safeDropIndicatorPosition} isDropValid={isDropValid} />\n </>\n );\n};\n\nexport default DropIndicator;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,uBAAuB;AACvB,iCAAsC;AAStC,MAAM,oBAAoB,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
25
  module.exports = __toCommonJS(react_desc_prop_types_exports);
26
26
  var React = __toESM(require("react"));
27
- var import_react_desc = require("react-desc");
27
+ var import_ds_utilities = require("@elliemae/ds-utilities");
28
28
  const TreeViewPropTypes = {
29
- data: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.shape({
30
- children: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.object),
31
- id: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.string, import_react_desc.PropTypes.number]),
32
- isGroup: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.oneOf([void 0, null]), import_react_desc.PropTypes.bool]),
33
- name: import_react_desc.PropTypes.string,
34
- node: import_react_desc.PropTypes.object
29
+ data: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.shape({
30
+ children: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.object),
31
+ id: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.string, import_ds_utilities.PropTypes.number]),
32
+ isGroup: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.oneOf([void 0, null]), import_ds_utilities.PropTypes.bool]),
33
+ name: import_ds_utilities.PropTypes.string,
34
+ node: import_ds_utilities.PropTypes.object
35
35
  })).description("data to populate tree view").isRequired,
36
- plugins: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.string).description("list of enabled plugins").defaultValue([]),
37
- selection: import_react_desc.PropTypes.object.description("pre selected items").defaultValue({}),
38
- expanded: import_react_desc.PropTypes.object.description("control what items are expanded").defaultValue(void 0),
39
- instanceRef: import_react_desc.PropTypes.shape({
40
- current: import_react_desc.PropTypes.oneOfType([
41
- import_react_desc.PropTypes.oneOf([null, void 0]),
42
- import_react_desc.PropTypes.shape({
43
- actions: import_react_desc.PropTypes.shape({
44
- toggleExpandAll: import_react_desc.PropTypes.func,
45
- scrollTo: import_react_desc.PropTypes.func
36
+ plugins: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.string).description("list of enabled plugins").defaultValue([]),
37
+ selection: import_ds_utilities.PropTypes.object.description("pre selected items").defaultValue({}),
38
+ expanded: import_ds_utilities.PropTypes.object.description("control what items are expanded").defaultValue(void 0),
39
+ instanceRef: import_ds_utilities.PropTypes.shape({
40
+ current: import_ds_utilities.PropTypes.oneOfType([
41
+ import_ds_utilities.PropTypes.oneOf([null, void 0]),
42
+ import_ds_utilities.PropTypes.shape({
43
+ actions: import_ds_utilities.PropTypes.shape({
44
+ toggleExpandAll: import_ds_utilities.PropTypes.func,
45
+ scrollTo: import_ds_utilities.PropTypes.func
46
46
  }).description("").isRequired
47
47
  })
48
48
  ])
49
49
  }).description("instance ref"),
50
- isItemDisabled: import_react_desc.PropTypes.func.description("Function that receives an item, and returns whether that item should be disabled").defaultValue("() => false"),
51
- disableIcons: import_react_desc.PropTypes.bool.description("disable icons").defaultValue(false),
52
- fluid: import_react_desc.PropTypes.bool.description("whether is fluid or not").defaultValue(false),
53
- isMultiSelect: import_react_desc.PropTypes.bool.description("whether the tree view is multi select or not").defaultValue(false),
54
- isSingleSelect: import_react_desc.PropTypes.bool.description("wheter the tree view is single select or not").defaultValue(false),
55
- isLoading: import_react_desc.PropTypes.bool.description("wheter the tree should show the loading state or not").defaultValue(false),
56
- getIsDropValid: import_react_desc.PropTypes.func.description("Function that returns true if the drop is valid and false if it's not").defaultValue("() => true"),
57
- restrictDragAndDrop: import_react_desc.PropTypes.bool.description("whether to restrict DnD functionality or not").defaultValue(false),
58
- showChildrenAmount: import_react_desc.PropTypes.bool.description("whether to show the amount of children or not").defaultValue(false),
59
- sortable: import_react_desc.PropTypes.bool.description("whether the sortable functionality is active or not").defaultValue(false),
60
- onItemClick: import_react_desc.PropTypes.func.description("function executed when clicking on an item").defaultValue("() => {}"),
61
- onItemFocus: import_react_desc.PropTypes.func.description("function executed when focusing on an item").defaultValue("() => {}"),
62
- onVisibleItemsChange: import_react_desc.PropTypes.func.description("function executed when the visible items change").defaultValue("() => {}"),
63
- onOrderChange: import_react_desc.PropTypes.func.description("function executed when the items order changes").defaultValue("() => {}"),
64
- onSelectionChange: import_react_desc.PropTypes.func.description("function executed when the selection changes").defaultValue("() => {}"),
65
- onExpandChange: import_react_desc.PropTypes.func.description("function executed when expanding an item").defaultValue("() => {}"),
66
- onInstanceRefInitialized: import_react_desc.PropTypes.func.description("function executed when instanceRef has terminated instanciation").defaultValue("() => {}"),
67
- rowSize: import_react_desc.PropTypes.oneOf(["normal", "compact"]).description("size of the row").defaultValue("normal"),
68
- labelOverflow: import_react_desc.PropTypes.oneOf(["wrap", "wrap-all", "truncate"]).description("label truncation preference").defaultValue("wrap"),
69
- width: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("components width").defaultValue("100%"),
70
- height: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.number, import_react_desc.PropTypes.string]).description("components height").defaultValue("100%"),
71
- groupIcon: import_react_desc.PropTypes.node.description("icon for groups"),
72
- itemIcon: import_react_desc.PropTypes.node.description("icon for items"),
73
- searchQuery: import_react_desc.PropTypes.string.description("search query value"),
74
- noItemsPlaceholder: import_react_desc.PropTypes.string.description("message to be shown when there are no items in the treeview to be displayed").defaultValue("No items found"),
75
- name: import_react_desc.PropTypes.string.description("property key to identifier for items labels").defaultValue("name"),
76
- highlightOnlyQuery: import_react_desc.PropTypes.bool.description("whether to highlight results or not").defaultValue(false)
50
+ isItemDisabled: import_ds_utilities.PropTypes.func.description("Function that receives an item, and returns whether that item should be disabled").defaultValue("() => false"),
51
+ disableIcons: import_ds_utilities.PropTypes.bool.description("disable icons").defaultValue(false),
52
+ fluid: import_ds_utilities.PropTypes.bool.description("whether is fluid or not").defaultValue(false),
53
+ isMultiSelect: import_ds_utilities.PropTypes.bool.description("whether the tree view is multi select or not").defaultValue(false),
54
+ isSingleSelect: import_ds_utilities.PropTypes.bool.description("wheter the tree view is single select or not").defaultValue(false),
55
+ isLoading: import_ds_utilities.PropTypes.bool.description("wheter the tree should show the loading state or not").defaultValue(false),
56
+ getIsDropValid: import_ds_utilities.PropTypes.func.description("Function that returns true if the drop is valid and false if it's not").defaultValue("() => true"),
57
+ restrictDragAndDrop: import_ds_utilities.PropTypes.bool.description("whether to restrict DnD functionality or not").defaultValue(false),
58
+ showChildrenAmount: import_ds_utilities.PropTypes.bool.description("whether to show the amount of children or not").defaultValue(false),
59
+ sortable: import_ds_utilities.PropTypes.bool.description("whether the sortable functionality is active or not").defaultValue(false),
60
+ onItemClick: import_ds_utilities.PropTypes.func.description("function executed when clicking on an item").defaultValue("() => {}"),
61
+ onItemFocus: import_ds_utilities.PropTypes.func.description("function executed when focusing on an item").defaultValue("() => {}"),
62
+ onVisibleItemsChange: import_ds_utilities.PropTypes.func.description("function executed when the visible items change").defaultValue("() => {}"),
63
+ onOrderChange: import_ds_utilities.PropTypes.func.description("function executed when the items order changes").defaultValue("() => {}"),
64
+ onSelectionChange: import_ds_utilities.PropTypes.func.description("function executed when the selection changes").defaultValue("() => {}"),
65
+ onExpandChange: import_ds_utilities.PropTypes.func.description("function executed when expanding an item").defaultValue("() => {}"),
66
+ onInstanceRefInitialized: import_ds_utilities.PropTypes.func.description("function executed when instanceRef has terminated instanciation").defaultValue("() => {}"),
67
+ rowSize: import_ds_utilities.PropTypes.oneOf(["normal", "compact"]).description("size of the row").defaultValue("normal"),
68
+ labelOverflow: import_ds_utilities.PropTypes.oneOf(["wrap", "wrap-all", "truncate"]).description("label truncation preference").defaultValue("wrap"),
69
+ width: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.number, import_ds_utilities.PropTypes.string]).description("components width").defaultValue("100%"),
70
+ height: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.number, import_ds_utilities.PropTypes.string]).description("components height").defaultValue("100%"),
71
+ groupIcon: import_ds_utilities.PropTypes.node.description("icon for groups"),
72
+ itemIcon: import_ds_utilities.PropTypes.node.description("icon for items"),
73
+ searchQuery: import_ds_utilities.PropTypes.string.description("search query value"),
74
+ noItemsPlaceholder: import_ds_utilities.PropTypes.string.description("message to be shown when there are no items in the treeview to be displayed").defaultValue("No items found"),
75
+ name: import_ds_utilities.PropTypes.string.description("property key to identifier for items labels").defaultValue("name"),
76
+ highlightOnlyQuery: import_ds_utilities.PropTypes.bool.description("whether to highlight results or not").defaultValue(false)
77
77
  };
78
78
  //# 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 { PropTypes } from 'react-desc';\nimport TreeModel from 'tree-model';\nimport { 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 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 fluid: boolean;\n isMultiSelect: boolean;\n isSingleSelect: boolean;\n getIsDropValid: (\n active: DndItem,\n over: DndItem,\n dropIndicatorPosition: 'none' | 'before' | 'after' | 'inside',\n ) => boolean;\n restrictDragAndDrop: boolean;\n showChildrenAmount: boolean;\n sortable: boolean;\n isLoading: boolean;\n highlightOnlyQuery: boolean;\n onItemClick: (item: Item, e: React.MouseEvent<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 }\n export interface PropsOptional {\n expanded: ExpandedItems;\n rightAddons: ((item: Item) => React.ReactNode | React.ReactNode[]) | JSX.Element;\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 name: PropTypes.string,\n node: PropTypes.object,\n }),\n ).description('data to populate tree view').isRequired,\n plugins: PropTypes.arrayOf(PropTypes.string).description('list of enabled plugins').defaultValue([]),\n selection: PropTypes.object.description('pre selected items').defaultValue({}),\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 fluid: PropTypes.bool.description('whether is fluid or not').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 restrictDragAndDrop: PropTypes.bool.description('whether to restrict DnD functionality or not').defaultValue(false),\n showChildrenAmount: PropTypes.bool.description('whether to show the amount of children or not').defaultValue(false),\n sortable: PropTypes.bool.description('whether the sortable functionality is active or not').defaultValue(false),\n onItemClick: PropTypes.func.description('function executed when clicking on an item').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 name: 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};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,wBAA0B;AAyGnB,MAAM,oBAAoB;AAAA,EAC/B,MAAM,4BAAU,QACd,4BAAU,MAAM;AAAA,IACd,UAAU,4BAAU,QAAQ,4BAAU,MAAM;AAAA,IAC5C,IAAI,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,MAAM,CAAC;AAAA,IAC5D,SAAS,4BAAU,UAAU,CAAC,4BAAU,MAAM,CAAC,QAAW,IAAI,CAAC,GAAG,4BAAU,IAAI,CAAC;AAAA,IACjF,MAAM,4BAAU;AAAA,IAChB,MAAM,4BAAU;AAAA,EAClB,CAAC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AE,aAAa,KAAK;AAC1G;",
4
+ "sourcesContent": ["/* eslint-disable max-lines */\nimport { PropTypes } from '@elliemae/ds-utilities';\nimport TreeModel from 'tree-model';\nimport { 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 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 fluid: boolean;\n isMultiSelect: boolean;\n isSingleSelect: boolean;\n getIsDropValid: (\n active: DndItem,\n over: DndItem,\n dropIndicatorPosition: 'none' | 'before' | 'after' | 'inside',\n ) => boolean;\n restrictDragAndDrop: boolean;\n showChildrenAmount: boolean;\n sortable: boolean;\n isLoading: boolean;\n highlightOnlyQuery: boolean;\n onItemClick: (item: Item, e: React.MouseEvent<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 }\n export interface PropsOptional {\n expanded: ExpandedItems;\n rightAddons: ((item: Item) => React.ReactNode | React.ReactNode[]) | JSX.Element;\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 name: PropTypes.string,\n node: PropTypes.object,\n }),\n ).description('data to populate tree view').isRequired,\n plugins: PropTypes.arrayOf(PropTypes.string).description('list of enabled plugins').defaultValue([]),\n selection: PropTypes.object.description('pre selected items').defaultValue({}),\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 fluid: PropTypes.bool.description('whether is fluid or not').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 restrictDragAndDrop: PropTypes.bool.description('whether to restrict DnD functionality or not').defaultValue(false),\n showChildrenAmount: PropTypes.bool.description('whether to show the amount of children or not').defaultValue(false),\n sortable: PropTypes.bool.description('whether the sortable functionality is active or not').defaultValue(false),\n onItemClick: PropTypes.func.description('function executed when clicking on an item').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 name: 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};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAA0B;AAyGnB,MAAM,oBAAoB;AAAA,EAC/B,MAAM,8BAAU,QACd,8BAAU,MAAM;AAAA,IACd,UAAU,8BAAU,QAAQ,8BAAU,MAAM;AAAA,IAC5C,IAAI,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC;AAAA,IAC5D,SAAS,8BAAU,UAAU,CAAC,8BAAU,MAAM,CAAC,QAAW,IAAI,CAAC,GAAG,8BAAU,IAAI,CAAC;AAAA,IACjF,MAAM,8BAAU;AAAA,IAChB,MAAM,8BAAU;AAAA,EAClB,CAAC,CACH,EAAE,YAAY,4BAA4B,EAAE;AAAA,EAC5C,SAAS,8BAAU,QAAQ,8BAAU,MAAM,EAAE,YAAY,yBAAyB,EAAE,aAAa,CAAC,CAAC;AAAA,EACnG,WAAW,8BAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,CAAC,CAAC;AAAA,EAC7E,UAAU,8BAAU,OAAO,YAAY,iCAAiC,EAAE,aAAa,MAAS;AAAA,EAChG,aAAa,8BAAU,MAAM;AAAA,IAC3B,SAAS,8BAAU,UAAU;AAA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CAA8C,EAC1D,aAAa,UAAU;AAAA,EAC1B,gBAAgB,8BAAU,KAAK,YAAY,0CAA0C,EAAE,aAAa,UAAU;AAAA,EAC9G,0BAA0B,8BAAU,KACjC,YAAY,iEAAiE,EAC7E,aAAa,UAAU;AAAA,EAC1B,SAAS,8BAAU,MAAM,CAAC,UAAU,SAAS,CAAC,EAAE,YAAY,iBAAiB,EAAE,aAAa,QAAQ;AAAA,EACpG,eAAe,8BAAU,MAAM,CAAC,QAAQ,YAAY,UAAU,CAAC,EAC5D,YAAY,6BAA6B,EACzC,aAAa,MAAM;AAAA,EACtB,OAAO,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EAAE,YAAY,kBAAkB,EAAE,aAAa,MAAM;AAAA,EACpH,QAAQ,8BAAU,UAAU,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EAC7D,YAAY,mBAAmB,EAC/B,aAAa,MAAM;AAAA,EACtB,WAAW,8BAAU,KAAK,YAAY,iBAAiB;AAAA,EACvD,UAAU,8BAAU,KAAK,YAAY,gBAAgB;AAAA,EACrD,aAAa,8BAAU,OAAO,YAAY,oBAAoB;AAAA,EAC9D,oBAAoB,8BAAU,OAC3B,YAAY,6EAA6E,EACzF,aAAa,gBAAgB;AAAA,EAChC,MAAM,8BAAU,OAAO,YAAY,6CAA6C,EAAE,aAAa,MAAM;AAAA,EACrG,oBAAoB,8BAAU,KAAK,YAAY,qCAAqC,EAAE,aAAa,KAAK;AAC1G;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import React2 from "react";
3
- import { describe } from "react-desc";
3
+ import { describe } from "@elliemae/ds-utilities";
4
4
  import { TreeViewPropTypes } from "./react-desc-prop-types";
5
5
  import TreeViewContext from "./TreeViewContext";
6
6
  import { useTreeview } from "./config/useTreeview";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/TreeView.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\n\nimport { describe } from 'react-desc';\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"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\n\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
5
  "mappings": "AAAA;ACAA;AAEA;AACA;AACA;AACA;AACA;AAEO,kBAAkB,OAA0B;AACjD,QAAM,EAAE,QAAQ,YAAY,KAAK;AAEjC,SACE,qCAAC,gBAAgB,UAAhB;AAAA,IAAyB,OAAO;AAAA,KAC/B,qCAAC,cAAS,CACZ;AAEJ;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  import * as React from "react";
18
18
  import React2, { useContext, useCallback, useMemo } from "react";
19
19
  import { DSCheckbox } from "@elliemae/ds-form";
20
- import styled from "styled-components";
20
+ import { styled } from "@elliemae/ds-system";
21
21
  import TreeViewContext from "../TreeViewContext";
22
22
  import { toggleCheckboxItem } from "../utils/selectable-helper";
23
23
  import { filterObject } from "../utils/object-helpers";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/CheckboxSelectable.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext, useCallback, useMemo } from 'react';\nimport { DSCheckbox } from '@elliemae/ds-form';\nimport styled from 'styled-components';\nimport TreeViewContext from '../TreeViewContext';\nimport { toggleCheckboxItem } from '../utils/selectable-helper';\nimport { filterObject } from '../utils/object-helpers';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\nconst StyledCheckboxWrapper = styled.span`\n padding-top: 3px;\n`;\ninterface PropsT {\n item: DSTreeviewT.Item;\n itemIndex: number;\n}\nfunction CheckboxSelectable(props: PropsT): JSX.Element | null {\n const { item, itemIndex } = props;\n const { id } = item;\n\n const ctx = useContext(TreeViewContext);\n const {\n props: { onSelectionChange, isItemDisabled },\n virtualListHelpers: { scrollToIndex },\n triggerTreeRerender,\n selectedCheckboxes,\n setSelectedCheckboxes,\n } = ctx;\n\n const onCheckboxChange = useCallback(() => {\n const newSelections = toggleCheckboxItem(item);\n const newSelectionHasmap = filterObject<DSTreeviewT.SelectionState>(\n { ...selectedCheckboxes, ...newSelections },\n (value) => value !== false,\n );\n setSelectedCheckboxes(newSelectionHasmap);\n triggerTreeRerender();\n\n const indexAndScrollTo = {\n scrollToItem: () => {\n if (typeof item.virtualIndex === 'number') scrollToIndex(item.virtualIndex);\n },\n itemIndex,\n };\n if (onSelectionChange) onSelectionChange(newSelectionHasmap, item, indexAndScrollTo);\n }, [\n item,\n triggerTreeRerender,\n onSelectionChange,\n itemIndex,\n scrollToIndex,\n selectedCheckboxes,\n setSelectedCheckboxes,\n ]);\n const isChecked = useMemo(() => {\n if (selectedCheckboxes[id] === 'mixed') {\n return 'mixed' as const;\n }\n if (selectedCheckboxes[id] === true) {\n return true;\n }\n return false;\n }, [selectedCheckboxes, id]);\n\n const isDisabled = useMemo(() => isItemDisabled(item), [item, isItemDisabled]);\n\n return (\n <StyledCheckboxWrapper>\n <DSCheckbox\n checked={isChecked}\n disabled={isDisabled}\n className=\"em-ds-tree-item-checkbox\"\n data-testid=\"tree-item-checkbox\"\n onChange={onCheckboxChange}\n tabIndex=\"0\"\n />\n </StyledCheckboxWrapper>\n );\n}\n\nexport default CheckboxSelectable;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext, useCallback, useMemo } from 'react';\nimport { DSCheckbox } from '@elliemae/ds-form';\nimport { styled } from '@elliemae/ds-system';\nimport TreeViewContext from '../TreeViewContext';\nimport { toggleCheckboxItem } from '../utils/selectable-helper';\nimport { filterObject } from '../utils/object-helpers';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\nconst StyledCheckboxWrapper = styled.span`\n padding-top: 3px;\n`;\ninterface PropsT {\n item: DSTreeviewT.Item;\n itemIndex: number;\n}\nfunction CheckboxSelectable(props: PropsT): JSX.Element | null {\n const { item, itemIndex } = props;\n const { id } = item;\n\n const ctx = useContext(TreeViewContext);\n const {\n props: { onSelectionChange, isItemDisabled },\n virtualListHelpers: { scrollToIndex },\n triggerTreeRerender,\n selectedCheckboxes,\n setSelectedCheckboxes,\n } = ctx;\n\n const onCheckboxChange = useCallback(() => {\n const newSelections = toggleCheckboxItem(item);\n const newSelectionHasmap = filterObject<DSTreeviewT.SelectionState>(\n { ...selectedCheckboxes, ...newSelections },\n (value) => value !== false,\n );\n setSelectedCheckboxes(newSelectionHasmap);\n triggerTreeRerender();\n\n const indexAndScrollTo = {\n scrollToItem: () => {\n if (typeof item.virtualIndex === 'number') scrollToIndex(item.virtualIndex);\n },\n itemIndex,\n };\n if (onSelectionChange) onSelectionChange(newSelectionHasmap, item, indexAndScrollTo);\n }, [\n item,\n triggerTreeRerender,\n onSelectionChange,\n itemIndex,\n scrollToIndex,\n selectedCheckboxes,\n setSelectedCheckboxes,\n ]);\n const isChecked = useMemo(() => {\n if (selectedCheckboxes[id] === 'mixed') {\n return 'mixed' as const;\n }\n if (selectedCheckboxes[id] === true) {\n return true;\n }\n return false;\n }, [selectedCheckboxes, id]);\n\n const isDisabled = useMemo(() => isItemDisabled(item), [item, isItemDisabled]);\n\n return (\n <StyledCheckboxWrapper>\n <DSCheckbox\n checked={isChecked}\n disabled={isDisabled}\n className=\"em-ds-tree-item-checkbox\"\n data-testid=\"tree-item-checkbox\"\n onChange={onCheckboxChange}\n tabIndex=\"0\"\n />\n </StyledCheckboxWrapper>\n );\n}\n\nexport default CheckboxSelectable;\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,wBAAwB,OAAO;AAAA;AAAA;AAOrC,4BAA4B,OAAmC;AAC7D,QAAM,EAAE,MAAM,cAAc;AAC5B,QAAM,EAAE,OAAO;AAEf,QAAM,MAAM,WAAW,eAAe;AACtC,QAAM;AAAA,IACJ,OAAO,EAAE,mBAAmB;AAAA,IAC5B,oBAAoB,EAAE;AAAA,IACtB;AAAA,IACA;AAAA,IACA;AAAA,MACE;AAEJ,QAAM,mBAAmB,YAAY,MAAM;AACzC,UAAM,gBAAgB,mBAAmB,IAAI;AAC7C,UAAM,qBAAqB,aACzB,kCAAK,qBAAuB,gBAC5B,CAAC,UAAU,UAAU,KACvB;AACA,0BAAsB,kBAAkB;AACxC,wBAAoB;AAEpB,UAAM,mBAAmB;AAAA,MACvB,cAAc,MAAM;AAClB,YAAI,OAAO,KAAK,iBAAiB;AAAU,wBAAc,KAAK,YAAY;AAAA,MAC5E;AAAA,MACA;AAAA,IACF;AACA,QAAI;AAAmB,wBAAkB,oBAAoB,MAAM,gBAAgB;AAAA,EACrF,GAAG;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,YAAY,QAAQ,MAAM;AAC9B,QAAI,mBAAmB,QAAQ,SAAS;AACtC,aAAO;AAAA,IACT;AACA,QAAI,mBAAmB,QAAQ,MAAM;AACnC,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT,GAAG,CAAC,oBAAoB,EAAE,CAAC;AAE3B,QAAM,aAAa,QAAQ,MAAM,eAAe,IAAI,GAAG,CAAC,MAAM,cAAc,CAAC;AAE7E,SACE,qCAAC,6BACC,qCAAC;AAAA,IACC,SAAS;AAAA,IACT,UAAU;AAAA,IACV,WAAU;AAAA,IACV,eAAY;AAAA,IACZ,UAAU;AAAA,IACV,UAAS;AAAA,GACX,CACF;AAEJ;AAEA,IAAO,6BAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import React2 from "react";
3
- import styled from "styled-components";
3
+ import { styled } from "@elliemae/ds-system";
4
4
  import { DSTreeViewPrefix, treeItemBlockName } from "../config/cssClassesConstants";
5
5
  const Separator = styled.span`
6
6
  width: 1px;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/ChildrenCountDisplayer.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/function-component-definition */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { DSTreeViewPrefix, treeItemBlockName } from '../config/cssClassesConstants';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\n\nconst Separator = styled.span`\n width: 1px;\n height: 12px;\n margin: 0 8px;\n border-left: 1px solid ${(props) => props.theme.colors.neutral['600']};\n font-size: 12px;\n`;\n\nconst className = `${DSTreeViewPrefix}-${treeItemBlockName}-children-count-displayer`;\n\ninterface PropsT {\n item: DSTreeviewT.Item;\n}\n\nexport const ChildrenCountDisplayer: React.ComponentType<PropsT> = (props) => {\n const { item } = props;\n const { isGroup, children } = item;\n\n if (!isGroup) return null;\n return (\n <span data-testid=\"tree-item-children-count-displayer\" className={className}>\n <Separator />\n {`${children.length} Items`}\n </span>\n );\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/function-component-definition */\nimport React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTreeViewPrefix, treeItemBlockName } from '../config/cssClassesConstants';\nimport type { DSTreeviewT } from '../react-desc-prop-types';\n\nconst Separator = styled.span`\n width: 1px;\n height: 12px;\n margin: 0 8px;\n border-left: 1px solid ${(props) => props.theme.colors.neutral['600']};\n font-size: 12px;\n`;\n\nconst className = `${DSTreeViewPrefix}-${treeItemBlockName}-children-count-displayer`;\n\ninterface PropsT {\n item: DSTreeviewT.Item;\n}\n\nexport const ChildrenCountDisplayer: React.ComponentType<PropsT> = (props) => {\n const { item } = props;\n const { isGroup, children } = item;\n\n if (!isGroup) return null;\n return (\n <span data-testid=\"tree-item-children-count-displayer\" className={className}>\n <Separator />\n {`${children.length} Items`}\n </span>\n );\n};\n"],
5
5
  "mappings": "AAAA;ACCA;AACA;AACA;AAGA,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA;AAAA,2BAIE,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAIjE,MAAM,YAAY,GAAG,oBAAoB;AAMlC,MAAM,yBAAsD,CAAC,UAAU;AAC5E,QAAM,EAAE,SAAS;AACjB,QAAM,EAAE,SAAS,aAAa;AAE9B,MAAI,CAAC;AAAS,WAAO;AACrB,SACE,qCAAC;AAAA,IAAK,eAAY;AAAA,IAAqC;AAAA,KACrD,qCAAC,eAAU,GACV,GAAG,SAAS,cACf;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import React2 from "react";
3
- import styled from "styled-components";
3
+ import { styled } from "@elliemae/ds-system";
4
4
  import { DropIndicatorPosition } from "../hoc/SortableItemContext";
5
5
  const getPositionStyles = ({ dropIndicatorPosition }) => `
6
6
  top: ${dropIndicatorPosition === DropIndicatorPosition.Before ? "0" : "unset"};
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/DropIndicator.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport styled from 'styled-components';\nimport { DropIndicatorPosition } from '../hoc/SortableItemContext';\n\ninterface DropIndicatorProps {\n vertical?: boolean;\n dropIndicatorPosition: DropIndicatorPosition | false;\n isLast?: boolean;\n isDropValid?: boolean;\n}\n\nconst getPositionStyles = ({ dropIndicatorPosition }: DropIndicatorProps) => `\n top: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};\n bottom: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};\n left: -2px;\n `;\n\nconst getCircleStyles = ({ dropIndicatorPosition }: DropIndicatorProps) => ({\n position: 'absolute',\n zIndex: 20,\n top: dropIndicatorPosition === DropIndicatorPosition.After ? 'unset' : '-2px',\n bottom: dropIndicatorPosition === DropIndicatorPosition.Before ? 'unset' : '-2px',\n left: '0px',\n opacity: 1,\n});\n\nconst StyledIndicator = styled.div<DropIndicatorProps>`\n position: absolute;\n ${getPositionStyles}\n box-sizing: border-box;\n width: ${(props) => (props.vertical ? '2px' : '100%')};\n height: ${(props) => (props.vertical ? '100%' : '2px')};\n background-color: ${({ isDropValid, theme }) => (isDropValid ? theme.colors.brand[600] : theme.colors.danger[900])};\n z-index: 20;\n`;\n\nconst CircleIndicator = (style: Record<string, unknown>, isDropValid: boolean | null | undefined) => (\n <svg height=\"6\" width=\"6\" style={style}>\n <circle cx=\"3\" cy=\"3\" r=\"3\" strokeWidth=\"0\" fill={isDropValid ? '#1E79C2' : '#C64252'} />\n </svg>\n);\n\nconst DropIndicator: React.ComponentType<DropIndicatorProps> = ({ dropIndicatorPosition, isLast, isDropValid }) => {\n if (\n ![DropIndicatorPosition.After, DropIndicatorPosition.Before].includes(\n dropIndicatorPosition as DropIndicatorPosition,\n )\n )\n return null;\n\n const safeDropIndicatorPosition = isLast ? DropIndicatorPosition.Before : dropIndicatorPosition;\n\n return (\n <>\n {CircleIndicator(getCircleStyles({ dropIndicatorPosition: safeDropIndicatorPosition }), isDropValid)}\n <StyledIndicator dropIndicatorPosition={safeDropIndicatorPosition} isDropValid={isDropValid} />\n </>\n );\n};\n\nexport default DropIndicator;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DropIndicatorPosition } from '../hoc/SortableItemContext';\n\ninterface DropIndicatorProps {\n vertical?: boolean;\n dropIndicatorPosition: DropIndicatorPosition | false;\n isLast?: boolean;\n isDropValid?: boolean;\n}\n\nconst getPositionStyles = ({ dropIndicatorPosition }: DropIndicatorProps) => `\n top: ${dropIndicatorPosition === DropIndicatorPosition.Before ? '0' : 'unset'};\n bottom: ${dropIndicatorPosition === DropIndicatorPosition.After ? '0' : 'unset'};\n left: -2px;\n `;\n\nconst getCircleStyles = ({ dropIndicatorPosition }: DropIndicatorProps) => ({\n position: 'absolute',\n zIndex: 20,\n top: dropIndicatorPosition === DropIndicatorPosition.After ? 'unset' : '-2px',\n bottom: dropIndicatorPosition === DropIndicatorPosition.Before ? 'unset' : '-2px',\n left: '0px',\n opacity: 1,\n});\n\nconst StyledIndicator = styled.div<DropIndicatorProps>`\n position: absolute;\n ${getPositionStyles}\n box-sizing: border-box;\n width: ${(props) => (props.vertical ? '2px' : '100%')};\n height: ${(props) => (props.vertical ? '100%' : '2px')};\n background-color: ${({ isDropValid, theme }) => (isDropValid ? theme.colors.brand[600] : theme.colors.danger[900])};\n z-index: 20;\n`;\n\nconst CircleIndicator = (style: Record<string, unknown>, isDropValid: boolean | null | undefined) => (\n <svg height=\"6\" width=\"6\" style={style}>\n <circle cx=\"3\" cy=\"3\" r=\"3\" strokeWidth=\"0\" fill={isDropValid ? '#1E79C2' : '#C64252'} />\n </svg>\n);\n\nconst DropIndicator: React.ComponentType<DropIndicatorProps> = ({ dropIndicatorPosition, isLast, isDropValid }) => {\n if (\n ![DropIndicatorPosition.After, DropIndicatorPosition.Before].includes(\n dropIndicatorPosition as DropIndicatorPosition,\n )\n )\n return null;\n\n const safeDropIndicatorPosition = isLast ? DropIndicatorPosition.Before : dropIndicatorPosition;\n\n return (\n <>\n {CircleIndicator(getCircleStyles({ dropIndicatorPosition: safeDropIndicatorPosition }), isDropValid)}\n <StyledIndicator dropIndicatorPosition={safeDropIndicatorPosition} isDropValid={isDropValid} />\n </>\n );\n};\n\nexport default DropIndicator;\n"],
5
5
  "mappings": "AAAA;ACAA;AACA;AACA;AASA,MAAM,oBAAoB,CAAC,EAAE,4BAAgD;AAAA,aAChE,0BAA0B,sBAAsB,SAAS,MAAM;AAAA,gBAC5D,0BAA0B,sBAAsB,QAAQ,MAAM;AAAA;AAAA;AAI9E,MAAM,kBAAkB,CAAC,EAAE,4BAAiD;AAAA,EAC1E,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,KAAK,0BAA0B,sBAAsB,QAAQ,UAAU;AAAA,EACvE,QAAQ,0BAA0B,sBAAsB,SAAS,UAAU;AAAA,EAC3E,MAAM;AAAA,EACN,SAAS;AACX;AAEA,MAAM,kBAAkB,OAAO;AAAA;AAAA,IAE3B;AAAA;AAAA,WAEO,CAAC,UAAW,MAAM,WAAW,QAAQ;AAAA,YACpC,CAAC,UAAW,MAAM,WAAW,SAAS;AAAA,sBAC5B,CAAC,EAAE,aAAa,YAAa,cAAc,MAAM,OAAO,MAAM,OAAO,MAAM,OAAO,OAAO;AAAA;AAAA;AAI/G,MAAM,kBAAkB,CAAC,OAAgC,gBACvD,qCAAC;AAAA,EAAI,QAAO;AAAA,EAAI,OAAM;AAAA,EAAI;AAAA,GACxB,qCAAC;AAAA,EAAO,IAAG;AAAA,EAAI,IAAG;AAAA,EAAI,GAAE;AAAA,EAAI,aAAY;AAAA,EAAI,MAAM,cAAc,YAAY;AAAA,CAAW,CACzF;AAGF,MAAM,gBAAyD,CAAC,EAAE,uBAAuB,QAAQ,kBAAkB;AACjH,MACE,CAAC,CAAC,sBAAsB,OAAO,sBAAsB,MAAM,EAAE,SAC3D,qBACF;AAEA,WAAO;AAET,QAAM,4BAA4B,SAAS,sBAAsB,SAAS;AAE1E,SACE,4DACG,gBAAgB,gBAAgB,EAAE,uBAAuB,0BAA0B,CAAC,GAAG,WAAW,GACnG,qCAAC;AAAA,IAAgB,uBAAuB;AAAA,IAA2B;AAAA,GAA0B,CAC/F;AAEJ;AAEA,IAAO,wBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { PropTypes } from "react-desc";
2
+ import { PropTypes } from "@elliemae/ds-utilities";
3
3
  const TreeViewPropTypes = {
4
4
  data: PropTypes.arrayOf(PropTypes.shape({
5
5
  children: PropTypes.arrayOf(PropTypes.object),
@@ -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 { PropTypes } from 'react-desc';\nimport TreeModel from 'tree-model';\nimport { 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 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 fluid: boolean;\n isMultiSelect: boolean;\n isSingleSelect: boolean;\n getIsDropValid: (\n active: DndItem,\n over: DndItem,\n dropIndicatorPosition: 'none' | 'before' | 'after' | 'inside',\n ) => boolean;\n restrictDragAndDrop: boolean;\n showChildrenAmount: boolean;\n sortable: boolean;\n isLoading: boolean;\n highlightOnlyQuery: boolean;\n onItemClick: (item: Item, e: React.MouseEvent<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 }\n export interface PropsOptional {\n expanded: ExpandedItems;\n rightAddons: ((item: Item) => React.ReactNode | React.ReactNode[]) | JSX.Element;\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 name: PropTypes.string,\n node: PropTypes.object,\n }),\n ).description('data to populate tree view').isRequired,\n plugins: PropTypes.arrayOf(PropTypes.string).description('list of enabled plugins').defaultValue([]),\n selection: PropTypes.object.description('pre selected items').defaultValue({}),\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 fluid: PropTypes.bool.description('whether is fluid or not').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 restrictDragAndDrop: PropTypes.bool.description('whether to restrict DnD functionality or not').defaultValue(false),\n showChildrenAmount: PropTypes.bool.description('whether to show the amount of children or not').defaultValue(false),\n sortable: PropTypes.bool.description('whether the sortable functionality is active or not').defaultValue(false),\n onItemClick: PropTypes.func.description('function executed when clicking on an item').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 name: 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};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { PropTypes } from '@elliemae/ds-utilities';\nimport TreeModel from 'tree-model';\nimport { 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 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 fluid: boolean;\n isMultiSelect: boolean;\n isSingleSelect: boolean;\n getIsDropValid: (\n active: DndItem,\n over: DndItem,\n dropIndicatorPosition: 'none' | 'before' | 'after' | 'inside',\n ) => boolean;\n restrictDragAndDrop: boolean;\n showChildrenAmount: boolean;\n sortable: boolean;\n isLoading: boolean;\n highlightOnlyQuery: boolean;\n onItemClick: (item: Item, e: React.MouseEvent<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 }\n export interface PropsOptional {\n expanded: ExpandedItems;\n rightAddons: ((item: Item) => React.ReactNode | React.ReactNode[]) | JSX.Element;\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 name: PropTypes.string,\n node: PropTypes.object,\n }),\n ).description('data to populate tree view').isRequired,\n plugins: PropTypes.arrayOf(PropTypes.string).description('list of enabled plugins').defaultValue([]),\n selection: PropTypes.object.description('pre selected items').defaultValue({}),\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 fluid: PropTypes.bool.description('whether is fluid or not').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 restrictDragAndDrop: PropTypes.bool.description('whether to restrict DnD functionality or not').defaultValue(false),\n showChildrenAmount: PropTypes.bool.description('whether to show the amount of children or not').defaultValue(false),\n sortable: PropTypes.bool.description('whether the sortable functionality is active or not').defaultValue(false),\n onItemClick: PropTypes.func.description('function executed when clicking on an item').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 name: 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};\n"],
5
5
  "mappings": "AAAA;ACCA;AAyGO,MAAM,oBAAoB;AAAA,EAC/B,MAAM,UAAU,QACd,UAAU,MAAM;AAAA,IACd,UAAU,UAAU,QAAQ,UAAU,MAAM;AAAA,IAC5C,IAAI,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAAA,IAC5D,SAAS,UAAU,UAAU,CAAC,UAAU,MAAM,CAAC,QAAW,IAAI,CAAC,GAAG,UAAU,IAAI,CAAC;AAAA,IACjF,MAAM,UAAU;AAAA,IAChB,MAAM,UAAU;AAAA,EAClB,CAAC,CACH,EAAE,YAAY,4BAA4B,EAAE;AAAA,EAC5C,SAAS,UAAU,QAAQ,UAAU,MAAM,EAAE,YAAY,yBAAyB,EAAE,aAAa,CAAC,CAAC;AAAA,EACnG,WAAW,UAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,CAAC,CAAC;AAAA,EAC7E,UAAU,UAAU,OAAO,YAAY,iCAAiC,EAAE,aAAa,MAAS;AAAA,EAChG,aAAa,UA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UAAU,KAC1B,YAAY,8CAA8C,EAC1D,aAAa,UAAU;AAAA,EAC1B,gBAAgB,UAAU,KAAK,YAAY,0CAA0C,EAAE,aAAa,UAAU;AAAA,EAC9G,0BAA0B,UAAU,KACjC,YAAY,iEAAiE,EAC7E,aAAa,UAAU;AAAA,EAC1B,SAAS,UAAU,MAAM,CAAC,UAAU,SAAS,CAAC,EAAE,YAAY,iBAAiB,EAAE,aAAa,QAAQ;AAAA,EACpG,eAAe,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,MAAM,UAAU,OAAO,YAAY,6CAA6C,EAAE,aAAa,MAAM;AAAA,EACrG,oBAAoB,UAAU,KAAK,YAAY,qCAAqC,EAAE,aAAa,KAAK;AAC1G;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-treeview",
3
- "version": "3.1.0-next.1",
3
+ "version": "3.1.0-next.4",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Tree View",
6
6
  "files": [
@@ -222,15 +222,6 @@
222
222
  "reportFile": "tests.xml",
223
223
  "indent": 4
224
224
  },
225
- "scripts": {
226
- "test:e2e": "../../../node_modules/pui-e2e-test-sdk/node_modules/.bin/wdio run ../../../wdio.conf.js",
227
- "test:reports": "../../../node_modules/pui-e2e-test-sdk/node_modules/.bin/allure open",
228
- "test": "node ../../scripts/testing/test.mjs",
229
- "lint": "node ../../scripts/lint.mjs",
230
- "dts": "node ../../scripts/dts.mjs",
231
- "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
232
- "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
233
- },
234
225
  "publishConfig": {
235
226
  "access": "public",
236
227
  "typeSafety": false
@@ -238,24 +229,21 @@
238
229
  "dependencies": {
239
230
  "@dnd-kit/core": "~4.0.3",
240
231
  "@dnd-kit/sortable": "~5.0.0",
241
- "@elliemae/ds-button": "3.1.0-next.1",
242
- "@elliemae/ds-circular-progress-indicator": "3.1.0-next.1",
243
- "@elliemae/ds-classnames": "3.1.0-next.1",
244
- "@elliemae/ds-drag-and-drop": "3.1.0-next.1",
245
- "@elliemae/ds-form": "3.1.0-next.1",
246
- "@elliemae/ds-icons": "3.1.0-next.1",
247
- "@elliemae/ds-shared": "3.1.0-next.1",
248
- "@elliemae/ds-truncated-tooltip-text": "3.1.0-next.1",
249
- "@elliemae/ds-utilities": "3.1.0-next.1",
250
- "@elliemae/react-sortable-hoc": "^1.0.0",
251
- "react-desc": "~4.1.3",
232
+ "@elliemae/ds-button": "3.1.0-next.4",
233
+ "@elliemae/ds-circular-progress-indicator": "3.1.0-next.4",
234
+ "@elliemae/ds-classnames": "3.1.0-next.4",
235
+ "@elliemae/ds-drag-and-drop": "3.1.0-next.4",
236
+ "@elliemae/ds-form": "3.1.0-next.4",
237
+ "@elliemae/ds-icons": "3.1.0-next.4",
238
+ "@elliemae/ds-system": "3.1.0-next.4",
239
+ "@elliemae/ds-truncated-tooltip-text": "3.1.0-next.4",
240
+ "@elliemae/ds-utilities": "3.1.0-next.4",
252
241
  "react-highlight-words": "~0.17.0",
253
242
  "react-virtual": "~2.8.2",
254
243
  "tree-model": "~1.0.7",
255
244
  "uuid": "~8.3.2"
256
245
  },
257
246
  "devDependencies": {
258
- "@testing-library/react": "~12.1.4",
259
247
  "styled-components": "~5.3.3"
260
248
  },
261
249
  "peerDependencies": {
@@ -263,5 +251,15 @@
263
251
  "react": "~17.0.2",
264
252
  "react-dom": "^17.0.2",
265
253
  "styled-components": "^5.3.3"
254
+ },
255
+ "scripts": {
256
+ "test:e2e": "../../../node_modules/pui-e2e-test-sdk/node_modules/.bin/wdio run ../../../wdio.conf.js",
257
+ "test:reports": "../../../node_modules/pui-e2e-test-sdk/node_modules/.bin/allure open",
258
+ "test": "node ../../scripts/testing/test.mjs",
259
+ "lint": "node ../../scripts/lint.mjs",
260
+ "dts": "node ../../scripts/dts.mjs",
261
+ "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
262
+ "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
263
+ "checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
266
264
  }
267
- }
265
+ }