@elliemae/ds-virtual-list 3.80.0-next.2 → 3.80.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.
Files changed (53) hide show
  1. package/dist/cjs/VirtualList.js +2 -2
  2. package/dist/cjs/VirtualList.js.map +2 -2
  3. package/dist/cjs/{DSVirtualListDefinitions.js → constants/index.js} +12 -4
  4. package/dist/cjs/constants/index.js.map +7 -0
  5. package/dist/cjs/hooks/useValidateProps.js +2 -2
  6. package/dist/cjs/hooks/useValidateProps.js.map +2 -2
  7. package/dist/cjs/index.js +4 -3
  8. package/dist/cjs/index.js.map +2 -2
  9. package/dist/cjs/parts/List.js +4 -2
  10. package/dist/cjs/parts/List.js.map +2 -2
  11. package/dist/cjs/parts/styled.js +4 -4
  12. package/dist/cjs/parts/styled.js.map +2 -2
  13. package/dist/cjs/react-desc-prop-types.js +3 -2
  14. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  15. package/dist/cjs/{VirtualListDataTestID.js → typescript-testing/slot-props.js} +11 -13
  16. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  17. package/dist/cjs/typescript-testing/typescript-virtual-list-valid.js +111 -0
  18. package/dist/cjs/typescript-testing/typescript-virtual-list-valid.js.map +7 -0
  19. package/dist/esm/VirtualList.js +1 -1
  20. package/dist/esm/VirtualList.js.map +1 -1
  21. package/dist/esm/constants/index.js +20 -0
  22. package/dist/esm/constants/index.js.map +7 -0
  23. package/dist/esm/hooks/useValidateProps.js +1 -1
  24. package/dist/esm/hooks/useValidateProps.js.map +1 -1
  25. package/dist/esm/index.js +2 -1
  26. package/dist/esm/index.js.map +2 -2
  27. package/dist/esm/parts/List.js +5 -3
  28. package/dist/esm/parts/List.js.map +2 -2
  29. package/dist/esm/parts/styled.js +1 -1
  30. package/dist/esm/parts/styled.js.map +1 -1
  31. package/dist/esm/react-desc-prop-types.js +3 -2
  32. package/dist/esm/react-desc-prop-types.js.map +2 -2
  33. package/dist/esm/typescript-testing/slot-props.js +13 -0
  34. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  35. package/dist/esm/typescript-testing/typescript-virtual-list-valid.js +81 -0
  36. package/dist/esm/typescript-testing/typescript-virtual-list-valid.js.map +7 -0
  37. package/dist/types/constants/index.d.ts +11 -0
  38. package/dist/types/index.d.ts +1 -1
  39. package/dist/types/react-desc-prop-types.d.ts +10 -4
  40. package/package.json +8 -7
  41. package/dist/cjs/DSVirtualListDefinitions.js.map +0 -7
  42. package/dist/cjs/VirtualListDataTestID.js.map +0 -7
  43. package/dist/cjs/props.js +0 -58
  44. package/dist/cjs/props.js.map +0 -7
  45. package/dist/esm/DSVirtualListDefinitions.js +0 -12
  46. package/dist/esm/DSVirtualListDefinitions.js.map +0 -7
  47. package/dist/esm/VirtualListDataTestID.js +0 -8
  48. package/dist/esm/VirtualListDataTestID.js.map +0 -7
  49. package/dist/esm/props.js +0 -28
  50. package/dist/esm/props.js.map +0 -7
  51. package/dist/types/DSVirtualListDefinitions.d.ts +0 -6
  52. package/dist/types/VirtualListDataTestID.d.ts +0 -3
  53. package/dist/types/props.d.ts +0 -12
@@ -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_DSVirtualListDefinitions = require("./DSVirtualListDefinitions.js");
40
+ var import_constants = require("./constants/index.js");
41
41
  const DSVirtualList = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_List.List, { ...props });
42
- DSVirtualList.displayName = import_DSVirtualListDefinitions.DSVirtualListName;
42
+ DSVirtualList.displayName = import_constants.DSVirtualListName;
43
43
  const DSVirtualListWithSchema = (0, import_ds_props_helpers.describe)(DSVirtualList).description("DSVirtualList");
44
44
  DSVirtualListWithSchema.propTypes = import_react_desc_prop_types.DSVirtualListPropTypes;
45
45
  //# sourceMappingURL=VirtualList.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/VirtualList.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 { DSVirtualListPropTypes, type DSVirtualListT } from './react-desc-prop-types.js';\nimport { DSVirtualListName } from './DSVirtualListDefinitions.js';\n\n// we are not using a context nor zustand so all the logic is handled in List...\nconst DSVirtualList = (props: DSVirtualListT.Props) => <List {...props} />;\n\nDSVirtualList.displayName = DSVirtualListName;\nconst DSVirtualListWithSchema = describe(DSVirtualList).description('DSVirtualList');\nDSVirtualListWithSchema.propTypes = DSVirtualListPropTypes;\n\nexport { DSVirtualList, DSVirtualListWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOgC;AANvD,8BAAyB;AACzB,kBAAqB;AACrB,mCAA4D;AAC5D,sCAAkC;AAGlC,MAAM,gBAAgB,CAAC,UAAgC,4CAAC,oBAAM,GAAG,OAAO;AAExE,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa,EAAE,YAAY,eAAe;AACnF,wBAAwB,YAAY;",
4
+ "sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { List } from './parts/List.js';\nimport { DSVirtualListPropTypes, type DSVirtualListT } from './react-desc-prop-types.js';\nimport { DSVirtualListName } from './constants/index.js';\n\n// we are not using a context nor zustand so all the logic is handled in List...\nconst DSVirtualList = (props: DSVirtualListT.Props) => <List {...props} />;\n\nDSVirtualList.displayName = DSVirtualListName;\nconst DSVirtualListWithSchema = describe(DSVirtualList).description('DSVirtualList');\nDSVirtualListWithSchema.propTypes = DSVirtualListPropTypes;\n\nexport { DSVirtualList, DSVirtualListWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADOgC;AANvD,8BAAyB;AACzB,kBAAqB;AACrB,mCAA4D;AAC5D,uBAAkC;AAGlC,MAAM,gBAAgB,CAAC,UAAgC,4CAAC,oBAAM,GAAG,OAAO;AAExE,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa,EAAE,YAAY,eAAe;AACnF,wBAAwB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -26,17 +26,25 @@ 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 DSVirtualListDefinitions_exports = {};
30
- __export(DSVirtualListDefinitions_exports, {
29
+ var constants_exports = {};
30
+ __export(constants_exports, {
31
+ DSVirtualListDataTestIds: () => DSVirtualListDataTestIds,
31
32
  DSVirtualListName: () => DSVirtualListName,
32
33
  DSVirtualListSlots: () => DSVirtualListSlots
33
34
  });
34
- module.exports = __toCommonJS(DSVirtualListDefinitions_exports);
35
+ module.exports = __toCommonJS(constants_exports);
35
36
  var React = __toESM(require("react"));
37
+ var import_ds_system = require("@elliemae/ds-system");
36
38
  const DSVirtualListName = "DSVirtuallist";
37
39
  const DSVirtualListSlots = {
38
40
  ROOT: "root",
41
+ // legacy — data-testid preserved below, do not let slot auto-generation replace it
39
42
  LIST_WRAPPER: "list-wrapper",
40
43
  ITEM_WRAPPER: "item-wrapper"
41
44
  };
42
- //# sourceMappingURL=DSVirtualListDefinitions.js.map
45
+ const DSVirtualListDataTestIds = {
46
+ ...(0, import_ds_system.slotObjectToDataTestIds)(DSVirtualListName, DSVirtualListSlots),
47
+ ROOT: "virtual-list-container"
48
+ // legacy value — e2e/ds-virtuallist/DSVirtualListCO.js depends on it, breaking change if removed
49
+ };
50
+ //# 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 DSVirtualListName = 'DSVirtuallist';\n\nexport const DSVirtualListSlots = {\n ROOT: 'root', // legacy \u2014 data-testid preserved below, do not let slot auto-generation replace it\n LIST_WRAPPER: 'list-wrapper',\n ITEM_WRAPPER: 'item-wrapper',\n} as const;\n\nexport const DSVirtualListDataTestIds = {\n ...slotObjectToDataTestIds(DSVirtualListName, DSVirtualListSlots),\n ROOT: 'virtual-list-container', // legacy value \u2014 e2e/ds-virtuallist/DSVirtualListCO.js depends on it, breaking change if removed\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,oBAAoB;AAE1B,MAAM,qBAAqB;AAAA,EAChC,MAAM;AAAA;AAAA,EACN,cAAc;AAAA,EACd,cAAc;AAChB;AAEO,MAAM,2BAA2B;AAAA,EACtC,OAAG,0CAAwB,mBAAmB,kBAAkB;AAAA,EAChE,MAAM;AAAA;AACR;",
6
+ "names": []
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_DSVirtualListDefinitions = require("../DSVirtualListDefinitions.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_DSVirtualListDefinitions.DSVirtualListName);
38
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, propTypes, import_constants.DSVirtualListName);
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 DSVirtualListT } from '../react-desc-prop-types.js';\nimport { DSVirtualListName } from '../DSVirtualListDefinitions.js';\n\nexport const useValidateProps = (props: DSVirtualListT.InternalProps, propTypes: WeakValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSVirtualListName);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAG/C,sCAAkC;AAE3B,MAAM,mBAAmB,CAAC,OAAqC,cAAgD;AAEpH,8DAA+B,OAAO,WAAW,iDAAiB;AACpE;",
4
+ "sourcesContent": ["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { type DSVirtualListT } from '../react-desc-prop-types.js';\nimport { DSVirtualListName } from '../constants/index.js';\n\nexport const useValidateProps = (props: DSVirtualListT.InternalProps, propTypes: WeakValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSVirtualListName);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAG/C,uBAAkC;AAE3B,MAAM,mBAAmB,CAAC,OAAqC,cAAgD;AAEpH,8DAA+B,OAAO,WAAW,kCAAiB;AACpE;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -29,12 +29,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  var index_exports = {};
30
30
  __export(index_exports, {
31
31
  DSVirtualList: () => import_VirtualList.DSVirtualList,
32
- DSVirtualListName: () => import_DSVirtualListDefinitions.DSVirtualListName,
33
- DSVirtualListSlots: () => import_DSVirtualListDefinitions.DSVirtualListSlots,
32
+ DSVirtualListDataTestIds: () => import_constants.DSVirtualListDataTestIds,
33
+ DSVirtualListName: () => import_constants.DSVirtualListName,
34
+ DSVirtualListSlots: () => import_constants.DSVirtualListSlots,
34
35
  DSVirtualListWithSchema: () => import_VirtualList.DSVirtualListWithSchema
35
36
  });
36
37
  module.exports = __toCommonJS(index_exports);
37
38
  var React = __toESM(require("react"));
38
39
  var import_VirtualList = require("./VirtualList.js");
39
- var import_DSVirtualListDefinitions = require("./DSVirtualListDefinitions.js");
40
+ var import_constants = require("./constants/index.js");
40
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 DSVirtualListT } from './react-desc-prop-types.js';\nexport { DSVirtualList, DSVirtualListWithSchema } from './VirtualList.js';\nexport { DSVirtualListName, DSVirtualListSlots } from './DSVirtualListDefinitions.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,yBAAuD;AACvD,sCAAsD;",
4
+ "sourcesContent": ["export { type DSVirtualListT } from './react-desc-prop-types.js';\nexport { DSVirtualList, DSVirtualListWithSchema } from './VirtualList.js';\nexport { DSVirtualListName, DSVirtualListSlots, DSVirtualListDataTestIds } 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,yBAAuD;AACvD,uBAAgF;",
6
6
  "names": []
7
7
  }
@@ -35,7 +35,7 @@ var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
- var import_VirtualListDataTestID = require("../VirtualListDataTestID.js");
38
+ var import_constants = require("../constants/index.js");
39
39
  var import_useVirtualList = require("../hooks/useVirtualList.js");
40
40
  var import_styled = require("./styled.js");
41
41
  const List = (props) => {
@@ -46,13 +46,15 @@ const List = (props) => {
46
46
  [measureElement]
47
47
  );
48
48
  const ownerPropsConfig = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
49
+ const globalAttributes = (0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefault);
49
50
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
50
51
  import_styled.StyledWrapper,
51
52
  {
52
53
  innerRef: parentRef,
53
- "data-testid": import_VirtualListDataTestID.LIST_DATA_TESTID.CONTAINER,
54
+ "data-testid": import_constants.DSVirtualListDataTestIds.ROOT,
54
55
  role: "list",
55
56
  ...ownerPropsConfig,
57
+ ...globalAttributes,
56
58
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledListWrapper, { height: totalSize, ...ownerPropsConfig, children: virtualItems.map((virtualItem) => {
57
59
  const { index, start, key } = virtualItem;
58
60
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -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 from 'react';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { LIST_DATA_TESTID } from '../VirtualListDataTestID.js';\nimport { useVirtualListV3 } from '../hooks/useVirtualList.js';\nimport type { DSVirtualListT } from '../react-desc-prop-types.js';\nimport { StyledWrapper, StyledListWrapper, StyledItemWrapper } from './styled.js';\n\nexport const List = (props: DSVirtualListT.Props) => {\n const { parentRef, getVirtualItems, filteredChildren, totalSize, instanceUid, measureElement, propsWithDefault } =\n useVirtualListV3(props);\n const virtualItems = getVirtualItems();\n const measureRef: React.LegacyRef<HTMLDivElement> = React.useCallback(\n (node: HTMLDivElement) => measureElement(node),\n [measureElement],\n );\n\n const ownerPropsConfig = useOwnerProps(propsWithDefault);\n\n return (\n <StyledWrapper\n key={instanceUid}\n innerRef={parentRef}\n data-testid={LIST_DATA_TESTID.CONTAINER}\n role=\"list\"\n {...ownerPropsConfig}\n >\n <StyledListWrapper height={totalSize} {...ownerPropsConfig}>\n {virtualItems.map((virtualItem) => {\n const { index, start, key } = virtualItem;\n return (\n <StyledItemWrapper\n innerRef={measureRef}\n data-index={index}\n start={start}\n role=\"listitem\"\n key={`${instanceUid}-item-${key}`}\n {...ownerPropsConfig}\n >\n {filteredChildren[index]}\n </StyledItemWrapper>\n );\n })}\n </StyledListWrapper>\n </StyledWrapper>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD8BX;AA9BZ,mBAAkB;AAClB,8BAA8B;AAC9B,mCAAiC;AACjC,4BAAiC;AAEjC,oBAAoE;AAE7D,MAAM,OAAO,CAAC,UAAgC;AACnD,QAAM,EAAE,WAAW,iBAAiB,kBAAkB,WAAW,aAAa,gBAAgB,iBAAiB,QAC7G,wCAAiB,KAAK;AACxB,QAAM,eAAe,gBAAgB;AACrC,QAAM,aAA8C,aAAAA,QAAM;AAAA,IACxD,CAAC,SAAyB,eAAe,IAAI;AAAA,IAC7C,CAAC,cAAc;AAAA,EACjB;AAEA,QAAM,uBAAmB,uCAAc,gBAAgB;AAEvD,SACE;AAAA,IAAC;AAAA;AAAA,MAEC,UAAU;AAAA,MACV,eAAa,8CAAiB;AAAA,MAC9B,MAAK;AAAA,MACJ,GAAG;AAAA,MAEJ,sDAAC,mCAAkB,QAAQ,WAAY,GAAG,kBACvC,uBAAa,IAAI,CAAC,gBAAgB;AACjC,cAAM,EAAE,OAAO,OAAO,IAAI,IAAI;AAC9B,eACE;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV,cAAY;AAAA,YACZ;AAAA,YACA,MAAK;AAAA,YAEJ,GAAG;AAAA,YAEH,2BAAiB,KAAK;AAAA;AAAA,UAHlB,GAAG,WAAW,SAAS,GAAG;AAAA,QAIjC;AAAA,MAEJ,CAAC,GACH;AAAA;AAAA,IAtBK;AAAA,EAuBP;AAEJ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { useOwnerProps, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { DSVirtualListDataTestIds } from '../constants/index.js';\nimport { useVirtualListV3 } from '../hooks/useVirtualList.js';\nimport type { DSVirtualListT } from '../react-desc-prop-types.js';\nimport { StyledWrapper, StyledListWrapper, StyledItemWrapper } from './styled.js';\n\nexport const List = (props: DSVirtualListT.Props) => {\n const { parentRef, getVirtualItems, filteredChildren, totalSize, instanceUid, measureElement, propsWithDefault } =\n useVirtualListV3(props);\n const virtualItems = getVirtualItems();\n const measureRef: React.LegacyRef<HTMLDivElement> = React.useCallback(\n (node: HTMLDivElement) => measureElement(node),\n [measureElement],\n );\n\n const ownerPropsConfig = useOwnerProps(propsWithDefault);\n const globalAttributes = useGetGlobalAttributes(propsWithDefault);\n\n return (\n <StyledWrapper\n key={instanceUid}\n innerRef={parentRef}\n data-testid={DSVirtualListDataTestIds.ROOT}\n role=\"list\"\n {...ownerPropsConfig}\n {...globalAttributes}\n >\n <StyledListWrapper height={totalSize} {...ownerPropsConfig}>\n {virtualItems.map((virtualItem) => {\n const { index, start, key } = virtualItem;\n return (\n <StyledItemWrapper\n innerRef={measureRef}\n data-index={index}\n start={start}\n role=\"listitem\"\n key={`${instanceUid}-item-${key}`}\n {...ownerPropsConfig}\n >\n {filteredChildren[index]}\n </StyledItemWrapper>\n );\n })}\n </StyledListWrapper>\n </StyledWrapper>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgCX;AAhCZ,mBAAkB;AAClB,8BAAsD;AACtD,uBAAyC;AACzC,4BAAiC;AAEjC,oBAAoE;AAE7D,MAAM,OAAO,CAAC,UAAgC;AACnD,QAAM,EAAE,WAAW,iBAAiB,kBAAkB,WAAW,aAAa,gBAAgB,iBAAiB,QAC7G,wCAAiB,KAAK;AACxB,QAAM,eAAe,gBAAgB;AACrC,QAAM,aAA8C,aAAAA,QAAM;AAAA,IACxD,CAAC,SAAyB,eAAe,IAAI;AAAA,IAC7C,CAAC,cAAc;AAAA,EACjB;AAEA,QAAM,uBAAmB,uCAAc,gBAAgB;AACvD,QAAM,uBAAmB,gDAAuB,gBAAgB;AAEhE,SACE;AAAA,IAAC;AAAA;AAAA,MAEC,UAAU;AAAA,MACV,eAAa,0CAAyB;AAAA,MACtC,MAAK;AAAA,MACJ,GAAG;AAAA,MACH,GAAG;AAAA,MAEJ,sDAAC,mCAAkB,QAAQ,WAAY,GAAG,kBACvC,uBAAa,IAAI,CAAC,gBAAgB;AACjC,cAAM,EAAE,OAAO,OAAO,IAAI,IAAI;AAC9B,eACE;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV,cAAY;AAAA,YACZ;AAAA,YACA,MAAK;AAAA,YAEJ,GAAG;AAAA,YAEH,2BAAiB,KAAK;AAAA;AAAA,UAHlB,GAAG,WAAW,SAAS,GAAG;AAAA,QAIjC;AAAA,MAEJ,CAAC,GACH;AAAA;AAAA,IAvBK;AAAA,EAwBP;AAEJ;",
6
6
  "names": ["React"]
7
7
  }
@@ -35,19 +35,19 @@ __export(styled_exports, {
35
35
  module.exports = __toCommonJS(styled_exports);
36
36
  var React = __toESM(require("react"));
37
37
  var import_ds_system = require("@elliemae/ds-system");
38
- var import_DSVirtualListDefinitions = require("../DSVirtualListDefinitions.js");
39
- const StyledWrapper = (0, import_ds_system.styled)("div", { name: import_DSVirtualListDefinitions.DSVirtualListName, slot: import_DSVirtualListDefinitions.DSVirtualListSlots.ROOT })`
38
+ var import_constants = require("../constants/index.js");
39
+ const StyledWrapper = (0, import_ds_system.styled)("div", { name: import_constants.DSVirtualListName, slot: import_constants.DSVirtualListSlots.ROOT })`
40
40
  width: 100%;
41
41
  height: 100%;
42
42
  padding-bottom: 0;
43
43
  overflow: auto;
44
44
  `;
45
- const StyledListWrapper = (0, import_ds_system.styled)("div", { name: import_DSVirtualListDefinitions.DSVirtualListName, slot: import_DSVirtualListDefinitions.DSVirtualListSlots.LIST_WRAPPER })`
45
+ const StyledListWrapper = (0, import_ds_system.styled)("div", { name: import_constants.DSVirtualListName, slot: import_constants.DSVirtualListSlots.LIST_WRAPPER })`
46
46
  width: 100%;
47
47
  height: ${({ height }) => `${height}px`};
48
48
  position: relative;
49
49
  `;
50
- const StyledItemWrapper = (0, import_ds_system.styled)("div", { name: import_DSVirtualListDefinitions.DSVirtualListName, slot: import_DSVirtualListDefinitions.DSVirtualListSlots.ITEM_WRAPPER })`
50
+ const StyledItemWrapper = (0, import_ds_system.styled)("div", { name: import_constants.DSVirtualListName, slot: import_constants.DSVirtualListSlots.ITEM_WRAPPER })`
51
51
  position: absolute;
52
52
  top: 0;
53
53
  left: 0;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/styled.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { DSVirtualListName, DSVirtualListSlots } from '../DSVirtualListDefinitions.js';\n\nexport const StyledWrapper = styled('div', { name: DSVirtualListName, slot: DSVirtualListSlots.ROOT })`\n width: 100%;\n height: 100%;\n padding-bottom: 0;\n overflow: auto;\n`;\n\nexport const StyledListWrapper = styled('div', { name: DSVirtualListName, slot: DSVirtualListSlots.LIST_WRAPPER })<{\n height: number;\n}>`\n width: 100%;\n height: ${({ height }) => `${height}px`};\n position: relative;\n`;\n\nexport const StyledItemWrapper = styled('div', { name: DSVirtualListName, slot: DSVirtualListSlots.ITEM_WRAPPER })<{\n start: number;\n}>`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n transform: ${({ start }) => `translateY(${start}px)`};\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,sCAAsD;AAE/C,MAAM,oBAAgB,yBAAO,OAAO,EAAE,MAAM,mDAAmB,MAAM,mDAAmB,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAO9F,MAAM,wBAAoB,yBAAO,OAAO,EAAE,MAAM,mDAAmB,MAAM,mDAAmB,aAAa,CAAC;AAAA;AAAA,YAIrG,CAAC,EAAE,OAAO,MAAM,GAAG,MAAM,IAAI;AAAA;AAAA;AAIlC,MAAM,wBAAoB,yBAAO,OAAO,EAAE,MAAM,mDAAmB,MAAM,mDAAmB,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,eAOlG,CAAC,EAAE,MAAM,MAAM,cAAc,KAAK,KAAK;AAAA;",
4
+ "sourcesContent": ["import { styled } from '@elliemae/ds-system';\nimport { DSVirtualListName, DSVirtualListSlots } from '../constants/index.js';\n\nexport const StyledWrapper = styled('div', { name: DSVirtualListName, slot: DSVirtualListSlots.ROOT })`\n width: 100%;\n height: 100%;\n padding-bottom: 0;\n overflow: auto;\n`;\n\nexport const StyledListWrapper = styled('div', { name: DSVirtualListName, slot: DSVirtualListSlots.LIST_WRAPPER })<{\n height: number;\n}>`\n width: 100%;\n height: ${({ height }) => `${height}px`};\n position: relative;\n`;\n\nexport const StyledItemWrapper = styled('div', { name: DSVirtualListName, slot: DSVirtualListSlots.ITEM_WRAPPER })<{\n start: number;\n}>`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n transform: ${({ start }) => `translateY(${start}px)`};\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AACvB,uBAAsD;AAE/C,MAAM,oBAAgB,yBAAO,OAAO,EAAE,MAAM,oCAAmB,MAAM,oCAAmB,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAO9F,MAAM,wBAAoB,yBAAO,OAAO,EAAE,MAAM,oCAAmB,MAAM,oCAAmB,aAAa,CAAC;AAAA;AAAA,YAIrG,CAAC,EAAE,OAAO,MAAM,GAAG,MAAM,IAAI;AAAA;AAAA;AAIlC,MAAM,wBAAoB,yBAAO,OAAO,EAAE,MAAM,oCAAmB,MAAM,oCAAmB,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,eAOlG,CAAC,EAAE,MAAM,MAAM,cAAc,KAAK,KAAK;AAAA;",
6
6
  "names": []
7
7
  }
@@ -34,10 +34,11 @@ __export(react_desc_prop_types_exports, {
34
34
  module.exports = __toCommonJS(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_DSVirtualListDefinitions = require("./DSVirtualListDefinitions.js");
37
+ var import_constants = require("./constants/index.js");
38
38
  const defaultProps = {};
39
39
  const DSVirtualListPropTypes = {
40
- ...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_DSVirtualListDefinitions.DSVirtualListName, import_DSVirtualListDefinitions.DSVirtualListSlots),
40
+ ...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSVirtualListName, import_constants.DSVirtualListSlots),
41
+ ...import_ds_props_helpers.globalAttributesPropTypes,
41
42
  children: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.node).description("Children list").isRequired,
42
43
  actionRef: import_ds_props_helpers.PropTypes.shape({
43
44
  current: import_ds_props_helpers.PropTypes.oneOfType([
@@ -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 type React from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes } from '@elliemae/ds-props-helpers';\nimport { DSVirtualListName, DSVirtualListSlots } from './DSVirtualListDefinitions.js';\n\nexport declare namespace DSVirtualListT {\n type ScrollAlignment = 'start' | 'center' | 'end' | 'auto';\n type ScrollToOptions = {\n align: ScrollAlignment;\n };\n\n export type ActionRef = {\n scrollTo?: (index: number, options?: ScrollToOptions | undefined) => void;\n };\n export interface RequiredProps {\n children: React.ReactNode;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSVirtualListName,\n typeof DSVirtualListSlots\n > {\n actionRef: React.MutableRefObject<ActionRef>;\n }\n\n export interface Props extends Partial<DefaultProps>, OptionalProps, RequiredProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps, RequiredProps {}\n}\n\nexport const defaultProps: DSVirtualListT.DefaultProps = {};\n\nexport const DSVirtualListPropTypes = {\n ...getPropsPerSlotPropTypes(DSVirtualListName, DSVirtualListSlots),\n children: PropTypes.arrayOf(PropTypes.node).description('Children list').isRequired,\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} as React.WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAAoD;AACpD,sCAAsD;AA6B/C,MAAM,eAA4C,CAAC;AAEnD,MAAM,yBAAyB;AAAA,EACpC,OAAG,kDAAyB,mDAAmB,kDAAkB;AAAA,EACjE,UAAU,kCAAU,QAAQ,kCAAU,IAAI,EAAE,YAAY,eAAe,EAAE;AAAA,EACzE,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;AACjE;",
4
+ "sourcesContent": ["import type React from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport { DSVirtualListName, DSVirtualListSlots } from './constants/index.js';\n\nexport declare namespace DSVirtualListT {\n type ScrollAlignment = 'start' | 'center' | 'end' | 'auto';\n type ScrollToOptions = {\n align: ScrollAlignment;\n };\n\n export type ActionRef = {\n scrollTo?: (index: number, options?: ScrollToOptions | undefined) => void;\n };\n\n export type SlotFunctionArguments = {\n dsVirtuallistRoot: () => object;\n dsVirtuallistListWrapper: () => object;\n dsVirtuallistItemWrapper: () => object;\n };\n\n export interface RequiredProps {\n children: React.ReactNode;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSVirtualListName,\n typeof DSVirtualListSlots\n > {\n actionRef?: React.MutableRefObject<ActionRef>;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof RequiredProps>,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof RequiredProps>,\n RequiredProps {}\n}\n\nexport const defaultProps: DSVirtualListT.DefaultProps = {};\n\nexport const DSVirtualListPropTypes = {\n ...getPropsPerSlotPropTypes(DSVirtualListName, DSVirtualListSlots),\n ...globalAttributesPropTypes,\n children: PropTypes.arrayOf(PropTypes.node).description('Children list').isRequired,\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} as React.WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAA+E;AAC/E,uBAAsD;AA8C/C,MAAM,eAA4C,CAAC;AAEnD,MAAM,yBAAyB;AAAA,EACpC,OAAG,kDAAyB,oCAAmB,mCAAkB;AAAA,EACjE,GAAG;AAAA,EACH,UAAU,kCAAU,QAAQ,kCAAU,IAAI,EAAE,YAAY,eAAe,EAAE;AAAA,EACzE,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;AACjE;",
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,16 @@ 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 VirtualListDataTestID_exports = {};
30
- __export(VirtualListDataTestID_exports, {
31
- LIST_DATA_TESTID: () => LIST_DATA_TESTID
32
- });
33
- module.exports = __toCommonJS(VirtualListDataTestID_exports);
34
24
  var React = __toESM(require("react"));
35
- const LIST_DATA_TESTID = {
36
- CONTAINER: "virtual-list-container"
25
+ const SlotPropsAsObject = {
26
+ dsVirtuallistRoot: { "aria-label": "just a typescript test" },
27
+ dsVirtuallistListWrapper: { "aria-label": "just a typescript test" },
28
+ dsVirtuallistItemWrapper: { "aria-label": "just a typescript test" }
29
+ };
30
+ const SlotPropsAsFunctions = {
31
+ dsVirtuallistRoot: () => ({ "aria-label": "just a typescript test" }),
32
+ dsVirtuallistListWrapper: () => ({ "aria-label": "just a typescript test" }),
33
+ dsVirtuallistItemWrapper: () => ({ "aria-label": "just a typescript test" })
37
34
  };
38
- //# sourceMappingURL=VirtualListDataTestID.js.map
35
+ const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
36
+ //# 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 { DSVirtualListName, DSVirtualListSlots } from '../constants/index.js';\nimport type { DSVirtualListT } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObject: Partial<DSVirtualListT.Props> = {\n dsVirtuallistRoot: { 'aria-label': 'just a typescript test' },\n dsVirtuallistListWrapper: { 'aria-label': 'just a typescript test' },\n dsVirtuallistItemWrapper: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSVirtualListT.SlotFunctionArguments = {\n dsVirtuallistRoot: () => ({ 'aria-label': 'just a typescript test' }),\n dsVirtuallistListWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsVirtuallistItemWrapper: () => ({ '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 DSVirtualListName, typeof DSVirtualListSlots>\n> = SlotPropsAsFunctions;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACMvB,MAAM,oBAAmD;AAAA,EACvD,mBAAmB,EAAE,cAAc,yBAAyB;AAAA,EAC5D,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,0BAA0B,EAAE,cAAc,yBAAyB;AACrE;AAEA,MAAM,uBAA6D;AAAA,EACjE,mBAAmB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACnE,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAC5E;AAGA,MAAM,6CAEF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
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
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var typescript_virtual_list_valid_exports = {};
30
+ __export(typescript_virtual_list_valid_exports, {
31
+ default: () => typescript_virtual_list_valid_default
32
+ });
33
+ module.exports = __toCommonJS(typescript_virtual_list_valid_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_VirtualList = require("../VirtualList.js");
37
+ const testRequiredProps = {
38
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 0" }, "0")]
39
+ };
40
+ const testOptionalProps = {};
41
+ const testPartialDefaults = {};
42
+ const testProps = {
43
+ ...testRequiredProps,
44
+ ...testOptionalProps,
45
+ ...testPartialDefaults
46
+ };
47
+ const testPropsAsSyntax = {
48
+ ...testRequiredProps,
49
+ ...testOptionalProps,
50
+ ...testPartialDefaults
51
+ };
52
+ const testCompleteDefaults = {};
53
+ const testInternalProps = {
54
+ ...testRequiredProps,
55
+ ...testOptionalProps,
56
+ ...testCompleteDefaults
57
+ };
58
+ const testInternalPropsAsSyntax = {
59
+ ...testRequiredProps,
60
+ ...testOptionalProps,
61
+ ...testCompleteDefaults
62
+ };
63
+ const actionRef = { current: {} };
64
+ const testExplicitDefinition = {
65
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 0" }, "0"), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 1" }, "1")],
66
+ actionRef
67
+ };
68
+ const testInferredTypeCompatibility = {
69
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 0" }, "0"), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 1" }, "1")],
70
+ actionRef
71
+ };
72
+ const testDefinitionAsConst = {
73
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 0" }, "0"), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 1" }, "1")]
74
+ };
75
+ const testSlotPropsAsObject = {
76
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 0" }, "0")],
77
+ dsVirtuallistRoot: { "aria-label": "items list" },
78
+ dsVirtuallistListWrapper: { "aria-label": "items list wrapper" },
79
+ dsVirtuallistItemWrapper: { "aria-label": "item wrapper" }
80
+ };
81
+ const testGlobalAttributes = {
82
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 0" }, "0")],
83
+ className: "custom-class",
84
+ id: "custom-id",
85
+ "aria-label": "custom list"
86
+ };
87
+ const testSlotPropsAsFunctions = {
88
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 0" }, "0")],
89
+ dsVirtuallistRoot: () => ({ "aria-label": "items list" }),
90
+ dsVirtuallistListWrapper: () => ({ "aria-label": "items list wrapper" }),
91
+ dsVirtuallistItemWrapper: () => ({ "aria-label": "item wrapper" })
92
+ };
93
+ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
94
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_VirtualList.DSVirtualList, { ...testExplicitDefinition }),
95
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_VirtualList.DSVirtualList, { ...testInferredTypeCompatibility }),
96
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_VirtualList.DSVirtualList, { ...testDefinitionAsConst }),
97
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_VirtualList.DSVirtualList, { ...testSlotPropsAsObject }),
98
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_VirtualList.DSVirtualList, { ...testSlotPropsAsFunctions }),
99
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_VirtualList.DSVirtualList, { ...testGlobalAttributes }),
100
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_VirtualList.DSVirtualList, { className: "custom-class", id: "custom-id", "aria-label": "custom list", "data-testid": "custom-testid", children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 0" }, "0")] }),
101
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_VirtualList.DSVirtualList, { children: [
102
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 0" }),
103
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 1" })
104
+ ] }),
105
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_VirtualList.DSVirtualList, { actionRef, dsVirtuallistRoot: { tabIndex: 0 }, children: [
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 0" }),
107
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "item 1" })
108
+ ] })
109
+ ] });
110
+ var typescript_virtual_list_valid_default = ExampleUsageComponent;
111
+ //# sourceMappingURL=typescript-virtual-list-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/typescript-testing/typescript-virtual-list-valid.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n/* eslint-disable local-rules/custom-rule */\nimport React from 'react';\nimport { DSVirtualList } from '../VirtualList.js';\nimport type { DSVirtualListT } from '../react-desc-prop-types.js';\n\ntype ComponentPropsForApp = DSVirtualListT.Props;\ntype ComponentPropsInternals = DSVirtualListT.InternalProps;\ntype ComponentPropsDefaultProps = DSVirtualListT.DefaultProps;\ntype ComponentPropsOptionalProps = DSVirtualListT.OptionalProps;\ntype ComponentPropsRequiredProps = DSVirtualListT.RequiredProps;\n\n// NOTE: `children` is typed as `React.ReactNode` (accepts a single element or an array), but\n// `DSVirtualListPropTypes.children` is `PropTypes.arrayOf(PropTypes.node).isRequired` \u2014 stricter\n// than the TS type. A single non-array child compiles here but throws at runtime. Every example\n// below passes an array to match the real, enforced contract \u2014 not just what the type permits.\nconst testRequiredProps: ComponentPropsRequiredProps = {\n children: [<div key=\"0\">item 0</div>],\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {};\n\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// Example usages start here\nconst actionRef: React.MutableRefObject<DSVirtualListT.ActionRef> = { current: {} };\n\nconst testExplicitDefinition: ComponentPropsForApp = {\n children: [<div key=\"0\">item 0</div>, <div key=\"1\">item 1</div>],\n actionRef,\n};\n\nconst testInferredTypeCompatibility = {\n children: [<div key=\"0\">item 0</div>, <div key=\"1\">item 1</div>],\n actionRef,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n children: [<div key=\"0\">item 0</div>, <div key=\"1\">item 1</div>],\n} as const;\n\nconst testSlotPropsAsObject: ComponentPropsForApp = {\n children: [<div key=\"0\">item 0</div>],\n dsVirtuallistRoot: { 'aria-label': 'items list' },\n dsVirtuallistListWrapper: { 'aria-label': 'items list wrapper' },\n dsVirtuallistItemWrapper: { 'aria-label': 'item wrapper' },\n};\n\n// Global HTML/ARIA attributes (className, id, aria-*, data-*) work at runtime via\n// useGetGlobalAttributes in List.tsx \u2014 Props/InternalProps extend Omit<GlobalAttributesT<HTMLElement>, ...>\n// specifically so this compiles. Regression here means the type/runtime contract has drifted apart again.\nconst testGlobalAttributes: ComponentPropsForApp = {\n children: [<div key=\"0\">item 0</div>],\n className: 'custom-class',\n id: 'custom-id',\n 'aria-label': 'custom list',\n};\n\nconst testSlotPropsAsFunctions: ComponentPropsForApp = {\n children: [<div key=\"0\">item 0</div>],\n dsVirtuallistRoot: () => ({ 'aria-label': 'items list' }),\n dsVirtuallistListWrapper: () => ({ 'aria-label': 'items list wrapper' }),\n dsVirtuallistItemWrapper: () => ({ 'aria-label': 'item wrapper' }),\n};\n\nconst ExampleUsageComponent = () => (\n <>\n {/* Works with explicitly casted props */}\n <DSVirtualList {...testExplicitDefinition} />\n <DSVirtualList {...testInferredTypeCompatibility} />\n <DSVirtualList {...testDefinitionAsConst} />\n <DSVirtualList {...testSlotPropsAsObject} />\n <DSVirtualList {...testSlotPropsAsFunctions} />\n <DSVirtualList {...testGlobalAttributes} />\n\n {/* Inline props test \u2014 global HTML/ARIA attributes. Array child to match the real, enforced\n runtime contract \u2014 a single child here would compile but throw (see NOTE above). */}\n <DSVirtualList className=\"custom-class\" id=\"custom-id\" aria-label=\"custom list\" data-testid=\"custom-testid\">\n {[<div key=\"0\">item 0</div>]}\n </DSVirtualList>\n\n {/* Inline props test \u2014 required prop only. Two children so JSX itself produces an array;\n a single child here would compile (React.ReactNode) but throw at runtime (see NOTE above). */}\n <DSVirtualList>\n <div>item 0</div>\n <div>item 1</div>\n </DSVirtualList>\n\n {/* Inline props test \u2014 actionRef and slot props */}\n <DSVirtualList actionRef={actionRef} dsVirtuallistRoot={{ tabIndex: 0 }}>\n <div>item 0</div>\n <div>item 1</div>\n </DSVirtualList>\n </>\n);\n\nexport default ExampleUsageComponent;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiBV;AAdb,yBAA8B;AAa9B,MAAM,oBAAiD;AAAA,EACrD,UAAU,CAAC,4CAAC,SAAY,sBAAJ,GAAU,CAAM;AACtC;AAEA,MAAM,oBAAiD,CAAC;AAExD,MAAM,sBAA2D,CAAC;AAElE,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,uBAA6D,CAAC;AAEpE,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,YAA8D,EAAE,SAAS,CAAC,EAAE;AAElF,MAAM,yBAA+C;AAAA,EACnD,UAAU,CAAC,4CAAC,SAAY,sBAAJ,GAAU,GAAQ,4CAAC,SAAY,sBAAJ,GAAU,CAAM;AAAA,EAC/D;AACF;AAEA,MAAM,gCAAgC;AAAA,EACpC,UAAU,CAAC,4CAAC,SAAY,sBAAJ,GAAU,GAAQ,4CAAC,SAAY,sBAAJ,GAAU,CAAM;AAAA,EAC/D;AACF;AAEA,MAAM,wBAAwB;AAAA,EAC5B,UAAU,CAAC,4CAAC,SAAY,sBAAJ,GAAU,GAAQ,4CAAC,SAAY,sBAAJ,GAAU,CAAM;AACjE;AAEA,MAAM,wBAA8C;AAAA,EAClD,UAAU,CAAC,4CAAC,SAAY,sBAAJ,GAAU,CAAM;AAAA,EACpC,mBAAmB,EAAE,cAAc,aAAa;AAAA,EAChD,0BAA0B,EAAE,cAAc,qBAAqB;AAAA,EAC/D,0BAA0B,EAAE,cAAc,eAAe;AAC3D;AAKA,MAAM,uBAA6C;AAAA,EACjD,UAAU,CAAC,4CAAC,SAAY,sBAAJ,GAAU,CAAM;AAAA,EACpC,WAAW;AAAA,EACX,IAAI;AAAA,EACJ,cAAc;AAChB;AAEA,MAAM,2BAAiD;AAAA,EACrD,UAAU,CAAC,4CAAC,SAAY,sBAAJ,GAAU,CAAM;AAAA,EACpC,mBAAmB,OAAO,EAAE,cAAc,aAAa;AAAA,EACvD,0BAA0B,OAAO,EAAE,cAAc,qBAAqB;AAAA,EACtE,0BAA0B,OAAO,EAAE,cAAc,eAAe;AAClE;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,oCAAe,GAAG,wBAAwB;AAAA,EAC3C,4CAAC,oCAAe,GAAG,+BAA+B;AAAA,EAClD,4CAAC,oCAAe,GAAG,uBAAuB;AAAA,EAC1C,4CAAC,oCAAe,GAAG,uBAAuB;AAAA,EAC1C,4CAAC,oCAAe,GAAG,0BAA0B;AAAA,EAC7C,4CAAC,oCAAe,GAAG,sBAAsB;AAAA,EAIzC,4CAAC,oCAAc,WAAU,gBAAe,IAAG,aAAY,cAAW,eAAc,eAAY,iBACzF,WAAC,4CAAC,SAAY,sBAAJ,GAAU,CAAM,GAC7B;AAAA,EAIA,6CAAC,oCACC;AAAA,gDAAC,SAAI,oBAAM;AAAA,IACX,4CAAC,SAAI,oBAAM;AAAA,KACb;AAAA,EAGA,6CAAC,oCAAc,WAAsB,mBAAmB,EAAE,UAAU,EAAE,GACpE;AAAA,gDAAC,SAAI,oBAAM;AAAA,IACX,4CAAC,SAAI,oBAAM;AAAA,KACb;AAAA,GACF;AAGF,IAAO,wCAAQ;",
6
+ "names": []
7
+ }
@@ -3,7 +3,7 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { describe } from "@elliemae/ds-props-helpers";
4
4
  import { List } from "./parts/List.js";
5
5
  import { DSVirtualListPropTypes } from "./react-desc-prop-types.js";
6
- import { DSVirtualListName } from "./DSVirtualListDefinitions.js";
6
+ import { DSVirtualListName } from "./constants/index.js";
7
7
  const DSVirtualList = (props) => /* @__PURE__ */ jsx(List, { ...props });
8
8
  DSVirtualList.displayName = DSVirtualListName;
9
9
  const DSVirtualListWithSchema = describe(DSVirtualList).description("DSVirtualList");
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/VirtualList.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { List } from './parts/List.js';\nimport { DSVirtualListPropTypes, type DSVirtualListT } from './react-desc-prop-types.js';\nimport { DSVirtualListName } from './DSVirtualListDefinitions.js';\n\n// we are not using a context nor zustand so all the logic is handled in List...\nconst DSVirtualList = (props: DSVirtualListT.Props) => <List {...props} />;\n\nDSVirtualList.displayName = DSVirtualListName;\nconst DSVirtualListWithSchema = describe(DSVirtualList).description('DSVirtualList');\nDSVirtualListWithSchema.propTypes = DSVirtualListPropTypes;\n\nexport { DSVirtualList, DSVirtualListWithSchema };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { List } from './parts/List.js';\nimport { DSVirtualListPropTypes, type DSVirtualListT } from './react-desc-prop-types.js';\nimport { DSVirtualListName } from './constants/index.js';\n\n// we are not using a context nor zustand so all the logic is handled in List...\nconst DSVirtualList = (props: DSVirtualListT.Props) => <List {...props} />;\n\nDSVirtualList.displayName = DSVirtualListName;\nconst DSVirtualListWithSchema = describe(DSVirtualList).description('DSVirtualList');\nDSVirtualListWithSchema.propTypes = DSVirtualListPropTypes;\n\nexport { DSVirtualList, DSVirtualListWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACOgC;AANvD,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,8BAAmD;AAC5D,SAAS,yBAAyB;AAGlC,MAAM,gBAAgB,CAAC,UAAgC,oBAAC,QAAM,GAAG,OAAO;AAExE,cAAc,cAAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa,EAAE,YAAY,eAAe;AACnF,wBAAwB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import { slotObjectToDataTestIds } from "@elliemae/ds-system";
3
+ const DSVirtualListName = "DSVirtuallist";
4
+ const DSVirtualListSlots = {
5
+ ROOT: "root",
6
+ // legacy — data-testid preserved below, do not let slot auto-generation replace it
7
+ LIST_WRAPPER: "list-wrapper",
8
+ ITEM_WRAPPER: "item-wrapper"
9
+ };
10
+ const DSVirtualListDataTestIds = {
11
+ ...slotObjectToDataTestIds(DSVirtualListName, DSVirtualListSlots),
12
+ ROOT: "virtual-list-container"
13
+ // legacy value — e2e/ds-virtuallist/DSVirtualListCO.js depends on it, breaking change if removed
14
+ };
15
+ export {
16
+ DSVirtualListDataTestIds,
17
+ DSVirtualListName,
18
+ DSVirtualListSlots
19
+ };
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSVirtualListName = 'DSVirtuallist';\n\nexport const DSVirtualListSlots = {\n ROOT: 'root', // legacy \u2014 data-testid preserved below, do not let slot auto-generation replace it\n LIST_WRAPPER: 'list-wrapper',\n ITEM_WRAPPER: 'item-wrapper',\n} as const;\n\nexport const DSVirtualListDataTestIds = {\n ...slotObjectToDataTestIds(DSVirtualListName, DSVirtualListSlots),\n ROOT: 'virtual-list-container', // legacy value \u2014 e2e/ds-virtuallist/DSVirtualListCO.js depends on it, breaking change if removed\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,oBAAoB;AAE1B,MAAM,qBAAqB;AAAA,EAChC,MAAM;AAAA;AAAA,EACN,cAAc;AAAA,EACd,cAAc;AAChB;AAEO,MAAM,2BAA2B;AAAA,EACtC,GAAG,wBAAwB,mBAAmB,kBAAkB;AAAA,EAChE,MAAM;AAAA;AACR;",
6
+ "names": []
7
+ }
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
3
- import { DSVirtualListName } from "../DSVirtualListDefinitions.js";
3
+ import { DSVirtualListName } from "../constants/index.js";
4
4
  const useValidateProps = (props, propTypes) => {
5
5
  useValidateTypescriptPropTypes(props, propTypes, DSVirtualListName);
6
6
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/useValidateProps.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { type DSVirtualListT } from '../react-desc-prop-types.js';\nimport { DSVirtualListName } from '../DSVirtualListDefinitions.js';\n\nexport const useValidateProps = (props: DSVirtualListT.InternalProps, propTypes: WeakValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSVirtualListName);\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { type DSVirtualListT } from '../react-desc-prop-types.js';\nimport { DSVirtualListName } from '../constants/index.js';\n\nexport const useValidateProps = (props: DSVirtualListT.InternalProps, propTypes: WeakValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSVirtualListName);\n};\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAG/C,SAAS,yBAAyB;AAE3B,MAAM,mBAAmB,CAAC,OAAqC,cAAgD;AAEpH,iCAA+B,OAAO,WAAW,iBAAiB;AACpE;",
6
6
  "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as React from "react";
2
2
  import { DSVirtualList, DSVirtualListWithSchema } from "./VirtualList.js";
3
- import { DSVirtualListName, DSVirtualListSlots } from "./DSVirtualListDefinitions.js";
3
+ import { DSVirtualListName, DSVirtualListSlots, DSVirtualListDataTestIds } from "./constants/index.js";
4
4
  export {
5
5
  DSVirtualList,
6
+ DSVirtualListDataTestIds,
6
7
  DSVirtualListName,
7
8
  DSVirtualListSlots,
8
9
  DSVirtualListWithSchema
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { type DSVirtualListT } from './react-desc-prop-types.js';\nexport { DSVirtualList, DSVirtualListWithSchema } from './VirtualList.js';\nexport { DSVirtualListName, DSVirtualListSlots } from './DSVirtualListDefinitions.js';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,eAAe,+BAA+B;AACvD,SAAS,mBAAmB,0BAA0B;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { type DSVirtualListT } from './react-desc-prop-types.js';\nexport { DSVirtualList, DSVirtualListWithSchema } from './VirtualList.js';\nexport { DSVirtualListName, DSVirtualListSlots, DSVirtualListDataTestIds } from './constants/index.js';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,eAAe,+BAA+B;AACvD,SAAS,mBAAmB,oBAAoB,gCAAgC;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import React2 from "react";
4
- import { useOwnerProps } from "@elliemae/ds-props-helpers";
5
- import { LIST_DATA_TESTID } from "../VirtualListDataTestID.js";
4
+ import { useOwnerProps, useGetGlobalAttributes } from "@elliemae/ds-props-helpers";
5
+ import { DSVirtualListDataTestIds } from "../constants/index.js";
6
6
  import { useVirtualListV3 } from "../hooks/useVirtualList.js";
7
7
  import { StyledWrapper, StyledListWrapper, StyledItemWrapper } from "./styled.js";
8
8
  const List = (props) => {
@@ -13,13 +13,15 @@ const List = (props) => {
13
13
  [measureElement]
14
14
  );
15
15
  const ownerPropsConfig = useOwnerProps(propsWithDefault);
16
+ const globalAttributes = useGetGlobalAttributes(propsWithDefault);
16
17
  return /* @__PURE__ */ jsx(
17
18
  StyledWrapper,
18
19
  {
19
20
  innerRef: parentRef,
20
- "data-testid": LIST_DATA_TESTID.CONTAINER,
21
+ "data-testid": DSVirtualListDataTestIds.ROOT,
21
22
  role: "list",
22
23
  ...ownerPropsConfig,
24
+ ...globalAttributes,
23
25
  children: /* @__PURE__ */ jsx(StyledListWrapper, { height: totalSize, ...ownerPropsConfig, children: virtualItems.map((virtualItem) => {
24
26
  const { index, start, key } = virtualItem;
25
27
  return /* @__PURE__ */ jsx(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/List.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { LIST_DATA_TESTID } from '../VirtualListDataTestID.js';\nimport { useVirtualListV3 } from '../hooks/useVirtualList.js';\nimport type { DSVirtualListT } from '../react-desc-prop-types.js';\nimport { StyledWrapper, StyledListWrapper, StyledItemWrapper } from './styled.js';\n\nexport const List = (props: DSVirtualListT.Props) => {\n const { parentRef, getVirtualItems, filteredChildren, totalSize, instanceUid, measureElement, propsWithDefault } =\n useVirtualListV3(props);\n const virtualItems = getVirtualItems();\n const measureRef: React.LegacyRef<HTMLDivElement> = React.useCallback(\n (node: HTMLDivElement) => measureElement(node),\n [measureElement],\n );\n\n const ownerPropsConfig = useOwnerProps(propsWithDefault);\n\n return (\n <StyledWrapper\n key={instanceUid}\n innerRef={parentRef}\n data-testid={LIST_DATA_TESTID.CONTAINER}\n role=\"list\"\n {...ownerPropsConfig}\n >\n <StyledListWrapper height={totalSize} {...ownerPropsConfig}>\n {virtualItems.map((virtualItem) => {\n const { index, start, key } = virtualItem;\n return (\n <StyledItemWrapper\n innerRef={measureRef}\n data-index={index}\n start={start}\n role=\"listitem\"\n key={`${instanceUid}-item-${key}`}\n {...ownerPropsConfig}\n >\n {filteredChildren[index]}\n </StyledItemWrapper>\n );\n })}\n </StyledListWrapper>\n </StyledWrapper>\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;AC8BX;AA9BZ,OAAOA,YAAW;AAClB,SAAS,qBAAqB;AAC9B,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AAEjC,SAAS,eAAe,mBAAmB,yBAAyB;AAE7D,MAAM,OAAO,CAAC,UAAgC;AACnD,QAAM,EAAE,WAAW,iBAAiB,kBAAkB,WAAW,aAAa,gBAAgB,iBAAiB,IAC7G,iBAAiB,KAAK;AACxB,QAAM,eAAe,gBAAgB;AACrC,QAAM,aAA8CA,OAAM;AAAA,IACxD,CAAC,SAAyB,eAAe,IAAI;AAAA,IAC7C,CAAC,cAAc;AAAA,EACjB;AAEA,QAAM,mBAAmB,cAAc,gBAAgB;AAEvD,SACE;AAAA,IAAC;AAAA;AAAA,MAEC,UAAU;AAAA,MACV,eAAa,iBAAiB;AAAA,MAC9B,MAAK;AAAA,MACJ,GAAG;AAAA,MAEJ,8BAAC,qBAAkB,QAAQ,WAAY,GAAG,kBACvC,uBAAa,IAAI,CAAC,gBAAgB;AACjC,cAAM,EAAE,OAAO,OAAO,IAAI,IAAI;AAC9B,eACE;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV,cAAY;AAAA,YACZ;AAAA,YACA,MAAK;AAAA,YAEJ,GAAG;AAAA,YAEH,2BAAiB,KAAK;AAAA;AAAA,UAHlB,GAAG,WAAW,SAAS,GAAG;AAAA,QAIjC;AAAA,MAEJ,CAAC,GACH;AAAA;AAAA,IAtBK;AAAA,EAuBP;AAEJ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useOwnerProps, useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { DSVirtualListDataTestIds } from '../constants/index.js';\nimport { useVirtualListV3 } from '../hooks/useVirtualList.js';\nimport type { DSVirtualListT } from '../react-desc-prop-types.js';\nimport { StyledWrapper, StyledListWrapper, StyledItemWrapper } from './styled.js';\n\nexport const List = (props: DSVirtualListT.Props) => {\n const { parentRef, getVirtualItems, filteredChildren, totalSize, instanceUid, measureElement, propsWithDefault } =\n useVirtualListV3(props);\n const virtualItems = getVirtualItems();\n const measureRef: React.LegacyRef<HTMLDivElement> = React.useCallback(\n (node: HTMLDivElement) => measureElement(node),\n [measureElement],\n );\n\n const ownerPropsConfig = useOwnerProps(propsWithDefault);\n const globalAttributes = useGetGlobalAttributes(propsWithDefault);\n\n return (\n <StyledWrapper\n key={instanceUid}\n innerRef={parentRef}\n data-testid={DSVirtualListDataTestIds.ROOT}\n role=\"list\"\n {...ownerPropsConfig}\n {...globalAttributes}\n >\n <StyledListWrapper height={totalSize} {...ownerPropsConfig}>\n {virtualItems.map((virtualItem) => {\n const { index, start, key } = virtualItem;\n return (\n <StyledItemWrapper\n innerRef={measureRef}\n data-index={index}\n start={start}\n role=\"listitem\"\n key={`${instanceUid}-item-${key}`}\n {...ownerPropsConfig}\n >\n {filteredChildren[index]}\n </StyledItemWrapper>\n );\n })}\n </StyledListWrapper>\n </StyledWrapper>\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACgCX;AAhCZ,OAAOA,YAAW;AAClB,SAAS,eAAe,8BAA8B;AACtD,SAAS,gCAAgC;AACzC,SAAS,wBAAwB;AAEjC,SAAS,eAAe,mBAAmB,yBAAyB;AAE7D,MAAM,OAAO,CAAC,UAAgC;AACnD,QAAM,EAAE,WAAW,iBAAiB,kBAAkB,WAAW,aAAa,gBAAgB,iBAAiB,IAC7G,iBAAiB,KAAK;AACxB,QAAM,eAAe,gBAAgB;AACrC,QAAM,aAA8CA,OAAM;AAAA,IACxD,CAAC,SAAyB,eAAe,IAAI;AAAA,IAC7C,CAAC,cAAc;AAAA,EACjB;AAEA,QAAM,mBAAmB,cAAc,gBAAgB;AACvD,QAAM,mBAAmB,uBAAuB,gBAAgB;AAEhE,SACE;AAAA,IAAC;AAAA;AAAA,MAEC,UAAU;AAAA,MACV,eAAa,yBAAyB;AAAA,MACtC,MAAK;AAAA,MACJ,GAAG;AAAA,MACH,GAAG;AAAA,MAEJ,8BAAC,qBAAkB,QAAQ,WAAY,GAAG,kBACvC,uBAAa,IAAI,CAAC,gBAAgB;AACjC,cAAM,EAAE,OAAO,OAAO,IAAI,IAAI;AAC9B,eACE;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV,cAAY;AAAA,YACZ;AAAA,YACA,MAAK;AAAA,YAEJ,GAAG;AAAA,YAEH,2BAAiB,KAAK;AAAA;AAAA,UAHlB,GAAG,WAAW,SAAS,GAAG;AAAA,QAIjC;AAAA,MAEJ,CAAC,GACH;AAAA;AAAA,IAvBK;AAAA,EAwBP;AAEJ;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { styled } from "@elliemae/ds-system";
3
- import { DSVirtualListName, DSVirtualListSlots } from "../DSVirtualListDefinitions.js";
3
+ import { DSVirtualListName, DSVirtualListSlots } from "../constants/index.js";
4
4
  const StyledWrapper = styled("div", { name: DSVirtualListName, slot: DSVirtualListSlots.ROOT })`
5
5
  width: 100%;
6
6
  height: 100%;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/styled.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { DSVirtualListName, DSVirtualListSlots } from '../DSVirtualListDefinitions.js';\n\nexport const StyledWrapper = styled('div', { name: DSVirtualListName, slot: DSVirtualListSlots.ROOT })`\n width: 100%;\n height: 100%;\n padding-bottom: 0;\n overflow: auto;\n`;\n\nexport const StyledListWrapper = styled('div', { name: DSVirtualListName, slot: DSVirtualListSlots.LIST_WRAPPER })<{\n height: number;\n}>`\n width: 100%;\n height: ${({ height }) => `${height}px`};\n position: relative;\n`;\n\nexport const StyledItemWrapper = styled('div', { name: DSVirtualListName, slot: DSVirtualListSlots.ITEM_WRAPPER })<{\n start: number;\n}>`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n transform: ${({ start }) => `translateY(${start}px)`};\n`;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { DSVirtualListName, DSVirtualListSlots } from '../constants/index.js';\n\nexport const StyledWrapper = styled('div', { name: DSVirtualListName, slot: DSVirtualListSlots.ROOT })`\n width: 100%;\n height: 100%;\n padding-bottom: 0;\n overflow: auto;\n`;\n\nexport const StyledListWrapper = styled('div', { name: DSVirtualListName, slot: DSVirtualListSlots.LIST_WRAPPER })<{\n height: number;\n}>`\n width: 100%;\n height: ${({ height }) => `${height}px`};\n position: relative;\n`;\n\nexport const StyledItemWrapper = styled('div', { name: DSVirtualListName, slot: DSVirtualListSlots.ITEM_WRAPPER })<{\n start: number;\n}>`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n transform: ${({ start }) => `translateY(${start}px)`};\n`;\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,mBAAmB,0BAA0B;AAE/C,MAAM,gBAAgB,OAAO,OAAO,EAAE,MAAM,mBAAmB,MAAM,mBAAmB,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAO9F,MAAM,oBAAoB,OAAO,OAAO,EAAE,MAAM,mBAAmB,MAAM,mBAAmB,aAAa,CAAC;AAAA;AAAA,YAIrG,CAAC,EAAE,OAAO,MAAM,GAAG,MAAM,IAAI;AAAA;AAAA;AAIlC,MAAM,oBAAoB,OAAO,OAAO,EAAE,MAAM,mBAAmB,MAAM,mBAAmB,aAAa,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,eAOlG,CAAC,EAAE,MAAM,MAAM,cAAc,KAAK,KAAK;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,9 +1,10 @@
1
1
  import * as React from "react";
2
- import { PropTypes, getPropsPerSlotPropTypes } from "@elliemae/ds-props-helpers";
3
- import { DSVirtualListName, DSVirtualListSlots } from "./DSVirtualListDefinitions.js";
2
+ import { PropTypes, getPropsPerSlotPropTypes, globalAttributesPropTypes } from "@elliemae/ds-props-helpers";
3
+ import { DSVirtualListName, DSVirtualListSlots } from "./constants/index.js";
4
4
  const defaultProps = {};
5
5
  const DSVirtualListPropTypes = {
6
6
  ...getPropsPerSlotPropTypes(DSVirtualListName, DSVirtualListSlots),
7
+ ...globalAttributesPropTypes,
7
8
  children: PropTypes.arrayOf(PropTypes.node).description("Children list").isRequired,
8
9
  actionRef: PropTypes.shape({
9
10
  current: PropTypes.oneOfType([
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes } from '@elliemae/ds-props-helpers';\nimport { DSVirtualListName, DSVirtualListSlots } from './DSVirtualListDefinitions.js';\n\nexport declare namespace DSVirtualListT {\n type ScrollAlignment = 'start' | 'center' | 'end' | 'auto';\n type ScrollToOptions = {\n align: ScrollAlignment;\n };\n\n export type ActionRef = {\n scrollTo?: (index: number, options?: ScrollToOptions | undefined) => void;\n };\n export interface RequiredProps {\n children: React.ReactNode;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSVirtualListName,\n typeof DSVirtualListSlots\n > {\n actionRef: React.MutableRefObject<ActionRef>;\n }\n\n export interface Props extends Partial<DefaultProps>, OptionalProps, RequiredProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps, RequiredProps {}\n}\n\nexport const defaultProps: DSVirtualListT.DefaultProps = {};\n\nexport const DSVirtualListPropTypes = {\n ...getPropsPerSlotPropTypes(DSVirtualListName, DSVirtualListSlots),\n children: PropTypes.arrayOf(PropTypes.node).description('Children list').isRequired,\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} as React.WeakValidationMap<unknown>;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,WAAW,gCAAgC;AACpD,SAAS,mBAAmB,0BAA0B;AA6B/C,MAAM,eAA4C,CAAC;AAEnD,MAAM,yBAAyB;AAAA,EACpC,GAAG,yBAAyB,mBAAmB,kBAAkB;AAAA,EACjE,UAAU,UAAU,QAAQ,UAAU,IAAI,EAAE,YAAY,eAAe,EAAE;AAAA,EACzE,WAAW,UAAU,MAAM;AAAA,IACzB,SAAS,UAAU,UAAU;AAAA,MAC3B,UAAU,MAAM,CAAC,IAAI,CAAC;AAAA,MACtB,UAAU,MAAM;AAAA,QACd,UAAU,UAAU,KACjB,YAAY,mCAAmC,EAC/C,UAAU,2EAA2E;AAAA,MAC1F,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC,EAAE,YAAY,gDAAgD;AACjE;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport { DSVirtualListName, DSVirtualListSlots } from './constants/index.js';\n\nexport declare namespace DSVirtualListT {\n type ScrollAlignment = 'start' | 'center' | 'end' | 'auto';\n type ScrollToOptions = {\n align: ScrollAlignment;\n };\n\n export type ActionRef = {\n scrollTo?: (index: number, options?: ScrollToOptions | undefined) => void;\n };\n\n export type SlotFunctionArguments = {\n dsVirtuallistRoot: () => object;\n dsVirtuallistListWrapper: () => object;\n dsVirtuallistItemWrapper: () => object;\n };\n\n export interface RequiredProps {\n children: React.ReactNode;\n }\n\n export interface DefaultProps {}\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSVirtualListName,\n typeof DSVirtualListSlots\n > {\n actionRef?: React.MutableRefObject<ActionRef>;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof RequiredProps>,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof RequiredProps>,\n RequiredProps {}\n}\n\nexport const defaultProps: DSVirtualListT.DefaultProps = {};\n\nexport const DSVirtualListPropTypes = {\n ...getPropsPerSlotPropTypes(DSVirtualListName, DSVirtualListSlots),\n ...globalAttributesPropTypes,\n children: PropTypes.arrayOf(PropTypes.node).description('Children list').isRequired,\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} as React.WeakValidationMap<unknown>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,WAAW,0BAA0B,iCAAiC;AAC/E,SAAS,mBAAmB,0BAA0B;AA8C/C,MAAM,eAA4C,CAAC;AAEnD,MAAM,yBAAyB;AAAA,EACpC,GAAG,yBAAyB,mBAAmB,kBAAkB;AAAA,EACjE,GAAG;AAAA,EACH,UAAU,UAAU,QAAQ,UAAU,IAAI,EAAE,YAAY,eAAe,EAAE;AAAA,EACzE,WAAW,UAAU,MAAM;AAAA,IACzB,SAAS,UAAU,UAAU;AAAA,MAC3B,UAAU,MAAM,CAAC,IAAI,CAAC;AAAA,MACtB,UAAU,MAAM;AAAA,QACd,UAAU,UAAU,KACjB,YAAY,mCAAmC,EAC/C,UAAU,2EAA2E;AAAA,MAC1F,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC,EAAE,YAAY,gDAAgD;AACjE;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ const SlotPropsAsObject = {
3
+ dsVirtuallistRoot: { "aria-label": "just a typescript test" },
4
+ dsVirtuallistListWrapper: { "aria-label": "just a typescript test" },
5
+ dsVirtuallistItemWrapper: { "aria-label": "just a typescript test" }
6
+ };
7
+ const SlotPropsAsFunctions = {
8
+ dsVirtuallistRoot: () => ({ "aria-label": "just a typescript test" }),
9
+ dsVirtuallistListWrapper: () => ({ "aria-label": "just a typescript test" }),
10
+ dsVirtuallistItemWrapper: () => ({ "aria-label": "just a typescript test" })
11
+ };
12
+ const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
13
+ //# 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 { DSVirtualListName, DSVirtualListSlots } from '../constants/index.js';\nimport type { DSVirtualListT } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObject: Partial<DSVirtualListT.Props> = {\n dsVirtuallistRoot: { 'aria-label': 'just a typescript test' },\n dsVirtuallistListWrapper: { 'aria-label': 'just a typescript test' },\n dsVirtuallistItemWrapper: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSVirtualListT.SlotFunctionArguments = {\n dsVirtuallistRoot: () => ({ 'aria-label': 'just a typescript test' }),\n dsVirtuallistListWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsVirtuallistItemWrapper: () => ({ '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 DSVirtualListName, typeof DSVirtualListSlots>\n> = SlotPropsAsFunctions;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACMvB,MAAM,oBAAmD;AAAA,EACvD,mBAAmB,EAAE,cAAc,yBAAyB;AAAA,EAC5D,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,0BAA0B,EAAE,cAAc,yBAAyB;AACrE;AAEA,MAAM,uBAA6D;AAAA,EACjE,mBAAmB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACnE,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAC5E;AAGA,MAAM,6CAEF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,81 @@
1
+ import * as React from "react";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { DSVirtualList } from "../VirtualList.js";
4
+ const testRequiredProps = {
5
+ children: [/* @__PURE__ */ jsx("div", { children: "item 0" }, "0")]
6
+ };
7
+ const testOptionalProps = {};
8
+ const testPartialDefaults = {};
9
+ const testProps = {
10
+ ...testRequiredProps,
11
+ ...testOptionalProps,
12
+ ...testPartialDefaults
13
+ };
14
+ const testPropsAsSyntax = {
15
+ ...testRequiredProps,
16
+ ...testOptionalProps,
17
+ ...testPartialDefaults
18
+ };
19
+ const testCompleteDefaults = {};
20
+ const testInternalProps = {
21
+ ...testRequiredProps,
22
+ ...testOptionalProps,
23
+ ...testCompleteDefaults
24
+ };
25
+ const testInternalPropsAsSyntax = {
26
+ ...testRequiredProps,
27
+ ...testOptionalProps,
28
+ ...testCompleteDefaults
29
+ };
30
+ const actionRef = { current: {} };
31
+ const testExplicitDefinition = {
32
+ children: [/* @__PURE__ */ jsx("div", { children: "item 0" }, "0"), /* @__PURE__ */ jsx("div", { children: "item 1" }, "1")],
33
+ actionRef
34
+ };
35
+ const testInferredTypeCompatibility = {
36
+ children: [/* @__PURE__ */ jsx("div", { children: "item 0" }, "0"), /* @__PURE__ */ jsx("div", { children: "item 1" }, "1")],
37
+ actionRef
38
+ };
39
+ const testDefinitionAsConst = {
40
+ children: [/* @__PURE__ */ jsx("div", { children: "item 0" }, "0"), /* @__PURE__ */ jsx("div", { children: "item 1" }, "1")]
41
+ };
42
+ const testSlotPropsAsObject = {
43
+ children: [/* @__PURE__ */ jsx("div", { children: "item 0" }, "0")],
44
+ dsVirtuallistRoot: { "aria-label": "items list" },
45
+ dsVirtuallistListWrapper: { "aria-label": "items list wrapper" },
46
+ dsVirtuallistItemWrapper: { "aria-label": "item wrapper" }
47
+ };
48
+ const testGlobalAttributes = {
49
+ children: [/* @__PURE__ */ jsx("div", { children: "item 0" }, "0")],
50
+ className: "custom-class",
51
+ id: "custom-id",
52
+ "aria-label": "custom list"
53
+ };
54
+ const testSlotPropsAsFunctions = {
55
+ children: [/* @__PURE__ */ jsx("div", { children: "item 0" }, "0")],
56
+ dsVirtuallistRoot: () => ({ "aria-label": "items list" }),
57
+ dsVirtuallistListWrapper: () => ({ "aria-label": "items list wrapper" }),
58
+ dsVirtuallistItemWrapper: () => ({ "aria-label": "item wrapper" })
59
+ };
60
+ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
61
+ /* @__PURE__ */ jsx(DSVirtualList, { ...testExplicitDefinition }),
62
+ /* @__PURE__ */ jsx(DSVirtualList, { ...testInferredTypeCompatibility }),
63
+ /* @__PURE__ */ jsx(DSVirtualList, { ...testDefinitionAsConst }),
64
+ /* @__PURE__ */ jsx(DSVirtualList, { ...testSlotPropsAsObject }),
65
+ /* @__PURE__ */ jsx(DSVirtualList, { ...testSlotPropsAsFunctions }),
66
+ /* @__PURE__ */ jsx(DSVirtualList, { ...testGlobalAttributes }),
67
+ /* @__PURE__ */ jsx(DSVirtualList, { className: "custom-class", id: "custom-id", "aria-label": "custom list", "data-testid": "custom-testid", children: [/* @__PURE__ */ jsx("div", { children: "item 0" }, "0")] }),
68
+ /* @__PURE__ */ jsxs(DSVirtualList, { children: [
69
+ /* @__PURE__ */ jsx("div", { children: "item 0" }),
70
+ /* @__PURE__ */ jsx("div", { children: "item 1" })
71
+ ] }),
72
+ /* @__PURE__ */ jsxs(DSVirtualList, { actionRef, dsVirtuallistRoot: { tabIndex: 0 }, children: [
73
+ /* @__PURE__ */ jsx("div", { children: "item 0" }),
74
+ /* @__PURE__ */ jsx("div", { children: "item 1" })
75
+ ] })
76
+ ] });
77
+ var typescript_virtual_list_valid_default = ExampleUsageComponent;
78
+ export {
79
+ typescript_virtual_list_valid_default as default
80
+ };
81
+ //# sourceMappingURL=typescript-virtual-list-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-virtual-list-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n/* eslint-disable local-rules/custom-rule */\nimport React from 'react';\nimport { DSVirtualList } from '../VirtualList.js';\nimport type { DSVirtualListT } from '../react-desc-prop-types.js';\n\ntype ComponentPropsForApp = DSVirtualListT.Props;\ntype ComponentPropsInternals = DSVirtualListT.InternalProps;\ntype ComponentPropsDefaultProps = DSVirtualListT.DefaultProps;\ntype ComponentPropsOptionalProps = DSVirtualListT.OptionalProps;\ntype ComponentPropsRequiredProps = DSVirtualListT.RequiredProps;\n\n// NOTE: `children` is typed as `React.ReactNode` (accepts a single element or an array), but\n// `DSVirtualListPropTypes.children` is `PropTypes.arrayOf(PropTypes.node).isRequired` \u2014 stricter\n// than the TS type. A single non-array child compiles here but throws at runtime. Every example\n// below passes an array to match the real, enforced contract \u2014 not just what the type permits.\nconst testRequiredProps: ComponentPropsRequiredProps = {\n children: [<div key=\"0\">item 0</div>],\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {};\n\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {};\n\nconst testProps: ComponentPropsForApp = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testRequiredProps,\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// Example usages start here\nconst actionRef: React.MutableRefObject<DSVirtualListT.ActionRef> = { current: {} };\n\nconst testExplicitDefinition: ComponentPropsForApp = {\n children: [<div key=\"0\">item 0</div>, <div key=\"1\">item 1</div>],\n actionRef,\n};\n\nconst testInferredTypeCompatibility = {\n children: [<div key=\"0\">item 0</div>, <div key=\"1\">item 1</div>],\n actionRef,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n children: [<div key=\"0\">item 0</div>, <div key=\"1\">item 1</div>],\n} as const;\n\nconst testSlotPropsAsObject: ComponentPropsForApp = {\n children: [<div key=\"0\">item 0</div>],\n dsVirtuallistRoot: { 'aria-label': 'items list' },\n dsVirtuallistListWrapper: { 'aria-label': 'items list wrapper' },\n dsVirtuallistItemWrapper: { 'aria-label': 'item wrapper' },\n};\n\n// Global HTML/ARIA attributes (className, id, aria-*, data-*) work at runtime via\n// useGetGlobalAttributes in List.tsx \u2014 Props/InternalProps extend Omit<GlobalAttributesT<HTMLElement>, ...>\n// specifically so this compiles. Regression here means the type/runtime contract has drifted apart again.\nconst testGlobalAttributes: ComponentPropsForApp = {\n children: [<div key=\"0\">item 0</div>],\n className: 'custom-class',\n id: 'custom-id',\n 'aria-label': 'custom list',\n};\n\nconst testSlotPropsAsFunctions: ComponentPropsForApp = {\n children: [<div key=\"0\">item 0</div>],\n dsVirtuallistRoot: () => ({ 'aria-label': 'items list' }),\n dsVirtuallistListWrapper: () => ({ 'aria-label': 'items list wrapper' }),\n dsVirtuallistItemWrapper: () => ({ 'aria-label': 'item wrapper' }),\n};\n\nconst ExampleUsageComponent = () => (\n <>\n {/* Works with explicitly casted props */}\n <DSVirtualList {...testExplicitDefinition} />\n <DSVirtualList {...testInferredTypeCompatibility} />\n <DSVirtualList {...testDefinitionAsConst} />\n <DSVirtualList {...testSlotPropsAsObject} />\n <DSVirtualList {...testSlotPropsAsFunctions} />\n <DSVirtualList {...testGlobalAttributes} />\n\n {/* Inline props test \u2014 global HTML/ARIA attributes. Array child to match the real, enforced\n runtime contract \u2014 a single child here would compile but throw (see NOTE above). */}\n <DSVirtualList className=\"custom-class\" id=\"custom-id\" aria-label=\"custom list\" data-testid=\"custom-testid\">\n {[<div key=\"0\">item 0</div>]}\n </DSVirtualList>\n\n {/* Inline props test \u2014 required prop only. Two children so JSX itself produces an array;\n a single child here would compile (React.ReactNode) but throw at runtime (see NOTE above). */}\n <DSVirtualList>\n <div>item 0</div>\n <div>item 1</div>\n </DSVirtualList>\n\n {/* Inline props test \u2014 actionRef and slot props */}\n <DSVirtualList actionRef={actionRef} dsVirtuallistRoot={{ tabIndex: 0 }}>\n <div>item 0</div>\n <div>item 1</div>\n </DSVirtualList>\n </>\n);\n\nexport default ExampleUsageComponent;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACiBV,SA2EX,UA3EW,KA4FT,YA5FS;AAdb,SAAS,qBAAqB;AAa9B,MAAM,oBAAiD;AAAA,EACrD,UAAU,CAAC,oBAAC,SAAY,sBAAJ,GAAU,CAAM;AACtC;AAEA,MAAM,oBAAiD,CAAC;AAExD,MAAM,sBAA2D,CAAC;AAElE,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,uBAA6D,CAAC;AAEpE,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,YAA8D,EAAE,SAAS,CAAC,EAAE;AAElF,MAAM,yBAA+C;AAAA,EACnD,UAAU,CAAC,oBAAC,SAAY,sBAAJ,GAAU,GAAQ,oBAAC,SAAY,sBAAJ,GAAU,CAAM;AAAA,EAC/D;AACF;AAEA,MAAM,gCAAgC;AAAA,EACpC,UAAU,CAAC,oBAAC,SAAY,sBAAJ,GAAU,GAAQ,oBAAC,SAAY,sBAAJ,GAAU,CAAM;AAAA,EAC/D;AACF;AAEA,MAAM,wBAAwB;AAAA,EAC5B,UAAU,CAAC,oBAAC,SAAY,sBAAJ,GAAU,GAAQ,oBAAC,SAAY,sBAAJ,GAAU,CAAM;AACjE;AAEA,MAAM,wBAA8C;AAAA,EAClD,UAAU,CAAC,oBAAC,SAAY,sBAAJ,GAAU,CAAM;AAAA,EACpC,mBAAmB,EAAE,cAAc,aAAa;AAAA,EAChD,0BAA0B,EAAE,cAAc,qBAAqB;AAAA,EAC/D,0BAA0B,EAAE,cAAc,eAAe;AAC3D;AAKA,MAAM,uBAA6C;AAAA,EACjD,UAAU,CAAC,oBAAC,SAAY,sBAAJ,GAAU,CAAM;AAAA,EACpC,WAAW;AAAA,EACX,IAAI;AAAA,EACJ,cAAc;AAChB;AAEA,MAAM,2BAAiD;AAAA,EACrD,UAAU,CAAC,oBAAC,SAAY,sBAAJ,GAAU,CAAM;AAAA,EACpC,mBAAmB,OAAO,EAAE,cAAc,aAAa;AAAA,EACvD,0BAA0B,OAAO,EAAE,cAAc,qBAAqB;AAAA,EACtE,0BAA0B,OAAO,EAAE,cAAc,eAAe;AAClE;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,iBAAe,GAAG,wBAAwB;AAAA,EAC3C,oBAAC,iBAAe,GAAG,+BAA+B;AAAA,EAClD,oBAAC,iBAAe,GAAG,uBAAuB;AAAA,EAC1C,oBAAC,iBAAe,GAAG,uBAAuB;AAAA,EAC1C,oBAAC,iBAAe,GAAG,0BAA0B;AAAA,EAC7C,oBAAC,iBAAe,GAAG,sBAAsB;AAAA,EAIzC,oBAAC,iBAAc,WAAU,gBAAe,IAAG,aAAY,cAAW,eAAc,eAAY,iBACzF,WAAC,oBAAC,SAAY,sBAAJ,GAAU,CAAM,GAC7B;AAAA,EAIA,qBAAC,iBACC;AAAA,wBAAC,SAAI,oBAAM;AAAA,IACX,oBAAC,SAAI,oBAAM;AAAA,KACb;AAAA,EAGA,qBAAC,iBAAc,WAAsB,mBAAmB,EAAE,UAAU,EAAE,GACpE;AAAA,wBAAC,SAAI,oBAAM;AAAA,IACX,oBAAC,SAAI,oBAAM;AAAA,KACb;AAAA,GACF;AAGF,IAAO,wCAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,11 @@
1
+ export declare const DSVirtualListName = "DSVirtuallist";
2
+ export declare const DSVirtualListSlots: {
3
+ readonly ROOT: "root";
4
+ readonly LIST_WRAPPER: "list-wrapper";
5
+ readonly ITEM_WRAPPER: "item-wrapper";
6
+ };
7
+ export declare const DSVirtualListDataTestIds: {
8
+ ROOT: string;
9
+ LIST_WRAPPER: "ds-virtuallist-list-wrapper";
10
+ ITEM_WRAPPER: "ds-virtuallist-item-wrapper";
11
+ };
@@ -1,3 +1,3 @@
1
1
  export { type DSVirtualListT } from './react-desc-prop-types.js';
2
2
  export { DSVirtualList, DSVirtualListWithSchema } from './VirtualList.js';
3
- export { DSVirtualListName, DSVirtualListSlots } from './DSVirtualListDefinitions.js';
3
+ export { DSVirtualListName, DSVirtualListSlots, DSVirtualListDataTestIds } from './constants/index.js';
@@ -1,6 +1,7 @@
1
1
  import type React from 'react';
2
2
  import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
3
- import { DSVirtualListName, DSVirtualListSlots } from './DSVirtualListDefinitions.js';
3
+ import type { GlobalAttributesT } from '@elliemae/ds-props-helpers';
4
+ import { DSVirtualListName, DSVirtualListSlots } from './constants/index.js';
4
5
  export declare namespace DSVirtualListT {
5
6
  type ScrollAlignment = 'start' | 'center' | 'end' | 'auto';
6
7
  type ScrollToOptions = {
@@ -9,17 +10,22 @@ export declare namespace DSVirtualListT {
9
10
  type ActionRef = {
10
11
  scrollTo?: (index: number, options?: ScrollToOptions | undefined) => void;
11
12
  };
13
+ type SlotFunctionArguments = {
14
+ dsVirtuallistRoot: () => object;
15
+ dsVirtuallistListWrapper: () => object;
16
+ dsVirtuallistItemWrapper: () => object;
17
+ };
12
18
  interface RequiredProps {
13
19
  children: React.ReactNode;
14
20
  }
15
21
  interface DefaultProps {
16
22
  }
17
23
  interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSVirtualListName, typeof DSVirtualListSlots> {
18
- actionRef: React.MutableRefObject<ActionRef>;
24
+ actionRef?: React.MutableRefObject<ActionRef>;
19
25
  }
20
- interface Props extends Partial<DefaultProps>, OptionalProps, RequiredProps {
26
+ interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof RequiredProps>, RequiredProps {
21
27
  }
22
- interface InternalProps extends DefaultProps, OptionalProps, RequiredProps {
28
+ interface InternalProps extends DefaultProps, OptionalProps, Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof RequiredProps>, RequiredProps {
23
29
  }
24
30
  }
25
31
  export declare const defaultProps: DSVirtualListT.DefaultProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-virtual-list",
3
- "version": "3.80.0-next.2",
3
+ "version": "3.80.0-next.4",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Virtual List",
6
6
  "files": [
@@ -38,15 +38,16 @@
38
38
  "dependencies": {
39
39
  "@tanstack/react-virtual": "3.13.18",
40
40
  "uid": "^2.0.2",
41
- "@elliemae/ds-props-helpers": "3.80.0-next.2",
42
- "@elliemae/ds-system": "3.80.0-next.2",
43
- "@elliemae/ds-typescript-helpers": "3.80.0-next.2"
41
+ "@elliemae/ds-props-helpers": "3.80.0-next.4",
42
+ "@elliemae/ds-typescript-helpers": "3.80.0-next.4",
43
+ "@elliemae/ds-system": "3.80.0-next.4"
44
44
  },
45
45
  "devDependencies": {
46
+ "@playwright/experimental-ct-react": "1.61.1",
46
47
  "jest": "^30.0.0",
47
48
  "styled-components": "~5.3.11",
48
- "@elliemae/ds-monorepo-devops": "3.80.0-next.2",
49
- "@elliemae/ds-test-utils": "3.80.0-next.2"
49
+ "@elliemae/ds-monorepo-devops": "3.80.0-next.4",
50
+ "@elliemae/ds-test-utils": "3.80.0-next.4"
50
51
  },
51
52
  "peerDependencies": {
52
53
  "lodash-es": "^4.18.1",
@@ -59,7 +60,7 @@
59
60
  "typeSafety": true
60
61
  },
61
62
  "scripts": {
62
- "test": "ds-monorepo-devops test --passWithNoTests --coverage=\"false\"",
63
+ "test": "playwright test -c ./playwright.config.mjs && ds-monorepo-devops test --passWithNoTests --coverage=\"false\"",
63
64
  "lint": "node ../../../scripts/lint.mjs --fix",
64
65
  "lint:strict": "node ../../../scripts/lint-strict.mjs",
65
66
  "dts": "node ../../../scripts/dts.mjs",
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/DSVirtualListDefinitions.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const DSVirtualListName = 'DSVirtuallist';\n\nexport const DSVirtualListSlots = {\n ROOT: 'root',\n LIST_WRAPPER: 'list-wrapper',\n ITEM_WRAPPER: 'item-wrapper',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,oBAAoB;AAE1B,MAAM,qBAAqB;AAAA,EAChC,MAAM;AAAA,EACN,cAAc;AAAA,EACd,cAAc;AAChB;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/VirtualListDataTestID.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const LIST_DATA_TESTID = {\n CONTAINER: 'virtual-list-container',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,mBAAmB;AAAA,EAC9B,WAAW;AACb;",
6
- "names": []
7
- }
package/dist/cjs/props.js DELETED
@@ -1,58 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
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
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var props_exports = {};
30
- __export(props_exports, {
31
- DSVirtualListSchema: () => DSVirtualListSchema,
32
- defaultProps: () => defaultProps
33
- });
34
- module.exports = __toCommonJS(props_exports);
35
- var React = __toESM(require("react"));
36
- var import_lodash_es = require("lodash-es");
37
- var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
- const actionRef = {
39
- scrollTo: import_ds_props_helpers.PropTypes.func.description("Scroll to a index inside the list")
40
- };
41
- const DSVirtualListSchema = {
42
- children: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.node).description("Children list").defaultValue([]),
43
- actionRef: import_ds_props_helpers.PropTypes.shape({
44
- current: import_ds_props_helpers.PropTypes.shape(actionRef)
45
- }).description(`Action reference
46
-
47
- scrollTo: Function(index: number, { align: 'start' | 'center' | 'end' | 'auto' }) => void
48
- `)
49
- };
50
- const defaultProps = {
51
- children: [],
52
- actionRef: {
53
- current: {
54
- scrollTo: import_lodash_es.noop
55
- }
56
- }
57
- };
58
- //# sourceMappingURL=props.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/props.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { noop } from 'lodash-es';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\n\nconst actionRef = {\n scrollTo: PropTypes.func.description('Scroll to a index inside the list'),\n};\nexport const DSVirtualListSchema = {\n children: PropTypes.arrayOf(PropTypes.node).description('Children list').defaultValue([]),\n actionRef: PropTypes.shape({\n current: PropTypes.shape(actionRef),\n }).description(`Action reference\n \nscrollTo: Function(index: number, { align: 'start' | 'center' | 'end' | 'auto' }) => void\n `),\n};\n\nexport const defaultProps = {\n children: [],\n actionRef: {\n current: {\n scrollTo: noop,\n },\n },\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAqB;AACrB,8BAA0B;AAE1B,MAAM,YAAY;AAAA,EAChB,UAAU,kCAAU,KAAK,YAAY,mCAAmC;AAC1E;AACO,MAAM,sBAAsB;AAAA,EACjC,UAAU,kCAAU,QAAQ,kCAAU,IAAI,EAAE,YAAY,eAAe,EAAE,aAAa,CAAC,CAAC;AAAA,EACxF,WAAW,kCAAU,MAAM;AAAA,IACzB,SAAS,kCAAU,MAAM,SAAS;AAAA,EACpC,CAAC,EAAE,YAAY;AAAA;AAAA;AAAA,GAGd;AACH;AAEO,MAAM,eAAe;AAAA,EAC1B,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,IACT,SAAS;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,EACF;AACF;",
6
- "names": []
7
- }
@@ -1,12 +0,0 @@
1
- import * as React from "react";
2
- const DSVirtualListName = "DSVirtuallist";
3
- const DSVirtualListSlots = {
4
- ROOT: "root",
5
- LIST_WRAPPER: "list-wrapper",
6
- ITEM_WRAPPER: "item-wrapper"
7
- };
8
- export {
9
- DSVirtualListName,
10
- DSVirtualListSlots
11
- };
12
- //# sourceMappingURL=DSVirtualListDefinitions.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSVirtualListDefinitions.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSVirtualListName = 'DSVirtuallist';\n\nexport const DSVirtualListSlots = {\n ROOT: 'root',\n LIST_WRAPPER: 'list-wrapper',\n ITEM_WRAPPER: 'item-wrapper',\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,oBAAoB;AAE1B,MAAM,qBAAqB;AAAA,EAChC,MAAM;AAAA,EACN,cAAc;AAAA,EACd,cAAc;AAChB;",
6
- "names": []
7
- }
@@ -1,8 +0,0 @@
1
- import * as React from "react";
2
- const LIST_DATA_TESTID = {
3
- CONTAINER: "virtual-list-container"
4
- };
5
- export {
6
- LIST_DATA_TESTID
7
- };
8
- //# sourceMappingURL=VirtualListDataTestID.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/VirtualListDataTestID.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const LIST_DATA_TESTID = {\n CONTAINER: 'virtual-list-container',\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,mBAAmB;AAAA,EAC9B,WAAW;AACb;",
6
- "names": []
7
- }
package/dist/esm/props.js DELETED
@@ -1,28 +0,0 @@
1
- import * as React from "react";
2
- import { noop } from "lodash-es";
3
- import { PropTypes } from "@elliemae/ds-props-helpers";
4
- const actionRef = {
5
- scrollTo: PropTypes.func.description("Scroll to a index inside the list")
6
- };
7
- const DSVirtualListSchema = {
8
- children: PropTypes.arrayOf(PropTypes.node).description("Children list").defaultValue([]),
9
- actionRef: PropTypes.shape({
10
- current: PropTypes.shape(actionRef)
11
- }).description(`Action reference
12
-
13
- scrollTo: Function(index: number, { align: 'start' | 'center' | 'end' | 'auto' }) => void
14
- `)
15
- };
16
- const defaultProps = {
17
- children: [],
18
- actionRef: {
19
- current: {
20
- scrollTo: noop
21
- }
22
- }
23
- };
24
- export {
25
- DSVirtualListSchema,
26
- defaultProps
27
- };
28
- //# sourceMappingURL=props.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/props.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { noop } from 'lodash-es';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\n\nconst actionRef = {\n scrollTo: PropTypes.func.description('Scroll to a index inside the list'),\n};\nexport const DSVirtualListSchema = {\n children: PropTypes.arrayOf(PropTypes.node).description('Children list').defaultValue([]),\n actionRef: PropTypes.shape({\n current: PropTypes.shape(actionRef),\n }).description(`Action reference\n \nscrollTo: Function(index: number, { align: 'start' | 'center' | 'end' | 'auto' }) => void\n `),\n};\n\nexport const defaultProps = {\n children: [],\n actionRef: {\n current: {\n scrollTo: noop,\n },\n },\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAE1B,MAAM,YAAY;AAAA,EAChB,UAAU,UAAU,KAAK,YAAY,mCAAmC;AAC1E;AACO,MAAM,sBAAsB;AAAA,EACjC,UAAU,UAAU,QAAQ,UAAU,IAAI,EAAE,YAAY,eAAe,EAAE,aAAa,CAAC,CAAC;AAAA,EACxF,WAAW,UAAU,MAAM;AAAA,IACzB,SAAS,UAAU,MAAM,SAAS;AAAA,EACpC,CAAC,EAAE,YAAY;AAAA;AAAA;AAAA,GAGd;AACH;AAEO,MAAM,eAAe;AAAA,EAC1B,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,IACT,SAAS;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,EACF;AACF;",
6
- "names": []
7
- }
@@ -1,6 +0,0 @@
1
- export declare const DSVirtualListName = "DSVirtuallist";
2
- export declare const DSVirtualListSlots: {
3
- ROOT: string;
4
- LIST_WRAPPER: string;
5
- ITEM_WRAPPER: string;
6
- };
@@ -1,3 +0,0 @@
1
- export declare const LIST_DATA_TESTID: {
2
- CONTAINER: string;
3
- };
@@ -1,12 +0,0 @@
1
- export declare const DSVirtualListSchema: {
2
- children: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
3
- actionRef: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
4
- };
5
- export declare const defaultProps: {
6
- children: never[];
7
- actionRef: {
8
- current: {
9
- scrollTo: (...args: any[]) => void;
10
- };
11
- };
12
- };