@elliemae/ds-shared 3.16.0-next.1 → 3.16.0-next.11
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 +1 -13
- package/dist/cjs/Animations/BaseAnimation.js.map +2 -2
- package/dist/cjs/Animations/Grow.js +2 -10
- package/dist/cjs/Animations/Grow.js.map +2 -2
- package/dist/cjs/Animations/GrowRight.js +1 -1
- package/dist/cjs/Animations/GrowRight.js.map +1 -1
- package/dist/cjs/Animations/GrowVertical.js +1 -1
- package/dist/cjs/Animations/GrowVertical.js.map +1 -1
- package/dist/cjs/Animations/index.js +4 -4
- package/dist/cjs/Animations/index.js.map +2 -2
- package/dist/cjs/CheckableGroup.js +2 -4
- package/dist/cjs/CheckableGroup.js.map +2 -2
- package/dist/cjs/DeferRenderAfterComputation.js +1 -6
- package/dist/cjs/DeferRenderAfterComputation.js.map +2 -2
- package/dist/cjs/FocusGroup/FocusGrid.js +1 -1
- package/dist/cjs/FocusGroup/FocusGrid.js.map +2 -2
- package/dist/cjs/FocusGroup/FocusGroupManager.js +2 -2
- package/dist/cjs/FocusGroup/FocusGroupManager.js.map +2 -2
- package/dist/cjs/FocusGroup/focusGroupManagerHoc.js +13 -16
- package/dist/cjs/FocusGroup/focusGroupManagerHoc.js.map +2 -2
- package/dist/cjs/FocusGroup/index.js +7 -7
- package/dist/cjs/FocusGroup/index.js.map +2 -2
- package/dist/cjs/FocusGroup/useFocusGroupItem.js +1 -1
- package/dist/cjs/FocusGroup/useFocusGroupItem.js.map +2 -2
- package/dist/cjs/FocusGroup/utils/getNextCellPosition.js.map +1 -1
- package/dist/cjs/GroupContext/Group.js +1 -1
- package/dist/cjs/GroupContext/Group.js.map +1 -1
- package/dist/cjs/GroupContext/GroupItem.js +1 -1
- package/dist/cjs/GroupContext/GroupItem.js.map +2 -2
- package/dist/cjs/GroupContext/index.js +3 -3
- package/dist/cjs/GroupContext/index.js.map +1 -1
- package/dist/cjs/ScrollSync/ScrollSyncPane.js +2 -4
- package/dist/cjs/ScrollSync/ScrollSyncPane.js.map +2 -2
- package/dist/cjs/ScrollSync/ScrollSyncProvider.js +21 -21
- package/dist/cjs/ScrollSync/ScrollSyncProvider.js.map +2 -2
- package/dist/cjs/ScrollSync/index.js +4 -4
- package/dist/cjs/ScrollSync/index.js.map +2 -2
- package/dist/cjs/ScrollSync/useScrollSync.js +1 -3
- package/dist/cjs/ScrollSync/useScrollSync.js.map +2 -2
- package/dist/cjs/createDataInstance/createInstanceRef.js +6 -25
- package/dist/cjs/createDataInstance/createInstanceRef.js.map +2 -2
- package/dist/cjs/createDataInstance/index.js +3 -3
- package/dist/cjs/createDataInstance/index.js.map +2 -2
- package/dist/cjs/createDataInstance/utils.js +5 -20
- package/dist/cjs/createDataInstance/utils.js.map +2 -2
- package/dist/cjs/defer-render-hoc/index.js.map +2 -2
- package/dist/cjs/index.js +16 -16
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/useDataGrid/VolatileRowsListener.js.map +2 -2
- package/dist/cjs/useDataGrid/index.js +3 -3
- package/dist/cjs/useDataGrid/index.js.map +2 -2
- package/dist/cjs/useDataGrid/initColumnDefinition.js +71 -70
- package/dist/cjs/useDataGrid/initColumnDefinition.js.map +2 -2
- package/dist/cjs/useDataGrid/useDataGrid.js +33 -67
- package/dist/cjs/useDataGrid/useDataGrid.js.map +2 -2
- package/dist/cjs/useDataList/index.js +2 -2
- package/dist/cjs/useDataList/index.js.map +2 -2
- package/dist/cjs/useDataList/recordIterator.js.map +2 -2
- package/dist/cjs/useDataList/useDataList.js +10 -22
- package/dist/cjs/useDataList/useDataList.js.map +3 -3
- package/dist/cjs/utils.js +1 -3
- package/dist/cjs/utils.js.map +2 -2
- package/dist/cjs/virtualization/FluidHeightList.js +8 -10
- package/dist/cjs/virtualization/FluidHeightList.js.map +2 -2
- package/dist/cjs/virtualization/index.js +2 -2
- package/dist/cjs/virtualization/index.js.map +1 -1
- 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 +2 -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/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 +1 -1
- 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/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/createInstanceRef.js +6 -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 +72 -77
- package/dist/esm/useDataGrid/initColumnDefinition.js.map +2 -2
- package/dist/esm/useDataGrid/useDataGrid.js +33 -71
- 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 +8 -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/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/Grow.d.ts +1 -1
- 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/index.d.ts +7 -7
- package/dist/types/GroupContext/index.d.ts +3 -3
- package/dist/types/ScrollSync/ScrollSyncProvider.d.ts +10 -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 +5 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/virtualization/FluidHeightList.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { forwardRef } from 'react';\nimport AutoSizer from 'react-virtualized-auto-sizer';\n\nexport const FluidHeightList = forwardRef(
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React, { forwardRef } from 'react';\nimport AutoSizer from 'react-virtualized-auto-sizer';\n\nexport const FluidHeightList = forwardRef(({ component: Component, ...props }, ref) => (\n <AutoSizer disableWidth>\n {({ height: fluidHeight }) => (\n <Component\n {...props}\n ref={ref}\n height={fluidHeight - 32} // taking in count the margins of the list\n />\n )}\n </AutoSizer>\n));\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADMjB;AANN,mBAAkC;AAClC,0CAAsB;AAEf,MAAM,sBAAkB,yBAAW,CAAC,EAAE,WAAW,cAAc,MAAM,GAAG,QAC7E,4CAAC,oCAAAA,SAAA,EAAU,cAAY,MACpB,WAAC,EAAE,QAAQ,YAAY,MACtB;AAAA,EAAC;AAAA;AAAA,IACE,GAAG;AAAA,IACJ;AAAA,IACA,QAAQ,cAAc;AAAA;AACxB,GAEJ,CACD;",
|
|
6
6
|
"names": ["AutoSizer"]
|
|
7
7
|
}
|
|
@@ -30,8 +30,8 @@ __export(virtualization_exports, {
|
|
|
30
30
|
});
|
|
31
31
|
module.exports = __toCommonJS(virtualization_exports);
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
|
-
var import_FluidHeightList = require("./FluidHeightList");
|
|
34
|
-
var import_AutoHeightList = require("./AutoHeightList");
|
|
33
|
+
var import_FluidHeightList = require("./FluidHeightList.js");
|
|
34
|
+
var import_AutoHeightList = require("./AutoHeightList.js");
|
|
35
35
|
function getVirtualListComponent({ component: Component, fluid, height, autoHeight }) {
|
|
36
36
|
if (autoHeight)
|
|
37
37
|
return import_AutoHeightList.AutoHeightList;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/virtualization/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { FluidHeightList } from './FluidHeightList';\nimport { AutoHeightList } from './AutoHeightList';\n\nexport { FluidHeightList, AutoHeightList };\n\nexport function getVirtualListComponent({ component: Component, fluid, height, autoHeight }) {\n if (autoHeight) return AutoHeightList;\n if (fluid) return FluidHeightList;\n return Component;\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["import { FluidHeightList } from './FluidHeightList.js';\nimport { AutoHeightList } from './AutoHeightList.js';\n\nexport { FluidHeightList, AutoHeightList };\n\nexport function getVirtualListComponent({ component: Component, fluid, height, autoHeight }) {\n if (autoHeight) return AutoHeightList;\n if (fluid) return FluidHeightList;\n return Component;\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,6BAAgC;AAChC,4BAA+B;AAIxB,SAAS,wBAAwB,EAAE,WAAW,WAAW,OAAO,QAAQ,WAAW,GAAG;AAC3F,MAAI;AAAY,WAAO;AACvB,MAAI;AAAO,WAAO;AAClB,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -10,19 +10,7 @@ const BaseAnimation = ({
|
|
|
10
10
|
leave = {},
|
|
11
11
|
onRest = () => null,
|
|
12
12
|
children
|
|
13
|
-
}) => /* @__PURE__ */ jsx(
|
|
14
|
-
Transition,
|
|
15
|
-
{
|
|
16
|
-
config: { duration },
|
|
17
|
-
enter,
|
|
18
|
-
from,
|
|
19
|
-
items,
|
|
20
|
-
keys,
|
|
21
|
-
leave,
|
|
22
|
-
onRest,
|
|
23
|
-
children
|
|
24
|
-
}
|
|
25
|
-
);
|
|
13
|
+
}) => /* @__PURE__ */ jsx(Transition, { config: { duration }, enter, from, items, keys, leave, onRest, children });
|
|
26
14
|
var BaseAnimation_default = BaseAnimation;
|
|
27
15
|
export {
|
|
28
16
|
BaseAnimation,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Animations/BaseAnimation.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { Transition } from 'react-spring/renderprops';\n\nconst BaseAnimation = ({\n keys = undefined,\n items = [],\n duration = 100,\n enter = {},\n from = {},\n leave = {},\n onRest = () => null,\n children,\n}) => (\n <Transition
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACcrB;AAZF,SAAS,kBAAkB;AAE3B,MAAM,gBAAgB,CAAC;AAAA,EACrB,OAAO;AAAA,EACP,QAAQ,CAAC;AAAA,EACT,WAAW;AAAA,EACX,QAAQ,CAAC;AAAA,EACT,OAAO,CAAC;AAAA,EACR,QAAQ,CAAC;AAAA,EACT,SAAS,MAAM;AAAA,EACf;AACF,MACE
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { Transition } from 'react-spring/renderprops';\n\nconst BaseAnimation = ({\n keys = undefined,\n items = [],\n duration = 100,\n enter = {},\n from = {},\n leave = {},\n onRest = () => null,\n children,\n}) => (\n <Transition config={{ duration }} enter={enter} from={from} items={items} keys={keys} leave={leave} onRest={onRest}>\n {children}\n </Transition>\n);\n\nexport { BaseAnimation };\nexport default BaseAnimation;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACcrB;AAZF,SAAS,kBAAkB;AAE3B,MAAM,gBAAgB,CAAC;AAAA,EACrB,OAAO;AAAA,EACP,QAAQ,CAAC;AAAA,EACT,WAAW;AAAA,EACX,QAAQ,CAAC;AAAA,EACT,OAAO,CAAC;AAAA,EACR,QAAQ,CAAC;AAAA,EACT,SAAS,MAAM;AAAA,EACf;AACF,MACE,oBAAC,cAAW,QAAQ,EAAE,SAAS,GAAG,OAAc,MAAY,OAAc,MAAY,OAAc,QACjG,UACH;AAIF,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { BaseAnimation } from "./BaseAnimation";
|
|
4
|
-
const Grow = ({
|
|
5
|
-
keys = void 0,
|
|
6
|
-
duration,
|
|
7
|
-
items = void 0,
|
|
8
|
-
from = 0,
|
|
9
|
-
to = 1,
|
|
10
|
-
children,
|
|
11
|
-
onRest = () => null
|
|
12
|
-
}) => /* @__PURE__ */ jsx(
|
|
3
|
+
import { BaseAnimation } from "./BaseAnimation.js";
|
|
4
|
+
const Grow = ({ keys = void 0, duration, items = void 0, from = 0, to = 1, children, onRest = () => null }) => /* @__PURE__ */ jsx(
|
|
13
5
|
BaseAnimation,
|
|
14
6
|
{
|
|
15
7
|
duration,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Animations/Grow.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { BaseAnimation } from './BaseAnimation';\n\nconst Grow = ({
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { BaseAnimation } from './BaseAnimation.js';\n\nconst Grow = ({ keys = undefined, duration, items = undefined, from = 0, to = 1, children, onRest = () => null }) => (\n <BaseAnimation\n duration={duration}\n enter={{ opacity: 1, transform: `scale(${to})` }}\n from={{ opacity: 0, transform: `scale(${from})` }}\n items={items}\n keys={keys}\n leave={{ opacity: 0, transform: `scale(${from})` }}\n onRest={onRest}\n >\n {children}\n </BaseAnimation>\n);\n\nexport { Grow };\nexport default Grow;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACIrB;AAHF,SAAS,qBAAqB;AAE9B,MAAM,OAAO,CAAC,EAAE,OAAO,QAAW,UAAU,QAAQ,QAAW,OAAO,GAAG,KAAK,GAAG,UAAU,SAAS,MAAM,KAAK,MAC7G;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,OAAO,EAAE,SAAS,GAAG,WAAW,SAAS,MAAM;AAAA,IAC/C,MAAM,EAAE,SAAS,GAAG,WAAW,SAAS,QAAQ;AAAA,IAChD;AAAA,IACA;AAAA,IACA,OAAO,EAAE,SAAS,GAAG,WAAW,SAAS,QAAQ;AAAA,IACjD;AAAA,IAEC;AAAA;AACH;AAIF,IAAO,eAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Animations/GrowRight.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { BaseAnimation } from './BaseAnimation';\n\nconst GrowRight = ({\n keys = undefined,\n items = undefined,\n duration = 200,\n from = 0,\n to = 1,\n children,\n onRest = () => null,\n}) => (\n <BaseAnimation\n duration={duration}\n enter={{\n opacity: `${to}`,\n transform: 'translateX(0px)',\n }}\n from={{\n opacity: `${from}`,\n transform: 'translateX(100%)',\n }}\n items={items}\n keys={keys}\n leave={{\n opacity: `${from}`,\n transform: 'translateX(100%)',\n }}\n onRest={onRest}\n >\n {children}\n </BaseAnimation>\n);\n\nexport { GrowRight };\nexport default GrowRight;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { BaseAnimation } from './BaseAnimation.js';\n\nconst GrowRight = ({\n keys = undefined,\n items = undefined,\n duration = 200,\n from = 0,\n to = 1,\n children,\n onRest = () => null,\n}) => (\n <BaseAnimation\n duration={duration}\n enter={{\n opacity: `${to}`,\n transform: 'translateX(0px)',\n }}\n from={{\n opacity: `${from}`,\n transform: 'translateX(100%)',\n }}\n items={items}\n keys={keys}\n leave={{\n opacity: `${from}`,\n transform: 'translateX(100%)',\n }}\n onRest={onRest}\n >\n {children}\n </BaseAnimation>\n);\n\nexport { GrowRight };\nexport default GrowRight;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACYrB;AAXF,SAAS,qBAAqB;AAE9B,MAAM,YAAY,CAAC;AAAA,EACjB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,OAAO;AAAA,EACP,KAAK;AAAA,EACL;AAAA,EACA,SAAS,MAAM;AACjB,MACE;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,OAAO;AAAA,MACL,SAAS,GAAG;AAAA,MACZ,WAAW;AAAA,IACb;AAAA,IACA,MAAM;AAAA,MACJ,SAAS,GAAG;AAAA,MACZ,WAAW;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,MACL,SAAS,GAAG;AAAA,MACZ,WAAW;AAAA,IACb;AAAA,IACA;AAAA,IAEC;AAAA;AACH;AAIF,IAAO,oBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/Animations/GrowVertical.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { BaseAnimation } from './BaseAnimation';\n\nconst GrowVertical = ({\n keys = undefined,\n duration,\n items = undefined,\n from = 0,\n to = 1,\n children,\n onRest = () => null,\n}) => (\n <BaseAnimation\n duration={duration}\n enter={{ opacity: 1, transform: `scaleY(${to})`, transformOrigin: 'top' }}\n from={{\n opacity: 0,\n transform: `scaleY(${from})`,\n transformOrigin: 'top',\n }}\n items={items}\n keys={keys}\n leave={{\n opacity: 0,\n transform: `scaleY(${from})`,\n transformOrigin: 'top',\n }}\n onRest={onRest}\n >\n {children}\n </BaseAnimation>\n);\n\nexport { GrowVertical };\nexport default GrowVertical;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { BaseAnimation } from './BaseAnimation.js';\n\nconst GrowVertical = ({\n keys = undefined,\n duration,\n items = undefined,\n from = 0,\n to = 1,\n children,\n onRest = () => null,\n}) => (\n <BaseAnimation\n duration={duration}\n enter={{ opacity: 1, transform: `scaleY(${to})`, transformOrigin: 'top' }}\n from={{\n opacity: 0,\n transform: `scaleY(${from})`,\n transformOrigin: 'top',\n }}\n items={items}\n keys={keys}\n leave={{\n opacity: 0,\n transform: `scaleY(${from})`,\n transformOrigin: 'top',\n }}\n onRest={onRest}\n >\n {children}\n </BaseAnimation>\n);\n\nexport { GrowVertical };\nexport default GrowVertical;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACYrB;AAXF,SAAS,qBAAqB;AAE9B,MAAM,eAAe,CAAC;AAAA,EACpB,OAAO;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,KAAK;AAAA,EACL;AAAA,EACA,SAAS,MAAM;AACjB,MACE;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,OAAO,EAAE,SAAS,GAAG,WAAW,UAAU,OAAO,iBAAiB,MAAM;AAAA,IACxE,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,WAAW,UAAU;AAAA,MACrB,iBAAiB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,MACL,SAAS;AAAA,MACT,WAAW,UAAU;AAAA,MACrB,iBAAiB;AAAA,IACnB;AAAA,IACA;AAAA,IAEC;AAAA;AACH;AAIF,IAAO,uBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export * from "./BaseAnimation";
|
|
3
|
-
export * from "./Grow";
|
|
4
|
-
export * from "./GrowRight";
|
|
5
|
-
export * from "./GrowVertical";
|
|
2
|
+
export * from "./BaseAnimation.js";
|
|
3
|
+
export * from "./Grow.js";
|
|
4
|
+
export * from "./GrowRight.js";
|
|
5
|
+
export * from "./GrowVertical.js";
|
|
6
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/Animations/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './BaseAnimation';\nexport * from './Grow';\nexport * from './GrowRight';\nexport * from './GrowVertical';\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './BaseAnimation.js';\nexport * from './Grow.js';\nexport * from './GrowRight.js';\nexport * from './GrowVertical.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -21,13 +21,11 @@ function useCheckableGroup({ children, active: activeProp, multi, onCheck = () =
|
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
const CheckableGroup = ({
|
|
25
25
|
active = [],
|
|
26
26
|
multi = false,
|
|
27
27
|
children
|
|
28
|
-
}) {
|
|
29
|
-
return useCheckableGroup({ active, multi, children });
|
|
30
|
-
}
|
|
28
|
+
}) => useCheckableGroup({ active, multi, children });
|
|
31
29
|
CheckableGroup.propTypes = {
|
|
32
30
|
active: PropTypes.arrayOf(PropTypes.string),
|
|
33
31
|
multi: PropTypes.bool,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/CheckableGroup.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { cloneElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { addOrRemove, runAll, useDerivedStateFromProps } from '@elliemae/ds-utilities';\n\nexport function useCheckableGroup({ children, active: activeProp, multi, onCheck = () => null }) {\n const [active, setActive] = useDerivedStateFromProps(activeProp);\n\n const handleCheck = ({ target: { value } }, item) => {\n setActive((prevActive) => {\n const nextActive = multi ? addOrRemove(prevActive, value) : value;\n onCheck(nextActive, item);\n return nextActive;\n });\n };\n\n return React.Children.map(children, (child) => {\n const { props } = child;\n const checked = Array.isArray(active) ? active.indexOf(props.name) !== -1 : active === props.name;\n\n return cloneElement(child, {\n ...props,\n checked,\n onClick: runAll(handleCheck, props.onClick),\n });\n });\n}\n\nexport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,UAAS,oBAAoB;AACpC,OAAO,eAAe;AACtB,SAAS,aAAa,QAAQ,gCAAgC;AAEvD,SAAS,kBAAkB,EAAE,UAAU,QAAQ,YAAY,OAAO,UAAU,MAAM,KAAK,GAAG;AAC/F,QAAM,CAAC,QAAQ,SAAS,IAAI,yBAAyB,UAAU;AAE/D,QAAM,cAAc,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS;AACnD,cAAU,CAAC,eAAe;AACxB,YAAM,aAAa,QAAQ,YAAY,YAAY,KAAK,IAAI;AAC5D,cAAQ,YAAY,IAAI;AACxB,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,SAAOA,OAAM,SAAS,IAAI,UAAU,CAAC,UAAU;AAC7C,UAAM,EAAE,MAAM,IAAI;AAClB,UAAM,UAAU,MAAM,QAAQ,MAAM,IAAI,OAAO,QAAQ,MAAM,IAAI,MAAM,KAAK,WAAW,MAAM;AAE7F,WAAO,aAAa,OAAO;AAAA,MACzB,GAAG;AAAA,MACH;AAAA,MACA,SAAS,OAAO,aAAa,MAAM,OAAO;AAAA,IAC5C,CAAC;AAAA,EACH,CAAC;AACH;AAEO,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { cloneElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { addOrRemove, runAll, useDerivedStateFromProps } from '@elliemae/ds-utilities';\n\nexport function useCheckableGroup({ children, active: activeProp, multi, onCheck = () => null }) {\n const [active, setActive] = useDerivedStateFromProps(activeProp);\n\n const handleCheck = ({ target: { value } }, item) => {\n setActive((prevActive) => {\n const nextActive = multi ? addOrRemove(prevActive, value) : value;\n onCheck(nextActive, item);\n return nextActive;\n });\n };\n\n return React.Children.map(children, (child) => {\n const { props } = child;\n const checked = Array.isArray(active) ? active.indexOf(props.name) !== -1 : active === props.name;\n\n return cloneElement(child, {\n ...props,\n checked,\n onClick: runAll(handleCheck, props.onClick),\n });\n });\n}\n\nexport const CheckableGroup = ({\n active = [],\n multi = false, // checkbox or radio\n children,\n}) => useCheckableGroup({ active, multi, children });\n\nCheckableGroup.propTypes = {\n /* The item (if multi false) or items (if multi true) selected */\n active: PropTypes.arrayOf(PropTypes.string),\n /* Whether is multi select or not */\n multi: PropTypes.bool,\n /* Handler when a user checks an item */\n onCheck: PropTypes.func,\n};\n\nexport default CheckableGroup;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,UAAS,oBAAoB;AACpC,OAAO,eAAe;AACtB,SAAS,aAAa,QAAQ,gCAAgC;AAEvD,SAAS,kBAAkB,EAAE,UAAU,QAAQ,YAAY,OAAO,UAAU,MAAM,KAAK,GAAG;AAC/F,QAAM,CAAC,QAAQ,SAAS,IAAI,yBAAyB,UAAU;AAE/D,QAAM,cAAc,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS;AACnD,cAAU,CAAC,eAAe;AACxB,YAAM,aAAa,QAAQ,YAAY,YAAY,KAAK,IAAI;AAC5D,cAAQ,YAAY,IAAI;AACxB,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,SAAOA,OAAM,SAAS,IAAI,UAAU,CAAC,UAAU;AAC7C,UAAM,EAAE,MAAM,IAAI;AAClB,UAAM,UAAU,MAAM,QAAQ,MAAM,IAAI,OAAO,QAAQ,MAAM,IAAI,MAAM,KAAK,WAAW,MAAM;AAE7F,WAAO,aAAa,OAAO;AAAA,MACzB,GAAG;AAAA,MACH;AAAA,MACA,SAAS,OAAO,aAAa,MAAM,OAAO;AAAA,IAC5C,CAAC;AAAA,EACH,CAAC;AACH;AAEO,MAAM,iBAAiB,CAAC;AAAA,EAC7B,SAAS,CAAC;AAAA,EACV,QAAQ;AAAA,EACR;AACF,MAAM,kBAAkB,EAAE,QAAQ,OAAO,SAAS,CAAC;AAEnD,eAAe,YAAY;AAAA,EAEzB,QAAQ,UAAU,QAAQ,UAAU,MAAM;AAAA,EAE1C,OAAO,UAAU;AAAA,EAEjB,SAAS,UAAU;AACrB;AAEA,IAAO,yBAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import raf from "raf";
|
|
4
|
-
const DeferRenderAfterComputation = ({
|
|
5
|
-
children,
|
|
6
|
-
resolve,
|
|
7
|
-
fallback,
|
|
8
|
-
timeout = 2e3
|
|
9
|
-
}) => {
|
|
4
|
+
const DeferRenderAfterComputation = ({ children, resolve, fallback, timeout = 2e3 }) => {
|
|
10
5
|
const [shouldRender, setShouldRender] = useState(false);
|
|
11
6
|
useEffect(() => {
|
|
12
7
|
raf(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DeferRenderAfterComputation.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useEffect, useState } from 'react';\nimport raf from 'raf';\n\nexport const DeferRenderAfterComputation = ({
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAW,gBAAgB;AACpC,OAAO,SAAS;AAET,MAAM,8BAA8B,CAAC
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useEffect, useState } from 'react';\nimport raf from 'raf';\n\nexport const DeferRenderAfterComputation = ({ children, resolve, fallback, timeout = 2000 }) => {\n const [shouldRender, setShouldRender] = useState(false);\n\n useEffect(() => {\n // eslint-disable-next-line max-nested-callbacks\n raf(() =>\n raf(() =>\n resolve().then(() => {\n setShouldRender(true);\n }),\n ),\n );\n }, []);\n return shouldRender ? children : fallback;\n};\n\nexport default DeferRenderAfterComputation;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAW,gBAAgB;AACpC,OAAO,SAAS;AAET,MAAM,8BAA8B,CAAC,EAAE,UAAU,SAAS,UAAU,UAAU,IAAK,MAAM;AAC9F,QAAM,CAAC,cAAc,eAAe,IAAI,SAAS,KAAK;AAEtD,YAAU,MAAM;AAEd;AAAA,MAAI,MACF;AAAA,QAAI,MACF,QAAQ,EAAE,KAAK,MAAM;AACnB,0BAAgB,IAAI;AAAA,QACtB,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACL,SAAO,eAAe,WAAW;AACnC;AAEA,IAAO,sCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import React2, { createContext, useEffect, useMemo, useRef } from "react";
|
|
4
4
|
import { isFunction, runAll, get, useHotkeys, mergeRefs } from "@elliemae/ds-utilities";
|
|
5
|
-
import { getNextCellPosition } from "./utils/getNextCellPosition";
|
|
5
|
+
import { getNextCellPosition } from "./utils/getNextCellPosition.js";
|
|
6
6
|
const FocusGridContext = createContext();
|
|
7
7
|
const { Provider } = FocusGridContext;
|
|
8
8
|
const preventDefault = (e) => e.preventDefault();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FocusGroup/FocusGrid.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { createContext, useEffect, useMemo, useRef } from 'react';\nimport { isFunction, runAll, get, useHotkeys, mergeRefs } from '@elliemae/ds-utilities';\nimport { getNextCellPosition } from './utils/getNextCellPosition';\n\nconst FocusGridContext = createContext();\nconst { Provider } = FocusGridContext;\n\nconst preventDefault = e => e.preventDefault();\n\nfunction registerHotKeysHooks(hotKeys, { focusedRow, focusedCell }) {\n Object.keys(hotKeys).forEach(key => {\n const { handler, options } = hotKeys[key];\n useHotkeys({\n keys: key,\n handler: e => {\n e.preventDefault();\n handler({\n rowIndex: focusedRow.current,\n cellIndex: focusedCell.current,\n });\n },\n options,\n });\n });\n}\n\n// eslint-disable-next-line max-statements\nconst FocusGridProvider = ({\n shouldWrapRows = false,\n shouldWrapCells = false,\n shouldRefocus = true,\n children,\n keyBindings,\n hotKeys,\n}) => {\n const focusedRow = useRef();\n const focusedCell = useRef();\n const grid = useRef([]);\n const containerRef = useRef(document);\n const child = React.Children.only(children);\n const decoratedChild = React.cloneElement(child, {\n innerRef: mergeRefs(child.props.innerRef, containerRef),\n });\n\n const getNode = ({ rowIndex, cellIndex })
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { createContext, useEffect, useMemo, useRef } from 'react';\nimport { isFunction, runAll, get, useHotkeys, mergeRefs } from '@elliemae/ds-utilities';\nimport { getNextCellPosition } from './utils/getNextCellPosition.js';\n\nconst FocusGridContext = createContext();\nconst { Provider } = FocusGridContext;\n\nconst preventDefault = (e) => e.preventDefault();\n\nfunction registerHotKeysHooks(hotKeys, { focusedRow, focusedCell }) {\n Object.keys(hotKeys).forEach((key) => {\n const { handler, options } = hotKeys[key];\n useHotkeys({\n keys: key,\n handler: (e) => {\n e.preventDefault();\n handler({\n rowIndex: focusedRow.current,\n cellIndex: focusedCell.current,\n });\n },\n options,\n });\n });\n}\n\n// eslint-disable-next-line max-statements\nconst FocusGridProvider = ({\n shouldWrapRows = false,\n shouldWrapCells = false,\n shouldRefocus = true,\n children,\n keyBindings,\n hotKeys,\n}) => {\n const focusedRow = useRef();\n const focusedCell = useRef();\n const grid = useRef([]);\n const containerRef = useRef(document);\n const child = React.Children.only(children);\n const decoratedChild = React.cloneElement(child, {\n innerRef: mergeRefs(child.props.innerRef, containerRef),\n });\n\n const getNode = ({ rowIndex, cellIndex }) => get(grid.current, [rowIndex, cellIndex]);\n\n const register = (node, rowIndex, columnIndex) => {\n if (!node) return;\n if (!Array.isArray(grid.current[rowIndex])) {\n grid.current[rowIndex] = [];\n }\n\n if (rowIndex === 0 && columnIndex === 0) {\n node.setAttribute('tabindex', 0);\n } else {\n node.setAttribute('tabindex', -1);\n }\n\n node.onfocus = () => {\n const prevNode = getNode({\n rowIndex: focusedRow.current,\n cellIndex: focusedCell.current,\n });\n\n if (prevNode) prevNode.setAttribute('tabindex', -1);\n\n node.setAttribute('tabindex', 0);\n focusedRow.current = rowIndex;\n focusedCell.current = columnIndex;\n };\n grid.current[rowIndex][columnIndex] = node;\n };\n\n useEffect(() => {\n if (shouldRefocus) {\n const rowIndex = focusedRow.current;\n const cellIndex = focusedCell.current;\n\n const node = get(grid.current, [rowIndex, cellIndex]);\n if (node) node.focus();\n }\n });\n\n const focusNextCell = (directionY, directionX, position) => {\n const { rowIndex, cellIndex } =\n position ||\n getNextCellPosition({\n grid: grid.current,\n currentCell: focusedCell.current,\n currentRow: focusedRow.current,\n directionX,\n directionY,\n shouldWrapCells,\n shouldWrapRows,\n });\n\n const node = getNode({ rowIndex, cellIndex });\n\n // can focus\n if (node) {\n node.focus();\n focusedRow.current = rowIndex;\n focusedCell.current = cellIndex;\n }\n };\n\n registerHotKeysHooks(hotKeys, { focusedCell, focusedRow });\n\n const defaultKeyBindings = {\n ArrowUp: runAll(preventDefault, () => focusNextCell(-1, 0)),\n ArrowRight: runAll(preventDefault, () => focusNextCell(0, 1)),\n ArrowDown: runAll(preventDefault, () => focusNextCell(1, 0)),\n ArrowLeft: runAll(preventDefault, () => focusNextCell(0, -1)),\n Home: runAll(preventDefault, (e) => {\n let rowIndex = focusedRow.current;\n if (e.ctrlKey) {\n rowIndex = 0;\n }\n focusNextCell(0, 0, { rowIndex, cellIndex: 0 });\n }),\n End: runAll(preventDefault, (e) => {\n let rowIndex = focusedRow.current;\n if (e.ctrlKey) {\n rowIndex = grid.current.length - 1;\n }\n focusNextCell(0, 0, { rowIndex, cellIndex: grid.current[0].length - 1 });\n }),\n ...keyBindings,\n };\n const nextKeyBindings = isFunction(keyBindings)\n ? keyBindings({\n defaultBindings: defaultKeyBindings,\n rowIndex: focusedRow.current,\n cellIndex: focusedCell.current,\n })\n : { ...defaultKeyBindings, ...keyBindings };\n\n const onKeyDown = (e) => {\n if (e.target.tagName.toLowerCase() === 'input') return;\n const action = nextKeyBindings[e.key];\n if (isFunction(action)) action(e);\n };\n\n const activate = (container) => {\n container.addEventListener('keydown', onKeyDown, true);\n };\n\n const deactivate = (container) => {\n container.removeEventListener('keydown', onKeyDown, true);\n };\n\n useEffect(() => {\n activate(containerRef.current);\n return () => {\n deactivate(containerRef.current);\n };\n }, []);\n\n const valueProvider = useMemo(\n () => ({\n register,\n }),\n [],\n );\n\n return <Provider value={valueProvider}>{decoratedChild}</Provider>;\n};\n\nexport { FocusGridProvider, FocusGridProvider as FocusGrid, FocusGridContext };\nexport default FocusGridProvider;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACqKd;AArKT,OAAOA,UAAS,eAAe,WAAW,SAAS,cAAc;AACjE,SAAS,YAAY,QAAQ,KAAK,YAAY,iBAAiB;AAC/D,SAAS,2BAA2B;AAEpC,MAAM,mBAAmB,cAAc;AACvC,MAAM,EAAE,SAAS,IAAI;AAErB,MAAM,iBAAiB,CAAC,MAAM,EAAE,eAAe;AAE/C,SAAS,qBAAqB,SAAS,EAAE,YAAY,YAAY,GAAG;AAClE,SAAO,KAAK,OAAO,EAAE,QAAQ,CAAC,QAAQ;AACpC,UAAM,EAAE,SAAS,QAAQ,IAAI,QAAQ;AACrC,eAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS,CAAC,MAAM;AACd,UAAE,eAAe;AACjB,gBAAQ;AAAA,UACN,UAAU,WAAW;AAAA,UACrB,WAAW,YAAY;AAAA,QACzB,CAAC;AAAA,MACH;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AAGA,MAAM,oBAAoB,CAAC;AAAA,EACzB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,aAAa,OAAO;AAC1B,QAAM,cAAc,OAAO;AAC3B,QAAM,OAA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AAAS;AAChD,UAAM,SAAS,gBAAgB,EAAE;AACjC,QAAI,WAAW,MAAM;AAAG,aAAO,CAAC;AAAA,EAClC;AAEA,QAAM,WAAW,CAAC,cAAc;AAC9B,cAAU,iBAAiB,WAAW,WAAW,IAAI;AAAA,EACvD;AAEA,QAAM,aAAa,CAAC,cAAc;AAChC,cAAU,oBAAoB,WAAW,WAAW,IAAI;AAAA,EAC1D;AAEA,YAAU,MAAM;AACd,aAAS,aAAa,OAAO;AAC7B,WAAO,MAAM;AACX,iBAAW,aAAa,OAAO;AAAA,IACjC;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,gBAAgB;AAAA,IACpB,OAAO;AAAA,MACL;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AAEA,SAAO,oBAAC,YAAS,OAAO,eAAgB,0BAAe;AACzD;AAGA,IAAO,oBAAQ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -2,8 +2,8 @@ import * as React from "react";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Component } from "react";
|
|
4
4
|
import { isFunction } from "@elliemae/ds-utilities";
|
|
5
|
-
import { FocusGroup } from "./FocusGroup";
|
|
6
|
-
import { FocusGroupContext } from "./FocusGroupContext";
|
|
5
|
+
import { FocusGroup } from "./FocusGroup.js";
|
|
6
|
+
import { FocusGroupContext } from "./FocusGroupContext.js";
|
|
7
7
|
const noop = () => null;
|
|
8
8
|
class FocusGroupProvider extends Component {
|
|
9
9
|
constructor(props) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FocusGroup/FocusGroupManager.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { Component, useEffect } from 'react';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport { FocusGroup } from './FocusGroup';\nimport { FocusGroupContext } from './FocusGroupContext';\n\nconst noop = () => null;\n\nclass FocusGroupProvider extends Component {\n activated = false;\n\n static defaultProps = {\n exitWhenNoPrevious: false,\n exitWhenNoNext: false,\n keyBindings: {},\n onFocus: noop,\n onExitFocusGroup: noop,\n onFocusPreviousGroup: noop,\n onFocusNextGroup: noop,\n onFocusGroupSet: noop,\n };\n\n constructor(props) {\n super(props);\n\n this.focusGroup = new FocusGroup(props);\n\n props.onFocusGroupSet(this);\n\n this.actions = {\n activate: this.activate.bind(this),\n deactivate: this.deactivate.bind(this),\n register: this.focusGroup.register,\n unregister: this.unregister.bind(this),\n focusFirst: this.focusGroup.focusFirst,\n focusLast: this.focusGroup.focusLast,\n focusItemByIndex: this.focusItemByIndex.bind(this),\n focusItemByNode: this.focusItemByNode.bind(this),\n focus: this.focusGroup.focusCurrent,\n isGroupActive: this.focusGroup.isGroupActive,\n focusNext: this.focusGroup.focusNext,\n focusPrevious: this.focusGroup.focusPrevious,\n };\n }\n\n componentDidMount() {\n const { autoFocusOnMount } = this.props;\n\n this.activate();\n\n if (autoFocusOnMount) {\n setTimeout(() => {\n this.actions.focusFirst();\n }, 0);\n }\n }\n\n componentWillUnmount() {\n this.deactivate();\n }\n\n activate() {\n const { onActivate } = this.props;\n this.focusGroup.activate();\n this.activated = true;\n if (isFunction(onActivate)) onActivate();\n }\n\n deactivate() {\n const { onExitFocusGroup } = this.props;\n this.activated = false;\n this.focusGroup.deactivate();\n if (isFunction(onExitFocusGroup)) {\n onExitFocusGroup();\n }\n }\n\n register(item) {\n this.focusGroup.register(item);\n }\n\n unregister(item) {\n this.focusGroup.unregister(item);\n }\n\n focusItemByIndex(index) {\n if (!this.activated) this.activate();\n setTimeout(() => {\n this.focusGroup.focusByIndex(index);\n }, 200);\n }\n\n focusItemByNode(node) {\n if (!this.activated) this.activate();\n const index = this.focusGroup.getItemIndexByNode(node);\n this.focusItemByIndex(index);\n }\n\n render() {\n const { children } = this.props;\n return
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { Component, useEffect } from 'react';\nimport { isFunction } from '@elliemae/ds-utilities';\nimport { FocusGroup } from './FocusGroup.js';\nimport { FocusGroupContext } from './FocusGroupContext.js';\n\nconst noop = () => null;\n\nclass FocusGroupProvider extends Component {\n activated = false;\n\n static defaultProps = {\n exitWhenNoPrevious: false,\n exitWhenNoNext: false,\n keyBindings: {},\n onFocus: noop,\n onExitFocusGroup: noop,\n onFocusPreviousGroup: noop,\n onFocusNextGroup: noop,\n onFocusGroupSet: noop,\n };\n\n constructor(props) {\n super(props);\n\n this.focusGroup = new FocusGroup(props);\n\n props.onFocusGroupSet(this);\n\n this.actions = {\n activate: this.activate.bind(this),\n deactivate: this.deactivate.bind(this),\n register: this.focusGroup.register,\n unregister: this.unregister.bind(this),\n focusFirst: this.focusGroup.focusFirst,\n focusLast: this.focusGroup.focusLast,\n focusItemByIndex: this.focusItemByIndex.bind(this),\n focusItemByNode: this.focusItemByNode.bind(this),\n focus: this.focusGroup.focusCurrent,\n isGroupActive: this.focusGroup.isGroupActive,\n focusNext: this.focusGroup.focusNext,\n focusPrevious: this.focusGroup.focusPrevious,\n };\n }\n\n componentDidMount() {\n const { autoFocusOnMount } = this.props;\n\n this.activate();\n\n if (autoFocusOnMount) {\n setTimeout(() => {\n this.actions.focusFirst();\n }, 0);\n }\n }\n\n componentWillUnmount() {\n this.deactivate();\n }\n\n activate() {\n const { onActivate } = this.props;\n this.focusGroup.activate();\n this.activated = true;\n if (isFunction(onActivate)) onActivate();\n }\n\n deactivate() {\n const { onExitFocusGroup } = this.props;\n this.activated = false;\n this.focusGroup.deactivate();\n if (isFunction(onExitFocusGroup)) {\n onExitFocusGroup();\n }\n }\n\n register(item) {\n this.focusGroup.register(item);\n }\n\n unregister(item) {\n this.focusGroup.unregister(item);\n }\n\n focusItemByIndex(index) {\n if (!this.activated) this.activate();\n setTimeout(() => {\n this.focusGroup.focusByIndex(index);\n }, 200);\n }\n\n focusItemByNode(node) {\n if (!this.activated) this.activate();\n const index = this.focusGroup.getItemIndexByNode(node);\n this.focusItemByIndex(index);\n }\n\n render() {\n const { children } = this.props;\n return <FocusGroupContext.Provider value={this.actions}>{children}</FocusGroupContext.Provider>;\n }\n}\n\nexport { FocusGroupProvider, FocusGroupProvider as FocusGroupManager };\nexport default FocusGroupProvider;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACmGZ;AAnGX,SAAgB,iBAA4B;AAC5C,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;AAElC,MAAM,OAAO,MAAM;AAEnB,MAAM,2BAA2B,UAAU;AAAA,EAczC,YAAY,OAAO;AACjB,UAAM,KAAK;AAdb,qBAAY;AAgBV,SAAK,aAAa,IAAI,WAAW,KAAK;AAEtC,UAAM,gBAAgB,IAAI;AAE1B,SAAK,UAAU;AAAA,MACb,UAAU,KAAK,SAAS,KAAK,IAAI;AAAA,MACjC,YAAY,KAAK,WAAW,KAAK,IAAI;AAAA,MACrC,UAAU,KAAK,WAAW;AAAA,MAC1B,YAAY,KAAK,WAAW,KAAK,IAAI;AAAA,MACrC,YAAY,KAAK,WAAW;AAAA,MAC5B,WAAW,KAAK,WAAW;AAAA,MAC3B,kBAAkB,KAAK,iBAAiB,KAAK,IAAI;AAAA,MACjD,iBAAiB,KAAK,gBAAgB,KAAK,IAAI;AAAA,MAC/C,OAAO,KAAK,WAAW;AAAA,MACvB,eAAe,KAAK,WAAW;AAAA,MAC/B,WAAW,KAAK,WAAW;AAAA,MAC3B,eAAe,KAAK,WAAW;AAAA,IACjC;AAAA,EACF;AAAA,EAEA,oBAAoB;AAClB,UAAM,EAAE,iBAAiB,IAAI,KAAK;AAElC,SAAK,SAAS;AAEd,QAAI,kBAAkB;AACpB,iBAAW,MAAM;AACf,aAAK,QAAQ,WAAW;AAAA,MAC1B,GAAG,CAAC;AAAA,IACN;AAAA,EACF;AAAA,EAEA,uB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jsx } from "react/jsx-runtime";
|
|
3
|
-
import { FocusGroupProvider } from "./FocusGroupManager";
|
|
3
|
+
import { FocusGroupProvider } from "./FocusGroupManager.js";
|
|
4
4
|
function FocusGroupHoc(WrappedComponent, options = {}) {
|
|
5
|
-
return ({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
children: /* @__PURE__ */ jsx(WrappedComponent, { ...props, ...options })
|
|
18
|
-
}
|
|
19
|
-
);
|
|
5
|
+
return function({ onExitFocusGroup, onFocusPrevGroup, focusKeyBindings, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
FocusGroupProvider,
|
|
8
|
+
{
|
|
9
|
+
keyBindings: focusKeyBindings,
|
|
10
|
+
onExitFocusGroup,
|
|
11
|
+
onFocusPrevGroup,
|
|
12
|
+
...options,
|
|
13
|
+
children: /* @__PURE__ */ jsx(WrappedComponent, { ...props, ...options })
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
};
|
|
20
17
|
}
|
|
21
18
|
var focusGroupManagerHoc_default = FocusGroupHoc;
|
|
22
19
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FocusGroup/focusGroupManagerHoc.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/display-name */\nimport React from 'react';\nimport { FocusGroupProvider } from './FocusGroupManager';\n\nfunction FocusGroupHoc(WrappedComponent, options = {}) {\n return ({
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/display-name */\nimport React from 'react';\nimport { FocusGroupProvider } from './FocusGroupManager.js';\n\nfunction FocusGroupHoc(WrappedComponent, options = {}) {\n return function ({ onExitFocusGroup, onFocusPrevGroup, focusKeyBindings, ...props }) {\n return (\n <FocusGroupProvider\n keyBindings={focusKeyBindings}\n onExitFocusGroup={onExitFocusGroup}\n onFocusPrevGroup={onFocusPrevGroup}\n {...options}\n >\n <WrappedComponent {...props} {...options} />\n </FocusGroupProvider>\n );\n };\n}\n\nexport { FocusGroupHoc };\nexport default FocusGroupHoc;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACaf;AAXR,SAAS,0BAA0B;AAEnC,SAAS,cAAc,kBAAkB,UAAU,CAAC,GAAG;AACrD,SAAO,SAAU,EAAE,kBAAkB,kBAAkB,qBAAqB,MAAM,GAAG;AACnF,WACE;AAAA,MAAC;AAAA;AAAA,QACC,aAAa;AAAA,QACb;AAAA,QACA;AAAA,QACC,GAAG;AAAA,QAEJ,8BAAC,oBAAkB,GAAG,OAAQ,GAAG,SAAS;AAAA;AAAA,IAC5C;AAAA,EAEJ;AACF;AAGA,IAAO,+BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export * from "./FocusGroup";
|
|
3
|
-
export * from "./FocusGroupContext";
|
|
4
|
-
export * from "./FocusGroupManager";
|
|
5
|
-
export * from "./useFocusGroupItem";
|
|
6
|
-
import { FocusGroupHoc } from "./focusGroupManagerHoc";
|
|
7
|
-
import { FocusGridProvider, FocusGridContext } from "./FocusGrid";
|
|
8
|
-
export * from "./utils/getNextCellPosition";
|
|
2
|
+
export * from "./FocusGroup.js";
|
|
3
|
+
export * from "./FocusGroupContext.js";
|
|
4
|
+
export * from "./FocusGroupManager.js";
|
|
5
|
+
export * from "./useFocusGroupItem.js";
|
|
6
|
+
import { FocusGroupHoc } from "./focusGroupManagerHoc.js";
|
|
7
|
+
import { FocusGridProvider, FocusGridContext } from "./FocusGrid.js";
|
|
8
|
+
export * from "./utils/getNextCellPosition.js";
|
|
9
9
|
export {
|
|
10
10
|
FocusGridProvider as FocusGrid,
|
|
11
11
|
FocusGridContext,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FocusGroup/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './FocusGroup';\nexport * from './FocusGroupContext';\nexport * from './FocusGroupManager';\nexport * from './useFocusGroupItem';\nexport { FocusGroupHoc as focusGroupManagerHoc } from './focusGroupManagerHoc';\nexport { FocusGridProvider as FocusGrid, FocusGridContext } from './FocusGrid';\nexport * from './utils/getNextCellPosition';\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './FocusGroup.js';\nexport * from './FocusGroupContext.js';\nexport * from './FocusGroupManager.js';\nexport * from './useFocusGroupItem.js';\nexport { FocusGroupHoc as focusGroupManagerHoc } from './focusGroupManagerHoc.js';\nexport { FocusGridProvider as FocusGrid, FocusGridContext } from './FocusGrid.js';\nexport * from './utils/getNextCellPosition.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAA0B,qBAA4B;AACtD,SAA8B,mBAAW,wBAAwB;AACjE,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useContext, useEffect } from "react";
|
|
3
|
-
import { FocusGroupContext } from "./FocusGroupContext";
|
|
3
|
+
import { FocusGroupContext } from "./FocusGroupContext.js";
|
|
4
4
|
function useFocusGroupItem(ref = {}, props) {
|
|
5
5
|
const { register, unregister, ...otherActions } = useContext(FocusGroupContext) || {};
|
|
6
6
|
useEffect(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/FocusGroup/useFocusGroupItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useContext, useEffect } from 'react';\nimport { FocusGroupContext } from './FocusGroupContext';\n\nfunction useFocusGroupItem(ref = {}, props) {\n const { register, unregister, ...otherActions }
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY,iBAAiB;AACtC,SAAS,yBAAyB;AAElC,SAAS,kBAAkB,MAAM,CAAC,GAAG,OAAO;AAC1C,QAAM,EAAE,UAAU,eAAe,aAAa,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useContext, useEffect } from 'react';\nimport { FocusGroupContext } from './FocusGroupContext.js';\n\nfunction useFocusGroupItem(ref = {}, props) {\n const { register, unregister, ...otherActions } = useContext(FocusGroupContext) || {};\n\n useEffect(() => {\n if (ref.current && register) register(ref.current, props);\n return () => {\n if (ref.current && unregister) unregister(ref.current);\n };\n });\n\n // if the focus item is not wrapped with the focus provider then return null\n if (!register) return {};\n return otherActions;\n}\n\nexport const useFocusGroupWithState = (ref = {}, props) => {\n const { register, unregister, ...otherActions } = useContext(FocusGroupContext) || {};\n\n useEffect(() => {\n if (ref && register) register(ref, props);\n return () => {\n if (ref && unregister) unregister(ref);\n };\n }, [ref]);\n\n // if the focus item is not wrapped with the focus provider then return null\n if (!register) return {};\n return otherActions;\n};\n\nexport { useFocusGroupItem };\nexport default useFocusGroupItem;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,YAAY,iBAAiB;AACtC,SAAS,yBAAyB;AAElC,SAAS,kBAAkB,MAAM,CAAC,GAAG,OAAO;AAC1C,QAAM,EAAE,UAAU,eAAe,aAAa,IAAI,WAAW,iBAAiB,KAAK,CAAC;AAEpF,YAAU,MAAM;AACd,QAAI,IAAI,WAAW;AAAU,eAAS,IAAI,SAAS,KAAK;AACxD,WAAO,MAAM;AACX,UAAI,IAAI,WAAW;AAAY,mBAAW,IAAI,OAAO;AAAA,IACvD;AAAA,EACF,CAAC;AAGD,MAAI,CAAC;AAAU,WAAO,CAAC;AACvB,SAAO;AACT;AAEO,MAAM,yBAAyB,CAAC,MAAM,CAAC,GAAG,UAAU;AACzD,QAAM,EAAE,UAAU,eAAe,aAAa,IAAI,WAAW,iBAAiB,KAAK,CAAC;AAEpF,YAAU,MAAM;AACd,QAAI,OAAO;AAAU,eAAS,KAAK,KAAK;AACxC,WAAO,MAAM;AACX,UAAI,OAAO;AAAY,mBAAW,GAAG;AAAA,IACvC;AAAA,EACF,GAAG,CAAC,GAAG,CAAC;AAGR,MAAI,CAAC;AAAU,WAAO,CAAC;AACvB,SAAO;AACT;AAGA,IAAO,4BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/FocusGroup/utils/getNextCellPosition.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// eslint-disable-next-line max-statements\nfunction getNextCellPosition({\n grid,\n currentRow = 0,\n currentCell = 0,\n directionY,\n directionX,\n shouldWrapCells,\n shouldWrapRows,\n}) {\n let nextRow = currentRow + directionY;\n let nextCell = currentCell + directionX;\n const rowCount = grid.length;\n const isLeftRight = directionX !== 0;\n\n if (!rowCount) {\n return false;\n }\n\n const cellsLength = grid[0].length;\n\n // moving horizontally\n if (shouldWrapCells && isLeftRight) {\n // to left\n if (nextCell < 0) {\n nextCell = cellsLength - 1;\n nextRow -= 1;\n }\n\n if (nextCell >= cellsLength) {\n nextCell = 0;\n nextRow += 1;\n }\n }\n\n // moving vertically\n if (shouldWrapRows && !isLeftRight) {\n // to top\n if (nextRow < 0) {\n nextCell -= 1;\n nextRow = rowCount - 1;\n if (grid[nextRow] && nextCell >= 0 && !grid[nextRow][nextCell]) {\n nextRow -= 1;\n }\n } else if (nextRow >= rowCount || !grid[nextRow][nextCell]) {\n nextRow = 0;\n nextCell += 1;\n }\n }\n\n return {\n cellIndex: nextCell,\n rowIndex: nextRow,\n };\n}\n\nexport { getNextCellPosition };\nexport default getNextCellPosition
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// eslint-disable-next-line max-statements\nfunction getNextCellPosition({\n grid,\n currentRow = 0,\n currentCell = 0,\n directionY,\n directionX,\n shouldWrapCells,\n shouldWrapRows,\n}) {\n let nextRow = currentRow + directionY;\n let nextCell = currentCell + directionX;\n const rowCount = grid.length;\n const isLeftRight = directionX !== 0;\n\n if (!rowCount) {\n return false;\n }\n\n const cellsLength = grid[0].length;\n\n // moving horizontally\n if (shouldWrapCells && isLeftRight) {\n // to left\n if (nextCell < 0) {\n nextCell = cellsLength - 1;\n nextRow -= 1;\n }\n\n if (nextCell >= cellsLength) {\n nextCell = 0;\n nextRow += 1;\n }\n }\n\n // moving vertically\n if (shouldWrapRows && !isLeftRight) {\n // to top\n if (nextRow < 0) {\n nextCell -= 1;\n nextRow = rowCount - 1;\n if (grid[nextRow] && nextCell >= 0 && !grid[nextRow][nextCell]) {\n nextRow -= 1;\n }\n } else if (nextRow >= rowCount || !grid[nextRow][nextCell]) {\n nextRow = 0;\n nextCell += 1;\n }\n }\n\n return {\n cellIndex: nextCell,\n rowIndex: nextRow,\n };\n}\n\nexport { getNextCellPosition };\nexport default getNextCellPosition;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,oBAAoB;AAAA,EAC3B;AAAA,EACA,aAAa;AAAA,EACb,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI,UAAU,aAAa;AAC3B,MAAI,WAAW,cAAc;AAC7B,QAAM,WAAW,KAAK;AACtB,QAAM,cAAc,eAAe;AAEnC,MAAI,CAAC,UAAU;AACb,WAAO;AAAA,EACT;AAEA,QAAM,cAAc,KAAK,GAAG;AAG5B,MAAI,mBAAmB,aAAa;AAElC,QAAI,WAAW,GAAG;AAChB,iBAAW,cAAc;AACzB,iBAAW;AAAA,IACb;AAEA,QAAI,YAAY,aAAa;AAC3B,iBAAW;AACX,iBAAW;AAAA,IACb;AAAA,EACF;AAGA,MAAI,kBAAkB,CAAC,aAAa;AAElC,QAAI,UAAU,GAAG;AACf,kBAAY;AACZ,gBAAU,WAAW;AACrB,UAAI,KAAK,YAAY,YAAY,KAAK,CAAC,KAAK,SAAS,WAAW;AAC9D,mBAAW;AAAA,MACb;AAAA,IACF,WAAW,WAAW,YAAY,CAAC,KAAK,SAAS,WAAW;AAC1D,gBAAU;AACV,kBAAY;AAAA,IACd;AAAA,EACF;AAEA,SAAO;AAAA,IACL,WAAW;AAAA,IACX,UAAU;AAAA,EACZ;AACF;AAGA,IAAO,8BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Component } from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import { GroupContext } from "./GroupContext";
|
|
5
|
+
import { GroupContext } from "./GroupContext.js";
|
|
6
6
|
const getValueItem = (e) => {
|
|
7
7
|
const { target, currentTarget } = e;
|
|
8
8
|
if (target) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/GroupContext/Group.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-unused-state */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { GroupContext } from './GroupContext';\n\nconst getValueItem = (e) => {\n const { target, currentTarget } = e;\n if (target) {\n const { value } = target;\n return value;\n }\n if (currentTarget) {\n const { value } = currentTarget;\n return value;\n }\n return e;\n};\n\nconst toggleItemValue = (array, e) => {\n const newvalue = getValueItem(e);\n const res = array;\n const index = array.indexOf(newvalue);\n\n if (index === -1) {\n res.push(newvalue);\n } else {\n res.splice(index, 1);\n }\n\n return res;\n};\n\nconst { Provider } = GroupContext;\n/** deprecated use CheckableGroup instead */\nclass Group extends Component {\n constructor(props) {\n super(props);\n const { activeValue, disabled } = props;\n this.state = {\n activeValue,\n disabled,\n prevValue: null,\n onChange: this.handleChange.bind(this),\n };\n }\n\n static getDerivedStateFromProps(nextProps, { prevValue }) {\n if (nextProps.activeValue === prevValue) return null;\n return {\n activeValue: nextProps.activeValue,\n prevValue: nextProps.activeValue,\n };\n }\n\n handleChange(e, ...rest) {\n const { multiple, onChange } = this.props;\n const { activeValue } = this.state;\n const value = getValueItem(e);\n let newValue;\n if (multiple) {\n newValue = toggleItemValue(activeValue || [], value);\n } else if (activeValue !== value) {\n // default behaviour it will be toggle the active value\n newValue = value;\n }\n\n this.setState({\n activeValue: newValue,\n });\n\n if (onChange) onChange(newValue, ...rest);\n }\n\n render() {\n const { children } = this.props;\n return <Provider value={this.state}>{children}</Provider>;\n }\n}\n\nGroup.defaultProps = {\n multiple: false,\n};\n\nGroup.propTypes = {\n children: PropTypes.node,\n multiple: PropTypes.bool,\n onChange: PropTypes.func,\n activeValue: PropTypes.oneOfType([PropTypes.array, PropTypes.number, PropTypes.string]),\n disabled: PropTypes.bool,\n};\n\nexport { Group };\nexport default Group;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-unused-state */\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { GroupContext } from './GroupContext.js';\n\nconst getValueItem = (e) => {\n const { target, currentTarget } = e;\n if (target) {\n const { value } = target;\n return value;\n }\n if (currentTarget) {\n const { value } = currentTarget;\n return value;\n }\n return e;\n};\n\nconst toggleItemValue = (array, e) => {\n const newvalue = getValueItem(e);\n const res = array;\n const index = array.indexOf(newvalue);\n\n if (index === -1) {\n res.push(newvalue);\n } else {\n res.splice(index, 1);\n }\n\n return res;\n};\n\nconst { Provider } = GroupContext;\n/** deprecated use CheckableGroup instead */\nclass Group extends Component {\n constructor(props) {\n super(props);\n const { activeValue, disabled } = props;\n this.state = {\n activeValue,\n disabled,\n prevValue: null,\n onChange: this.handleChange.bind(this),\n };\n }\n\n static getDerivedStateFromProps(nextProps, { prevValue }) {\n if (nextProps.activeValue === prevValue) return null;\n return {\n activeValue: nextProps.activeValue,\n prevValue: nextProps.activeValue,\n };\n }\n\n handleChange(e, ...rest) {\n const { multiple, onChange } = this.props;\n const { activeValue } = this.state;\n const value = getValueItem(e);\n let newValue;\n if (multiple) {\n newValue = toggleItemValue(activeValue || [], value);\n } else if (activeValue !== value) {\n // default behaviour it will be toggle the active value\n newValue = value;\n }\n\n this.setState({\n activeValue: newValue,\n });\n\n if (onChange) onChange(newValue, ...rest);\n }\n\n render() {\n const { children } = this.props;\n return <Provider value={this.state}>{children}</Provider>;\n }\n}\n\nGroup.defaultProps = {\n multiple: false,\n};\n\nGroup.propTypes = {\n children: PropTypes.node,\n multiple: PropTypes.bool,\n onChange: PropTypes.func,\n activeValue: PropTypes.oneOfType([PropTypes.array, PropTypes.number, PropTypes.string]),\n disabled: PropTypes.bool,\n};\n\nexport { Group };\nexport default Group;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;AC2EZ;AA1EX,SAAgB,iBAAiB;AACjC,OAAO,eAAe;AACtB,SAAS,oBAAoB;AAE7B,MAAM,eAAe,CAAC,MAAM;AAC1B,QAAM,EAAE,QAAQ,cAAc,IAAI;AAClC,MAAI,QAAQ;AACV,UAAM,EAAE,MAAM,IAAI;AAClB,WAAO;AAAA,EACT;AACA,MAAI,eAAe;AACjB,UAAM,EAAE,MAAM,IAAI;AAClB,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEA,MAAM,kBAAkB,CAAC,OAAO,MAAM;AACpC,QAAM,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U,UAAU;AAAA,EACpB,UAAU,UAAU;AAAA,EACpB,aAAa,UAAU,UAAU,CAAC,UAAU,OAAO,UAAU,QAAQ,UAAU,MAAM,CAAC;AAAA,EACtF,UAAU,UAAU;AACtB;AAGA,IAAO,gBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { GroupContext } from "./GroupContext";
|
|
3
|
+
import { GroupContext } from "./GroupContext.js";
|
|
4
4
|
const { Consumer } = GroupContext;
|
|
5
5
|
const GroupItem = ({ render }) => /* @__PURE__ */ jsx(Consumer, { children: (context) => render(context) });
|
|
6
6
|
var GroupItem_default = GroupItem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/GroupContext/GroupItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { GroupContext } from './GroupContext';\n\nconst { Consumer } = GroupContext;\n\nconst GroupItem = ({ render }) =>
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { GroupContext } from './GroupContext.js';\n\nconst { Consumer } = GroupContext;\n\nconst GroupItem = ({ render }) => <Consumer>{(context) => render(context)}</Consumer>;\n\nexport { GroupItem };\nexport default GroupItem;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACKW;AAJlC,SAAS,oBAAoB;AAE7B,MAAM,EAAE,SAAS,IAAI;AAErB,MAAM,YAAY,CAAC,EAAE,OAAO,MAAM,oBAAC,YAAU,WAAC,YAAY,OAAO,OAAO,GAAE;AAG1E,IAAO,oBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { Group } from "./Group";
|
|
3
|
-
import { GroupContext } from "./GroupContext";
|
|
4
|
-
import { GroupItem } from "./GroupItem";
|
|
2
|
+
import { Group } from "./Group.js";
|
|
3
|
+
import { GroupContext } from "./GroupContext.js";
|
|
4
|
+
import { GroupItem } from "./GroupItem.js";
|
|
5
5
|
export {
|
|
6
6
|
Group,
|
|
7
7
|
GroupContext,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/GroupContext/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { Group } from './Group';\nexport { GroupContext } from './GroupContext';\nexport { GroupItem } from './GroupItem';\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { Group } from './Group.js';\nexport { GroupContext } from './GroupContext.js';\nexport { GroupItem } from './GroupItem.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,aAAa;AACtB,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Component } from "react";
|
|
4
|
-
import { ScrollSyncContext } from "./ScrollSync";
|
|
4
|
+
import { ScrollSyncContext } from "./ScrollSync.js";
|
|
5
5
|
class ScrollSyncPane extends Component {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
@@ -19,9 +19,7 @@ class ScrollSyncPane extends Component {
|
|
|
19
19
|
return children({
|
|
20
20
|
registerPane: (node) => {
|
|
21
21
|
if (notPaginated) {
|
|
22
|
-
const virtualizedBody = node.querySelector(
|
|
23
|
-
".virtualized-body-wrapper"
|
|
24
|
-
);
|
|
22
|
+
const virtualizedBody = node.querySelector(".virtualized-body-wrapper");
|
|
25
23
|
if (virtualizedBody) {
|
|
26
24
|
registerPane(virtualizedBody, this.toArray(group));
|
|
27
25
|
}
|