@elliemae/ds-shared 3.16.0-next.10 → 3.16.0-next.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Animations/BaseAnimation.js +4 -0
- package/dist/cjs/Animations/BaseAnimation.js.map +1 -1
- package/dist/cjs/Animations/Grow.js +4 -0
- package/dist/cjs/Animations/Grow.js.map +1 -1
- package/dist/cjs/Animations/GrowRight.js +4 -0
- package/dist/cjs/Animations/GrowRight.js.map +1 -1
- package/dist/cjs/Animations/GrowVertical.js +4 -0
- package/dist/cjs/Animations/GrowVertical.js.map +1 -1
- package/dist/cjs/Animations/index.js +4 -0
- package/dist/cjs/Animations/index.js.map +1 -1
- package/dist/cjs/CheckableGroup.js +8 -0
- package/dist/cjs/CheckableGroup.js.map +1 -1
- package/dist/cjs/DeferRenderAfterComputation.js +4 -0
- package/dist/cjs/DeferRenderAfterComputation.js.map +1 -1
- package/dist/cjs/FocusGroup/FocusGrid.js +4 -0
- package/dist/cjs/FocusGroup/FocusGrid.js.map +1 -1
- 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 +4 -0
- package/dist/cjs/FocusGroup/FocusGroupManager.js.map +1 -1
- package/dist/cjs/FocusGroup/focusGroupManagerHoc.js +4 -0
- package/dist/cjs/FocusGroup/focusGroupManagerHoc.js.map +1 -1
- package/dist/cjs/FocusGroup/index.js +4 -0
- package/dist/cjs/FocusGroup/index.js.map +1 -1
- package/dist/cjs/FocusGroup/useFocusGroupItem.js +4 -0
- package/dist/cjs/FocusGroup/useFocusGroupItem.js.map +1 -1
- package/dist/cjs/FocusGroup/utils/getNextCellPosition.js +4 -0
- package/dist/cjs/FocusGroup/utils/getNextCellPosition.js.map +1 -1
- package/dist/cjs/GroupContext/Group.js +4 -0
- package/dist/cjs/GroupContext/Group.js.map +1 -1
- package/dist/cjs/GroupContext/GroupContext.js +4 -0
- package/dist/cjs/GroupContext/GroupContext.js.map +1 -1
- package/dist/cjs/GroupContext/GroupItem.js +4 -0
- package/dist/cjs/GroupContext/GroupItem.js.map +1 -1
- package/dist/cjs/GroupContext/index.js +4 -0
- package/dist/cjs/GroupContext/index.js.map +1 -1
- package/dist/cjs/ScrollSync/ScrollSync.js +4 -0
- package/dist/cjs/ScrollSync/ScrollSync.js.map +1 -1
- package/dist/cjs/ScrollSync/ScrollSyncPane.js +4 -0
- package/dist/cjs/ScrollSync/ScrollSyncPane.js.map +1 -1
- package/dist/cjs/ScrollSync/ScrollSyncProvider.js +4 -0
- package/dist/cjs/ScrollSync/ScrollSyncProvider.js.map +1 -1
- package/dist/cjs/ScrollSync/index.js +4 -0
- package/dist/cjs/ScrollSync/index.js.map +1 -1
- package/dist/cjs/ScrollSync/useScrollSync.js +4 -0
- package/dist/cjs/ScrollSync/useScrollSync.js.map +1 -1
- 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 +6 -0
- package/dist/cjs/createDataInstance/createInstanceRef.js.map +1 -1
- package/dist/cjs/createDataInstance/index.js +4 -0
- package/dist/cjs/createDataInstance/index.js.map +1 -1
- package/dist/cjs/createDataInstance/utils.js +4 -0
- package/dist/cjs/createDataInstance/utils.js.map +1 -1
- package/dist/cjs/defer-render-hoc/index.js +4 -0
- package/dist/cjs/defer-render-hoc/index.js.map +1 -1
- package/dist/cjs/dimsum.config.js +4 -0
- package/dist/cjs/dimsum.config.js.map +1 -1
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +1 -1
- 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 +1 -1
- package/dist/cjs/useDataGrid/index.js +4 -0
- package/dist/cjs/useDataGrid/index.js.map +1 -1
- package/dist/cjs/useDataGrid/initColumnDefinition.js +63 -56
- package/dist/cjs/useDataGrid/initColumnDefinition.js.map +1 -1
- package/dist/cjs/useDataGrid/useDataGrid.js +6 -0
- package/dist/cjs/useDataGrid/useDataGrid.js.map +1 -1
- package/dist/cjs/useDataList/index.js +4 -0
- package/dist/cjs/useDataList/index.js.map +1 -1
- package/dist/cjs/useDataList/recordIterator.js +4 -0
- package/dist/cjs/useDataList/recordIterator.js.map +1 -1
- package/dist/cjs/useDataList/useDataList.js +5 -0
- package/dist/cjs/useDataList/useDataList.js.map +1 -1
- package/dist/cjs/utils.js +4 -0
- package/dist/cjs/utils.js.map +1 -1
- package/dist/cjs/virtualization/AutoHeightList.js +4 -0
- package/dist/cjs/virtualization/AutoHeightList.js.map +1 -1
- package/dist/cjs/virtualization/FluidHeightList.js +4 -0
- package/dist/cjs/virtualization/FluidHeightList.js.map +1 -1
- package/dist/cjs/virtualization/index.js +4 -0
- package/dist/cjs/virtualization/index.js.map +1 -1
- package/dist/esm/CheckableGroup.js +4 -0
- package/dist/esm/CheckableGroup.js.map +1 -1
- package/dist/esm/FocusGroup/FocusGrid.js.map +1 -1
- package/dist/esm/FocusGroup/FocusGroup.js.map +1 -1
- package/dist/esm/FocusGroup/focusGroupManagerHoc.js.map +1 -1
- package/dist/esm/FocusGroup/useFocusGroupItem.js.map +1 -1
- package/dist/esm/FocusGroup/utils/getNextCellPosition.js.map +1 -1
- package/dist/esm/ScrollSync/ScrollSync.js.map +1 -1
- package/dist/esm/ScrollSync/ScrollSyncProvider.js.map +1 -1
- package/dist/esm/createDataInstance/createInstancePlugin.js.map +1 -1
- package/dist/esm/createDataInstance/createInstanceRef.js +2 -0
- package/dist/esm/createDataInstance/createInstanceRef.js.map +1 -1
- package/dist/esm/createDataInstance/utils.js.map +1 -1
- package/dist/esm/useDataGrid/initColumnDefinition.js +59 -56
- package/dist/esm/useDataGrid/initColumnDefinition.js.map +1 -1
- package/dist/esm/useDataGrid/useDataGrid.js +2 -0
- package/dist/esm/useDataGrid/useDataGrid.js.map +1 -1
- package/dist/esm/useDataList/recordIterator.js.map +1 -1
- package/dist/esm/useDataList/useDataList.js +1 -0
- package/dist/esm/useDataList/useDataList.js.map +1 -1
- package/dist/esm/utils.js.map +1 -1
- package/dist/esm/virtualization/AutoHeightList.js.map +1 -1
- package/dist/esm/virtualization/FluidHeightList.js.map +1 -1
- package/dist/types/Animations/BaseAnimation.d.ts +1 -0
- package/dist/types/Animations/Grow.d.ts +1 -0
- package/dist/types/Animations/GrowRight.d.ts +1 -0
- package/dist/types/Animations/GrowVertical.d.ts +1 -0
- package/dist/types/FocusGroup/focusGroupManagerHoc.d.ts +1 -0
- package/dist/types/GroupContext/GroupItem.d.ts +1 -0
- package/dist/types/ScrollSync/ScrollSyncPane.d.ts +1 -0
- package/dist/types/ScrollSync/ScrollSyncProvider.d.ts +1 -0
- 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
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/Animations/BaseAnimation.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADcrB;AAZF,yBAA2B;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,4CAAC,iCAAW,QAAQ,EAAE,SAAS,GAAG,OAAc,MAAY,OAAc,MAAY,OAAc,QACjG,UACH;AAIF,IAAO,wBAAQ;",
|
|
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/Animations/Grow.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIrB;AAHF,2BAA8B;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
|
}
|
|
@@ -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/Animations/GrowRight.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADYrB;AAXF,2BAA8B;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
|
}
|
|
@@ -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/Animations/GrowVertical.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADYrB;AAXF,2BAA8B;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
|
}
|
|
@@ -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/Animations/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './BaseAnimation.js';\nexport * from './Grow.js';\nexport * from './GrowRight.js';\nexport * from './GrowVertical.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAc,+BAAd;AACA,+BAAc,sBADd;AAEA,+BAAc,2BAFd;AAGA,+BAAc,8BAHd;",
|
|
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
|
));
|
|
@@ -55,11 +59,15 @@ function useCheckableGroup({ children, active: activeProp, multi, onCheck = () =
|
|
|
55
59
|
const CheckableGroup = ({
|
|
56
60
|
active = [],
|
|
57
61
|
multi = false,
|
|
62
|
+
// checkbox or radio
|
|
58
63
|
children
|
|
59
64
|
}) => useCheckableGroup({ active, multi, children });
|
|
60
65
|
CheckableGroup.propTypes = {
|
|
66
|
+
/* The item (if multi false) or items (if multi true) selected */
|
|
61
67
|
active: import_prop_types.default.arrayOf(import_prop_types.default.string),
|
|
68
|
+
/* Whether is multi select or not */
|
|
62
69
|
multi: import_prop_types.default.bool,
|
|
70
|
+
/* Handler when a user checks an item */
|
|
63
71
|
onCheck: import_prop_types.default.func
|
|
64
72
|
};
|
|
65
73
|
var CheckableGroup_default = CheckableGroup;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/CheckableGroup.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAoC;AACpC,wBAAsB;AACtB,0BAA8D;AAEvD,SAAS,kBAAkB,EAAE,UAAU,QAAQ,YAAY,OAAO,UAAU,MAAM,KAAK,GAAG;AAC/F,QAAM,CAAC,QAAQ,SAAS,QAAI,8CAAyB,UAAU;AAE/D,QAAM,cAAc,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS;AACnD,cAAU,CAAC,eAAe;AACxB,YAAM,aAAa,YAAQ,iCAAY,YAAY,KAAK,IAAI;AAC5D,cAAQ,YAAY,IAAI;AACxB,aAAO;AAAA,IACT,CAAC;AAAA,EACH;AAEA,SAAO,aAAAA,QAAM,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,eAAO,2BAAa,OAAO;AAAA,MACzB,GAAG;AAAA,MACH;AAAA,MACA,aAAS,4BAAO,aAAa,MAAM,OAAO;AAAA,IAC5C,CAAC;AAAA,EACH,CAAC;AACH;AAEO,MAAM,iBAAiB,CAAC;AAAA,EAC7B,SAAS,CAAC;AAAA,EACV,QAAQ;AAAA;AAAA,EACR;AACF,MAAM,kBAAkB,EAAE,QAAQ,OAAO,SAAS,CAAC;AAEnD,eAAe,YAAY;AAAA;AAAA,EAEzB,QAAQ,kBAAAC,QAAU,QAAQ,kBAAAA,QAAU,MAAM;AAAA;AAAA,EAE1C,OAAO,kBAAAA,QAAU;AAAA;AAAA,EAEjB,SAAS,kBAAAA,QAAU;AACrB;AAEA,IAAO,yBAAQ;",
|
|
6
6
|
"names": ["React", "PropTypes"]
|
|
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/DeferRenderAfterComputation.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAoC;AACpC,iBAAgB;AAET,MAAM,8BAA8B,CAAC,EAAE,UAAU,SAAS,UAAU,UAAU,IAAK,MAAM;AAC9F,QAAM,CAAC,cAAc,eAAe,QAAI,uBAAS,KAAK;AAEtD,8BAAU,MAAM;AAEd,mBAAAA;AAAA,MAAI,UACF,WAAAA;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": ["raf"]
|
|
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/FocusGroup/FocusGrid.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqKd;AArKT,mBAAiE;AACjE,0BAA+D;AAC/D,iCAAoC;AAEpC,MAAM,uBAAmB,4BAAc;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,GAAG;AACxC,wCAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS,CAAC,MAAM;AACd,UAAE,eAAe;AACjB,gBAAQ;AAAA,UACN,UAAU,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nC;AACA,oBAAc,GAAG,GAAG,EAAE,UAAU,WAAW,KAAK,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC;AAAA,IACzE,CAAC;AAAA,IACD,GAAG;AAAA,EACL;AACA,QAAM,sBAAkB,gCAAW,WAAW,IAC1C,YAAY;AAAA,IACV,iBAAiB;AAAA,IACjB,UAAU,WAAW;AAAA,IACrB,WAAW,YAAY;AAAA,EACzB,CAAC,IACD,EAAE,GAAG,oBAAoB,GAAG,YAAY;AAE5C,QAAM,YAAY,CAAC,MAAM;AACvB,QAAI,EAAE,OAAO,QAAQ,YAAY,MAAM;AAAS;AAChD,UAAM,SAAS,gBAAgB,EAAE,GAAG;AACpC,YAAI,gCAAW,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,8BAAU,MAAM;AACd,aAAS,aAAa,OAAO;AAC7B,WAAO,MAAM;AACX,iBAAW,aAAa,OAAO;AAAA,IACjC;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,oBAAgB;AAAA,IACpB,OAAO;AAAA,MACL;AAAA,IACF;AAAA,IACA,CAAC;AAAA,EACH;AAEA,SAAO,4CAAC,YAAS,OAAO,eAAgB,0BAAe;AACzD;AAGA,IAAO,oBAAQ;",
|
|
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
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/FocusGroup/FocusGroup.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable no-param-reassign */\n/* eslint-disable max-statements */\n/* eslint-disable max-lines */\nimport { isFunction, get } from '@elliemae/ds-utilities';\nimport hotkeys from 'hotkeys-js';\n\nconst defaultOptions = {\n orientation: 'vertical',\n};\n\nconst safeCallAction = (e, fun, ...args) => {\n if (isFunction(fun)) {\n e.preventDefault();\n fun(...args);\n }\n};\n\nconst registerHotkeys = (hotKeys = {}, params, getContainer = () => document) => {\n Object.keys(hotKeys).forEach((hotkey) => {\n const { options, handler, allowDocumentHandler = false } = hotKeys[hotkey];\n const parameterizedHandler = (e) => {\n const handlerParams = isFunction(params) ? params() : params;\n if (!allowDocumentHandler && handlerParams.item !== document.activeElement) return;\n e.preventDefault();\n handler(handlerParams);\n };\n hotkeys(hotkey, { element: getContainer(), ...options }, parameterizedHandler);\n });\n};\n\nconst unregisterHotKeys = (hotKeys = {}) => {\n Object.keys(hotKeys).forEach((hotkey) => {\n hotkeys.unbind(hotkey);\n });\n};\n\nconst noop = () => null;\n\nclass FocusGroup {\n items = [];\n\n constructor(options = {}) {\n this.options = { ...defaultOptions, ...options };\n\n const { orientation } = this.options;\n\n this.keyBindings = {\n ArrowUp: orientation !== 'horizontal' && 'previous',\n ArrowRight: orientation !== 'vertical' && 'next',\n ArrowDown: orientation !== 'horizontal' && 'next',\n ArrowLeft: orientation !== 'vertical' && 'previous',\n Home: 'first',\n End: 'last',\n PageUp: 'first',\n PageDown: 'last',\n Escape: 'exit',\n ...options.keyBindings,\n };\n\n this.currentFocusedItem = null;\n this.currIndex = null;\n\n this.mapActions = {\n previous: this.focusPrevious.bind(this),\n next: this.focusNext.bind(this),\n first: this.focusFirst.bind(this),\n last: this.focusLast.bind(this),\n exit: this.exit.bind(this),\n enter: () => null,\n };\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.register = this.register.bind(this);\n this.focusFirst = this.focusFirst.bind(this);\n this.focusLast = this.focusLast.bind(this);\n this.isGroupActive = this.isGroupActive.bind(this);\n this.focusNext = this.focusNext.bind(this);\n this.focusPrevious = this.focusPrevious.bind(this);\n this.focusItem = this.focusItem.bind(this);\n this.focusCurrent = this.focusCurrent.bind(this);\n this.getHotKeysParams = this.getHotKeysParams.bind(this);\n this.activate = this.activate.bind(this);\n this.deactivate = this.deactivate.bind(this);\n this.executeActionByEvent = this.executeActionByEvent.bind(this);\n this.unregister = this.unregister.bind(this);\n this.exit = this.exit.bind(this);\n this.focusByNode = this.focusByNode.bind(this);\n this.focusByIndex = this.focusByIndex.bind(this);\n this.focusNextGroup = this.focusNextGroup.bind(this);\n this.focusPreviousGroup = this.focusPreviousGroup.bind(this);\n this.getNextItem = this.getNextItem.bind(this);\n this.getPreviousItem = this.getPreviousItem.bind(this);\n this.checkCanFocusNext = this.checkCanFocusNext.bind(this);\n this.getItemByIndex = this.getItemByIndex.bind(this);\n this.getItemIndexByNode = this.getItemIndexByNode.bind(this);\n this.getFocusedIndex = this.getFocusedIndex.bind(this);\n this.getFocusedItem = this.getFocusedItem.bind(this);\n this.getFirstItem = this.getFirstItem.bind(this);\n this.getLastItem = this.getLastItem.bind(this);\n }\n\n getHotKeysParams() {\n const item = this.currentFocusedItem;\n const { index } = get(item, ['dataset'], {});\n return {\n item,\n index,\n };\n }\n\n activate() {\n const { getContainer } = this.options;\n document.addEventListener('keydown', this.handleKeyDown, true);\n registerHotkeys(this.options.hotKeys, this.getHotKeysParams, getContainer);\n }\n\n deactivate() {\n document.removeEventListener('keydown', this.handleKeyDown, true);\n unregisterHotKeys(this.options.hotKeys);\n }\n\n handleKeyDown(e) {\n if (!this.isGroupActive()) return;\n this.executeActionByEvent(e);\n }\n\n executeActionByEvent(e) {\n const actions = Array.isArray(this.keyBindings[e.key]) ? this.keyBindings[e.key] : [this.keyBindings[e.key]];\n return actions.map((action) =>\n typeof action === 'string' ? safeCallAction(e, this.mapActions[action]) : safeCallAction(e, action),\n );\n }\n\n register(node, props = {}) {\n const afterIndex = this.items.findIndex(\n (item) => item.compareDocumentPosition(node) === Node.DOCUMENT_POSITION_PRECEDING,\n );\n node.specialOnFocus = props.onFocus || noop;\n node.specialOnBlur = props.onBlur || noop;\n node.onclick = () => this.focusItem(node);\n node.onfocus = () => {\n this.focusItem(node);\n };\n if (afterIndex === -1) {\n this.items.push(node);\n } else {\n this.items.splice(afterIndex, 0, node);\n }\n }\n\n unregister(node) {\n const index = this.getItemIndexByNode(node);\n if (index > -1) this.items.splice(index, 1);\n }\n\n exit() {\n const { onExitFocusGroup } = this.options;\n onExitFocusGroup();\n }\n\n focusItem(node) {\n if (this.currentFocusedItem && this.currentFocusedItem !== node) {\n this.currentFocusedItem.specialOnBlur();\n this.currentFocusedItem.setAttribute('tabindex', -1);\n }\n if (!node) return;\n this.currentFocusedItem = node;\n node.setAttribute('tabindex', 0);\n node.focus();\n node.specialOnFocus();\n }\n\n focusNext() {\n const item = this.getNextItem();\n this.focusItem(item);\n }\n\n focusByNode(node) {\n const index = this.getItemIndexByNode(node);\n this.focusByIndex(index);\n }\n\n focusByIndex(index) {\n const item = this.getItemByIndex(index);\n this.focusItem(item);\n }\n\n focusPrevious() {\n const prevItem = this.getPreviousItem();\n this.focusItem(prevItem);\n }\n\n focusFirst() {\n const item = this.getFirstItem();\n this.focusItem(item);\n }\n\n focusLast() {\n const item = this.getLastItem();\n this.focusItem(item);\n }\n\n focusCurrent() {\n this.focusItem(this.currentFocusedItem);\n }\n\n focusNextGroup() {\n const { onFocusNextGroup } = this.options;\n this.exit();\n onFocusNextGroup();\n }\n\n focusPreviousGroup() {\n const { onFocusPreviousGroup } = this.options;\n this.exit();\n onFocusPreviousGroup();\n }\n\n getNextItem() {\n const { loop } = this.options;\n const currentIndex = this.getFocusedIndex();\n const supposedNextIndex = currentIndex + 1;\n if (!this.checkCanFocusNext(supposedNextIndex)) {\n return loop ? this.getFirstItem() : this.focusNextGroup();\n }\n return this.getItemByIndex(supposedNextIndex);\n }\n\n getPreviousItem() {\n const { loop } = this.options;\n const currentIndex = this.getFocusedIndex();\n const supposedPrevIndex = currentIndex - 1;\n if (!this.checkCanFocusPrev(supposedPrevIndex)) {\n return loop ? this.getLastItem() : this.focusPreviousGroup();\n }\n return this.getItemByIndex(supposedPrevIndex);\n }\n\n checkCanFocusNext(index) {\n return this.items.length > index;\n }\n\n checkCanFocusPrev(index) {\n return index >= 0;\n }\n\n getItemByIndex(index) {\n return this.items[index];\n }\n\n getItemIndexByNode(node) {\n return this.items.findIndex((item) => item === node);\n }\n\n getFocusedIndex() {\n return this.getItemIndexByNode(document.activeElement);\n }\n\n getFocusedItem() {\n const index = this.getFocusedIndex();\n return index > -1 && this.items[index];\n }\n\n isGroupActive() {\n return this.getFocusedIndex() !== -1;\n }\n\n getFirstItem() {\n return !!this.items.length && this.items[0];\n }\n\n getLastItem() {\n return !!this.items.length && this.items[this.items.length - 1];\n }\n}\n\nexport { FocusGroup };\nexport default FocusGroup;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,0BAAgC;AAChC,wBAAoB;AAEpB,MAAM,iBAAiB;AAAA,EACrB,aAAa;AACf;AAEA,MAAM,iBAAiB,CAAC,GAAG,QAAQ,SAAS;AAC1C,UAAI,gCAAW,GAAG,GAAG;AACnB,MAAE,eAAe;AACjB,QAAI,GAAG,IAAI;AAAA,EACb;AACF;AAEA,MAAM,kBAAkB,CAAC,UAAU,CAAC,G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O,QAAQ,MAAM,KAAK,MAAM,KAAK;AAAA,EACvC;AAAA,EAEA,gBAAgB;AACd,WAAO,KAAK,gBAAgB,MAAM;AAAA,EACpC;AAAA,EAEA,eAAe;AACb,WAAO,CAAC,CAAC,KAAK,MAAM,UAAU,KAAK,MAAM,CAAC;AAAA,EAC5C;AAAA,EAEA,cAAc;AACZ,WAAO,CAAC,CAAC,KAAK,MAAM,UAAU,KAAK,MAAM,KAAK,MAAM,SAAS,CAAC;AAAA,EAChE;AACF;AAGA,IAAO,qBAAQ;",
|
|
6
6
|
"names": ["hotkeys"]
|
|
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/FocusGroup/FocusGroupContext.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\n\nconst FocusGroupContext = React.createContext();\nexport { FocusGroupContext };\nexport default FocusGroupContext;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAElB,MAAM,oBAAoB,aAAAA,QAAM,cAAc;AAE9C,IAAO,4BAAQ;",
|
|
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
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/FocusGroup/FocusGroupManager.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmGZ;AAnGX,mBAA4C;AAC5C,0BAA2B;AAC3B,wBAA2B;AAC3B,+BAAkC;AAElC,MAAM,OAAO,MAAM;AAEnB,MAAM,2BAA2B,uBAAU;AAAA,EAczC,YAAY,OAAO;AACjB,UAAM,KAAK;AAdb,qBAAY;AAgBV,SAAK,aAAa,IAAI,6BAAW,KAAK;AAEtC,UAAM,gBAAgB,IAAI;AAE1B,SAAK,UA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AM;AACf,WAAK,WAAW,aAAa,KAAK;AAAA,IACpC,GAAG,GAAG;AAAA,EACR;AAAA,EAEA,gBAAgB,MAAM;AACpB,QAAI,CAAC,KAAK;AAAW,WAAK,SAAS;AACnC,UAAM,QAAQ,KAAK,WAAW,mBAAmB,IAAI;AACrD,SAAK,iBAAiB,KAAK;AAAA,EAC7B;AAAA,EAEA,SAAS;AACP,UAAM,EAAE,SAAS,IAAI,KAAK;AAC1B,WAAO,4CAAC,2CAAkB,UAAlB,EAA2B,OAAO,KAAK,SAAU,UAAS;AAAA,EACpE;AACF;AA9FM,mBAGG,eAAe;AAAA,EACpB,oBAAoB;AAAA,EACpB,gBAAgB;AAAA,EAChB,aAAa,CAAC;AAAA,EACd,SAAS;AAAA,EACT,kBAAkB;AAAA,EAClB,sBAAsB;AAAA,EACtB,kBAAkB;AAAA,EAClB,iBAAiB;AACnB;AAqFF,IAAO,4BAAQ;",
|
|
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/FocusGroup/focusGroupManagerHoc.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADaf;AAXR,+BAAmC;AAEnC,SAAS,cAAc,kBAAkB,UAAU,CAAC,GAAG;AACrD,SAAO,SAAU,EAAE,kBAAkB,kBAAkB,kBAAkB,GAAG,MAAM,GAAG;AACnF,WACE;AAAA,MAAC;AAAA;AAAA,QACC,aAAa;AAAA,QACb;AAAA,QACA;AAAA,QACC,GAAG;AAAA,QAEJ,sDAAC,oBAAkB,GAAG,OAAQ,GAAG,SAAS;AAAA;AAAA,IAC5C;AAAA,EAEJ;AACF;AAGA,IAAO,+BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -19,6 +19,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
};
|
|
20
20
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
21
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
22
26
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
27
|
mod
|
|
24
28
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/FocusGroup/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAc,4BAAd;AACA,+BAAc,mCADd;AAEA,+BAAc,mCAFd;AAGA,+BAAc,mCAHd;AAIA,kCAAsD;AACtD,uBAAiE;AACjE,+BAAc,2CANd;",
|
|
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/FocusGroup/useFocusGroupItem.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAsC;AACtC,+BAAkC;AAElC,SAAS,kBAAkB,MAAM,CAAC,GAAG,OAAO;AAC1C,QAAM,EAAE,UAAU,YAAY,GAAG,aAAa,QAAI,yBAAW,0CAAiB,KAAK,CAAC;AAEpF,8BAAU,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,YAAY,GAAG,aAAa,QAAI,yBAAW,0CAAiB,KAAK,CAAC;AAEpF,8BAAU,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
|
}
|
|
@@ -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/FocusGroup/utils/getNextCellPosition.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["// 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,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,CAAC,EAAE;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,OAAO,KAAK,YAAY,KAAK,CAAC,KAAK,OAAO,EAAE,QAAQ,GAAG;AAC9D,mBAAW;AAAA,MACb;AAAA,IACF,WAAW,WAAW,YAAY,CAAC,KAAK,OAAO,EAAE,QAAQ,GAAG;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
|
}
|
|
@@ -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/GroupContext/Group.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2EZ;AA1EX,mBAAiC;AACjC,wBAAsB;AACtB,0BAA6B;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,WAAW,aAAa,CAAC;AAC/B,QAAM,MAAM;AACZ,QAAM,QAAQ,MAAM,QAAQ,QAAQ;AAEpC,MAAI,UAAU,IAAI;AAChB,QAAI,KAAK,QAAQ;AAAA,EACnB,OAAO;AACL,QAAI,OAAO,OAAO,CAAC;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AA,EACtF,UAAU,kBAAAA,QAAU;AACtB;AAGA,IAAO,gBAAQ;",
|
|
6
6
|
"names": ["PropTypes"]
|
|
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/GroupContext/GroupContext.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import React from 'react';\n\nexport const GroupContext = React.createContext();\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAEX,MAAM,eAAe,aAAAA,QAAM,cAAc;",
|
|
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
|
));
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/GroupContext/GroupItem.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADKW;AAJlC,0BAA6B;AAE7B,MAAM,EAAE,SAAS,IAAI;AAErB,MAAM,YAAY,CAAC,EAAE,OAAO,MAAM,4CAAC,YAAU,WAAC,YAAY,OAAO,OAAO,GAAE;AAG1E,IAAO,oBAAQ;",
|
|
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/GroupContext/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export { Group } from './Group.js';\nexport { GroupContext } from './GroupContext.js';\nexport { GroupItem } from './GroupItem.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAsB;AACtB,0BAA6B;AAC7B,uBAA0B;",
|
|
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
|
));
|