@elliemae/ds-fast-list 3.80.0-next.1 → 3.80.0-next.12
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.
- package/dist/cjs/FastList.js +2 -2
- package/dist/cjs/FastList.js.map +2 -2
- package/dist/cjs/{DSFastListDefinitions.js → constants/index.js} +6 -6
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/hooks/useValidateProps.js +2 -2
- package/dist/cjs/hooks/useValidateProps.js.map +2 -2
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/parts/List.js +7 -7
- package/dist/cjs/parts/List.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +3 -0
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/{FastListDataTestID.js → typescript-testing/slot-props.js} +11 -13
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/cjs/typescript-testing/typescript-fast-list-valid.js +23 -2
- package/dist/cjs/typescript-testing/typescript-fast-list-valid.js.map +2 -2
- package/dist/esm/FastList.js +1 -1
- package/dist/esm/FastList.js.map +1 -1
- package/dist/esm/{DSFastListDefinitions.js → constants/index.js} +3 -3
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/hooks/useValidateProps.js +1 -1
- package/dist/esm/hooks/useValidateProps.js.map +1 -1
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/parts/List.js +1 -1
- package/dist/esm/parts/List.js.map +1 -1
- package/dist/esm/react-desc-prop-types.js +4 -1
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +13 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/typescript-testing/typescript-fast-list-valid.js +23 -2
- package/dist/esm/typescript-testing/typescript-fast-list-valid.js.map +2 -2
- package/dist/types/constants/index.d.ts +11 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/react-desc-prop-types.d.ts +9 -3
- package/package.json +8 -7
- package/dist/cjs/DSFastListDefinitions.js.map +0 -7
- package/dist/cjs/FastListDataTestID.js.map +0 -7
- package/dist/esm/DSFastListDefinitions.js.map +0 -7
- package/dist/esm/FastListDataTestID.js +0 -8
- package/dist/esm/FastListDataTestID.js.map +0 -7
- package/dist/types/DSFastListDefinitions.d.ts +0 -11
- package/dist/types/FastListDataTestID.d.ts +0 -3
package/dist/cjs/FastList.js
CHANGED
|
@@ -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
|
|
40
|
+
var import_constants = require("./constants/index.js");
|
|
41
41
|
const DSFastList = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_List.List, { ...props });
|
|
42
|
-
DSFastList.displayName =
|
|
42
|
+
DSFastList.displayName = import_constants.DSFastListName;
|
|
43
43
|
const DSFastListWithSchema = (0, import_ds_props_helpers.describe)(DSFastList).description("DSFastList");
|
|
44
44
|
DSFastListWithSchema.propTypes = import_react_desc_prop_types.DSFastListPropTypes;
|
|
45
45
|
//# sourceMappingURL=FastList.js.map
|
package/dist/cjs/FastList.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/FastList.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { List } from './parts/List.js';\nimport { DSFastListPropTypes, type DSFastListT } from './react-desc-prop-types.js';\nimport { DSFastListName } from './
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADS+C;AARtE,8BAAyB;AACzB,kBAAqB;AACrB,mCAAsD;AACtD,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { List } from './parts/List.js';\nimport { DSFastListPropTypes, type DSFastListT } from './react-desc-prop-types.js';\nimport { DSFastListName } from './constants/index.js';\n\n// we create ds-fast-list to solve the issue with the children prop in ds-virtual-list\n// this packages use render props instead of children prop.\n// we are not using a context nor zustand so all the logic is handled in List...\nconst DSFastList = <T extends object>(props: DSFastListT.Props<T>) => <List {...props} />;\n\nDSFastList.displayName = DSFastListName;\nconst DSFastListWithSchema = describe(DSFastList).description('DSFastList');\nDSFastListWithSchema.propTypes = DSFastListPropTypes;\n\nexport { DSFastList, DSFastListWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADS+C;AARtE,8BAAyB;AACzB,kBAAqB;AACrB,mCAAsD;AACtD,uBAA+B;AAK/B,MAAM,aAAa,CAAmB,UAAgC,4CAAC,oBAAM,GAAG,OAAO;AAEvF,WAAW,cAAc;AACzB,MAAM,2BAAuB,kCAAS,UAAU,EAAE,YAAY,YAAY;AAC1E,qBAAqB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -26,13 +26,13 @@ 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
|
|
30
|
-
__export(
|
|
31
|
-
|
|
29
|
+
var constants_exports = {};
|
|
30
|
+
__export(constants_exports, {
|
|
31
|
+
DSFastListDataTestIds: () => DSFastListDataTestIds,
|
|
32
32
|
DSFastListName: () => DSFastListName,
|
|
33
33
|
DSFastListSlots: () => DSFastListSlots
|
|
34
34
|
});
|
|
35
|
-
module.exports = __toCommonJS(
|
|
35
|
+
module.exports = __toCommonJS(constants_exports);
|
|
36
36
|
var React = __toESM(require("react"));
|
|
37
37
|
var import_ds_system = require("@elliemae/ds-system");
|
|
38
38
|
const DSFastListName = "DSFastlist";
|
|
@@ -41,5 +41,5 @@ const DSFastListSlots = {
|
|
|
41
41
|
WRAPPER_LIST: "wrapper-list",
|
|
42
42
|
ITEM: "item"
|
|
43
43
|
};
|
|
44
|
-
const
|
|
45
|
-
//# sourceMappingURL=
|
|
44
|
+
const DSFastListDataTestIds = (0, import_ds_system.slotObjectToDataTestIds)(DSFastListName, DSFastListSlots);
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSFastListName = 'DSFastlist';\n\nexport const DSFastListSlots = {\n CONTAINER: 'container',\n WRAPPER_LIST: 'wrapper-list',\n ITEM: 'item',\n} as const;\n\nexport const DSFastListDataTestIds = slotObjectToDataTestIds(DSFastListName, DSFastListSlots);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,iBAAiB;AAEvB,MAAM,kBAAkB;AAAA,EAC7B,WAAW;AAAA,EACX,cAAc;AAAA,EACd,MAAM;AACR;AAEO,MAAM,4BAAwB,0CAAwB,gBAAgB,eAAe;",
|
|
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
|
|
36
|
+
var import_constants = require("../constants/index.js");
|
|
37
37
|
const useValidateProps = (props, propTypes) => {
|
|
38
|
-
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, propTypes,
|
|
38
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, propTypes, import_constants.DSFastListName);
|
|
39
39
|
};
|
|
40
40
|
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useValidateProps.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { type DSFastListT } from '../react-desc-prop-types.js';\nimport { DSFastListName } from '../
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAG/C,
|
|
4
|
+
"sourcesContent": ["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { type DSFastListT } from '../react-desc-prop-types.js';\nimport { DSFastListName } from '../constants/index.js';\n\nexport const useValidateProps = <T>(\n props: DSFastListT.InternalProps<T>,\n propTypes: WeakValidationMap<unknown>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSFastListName);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAG/C,uBAA+B;AAExB,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,8DAA+B,OAAO,WAAW,+BAAc;AACjE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -29,9 +29,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var index_exports = {};
|
|
30
30
|
__export(index_exports, {
|
|
31
31
|
DSFastList: () => import_FastList.DSFastList,
|
|
32
|
+
DSFastListDataTestIds: () => import_constants.DSFastListDataTestIds,
|
|
33
|
+
DSFastListName: () => import_constants.DSFastListName,
|
|
34
|
+
DSFastListSlots: () => import_constants.DSFastListSlots,
|
|
32
35
|
DSFastListWithSchema: () => import_FastList.DSFastListWithSchema
|
|
33
36
|
});
|
|
34
37
|
module.exports = __toCommonJS(index_exports);
|
|
35
38
|
var React = __toESM(require("react"));
|
|
36
39
|
var import_FastList = require("./FastList.js");
|
|
40
|
+
var import_constants = require("./constants/index.js");
|
|
37
41
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export { type DSFastListT } from './react-desc-prop-types.js';\nexport { DSFastList, DSFastListWithSchema } from './FastList.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,sBAAiD;",
|
|
4
|
+
"sourcesContent": ["export { type DSFastListT } from './react-desc-prop-types.js';\nexport { DSFastList, DSFastListWithSchema } from './FastList.js';\nexport { DSFastListName, DSFastListSlots, DSFastListDataTestIds } from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,sBAAiD;AACjD,uBAAuE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/parts/List.js
CHANGED
|
@@ -37,17 +37,17 @@ var import_react = __toESM(require("react"));
|
|
|
37
37
|
var import_ds_system = require("@elliemae/ds-system");
|
|
38
38
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
39
39
|
var import_useFastList = require("../hooks/useFastList.js");
|
|
40
|
-
var
|
|
40
|
+
var import_constants = require("../constants/index.js");
|
|
41
41
|
const StyledList = (0, import_ds_system.styled)("div", {
|
|
42
|
-
name:
|
|
43
|
-
slot:
|
|
42
|
+
name: import_constants.DSFastListName,
|
|
43
|
+
slot: import_constants.DSFastListSlots.WRAPPER_LIST
|
|
44
44
|
})`
|
|
45
45
|
width: 100%;
|
|
46
46
|
position: relative;
|
|
47
47
|
`;
|
|
48
48
|
const StyledListItem = (0, import_ds_system.styled)("div", {
|
|
49
|
-
name:
|
|
50
|
-
slot:
|
|
49
|
+
name: import_constants.DSFastListName,
|
|
50
|
+
slot: import_constants.DSFastListSlots.ITEM
|
|
51
51
|
})`
|
|
52
52
|
position: absolute;
|
|
53
53
|
top: 0;
|
|
@@ -55,8 +55,8 @@ const StyledListItem = (0, import_ds_system.styled)("div", {
|
|
|
55
55
|
width: 100%;
|
|
56
56
|
`;
|
|
57
57
|
const StyledListContainer = (0, import_ds_system.styled)("div", {
|
|
58
|
-
name:
|
|
59
|
-
slot:
|
|
58
|
+
name: import_constants.DSFastListName,
|
|
59
|
+
slot: import_constants.DSFastListSlots.CONTAINER
|
|
60
60
|
})`
|
|
61
61
|
overflow: auto;
|
|
62
62
|
width: 100%;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/List.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { useFastList } from '../hooks/useFastList.js';\nimport type { DSFastListT } from '../react-desc-prop-types.js';\nimport { DSFastListName, DSFastListSlots } from '../
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+ET;AA/Ed,mBAAmC;AACnC,uBAAuB;AACvB,8BAAuC;AACvC,yBAA4B;AAE5B,
|
|
4
|
+
"sourcesContent": ["import React, { useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { useFastList } from '../hooks/useFastList.js';\nimport type { DSFastListT } from '../react-desc-prop-types.js';\nimport { DSFastListName, DSFastListSlots } from '../constants/index.js';\n\nconst StyledList = styled('div', {\n name: DSFastListName,\n slot: DSFastListSlots.WRAPPER_LIST,\n})`\n width: 100%;\n position: relative;\n`;\n\nconst StyledListItem = styled('div', {\n name: DSFastListName,\n slot: DSFastListSlots.ITEM,\n})`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n`;\n\nconst StyledListContainer = styled('div', {\n name: DSFastListName,\n slot: DSFastListSlots.CONTAINER,\n})`\n overflow: auto;\n width: 100%;\n height: 100%;\n padding-bottom: 0;\n`;\n\nexport const List = <T extends object>(props: DSFastListT.Props<T>) => {\n const { parentRef, getVirtualItems, totalSize, instanceUid, measureElement } = useFastList(props);\n const { ItemRenderer, extraItemProps, getId } = props;\n\n const virtualItems = getVirtualItems();\n const measureRef: React.LegacyRef<HTMLDivElement> = React.useCallback(\n (node: HTMLDivElement) => measureElement(node),\n [measureElement],\n );\n\n const getOwnerProps = useCallback(() => props, [props]);\n const globalAttributes = useGetGlobalAttributes(props);\n\n return (\n <StyledListContainer\n innerRef={parentRef}\n // firefox needs this tabIndex to prevent scrolling\n tabIndex={-1}\n key={instanceUid}\n getOwnerProps={getOwnerProps}\n {...globalAttributes}\n >\n <StyledList\n style={{\n // we add up 0.5 to prevent the scrollbar from appearing in some cases\n height: `${totalSize + 0.5}px`,\n }}\n role=\"list\"\n getOwnerProps={getOwnerProps}\n >\n {virtualItems.map((virtualItem) => {\n const { index, start } = virtualItem;\n return (\n <StyledListItem\n innerRef={measureRef}\n data-index={index}\n style={{\n transform: `translateY(${start}px)`,\n }}\n role=\"listitem\"\n key={getId(index)}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={() => ({ index: getId(index) })}\n >\n <ItemRenderer extraItemProps={extraItemProps} index={index} />\n </StyledListItem>\n );\n })}\n </StyledList>\n </StyledListContainer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+ET;AA/Ed,mBAAmC;AACnC,uBAAuB;AACvB,8BAAuC;AACvC,yBAA4B;AAE5B,uBAAgD;AAEhD,MAAM,iBAAa,yBAAO,OAAO;AAAA,EAC/B,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAKD,MAAM,qBAAiB,yBAAO,OAAO;AAAA,EACnC,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOD,MAAM,0BAAsB,yBAAO,OAAO;AAAA,EACxC,MAAM;AAAA,EACN,MAAM,iCAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOM,MAAM,OAAO,CAAmB,UAAgC;AACrE,QAAM,EAAE,WAAW,iBAAiB,WAAW,aAAa,eAAe,QAAI,gCAAY,KAAK;AAChG,QAAM,EAAE,cAAc,gBAAgB,MAAM,IAAI;AAEhD,QAAM,eAAe,gBAAgB;AACrC,QAAM,aAA8C,aAAAA,QAAM;AAAA,IACxD,CAAC,SAAyB,eAAe,IAAI;AAAA,IAC7C,CAAC,cAAc;AAAA,EACjB;AAEA,QAAM,oBAAgB,0BAAY,MAAM,OAAO,CAAC,KAAK,CAAC;AACtD,QAAM,uBAAmB,gDAAuB,KAAK;AAErD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MAEV,UAAU;AAAA,MAEV;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,OAAO;AAAA;AAAA,YAEL,QAAQ,GAAG,YAAY,GAAG;AAAA,UAC5B;AAAA,UACA,MAAK;AAAA,UACL;AAAA,UAEC,uBAAa,IAAI,CAAC,gBAAgB;AACjC,kBAAM,EAAE,OAAO,MAAM,IAAI;AACzB,mBACE;AAAA,cAAC;AAAA;AAAA,gBACC,UAAU;AAAA,gBACV,cAAY;AAAA,gBACZ,OAAO;AAAA,kBACL,WAAW,cAAc,KAAK;AAAA,gBAChC;AAAA,gBACA,MAAK;AAAA,gBAEL;AAAA,gBACA,wBAAwB,OAAO,EAAE,OAAO,MAAM,KAAK,EAAE;AAAA,gBAErD,sDAAC,gBAAa,gBAAgC,OAAc;AAAA;AAAA,cAJvD,MAAM,KAAK;AAAA,YAKlB;AAAA,UAEJ,CAAC;AAAA;AAAA,MACH;AAAA;AAAA,IA9BK;AAAA,EA+BP;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -34,10 +34,13 @@ __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_constants = require("./constants/index.js");
|
|
37
38
|
const defaultProps = {
|
|
38
39
|
estimateSize: () => 36
|
|
39
40
|
};
|
|
40
41
|
const DSFastListPropTypes = {
|
|
42
|
+
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSFastListName, import_constants.DSFastListSlots),
|
|
43
|
+
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
41
44
|
actionRef: import_ds_props_helpers.PropTypes.shape({
|
|
42
45
|
current: import_ds_props_helpers.PropTypes.oneOfType([
|
|
43
46
|
import_ds_props_helpers.PropTypes.oneOf([null]),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type React from 'react';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type React from 'react';\nimport { DSFastListName, DSFastListSlots } from './constants/index.js';\n\nexport declare namespace DSFastListT {\n type ScrollAlignment = 'start' | 'center' | 'end' | 'auto';\n export 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 dsFastlistContainer: () => object;\n dsFastlistWrapperList: () => object;\n dsFastlistItem: () => object;\n };\n\n export interface OptionalProps<ExtraItemPropsT> extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSFastListName,\n typeof DSFastListSlots\n > {\n actionRef?: React.MutableRefObject<ActionRef>;\n extraItemProps?: ExtraItemPropsT;\n }\n\n export interface RequiredProps<ExtraItemPropsT> {\n ItemRenderer: React.ComponentType<{ index: number; extraItemProps?: ExtraItemPropsT }>;\n count: number;\n getId: (index: number) => string | number;\n }\n\n export interface DefaultProps {\n estimateSize: () => number;\n }\n\n type PropsT<D, R, O> = Partial<D> & R & O & Omit<GlobalAttributesT<HTMLElement>, keyof D | keyof R>;\n type InternalPropsT<D, R, O> = D & R & O & Omit<GlobalAttributesT<HTMLElement>, keyof D | keyof R>;\n\n export type Props<ExtraItemPropsT> = PropsT<\n DefaultProps,\n RequiredProps<ExtraItemPropsT>,\n OptionalProps<ExtraItemPropsT>\n >;\n export type InternalProps<ExtraItemPropsT> = InternalPropsT<\n DefaultProps,\n RequiredProps<ExtraItemPropsT>,\n OptionalProps<ExtraItemPropsT>\n >;\n}\n\nexport const defaultProps = {\n estimateSize: () => 36,\n};\n\nexport const DSFastListPropTypes = {\n ...getPropsPerSlotPropTypes(DSFastListName, DSFastListSlots),\n ...globalAttributesPropTypes,\n actionRef: PropTypes.shape({\n current: PropTypes.oneOfType([\n PropTypes.oneOf([null]),\n PropTypes.shape({\n scrollTo: PropTypes.func\n .description('Scroll to a index inside the list')\n .signature(`((index: number, { align: 'start' | 'center' | 'end' | 'auto' }) => void)`),\n }),\n ]),\n }).description(`mutable reference where methods will be stored`),\n ItemRenderer: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired.description(\n 'Render function for each item',\n ),\n count: PropTypes.number.isRequired.description('Number of items to render'),\n extraItemProps: PropTypes.object.description('Extra props to pass to each item'),\n getId: PropTypes.func.isRequired.description('Function to get the key for each item'),\n estimateSize: PropTypes.func.description('Function to estimate the size of each item'),\n} as React.WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA+E;AAG/E,uBAAgD;AAmDzC,MAAM,eAAe;AAAA,EAC1B,cAAc,MAAM;AACtB;AAEO,MAAM,sBAAsB;AAAA,EACjC,OAAG,kDAAyB,iCAAgB,gCAAe;AAAA,EAC3D,GAAG;AAAA,EACH,WAAW,kCAAU,MAAM;AAAA,IACzB,SAAS,kCAAU,UAAU;AAAA,MAC3B,kCAAU,MAAM,CAAC,IAAI,CAAC;AAAA,MACtB,kCAAU,MAAM;AAAA,QACd,UAAU,kCAAU,KACjB,YAAY,mCAAmC,EAC/C,UAAU,2EAA2E;AAAA,MAC1F,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC,EAAE,YAAY,gDAAgD;AAAA,EAC/D,cAAc,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,IAAI,CAAC,EAAE,WAAW;AAAA,IAC/E;AAAA,EACF;AAAA,EACA,OAAO,kCAAU,OAAO,WAAW,YAAY,2BAA2B;AAAA,EAC1E,gBAAgB,kCAAU,OAAO,YAAY,kCAAkC;AAAA,EAC/E,OAAO,kCAAU,KAAK,WAAW,YAAY,uCAAuC;AAAA,EACpF,cAAc,kCAAU,KAAK,YAAY,4CAA4C;AACvF;",
|
|
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 FastListDataTestID_exports = {};
|
|
30
|
-
__export(FastListDataTestID_exports, {
|
|
31
|
-
LIST_DATA_TESTID: () => LIST_DATA_TESTID
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(FastListDataTestID_exports);
|
|
34
24
|
var React = __toESM(require("react"));
|
|
35
|
-
const
|
|
36
|
-
|
|
25
|
+
const SlotPropsAsObject = {
|
|
26
|
+
dsFastlistContainer: { "aria-label": "just a typescript test" },
|
|
27
|
+
dsFastlistWrapperList: { "aria-label": "just a typescript test" },
|
|
28
|
+
dsFastlistItem: { "aria-label": "just a typescript test" }
|
|
29
|
+
};
|
|
30
|
+
const SlotPropsAsFunctions = {
|
|
31
|
+
dsFastlistContainer: () => ({ "aria-label": "just a typescript test" }),
|
|
32
|
+
dsFastlistWrapperList: () => ({ "aria-label": "just a typescript test" }),
|
|
33
|
+
dsFastlistItem: () => ({ "aria-label": "just a typescript test" })
|
|
37
34
|
};
|
|
38
|
-
|
|
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 { DSFastListName, DSFastListSlots } from '../constants/index.js';\nimport type { DSFastListT } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObject: Partial<DSFastListT.OptionalProps<object>> = {\n dsFastlistContainer: { 'aria-label': 'just a typescript test' },\n dsFastlistWrapperList: { 'aria-label': 'just a typescript test' },\n dsFastlistItem: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSFastListT.SlotFunctionArguments = {\n dsFastlistContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsFastlistWrapperList: () => ({ 'aria-label': 'just a typescript test' }),\n dsFastlistItem: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSFastListName, typeof DSFastListSlots>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACMvB,MAAM,oBAAgE;AAAA,EACpE,qBAAqB,EAAE,cAAc,yBAAyB;AAAA,EAC9D,uBAAuB,EAAE,cAAc,yBAAyB;AAAA,EAChE,gBAAgB,EAAE,cAAc,yBAAyB;AAC3D;AAEA,MAAM,uBAA0D;AAAA,EAC9D,qBAAqB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACrE,uBAAuB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACvE,gBAAgB,OAAO,EAAE,cAAc,yBAAyB;AAClE;AAGA,MAAM,6CAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -69,7 +69,7 @@ const testExplicitDefinition = {
|
|
|
69
69
|
actionRef,
|
|
70
70
|
extraItemProps: { data }
|
|
71
71
|
};
|
|
72
|
-
const
|
|
72
|
+
const testInferredTypeCompatibility = {
|
|
73
73
|
ItemRenderer: MockItemRenderer,
|
|
74
74
|
count: 0,
|
|
75
75
|
getId: (index) => "",
|
|
@@ -83,10 +83,19 @@ const testDefinitionAsConst = {
|
|
|
83
83
|
actionRef,
|
|
84
84
|
extraItemProps: { foo: "bar" }
|
|
85
85
|
};
|
|
86
|
+
const testGlobalAttributes = {
|
|
87
|
+
ItemRenderer: MockItemRenderer,
|
|
88
|
+
count: 0,
|
|
89
|
+
getId: (index) => "",
|
|
90
|
+
className: "custom-class",
|
|
91
|
+
id: "custom-id",
|
|
92
|
+
"aria-label": "custom list"
|
|
93
|
+
};
|
|
86
94
|
const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
87
95
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFastList, { ...testExplicitDefinition }),
|
|
88
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFastList, { ...
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFastList, { ...testInferredTypeCompatibility }),
|
|
89
97
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFastList, { ...testDefinitionAsConst }),
|
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DSFastList, { ...testGlobalAttributes }),
|
|
90
99
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
91
100
|
import__.DSFastList,
|
|
92
101
|
{
|
|
@@ -96,6 +105,18 @@ const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)
|
|
|
96
105
|
actionRef,
|
|
97
106
|
extraItemProps: { foo: "bar" }
|
|
98
107
|
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
110
|
+
import__.DSFastList,
|
|
111
|
+
{
|
|
112
|
+
className: "custom-class",
|
|
113
|
+
id: "custom-id",
|
|
114
|
+
"aria-label": "custom list",
|
|
115
|
+
"data-testid": "custom-testid",
|
|
116
|
+
ItemRenderer: MockItemRenderer,
|
|
117
|
+
count: 0,
|
|
118
|
+
getId: (index) => ""
|
|
119
|
+
}
|
|
99
120
|
)
|
|
100
121
|
] });
|
|
101
122
|
//# sourceMappingURL=typescript-fast-list-valid.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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\nconst data = [1, 2, 3];\nconst extraProps = { data };\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSFastListT.Props<typeof extraProps>;\ntype ComponentPropsInternals = DSFastListT.InternalProps<typeof extraProps>;\ntype ComponentPropsDefaultProps = DSFastListT.DefaultProps;\ntype ComponentPropsOptionalProps = DSFastListT.OptionalProps<typeof extraProps>;\ntype ComponentPropsRequiredProps = DSFastListT.RequiredProps<typeof extraProps>;\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,\n extraItemProps: { data },\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 estimateSize: () => 36,\n};\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,\n extraItemProps: { data },\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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACcoC;AAb3D,mBAAiD;AACjD,eAA2B;AAG3B,MAAM,OAAO,CAAC,GAAG,GAAG,CAAC;AACrB,MAAM,aAAa,EAAE,KAAK;AAQ1B,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;AACzB;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;AAAA,EACjE,cAAc,MAAM;AACtB;AAEA,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;AACzB;AAGA,MAAM
|
|
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\nconst data = [1, 2, 3];\nconst extraProps = { data };\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSFastListT.Props<typeof extraProps>;\ntype ComponentPropsInternals = DSFastListT.InternalProps<typeof extraProps>;\ntype ComponentPropsDefaultProps = DSFastListT.DefaultProps;\ntype ComponentPropsOptionalProps = DSFastListT.OptionalProps<typeof extraProps>;\ntype ComponentPropsRequiredProps = DSFastListT.RequiredProps<typeof extraProps>;\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,\n extraItemProps: { data },\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 estimateSize: () => 36,\n};\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,\n extraItemProps: { data },\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 testInferredTypeCompatibility = {\n ItemRenderer: MockItemRenderer,\n count: 0,\n getId: (index: number) => '',\n actionRef,\n extraItemProps: { data },\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n ItemRenderer: MockItemRenderer,\n count: 0,\n getId: (index: number) => '',\n actionRef,\n extraItemProps: { foo: 'bar' },\n} as const;\n\n// Global HTML/ARIA attributes (className, id, aria-*, data-*) work at runtime via\n// useGetGlobalAttributes in List.tsx \u2014 PropsT/InternalPropsT intersect with\n// Omit<GlobalAttributesT<HTMLElement>, ...> specifically so this compiles. Regression here means\n// the type/runtime contract has drifted apart again.\nconst testGlobalAttributes: ComponentPropsForApp = {\n ItemRenderer: MockItemRenderer,\n count: 0,\n getId: (index: number) => '',\n className: 'custom-class',\n id: 'custom-id',\n 'aria-label': 'custom list',\n};\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSFastList {...testExplicitDefinition} />\n <DSFastList {...testInferredTypeCompatibility} />\n <DSFastList {...testDefinitionAsConst} />\n <DSFastList {...testGlobalAttributes} />\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 {/* Inline props test \u2014 global HTML/ARIA attributes */}\n <DSFastList\n className=\"custom-class\"\n id=\"custom-id\"\n aria-label=\"custom list\"\n data-testid=\"custom-testid\"\n ItemRenderer={MockItemRenderer}\n count={0}\n getId={(index: number) => ''}\n />\n </>\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACcoC;AAb3D,mBAAiD;AACjD,eAA2B;AAG3B,MAAM,OAAO,CAAC,GAAG,GAAG,CAAC;AACrB,MAAM,aAAa,EAAE,KAAK;AAQ1B,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;AACzB;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;AAAA,EACjE,cAAc,MAAM;AACtB;AAEA,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;AACzB;AAGA,MAAM,gCAAgC;AAAA,EACpC,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,UAAkB;AAAA,EAC1B;AAAA,EACA,gBAAgB,EAAE,KAAK;AACzB;AAEA,MAAM,wBAAwB;AAAA,EAC5B,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,UAAkB;AAAA,EAC1B;AAAA,EACA,gBAAgB,EAAE,KAAK,MAAM;AAC/B;AAMA,MAAM,uBAA6C;AAAA,EACjD,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,UAAkB;AAAA,EAC1B,WAAW;AAAA,EACX,IAAI;AAAA,EACJ,cAAc;AAChB;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,uBAAY,GAAG,wBAAwB;AAAA,EACxC,4CAAC,uBAAY,GAAG,+BAA+B;AAAA,EAC/C,4CAAC,uBAAY,GAAG,uBAAuB;AAAA,EACvC,4CAAC,uBAAY,GAAG,sBAAsB;AAAA,EAEtC;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,EAEA;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,IAAG;AAAA,MACH,cAAW;AAAA,MACX,eAAY;AAAA,MACZ,cAAc;AAAA,MACd,OAAO;AAAA,MACP,OAAO,CAAC,UAAkB;AAAA;AAAA,EAC5B;AAAA,GACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/FastList.js
CHANGED
|
@@ -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 { DSFastListPropTypes } from "./react-desc-prop-types.js";
|
|
6
|
-
import { DSFastListName } from "./
|
|
6
|
+
import { DSFastListName } from "./constants/index.js";
|
|
7
7
|
const DSFastList = (props) => /* @__PURE__ */ jsx(List, { ...props });
|
|
8
8
|
DSFastList.displayName = DSFastListName;
|
|
9
9
|
const DSFastListWithSchema = describe(DSFastList).description("DSFastList");
|
package/dist/esm/FastList.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/FastList.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 { DSFastListPropTypes, type DSFastListT } from './react-desc-prop-types.js';\nimport { DSFastListName } from './
|
|
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 { DSFastListPropTypes, type DSFastListT } from './react-desc-prop-types.js';\nimport { DSFastListName } from './constants/index.js';\n\n// we create ds-fast-list to solve the issue with the children prop in ds-virtual-list\n// this packages use render props instead of children prop.\n// we are not using a context nor zustand so all the logic is handled in List...\nconst DSFastList = <T extends object>(props: DSFastListT.Props<T>) => <List {...props} />;\n\nDSFastList.displayName = DSFastListName;\nconst DSFastListWithSchema = describe(DSFastList).description('DSFastList');\nDSFastListWithSchema.propTypes = DSFastListPropTypes;\n\nexport { DSFastList, DSFastListWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACS+C;AARtE,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,2BAA6C;AACtD,SAAS,sBAAsB;AAK/B,MAAM,aAAa,CAAmB,UAAgC,oBAAC,QAAM,GAAG,OAAO;AAEvF,WAAW,cAAc;AACzB,MAAM,uBAAuB,SAAS,UAAU,EAAE,YAAY,YAAY;AAC1E,qBAAqB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -6,10 +6,10 @@ const DSFastListSlots = {
|
|
|
6
6
|
WRAPPER_LIST: "wrapper-list",
|
|
7
7
|
ITEM: "item"
|
|
8
8
|
};
|
|
9
|
-
const
|
|
9
|
+
const DSFastListDataTestIds = slotObjectToDataTestIds(DSFastListName, DSFastListSlots);
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
DSFastListDataTestIds,
|
|
12
12
|
DSFastListName,
|
|
13
13
|
DSFastListSlots
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=
|
|
15
|
+
//# 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 DSFastListName = 'DSFastlist';\n\nexport const DSFastListSlots = {\n CONTAINER: 'container',\n WRAPPER_LIST: 'wrapper-list',\n ITEM: 'item',\n} as const;\n\nexport const DSFastListDataTestIds = slotObjectToDataTestIds(DSFastListName, DSFastListSlots);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,iBAAiB;AAEvB,MAAM,kBAAkB;AAAA,EAC7B,WAAW;AAAA,EACX,cAAc;AAAA,EACd,MAAM;AACR;AAEO,MAAM,wBAAwB,wBAAwB,gBAAgB,eAAe;",
|
|
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 { DSFastListName } from "../
|
|
3
|
+
import { DSFastListName } from "../constants/index.js";
|
|
4
4
|
const useValidateProps = (props, propTypes) => {
|
|
5
5
|
useValidateTypescriptPropTypes(props, propTypes, DSFastListName);
|
|
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 DSFastListT } from '../react-desc-prop-types.js';\nimport { DSFastListName } from '../
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { type DSFastListT } from '../react-desc-prop-types.js';\nimport { DSFastListName } from '../constants/index.js';\n\nexport const useValidateProps = <T>(\n props: DSFastListT.InternalProps<T>,\n propTypes: WeakValidationMap<unknown>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSFastListName);\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAG/C,SAAS,sBAAsB;AAExB,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,iCAA+B,OAAO,WAAW,cAAc;AACjE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { DSFastList, DSFastListWithSchema } from "./FastList.js";
|
|
3
|
+
import { DSFastListName, DSFastListSlots, DSFastListDataTestIds } from "./constants/index.js";
|
|
3
4
|
export {
|
|
4
5
|
DSFastList,
|
|
6
|
+
DSFastListDataTestIds,
|
|
7
|
+
DSFastListName,
|
|
8
|
+
DSFastListSlots,
|
|
5
9
|
DSFastListWithSchema
|
|
6
10
|
};
|
|
7
11
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -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 DSFastListT } from './react-desc-prop-types.js';\nexport { DSFastList, DSFastListWithSchema } from './FastList.js';\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,YAAY,4BAA4B;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { type DSFastListT } from './react-desc-prop-types.js';\nexport { DSFastList, DSFastListWithSchema } from './FastList.js';\nexport { DSFastListName, DSFastListSlots, DSFastListDataTestIds } from './constants/index.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,YAAY,4BAA4B;AACjD,SAAS,gBAAgB,iBAAiB,6BAA6B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/parts/List.js
CHANGED
|
@@ -4,7 +4,7 @@ import React2, { useCallback } from "react";
|
|
|
4
4
|
import { styled } from "@elliemae/ds-system";
|
|
5
5
|
import { useGetGlobalAttributes } from "@elliemae/ds-props-helpers";
|
|
6
6
|
import { useFastList } from "../hooks/useFastList.js";
|
|
7
|
-
import { DSFastListName, DSFastListSlots } from "../
|
|
7
|
+
import { DSFastListName, DSFastListSlots } from "../constants/index.js";
|
|
8
8
|
const StyledList = styled("div", {
|
|
9
9
|
name: DSFastListName,
|
|
10
10
|
slot: DSFastListSlots.WRAPPER_LIST
|
|
@@ -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, { useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { useFastList } from '../hooks/useFastList.js';\nimport type { DSFastListT } from '../react-desc-prop-types.js';\nimport { DSFastListName, DSFastListSlots } from '../
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback } from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { useFastList } from '../hooks/useFastList.js';\nimport type { DSFastListT } from '../react-desc-prop-types.js';\nimport { DSFastListName, DSFastListSlots } from '../constants/index.js';\n\nconst StyledList = styled('div', {\n name: DSFastListName,\n slot: DSFastListSlots.WRAPPER_LIST,\n})`\n width: 100%;\n position: relative;\n`;\n\nconst StyledListItem = styled('div', {\n name: DSFastListName,\n slot: DSFastListSlots.ITEM,\n})`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n`;\n\nconst StyledListContainer = styled('div', {\n name: DSFastListName,\n slot: DSFastListSlots.CONTAINER,\n})`\n overflow: auto;\n width: 100%;\n height: 100%;\n padding-bottom: 0;\n`;\n\nexport const List = <T extends object>(props: DSFastListT.Props<T>) => {\n const { parentRef, getVirtualItems, totalSize, instanceUid, measureElement } = useFastList(props);\n const { ItemRenderer, extraItemProps, getId } = props;\n\n const virtualItems = getVirtualItems();\n const measureRef: React.LegacyRef<HTMLDivElement> = React.useCallback(\n (node: HTMLDivElement) => measureElement(node),\n [measureElement],\n );\n\n const getOwnerProps = useCallback(() => props, [props]);\n const globalAttributes = useGetGlobalAttributes(props);\n\n return (\n <StyledListContainer\n innerRef={parentRef}\n // firefox needs this tabIndex to prevent scrolling\n tabIndex={-1}\n key={instanceUid}\n getOwnerProps={getOwnerProps}\n {...globalAttributes}\n >\n <StyledList\n style={{\n // we add up 0.5 to prevent the scrollbar from appearing in some cases\n height: `${totalSize + 0.5}px`,\n }}\n role=\"list\"\n getOwnerProps={getOwnerProps}\n >\n {virtualItems.map((virtualItem) => {\n const { index, start } = virtualItem;\n return (\n <StyledListItem\n innerRef={measureRef}\n data-index={index}\n style={{\n transform: `translateY(${start}px)`,\n }}\n role=\"listitem\"\n key={getId(index)}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={() => ({ index: getId(index) })}\n >\n <ItemRenderer extraItemProps={extraItemProps} index={index} />\n </StyledListItem>\n );\n })}\n </StyledList>\n </StyledListContainer>\n );\n};\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;AC+ET;AA/Ed,OAAOA,UAAS,mBAAmB;AACnC,SAAS,cAAc;AACvB,SAAS,8BAA8B;AACvC,SAAS,mBAAmB;AAE5B,SAAS,gBAAgB,uBAAuB;AAEhD,MAAM,aAAa,OAAO,OAAO;AAAA,EAC/B,MAAM;AAAA,EACN,MAAM,gBAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAKD,MAAM,iBAAiB,OAAO,OAAO;AAAA,EACnC,MAAM;AAAA,EACN,MAAM,gBAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOD,MAAM,sBAAsB,OAAO,OAAO;AAAA,EACxC,MAAM;AAAA,EACN,MAAM,gBAAgB;AACxB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOM,MAAM,OAAO,CAAmB,UAAgC;AACrE,QAAM,EAAE,WAAW,iBAAiB,WAAW,aAAa,eAAe,IAAI,YAAY,KAAK;AAChG,QAAM,EAAE,cAAc,gBAAgB,MAAM,IAAI;AAEhD,QAAM,eAAe,gBAAgB;AACrC,QAAM,aAA8CA,OAAM;AAAA,IACxD,CAAC,SAAyB,eAAe,IAAI;AAAA,IAC7C,CAAC,cAAc;AAAA,EACjB;AAEA,QAAM,gBAAgB,YAAY,MAAM,OAAO,CAAC,KAAK,CAAC;AACtD,QAAM,mBAAmB,uBAAuB,KAAK;AAErD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MAEV,UAAU;AAAA,MAEV;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,OAAO;AAAA;AAAA,YAEL,QAAQ,GAAG,YAAY,GAAG;AAAA,UAC5B;AAAA,UACA,MAAK;AAAA,UACL;AAAA,UAEC,uBAAa,IAAI,CAAC,gBAAgB;AACjC,kBAAM,EAAE,OAAO,MAAM,IAAI;AACzB,mBACE;AAAA,cAAC;AAAA;AAAA,gBACC,UAAU;AAAA,gBACV,cAAY;AAAA,gBACZ,OAAO;AAAA,kBACL,WAAW,cAAc,KAAK;AAAA,gBAChC;AAAA,gBACA,MAAK;AAAA,gBAEL;AAAA,gBACA,wBAAwB,OAAO,EAAE,OAAO,MAAM,KAAK,EAAE;AAAA,gBAErD,8BAAC,gBAAa,gBAAgC,OAAc;AAAA;AAAA,cAJvD,MAAM,KAAK;AAAA,YAKlB;AAAA,UAEJ,CAAC;AAAA;AAAA,MACH;AAAA;AAAA,IA9BK;AAAA,EA+BP;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PropTypes } from "@elliemae/ds-props-helpers";
|
|
2
|
+
import { PropTypes, getPropsPerSlotPropTypes, globalAttributesPropTypes } from "@elliemae/ds-props-helpers";
|
|
3
|
+
import { DSFastListName, DSFastListSlots } from "./constants/index.js";
|
|
3
4
|
const defaultProps = {
|
|
4
5
|
estimateSize: () => 36
|
|
5
6
|
};
|
|
6
7
|
const DSFastListPropTypes = {
|
|
8
|
+
...getPropsPerSlotPropTypes(DSFastListName, DSFastListSlots),
|
|
9
|
+
...globalAttributesPropTypes,
|
|
7
10
|
actionRef: PropTypes.shape({
|
|
8
11
|
current: PropTypes.oneOfType([
|
|
9
12
|
PropTypes.oneOf([null]),
|
|
@@ -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 { PropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type React from 'react';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { GlobalAttributesT } from '@elliemae/ds-props-helpers';\nimport { PropTypes, getPropsPerSlotPropTypes, globalAttributesPropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type React from 'react';\nimport { DSFastListName, DSFastListSlots } from './constants/index.js';\n\nexport declare namespace DSFastListT {\n type ScrollAlignment = 'start' | 'center' | 'end' | 'auto';\n export 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 dsFastlistContainer: () => object;\n dsFastlistWrapperList: () => object;\n dsFastlistItem: () => object;\n };\n\n export interface OptionalProps<ExtraItemPropsT> extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSFastListName,\n typeof DSFastListSlots\n > {\n actionRef?: React.MutableRefObject<ActionRef>;\n extraItemProps?: ExtraItemPropsT;\n }\n\n export interface RequiredProps<ExtraItemPropsT> {\n ItemRenderer: React.ComponentType<{ index: number; extraItemProps?: ExtraItemPropsT }>;\n count: number;\n getId: (index: number) => string | number;\n }\n\n export interface DefaultProps {\n estimateSize: () => number;\n }\n\n type PropsT<D, R, O> = Partial<D> & R & O & Omit<GlobalAttributesT<HTMLElement>, keyof D | keyof R>;\n type InternalPropsT<D, R, O> = D & R & O & Omit<GlobalAttributesT<HTMLElement>, keyof D | keyof R>;\n\n export type Props<ExtraItemPropsT> = PropsT<\n DefaultProps,\n RequiredProps<ExtraItemPropsT>,\n OptionalProps<ExtraItemPropsT>\n >;\n export type InternalProps<ExtraItemPropsT> = InternalPropsT<\n DefaultProps,\n RequiredProps<ExtraItemPropsT>,\n OptionalProps<ExtraItemPropsT>\n >;\n}\n\nexport const defaultProps = {\n estimateSize: () => 36,\n};\n\nexport const DSFastListPropTypes = {\n ...getPropsPerSlotPropTypes(DSFastListName, DSFastListSlots),\n ...globalAttributesPropTypes,\n actionRef: PropTypes.shape({\n current: PropTypes.oneOfType([\n PropTypes.oneOf([null]),\n PropTypes.shape({\n scrollTo: PropTypes.func\n .description('Scroll to a index inside the list')\n .signature(`((index: number, { align: 'start' | 'center' | 'end' | 'auto' }) => void)`),\n }),\n ]),\n }).description(`mutable reference where methods will be stored`),\n ItemRenderer: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired.description(\n 'Render function for each item',\n ),\n count: PropTypes.number.isRequired.description('Number of items to render'),\n extraItemProps: PropTypes.object.description('Extra props to pass to each item'),\n getId: PropTypes.func.isRequired.description('Function to get the key for each item'),\n estimateSize: PropTypes.func.description('Function to estimate the size of each item'),\n} as React.WeakValidationMap<unknown>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,0BAA0B,iCAAiC;AAG/E,SAAS,gBAAgB,uBAAuB;AAmDzC,MAAM,eAAe;AAAA,EAC1B,cAAc,MAAM;AACtB;AAEO,MAAM,sBAAsB;AAAA,EACjC,GAAG,yBAAyB,gBAAgB,eAAe;AAAA,EAC3D,GAAG;AAAA,EACH,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;AAAA,EAC/D,cAAc,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,IAAI,CAAC,EAAE,WAAW;AAAA,IAC/E;AAAA,EACF;AAAA,EACA,OAAO,UAAU,OAAO,WAAW,YAAY,2BAA2B;AAAA,EAC1E,gBAAgB,UAAU,OAAO,YAAY,kCAAkC;AAAA,EAC/E,OAAO,UAAU,KAAK,WAAW,YAAY,uCAAuC;AAAA,EACpF,cAAc,UAAU,KAAK,YAAY,4CAA4C;AACvF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const SlotPropsAsObject = {
|
|
3
|
+
dsFastlistContainer: { "aria-label": "just a typescript test" },
|
|
4
|
+
dsFastlistWrapperList: { "aria-label": "just a typescript test" },
|
|
5
|
+
dsFastlistItem: { "aria-label": "just a typescript test" }
|
|
6
|
+
};
|
|
7
|
+
const SlotPropsAsFunctions = {
|
|
8
|
+
dsFastlistContainer: () => ({ "aria-label": "just a typescript test" }),
|
|
9
|
+
dsFastlistWrapperList: () => ({ "aria-label": "just a typescript test" }),
|
|
10
|
+
dsFastlistItem: () => ({ "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 { DSFastListName, DSFastListSlots } from '../constants/index.js';\nimport type { DSFastListT } from '../react-desc-prop-types.js';\n\nconst SlotPropsAsObject: Partial<DSFastListT.OptionalProps<object>> = {\n dsFastlistContainer: { 'aria-label': 'just a typescript test' },\n dsFastlistWrapperList: { 'aria-label': 'just a typescript test' },\n dsFastlistItem: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSFastListT.SlotFunctionArguments = {\n dsFastlistContainer: () => ({ 'aria-label': 'just a typescript test' }),\n dsFastlistWrapperList: () => ({ 'aria-label': 'just a typescript test' }),\n dsFastlistItem: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSFastListName, typeof DSFastListSlots>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACMvB,MAAM,oBAAgE;AAAA,EACpE,qBAAqB,EAAE,cAAc,yBAAyB;AAAA,EAC9D,uBAAuB,EAAE,cAAc,yBAAyB;AAAA,EAChE,gBAAgB,EAAE,cAAc,yBAAyB;AAC3D;AAEA,MAAM,uBAA0D;AAAA,EAC9D,qBAAqB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACrE,uBAAuB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACvE,gBAAgB,OAAO,EAAE,cAAc,yBAAyB;AAClE;AAGA,MAAM,6CAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -46,7 +46,7 @@ const testExplicitDefinition = {
|
|
|
46
46
|
actionRef,
|
|
47
47
|
extraItemProps: { data }
|
|
48
48
|
};
|
|
49
|
-
const
|
|
49
|
+
const testInferredTypeCompatibility = {
|
|
50
50
|
ItemRenderer: MockItemRenderer,
|
|
51
51
|
count: 0,
|
|
52
52
|
getId: (index) => "",
|
|
@@ -60,10 +60,19 @@ const testDefinitionAsConst = {
|
|
|
60
60
|
actionRef,
|
|
61
61
|
extraItemProps: { foo: "bar" }
|
|
62
62
|
};
|
|
63
|
+
const testGlobalAttributes = {
|
|
64
|
+
ItemRenderer: MockItemRenderer,
|
|
65
|
+
count: 0,
|
|
66
|
+
getId: (index) => "",
|
|
67
|
+
className: "custom-class",
|
|
68
|
+
id: "custom-id",
|
|
69
|
+
"aria-label": "custom list"
|
|
70
|
+
};
|
|
63
71
|
const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
64
72
|
/* @__PURE__ */ jsx(DSFastList, { ...testExplicitDefinition }),
|
|
65
|
-
/* @__PURE__ */ jsx(DSFastList, { ...
|
|
73
|
+
/* @__PURE__ */ jsx(DSFastList, { ...testInferredTypeCompatibility }),
|
|
66
74
|
/* @__PURE__ */ jsx(DSFastList, { ...testDefinitionAsConst }),
|
|
75
|
+
/* @__PURE__ */ jsx(DSFastList, { ...testGlobalAttributes }),
|
|
67
76
|
/* @__PURE__ */ jsx(
|
|
68
77
|
DSFastList,
|
|
69
78
|
{
|
|
@@ -73,6 +82,18 @@ const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
|
73
82
|
actionRef,
|
|
74
83
|
extraItemProps: { foo: "bar" }
|
|
75
84
|
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ jsx(
|
|
87
|
+
DSFastList,
|
|
88
|
+
{
|
|
89
|
+
className: "custom-class",
|
|
90
|
+
id: "custom-id",
|
|
91
|
+
"aria-label": "custom list",
|
|
92
|
+
"data-testid": "custom-testid",
|
|
93
|
+
ItemRenderer: MockItemRenderer,
|
|
94
|
+
count: 0,
|
|
95
|
+
getId: (index) => ""
|
|
96
|
+
}
|
|
76
97
|
)
|
|
77
98
|
] });
|
|
78
99
|
//# sourceMappingURL=typescript-fast-list-valid.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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\nconst data = [1, 2, 3];\nconst extraProps = { data };\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSFastListT.Props<typeof extraProps>;\ntype ComponentPropsInternals = DSFastListT.InternalProps<typeof extraProps>;\ntype ComponentPropsDefaultProps = DSFastListT.DefaultProps;\ntype ComponentPropsOptionalProps = DSFastListT.OptionalProps<typeof extraProps>;\ntype ComponentPropsRequiredProps = DSFastListT.RequiredProps<typeof extraProps>;\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,\n extraItemProps: { data },\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 estimateSize: () => 36,\n};\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,\n extraItemProps: { data },\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
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACcoC,
|
|
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\nconst data = [1, 2, 3];\nconst extraProps = { data };\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSFastListT.Props<typeof extraProps>;\ntype ComponentPropsInternals = DSFastListT.InternalProps<typeof extraProps>;\ntype ComponentPropsDefaultProps = DSFastListT.DefaultProps;\ntype ComponentPropsOptionalProps = DSFastListT.OptionalProps<typeof extraProps>;\ntype ComponentPropsRequiredProps = DSFastListT.RequiredProps<typeof extraProps>;\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,\n extraItemProps: { data },\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 estimateSize: () => 36,\n};\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,\n extraItemProps: { data },\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 testInferredTypeCompatibility = {\n ItemRenderer: MockItemRenderer,\n count: 0,\n getId: (index: number) => '',\n actionRef,\n extraItemProps: { data },\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n ItemRenderer: MockItemRenderer,\n count: 0,\n getId: (index: number) => '',\n actionRef,\n extraItemProps: { foo: 'bar' },\n} as const;\n\n// Global HTML/ARIA attributes (className, id, aria-*, data-*) work at runtime via\n// useGetGlobalAttributes in List.tsx \u2014 PropsT/InternalPropsT intersect with\n// Omit<GlobalAttributesT<HTMLElement>, ...> specifically so this compiles. Regression here means\n// the type/runtime contract has drifted apart again.\nconst testGlobalAttributes: ComponentPropsForApp = {\n ItemRenderer: MockItemRenderer,\n count: 0,\n getId: (index: number) => '',\n className: 'custom-class',\n id: 'custom-id',\n 'aria-label': 'custom list',\n};\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <DSFastList {...testExplicitDefinition} />\n <DSFastList {...testInferredTypeCompatibility} />\n <DSFastList {...testDefinitionAsConst} />\n <DSFastList {...testGlobalAttributes} />\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 {/* Inline props test \u2014 global HTML/ARIA attributes */}\n <DSFastList\n className=\"custom-class\"\n id=\"custom-id\"\n aria-label=\"custom list\"\n data-testid=\"custom-testid\"\n ItemRenderer={MockItemRenderer}\n count={0}\n getId={(index: number) => ''}\n />\n </>\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACcoC,SAwFzD,UAxFyD,KAwFzD,YAxFyD;AAb3D,SAAgC,iBAAiB;AACjD,SAAS,kBAAkB;AAG3B,MAAM,OAAO,CAAC,GAAG,GAAG,CAAC;AACrB,MAAM,aAAa,EAAE,KAAK;AAQ1B,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;AACzB;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;AAAA,EACjE,cAAc,MAAM;AACtB;AAEA,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;AACzB;AAGA,MAAM,gCAAgC;AAAA,EACpC,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,UAAkB;AAAA,EAC1B;AAAA,EACA,gBAAgB,EAAE,KAAK;AACzB;AAEA,MAAM,wBAAwB;AAAA,EAC5B,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,UAAkB;AAAA,EAC1B;AAAA,EACA,gBAAgB,EAAE,KAAK,MAAM;AAC/B;AAMA,MAAM,uBAA6C;AAAA,EACjD,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,UAAkB;AAAA,EAC1B,WAAW;AAAA,EACX,IAAI;AAAA,EACJ,cAAc;AAChB;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,cAAY,GAAG,wBAAwB;AAAA,EACxC,oBAAC,cAAY,GAAG,+BAA+B;AAAA,EAC/C,oBAAC,cAAY,GAAG,uBAAuB;AAAA,EACvC,oBAAC,cAAY,GAAG,sBAAsB;AAAA,EAEtC;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,EAEA;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,IAAG;AAAA,MACH,cAAW;AAAA,MACX,eAAY;AAAA,MACZ,cAAc;AAAA,MACd,OAAO;AAAA,MACP,OAAO,CAAC,UAAkB;AAAA;AAAA,EAC5B;AAAA,GACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DSFastListName = "DSFastlist";
|
|
2
|
+
export declare const DSFastListSlots: {
|
|
3
|
+
readonly CONTAINER: "container";
|
|
4
|
+
readonly WRAPPER_LIST: "wrapper-list";
|
|
5
|
+
readonly ITEM: "item";
|
|
6
|
+
};
|
|
7
|
+
export declare const DSFastListDataTestIds: {
|
|
8
|
+
readonly CONTAINER: "ds-fastlist-container";
|
|
9
|
+
readonly WRAPPER_LIST: "ds-fastlist-wrapper-list";
|
|
10
|
+
readonly ITEM: "ds-fastlist-item";
|
|
11
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { GlobalAttributesT } from '@elliemae/ds-props-helpers';
|
|
1
2
|
import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
|
|
2
3
|
import type React from 'react';
|
|
3
|
-
import
|
|
4
|
+
import { DSFastListName, DSFastListSlots } from './constants/index.js';
|
|
4
5
|
export declare namespace DSFastListT {
|
|
5
6
|
type ScrollAlignment = 'start' | 'center' | 'end' | 'auto';
|
|
6
7
|
type ScrollToOptions = {
|
|
@@ -9,6 +10,11 @@ export declare namespace DSFastListT {
|
|
|
9
10
|
type ActionRef = {
|
|
10
11
|
scrollTo?: (index: number, options?: ScrollToOptions | undefined) => void;
|
|
11
12
|
};
|
|
13
|
+
type SlotFunctionArguments = {
|
|
14
|
+
dsFastlistContainer: () => object;
|
|
15
|
+
dsFastlistWrapperList: () => object;
|
|
16
|
+
dsFastlistItem: () => object;
|
|
17
|
+
};
|
|
12
18
|
interface OptionalProps<ExtraItemPropsT> extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSFastListName, typeof DSFastListSlots> {
|
|
13
19
|
actionRef?: React.MutableRefObject<ActionRef>;
|
|
14
20
|
extraItemProps?: ExtraItemPropsT;
|
|
@@ -24,8 +30,8 @@ export declare namespace DSFastListT {
|
|
|
24
30
|
interface DefaultProps {
|
|
25
31
|
estimateSize: () => number;
|
|
26
32
|
}
|
|
27
|
-
type PropsT<D, R, O> = Partial<D> & R & O
|
|
28
|
-
type InternalPropsT<D, R, O> = D & R & O
|
|
33
|
+
type PropsT<D, R, O> = Partial<D> & R & O & Omit<GlobalAttributesT<HTMLElement>, keyof D | keyof R>;
|
|
34
|
+
type InternalPropsT<D, R, O> = D & R & O & Omit<GlobalAttributesT<HTMLElement>, keyof D | keyof R>;
|
|
29
35
|
type Props<ExtraItemPropsT> = PropsT<DefaultProps, RequiredProps<ExtraItemPropsT>, OptionalProps<ExtraItemPropsT>>;
|
|
30
36
|
type InternalProps<ExtraItemPropsT> = InternalPropsT<DefaultProps, RequiredProps<ExtraItemPropsT>, OptionalProps<ExtraItemPropsT>>;
|
|
31
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-fast-list",
|
|
3
|
-
"version": "3.80.0-next.
|
|
3
|
+
"version": "3.80.0-next.12",
|
|
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.
|
|
42
|
-
"@elliemae/ds-
|
|
43
|
-
"@elliemae/ds-
|
|
41
|
+
"@elliemae/ds-props-helpers": "3.80.0-next.12",
|
|
42
|
+
"@elliemae/ds-typescript-helpers": "3.80.0-next.12",
|
|
43
|
+
"@elliemae/ds-system": "3.80.0-next.12"
|
|
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-
|
|
49
|
-
"@elliemae/ds-
|
|
49
|
+
"@elliemae/ds-test-utils": "3.80.0-next.12",
|
|
50
|
+
"@elliemae/ds-monorepo-devops": "3.80.0-next.12"
|
|
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/DSFastListDefinitions.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSFastListName = 'DSFastlist';\nexport const DSFastListSlots = {\n CONTAINER: 'container',\n WRAPPER_LIST: 'wrapper-list',\n ITEM: 'item',\n};\n\nexport const DSCardV3DataTestIds = slotObjectToDataTestIds(DSFastListName, DSFastListSlots);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,iBAAiB;AACvB,MAAM,kBAAkB;AAAA,EAC7B,WAAW;AAAA,EACX,cAAc;AAAA,EACd,MAAM;AACR;AAEO,MAAM,0BAAsB,0CAAwB,gBAAgB,eAAe;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/FastListDataTestID.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export const LIST_DATA_TESTID = {\n CONTAINER: 'fast-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
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSFastListDefinitions.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSFastListName = 'DSFastlist';\nexport const DSFastListSlots = {\n CONTAINER: 'container',\n WRAPPER_LIST: 'wrapper-list',\n ITEM: 'item',\n};\n\nexport const DSCardV3DataTestIds = slotObjectToDataTestIds(DSFastListName, DSFastListSlots);\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,iBAAiB;AACvB,MAAM,kBAAkB;AAAA,EAC7B,WAAW;AAAA,EACX,cAAc;AAAA,EACd,MAAM;AACR;AAEO,MAAM,sBAAsB,wBAAwB,gBAAgB,eAAe;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/FastListDataTestID.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const LIST_DATA_TESTID = {\n CONTAINER: 'fast-list-container',\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,mBAAmB;AAAA,EAC9B,WAAW;AACb;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const DSFastListName = "DSFastlist";
|
|
2
|
-
export declare const DSFastListSlots: {
|
|
3
|
-
CONTAINER: string;
|
|
4
|
-
WRAPPER_LIST: string;
|
|
5
|
-
ITEM: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const DSCardV3DataTestIds: {
|
|
8
|
-
CONTAINER: `ds-fastlist-${string}`;
|
|
9
|
-
WRAPPER_LIST: `ds-fastlist-${string}`;
|
|
10
|
-
ITEM: `ds-fastlist-${string}`;
|
|
11
|
-
};
|