@elliemae/ds-fast-list 3.28.1-rc.1 → 3.29.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,97 @@
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 __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var React = __toESM(require("react"));
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_react = require("react");
27
+ var import__ = require("../index.js");
28
+ const MockItemRenderer = ({ index }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {});
29
+ const actionRef = (0, import_react.createRef)();
30
+ const testRequiredProps = {
31
+ ItemRenderer: MockItemRenderer,
32
+ count: 0,
33
+ getId: (index) => ""
34
+ };
35
+ const testOptionalProps = {
36
+ actionRef,
37
+ extraItemProps: { foo: "bar" }
38
+ };
39
+ const testPartialDefaults = {};
40
+ const testProps = {
41
+ ...testRequiredProps,
42
+ ...testOptionalProps,
43
+ ...testPartialDefaults
44
+ };
45
+ const testPropsAsSyntax = {
46
+ ...testRequiredProps,
47
+ ...testOptionalProps,
48
+ ...testPartialDefaults
49
+ };
50
+ const testCompleteDefaults = {};
51
+ const testInternalProps = {
52
+ ...testRequiredProps,
53
+ ...testOptionalProps,
54
+ ...testCompleteDefaults
55
+ };
56
+ const testInternalPropsAsSyntax = {
57
+ ...testRequiredProps,
58
+ ...testOptionalProps,
59
+ ...testCompleteDefaults
60
+ };
61
+ const testExplicitDefinition = {
62
+ ItemRenderer: MockItemRenderer,
63
+ count: 0,
64
+ getId: (index) => "",
65
+ actionRef,
66
+ extraItemProps: { foo: "bar" }
67
+ };
68
+ const testInferedTypeCompatibility = {
69
+ ItemRenderer: MockItemRenderer,
70
+ count: 0,
71
+ getId: (index) => "",
72
+ actionRef,
73
+ extraItemProps: { foo: "bar" }
74
+ };
75
+ const testDefinitionAsConst = {
76
+ ItemRenderer: MockItemRenderer,
77
+ count: 0,
78
+ getId: (index) => "",
79
+ actionRef,
80
+ extraItemProps: { foo: "bar" }
81
+ };
82
+ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
83
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFastList, { ...testExplicitDefinition }),
84
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFastList, { ...testInferedTypeCompatibility }),
85
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFastList, { ...testDefinitionAsConst }),
86
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
87
+ import__.DSFastList,
88
+ {
89
+ ItemRenderer: MockItemRenderer,
90
+ count: 0,
91
+ getId: (index) => "",
92
+ actionRef,
93
+ extraItemProps: { foo: "bar" }
94
+ }
95
+ )
96
+ ] });
97
+ //# sourceMappingURL=typescript-fast-list-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-fast-list-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { type MutableRefObject, createRef } from 'react';\nimport { DSFastList } from '../index.js';\nimport type { DSFastListT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSFastListT.Props;\ntype ComponentPropsInternals = DSFastListT.InternalProps;\ntype ComponentPropsDefaultProps = DSFastListT.DefaultProps;\ntype ComponentPropsOptionalProps = DSFastListT.OptionalProps;\ntype ComponentPropsRequiredProps = DSFastListT.RequiredProps;\n\nconst MockItemRenderer = ({ index }: { index: number }) => <div></div>;\n\nconst actionRef = createRef() as MutableRefObject<{ scrollTo: (index: number) => void }>;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n ItemRenderer: MockItemRenderer,\n count: 0,\n getId: (index: number) => '',\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n actionRef: actionRef,\n extraItemProps: { foo: 'bar' },\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\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\n// InternalProps requires all defaults to be filled in\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// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n ItemRenderer: MockItemRenderer,\n count: 0,\n getId: (index: number) => '',\n actionRef: actionRef,\n extraItemProps: { foo: 'bar' },\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n ItemRenderer: MockItemRenderer,\n count: 0,\n getId: (index: number) => '',\n actionRef: actionRef,\n extraItemProps: { foo: 'bar' },\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n ItemRenderer: MockItemRenderer,\n count: 0,\n getId: (index: number) => '',\n actionRef: actionRef,\n extraItemProps: { foo: 'bar' },\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSFastList {...testExplicitDefinition} />\n <DSFastList {...testInferedTypeCompatibility} />\n <DSFastList {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSFastList\n ItemRenderer={MockItemRenderer}\n count={0}\n getId={(index: number) => ''}\n actionRef={actionRef}\n extraItemProps={{ foo: 'bar' }}\n />\n </>\n);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACYoC;AAX3D,mBAAiD;AACjD,eAA2B;AAU3B,MAAM,mBAAmB,CAAC,EAAE,MAAM,MAAyB,4CAAC,SAAI;AAEhE,MAAM,gBAAY,wBAAU;AAE5B,MAAM,oBAAiD;AAAA,EACrD,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,UAAkB;AAC5B;AAEA,MAAM,oBAAiD;AAAA,EACrD;AAAA,EACA,gBAAgB,EAAE,KAAK,MAAM;AAC/B;AAIA,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;AAGA,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,yBAA+C;AAAA,EACnD,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,UAAkB;AAAA,EAC1B;AAAA,EACA,gBAAgB,EAAE,KAAK,MAAM;AAC/B;AAGA,MAAM,+BAA+B;AAAA,EACnC,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,UAAkB;AAAA,EAC1B;AAAA,EACA,gBAAgB,EAAE,KAAK,MAAM;AAC/B;AAEA,MAAM,wBAAwB;AAAA,EAC5B,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,UAAkB;AAAA,EAC1B;AAAA,EACA,gBAAgB,EAAE,KAAK,MAAM;AAC/B;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,uBAAY,GAAG,wBAAwB;AAAA,EACxC,4CAAC,uBAAY,GAAG,8BAA8B;AAAA,EAC9C,4CAAC,uBAAY,GAAG,uBAAuB;AAAA,EAEvC;AAAA,IAAC;AAAA;AAAA,MACC,cAAc;AAAA,MACd,OAAO;AAAA,MACP,OAAO,CAAC,UAAkB;AAAA,MAC1B;AAAA,MACA,gBAAgB,EAAE,KAAK,MAAM;AAAA;AAAA,EAC/B;AAAA,GACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,74 @@
1
+ import * as React from "react";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { createRef } from "react";
4
+ import { DSFastList } from "../index.js";
5
+ const MockItemRenderer = ({ index }) => /* @__PURE__ */ jsx("div", {});
6
+ const actionRef = createRef();
7
+ const testRequiredProps = {
8
+ ItemRenderer: MockItemRenderer,
9
+ count: 0,
10
+ getId: (index) => ""
11
+ };
12
+ const testOptionalProps = {
13
+ actionRef,
14
+ extraItemProps: { foo: "bar" }
15
+ };
16
+ const testPartialDefaults = {};
17
+ const testProps = {
18
+ ...testRequiredProps,
19
+ ...testOptionalProps,
20
+ ...testPartialDefaults
21
+ };
22
+ const testPropsAsSyntax = {
23
+ ...testRequiredProps,
24
+ ...testOptionalProps,
25
+ ...testPartialDefaults
26
+ };
27
+ const testCompleteDefaults = {};
28
+ const testInternalProps = {
29
+ ...testRequiredProps,
30
+ ...testOptionalProps,
31
+ ...testCompleteDefaults
32
+ };
33
+ const testInternalPropsAsSyntax = {
34
+ ...testRequiredProps,
35
+ ...testOptionalProps,
36
+ ...testCompleteDefaults
37
+ };
38
+ const testExplicitDefinition = {
39
+ ItemRenderer: MockItemRenderer,
40
+ count: 0,
41
+ getId: (index) => "",
42
+ actionRef,
43
+ extraItemProps: { foo: "bar" }
44
+ };
45
+ const testInferedTypeCompatibility = {
46
+ ItemRenderer: MockItemRenderer,
47
+ count: 0,
48
+ getId: (index) => "",
49
+ actionRef,
50
+ extraItemProps: { foo: "bar" }
51
+ };
52
+ const testDefinitionAsConst = {
53
+ ItemRenderer: MockItemRenderer,
54
+ count: 0,
55
+ getId: (index) => "",
56
+ actionRef,
57
+ extraItemProps: { foo: "bar" }
58
+ };
59
+ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
60
+ /* @__PURE__ */ jsx(DSFastList, { ...testExplicitDefinition }),
61
+ /* @__PURE__ */ jsx(DSFastList, { ...testInferedTypeCompatibility }),
62
+ /* @__PURE__ */ jsx(DSFastList, { ...testDefinitionAsConst }),
63
+ /* @__PURE__ */ jsx(
64
+ DSFastList,
65
+ {
66
+ ItemRenderer: MockItemRenderer,
67
+ count: 0,
68
+ getId: (index) => "",
69
+ actionRef,
70
+ extraItemProps: { foo: "bar" }
71
+ }
72
+ )
73
+ ] });
74
+ //# sourceMappingURL=typescript-fast-list-valid.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-fast-list-valid.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { type MutableRefObject, createRef } from 'react';\nimport { DSFastList } from '../index.js';\nimport type { DSFastListT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSFastListT.Props;\ntype ComponentPropsInternals = DSFastListT.InternalProps;\ntype ComponentPropsDefaultProps = DSFastListT.DefaultProps;\ntype ComponentPropsOptionalProps = DSFastListT.OptionalProps;\ntype ComponentPropsRequiredProps = DSFastListT.RequiredProps;\n\nconst MockItemRenderer = ({ index }: { index: number }) => <div></div>;\n\nconst actionRef = createRef() as MutableRefObject<{ scrollTo: (index: number) => void }>;\n\nconst testRequiredProps: ComponentPropsRequiredProps = {\n ItemRenderer: MockItemRenderer,\n count: 0,\n getId: (index: number) => '',\n};\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n actionRef: actionRef,\n extraItemProps: { foo: 'bar' },\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\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\n// InternalProps requires all defaults to be filled in\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// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n ItemRenderer: MockItemRenderer,\n count: 0,\n getId: (index: number) => '',\n actionRef: actionRef,\n extraItemProps: { foo: 'bar' },\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n ItemRenderer: MockItemRenderer,\n count: 0,\n getId: (index: number) => '',\n actionRef: actionRef,\n extraItemProps: { foo: 'bar' },\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n ItemRenderer: MockItemRenderer,\n count: 0,\n getId: (index: number) => '',\n actionRef: actionRef,\n extraItemProps: { foo: 'bar' },\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSFastList {...testExplicitDefinition} />\n <DSFastList {...testInferedTypeCompatibility} />\n <DSFastList {...testDefinitionAsConst} />\n {/* works with inline values */}\n <DSFastList\n ItemRenderer={MockItemRenderer}\n count={0}\n getId={(index: number) => ''}\n actionRef={actionRef}\n extraItemProps={{ foo: 'bar' }}\n />\n </>\n);\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACYoC,SAyEzD,UAzEyD,KAyEzD,YAzEyD;AAX3D,SAAgC,iBAAiB;AACjD,SAAS,kBAAkB;AAU3B,MAAM,mBAAmB,CAAC,EAAE,MAAM,MAAyB,oBAAC,SAAI;AAEhE,MAAM,YAAY,UAAU;AAE5B,MAAM,oBAAiD;AAAA,EACrD,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,UAAkB;AAC5B;AAEA,MAAM,oBAAiD;AAAA,EACrD;AAAA,EACA,gBAAgB,EAAE,KAAK,MAAM;AAC/B;AAIA,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;AAGA,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,yBAA+C;AAAA,EACnD,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,UAAkB;AAAA,EAC1B;AAAA,EACA,gBAAgB,EAAE,KAAK,MAAM;AAC/B;AAGA,MAAM,+BAA+B;AAAA,EACnC,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,UAAkB;AAAA,EAC1B;AAAA,EACA,gBAAgB,EAAE,KAAK,MAAM;AAC/B;AAEA,MAAM,wBAAwB;AAAA,EAC5B,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,UAAkB;AAAA,EAC1B;AAAA,EACA,gBAAgB,EAAE,KAAK,MAAM;AAC/B;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,cAAY,GAAG,wBAAwB;AAAA,EACxC,oBAAC,cAAY,GAAG,8BAA8B;AAAA,EAC9C,oBAAC,cAAY,GAAG,uBAAuB;AAAA,EAEvC;AAAA,IAAC;AAAA;AAAA,MACC,cAAc;AAAA,MACd,OAAO;AAAA,MACP,OAAO,CAAC,UAAkB;AAAA,MAC1B;AAAA,MACA,gBAAgB,EAAE,KAAK,MAAM;AAAA;AAAA,EAC/B;AAAA,GACF;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-fast-list",
3
- "version": "3.28.1-rc.1",
3
+ "version": "3.29.0-next.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Virtual List",
6
6
  "files": [
@@ -63,14 +63,14 @@
63
63
  "@xstyled/system": "3.7.0",
64
64
  "axe-core": "^4.6.3",
65
65
  "uid": "^2.0.1",
66
- "@elliemae/ds-props-helpers": "3.28.1-rc.1",
67
- "@elliemae/ds-system": "3.28.1-rc.1"
66
+ "@elliemae/ds-props-helpers": "3.29.0-next.0",
67
+ "@elliemae/ds-system": "3.29.0-next.0"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@elliemae/pui-cli": "~9.0.0-next.31",
71
71
  "styled-components": "~5.3.9",
72
- "@elliemae/ds-monorepo-devops": "3.28.1-rc.1",
73
- "@elliemae/ds-test-utils": "3.28.1-rc.1"
72
+ "@elliemae/ds-test-utils": "3.29.0-next.0",
73
+ "@elliemae/ds-monorepo-devops": "3.29.0-next.0"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "lodash": "^4.17.21",
@@ -80,7 +80,7 @@
80
80
  },
81
81
  "publishConfig": {
82
82
  "access": "public",
83
- "typeSafety": false
83
+ "typeSafety": true
84
84
  },
85
85
  "scripts": {
86
86
  "test": "pui-cli test --passWithNoTests",