@elliemae/ds-fast-list 3.80.0-next.4 → 3.80.0-next.41

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.
Files changed (48) hide show
  1. package/dist/cjs/FastList.js +2 -2
  2. package/dist/cjs/FastList.js.map +2 -2
  3. package/dist/cjs/{DSFastListDefinitions.js → constants/index.js} +8 -7
  4. package/dist/cjs/constants/index.js.map +7 -0
  5. package/dist/cjs/hooks/useFastList.js +35 -6
  6. package/dist/cjs/hooks/useFastList.js.map +2 -2
  7. package/dist/cjs/hooks/useValidateProps.js +2 -2
  8. package/dist/cjs/hooks/useValidateProps.js.map +2 -2
  9. package/dist/cjs/index.js +4 -0
  10. package/dist/cjs/index.js.map +2 -2
  11. package/dist/cjs/parts/List.js +36 -28
  12. package/dist/cjs/parts/List.js.map +2 -2
  13. package/dist/cjs/react-desc-prop-types.js +40 -4
  14. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  15. package/dist/cjs/{FastListDataTestID.js → typescript-testing/slot-props.js} +13 -13
  16. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  17. package/dist/cjs/typescript-testing/typescript-fast-list-valid.js +87 -4
  18. package/dist/cjs/typescript-testing/typescript-fast-list-valid.js.map +2 -2
  19. package/dist/esm/FastList.js +1 -1
  20. package/dist/esm/FastList.js.map +1 -1
  21. package/dist/esm/{DSFastListDefinitions.js → constants/index.js} +5 -4
  22. package/dist/esm/constants/index.js.map +7 -0
  23. package/dist/esm/hooks/useFastList.js +35 -6
  24. package/dist/esm/hooks/useFastList.js.map +2 -2
  25. package/dist/esm/hooks/useValidateProps.js +1 -1
  26. package/dist/esm/hooks/useValidateProps.js.map +1 -1
  27. package/dist/esm/index.js +4 -0
  28. package/dist/esm/index.js.map +2 -2
  29. package/dist/esm/parts/List.js +31 -23
  30. package/dist/esm/parts/List.js.map +2 -2
  31. package/dist/esm/react-desc-prop-types.js +41 -5
  32. package/dist/esm/react-desc-prop-types.js.map +2 -2
  33. package/dist/esm/typescript-testing/slot-props.js +15 -0
  34. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  35. package/dist/esm/typescript-testing/typescript-fast-list-valid.js +87 -4
  36. package/dist/esm/typescript-testing/typescript-fast-list-valid.js.map +2 -2
  37. package/dist/types/constants/index.d.ts +13 -0
  38. package/dist/types/hooks/useFastList.d.ts +1 -1
  39. package/dist/types/index.d.ts +1 -0
  40. package/dist/types/react-desc-prop-types.d.ts +34 -4
  41. package/package.json +10 -9
  42. package/dist/cjs/DSFastListDefinitions.js.map +0 -7
  43. package/dist/cjs/FastListDataTestID.js.map +0 -7
  44. package/dist/esm/DSFastListDefinitions.js.map +0 -7
  45. package/dist/esm/FastListDataTestID.js +0 -8
  46. package/dist/esm/FastListDataTestID.js.map +0 -7
  47. package/dist/types/DSFastListDefinitions.d.ts +0 -11
  48. package/dist/types/FastListDataTestID.d.ts +0 -3
@@ -37,9 +37,9 @@ var import_jsx_runtime = require("react/jsx-runtime");
37
37
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
38
  var import_List = require("./parts/List.js");
39
39
  var import_react_desc_prop_types = require("./react-desc-prop-types.js");
40
- var import_DSFastListDefinitions = require("./DSFastListDefinitions.js");
40
+ var import_constants = require("./constants/index.js");
41
41
  const DSFastList = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_List.List, { ...props });
42
- DSFastList.displayName = import_DSFastListDefinitions.DSFastListName;
42
+ DSFastList.displayName = import_constants.DSFastListName;
43
43
  const DSFastListWithSchema = (0, import_ds_props_helpers.describe)(DSFastList).description("DSFastList");
44
44
  DSFastListWithSchema.propTypes = import_react_desc_prop_types.DSFastListPropTypes;
45
45
  //# sourceMappingURL=FastList.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/FastList.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { List } from './parts/List.js';\nimport { DSFastListPropTypes, type DSFastListT } from './react-desc-prop-types.js';\nimport { DSFastListName } from './DSFastListDefinitions.js';\n\n// we create ds-fast-list to solve the issue with the children prop in ds-virtual-list\n// this packages use render props instead of children prop.\n// we are not using a context nor zustand so all the logic is handled in List...\nconst DSFastList = <T extends object>(props: DSFastListT.Props<T>) => <List {...props} />;\n\nDSFastList.displayName = DSFastListName;\nconst DSFastListWithSchema = describe(DSFastList).description('DSFastList');\nDSFastListWithSchema.propTypes = DSFastListPropTypes;\n\nexport { DSFastList, DSFastListWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADS+C;AARtE,8BAAyB;AACzB,kBAAqB;AACrB,mCAAsD;AACtD,mCAA+B;AAK/B,MAAM,aAAa,CAAmB,UAAgC,4CAAC,oBAAM,GAAG,OAAO;AAEvF,WAAW,cAAc;AACzB,MAAM,2BAAuB,kCAAS,UAAU,EAAE,YAAY,YAAY;AAC1E,qBAAqB,YAAY;",
4
+ "sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { List } from './parts/List.js';\nimport { DSFastListPropTypes, type DSFastListT } from './react-desc-prop-types.js';\nimport { DSFastListName } from './constants/index.js';\n\n// we create ds-fast-list to solve the issue with the children prop in ds-virtual-list\n// this packages use render props instead of children prop.\n// we are not using a context nor zustand so all the logic is handled in List...\nconst DSFastList = <T extends object>(props: DSFastListT.Props<T>) => <List {...props} />;\n\nDSFastList.displayName = DSFastListName;\nconst DSFastListWithSchema = describe(DSFastList).description('DSFastList');\nDSFastListWithSchema.propTypes = DSFastListPropTypes;\n\nexport { DSFastList, DSFastListWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADS+C;AARtE,8BAAyB;AACzB,kBAAqB;AACrB,mCAAsD;AACtD,uBAA+B;AAK/B,MAAM,aAAa,CAAmB,UAAgC,4CAAC,oBAAM,GAAG,OAAO;AAEvF,WAAW,cAAc;AACzB,MAAM,2BAAuB,kCAAS,UAAU,EAAE,YAAY,YAAY;AAC1E,qBAAqB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -26,20 +26,21 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var DSFastListDefinitions_exports = {};
30
- __export(DSFastListDefinitions_exports, {
31
- DSCardV3DataTestIds: () => DSCardV3DataTestIds,
29
+ var constants_exports = {};
30
+ __export(constants_exports, {
31
+ DSFastListDataTestIds: () => DSFastListDataTestIds,
32
32
  DSFastListName: () => DSFastListName,
33
33
  DSFastListSlots: () => DSFastListSlots
34
34
  });
35
- module.exports = __toCommonJS(DSFastListDefinitions_exports);
35
+ module.exports = __toCommonJS(constants_exports);
36
36
  var React = __toESM(require("react"));
37
37
  var import_ds_system = require("@elliemae/ds-system");
38
38
  const DSFastListName = "DSFastlist";
39
39
  const DSFastListSlots = {
40
40
  CONTAINER: "container",
41
41
  WRAPPER_LIST: "wrapper-list",
42
- ITEM: "item"
42
+ ITEM: "item",
43
+ EXTRA_CONTENT: "extra-content"
43
44
  };
44
- const DSCardV3DataTestIds = (0, import_ds_system.slotObjectToDataTestIds)(DSFastListName, DSFastListSlots);
45
- //# sourceMappingURL=DSFastListDefinitions.js.map
45
+ const DSFastListDataTestIds = (0, import_ds_system.slotObjectToDataTestIds)(DSFastListName, DSFastListSlots);
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSFastListName = 'DSFastlist';\n\nexport const DSFastListSlots = {\n CONTAINER: 'container',\n WRAPPER_LIST: 'wrapper-list',\n ITEM: 'item',\n EXTRA_CONTENT: 'extra-content',\n} as const;\n\nexport const DSFastListDataTestIds = slotObjectToDataTestIds(DSFastListName, DSFastListSlots);\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,iBAAiB;AAEvB,MAAM,kBAAkB;AAAA,EAC7B,WAAW;AAAA,EACX,cAAc;AAAA,EACd,MAAM;AAAA,EACN,eAAe;AACjB;AAEO,MAAM,4BAAwB,0CAAwB,gBAAgB,eAAe;",
6
+ "names": []
7
+ }
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
36
36
  var import_uid = require("uid");
37
37
  var import_react_virtual = require("@tanstack/react-virtual");
38
38
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
39
+ var import_ds_system = require("@elliemae/ds-system");
39
40
  var import_react_desc_prop_types = require("../react-desc-prop-types.js");
40
41
  var import_useValidateProps = require("./useValidateProps.js");
41
42
  const useFastList = (propsFromUser) => {
@@ -44,26 +45,54 @@ const useFastList = (propsFromUser) => {
44
45
  import_react_desc_prop_types.defaultProps
45
46
  );
46
47
  (0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSFastListPropTypes);
47
- const { actionRef, count, estimateSize } = propsWithDefault;
48
+ const { actionRef, count, estimateSize, paddingStart, paddingEnd, innerRef, remountOnCountChange } = propsWithDefault;
48
49
  const parentRef = import_react.default.useRef(null);
50
+ const containerRef = import_react.default.useMemo(
51
+ () => innerRef ? (0, import_ds_system.setMultipleRefs)([parentRef, innerRef]) : parentRef,
52
+ [innerRef]
53
+ );
49
54
  const useVirtualHelpers = (0, import_react_virtual.useVirtualizer)({
50
55
  count,
51
56
  getScrollElement: () => parentRef.current,
52
57
  overscan: 15,
53
- estimateSize
58
+ estimateSize,
59
+ paddingStart,
60
+ paddingEnd
54
61
  });
55
62
  const totalSize = useVirtualHelpers.getTotalSize();
56
- if (actionRef && actionRef.current) actionRef.current.scrollTo = useVirtualHelpers.scrollToIndex;
57
- const instanceUid = import_react.default.useMemo(() => `ds-fast-list-${(0, import_uid.uid)(6)}${count}`, [count]);
63
+ if (actionRef && actionRef.current) {
64
+ actionRef.current.scrollTo = useVirtualHelpers.scrollToIndex;
65
+ actionRef.current.measure = useVirtualHelpers.measure;
66
+ actionRef.current.getVisibleItems = () => {
67
+ const range = useVirtualHelpers.calculateRange();
68
+ if (!range) return [];
69
+ const viewportStart = useVirtualHelpers.scrollOffset ?? 0;
70
+ const viewportEnd = viewportStart + (useVirtualHelpers.scrollRect?.height ?? 0);
71
+ const indices = [];
72
+ for (let index = range.startIndex; index <= range.endIndex; index += 1) {
73
+ const item = useVirtualHelpers.measurementsCache[index];
74
+ if (item && item.end > viewportStart && item.start < viewportEnd) indices.push(index);
75
+ }
76
+ return indices;
77
+ };
78
+ actionRef.current.getMountedItems = () => useVirtualHelpers.getVirtualItems().map((item) => item.index);
79
+ actionRef.current.getOffsetForIndex = (index, align) => useVirtualHelpers.getOffsetForIndex(index, align)?.[0];
80
+ actionRef.current.scrollToOffset = useVirtualHelpers.scrollToOffset;
81
+ }
82
+ const stableUid = import_react.default.useMemo(() => (0, import_uid.uid)(6), []);
83
+ const instanceUid = import_react.default.useMemo(
84
+ () => remountOnCountChange === false ? `ds-fast-list-${stableUid}` : `ds-fast-list-${(0, import_uid.uid)(6)}${count}`,
85
+ [count, remountOnCountChange, stableUid]
86
+ );
58
87
  return import_react.default.useMemo(
59
88
  () => ({
60
89
  instanceUid,
61
- parentRef,
90
+ containerRef,
62
91
  getVirtualItems: useVirtualHelpers.getVirtualItems,
63
92
  totalSize,
64
93
  measureElement: useVirtualHelpers.measureElement
65
94
  }),
66
- [useVirtualHelpers.getVirtualItems, useVirtualHelpers.measureElement, totalSize, instanceUid]
95
+ [useVirtualHelpers.getVirtualItems, useVirtualHelpers.measureElement, totalSize, instanceUid, containerRef]
67
96
  );
68
97
  };
69
98
  //# sourceMappingURL=useFastList.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useFastList.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { uid } from 'uid';\nimport { useVirtualizer, type Virtualizer } from '@tanstack/react-virtual';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { type DSFastListT, DSFastListPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport type FastListCTX = {\n instanceUid: string;\n parentRef: React.MutableRefObject<HTMLDivElement | null>;\n getVirtualItems: Virtualizer<HTMLDivElement, HTMLElement>['getVirtualItems'];\n totalSize: ReturnType<Virtualizer<HTMLDivElement, HTMLElement>['getTotalSize']>;\n measureElement: Virtualizer<HTMLDivElement, HTMLElement>['measureElement'];\n};\nexport const useFastList = <T,>(propsFromUser: DSFastListT.Props<T>): FastListCTX => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSFastListT.InternalProps<T>>(\n propsFromUser,\n defaultProps as Partial<DSFastListT.InternalProps<T>>,\n );\n useValidateProps(propsWithDefault, DSFastListPropTypes);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n const { actionRef, count, estimateSize } = propsWithDefault;\n const parentRef = React.useRef<HTMLDivElement>(null);\n const useVirtualHelpers = useVirtualizer({\n count,\n getScrollElement: () => parentRef.current,\n overscan: 15,\n estimateSize,\n });\n const totalSize = useVirtualHelpers.getTotalSize();\n\n if (actionRef && actionRef.current) actionRef.current.scrollTo = useVirtualHelpers.scrollToIndex;\n\n const instanceUid = React.useMemo(() => `ds-fast-list-${uid(6)}${count}`, [count]);\n return React.useMemo(\n () => ({\n instanceUid,\n parentRef,\n getVirtualItems: useVirtualHelpers.getVirtualItems,\n totalSize,\n measureElement: useVirtualHelpers.measureElement,\n }),\n [useVirtualHelpers.getVirtualItems, useVirtualHelpers.measureElement, totalSize, instanceUid],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,iBAAoB;AACpB,2BAAiD;AACjD,8BAA6C;AAC7C,mCAAoE;AACpE,8BAAiC;AAS1B,MAAM,cAAc,CAAK,kBAAqD;AAInF,QAAM,uBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AACA,gDAAiB,kBAAkB,gDAAmB;AAItD,QAAM,EAAE,WAAW,OAAO,aAAa,IAAI;AAC3C,QAAM,YAAY,aAAAA,QAAM,OAAuB,IAAI;AACnD,QAAM,wBAAoB,qCAAe;AAAA,IACvC;AAAA,IACA,kBAAkB,MAAM,UAAU;AAAA,IAClC,UAAU;AAAA,IACV;AAAA,EACF,CAAC;AACD,QAAM,YAAY,kBAAkB,aAAa;AAEjD,MAAI,aAAa,UAAU,QAAS,WAAU,QAAQ,WAAW,kBAAkB;AAEnF,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,oBAAgB,gBAAI,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,KAAK,CAAC;AACjF,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,iBAAiB,kBAAkB;AAAA,MACnC;AAAA,MACA,gBAAgB,kBAAkB;AAAA,IACpC;AAAA,IACA,CAAC,kBAAkB,iBAAiB,kBAAkB,gBAAgB,WAAW,WAAW;AAAA,EAC9F;AACF;",
4
+ "sourcesContent": ["import React from 'react';\nimport { uid } from 'uid';\nimport { useVirtualizer, type Virtualizer } from '@tanstack/react-virtual';\nimport { useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { setMultipleRefs } from '@elliemae/ds-system';\nimport { type DSFastListT, DSFastListPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport type FastListCTX = {\n instanceUid: string;\n containerRef: React.MutableRefObject<HTMLDivElement | null> | React.RefCallback<HTMLDivElement>;\n getVirtualItems: Virtualizer<HTMLDivElement, HTMLElement>['getVirtualItems'];\n totalSize: ReturnType<Virtualizer<HTMLDivElement, HTMLElement>['getTotalSize']>;\n measureElement: Virtualizer<HTMLDivElement, HTMLElement>['measureElement'];\n};\nexport const useFastList = <T,>(propsFromUser: DSFastListT.Props<T>): FastListCTX => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSFastListT.InternalProps<T>>(\n propsFromUser,\n defaultProps as Partial<DSFastListT.InternalProps<T>>,\n );\n useValidateProps(propsWithDefault, DSFastListPropTypes);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n const { actionRef, count, estimateSize, paddingStart, paddingEnd, innerRef, remountOnCountChange } = propsWithDefault;\n const parentRef = React.useRef<HTMLDivElement>(null);\n const containerRef = React.useMemo(\n () => (innerRef ? setMultipleRefs<HTMLDivElement>([parentRef, innerRef]) : parentRef),\n [innerRef],\n );\n const useVirtualHelpers = useVirtualizer({\n count,\n getScrollElement: () => parentRef.current,\n overscan: 15,\n estimateSize,\n paddingStart,\n paddingEnd,\n });\n const totalSize = useVirtualHelpers.getTotalSize();\n\n if (actionRef && actionRef.current) {\n actionRef.current.scrollTo = useVirtualHelpers.scrollToIndex;\n actionRef.current.measure = useVirtualHelpers.measure;\n // `getVirtualItems()` includes the overscan buffer on each side \u2014 not what \"visible\" means.\n // `calculateRange()` is the virtualizer's own pre-overscan viewport calculation (pure scroll\n // geometry, no DOM scraping) and is what \"currently visible\" should actually be backed by.\n actionRef.current.getVisibleItems = () => {\n const range = useVirtualHelpers.calculateRange();\n if (!range) return [];\n /**\n * `calculateRange()` always seeds the item nearest to the scroll offset, even when only padding is in view\n * (a `paddingStart` or `paddingEnd` larger than the viewport), so each index is kept only if its item\n * actually intersects the viewport.\n */\n const viewportStart = useVirtualHelpers.scrollOffset ?? 0;\n const viewportEnd = viewportStart + (useVirtualHelpers.scrollRect?.height ?? 0);\n const indices: number[] = [];\n for (let index = range.startIndex; index <= range.endIndex; index += 1) {\n const item = useVirtualHelpers.measurementsCache[index];\n if (item && item.end > viewportStart && item.start < viewportEnd) indices.push(index);\n }\n return indices;\n };\n // The overscanned set (viewport + the 15-item buffer on each side) \u2014 everything currently\n // mounted in the DOM, as opposed to `getVisibleItems()`'s true-viewport-only set above.\n actionRef.current.getMountedItems = () => useVirtualHelpers.getVirtualItems().map((item) => item.index);\n actionRef.current.getOffsetForIndex = (index, align) => useVirtualHelpers.getOffsetForIndex(index, align)?.[0];\n actionRef.current.scrollToOffset = useVirtualHelpers.scrollToOffset;\n }\n\n const stableUid = React.useMemo(() => uid(6), []);\n const instanceUid = React.useMemo(\n () => (remountOnCountChange === false ? `ds-fast-list-${stableUid}` : `ds-fast-list-${uid(6)}${count}`),\n [count, remountOnCountChange, stableUid],\n );\n return React.useMemo(\n () => ({\n instanceUid,\n containerRef,\n getVirtualItems: useVirtualHelpers.getVirtualItems,\n totalSize,\n measureElement: useVirtualHelpers.measureElement,\n }),\n [useVirtualHelpers.getVirtualItems, useVirtualHelpers.measureElement, totalSize, instanceUid, containerRef],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,iBAAoB;AACpB,2BAAiD;AACjD,8BAA6C;AAC7C,uBAAgC;AAChC,mCAAoE;AACpE,8BAAiC;AAS1B,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AC7G,cAAU,QAAQ,iBAAiB,kBAAkB;AAAA,EACvD;AAEA,QAAM,YAAY,aAAAA,QAAM,QAAQ,UAAM,gBAAI,CAAC,GAAG,CAAC,CAAC;AAChD,QAAM,cAAc,aAAAA,QAAM;AAAA,IACxB,MAAO,yBAAyB,QAAQ,gBAAgB,SAAS,KAAK,oBAAgB,gBAAI,CAAC,CAAC,GAAG,KAAK;AAAA,IACpG,CAAC,OAAO,sBAAsB,SAAS;AAAA,EACzC;AACA,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,iBAAiB,kBAAkB;AAAA,MACnC;AAAA,MACA,gBAAgB,kBAAkB;AAAA,IACpC;AAAA,IACA,CAAC,kBAAkB,iBAAiB,kBAAkB,gBAAgB,WAAW,aAAa,YAAY;AAAA,EAC5G;AACF;",
6
6
  "names": ["React"]
7
7
  }
@@ -33,8 +33,8 @@ __export(useValidateProps_exports, {
33
33
  module.exports = __toCommonJS(useValidateProps_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
- var import_DSFastListDefinitions = require("../DSFastListDefinitions.js");
36
+ var import_constants = require("../constants/index.js");
37
37
  const useValidateProps = (props, propTypes) => {
38
- (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, propTypes, import_DSFastListDefinitions.DSFastListName);
38
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, propTypes, import_constants.DSFastListName);
39
39
  };
40
40
  //# sourceMappingURL=useValidateProps.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useValidateProps.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { type DSFastListT } from '../react-desc-prop-types.js';\nimport { DSFastListName } from '../DSFastListDefinitions.js';\n\nexport const useValidateProps = <T>(\n props: DSFastListT.InternalProps<T>,\n propTypes: WeakValidationMap<unknown>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSFastListName);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAG/C,mCAA+B;AAExB,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,8DAA+B,OAAO,WAAW,2CAAc;AACjE;",
4
+ "sourcesContent": ["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { type DSFastListT } from '../react-desc-prop-types.js';\nimport { DSFastListName } from '../constants/index.js';\n\nexport const useValidateProps = <T>(\n props: DSFastListT.InternalProps<T>,\n propTypes: WeakValidationMap<unknown>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSFastListName);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAG/C,uBAA+B;AAExB,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,8DAA+B,OAAO,WAAW,+BAAc;AACjE;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -29,9 +29,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  var index_exports = {};
30
30
  __export(index_exports, {
31
31
  DSFastList: () => import_FastList.DSFastList,
32
+ DSFastListDataTestIds: () => import_constants.DSFastListDataTestIds,
33
+ DSFastListName: () => import_constants.DSFastListName,
34
+ DSFastListSlots: () => import_constants.DSFastListSlots,
32
35
  DSFastListWithSchema: () => import_FastList.DSFastListWithSchema
33
36
  });
34
37
  module.exports = __toCommonJS(index_exports);
35
38
  var React = __toESM(require("react"));
36
39
  var import_FastList = require("./FastList.js");
40
+ var import_constants = require("./constants/index.js");
37
41
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { type DSFastListT } from './react-desc-prop-types.js';\nexport { DSFastList, DSFastListWithSchema } from './FastList.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,sBAAiD;",
4
+ "sourcesContent": ["export { type DSFastListT } from './react-desc-prop-types.js';\nexport { DSFastList, DSFastListWithSchema } from './FastList.js';\nexport { DSFastListName, DSFastListSlots, DSFastListDataTestIds } from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,sBAAiD;AACjD,uBAAuE;",
6
6
  "names": []
7
7
  }
@@ -37,26 +37,30 @@ var import_react = __toESM(require("react"));
37
37
  var import_ds_system = require("@elliemae/ds-system");
38
38
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
39
39
  var import_useFastList = require("../hooks/useFastList.js");
40
- var import_DSFastListDefinitions = require("../DSFastListDefinitions.js");
40
+ var import_constants = require("../constants/index.js");
41
41
  const StyledList = (0, import_ds_system.styled)("div", {
42
- name: import_DSFastListDefinitions.DSFastListName,
43
- slot: import_DSFastListDefinitions.DSFastListSlots.WRAPPER_LIST
42
+ name: import_constants.DSFastListName,
43
+ slot: import_constants.DSFastListSlots.WRAPPER_LIST
44
44
  })`
45
45
  width: 100%;
46
46
  position: relative;
47
47
  `;
48
48
  const StyledListItem = (0, import_ds_system.styled)("div", {
49
- name: import_DSFastListDefinitions.DSFastListName,
50
- slot: import_DSFastListDefinitions.DSFastListSlots.ITEM
49
+ name: import_constants.DSFastListName,
50
+ slot: import_constants.DSFastListSlots.ITEM
51
51
  })`
52
52
  position: absolute;
53
53
  top: 0;
54
54
  left: 0;
55
55
  width: 100%;
56
56
  `;
57
+ const StyledExtraContent = (0, import_ds_system.styled)("div", {
58
+ name: import_constants.DSFastListName,
59
+ slot: import_constants.DSFastListSlots.EXTRA_CONTENT
60
+ })``;
57
61
  const StyledListContainer = (0, import_ds_system.styled)("div", {
58
- name: import_DSFastListDefinitions.DSFastListName,
59
- slot: import_DSFastListDefinitions.DSFastListSlots.CONTAINER
62
+ name: import_constants.DSFastListName,
63
+ slot: import_constants.DSFastListSlots.CONTAINER
60
64
  })`
61
65
  overflow: auto;
62
66
  width: 100%;
@@ -64,8 +68,9 @@ const StyledListContainer = (0, import_ds_system.styled)("div", {
64
68
  padding-bottom: 0;
65
69
  `;
66
70
  const List = (props) => {
67
- const { parentRef, getVirtualItems, totalSize, instanceUid, measureElement } = (0, import_useFastList.useFastList)(props);
68
- const { ItemRenderer, extraItemProps, getId } = props;
71
+ const { containerRef, getVirtualItems, totalSize, instanceUid, measureElement } = (0, import_useFastList.useFastList)(props);
72
+ const { ItemRenderer, extraItemProps, getId, extraContent } = props;
73
+ const hasExtraContent = extraContent !== null && extraContent !== void 0 && typeof extraContent !== "boolean";
69
74
  const virtualItems = getVirtualItems();
70
75
  const measureRef = import_react.default.useCallback(
71
76
  (node) => measureElement(node),
@@ -76,11 +81,11 @@ const List = (props) => {
76
81
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
77
82
  StyledListContainer,
78
83
  {
79
- innerRef: parentRef,
84
+ innerRef: containerRef,
80
85
  tabIndex: -1,
81
86
  getOwnerProps,
82
87
  ...globalAttributes,
83
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
88
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
84
89
  StyledList,
85
90
  {
86
91
  style: {
@@ -89,24 +94,27 @@ const List = (props) => {
89
94
  },
90
95
  role: "list",
91
96
  getOwnerProps,
92
- children: virtualItems.map((virtualItem) => {
93
- const { index, start } = virtualItem;
94
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
95
- StyledListItem,
96
- {
97
- innerRef: measureRef,
98
- "data-index": index,
99
- style: {
100
- transform: `translateY(${start}px)`
97
+ children: [
98
+ hasExtraContent ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledExtraContent, { getOwnerProps, children: extraContent }) : null,
99
+ virtualItems.map((virtualItem) => {
100
+ const { index, start } = virtualItem;
101
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
102
+ StyledListItem,
103
+ {
104
+ innerRef: measureRef,
105
+ "data-index": index,
106
+ style: {
107
+ transform: `translateY(${start}px)`
108
+ },
109
+ role: "listitem",
110
+ getOwnerProps,
111
+ getOwnerPropsArguments: () => ({ index: getId(index) }),
112
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemRenderer, { extraItemProps, index })
101
113
  },
102
- role: "listitem",
103
- getOwnerProps,
104
- getOwnerPropsArguments: () => ({ index: getId(index) }),
105
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ItemRenderer, { extraItemProps, index })
106
- },
107
- getId(index)
108
- );
109
- })
114
+ getId(index)
115
+ );
116
+ })
117
+ ]
110
118
  }
111
119
  )
112
120
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/List.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { useFastList } from '../hooks/useFastList.js';\nimport type { DSFastListT } from '../react-desc-prop-types.js';\nimport { DSFastListName, DSFastListSlots } from '../DSFastListDefinitions.js';\n\nconst StyledList = styled('div', {\n name: DSFastListName,\n slot: DSFastListSlots.WRAPPER_LIST,\n})`\n width: 100%;\n position: relative;\n`;\n\nconst StyledListItem = styled('div', {\n name: DSFastListName,\n slot: DSFastListSlots.ITEM,\n})`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n`;\n\nconst StyledListContainer = styled('div', {\n name: DSFastListName,\n slot: DSFastListSlots.CONTAINER,\n})`\n overflow: auto;\n width: 100%;\n height: 100%;\n padding-bottom: 0;\n`;\n\nexport const List = <T extends object>(props: DSFastListT.Props<T>) => {\n const { parentRef, getVirtualItems, totalSize, instanceUid, measureElement } = useFastList(props);\n const { ItemRenderer, extraItemProps, getId } = props;\n\n const virtualItems = getVirtualItems();\n const measureRef: React.LegacyRef<HTMLDivElement> = React.useCallback(\n (node: HTMLDivElement) => measureElement(node),\n [measureElement],\n );\n\n const getOwnerProps = useCallback(() => props, [props]);\n const globalAttributes = useGetGlobalAttributes(props);\n\n return (\n <StyledListContainer\n innerRef={parentRef}\n // firefox needs this tabIndex to prevent scrolling\n tabIndex={-1}\n key={instanceUid}\n getOwnerProps={getOwnerProps}\n {...globalAttributes}\n >\n <StyledList\n style={{\n // we add up 0.5 to prevent the scrollbar from appearing in some cases\n height: `${totalSize + 0.5}px`,\n }}\n role=\"list\"\n getOwnerProps={getOwnerProps}\n >\n {virtualItems.map((virtualItem) => {\n const { index, start } = virtualItem;\n return (\n <StyledListItem\n innerRef={measureRef}\n data-index={index}\n style={{\n transform: `translateY(${start}px)`,\n }}\n role=\"listitem\"\n key={getId(index)}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={() => ({ index: getId(index) })}\n >\n <ItemRenderer extraItemProps={extraItemProps} index={index} />\n </StyledListItem>\n );\n })}\n </StyledList>\n </StyledListContainer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;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C;AAAA,gBACA,MAAK;AAAA,gBAEL;AAAA,gBACA,wBAAwB,OAAO,EAAE,OAAO,MAAM,KAAK,EAAE;AAAA,gBAErD,sDAAC,gBAAa,gBAAgC,OAAc;AAAA;AAAA,cAJvD,MAAM,KAAK;AAAA,YAKlB;AAAA,UAEJ,CAAC;AAAA;AAAA,MACH;AAAA;AAAA,IA9BK;AAAA,EA+BP;AAEJ;",
4
+ "sourcesContent": ["import React, { useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { useFastList } from '../hooks/useFastList.js';\nimport type { DSFastListT } from '../react-desc-prop-types.js';\nimport { DSFastListName, DSFastListSlots } from '../constants/index.js';\n\nconst StyledList = styled('div', {\n name: DSFastListName,\n slot: DSFastListSlots.WRAPPER_LIST,\n})`\n width: 100%;\n position: relative;\n`;\n\nconst StyledListItem = styled('div', {\n name: DSFastListName,\n slot: DSFastListSlots.ITEM,\n})`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n`;\n\nconst StyledExtraContent = styled('div', {\n name: DSFastListName,\n slot: DSFastListSlots.EXTRA_CONTENT,\n})``;\n\nconst StyledListContainer = styled('div', {\n name: DSFastListName,\n slot: DSFastListSlots.CONTAINER,\n})`\n overflow: auto;\n width: 100%;\n height: 100%;\n padding-bottom: 0;\n`;\n\nexport const List = <T extends object>(props: DSFastListT.Props<T>) => {\n const { containerRef, getVirtualItems, totalSize, instanceUid, measureElement } = useFastList(props);\n const { ItemRenderer, extraItemProps, getId, extraContent } = props;\n const hasExtraContent = extraContent !== null && extraContent !== undefined && typeof extraContent !== 'boolean';\n\n const virtualItems = getVirtualItems();\n const measureRef: React.LegacyRef<HTMLDivElement> = React.useCallback(\n (node: HTMLDivElement) => measureElement(node),\n [measureElement],\n );\n\n const getOwnerProps = useCallback(() => props, [props]);\n const globalAttributes = useGetGlobalAttributes(props);\n\n return (\n <StyledListContainer\n innerRef={containerRef}\n // firefox needs this tabIndex to prevent scrolling\n tabIndex={-1}\n key={instanceUid}\n getOwnerProps={getOwnerProps}\n {...globalAttributes}\n >\n <StyledList\n style={{\n // we add up 0.5 to prevent the scrollbar from appearing in some cases\n height: `${totalSize + 0.5}px`,\n }}\n role=\"list\"\n getOwnerProps={getOwnerProps}\n >\n {hasExtraContent ? <StyledExtraContent getOwnerProps={getOwnerProps}>{extraContent}</StyledExtraContent> : null}\n {virtualItems.map((virtualItem) => {\n const { index, start } = virtualItem;\n return (\n <StyledListItem\n innerRef={measureRef}\n data-index={index}\n style={{\n transform: `translateY(${start}px)`,\n }}\n role=\"listitem\"\n key={getId(index)}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={() => ({ index: getId(index) })}\n >\n <ItemRenderer extraItemProps={extraItemProps} index={index} />\n </StyledListItem>\n );\n })}\n </StyledList>\n </StyledListContainer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+DjB;AA/DN,mBAAmC;AACnC,uBAAuB;AACvB,8BAAuC;AACvC,yBAA4B;AAE5B,uBAAgD;AAEhD,MAAM,iBAAa,yBAAO,OAAO;AAAA,EAC/B,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAKD,MAAM,qBAAiB,yBAAO,OAAO;AAAA,EACnC,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOD,MAAM,yBAAqB,yBAAO,OAAO;AAAA,EACvC,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAED,MAAM,0BAAsB,yBAAO,OAAO;AAAA,EACxC,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOM,MAAM,OAAO,CAAmB,UAAgC;AACrE,QAAM,EAAE,cAAc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S(react_desc_prop_types_exports);
35
35
  var React = __toESM(require("react"));
36
36
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
37
+ var import_constants = require("./constants/index.js");
37
38
  const defaultProps = {
38
- estimateSize: () => 36
39
+ estimateSize: () => 36,
40
+ paddingStart: 0,
41
+ paddingEnd: 0,
42
+ remountOnCountChange: true
39
43
  };
40
44
  const DSFastListPropTypes = {
45
+ ...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSFastListName, import_constants.DSFastListSlots),
46
+ ...import_ds_props_helpers.globalAttributesPropTypes,
41
47
  actionRef: import_ds_props_helpers.PropTypes.shape({
42
48
  current: import_ds_props_helpers.PropTypes.oneOfType([
43
49
  import_ds_props_helpers.PropTypes.oneOf([null]),
44
50
  import_ds_props_helpers.PropTypes.shape({
45
- scrollTo: import_ds_props_helpers.PropTypes.func.description("Scroll to a index inside the list").signature(`((index: number, { align: 'start' | 'center' | 'end' | 'auto' }) => void)`)
51
+ scrollTo: import_ds_props_helpers.PropTypes.func.description("Scroll to a index inside the list").signature(
52
+ `((index: number, options?: { align?: 'start' | 'center' | 'end' | 'auto'; behavior?: 'auto' | 'smooth' }) => void)`
53
+ ),
54
+ measure: import_ds_props_helpers.PropTypes.func.description(
55
+ "Clears the cached size of every item, falling back to the estimated size until each item is measured again (on its next real layout change or remount) \u2014 does not force an immediate DOM remeasurement"
56
+ ).signature(`(() => void)`),
57
+ getVisibleItems: import_ds_props_helpers.PropTypes.func.description("Returns the indices of the items currently visible in the viewport (no overscan buffer)").signature(`(() => number[])`),
58
+ getMountedItems: import_ds_props_helpers.PropTypes.func.description("Returns the indices of all items currently mounted in the DOM, including the overscan buffer").signature(`(() => number[])`),
59
+ getOffsetForIndex: import_ds_props_helpers.PropTypes.func.description(
60
+ "Returns the scroll offset that brings the item at the given index into view with the given alignment, or undefined when there is no measurement for it yet (for example, an empty list). It reads the current measurements, where items not rendered yet still have the estimated size, and it does not scroll"
61
+ ).signature(`((index: number, align?: 'start' | 'center' | 'end' | 'auto') => number | undefined)`),
62
+ scrollToOffset: import_ds_props_helpers.PropTypes.func.description(
63
+ "Scrolls the list to the given offset once. Unlike scrollTo, it does not verify and retry the position on the following frames, so it never competes with the user scrolling at the same time"
64
+ ).signature(
65
+ `((offset: number, options?: { align?: 'start' | 'center' | 'end' | 'auto'; behavior?: 'auto' | 'smooth' }) => void)`
66
+ )
46
67
  })
47
68
  ])
48
- }).description(`mutable reference where methods will be stored`),
69
+ }).description(
70
+ "Mutable reference where the methods are stored. They are assigned during render only when `actionRef.current` is already an object, so pass a ref initialized with one (for example `useRef({})`), not `useRef(null)`"
71
+ ),
49
72
  ItemRenderer: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.object, import_ds_props_helpers.PropTypes.func]).isRequired.description(
50
73
  "Render function for each item"
51
74
  ),
52
75
  count: import_ds_props_helpers.PropTypes.number.isRequired.description("Number of items to render"),
53
76
  extraItemProps: import_ds_props_helpers.PropTypes.object.description("Extra props to pass to each item"),
54
77
  getId: import_ds_props_helpers.PropTypes.func.isRequired.description("Function to get the key for each item"),
55
- estimateSize: import_ds_props_helpers.PropTypes.func.description("Function to estimate the size of each item")
78
+ estimateSize: import_ds_props_helpers.PropTypes.func.description("Function to estimate the size of each item"),
79
+ innerRef: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.func, import_ds_props_helpers.PropTypes.object]).description(
80
+ "Ref (object or callback) that receives the scroll container element of the list"
81
+ ),
82
+ paddingStart: import_ds_props_helpers.PropTypes.number.description("Space in pixels reserved before the first item inside the scrolling area").defaultValue(0),
83
+ paddingEnd: import_ds_props_helpers.PropTypes.number.description(
84
+ "Space in pixels reserved after the last item inside the scrolling area; negative values are passed through"
85
+ ).defaultValue(0),
86
+ remountOnCountChange: import_ds_props_helpers.PropTypes.bool.description(
87
+ "When true the scroll container element is recreated every time count changes; set it to false to keep the same element and scroll position while the number of items changes"
88
+ ).defaultValue(true),
89
+ extraContent: import_ds_props_helpers.PropTypes.node.description(
90
+ 'Content rendered inside the list wrapper before the items, within the extra content slot; it should be positioned out of the normal flow because the wrapper height is fixed. The wrapper has role="list" by default, so the content must carry role="listitem" itself (for example a container around a button), unless the wrapper role is overridden through the wrapper-list slot, in which case it must fit that role instead'
91
+ )
56
92
  };
57
93
  //# 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.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type React from 'react';\nimport type { DSFastListName, DSFastListSlots } from './DSFastListDefinitions.js';\n\nexport declare namespace DSFastListT {\n type ScrollAlignment = 'start' | 'center' | 'end' | 'auto';\n export type ScrollToOptions = {\n align: ScrollAlignment;\n };\n\n export type ActionRef = {\n scrollTo?: (index: number, options?: ScrollToOptions | undefined) => void;\n };\n\n export interface OptionalProps<ExtraItemPropsT> extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSFastListName,\n typeof DSFastListSlots\n > {\n actionRef?: React.MutableRefObject<ActionRef>;\n extraItemProps?: ExtraItemPropsT;\n }\n\n export interface RequiredProps<ExtraItemPropsT> {\n ItemRenderer: React.ComponentType<{ index: number; extraItemProps?: ExtraItemPropsT }>;\n count: number;\n getId: (index: number) => string | number;\n }\n\n export interface DefaultProps {\n estimateSize: () => number;\n }\n\n type PropsT<D, R, O> = Partial<D> & R & O;\n type InternalPropsT<D, R, O> = D & R & O;\n\n export type Props<ExtraItemPropsT> = PropsT<\n DefaultProps,\n RequiredProps<ExtraItemPropsT>,\n OptionalProps<ExtraItemPropsT>\n >;\n export type InternalProps<ExtraItemPropsT> = InternalPropsT<\n DefaultProps,\n RequiredProps<ExtraItemPropsT>,\n OptionalProps<ExtraItemPropsT>\n >;\n}\n\nexport const defaultProps = {\n estimateSize: () => 36,\n};\n\nexport const DSFastListPropTypes = {\n actionRef: PropTypes.shape({\n current: PropTypes.oneOfType([\n PropTypes.oneOf([null]),\n PropTypes.shape({\n scrollTo: PropTypes.func\n .description('Scroll to a index inside the list')\n .signature(`((index: number, { align: 'start' | 'center' | 'end' | 'auto' }) => void)`),\n }),\n ]),\n }).description(`mutable reference where methods will be stored`),\n ItemRenderer: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired.description(\n 'Render function for each item',\n ),\n count: PropTypes.number.isRequired.description('Number of items to render'),\n extraItemProps: PropTypes.object.description('Extra props to pass to each item'),\n getId: PropTypes.func.isRequired.description('Function to get the key for each item'),\n estimateSize: PropTypes.func.description('Function to estimate the size of each item'),\n} as React.WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAgDnB,MAAM,eAAe;AAAA,EAC1B,cAAc,MAAM;AACtB;AAEO,MAAM,sBAAsB;AAAA,EACjC,WAAW,kCAAU,MAAM;AAAA,IACzB,SAAS,kCAAU,UAAU;AAAA,MAC3B,kCAAU,MAAM,CAAC,IAAI,CAAC;AAAA,MACtB,kCAAU,MAAM;AAAA,QACd,UAAU,kCAAU,KACjB,YAAY,mCAAmC,EAC/C,UAAU,2EAA2E;AAAA,MAC1F,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC,EAAE,YAAY,gDAAgD;AAAA,EAC/D,cAAc,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,IAAI,CAAC,EAAE,WAAW;AAAA,IAC/E;AAAA,EACF;AAAA,EACA,OAAO,kCAAU,OAAO,WAAW,YAAY,2BAA2B;AAAA,EAC1E,gBAAgB,kCAAU,OAAO,YAAY,kCAAkC;AAAA,EAC/E,OAAO,kCAAU,KAAK,WAAW,YAAY,uCAAuC;AAAA,EACpF,cAAc,kCAAU,KAAK,YAAY,4CAA4C;AACvF;",
4
+ "sourcesContent": ["import type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type React from 'react';\nimport { DSFastListName, DSFastListSlots } from './constants/index.js';\n\nexport declare namespace DSFastListT {\n type ScrollAlignment = 'start' | 'center' | 'end' | 'auto';\n /** Kept with its published shape (`align` required) so code that reads it keeps compiling. */\n export type ScrollToOptions = {\n align: ScrollAlignment;\n };\n\n /** What the scroll actions accept: `align` is optional and `behavior` can request a smooth scroll. */\n export type ScrollActionOptions = {\n align?: ScrollAlignment;\n behavior?: 'auto' | 'smooth';\n };\n\n /**\n * `scrollTo` and `scrollToOffset` use method syntax on purpose: their parameters are compared bivariantly, so an\n * `actionRef` typed with the published `(index, options?: ScrollToOptions) => void` stays assignable.\n */\n export type ActionRef = {\n scrollTo?(index: number, options?: ScrollActionOptions): void;\n measure?: () => void;\n getVisibleItems?: () => number[];\n getMountedItems?: () => number[];\n getOffsetForIndex?: (index: number, align?: ScrollAlignment) => number | undefined;\n scrollToOffset?(offset: number, options?: ScrollActionOptions): void;\n };\n\n export type SlotFunctionArguments = {\n dsFastlistContainer: () => object;\n dsFastlistWrapperList: () => object;\n dsFastlistItem: () => object;\n dsFastlistExtraContent: () => object;\n };\n\n export interface OptionalProps<ExtraItemPropsT> extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSFastListName,\n typeof DSFastListSlots\n > {\n actionRef?: React.MutableRefObject<ActionRef>;\n extraItemProps?: ExtraItemPropsT;\n innerRef?: React.MutableRefObject<HTMLDivElement | null> | React.RefCallback<HTMLDivElement>;\n extraContent?: React.ReactNode;\n }\n\n export interface RequiredProps<ExtraItemPropsT> {\n ItemRenderer: React.ComponentType<{ index: number; extraItemProps?: ExtraItemPropsT }>;\n count: number;\n getId: (index: number) => string | number;\n }\n\n export interface DefaultProps {\n estimateSize: () => number;\n paddingStart: number;\n paddingEnd: number;\n remountOnCountChange: boolean;\n }\n\n // 'children' is excluded on top of `keyof D | keyof R`: DSFastList is the render-prop variant\n // (see FastList.tsx's own comment) and never reads props.children \u2014 without this exclusion,\n // GlobalAttributesT<HTMLElement> (which includes children via React's DOMAttributes) would let\n // the public type silently accept children that are dropped at runtime.\n type PropsT<D, R, O> = Partial<D> & R & O & Omit<GlobalAttributesT<HTMLElement>, keyof D | keyof R | 'children'>;\n type InternalPropsT<D, R, O> = D & R & O & Omit<GlobalAttributesT<HTMLElement>, keyof D | keyof R | 'children'>;\n\n export type Props<ExtraItemPropsT> = PropsT<\n DefaultProps,\n RequiredProps<ExtraItemPropsT>,\n OptionalProps<ExtraItemPropsT>\n >;\n export type InternalProps<ExtraItemPropsT> = InternalPropsT<\n DefaultProps,\n RequiredProps<ExtraItemPropsT>,\n OptionalProps<ExtraItemPropsT>\n >;\n}\n\nexport const defaultProps = {\n estimateSize: () => 36,\n paddingStart: 0,\n paddingEnd: 0,\n remountOnCountChange: true,\n};\n\nexport const DSFastListPropTypes = {\n ...getPropsPerSlotPropTypes(DSFastListName, DSFastListSlots),\n ...globalAttributesPropTypes,\n actionRef: PropTypes.shape({\n current: PropTypes.oneOfType([\n PropTypes.oneOf([null]),\n PropTypes.shape({\n scrollTo: PropTypes.func\n .description('Scroll to a index inside the list')\n .signature(\n `((index: number, options?: { align?: 'start' | 'center' | 'end' | 'auto'; behavior?: 'auto' | 'smooth' }) => void)`,\n ),\n measure: PropTypes.func\n .description(\n 'Clears the cached size of every item, falling back to the estimated size until each item is measured again (on its next real layout change or remount) \u2014 does not force an immediate DOM remeasurement',\n )\n .signature(`(() => void)`),\n getVisibleItems: PropTypes.func\n .description('Returns the indices of the items currently visible in the viewport (no overscan buffer)')\n .signature(`(() => number[])`),\n getMountedItems: PropTypes.func\n .description('Returns the indices of all items currently mounted in the DOM, including the overscan buffer')\n .signature(`(() => number[])`),\n getOffsetForIndex: PropTypes.func\n .description(\n 'Returns the scroll offset that brings the item at the given index into view with the given alignment, or undefined when there is no measurement for it yet (for example, an empty list). It reads the current measurements, where items not rendered yet still have the estimated size, and it does not scroll',\n )\n .signature(`((index: number, align?: 'start' | 'center' | 'end' | 'auto') => number | undefined)`),\n scrollToOffset: PropTypes.func\n .description(\n 'Scrolls the list to the given offset once. Unlike scrollTo, it does not verify and retry the position on the following frames, so it never competes with the user scrolling at the same time',\n )\n .signature(\n `((offset: number, options?: { align?: 'start' | 'center' | 'end' | 'auto'; behavior?: 'auto' | 'smooth' }) => void)`,\n ),\n }),\n ]),\n }).description(\n 'Mutable reference where the methods are stored. They are assigned during render only when `actionRef.current` is already an object, so pass a ref initialized with one (for example `useRef({})`), not `useRef(null)`',\n ),\n ItemRenderer: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired.description(\n 'Render function for each item',\n ),\n count: PropTypes.number.isRequired.description('Number of items to render'),\n extraItemProps: PropTypes.object.description('Extra props to pass to each item'),\n getId: PropTypes.func.isRequired.description('Function to get the key for each item'),\n estimateSize: PropTypes.func.description('Function to estimate the size of each item'),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description(\n 'Ref (object or callback) that receives the scroll container element of the list',\n ),\n paddingStart: PropTypes.number\n .description('Space in pixels reserved before the first item inside the scrolling area')\n .defaultValue(0),\n paddingEnd: PropTypes.number\n .description(\n 'Space in pixels reserved after the last item inside the scrolling area; negative values are passed through',\n )\n .defaultValue(0),\n remountOnCountChange: PropTypes.bool\n .description(\n 'When true the scroll container element is recreated every time count changes; set it to false to keep the same element and scroll position while the number of items changes',\n )\n .defaultValue(true),\n extraContent: PropTypes.node.description(\n 'Content rendered inside the list wrapper before the items, within the extra content slot; it should be positioned out of the normal flow because the wrapper height is fixed. The wrapper has role=\"list\" by default, so the content must carry role=\"listitem\" itself (for example a container around a button), unless the wrapper role is overridden through the wrapper-list slot, in which case it must fit that role instead',\n ),\n} as React.WeakValidation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kCAAU,KAAK,WAAW,YAAY,uCAAuC;AAAA,EACpF,cAAc,kCAAU,KAAK,YAAY,4CAA4C;AAAA,EACrF,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,EAAE;AAAA,IAChE;AAAA,EACF;AAAA,EACA,cAAc,kCAAU,OACrB,YAAY,0EAA0E,EACtF,aAAa,CAAC;AAAA,EACjB,YAAY,kCAAU,OACnB;AAAA,IACC;AAAA,EACF,EACC,aAAa,CAAC;AAAA,EACjB,sBAAsB,kCAAU,KAC7B;AAAA,IACC;AAAA,EACF,EACC,aAAa,IAAI;AAAA,EACpB,cAAc,kCAAU,KAAK;AAAA,IAC3B;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -5,10 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
8
  var __copyProps = (to, from, except, desc) => {
13
9
  if (from && typeof from === "object" || typeof from === "function") {
14
10
  for (let key of __getOwnPropNames(from))
@@ -25,14 +21,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
21
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
22
  mod
27
23
  ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var FastListDataTestID_exports = {};
30
- __export(FastListDataTestID_exports, {
31
- LIST_DATA_TESTID: () => LIST_DATA_TESTID
32
- });
33
- module.exports = __toCommonJS(FastListDataTestID_exports);
34
24
  var React = __toESM(require("react"));
35
- const LIST_DATA_TESTID = {
36
- CONTAINER: "fast-list-container"
25
+ const SlotPropsAsObject = {
26
+ dsFastlistContainer: { "aria-label": "just a typescript test" },
27
+ dsFastlistWrapperList: { "aria-label": "just a typescript test" },
28
+ dsFastlistItem: { "aria-label": "just a typescript test" },
29
+ dsFastlistExtraContent: { "aria-label": "just a typescript test" }
30
+ };
31
+ const SlotPropsAsFunctions = {
32
+ dsFastlistContainer: () => ({ "aria-label": "just a typescript test" }),
33
+ dsFastlistWrapperList: () => ({ "aria-label": "just a typescript test" }),
34
+ dsFastlistItem: () => ({ "aria-label": "just a typescript test" }),
35
+ dsFastlistExtraContent: () => ({ "aria-label": "just a typescript test" })
37
36
  };
38
- //# sourceMappingURL=FastListDataTestID.js.map
37
+ const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
38
+ //# sourceMappingURL=slot-props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSFastListName, DSFastListSlots } from '../constants/index.js';\nimport type { DSFastListT } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObject: Partial<DSFastListT.OptionalProps<object>> = {\n dsFastlistContainer: { 'aria-label': 'just a typescript test' },\n dsFastlistWrapperList: { 'aria-label': 'just a typescript test' },\n dsFastlistItem: { 'aria-label': 'just a typescript test' },\n dsFastlistExtraContent: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSFastListT.SlotFunctionArguments = {\n dsFastlistContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsFastlistWrapperList: () => ({ 'aria-label': 'just a typescript test' }),\n dsFastlistItem: () => ({ 'aria-label': 'just a typescript test' }),\n dsFastlistExtraContent: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSFastListName, typeof DSFastListSlots>\n> = SlotPropsAsFunctions;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACMvB,MAAM,oBAAgE;AAAA,EACpE,qBAAqB,EAAE,cAAc,yBAAyB;AAAA,EAC9D,uBAAuB,EAAE,cAAc,yBAAyB;AAAA,EAChE,gBAAgB,EAAE,cAAc,yBAAyB;AAAA,EACzD,wBAAwB,EAAE,cAAc,yBAAyB;AACnE;AAEA,MAAM,uBAA0D;AAAA,EAC9D,qBAAqB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACrE,uBAAuB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACvE,gBAAgB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAChE,wBAAwB,OAAO,EAAE,cAAc,yBAAyB;AAC1E;AAGA,MAAM,6CAEF;",
6
+ "names": []
7
+ }