@elliemae/ds-test-utils 3.52.1 → 3.53.0-alpha.2
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/index.js +1 -2
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/testeable-utils/DSVirtualList.js +20 -35
- package/dist/cjs/testeable-utils/DSVirtualList.js.map +3 -3
- package/dist/cjs/testeable-utils/index.js +2 -3
- package/dist/cjs/testeable-utils/index.js.map +2 -2
- package/dist/cjs/testeable-utils/themeProviderHOC.js +53 -0
- package/dist/cjs/testeable-utils/themeProviderHOC.js.map +7 -0
- package/dist/esm/index.js +2 -3
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/testeable-utils/DSVirtualList.js +20 -28
- package/dist/esm/testeable-utils/DSVirtualList.js.map +2 -2
- package/dist/esm/testeable-utils/index.js +2 -3
- package/dist/esm/testeable-utils/index.js.map +2 -2
- package/dist/esm/testeable-utils/themeProviderHOC.js +23 -0
- package/dist/esm/testeable-utils/themeProviderHOC.js.map +7 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/testeable-utils/DSVirtualList.d.ts +0 -9
- package/dist/types/testeable-utils/index.d.ts +1 -1
- package/dist/types/testeable-utils/themeProviderHOC.d.ts +4 -0
- package/package.json +7 -6
package/dist/cjs/index.js
CHANGED
|
@@ -28,8 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var index_exports = {};
|
|
30
30
|
__export(index_exports, {
|
|
31
|
-
|
|
32
|
-
undoDSVirtualListTesteable: () => import_testeable_utils.undoDSVirtualListTesteable
|
|
31
|
+
themeProviderHOC: () => import_testeable_utils.themeProviderHOC
|
|
33
32
|
});
|
|
34
33
|
module.exports = __toCommonJS(index_exports);
|
|
35
34
|
var React = __toESM(require("react"));
|
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 {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["export { themeProviderHOC } from './testeable-utils/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,6BAAiC;",
|
|
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,37 +21,26 @@ 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 DSVirtualList_exports = {};
|
|
30
|
-
__export(DSVirtualList_exports, {
|
|
31
|
-
makeDSVirtualListTesteable: () => makeDSVirtualListTesteable,
|
|
32
|
-
undoDSVirtualListTesteable: () => undoDSVirtualListTesteable
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(DSVirtualList_exports);
|
|
35
24
|
var React = __toESM(require("react"));
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
25
|
+
jest.mock("@tanstack/react-virtual", () => {
|
|
26
|
+
const original = jest.requireActual("@tanstack/react-virtual");
|
|
27
|
+
return {
|
|
28
|
+
...original,
|
|
29
|
+
useVirtualizer: jest.fn((virtualOpts) => {
|
|
30
|
+
const finalOpts = {
|
|
31
|
+
...virtualOpts,
|
|
32
|
+
overscan: 15,
|
|
33
|
+
initialRect: {
|
|
34
|
+
height: 500,
|
|
35
|
+
width: 400
|
|
36
|
+
},
|
|
37
|
+
observeElementRect: (_, cb) => {
|
|
38
|
+
cb({ height: 500, width: 400 });
|
|
39
|
+
},
|
|
40
|
+
measureElement: () => 100
|
|
41
|
+
};
|
|
42
|
+
return original.useVirtualizer(finalOpts);
|
|
54
43
|
})
|
|
55
|
-
|
|
56
|
-
};
|
|
57
|
-
const undoDSVirtualListTesteable = async () => {
|
|
58
|
-
const lib = await import("@tanstack/react-virtual");
|
|
59
|
-
lib.useVirtualizer = mutableScope.original;
|
|
60
|
-
};
|
|
44
|
+
};
|
|
45
|
+
});
|
|
61
46
|
//# sourceMappingURL=DSVirtualList.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
4
|
-
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-unsafe-
|
|
5
|
-
"mappings": "
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/testeable-utils/DSVirtualList.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/require-await, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/ban-ts-comment */\n// @ts-nocheck\njest.mock('@tanstack/react-virtual', () => {\n const original = jest.requireActual('@tanstack/react-virtual');\n return {\n ...original,\n useVirtualizer: jest.fn((virtualOpts) => {\n const finalOpts = {\n ...virtualOpts,\n overscan: 15,\n initialRect: {\n height: 500,\n width: 400,\n },\n observeElementRect: (_, cb) => {\n cb({ height: 500, width: 400 });\n },\n measureElement: () => 100,\n };\n return original.useVirtualizer(finalOpts);\n }),\n };\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACGvB,KAAK,KAAK,2BAA2B,MAAM;AACzC,QAAM,WAAW,KAAK,cAAc,yBAAyB;AAC7D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,gBAAgB,KAAK,GAAG,CAAC,gBAAgB;AACvC,YAAM,YAAY;AAAA,QAChB,GAAG;AAAA,QACH,UAAU;AAAA,QACV,aAAa;AAAA,UACX,QAAQ;AAAA,UACR,OAAO;AAAA,QACT;AAAA,QACA,oBAAoB,CAAC,GAAG,OAAO;AAC7B,aAAG,EAAE,QAAQ,KAAK,OAAO,IAAI,CAAC;AAAA,QAChC;AAAA,QACA,gBAAgB,MAAM;AAAA,MACxB;AACA,aAAO,SAAS,eAAe,SAAS;AAAA,IAC1C,CAAC;AAAA,EACH;AACF,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -28,10 +28,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var testeable_utils_exports = {};
|
|
30
30
|
__export(testeable_utils_exports, {
|
|
31
|
-
|
|
32
|
-
undoDSVirtualListTesteable: () => import_DSVirtualList.undoDSVirtualListTesteable
|
|
31
|
+
themeProviderHOC: () => import_themeProviderHOC.themeProviderHOC
|
|
33
32
|
});
|
|
34
33
|
module.exports = __toCommonJS(testeable_utils_exports);
|
|
35
34
|
var React = __toESM(require("react"));
|
|
36
|
-
var
|
|
35
|
+
var import_themeProviderHOC = require("./themeProviderHOC.js");
|
|
37
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/testeable-utils/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["export { themeProviderHOC } from './themeProviderHOC.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAAiC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 themeProviderHOC_exports = {};
|
|
30
|
+
__export(themeProviderHOC_exports, {
|
|
31
|
+
theme: () => theme,
|
|
32
|
+
themeProviderHOC: () => themeProviderHOC
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(themeProviderHOC_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_pui_theme = require("@elliemae/pui-theme");
|
|
38
|
+
var import_styled_components = require("@xstyled/styled-components");
|
|
39
|
+
const theme = (0, import_pui_theme.getDefaultTheme)();
|
|
40
|
+
const themeProviderHOC = (Component) => {
|
|
41
|
+
const WrappedComponent = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
42
|
+
import_styled_components.ThemeProvider,
|
|
43
|
+
{
|
|
44
|
+
theme: {
|
|
45
|
+
...theme,
|
|
46
|
+
layoutMode: "l"
|
|
47
|
+
},
|
|
48
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...props })
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
return WrappedComponent;
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=themeProviderHOC.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/testeable-utils/themeProviderHOC.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import type { Theme } from '@elliemae/pui-theme';\nimport { getDefaultTheme } from '@elliemae/pui-theme';\nimport { ThemeProvider } from '@xstyled/styled-components';\nimport React from 'react';\n\nexport const theme = getDefaultTheme() as Theme;\n\nexport const themeProviderHOC = <T extends React.JSX.IntrinsicAttributes>(Component: React.ComponentType<T>) => {\n const WrappedComponent: React.ComponentType<T> = (props) => (\n <ThemeProvider\n theme={{\n ...theme,\n layoutMode: 'l',\n }}\n >\n <Component {...props} />\n </ThemeProvider>\n );\n return WrappedComponent;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADejB;AAdN,uBAAgC;AAChC,+BAA8B;AAGvB,MAAM,YAAQ,kCAAgB;AAE9B,MAAM,mBAAmB,CAA0C,cAAsC;AAC9G,QAAM,mBAA2C,CAAC,UAChD;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL,GAAG;AAAA,QACH,YAAY;AAAA,MACd;AAAA,MAEA,sDAAC,aAAW,GAAG,OAAO;AAAA;AAAA,EACxB;AAEF,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { themeProviderHOC } from "./testeable-utils/index.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
undoDSVirtualListTesteable
|
|
4
|
+
themeProviderHOC
|
|
6
5
|
};
|
|
7
6
|
//# 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 {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { themeProviderHOC } from './testeable-utils/index.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,wBAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,31 +1,23 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
2
|
+
jest.mock("@tanstack/react-virtual", () => {
|
|
3
|
+
const original = jest.requireActual("@tanstack/react-virtual");
|
|
4
|
+
return {
|
|
5
|
+
...original,
|
|
6
|
+
useVirtualizer: jest.fn((virtualOpts) => {
|
|
7
|
+
const finalOpts = {
|
|
8
|
+
...virtualOpts,
|
|
9
|
+
overscan: 15,
|
|
10
|
+
initialRect: {
|
|
11
|
+
height: 500,
|
|
12
|
+
width: 400
|
|
13
|
+
},
|
|
14
|
+
observeElementRect: (_, cb) => {
|
|
15
|
+
cb({ height: 500, width: 400 });
|
|
16
|
+
},
|
|
17
|
+
measureElement: () => 100
|
|
18
|
+
};
|
|
19
|
+
return original.useVirtualizer(finalOpts);
|
|
20
20
|
})
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
const undoDSVirtualListTesteable = async () => {
|
|
24
|
-
const lib = await import("@tanstack/react-virtual");
|
|
25
|
-
lib.useVirtualizer = mutableScope.original;
|
|
26
|
-
};
|
|
27
|
-
export {
|
|
28
|
-
makeDSVirtualListTesteable,
|
|
29
|
-
undoDSVirtualListTesteable
|
|
30
|
-
};
|
|
21
|
+
};
|
|
22
|
+
});
|
|
31
23
|
//# sourceMappingURL=DSVirtualList.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/testeable-utils/DSVirtualList.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unsafe-
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/require-await, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/ban-ts-comment */\n// @ts-nocheck\njest.mock('@tanstack/react-virtual', () => {\n const original = jest.requireActual('@tanstack/react-virtual');\n return {\n ...original,\n useVirtualizer: jest.fn((virtualOpts) => {\n const finalOpts = {\n ...virtualOpts,\n overscan: 15,\n initialRect: {\n height: 500,\n width: 400,\n },\n observeElementRect: (_, cb) => {\n cb({ height: 500, width: 400 });\n },\n measureElement: () => 100,\n };\n return original.useVirtualizer(finalOpts);\n }),\n };\n});\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACGvB,KAAK,KAAK,2BAA2B,MAAM;AACzC,QAAM,WAAW,KAAK,cAAc,yBAAyB;AAC7D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,gBAAgB,KAAK,GAAG,CAAC,gBAAgB;AACvC,YAAM,YAAY;AAAA,QAChB,GAAG;AAAA,QACH,UAAU;AAAA,QACV,aAAa;AAAA,UACX,QAAQ;AAAA,UACR,OAAO;AAAA,QACT;AAAA,QACA,oBAAoB,CAAC,GAAG,OAAO;AAC7B,aAAG,EAAE,QAAQ,KAAK,OAAO,IAAI,CAAC;AAAA,QAChC;AAAA,QACA,gBAAgB,MAAM;AAAA,MACxB;AACA,aAAO,SAAS,eAAe,SAAS;AAAA,IAC1C,CAAC;AAAA,EACH;AACF,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { themeProviderHOC } from "./themeProviderHOC.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
undoDSVirtualListTesteable
|
|
4
|
+
themeProviderHOC
|
|
6
5
|
};
|
|
7
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/testeable-utils/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { themeProviderHOC } from './themeProviderHOC.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,wBAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { getDefaultTheme } from "@elliemae/pui-theme";
|
|
4
|
+
import { ThemeProvider } from "@xstyled/styled-components";
|
|
5
|
+
const theme = getDefaultTheme();
|
|
6
|
+
const themeProviderHOC = (Component) => {
|
|
7
|
+
const WrappedComponent = (props) => /* @__PURE__ */ jsx(
|
|
8
|
+
ThemeProvider,
|
|
9
|
+
{
|
|
10
|
+
theme: {
|
|
11
|
+
...theme,
|
|
12
|
+
layoutMode: "l"
|
|
13
|
+
},
|
|
14
|
+
children: /* @__PURE__ */ jsx(Component, { ...props })
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
return WrappedComponent;
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
theme,
|
|
21
|
+
themeProviderHOC
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=themeProviderHOC.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/testeable-utils/themeProviderHOC.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { Theme } from '@elliemae/pui-theme';\nimport { getDefaultTheme } from '@elliemae/pui-theme';\nimport { ThemeProvider } from '@xstyled/styled-components';\nimport React from 'react';\n\nexport const theme = getDefaultTheme() as Theme;\n\nexport const themeProviderHOC = <T extends React.JSX.IntrinsicAttributes>(Component: React.ComponentType<T>) => {\n const WrappedComponent: React.ComponentType<T> = (props) => (\n <ThemeProvider\n theme={{\n ...theme,\n layoutMode: 'l',\n }}\n >\n <Component {...props} />\n </ThemeProvider>\n );\n return WrappedComponent;\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACejB;AAdN,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAGvB,MAAM,QAAQ,gBAAgB;AAE9B,MAAM,mBAAmB,CAA0C,cAAsC;AAC9G,QAAM,mBAA2C,CAAC,UAChD;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL,GAAG;AAAA,QACH,YAAY;AAAA,MACd;AAAA,MAEA,8BAAC,aAAW,GAAG,OAAO;AAAA;AAAA,EACxB;AAEF,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { themeProviderHOC } from './testeable-utils/index.js';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type MakeTesteableParams = {
|
|
2
|
-
overscan: number;
|
|
3
|
-
itemHeight: number;
|
|
4
|
-
parentHeight: number;
|
|
5
|
-
width?: number;
|
|
6
|
-
};
|
|
7
|
-
export declare const makeDSVirtualListTesteable: ({ overscan, itemHeight, parentHeight, width, }: MakeTesteableParams) => void;
|
|
8
|
-
export declare const undoDSVirtualListTesteable: () => Promise<void>;
|
|
9
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { themeProviderHOC } from './themeProviderHOC.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-test-utils",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.53.0-alpha.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Test utilities",
|
|
6
6
|
"files": [
|
|
@@ -36,19 +36,20 @@
|
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@
|
|
39
|
+
"@elliemae/pui-theme": "~2.13.0",
|
|
40
|
+
"@tanstack/react-virtual": "3.13.9",
|
|
40
41
|
"jest-axe": "^9.0.0",
|
|
41
|
-
"jest-matcher-utils": "^29.7.0"
|
|
42
|
-
"@elliemae/ds-system": "3.52.1"
|
|
42
|
+
"jest-matcher-utils": "^29.7.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@elliemae/pui-cli": "9.0.0-next.
|
|
45
|
+
"@elliemae/pui-cli": "9.0.0-next.65",
|
|
46
46
|
"axe-core": "^4.10.2",
|
|
47
47
|
"jest": "~29.7.0",
|
|
48
48
|
"styled-components": "~5.3.9",
|
|
49
|
-
"@elliemae/ds-monorepo-devops": "3.
|
|
49
|
+
"@elliemae/ds-monorepo-devops": "3.53.0-alpha.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
+
"@xstyled/styled-components": "~3.7.3",
|
|
52
53
|
"react": "^18.3.1",
|
|
53
54
|
"react-dom": "^18.3.1",
|
|
54
55
|
"styled-components": "~5.3.9"
|