@elliemae/ds-shared 3.16.0 → 3.16.1
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/Animations/BaseAnimation.js +5 -13
- package/dist/cjs/Animations/BaseAnimation.js.map +2 -2
- package/dist/cjs/Animations/Grow.js +6 -10
- package/dist/cjs/Animations/Grow.js.map +2 -2
- package/dist/cjs/Animations/GrowRight.js +5 -1
- package/dist/cjs/Animations/GrowRight.js.map +2 -2
- package/dist/cjs/Animations/GrowVertical.js +5 -1
- package/dist/cjs/Animations/GrowVertical.js.map +2 -2
- package/dist/cjs/Animations/index.js +8 -4
- package/dist/cjs/Animations/index.js.map +2 -2
- package/dist/cjs/CheckableGroup.js +10 -4
- package/dist/cjs/CheckableGroup.js.map +2 -2
- package/dist/cjs/DeferRenderAfterComputation.js +5 -6
- package/dist/cjs/DeferRenderAfterComputation.js.map +2 -2
- package/dist/cjs/FocusGroup/FocusGrid.js +5 -1
- package/dist/cjs/FocusGroup/FocusGrid.js.map +2 -2
- package/dist/cjs/FocusGroup/FocusGroup.js +4 -0
- package/dist/cjs/FocusGroup/FocusGroup.js.map +1 -1
- package/dist/cjs/FocusGroup/FocusGroupContext.js +4 -0
- package/dist/cjs/FocusGroup/FocusGroupContext.js.map +1 -1
- package/dist/cjs/FocusGroup/FocusGroupManager.js +6 -2
- package/dist/cjs/FocusGroup/FocusGroupManager.js.map +2 -2
- package/dist/cjs/FocusGroup/focusGroupManagerHoc.js +17 -16
- package/dist/cjs/FocusGroup/focusGroupManagerHoc.js.map +2 -2
- package/dist/cjs/FocusGroup/index.js +11 -7
- package/dist/cjs/FocusGroup/index.js.map +2 -2
- package/dist/cjs/FocusGroup/useFocusGroupItem.js +5 -1
- package/dist/cjs/FocusGroup/useFocusGroupItem.js.map +2 -2
- package/dist/cjs/FocusGroup/utils/getNextCellPosition.js +4 -0
- package/dist/cjs/FocusGroup/utils/getNextCellPosition.js.map +2 -2
- package/dist/cjs/GroupContext/Group.js +5 -1
- package/dist/cjs/GroupContext/Group.js.map +2 -2
- package/dist/cjs/GroupContext/GroupContext.js +4 -0
- package/dist/cjs/GroupContext/GroupContext.js.map +1 -1
- package/dist/cjs/GroupContext/GroupItem.js +5 -1
- package/dist/cjs/GroupContext/GroupItem.js.map +2 -2
- package/dist/cjs/GroupContext/index.js +7 -3
- package/dist/cjs/GroupContext/index.js.map +2 -2
- package/dist/cjs/ScrollSync/ScrollSync.js +4 -0
- package/dist/cjs/ScrollSync/ScrollSync.js.map +1 -1
- package/dist/cjs/ScrollSync/ScrollSyncPane.js +6 -4
- package/dist/cjs/ScrollSync/ScrollSyncPane.js.map +2 -2
- package/dist/cjs/ScrollSync/ScrollSyncProvider.js +25 -21
- package/dist/cjs/ScrollSync/ScrollSyncProvider.js.map +2 -2
- package/dist/cjs/ScrollSync/index.js +8 -4
- package/dist/cjs/ScrollSync/index.js.map +2 -2
- package/dist/cjs/ScrollSync/useScrollSync.js +5 -3
- package/dist/cjs/ScrollSync/useScrollSync.js.map +2 -2
- package/dist/cjs/constants.js +4 -0
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/createDataInstance/createInstancePlugin.js +4 -0
- package/dist/cjs/createDataInstance/createInstancePlugin.js.map +1 -1
- package/dist/cjs/createDataInstance/createInstanceRef.js +12 -25
- package/dist/cjs/createDataInstance/createInstanceRef.js.map +2 -2
- package/dist/cjs/createDataInstance/index.js +7 -3
- package/dist/cjs/createDataInstance/index.js.map +2 -2
- package/dist/cjs/createDataInstance/utils.js +9 -20
- package/dist/cjs/createDataInstance/utils.js.map +2 -2
- package/dist/cjs/defer-render-hoc/index.js +4 -0
- package/dist/cjs/defer-render-hoc/index.js.map +2 -2
- package/dist/cjs/dimsum.config.js +4 -0
- package/dist/cjs/dimsum.config.js.map +1 -1
- package/dist/cjs/index.js +20 -16
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/prop-types.js +4 -0
- package/dist/cjs/prop-types.js.map +1 -1
- package/dist/cjs/react-spring/index.js +4 -0
- package/dist/cjs/react-spring/index.js.map +1 -1
- package/dist/cjs/react-spring/renderprops.js +4 -0
- package/dist/cjs/react-spring/renderprops.js.map +1 -1
- package/dist/cjs/toolbar/ToolbarProvider.js +4 -0
- package/dist/cjs/toolbar/ToolbarProvider.js.map +1 -1
- package/dist/cjs/useDataGrid/VolatileRowsListener.js +4 -0
- package/dist/cjs/useDataGrid/VolatileRowsListener.js.map +2 -2
- package/dist/cjs/useDataGrid/index.js +7 -3
- package/dist/cjs/useDataGrid/index.js.map +2 -2
- package/dist/cjs/useDataGrid/initColumnDefinition.js +9 -4
- package/dist/cjs/useDataGrid/initColumnDefinition.js.map +2 -2
- package/dist/cjs/useDataGrid/useDataGrid.js +10 -4
- package/dist/cjs/useDataGrid/useDataGrid.js.map +2 -2
- package/dist/cjs/useDataList/index.js +6 -2
- package/dist/cjs/useDataList/index.js.map +2 -2
- package/dist/cjs/useDataList/recordIterator.js +4 -0
- package/dist/cjs/useDataList/recordIterator.js.map +2 -2
- package/dist/cjs/useDataList/useDataList.js +15 -22
- package/dist/cjs/useDataList/useDataList.js.map +3 -3
- package/dist/cjs/utils.js +5 -3
- package/dist/cjs/utils.js.map +2 -2
- package/dist/cjs/virtualization/AutoHeightList.js +4 -0
- package/dist/cjs/virtualization/AutoHeightList.js.map +1 -1
- package/dist/cjs/virtualization/FluidHeightList.js +12 -10
- package/dist/cjs/virtualization/FluidHeightList.js.map +2 -2
- package/dist/cjs/virtualization/index.js +6 -2
- package/dist/cjs/virtualization/index.js.map +2 -2
- package/dist/esm/Animations/BaseAnimation.js +1 -13
- package/dist/esm/Animations/BaseAnimation.js.map +2 -2
- package/dist/esm/Animations/Grow.js +2 -10
- package/dist/esm/Animations/Grow.js.map +2 -2
- package/dist/esm/Animations/GrowRight.js +1 -1
- package/dist/esm/Animations/GrowRight.js.map +1 -1
- package/dist/esm/Animations/GrowVertical.js +1 -1
- package/dist/esm/Animations/GrowVertical.js.map +1 -1
- package/dist/esm/Animations/index.js +4 -4
- package/dist/esm/Animations/index.js.map +1 -1
- package/dist/esm/CheckableGroup.js +6 -4
- package/dist/esm/CheckableGroup.js.map +2 -2
- package/dist/esm/DeferRenderAfterComputation.js +1 -6
- package/dist/esm/DeferRenderAfterComputation.js.map +2 -2
- package/dist/esm/FocusGroup/FocusGrid.js +1 -1
- package/dist/esm/FocusGroup/FocusGrid.js.map +2 -2
- package/dist/esm/FocusGroup/FocusGroup.js.map +1 -1
- package/dist/esm/FocusGroup/FocusGroupManager.js +2 -2
- package/dist/esm/FocusGroup/FocusGroupManager.js.map +2 -2
- package/dist/esm/FocusGroup/focusGroupManagerHoc.js +13 -16
- package/dist/esm/FocusGroup/focusGroupManagerHoc.js.map +2 -2
- package/dist/esm/FocusGroup/index.js +7 -7
- package/dist/esm/FocusGroup/index.js.map +1 -1
- package/dist/esm/FocusGroup/useFocusGroupItem.js +1 -1
- package/dist/esm/FocusGroup/useFocusGroupItem.js.map +2 -2
- package/dist/esm/FocusGroup/utils/getNextCellPosition.js.map +2 -2
- package/dist/esm/GroupContext/Group.js +1 -1
- package/dist/esm/GroupContext/Group.js.map +1 -1
- package/dist/esm/GroupContext/GroupItem.js +1 -1
- package/dist/esm/GroupContext/GroupItem.js.map +2 -2
- package/dist/esm/GroupContext/index.js +3 -3
- package/dist/esm/GroupContext/index.js.map +1 -1
- package/dist/esm/ScrollSync/ScrollSync.js.map +1 -1
- package/dist/esm/ScrollSync/ScrollSyncPane.js +2 -4
- package/dist/esm/ScrollSync/ScrollSyncPane.js.map +2 -2
- package/dist/esm/ScrollSync/ScrollSyncProvider.js +21 -21
- package/dist/esm/ScrollSync/ScrollSyncProvider.js.map +2 -2
- package/dist/esm/ScrollSync/index.js +4 -4
- package/dist/esm/ScrollSync/index.js.map +1 -1
- package/dist/esm/ScrollSync/useScrollSync.js +1 -3
- package/dist/esm/ScrollSync/useScrollSync.js.map +2 -2
- package/dist/esm/createDataInstance/createInstancePlugin.js.map +1 -1
- package/dist/esm/createDataInstance/createInstanceRef.js +8 -29
- package/dist/esm/createDataInstance/createInstanceRef.js.map +2 -2
- package/dist/esm/createDataInstance/index.js +3 -3
- package/dist/esm/createDataInstance/index.js.map +1 -1
- package/dist/esm/createDataInstance/utils.js +5 -20
- package/dist/esm/createDataInstance/utils.js.map +2 -2
- package/dist/esm/defer-render-hoc/index.js.map +2 -2
- package/dist/esm/index.js +16 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/dist/esm/useDataGrid/VolatileRowsListener.js.map +2 -2
- package/dist/esm/useDataGrid/index.js +3 -3
- package/dist/esm/useDataGrid/index.js.map +1 -1
- package/dist/esm/useDataGrid/initColumnDefinition.js +5 -4
- package/dist/esm/useDataGrid/initColumnDefinition.js.map +2 -2
- package/dist/esm/useDataGrid/useDataGrid.js +6 -4
- package/dist/esm/useDataGrid/useDataGrid.js.map +2 -2
- package/dist/esm/useDataList/index.js +2 -2
- package/dist/esm/useDataList/index.js.map +1 -1
- package/dist/esm/useDataList/recordIterator.js.map +2 -2
- package/dist/esm/useDataList/useDataList.js +9 -23
- package/dist/esm/useDataList/useDataList.js.map +2 -2
- package/dist/esm/utils.js +1 -3
- package/dist/esm/utils.js.map +2 -2
- package/dist/esm/virtualization/AutoHeightList.js.map +1 -1
- package/dist/esm/virtualization/FluidHeightList.js +8 -10
- package/dist/esm/virtualization/FluidHeightList.js.map +2 -2
- package/dist/esm/virtualization/index.js +2 -2
- package/dist/esm/virtualization/index.js.map +1 -1
- package/dist/types/Animations/BaseAnimation.d.ts +1 -0
- package/dist/types/Animations/Grow.d.ts +2 -1
- package/dist/types/Animations/GrowRight.d.ts +1 -0
- package/dist/types/Animations/GrowVertical.d.ts +1 -0
- package/dist/types/Animations/index.d.ts +4 -4
- package/dist/types/CheckableGroup.d.ts +8 -9
- package/dist/types/DeferRenderAfterComputation.d.ts +1 -1
- package/dist/types/FocusGroup/focusGroupManagerHoc.d.ts +1 -0
- package/dist/types/FocusGroup/index.d.ts +7 -7
- package/dist/types/GroupContext/GroupItem.d.ts +1 -0
- package/dist/types/GroupContext/index.d.ts +3 -3
- package/dist/types/ScrollSync/ScrollSyncPane.d.ts +1 -0
- package/dist/types/ScrollSync/ScrollSyncProvider.d.ts +11 -10
- package/dist/types/ScrollSync/index.d.ts +4 -4
- package/dist/types/createDataInstance/index.d.ts +3 -3
- package/dist/types/index.d.ts +16 -16
- package/dist/types/useDataGrid/index.d.ts +3 -3
- package/dist/types/useDataList/index.d.ts +2 -2
- package/dist/types/virtualization/index.d.ts +2 -2
- package/package.json +7 -7
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -32,7 +36,7 @@ var React = __toESM(require("react"));
|
|
|
32
36
|
var import_uuid = require("uuid");
|
|
33
37
|
var import_react = require("react");
|
|
34
38
|
var import_lodash = require("lodash");
|
|
35
|
-
var import_utils = require("./utils");
|
|
39
|
+
var import_utils = require("./utils.js");
|
|
36
40
|
const defaultDecorators = {
|
|
37
41
|
instance: [],
|
|
38
42
|
state: [],
|
|
@@ -40,14 +44,7 @@ const defaultDecorators = {
|
|
|
40
44
|
renderers: [],
|
|
41
45
|
composeData: []
|
|
42
46
|
};
|
|
43
|
-
function createDataInstanceRef({
|
|
44
|
-
uuid: uuidProp,
|
|
45
|
-
data,
|
|
46
|
-
renderers,
|
|
47
|
-
plugins,
|
|
48
|
-
customDecorators,
|
|
49
|
-
...props
|
|
50
|
-
}) {
|
|
47
|
+
function createDataInstanceRef({ uuid: uuidProp, data, renderers, plugins, customDecorators, ...props }) {
|
|
51
48
|
const instance = (0, import_react.useRef)();
|
|
52
49
|
const [uuid] = (0, import_react.useState)(uuidProp || (() => (0, import_uuid.v4)()));
|
|
53
50
|
instance.current = {
|
|
@@ -55,8 +52,10 @@ function createDataInstanceRef({
|
|
|
55
52
|
state: {},
|
|
56
53
|
actions: {},
|
|
57
54
|
hotKeys: {},
|
|
55
|
+
// keyboard hotkeys to run specific actions
|
|
58
56
|
originalData: data,
|
|
59
57
|
records: [],
|
|
58
|
+
// item abstraction with meta data for originalData
|
|
60
59
|
renderers,
|
|
61
60
|
ref(key) {
|
|
62
61
|
return (node) => instance.current.refs[key] = node;
|
|
@@ -75,25 +74,13 @@ function createDataInstanceRef({
|
|
|
75
74
|
});
|
|
76
75
|
Object.keys(nextDecorators).forEach((key) => {
|
|
77
76
|
if (Array.isArray(nextDecorators[key]))
|
|
78
|
-
nextDecorators[key] = (0, import_lodash.orderBy)(
|
|
79
|
-
nextDecorators[key],
|
|
80
|
-
(item) => item.order
|
|
81
|
-
);
|
|
77
|
+
nextDecorators[key] = (0, import_lodash.orderBy)(nextDecorators[key], (item) => item.order);
|
|
82
78
|
});
|
|
83
79
|
return nextDecorators;
|
|
84
80
|
}, []);
|
|
85
|
-
instance.current = decorators.instance.reduce(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
);
|
|
89
|
-
instance.current = decorators.state.reduce(
|
|
90
|
-
import_utils.registerStateHookToInstance,
|
|
91
|
-
instance.current
|
|
92
|
-
);
|
|
93
|
-
instance.current = decorators.hotKeys.reduce(
|
|
94
|
-
import_utils.registerHotKeysHookToInstance,
|
|
95
|
-
instance.current
|
|
96
|
-
);
|
|
81
|
+
instance.current = decorators.instance.reduce(import_utils.mergeInstance, instance.current);
|
|
82
|
+
instance.current = decorators.state.reduce(import_utils.registerStateHookToInstance, instance.current);
|
|
83
|
+
instance.current = decorators.hotKeys.reduce(import_utils.registerHotKeysHookToInstance, instance.current);
|
|
97
84
|
instance.current.renderers = decorators.renderers.reduce(
|
|
98
85
|
(result, decorator) => decorator(result, instance.current),
|
|
99
86
|
renderers
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/createDataInstance/createInstanceRef.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { v4 as uuidv4 } from 'uuid';\nimport { useMemo, useRef, useState } from 'react';\nimport { orderBy } from 'lodash';\nimport {
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { v4 as uuidv4 } from 'uuid';\nimport { useMemo, useRef, useState } from 'react';\nimport { orderBy } from 'lodash';\nimport { mergeInstance, registerHotKeysHookToInstance, registerStateHookToInstance } from './utils.js';\n\nconst defaultDecorators = {\n instance: [],\n state: [],\n hotKeys: [],\n renderers: [],\n composeData: [],\n};\n\nfunction createDataInstanceRef({ uuid: uuidProp, data, renderers, plugins, customDecorators, ...props }) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const instance = useRef();\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const [uuid] = useState(uuidProp || (() => uuidv4()));\n\n instance.current = {\n uuid,\n state: {},\n actions: {},\n hotKeys: {}, // keyboard hotkeys to run specific actions\n originalData: data,\n records: [], // item abstraction with meta data for originalData\n renderers,\n ref(key) {\n // eslint-disable-next-line no-return-assign\n return (node) => (instance.current.refs[key] = node);\n },\n getInstance() {\n return instance.current;\n },\n props,\n };\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const decorators = useMemo(() => {\n let nextDecorators = { ...defaultDecorators, ...customDecorators };\n\n plugins.forEach((plugin) => {\n if (!plugin) return;\n nextDecorators = plugin(nextDecorators);\n });\n\n Object.keys(nextDecorators).forEach((key) => {\n if (Array.isArray(nextDecorators[key])) nextDecorators[key] = orderBy(nextDecorators[key], (item) => item.order);\n });\n\n return nextDecorators;\n }, []); // the plugins are defined on creation, but not changed at runtime\n\n // todo: test if getting the hooks without registering them\n // here would be beneficial to memoize instance and squeeze performance\n instance.current = decorators.instance.reduce(mergeInstance, instance.current);\n instance.current = decorators.state.reduce(registerStateHookToInstance, instance.current);\n instance.current = decorators.hotKeys.reduce(registerHotKeysHookToInstance, instance.current);\n instance.current.renderers = decorators.renderers.reduce(\n (result, decorator) => decorator(result, instance.current),\n renderers,\n );\n\n return { instance, decorators };\n}\n\nexport { createDataInstanceRef };\nexport default createDataInstanceRef;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,kBAA6B;AAC7B,mBAA0C;AAC1C,oBAAwB;AACxB,mBAA0F;AAE1F,MAAM,oBAAoB;AAAA,EACxB,UAAU,CAAC;AAAA,EACX,OAAO,CAAC;AAAA,EACR,SAAS,CAAC;AAAA,EACV,WAAW,CAAC;AAAA,EACZ,aAAa,CAAC;AAChB;AAEA,SAAS,sBAAsB,EAAE,MAAM,UAAU,MAAM,WAAW,SAAS,kBAAkB,GAAG,MAAM,GAAG;AAEvG,QAAM,eAAW,qBAAO;AAExB,QAAM,CAAC,IAAI,QAAI,uBAAS,aAAa,UAAM,YAAAA,IAAO,EAAE;AAEpD,WAAS,UAAU;AAAA,IACjB;AAAA,IACA,OAAO,CAAC;AAAA,IACR,SAAS,CAAC;AAAA,IACV,SAAS,CAAC;AAAA;AAAA,IACV,cAAc;AAAA,IACd,SAAS,CAAC;AAAA;AAAA,IACV;AAAA,IACA,IAAI,KAAK;AAEP,aAAO,CAAC,SAAU,SAAS,QAAQ,KAAK,GAAG,IAAI;AAAA,IACjD;AAAA,IACA,cAAc;AACZ,aAAO,SAAS;AAAA,IAClB;AAAA,IACA;AAAA,EACF;AAGA,QAAM,iBAAa,sBAAQ,MAAM;AAC/B,QAAI,iBAAiB,EAAE,GAAG,mBAAmB,GAAG,iBAAiB;AAEjE,YAAQ,QAAQ,CAAC,WAAW;AAC1B,UAAI,CAAC;AAAQ;AACb,uBAAiB,OAAO,cAAc;AAAA,IACxC,CAAC;AAED,WAAO,KAAK,cAAc,EAAE,QAAQ,CAAC,QAAQ;AAC3C,UAAI,MAAM,QAAQ,eAAe,GAAG,CAAC;AAAG,uBAAe,GAAG,QAAI,uBAAQ,eAAe,GAAG,GAAG,CAAC,SAAS,KAAK,KAAK;AAAA,IACjH,CAAC;AAED,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AAIL,WAAS,UAAU,WAAW,SAAS,OAAO,4BAAe,SAAS,OAAO;AAC7E,WAAS,UAAU,WAAW,MAAM,OAAO,0CAA6B,SAAS,OAAO;AACxF,WAAS,UAAU,WAAW,QAAQ,OAAO,4CAA+B,SAAS,OAAO;AAC5F,WAAS,QAAQ,YAAY,WAAW,UAAU;AAAA,IAChD,CAAC,QAAQ,cAAc,UAAU,QAAQ,SAAS,OAAO;AAAA,IACzD;AAAA,EACF;AAEA,SAAO,EAAE,UAAU,WAAW;AAChC;AAGA,IAAO,4BAAQ;",
|
|
6
6
|
"names": ["uuidv4"]
|
|
7
7
|
}
|
|
@@ -15,6 +15,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
};
|
|
16
16
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
17
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
20
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
18
22
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
19
23
|
mod
|
|
20
24
|
));
|
|
@@ -22,7 +26,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
26
|
var createDataInstance_exports = {};
|
|
23
27
|
module.exports = __toCommonJS(createDataInstance_exports);
|
|
24
28
|
var React = __toESM(require("react"));
|
|
25
|
-
__reExport(createDataInstance_exports, require("./createInstancePlugin"), module.exports);
|
|
26
|
-
__reExport(createDataInstance_exports, require("./createInstanceRef"), module.exports);
|
|
27
|
-
__reExport(createDataInstance_exports, require("./utils"), module.exports);
|
|
29
|
+
__reExport(createDataInstance_exports, require("./createInstancePlugin.js"), module.exports);
|
|
30
|
+
__reExport(createDataInstance_exports, require("./createInstanceRef.js"), module.exports);
|
|
31
|
+
__reExport(createDataInstance_exports, require("./utils.js"), module.exports);
|
|
28
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/createDataInstance/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from './createInstancePlugin';\nexport * from './createInstanceRef';\nexport * from './utils';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export * from './createInstancePlugin.js';\nexport * from './createInstanceRef.js';\nexport * from './utils.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,uCAAc,sCAAd;AACA,uCAAc,mCADd;AAEA,uCAAc,uBAFd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -51,30 +55,15 @@ function evaluateTransforms(transforms, value, extraParams = {}, props = {}, gri
|
|
|
51
55
|
return nextProps;
|
|
52
56
|
}
|
|
53
57
|
function evaluateFormatters(formatters, value, extraParams = {}, grid) {
|
|
54
|
-
return formatters.reduce(
|
|
55
|
-
(result, formatter) => formatter(result, extraParams, grid),
|
|
56
|
-
value
|
|
57
|
-
);
|
|
58
|
+
return formatters.reduce((result, formatter) => formatter(result, extraParams, grid), value);
|
|
58
59
|
}
|
|
59
60
|
function composeFormatters(formatters, instance, getItemValue = (record) => record.data.name) {
|
|
60
|
-
return (props) => formatters.reduce(
|
|
61
|
-
(result, formatter) => formatter(result, props, instance),
|
|
62
|
-
getItemValue(props.record)
|
|
63
|
-
);
|
|
61
|
+
return (props) => formatters.reduce((result, formatter) => formatter(result, props, instance), getItemValue(props.record));
|
|
64
62
|
}
|
|
65
|
-
const applyDecorators = (subject, decorators = [], ...args) => decorators.reduce(
|
|
66
|
-
(nextSubject, decorator) => decorator(nextSubject, ...args),
|
|
67
|
-
subject
|
|
68
|
-
);
|
|
63
|
+
const applyDecorators = (subject, decorators = [], ...args) => decorators.reduce((nextSubject, decorator) => decorator(nextSubject, ...args), subject);
|
|
69
64
|
const decorateColumns = (columns, decorators, grid) => {
|
|
70
|
-
const nextColumns = applyDecorators(
|
|
71
|
-
|
|
72
|
-
decorators.decorateColumns,
|
|
73
|
-
grid
|
|
74
|
-
);
|
|
75
|
-
return nextColumns.map(
|
|
76
|
-
(column, index) => applyDecorators(column, decorators.decorateColumn, grid, index)
|
|
77
|
-
);
|
|
65
|
+
const nextColumns = applyDecorators(columns, decorators.decorateColumns, grid);
|
|
66
|
+
return nextColumns.map((column, index) => applyDecorators(column, decorators.decorateColumn, grid, index));
|
|
78
67
|
};
|
|
79
68
|
const mergeInstance = (instance, instanceHook) => ({
|
|
80
69
|
...instance,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/createDataInstance/utils.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export const reducePropsGetter
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export const reducePropsGetter =\n (decorators = [], grid) =>\n (props = {}, extraParams) => {\n let nextProps = props;\n decorators.forEach((decorator) => {\n nextProps = decorator(nextProps, grid, extraParams);\n });\n return nextProps;\n };\n\n/* eslint-disable-next-line max-params */\nexport function evaluateTransforms(transforms, value, extraParams = {}, props = {}, grid) {\n let nextProps = props;\n transforms.forEach((transform) => {\n nextProps = transform(value, extraParams, nextProps, grid);\n });\n return nextProps;\n}\n\n/* eslint-disable-next-line max-params */\nexport function evaluateFormatters(formatters, value, extraParams = {}, grid) {\n return formatters.reduce((result, formatter) => formatter(result, extraParams, grid), value);\n}\n\nexport function composeFormatters(formatters, instance, getItemValue = (record) => record.data.name) {\n // todo: make the formatters subscribe to the item props instead of getting the whole instance\n // todo: addd should formatter update to memoize specific ones\n return (props) =>\n formatters.reduce((result, formatter) => formatter(result, props, instance), getItemValue(props.record));\n}\n\nexport const applyDecorators = (subject, decorators = [], ...args) =>\n decorators.reduce((nextSubject, decorator) => decorator(nextSubject, ...args), subject);\n\nexport const decorateColumns = (columns, decorators, grid) => {\n const nextColumns = applyDecorators(columns, decorators.decorateColumns, grid);\n return nextColumns.map((column, index) => applyDecorators(column, decorators.decorateColumn, grid, index));\n};\n\nexport const mergeInstance = (instance, instanceHook) => ({\n ...instance,\n ...instanceHook(instance),\n});\n\nexport const registerStateHookToInstance = (instance, stateHook) => {\n const { state, actions } = stateHook(instance);\n return {\n ...instance,\n state: {\n ...instance.state,\n ...state,\n },\n actions: {\n ...instance.actions,\n ...actions,\n },\n };\n};\n\nconst reduceHotKey = (instance, { key, handler, options, allowDocumentHandler }) => ({\n ...instance,\n hotKeys: {\n ...instance.hotKeys,\n [key]: { handler, options, allowDocumentHandler },\n },\n});\n\nexport const registerHotKeysHookToInstance = (instance, hotKeysHook) => {\n const hotKeys = hotKeysHook(instance);\n if (Array.isArray(hotKeys)) {\n return hotKeys.reduce(reduceHotKey, instance);\n }\n return reduceHotKey(instance, hotKeys);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,oBACX,CAAC,aAAa,CAAC,GAAG,SAChB,CAAC,QAAQ,CAAC,GAAG,gBAAgB;AAC3B,MAAI,YAAY;AAChB,aAAW,QAAQ,CAAC,cAAc;AAChC,gBAAY,UAAU,WAAW,MAAM,WAAW;AAAA,EACpD,CAAC;AACD,SAAO;AACT;AAGG,SAAS,mBAAmB,YAAY,OAAO,cAAc,CAAC,GAAG,QAAQ,CAAC,GAAG,MAAM;AACxF,MAAI,YAAY;AAChB,aAAW,QAAQ,CAAC,cAAc;AAChC,gBAAY,UAAU,OAAO,aAAa,WAAW,IAAI;AAAA,EAC3D,CAAC;AACD,SAAO;AACT;AAGO,SAAS,mBAAmB,YAAY,OAAO,cAAc,CAAC,GAAG,MAAM;AAC5E,SAAO,WAAW,OAAO,CAAC,QAAQ,cAAc,UAAU,QAAQ,aAAa,IAAI,GAAG,KAAK;AAC7F;AAEO,SAAS,kBAAkB,YAAY,UAAU,eAAe,CAAC,WAAW,OAAO,KAAK,MAAM;AAGnG,S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}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/defer-render-hoc/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { PureComponent } from 'react';\nimport raf from 'raf';\nimport hoistNonReactStatic from 'hoist-non-react-statics';\n\n/**\n * Allows two animation frames to complete to allow other components to update\n * and re-render before mounting and rendering an expensive `WrappedComponent`.\n *\n * @param WrappedComponent\n * @param fallback\n */\nexport const deferComponentRender = (WrappedComponent, fallback) => {\n class DeferredRenderWrapper extends PureComponent {\n state = { shouldRender: false };\n\n componentDidMount() {\n raf(() => raf(() => this.setState({ shouldRender: true })));\n }\n\n render() {\n // eslint-disable-next-line react/destructuring-assignment\n return this.state.shouldRender ?
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import React, { PureComponent } from 'react';\nimport raf from 'raf';\nimport hoistNonReactStatic from 'hoist-non-react-statics';\n\n/**\n * Allows two animation frames to complete to allow other components to update\n * and re-render before mounting and rendering an expensive `WrappedComponent`.\n *\n * @param WrappedComponent\n * @param fallback\n */\nexport const deferComponentRender = (WrappedComponent, fallback) => {\n class DeferredRenderWrapper extends PureComponent {\n state = { shouldRender: false };\n\n componentDidMount() {\n raf(() => raf(() => this.setState({ shouldRender: true })));\n }\n\n render() {\n // eslint-disable-next-line react/destructuring-assignment\n return this.state.shouldRender ? <WrappedComponent {...this.props} /> : fallback;\n }\n }\n\n return hoistNonReactStatic(DeferredRenderWrapper, WrappedComponent);\n};\n\nexport default deferComponentRender;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqBgB;AArBvC,mBAAqC;AACrC,iBAAgB;AAChB,qCAAgC;AASzB,MAAM,uBAAuB,CAAC,kBAAkB,aAAa;AAClE,QAAM,8BAA8B,2BAAc;AAAA,IAAlD;AAAA;AACE,mBAAQ,EAAE,cAAc,MAAM;AAAA;AAAA,IAE9B,oBAAoB;AAClB,qBAAAA,SAAI,UAAM,WAAAA,SAAI,MAAM,KAAK,SAAS,EAAE,cAAc,KAAK,CAAC,CAAC,CAAC;AAAA,IAC5D;AAAA,IAEA,SAAS;AAEP,aAAO,KAAK,MAAM,eAAe,4CAAC,oBAAkB,GAAG,KAAK,OAAO,IAAK;AAAA,IAC1E;AAAA,EACF;AAEA,aAAO,+BAAAC,SAAoB,uBAAuB,gBAAgB;AACpE;AAEA,IAAO,2BAAQ;",
|
|
6
6
|
"names": ["raf", "hoistNonReactStatic"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/dimsum.config.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["const dimsumConfig = {\n classNamePrefix: 'em-ds',\n};\n\nexport { dimsumConfig };\nexport default dimsumConfig;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,MAAM,eAAe;AAAA,EACnB,iBAAiB;AACnB;AAGA,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -15,6 +15,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
};
|
|
16
16
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
17
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
20
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
18
22
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
19
23
|
mod
|
|
20
24
|
));
|
|
@@ -22,20 +26,20 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
26
|
var src_exports = {};
|
|
23
27
|
module.exports = __toCommonJS(src_exports);
|
|
24
28
|
var React = __toESM(require("react"));
|
|
25
|
-
__reExport(src_exports, require("./Animations"), module.exports);
|
|
26
|
-
__reExport(src_exports, require("./createDataInstance"), module.exports);
|
|
27
|
-
__reExport(src_exports, require("./defer-render-hoc"), module.exports);
|
|
28
|
-
__reExport(src_exports, require("./FocusGroup"), module.exports);
|
|
29
|
-
__reExport(src_exports, require("./GroupContext"), module.exports);
|
|
30
|
-
__reExport(src_exports, require("./ScrollSync"), module.exports);
|
|
31
|
-
__reExport(src_exports, require("./toolbar/ToolbarProvider"), module.exports);
|
|
32
|
-
__reExport(src_exports, require("./useDataGrid"), module.exports);
|
|
33
|
-
__reExport(src_exports, require("./useDataList"), module.exports);
|
|
34
|
-
__reExport(src_exports, require("./virtualization"), module.exports);
|
|
35
|
-
__reExport(src_exports, require("./CheckableGroup"), module.exports);
|
|
36
|
-
__reExport(src_exports, require("./constants"), module.exports);
|
|
37
|
-
__reExport(src_exports, require("./DeferRenderAfterComputation"), module.exports);
|
|
38
|
-
__reExport(src_exports, require("./dimsum.config"), module.exports);
|
|
39
|
-
__reExport(src_exports, require("./prop-types"), module.exports);
|
|
40
|
-
__reExport(src_exports, require("./utils"), module.exports);
|
|
29
|
+
__reExport(src_exports, require("./Animations/index.js"), module.exports);
|
|
30
|
+
__reExport(src_exports, require("./createDataInstance/index.js"), module.exports);
|
|
31
|
+
__reExport(src_exports, require("./defer-render-hoc/index.js"), module.exports);
|
|
32
|
+
__reExport(src_exports, require("./FocusGroup/index.js"), module.exports);
|
|
33
|
+
__reExport(src_exports, require("./GroupContext/index.js"), module.exports);
|
|
34
|
+
__reExport(src_exports, require("./ScrollSync/index.js"), module.exports);
|
|
35
|
+
__reExport(src_exports, require("./toolbar/ToolbarProvider.js"), module.exports);
|
|
36
|
+
__reExport(src_exports, require("./useDataGrid/index.js"), module.exports);
|
|
37
|
+
__reExport(src_exports, require("./useDataList/index.js"), module.exports);
|
|
38
|
+
__reExport(src_exports, require("./virtualization/index.js"), module.exports);
|
|
39
|
+
__reExport(src_exports, require("./CheckableGroup.js"), module.exports);
|
|
40
|
+
__reExport(src_exports, require("./constants.js"), module.exports);
|
|
41
|
+
__reExport(src_exports, require("./DeferRenderAfterComputation.js"), module.exports);
|
|
42
|
+
__reExport(src_exports, require("./dimsum.config.js"), module.exports);
|
|
43
|
+
__reExport(src_exports, require("./prop-types.js"), module.exports);
|
|
44
|
+
__reExport(src_exports, require("./utils.js"), module.exports);
|
|
41
45
|
//# 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.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from './Animations';\nexport * from './createDataInstance';\nexport * from './defer-render-hoc';\nexport * from './FocusGroup';\nexport * from './GroupContext';\nexport * from './ScrollSync';\nexport * from './toolbar/ToolbarProvider';\nexport * from './useDataGrid';\nexport * from './useDataList';\nexport * from './virtualization';\n\nexport * from './CheckableGroup';\nexport * from './constants';\nexport * from './DeferRenderAfterComputation';\nexport * from './dimsum.config';\nexport * from './prop-types';\nexport * from './utils';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export * from './Animations/index.js';\nexport * from './createDataInstance/index.js';\nexport * from './defer-render-hoc/index.js';\nexport * from './FocusGroup/index.js';\nexport * from './GroupContext/index.js';\nexport * from './ScrollSync/index.js';\nexport * from './toolbar/ToolbarProvider.js';\nexport * from './useDataGrid/index.js';\nexport * from './useDataList/index.js';\nexport * from './virtualization/index.js';\n\nexport * from './CheckableGroup.js';\nexport * from './constants.js';\nexport * from './DeferRenderAfterComputation.js';\nexport * from './dimsum.config.js';\nexport * from './prop-types.js';\nexport * from './utils.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,kCAAd;AACA,wBAAc,0CADd;AAEA,wBAAc,wCAFd;AAGA,wBAAc,kCAHd;AAIA,wBAAc,oCAJd;AAKA,wBAAc,kCALd;AAMA,wBAAc,yCANd;AAOA,wBAAc,mCAPd;AAQA,wBAAc,mCARd;AASA,wBAAc,sCATd;AAWA,wBAAc,gCAXd;AAYA,wBAAc,2BAZd;AAaA,wBAAc,6CAbd;AAcA,wBAAc,+BAdd;AAeA,wBAAc,4BAfd;AAgBA,wBAAc,uBAhBd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/prop-types.js
CHANGED
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/prop-types.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export const dsBasicSizes = ['s' as const, 'm' as const, 'l' as const];\n\nexport const sizes = ['xsmall' as const, 'small' as const, 'medium' as const, 'large' as const, 'xlarge' as const];\n\nexport const iconSizes = [\n 'xxs' as const,\n 'xs' as const,\n 's' as const,\n 'm' as const,\n 'l' as const,\n 'xl' as const,\n 'xxl' as const,\n];\n\nexport const iconColors = [\n ['neutral', '900'] as const,\n ['neutral', '0'] as const,\n ['danger', '900'] as const,\n ['warning', '500'] as const,\n ['success', '900'] as const,\n ['brand-primary', '600'] as const,\n] as const;\n\nexport const CHECKBOX_VARIANT = {\n DEFAULT: 'variant-default' as const,\n FOCUS: 'variant-focus' as const,\n ACTIVE: 'variant-active' as const,\n DISABLED: 'variant-disabled' as const,\n ERROR: 'variant-error' as const,\n};\nexport const checkboxVariants = [\n CHECKBOX_VARIANT.DEFAULT,\n CHECKBOX_VARIANT.FOCUS,\n CHECKBOX_VARIANT.ACTIVE,\n CHECKBOX_VARIANT.DISABLED,\n CHECKBOX_VARIANT.ERROR,\n] as const;\n\nexport const COMBOBOX_VARIANT = {\n DEFAULT: 'variant-default' as const,\n FOCUS: 'variant-focus-input' as const,\n FOCUS_ICON: 'variant-focus-icon' as const,\n ACTIVE: 'variant-active-input' as const,\n ACTIVE_ICON: 'variant-active-icon' as const,\n DISABLED: 'variant-disabled' as const,\n ERROR: 'variant-error' as const,\n};\n\nexport const comboBoxVariants = [\n COMBOBOX_VARIANT.DEFAULT,\n COMBOBOX_VARIANT.FOCUS,\n COMBOBOX_VARIANT.FOCUS_ICON,\n COMBOBOX_VARIANT.ACTIVE,\n COMBOBOX_VARIANT.ACTIVE_ICON,\n COMBOBOX_VARIANT.DISABLED,\n COMBOBOX_VARIANT.ERROR,\n] as const;\n\nexport const sizeVariants = {\n S: 's' as const,\n M: 'm' as const,\n L: 'l' as const,\n};\n\nexport const position = {\n LEFT: 'left' as const,\n RIGHT: 'right' as const,\n CENTER: 'center' as const,\n};\n\nexport const fontColor = {\n NEUTRAL500: 'neutral500' as const,\n NEUTRAL700: 'neutral700' as const,\n};\n\nexport const orientation = ['horizontal' as const, 'vertical' as const] as const;\n\nexport const orientationVariants = {\n HORIZONTAL: 'horizontal' as const,\n VERTICAL: 'vertical' as const,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AAmB;AAE/D,MAAM,sBAAsB;AAAA,EACjC,YAAY;AAAA,EACZ,UAAU;AACZ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -15,6 +15,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
};
|
|
16
16
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
17
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
20
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
18
22
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
19
23
|
mod
|
|
20
24
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/react-spring/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from 'react-spring/web';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,iCAAc,6BAAd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -15,6 +15,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
};
|
|
16
16
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
17
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
20
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
18
22
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
19
23
|
mod
|
|
20
24
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/react-spring/renderprops.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from 'react-spring/renderprops';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,gCAAc,qCAAd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/toolbar/ToolbarProvider.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React, { useMemo, useRef, useState, useEffect, memo } from 'react';\nimport { DSPopover } from '@elliemae/ds-popover';\nimport { useOnClickOutside } from '@elliemae/ds-utilities';\n\nexport const ToolbarContext = React.createContext();\n\nconst { Provider } = ToolbarContext;\n\nconst useScrollListener = (callback, dependencies) => {\n useEffect(() => {\n window.addEventListener('scroll', callback, true);\n return () => {\n window.removeEventListener('scroll', callback, true);\n };\n }, [dependencies]);\n};\n\nconst noop = () => null;\nconst ToolbarProvider = memo(({ delay = 200, children, onHide = noop, onShow = noop }) => {\n const showTimer = useRef();\n const hideTimer = useRef();\n const toolbarRef = useRef();\n const [tooltipState, setTooltipState] = useState({});\n\n const show = (state) => {\n if (state.reference === tooltipState.reference) clearTimeout(hideTimer.current);\n showTimer.current = setTimeout(\n () =>\n setTooltipState({\n ...state,\n visible: true,\n }),\n delay,\n );\n onShow();\n };\n\n const hide = (e, force) => {\n if (!force) clearTimeout(showTimer.current);\n hideTimer.current = setTimeout(\n () =>\n setTooltipState((prevState) => ({\n ...prevState,\n visible: false,\n })),\n 100,\n );\n onHide(tooltipState, e);\n };\n\n useScrollListener((e) => hide(e, true), tooltipState.visible);\n useOnClickOutside(toolbarRef, () => hide());\n\n const keyDownHandler = (e) => {\n if (e.key === 'Escape') {\n hide(e);\n }\n };\n\n useEffect(() => {\n window.addEventListener('keydown', keyDownHandler);\n return () => {\n window.removeEventListener('keydown', keyDownHandler);\n };\n });\n\n const value = useMemo(\n () => ({\n state: tooltipState,\n show,\n hide,\n }),\n [tooltipState.reference],\n );\n\n return (\n <Provider value={value}>\n {children}\n <DSPopover\n boundaries=\"scrollParent\"\n {...(tooltipState.options || {})}\n content={tooltipState.renderer}\n placement=\"left\"\n referenceEl={tooltipState.reference}\n renderer={({ as: Component, style, children: Content }) => (\n <div ref={toolbarRef} onMouseEnter={(e) => show(tooltipState, e)} onMouseLeave={hide}>\n <Component style={style}>{Content}</Component>\n </div>\n )}\n style={tooltipState.style}\n visible={tooltipState.visible}\n />\n </Provider>\n );\n});\n\nexport { ToolbarProvider };\nexport default ToolbarProvider;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;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AAE1C,QAAM,iBAAiB,CAAC,MAAM;AAC5B,QAAI,EAAE,QAAQ,UAAU;AACtB,WAAK,CAAC;AAAA,IACR;AAAA,EACF;AAEA,8BAAU,MAAM;AACd,WAAO,iBAAiB,WAAW,cAAc;AACjD,WAAO,MAAM;AACX,aAAO,oBAAoB,WAAW,cAAc;AAAA,IACtD;AAAA,EACF,CAAC;AAED,QAAM,YAAQ;AAAA,IACZ,OAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,aAAa,SAAS;AAAA,EACzB;AAEA,SACE,6CAAC,YAAS,OACP;AAAA;AAAA,IACD;AAAA,MAAC;AAAA;AAAA,QACC,YAAW;AAAA,QACV,GAAI,aAAa,WAAW,CAAC;AAAA,QAC9B,SAAS,aAAa;AAAA,QACtB,WAAU;AAAA,QACV,aAAa,aAAa;AAAA,QAC1B,UAAU,CAAC,EAAE,IAAI,WAAW,OAAO,UAAU,QAAQ,MACnD,4CAAC,SAAI,KAAK,YAAY,cAAc,CAAC,MAAM,KAAK,cAAc,CAAC,GAAG,cAAc,MAC9E,sDAAC,aAAU,OAAe,mBAAQ,GACpC;AAAA,QAEF,OAAO,aAAa;AAAA,QACpB,SAAS,aAAa;AAAA;AAAA,IACxB;AAAA,KACF;AAEJ,CAAC;AAGD,IAAO,0BAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/useDataGrid/VolatileRowsListener.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { safeCall } from '@elliemae/ds-utilities';\n\nclass VolatileRowsListener {\n observers = [];\n\n observe(listener) {\n this.observers.push(listener);\n }\n\n notify(nextRows) {\n this.observers.forEach(observer => safeCall(observer, nextRows));\n this.observers = [];\n }\n}\n\nexport { VolatileRowsListener };\nexport default VolatileRowsListener;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { safeCall } from '@elliemae/ds-utilities';\n\nclass VolatileRowsListener {\n observers = [];\n\n observe(listener) {\n this.observers.push(listener);\n }\n\n notify(nextRows) {\n this.observers.forEach((observer) => safeCall(observer, nextRows));\n this.observers = [];\n }\n}\n\nexport { VolatileRowsListener };\nexport default VolatileRowsListener;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAyB;AAEzB,MAAM,qBAAqB;AAAA,EAA3B;AACE,qBAAY,CAAC;AAAA;AAAA,EAEb,QAAQ,UAAU;AAChB,SAAK,UAAU,KAAK,QAAQ;AAAA,EAC9B;AAAA,EAEA,OAAO,UAAU;AACf,SAAK,UAAU,QAAQ,CAAC,iBAAa,8BAAS,UAAU,QAAQ,CAAC;AACjE,SAAK,YAAY,CAAC;AAAA,EACpB;AACF;AAGA,IAAO,+BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -15,6 +15,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
};
|
|
16
16
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
17
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
20
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
18
22
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
19
23
|
mod
|
|
20
24
|
));
|
|
@@ -22,7 +26,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
26
|
var useDataGrid_exports = {};
|
|
23
27
|
module.exports = __toCommonJS(useDataGrid_exports);
|
|
24
28
|
var React = __toESM(require("react"));
|
|
25
|
-
__reExport(useDataGrid_exports, require("./initColumnDefinition"), module.exports);
|
|
26
|
-
__reExport(useDataGrid_exports, require("./VolatileRowsListener"), module.exports);
|
|
27
|
-
__reExport(useDataGrid_exports, require("./useDataGrid"), module.exports);
|
|
29
|
+
__reExport(useDataGrid_exports, require("./initColumnDefinition.js"), module.exports);
|
|
30
|
+
__reExport(useDataGrid_exports, require("./VolatileRowsListener.js"), module.exports);
|
|
31
|
+
__reExport(useDataGrid_exports, require("./useDataGrid.js"), module.exports);
|
|
28
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/useDataGrid/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export * from './initColumnDefinition';\nexport * from './VolatileRowsListener';\nexport * from './useDataGrid';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export * from './initColumnDefinition.js';\nexport * from './VolatileRowsListener.js';\nexport * from './useDataGrid.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,gCAAc,sCAAd;AACA,gCAAc,sCADd;AAEA,gCAAc,6BAFd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
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.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -78,8 +82,9 @@ const mergeClassNameToColumnHeader = (0, import_ds_utilities.curry)((className,
|
|
|
78
82
|
}
|
|
79
83
|
};
|
|
80
84
|
});
|
|
81
|
-
const initColumnDefinition = (options = {}) =>
|
|
82
|
-
|
|
85
|
+
const initColumnDefinition = (options = {}) => (
|
|
86
|
+
// eslint-disable-next-line complexity
|
|
87
|
+
(column) => {
|
|
83
88
|
if (column.type === "number") {
|
|
84
89
|
column.cellStyle = {
|
|
85
90
|
textAlign: "right"
|
|
@@ -139,7 +144,7 @@ const initColumnDefinition = (options = {}) => {
|
|
|
139
144
|
column.isUserColumn = column.isUserColumn || isUserColumn;
|
|
140
145
|
column.headerHookEffects = [];
|
|
141
146
|
return column;
|
|
142
|
-
}
|
|
143
|
-
|
|
147
|
+
}
|
|
148
|
+
);
|
|
144
149
|
var initColumnDefinition_default = initColumnDefinition;
|
|
145
150
|
//# sourceMappingURL=initColumnDefinition.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/useDataGrid/initColumnDefinition.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable react/display-name */\nimport React from 'react';\nimport { v4 as uuidv4 } from 'uuid';\nimport { get, curry, set, cloneDeep, isFunction } from '@elliemae/ds-utilities';\n\n// TODO: use lenses to access nested fields\n\nexport const appendHeaderFormatter = curry((formatter, column) => ({\n ...column,\n header: {\n ...column.header,\n formatters: [...get(column, 'header.formatters', []), formatter],\n },\n}));\n\nexport const appendCellFormatter = curry((formatter, column, path = 'formatters') => {\n const nextColumn = cloneDeep(column);\n const formatters = get(nextColumn, ['cell', path], []);\n const scrollingFormatters = get(nextColumn, 'cell.scrollingFormatters', []);\n if (Array.isArray(formatter)) {\n if (formatter[1]) scrollingFormatters.push(formatter[1]);\n formatters.push(formatter[0]);\n } else {\n formatters.push(formatter);\n scrollingFormatters.push(formatter);\n }\n set(nextColumn, ['cell', path], formatters);\n set(nextColumn, 'cell.scrollingFormatters', scrollingFormatters);\n return nextColumn;\n});\n\nconst defaultColumnDefinitionOptions = {\n normalize: false,\n useTextTruncation: true,\n isUserColumn: true,\n visible: true,\n};\n\nexport const mergeClassNameToColumnHeader = curry((className, column) => {\n const headerProps = get(column, ['header', 'props'], {});\n const headerClassName = headerProps.className || '';\n return {\n ...column,\n header: {\n ...column.header,\n props: {\n ...headerProps,\n className: `${headerClassName} ${className}`,\n },\n },\n };\n});\n\nexport const initColumnDefinition
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable react/display-name */\nimport React from 'react';\nimport { v4 as uuidv4 } from 'uuid';\nimport { get, curry, set, cloneDeep, isFunction } from '@elliemae/ds-utilities';\n\n// TODO: use lenses to access nested fields\n\nexport const appendHeaderFormatter = curry((formatter, column) => ({\n ...column,\n header: {\n ...column.header,\n formatters: [...get(column, 'header.formatters', []), formatter],\n },\n}));\n\nexport const appendCellFormatter = curry((formatter, column, path = 'formatters') => {\n const nextColumn = cloneDeep(column);\n const formatters = get(nextColumn, ['cell', path], []);\n const scrollingFormatters = get(nextColumn, 'cell.scrollingFormatters', []);\n if (Array.isArray(formatter)) {\n if (formatter[1]) scrollingFormatters.push(formatter[1]);\n formatters.push(formatter[0]);\n } else {\n formatters.push(formatter);\n scrollingFormatters.push(formatter);\n }\n set(nextColumn, ['cell', path], formatters);\n set(nextColumn, 'cell.scrollingFormatters', scrollingFormatters);\n return nextColumn;\n});\n\nconst defaultColumnDefinitionOptions = {\n normalize: false,\n useTextTruncation: true,\n isUserColumn: true,\n visible: true,\n};\n\nexport const mergeClassNameToColumnHeader = curry((className, column) => {\n const headerProps = get(column, ['header', 'props'], {});\n const headerClassName = headerProps.className || '';\n return {\n ...column,\n header: {\n ...column.header,\n props: {\n ...headerProps,\n className: `${headerClassName} ${className}`,\n },\n },\n };\n});\n\nexport const initColumnDefinition =\n (options = {}) =>\n // eslint-disable-next-line complexity\n (column) => {\n // todo: clean this\n if (column.type === 'number') {\n // eslint-disable-next-line no-param-reassign\n column.cellStyle = {\n textAlign: 'right',\n };\n }\n const {\n useTextTruncation = true,\n isUserColumn,\n visible,\n normalize,\n } = {\n ...defaultColumnDefinitionOptions,\n ...options,\n };\n\n if (normalize) {\n // eslint-disable-next-line no-param-reassign\n column.originalProperty = column.property;\n // eslint-disable-next-line no-param-reassign\n column.property = column.property.replace(/\\s+/g, '');\n }\n\n // eslint-disable-next-line no-param-reassign\n column.props = {\n ...column.props,\n style: {},\n };\n // eslint-disable-next-line no-param-reassign\n column.header = {\n ...column.header,\n label: column.label,\n formatters: [...get(column, ['header', 'formatters'], [])],\n props: {\n style: column.headerStyle || {},\n },\n };\n if (useTextTruncation && !(isFunction(column.customHeaderRenderer) || column.header.formatters.length)) {\n column.header.formatters.push((value) => <span className=\"cell-value\">{value}</span>);\n }\n\n // eslint-disable-next-line no-param-reassign\n column.cell = {\n ...column.cell,\n transforms: [],\n formatters: [...get(column, ['cell', 'formatters'], [])],\n scrollingFormatters: [...get(column, ['cell', 'formatters'], [])],\n props: {\n style: column.cellStyle || {},\n },\n };\n\n if (useTextTruncation && !(isFunction(column.customRenderer) || column.cell.formatters.length)) {\n column.cell.formatters.push((value) => (\n <span\n className=\"cell-value\"\n style={{\n justifyContent: column.type === 'number' ? 'flex-end' : 'flex-start',\n }}\n >\n {value}\n </span>\n ));\n }\n // eslint-disable-next-line no-param-reassign\n column.uuid = column.uuid || uuidv4();\n // eslint-disable-next-line no-param-reassign\n column.visible = column.visible === undefined ? visible : column.visible;\n // eslint-disable-next-line no-param-reassign, max-lines\n column.isUserColumn = column.isUserColumn || isUserColumn;\n // eslint-disable-next-line no-param-reassign\n column.headerHookEffects = [];\n return column;\n };\n\nexport default initColumnDefinition;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiGwB;AA9F/C,kBAA6B;AAC7B,0BAAuD;AAIhD,MAAM,4BAAwB,2BAAM,CAAC,WAAW,YAAY;AAAA,EACjE,GAAG;AAAA,EACH,QAAQ;AAAA,IACN,GAAG,OAAO;AAAA,IACV,YAAY,CAAC,OAAG,yBAAI,QAAQ,qBAAqB,CAAC,CAAC,GAAG,SAAS;AAAA,EACjE;AACF,EAAE;AAEK,MAAM,0BAAsB,2BAAM,CAAC,WAAW,QAAQ,OAAO,iBAAiB;AACnF,QAAM,iBAAa,+BAAU,MAAM;AACnC,QAAM,iBAAa,yBAAI,YAAY,CAAC,QAAQ,IAAI,GAAG,CAAC,CAAC;AACrD,QAAM,0BAAsB,yBAAI,YAAY,4BAA4B,CAAC,CAAC;AAC1E,MAAI,MAAM,QAAQ,S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