@tsed/react-formio 3.0.0-alpha.10 → 3.0.0-alpha.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/atoms/icon/Icon.js.map +1 -1
- package/dist/chunks/index.js +33 -30
- package/dist/chunks/index.js.map +1 -1
- package/dist/chunks/index.module.js +16 -16
- package/dist/chunks/index.module.js.map +1 -1
- package/dist/chunks/react-select-animated.esm.js +1204 -1101
- package/dist/chunks/react-select-animated.esm.js.map +1 -1
- package/dist/hooks/keyboard.constants.d.ts +38 -0
- package/dist/hooks/keyboard.constants.js +7 -0
- package/dist/hooks/keyboard.constants.js.map +1 -0
- package/dist/hooks/useKeyboardControls.d.ts +12 -0
- package/dist/hooks/useKeyboardControls.js +35 -0
- package/dist/hooks/useKeyboardControls.js.map +1 -0
- package/dist/hooks/useTooltip.js.map +1 -1
- package/dist/interfaces/Operation.d.ts +12 -2
- package/dist/molecules/alert/Alert.js.map +1 -1
- package/dist/molecules/button/Button.d.ts +18 -5
- package/dist/molecules/button/Button.js +22 -26
- package/dist/molecules/button/Button.js.map +1 -1
- package/dist/molecules/card/Card.js +7 -5
- package/dist/molecules/card/Card.js.map +1 -1
- package/dist/molecules/forms/form-control/FormControl.js.map +1 -1
- package/dist/molecules/forms/input-tags/InputTags.js +14 -14
- package/dist/molecules/forms/input-tags/InputTags.js.map +1 -1
- package/dist/molecules/forms/input-tags/components/ChoicesTags.js +26 -26
- package/dist/molecules/forms/input-tags/components/ChoicesTags.js.map +1 -1
- package/dist/molecules/forms/input-tags/components/ReactTags.js +289 -300
- package/dist/molecules/forms/input-tags/components/ReactTags.js.map +1 -1
- package/dist/molecules/forms/input-text/InputText.js +3 -3
- package/dist/molecules/forms/input-text/InputText.js.map +1 -1
- package/dist/molecules/forms/select/Select.js.map +1 -1
- package/dist/molecules/forms/select/components/ChoicesSelect.js +71 -73
- package/dist/molecules/forms/select/components/ChoicesSelect.js.map +1 -1
- package/dist/molecules/forms/select/components/HtmlSelect.js.map +1 -1
- package/dist/molecules/forms/select/components/ReactSelect.js +13 -14
- package/dist/molecules/forms/select/components/ReactSelect.js.map +1 -1
- package/dist/molecules/forms/select/components/choices.template.js +2340 -2257
- package/dist/molecules/forms/select/components/choices.template.js.map +1 -1
- package/dist/molecules/forms/select/hooks/useOptions.js.map +1 -1
- package/dist/molecules/loader/Loader.js.map +1 -1
- package/dist/molecules/modal/Modal.js +23 -24
- package/dist/molecules/modal/Modal.js.map +1 -1
- package/dist/molecules/pagination/Pagination.js +19 -19
- package/dist/molecules/pagination/Pagination.js.map +1 -1
- package/dist/molecules/pagination/PaginationButton.js.map +1 -1
- package/dist/molecules/pagination/utils/getPageNumbers.js.map +1 -1
- package/dist/molecules/table/Table.d.ts +11 -3
- package/dist/molecules/table/Table.js +31 -32
- package/dist/molecules/table/Table.js.map +1 -1
- package/dist/molecules/table/components/DefaultArrowSort.js.map +1 -1
- package/dist/molecules/table/components/DefaultCell.js.map +1 -1
- package/dist/molecules/table/components/DefaultCellFooter.js.map +1 -1
- package/dist/molecules/table/components/DefaultCellHeader.js.map +1 -1
- package/dist/molecules/table/components/DefaultCellOperations.d.ts +12 -4
- package/dist/molecules/table/components/DefaultCellOperations.js +13 -7
- package/dist/molecules/table/components/DefaultCellOperations.js.map +1 -1
- package/dist/molecules/table/components/DefaultFilter.js.map +1 -1
- package/dist/molecules/table/components/DefaultOperationButton.d.ts +12 -4
- package/dist/molecules/table/components/DefaultOperationButton.js +1 -1
- package/dist/molecules/table/components/DefaultOperationButton.js.map +1 -1
- package/dist/molecules/table/filters/RangeFilter.js +23 -24
- package/dist/molecules/table/filters/RangeFilter.js.map +1 -1
- package/dist/molecules/table/filters/SelectFilter.js +11 -13
- package/dist/molecules/table/filters/SelectFilter.js.map +1 -1
- package/dist/molecules/table/filters/TextFieldFilter.js.map +1 -1
- package/dist/molecules/table/hooks/useTable.d.ts +12 -4
- package/dist/molecules/table/hooks/useTable.js +7 -7
- package/dist/molecules/table/hooks/useTable.js.map +1 -1
- package/dist/molecules/table/hooks/useUniqValues.js.map +1 -1
- package/dist/molecules/table/utils/mapFormToColumns.js +20 -21
- package/dist/molecules/table/utils/mapFormToColumns.js.map +1 -1
- package/dist/molecules/tabs/Tab.d.ts +13 -0
- package/dist/molecules/tabs/Tab.js +66 -0
- package/dist/molecules/tabs/Tab.js.map +1 -0
- package/dist/molecules/tabs/TabList.d.ts +2 -0
- package/dist/molecules/tabs/TabList.js +23 -0
- package/dist/molecules/tabs/TabList.js.map +1 -0
- package/dist/molecules/tabs/TabPanel.d.ts +9 -0
- package/dist/molecules/tabs/TabPanel.js +27 -0
- package/dist/molecules/tabs/TabPanel.js.map +1 -0
- package/dist/molecules/tabs/Tabs.d.ts +4 -16
- package/dist/molecules/tabs/Tabs.js +7 -67
- package/dist/molecules/tabs/Tabs.js.map +1 -1
- package/dist/molecules/tabs/TabsBody.d.ts +1 -0
- package/dist/molecules/tabs/TabsBody.js +10 -0
- package/dist/molecules/tabs/TabsBody.js.map +1 -0
- package/dist/molecules/tabs/TabsLegacy.d.ts +17 -0
- package/dist/molecules/tabs/TabsLegacy.js +49 -0
- package/dist/molecules/tabs/TabsLegacy.js.map +1 -0
- package/dist/molecules/tabs/all.d.ts +5 -0
- package/dist/molecules/tabs/all.js +13 -0
- package/dist/molecules/tabs/all.js.map +1 -0
- package/dist/molecules/tabs/context/TabControl.d.ts +52 -0
- package/dist/molecules/tabs/context/TabControl.js +85 -0
- package/dist/molecules/tabs/context/TabControl.js.map +1 -0
- package/dist/molecules/tabs/hooks/tabControl.d.ts +44 -0
- package/dist/molecules/tabs/hooks/tabControl.js +34 -0
- package/dist/molecules/tabs/hooks/tabControl.js.map +1 -0
- package/dist/organisms/form/Form.js.map +1 -1
- package/dist/organisms/form/access/FormAccess.js +41 -41
- package/dist/organisms/form/access/FormAccess.js.map +1 -1
- package/dist/organisms/form/access/FormAccess.schema.js.map +1 -1
- package/dist/organisms/form/access/FormAccess.utils.js +2 -2
- package/dist/organisms/form/access/FormAccess.utils.js.map +1 -1
- package/dist/organisms/form/{action → actions}/FormAction.js +7 -8
- package/dist/organisms/form/actions/FormAction.js.map +1 -0
- package/dist/organisms/form/builder/FormBuilder.js.map +1 -1
- package/dist/organisms/form/builder/FormEdit.d.ts +3 -1
- package/dist/organisms/form/builder/FormEdit.js +38 -35
- package/dist/organisms/form/builder/FormEdit.js.map +1 -1
- package/dist/organisms/form/builder/FormEdit.reducer.js.map +1 -1
- package/dist/organisms/form/builder/FormEditCtas.js +34 -34
- package/dist/organisms/form/builder/FormEditCtas.js.map +1 -1
- package/dist/organisms/form/builder/FormParameters.js.map +1 -1
- package/dist/organisms/form/builder/useFormBuilder.js +41 -38
- package/dist/organisms/form/builder/useFormBuilder.js.map +1 -1
- package/dist/organisms/form/builder/useFormEdit.js +1 -1
- package/dist/organisms/form/builder/useFormEdit.js.map +1 -1
- package/dist/organisms/form/exports/FormExport.d.ts +5 -0
- package/dist/organisms/form/exports/FormExport.js +55 -0
- package/dist/organisms/form/exports/FormExport.js.map +1 -0
- package/dist/organisms/form/preview/FormPreview.d.ts +6 -0
- package/dist/organisms/form/preview/FormPreview.js +11 -0
- package/dist/organisms/form/preview/FormPreview.js.map +1 -0
- package/dist/organisms/form/settings/FormSettings.js +24 -24
- package/dist/organisms/form/settings/FormSettings.js.map +1 -1
- package/dist/organisms/form/settings/FormSettings.schema.js.map +1 -1
- package/dist/organisms/form/settings/FormSettings.utils.js.map +1 -1
- package/dist/organisms/form/useForm.js +664 -661
- package/dist/organisms/form/useForm.js.map +1 -1
- package/dist/organisms/modal/RemoveModal.js +16 -17
- package/dist/organisms/modal/RemoveModal.js.map +1 -1
- package/dist/organisms/table/actions/ActionsTable.js.map +1 -1
- package/dist/organisms/table/forms/FormsTable.js.map +1 -1
- package/dist/organisms/table/forms/components/FormsCell.js.map +1 -1
- package/dist/organisms/table/submissions/SubmissionsTable.d.ts +11 -3
- package/dist/organisms/table/submissions/SubmissionsTable.js +4 -1
- package/dist/organisms/table/submissions/SubmissionsTable.js.map +1 -1
- package/dist/organisms/views/FormViews.d.ts +24 -0
- package/dist/organisms/views/FormViews.js +96 -0
- package/dist/organisms/views/FormViews.js.map +1 -0
- package/dist/registries/components.js.map +1 -1
- package/dist/utils/getEventValue.js.map +1 -1
- package/dist/utils/iconClass.js.map +1 -1
- package/dist/utils/mapPagination.js.map +1 -1
- package/dist/utils/stopPropagationWrapper.js.map +1 -1
- package/package.json +7 -7
- package/src/atoms/icon/Icon.stories.tsx +1 -1
- package/src/hooks/keyboard.constants.ts +40 -0
- package/src/hooks/useKeyboardControls.spec.tsx +208 -0
- package/src/hooks/useKeyboardControls.ts +84 -0
- package/src/interfaces/Operation.ts +9 -3
- package/src/molecules/button/Button.stories.tsx +1 -1
- package/src/molecules/button/Button.tsx +43 -24
- package/src/molecules/card/Card.tsx +4 -0
- package/src/molecules/forms/form-control/FormControl.stories.tsx +1 -1
- package/src/molecules/forms/input-tags/InputTags.tsx +1 -1
- package/src/molecules/forms/input-tags/components/ChoicesTags.stories.tsx +1 -1
- package/src/molecules/forms/input-tags/components/ReactTags.stories.tsx +1 -1
- package/src/molecules/forms/input-text/InputText.stories.tsx +2 -2
- package/src/molecules/forms/select/components/ChoicesSelect.stories.tsx +2 -2
- package/src/molecules/forms/select/components/HtmlSelect.stories.tsx +2 -2
- package/src/molecules/forms/select/components/ReactSelect.stories.tsx +2 -2
- package/src/molecules/loader/Loader.stories.tsx +1 -1
- package/src/molecules/modal/Modal.stories.tsx +1 -1
- package/src/molecules/pagination/Pagination.stories.tsx +1 -8
- package/src/molecules/pagination/Pagination.tsx +0 -1
- package/src/molecules/table/Table.stories.tsx +36 -3
- package/src/molecules/table/Table.tsx +12 -6
- package/src/molecules/table/components/DefaultCellOperations.tsx +13 -7
- package/src/molecules/table/components/DefaultOperationButton.tsx +5 -4
- package/src/molecules/table/filters/SelectFilter.tsx +1 -1
- package/src/molecules/table/hooks/useTable.tsx +5 -5
- package/src/molecules/tabs/Tab.tsx +106 -0
- package/src/molecules/tabs/TabList.tsx +37 -0
- package/src/molecules/tabs/TabPanel.tsx +37 -0
- package/src/molecules/tabs/Tabs.spec.tsx +126 -73
- package/src/molecules/tabs/Tabs.stories.tsx +298 -65
- package/src/molecules/tabs/Tabs.tsx +10 -81
- package/src/molecules/tabs/TabsBody.tsx +11 -0
- package/src/molecules/tabs/TabsLegacy.stories.tsx +103 -0
- package/src/molecules/tabs/TabsLegacy.tsx +84 -0
- package/src/molecules/tabs/all.ts +5 -0
- package/src/molecules/tabs/context/TabControl.tsx +166 -0
- package/src/molecules/tabs/hooks/tabControl.spec.tsx +388 -0
- package/src/molecules/tabs/hooks/tabControl.ts +52 -0
- package/src/organisms/__fixtures__/form-firstname.fixture.json +1 -0
- package/src/organisms/__fixtures__/form.fixture.json +1 -0
- package/src/organisms/form/Form.stories.tsx +94 -118
- package/src/organisms/form/access/FormAccess.stories.tsx +2 -2
- package/src/organisms/form/actions/FormAction.stories.tsx +422 -0
- package/src/organisms/form/builder/FormBuilder.stories.tsx +4 -1
- package/src/organisms/form/builder/FormEdit.stories.tsx +1 -1
- package/src/organisms/form/builder/FormEdit.tsx +7 -1
- package/src/organisms/form/builder/useFormBuilder.ts +5 -1
- package/src/organisms/form/builder/useFormEdit.ts +1 -1
- package/src/organisms/form/exports/FormExport.stories.tsx +71 -0
- package/src/organisms/form/exports/FormExport.tsx +58 -0
- package/src/organisms/form/preview/FormPreview.stories.tsx +61 -0
- package/src/organisms/form/preview/FormPreview.tsx +21 -0
- package/src/organisms/modal/RemoveModal.stories.tsx +1 -1
- package/src/organisms/table/actions/ActionsTable.stories.tsx +38 -36
- package/src/organisms/table/submissions/SubmissionsTable.stories.tsx +103 -57
- package/src/organisms/table/submissions/SubmissionsTable.tsx +10 -4
- package/src/organisms/views/FormViews.stories.tsx +224 -0
- package/src/organisms/views/FormViews.tsx +146 -0
- package/vite.config.mts +2 -2
- package/dist/organisms/form/action/FormAction.js.map +0 -1
- package/src/organisms/form/action/FormAction.stories.tsx +0 -364
- package/tsconfig.app.json +0 -11
- package/tsconfig.json +0 -21
- package/tsconfig.node.json +0 -13
- package/tsconfig.spec.json +0 -14
- /package/dist/organisms/form/{action → actions}/FormAction.d.ts +0 -0
- /package/src/organisms/form/{action → actions}/FormAction.tsx +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const enum CODE {
|
|
2
|
+
ENTER = "Enter",
|
|
3
|
+
ESCAPE = "Escape",
|
|
4
|
+
ARROW_LEFT = "ArrowLeft",
|
|
5
|
+
ARROW_UP = "ArrowUp",
|
|
6
|
+
ARROW_RIGHT = "ArrowRight",
|
|
7
|
+
ARROW_DOWN = "ArrowDown",
|
|
8
|
+
SPACE = "Space",
|
|
9
|
+
END = "End",
|
|
10
|
+
HOME = "Home"
|
|
11
|
+
}
|
|
12
|
+
export declare const enum KEY {
|
|
13
|
+
ENTER = "Enter",
|
|
14
|
+
ESCAPE = "Escape",
|
|
15
|
+
ARROW_LEFT = "ArrowLeft",
|
|
16
|
+
ARROW_UP = "ArrowUp",
|
|
17
|
+
ARROW_RIGHT = "ArrowRight",
|
|
18
|
+
ARROW_DOWN = "ArrowDown",
|
|
19
|
+
END = "End",
|
|
20
|
+
HOME = "Home",
|
|
21
|
+
SPACE = " ",
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated
|
|
24
|
+
* Used by old browers, see https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values#whitespace_keys
|
|
25
|
+
*/
|
|
26
|
+
SPACEBAR = "Spacebar"
|
|
27
|
+
}
|
|
28
|
+
export declare const enum KEY_CODE {
|
|
29
|
+
ENTER = 13,
|
|
30
|
+
ESCAPE = 27,
|
|
31
|
+
ARROW_LEFT = 37,
|
|
32
|
+
ARROW_UP = 38,
|
|
33
|
+
ARROW_RIGHT = 39,
|
|
34
|
+
ARROW_DOWN = 40,
|
|
35
|
+
SPACE = 32,
|
|
36
|
+
END = 35,
|
|
37
|
+
HOME = 36
|
|
38
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var A = /* @__PURE__ */ ((R) => (R.ENTER = "Enter", R.ESCAPE = "Escape", R.ARROW_LEFT = "ArrowLeft", R.ARROW_UP = "ArrowUp", R.ARROW_RIGHT = "ArrowRight", R.ARROW_DOWN = "ArrowDown", R.SPACE = "Space", R.END = "End", R.HOME = "Home", R))(A || {}), r = /* @__PURE__ */ ((R) => (R.ENTER = "Enter", R.ESCAPE = "Escape", R.ARROW_LEFT = "ArrowLeft", R.ARROW_UP = "ArrowUp", R.ARROW_RIGHT = "ArrowRight", R.ARROW_DOWN = "ArrowDown", R.END = "End", R.HOME = "Home", R.SPACE = " ", R.SPACEBAR = "Spacebar", R))(r || {}), W = /* @__PURE__ */ ((R) => (R[R.ENTER = 13] = "ENTER", R[R.ESCAPE = 27] = "ESCAPE", R[R.ARROW_LEFT = 37] = "ARROW_LEFT", R[R.ARROW_UP = 38] = "ARROW_UP", R[R.ARROW_RIGHT = 39] = "ARROW_RIGHT", R[R.ARROW_DOWN = 40] = "ARROW_DOWN", R[R.SPACE = 32] = "SPACE", R[R.END = 35] = "END", R[R.HOME = 36] = "HOME", R))(W || {});
|
|
2
|
+
export {
|
|
3
|
+
A as CODE,
|
|
4
|
+
r as KEY,
|
|
5
|
+
W as KEY_CODE
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=keyboard.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard.constants.js","sources":["../../src/hooks/keyboard.constants.ts"],"sourcesContent":["export const enum CODE {\n ENTER = \"Enter\",\n ESCAPE = \"Escape\",\n ARROW_LEFT = \"ArrowLeft\",\n ARROW_UP = \"ArrowUp\",\n ARROW_RIGHT = \"ArrowRight\",\n ARROW_DOWN = \"ArrowDown\",\n SPACE = \"Space\",\n END = \"End\",\n HOME = \"Home\"\n}\n\nexport const enum KEY {\n ENTER = \"Enter\",\n ESCAPE = \"Escape\",\n ARROW_LEFT = \"ArrowLeft\",\n ARROW_UP = \"ArrowUp\",\n ARROW_RIGHT = \"ArrowRight\",\n ARROW_DOWN = \"ArrowDown\",\n END = \"End\",\n HOME = \"Home\",\n SPACE = \" \",\n /**\n * @deprecated\n * Used by old browers, see https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values#whitespace_keys\n */\n SPACEBAR = \"Spacebar\"\n}\n\nexport const enum KEY_CODE {\n ENTER = 13,\n ESCAPE = 27,\n ARROW_LEFT = 37,\n ARROW_UP = 38,\n ARROW_RIGHT = 39,\n ARROW_DOWN = 40,\n SPACE = 32,\n END = 35,\n HOME = 36\n}\n"],"names":["CODE","KEY","KEY_CODE"],"mappings":"AAAO,IAAWA,sBAAAA,OAChBA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,aAAa,aACbA,EAAA,WAAW,WACXA,EAAA,cAAc,cACdA,EAAA,aAAa,aACbA,EAAA,QAAQ,SACRA,EAAA,MAAM,OACNA,EAAA,OAAO,QATSA,IAAAA,KAAA,CAAA,CAAA,GAYAC,sBAAAA,OAChBA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,aAAa,aACbA,EAAA,WAAW,WACXA,EAAA,cAAc,cACdA,EAAA,aAAa,aACbA,EAAA,MAAM,OACNA,EAAA,OAAO,QACPA,EAAA,QAAQ,KAKRA,EAAA,WAAW,YAdKA,IAAAA,KAAA,CAAA,CAAA,GAiBAC,sBAAAA,OAChBA,EAAAA,EAAA,QAAQ,EAAA,IAAR,SACAA,EAAAA,EAAA,SAAS,EAAA,IAAT,UACAA,EAAAA,EAAA,aAAa,EAAA,IAAb,cACAA,EAAAA,EAAA,WAAW,EAAA,IAAX,YACAA,EAAAA,EAAA,cAAc,EAAA,IAAd,eACAA,EAAAA,EAAA,aAAa,EAAA,IAAb,cACAA,EAAAA,EAAA,QAAQ,EAAA,IAAR,SACAA,EAAAA,EAAA,MAAM,EAAA,IAAN,OACAA,EAAAA,EAAA,OAAO,EAAA,IAAP,QATgBA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { KeyboardEvent } from 'react';
|
|
2
|
+
interface Options {
|
|
3
|
+
up?: VoidFunction;
|
|
4
|
+
down?: VoidFunction;
|
|
5
|
+
left?: VoidFunction;
|
|
6
|
+
right?: VoidFunction;
|
|
7
|
+
start?: VoidFunction;
|
|
8
|
+
end?: VoidFunction;
|
|
9
|
+
activate?: VoidFunction;
|
|
10
|
+
}
|
|
11
|
+
export declare const useKeyboardControls: ({ up, down, left, right, start, end, activate }: Options) => (event: KeyboardEvent<HTMLDivElement | HTMLButtonElement>) => void;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback as d } from "react";
|
|
3
|
+
import { CODE as u, KEY as c } from "./keyboard.constants.js";
|
|
4
|
+
const t = (o) => o.key === c.ENTER || o.key === c.SPACE || o.key === c.SPACEBAR || o.code === u.ENTER || o.code === u.SPACE, e = () => {
|
|
5
|
+
}, p = ({
|
|
6
|
+
up: o = e,
|
|
7
|
+
down: f = e,
|
|
8
|
+
left: E = e,
|
|
9
|
+
right: R = e,
|
|
10
|
+
start: i = e,
|
|
11
|
+
end: l = e,
|
|
12
|
+
activate: D = e
|
|
13
|
+
}) => d(
|
|
14
|
+
(r) => {
|
|
15
|
+
if (t(r))
|
|
16
|
+
return D();
|
|
17
|
+
if (r.code === u.HOME)
|
|
18
|
+
return r.preventDefault(), i();
|
|
19
|
+
if (r.code === u.END)
|
|
20
|
+
return r.preventDefault(), l();
|
|
21
|
+
if (r.code === u.ARROW_UP)
|
|
22
|
+
return r.preventDefault(), o();
|
|
23
|
+
if (r.code === u.ARROW_DOWN)
|
|
24
|
+
return r.preventDefault(), f();
|
|
25
|
+
if (r.code === u.ARROW_RIGHT)
|
|
26
|
+
return r.preventDefault(), R();
|
|
27
|
+
if (r.code === u.ARROW_LEFT)
|
|
28
|
+
return r.preventDefault(), E();
|
|
29
|
+
},
|
|
30
|
+
[D, f, l, E, R, i, o]
|
|
31
|
+
);
|
|
32
|
+
export {
|
|
33
|
+
p as useKeyboardControls
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=useKeyboardControls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKeyboardControls.js","sources":["../../src/hooks/useKeyboardControls.ts"],"sourcesContent":["\"use client\";\n\nimport { type KeyboardEvent, useCallback } from \"react\";\n\nimport { CODE, KEY } from \"./keyboard.constants\";\n\ninterface Options {\n up?: VoidFunction;\n down?: VoidFunction;\n left?: VoidFunction;\n right?: VoidFunction;\n start?: VoidFunction;\n end?: VoidFunction;\n activate?: VoidFunction;\n}\n\nconst isActivateKey = (event: KeyboardEvent<HTMLDivElement | HTMLButtonElement>) => {\n return (\n event.key === KEY.ENTER ||\n event.key === KEY.SPACE ||\n event.key === KEY.SPACEBAR ||\n event.code === CODE.ENTER ||\n event.code === CODE.SPACE\n );\n};\n\nconst voidFn = () => {};\n\nexport const useKeyboardControls = ({\n up = voidFn,\n down = voidFn,\n left = voidFn,\n right = voidFn,\n start = voidFn,\n end = voidFn,\n activate = voidFn\n}: Options) => {\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement | HTMLButtonElement>) => {\n if (isActivateKey(event)) {\n return activate();\n }\n\n if (event.code === CODE.HOME) {\n event.preventDefault();\n\n return start();\n }\n\n if (event.code === CODE.END) {\n event.preventDefault();\n\n return end();\n }\n\n if (event.code === CODE.ARROW_UP) {\n event.preventDefault();\n\n return up();\n }\n\n if (event.code === CODE.ARROW_DOWN) {\n event.preventDefault();\n\n return down();\n }\n\n if (event.code === CODE.ARROW_RIGHT) {\n event.preventDefault();\n\n return right();\n }\n\n if (event.code === CODE.ARROW_LEFT) {\n event.preventDefault();\n\n return left();\n }\n },\n [activate, down, end, left, right, start, up]\n );\n\n return handleKeyDown;\n};\n"],"names":["isActivateKey","event","KEY","CODE","voidFn","useKeyboardControls","up","down","left","right","start","end","activate","useCallback"],"mappings":";;;AAgBA,MAAMA,IAAgB,CAACC,MAEnBA,EAAM,QAAQC,EAAI,SAClBD,EAAM,QAAQC,EAAI,SAClBD,EAAM,QAAQC,EAAI,YAClBD,EAAM,SAASE,EAAK,SACpBF,EAAM,SAASE,EAAK,OAIlBC,IAAS,MAAM;AAAC,GAETC,IAAsB,CAAC;AAAA,EAClC,IAAAC,IAAKF;AAAA,EACL,MAAAG,IAAOH;AAAA,EACP,MAAAI,IAAOJ;AAAA,EACP,OAAAK,IAAQL;AAAA,EACR,OAAAM,IAAQN;AAAA,EACR,KAAAO,IAAMP;AAAA,EACN,UAAAQ,IAAWR;AACb,MACwBS;AAAA,EACpB,CAACZ,MAA6D;AAC5D,QAAID,EAAcC,CAAK;AACrB,aAAOW,EAAA;AAGT,QAAIX,EAAM,SAASE,EAAK;AACtB,aAAAF,EAAM,eAAA,GAECS,EAAA;AAGT,QAAIT,EAAM,SAASE,EAAK;AACtB,aAAAF,EAAM,eAAA,GAECU,EAAA;AAGT,QAAIV,EAAM,SAASE,EAAK;AACtB,aAAAF,EAAM,eAAA,GAECK,EAAA;AAGT,QAAIL,EAAM,SAASE,EAAK;AACtB,aAAAF,EAAM,eAAA,GAECM,EAAA;AAGT,QAAIN,EAAM,SAASE,EAAK;AACtB,aAAAF,EAAM,eAAA,GAECQ,EAAA;AAGT,QAAIR,EAAM,SAASE,EAAK;AACtB,aAAAF,EAAM,eAAA,GAECO,EAAA;AAAA,EAEX;AAAA,EACA,CAACI,GAAUL,GAAMI,GAAKH,GAAMC,GAAOC,GAAOJ,CAAE;AAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTooltip.js","sources":["../../src/hooks/useTooltip.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\nimport Tooltip, { Options } from \"tooltip.js\";\n\nexport function useTooltip(options: Options) {\n const ref = useRef<any>();\n\n useEffect(() => {\n ref.current && new Tooltip(ref.current as any, options);\n }, [ref, options]);\n\n return ref;\n}\n"],"names":["useTooltip","options","ref","useRef","useEffect","Tooltip"],"mappings":";;AAGO,SAASA,EAAWC,GAAkB;AAC3C,QAAMC,IAAMC,
|
|
1
|
+
{"version":3,"file":"useTooltip.js","sources":["../../src/hooks/useTooltip.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\nimport Tooltip, { Options } from \"tooltip.js\";\n\nexport function useTooltip(options: Options) {\n const ref = useRef<any>();\n\n useEffect(() => {\n ref.current && new Tooltip(ref.current as any, options);\n }, [ref, options]);\n\n return ref;\n}\n"],"names":["useTooltip","options","ref","useRef","useEffect","Tooltip"],"mappings":";;AAGO,SAASA,EAAWC,GAAkB;AAC3C,QAAMC,IAAMC,EAAA;AAEZ,SAAAC,EAAU,MAAM;AACd,IAAAF,EAAI,WAAW,IAAIG,EAAQH,EAAI,SAAgBD,CAAO;AAAA,EACxD,GAAG,CAACC,GAAKD,CAAO,CAAC,GAEVC;AACT;"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { OperationButtonProps } from '../molecules/table/components/DefaultOperationButton.js';
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
import { JSON } from './SubmissionType.js';
|
|
4
|
+
export type CellMetadata = Record<string, unknown>;
|
|
5
|
+
export type PermissionsResolver<Data extends {
|
|
6
|
+
[key: string]: JSON;
|
|
7
|
+
} = {
|
|
8
|
+
[key: string]: JSON;
|
|
9
|
+
}> = (data: Data, metadata: CellMetadata, operation: Operation<Data>) => void;
|
|
10
|
+
export interface Operation<Data extends {
|
|
11
|
+
[key: string]: JSON;
|
|
12
|
+
} = {
|
|
13
|
+
[key: string]: JSON;
|
|
14
|
+
}> {
|
|
5
15
|
/**
|
|
6
16
|
* Action identifier
|
|
7
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sources":["../../../src/molecules/alert/Alert.tsx"],"sourcesContent":["import { PropsWithChildren } from \"react\";\n\nfunction formatError(error: any): any {\n if (!error || (Array.isArray(error) && !error.length)) {\n return \"\";\n }\n\n if (typeof error === \"string\") {\n return error;\n }\n\n if (Array.isArray(error)) {\n return error.map(formatError);\n }\n\n if (Object.prototype.hasOwnProperty.call(error, \"errors\")) {\n return Object.keys(error.errors).map((key, index) => {\n const item = error.errors[key];\n return (\n <div key={index}>\n <strong>\n {item.name} ({item.path})\n </strong>{\" \"}\n - {item.message}\n </div>\n );\n });\n }\n\n // If this is a standard error.\n if (Object.prototype.hasOwnProperty.call(error, \"message\")) {\n return error.message;\n }\n\n // If this is a joy validation error.\n if (Object.prototype.hasOwnProperty.call(error, \"name\") && error.name === \"ValidationError\") {\n return error.details.map((item: any, index: number) => {\n return <div key={index}>{item.message}</div>;\n });\n }\n\n // If a conflict error occurs on a form, the form is returned.\n if (Object.prototype.hasOwnProperty.call(error, \"_id\") && Object.prototype.hasOwnProperty.call(error, \"display\")) {\n return \"Another user has saved this form already. Please reload and re-apply your changes.\";\n }\n\n return \"An error occurred. See console logs for details.\";\n}\n\nexport interface AlertProps {\n message?: string | any | string[];\n type?: string;\n}\n\nexport function Alert({ children, message, type = \"danger\" }: PropsWithChildren<AlertProps>) {\n return (\n <div className={`alert alert-${type}`} role='alert'>\n {formatError(message)}\n {children}\n </div>\n );\n}\n"],"names":["formatError","error","key","index","item","jsxs","jsx","Alert","children","message","type"],"mappings":";AAEA,SAASA,EAAYC,GAAiB;
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../../../src/molecules/alert/Alert.tsx"],"sourcesContent":["import { PropsWithChildren } from \"react\";\n\nfunction formatError(error: any): any {\n if (!error || (Array.isArray(error) && !error.length)) {\n return \"\";\n }\n\n if (typeof error === \"string\") {\n return error;\n }\n\n if (Array.isArray(error)) {\n return error.map(formatError);\n }\n\n if (Object.prototype.hasOwnProperty.call(error, \"errors\")) {\n return Object.keys(error.errors).map((key, index) => {\n const item = error.errors[key];\n return (\n <div key={index}>\n <strong>\n {item.name} ({item.path})\n </strong>{\" \"}\n - {item.message}\n </div>\n );\n });\n }\n\n // If this is a standard error.\n if (Object.prototype.hasOwnProperty.call(error, \"message\")) {\n return error.message;\n }\n\n // If this is a joy validation error.\n if (Object.prototype.hasOwnProperty.call(error, \"name\") && error.name === \"ValidationError\") {\n return error.details.map((item: any, index: number) => {\n return <div key={index}>{item.message}</div>;\n });\n }\n\n // If a conflict error occurs on a form, the form is returned.\n if (Object.prototype.hasOwnProperty.call(error, \"_id\") && Object.prototype.hasOwnProperty.call(error, \"display\")) {\n return \"Another user has saved this form already. Please reload and re-apply your changes.\";\n }\n\n return \"An error occurred. See console logs for details.\";\n}\n\nexport interface AlertProps {\n message?: string | any | string[];\n type?: string;\n}\n\nexport function Alert({ children, message, type = \"danger\" }: PropsWithChildren<AlertProps>) {\n return (\n <div className={`alert alert-${type}`} role='alert'>\n {formatError(message)}\n {children}\n </div>\n );\n}\n"],"names":["formatError","error","key","index","item","jsxs","jsx","Alert","children","message","type"],"mappings":";AAEA,SAASA,EAAYC,GAAiB;AACpC,SAAI,CAACA,KAAU,MAAM,QAAQA,CAAK,KAAK,CAACA,EAAM,SACrC,KAGL,OAAOA,KAAU,WACZA,IAGL,MAAM,QAAQA,CAAK,IACdA,EAAM,IAAID,CAAW,IAG1B,OAAO,UAAU,eAAe,KAAKC,GAAO,QAAQ,IAC/C,OAAO,KAAKA,EAAM,MAAM,EAAE,IAAI,CAACC,GAAKC,MAAU;AACnD,UAAMC,IAAOH,EAAM,OAAOC,CAAG;AAC7B,6BACG,OAAA,EACC,UAAA;AAAA,MAAA,gBAAAG,EAAC,UAAA,EACE,UAAA;AAAA,QAAAD,EAAK;AAAA,QAAK;AAAA,QAAGA,EAAK;AAAA,QAAK;AAAA,MAAA,GAC1B;AAAA,MAAU;AAAA,MAAI;AAAA,MACXA,EAAK;AAAA,IAAA,EAAA,GAJAD,CAKV;AAAA,EAEJ,CAAC,IAIC,OAAO,UAAU,eAAe,KAAKF,GAAO,SAAS,IAChDA,EAAM,UAIX,OAAO,UAAU,eAAe,KAAKA,GAAO,MAAM,KAAKA,EAAM,SAAS,oBACjEA,EAAM,QAAQ,IAAI,CAACG,GAAWD,MAC5B,gBAAAG,EAAC,OAAA,EAAiB,UAAAF,EAAK,QAAA,GAAbD,CAAqB,CACvC,IAIC,OAAO,UAAU,eAAe,KAAKF,GAAO,KAAK,KAAK,OAAO,UAAU,eAAe,KAAKA,GAAO,SAAS,IACtG,uFAGF;AACT;AAOO,SAASM,EAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,MAAAC,IAAO,YAA2C;AAC3F,2BACG,OAAA,EAAI,WAAW,eAAeA,CAAI,IAAI,MAAK,SACzC,UAAA;AAAA,IAAAV,EAAYS,CAAO;AAAA,IACnBD;AAAA,EAAA,GACH;AAEJ;"}
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes } from 'react';
|
|
1
|
+
import { ButtonHTMLAttributes, PropsWithChildren } from 'react';
|
|
2
2
|
export declare const BUTTON_VARIANTS: string[];
|
|
3
|
-
|
|
3
|
+
interface BaseButtonProps<T extends HTMLElement> extends ButtonHTMLAttributes<T> {
|
|
4
|
+
tag?: "button" | "a" | "input" | "div";
|
|
4
5
|
variant?: (typeof BUTTON_VARIANTS)[keyof typeof BUTTON_VARIANTS] | string;
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
7
|
+
interface HTMLAnchorProps extends BaseButtonProps<HTMLAnchorElement> {
|
|
8
|
+
tag: "a";
|
|
9
|
+
}
|
|
10
|
+
interface HTMLButtonProps extends BaseButtonProps<HTMLButtonElement> {
|
|
11
|
+
tag?: "button";
|
|
12
|
+
}
|
|
13
|
+
interface HTMLInputProps extends BaseButtonProps<HTMLInputElement> {
|
|
14
|
+
tag: "input";
|
|
15
|
+
}
|
|
16
|
+
interface HTMLDivProps extends BaseButtonProps<HTMLDivElement> {
|
|
17
|
+
tag: "div";
|
|
18
|
+
}
|
|
19
|
+
export type ButtonProps = HTMLAnchorProps | HTMLButtonProps | HTMLInputProps | HTMLDivProps;
|
|
20
|
+
export declare const Button: import('react').ForwardRefExoticComponent<PropsWithChildren<ButtonProps> & import('react').RefAttributes<unknown>>;
|
|
21
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { c as s } from "../../chunks/index.js";
|
|
3
3
|
import { forwardRef as u } from "react";
|
|
4
4
|
import { registerComponent as c } from "../../registries/components.js";
|
|
5
5
|
const k = [
|
|
@@ -21,32 +21,28 @@ const k = [
|
|
|
21
21
|
"outline-light",
|
|
22
22
|
"outline-dark",
|
|
23
23
|
"outline-link"
|
|
24
|
-
],
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
disabled: n.disabled
|
|
34
|
-
},
|
|
35
|
-
`btn-${t}`,
|
|
36
|
-
e
|
|
37
|
-
),
|
|
38
|
-
disabled: n.disabled,
|
|
39
|
-
onClick: (a) => {
|
|
40
|
-
var i;
|
|
41
|
-
return !n.disabled && ((i = n.onClick) == null ? void 0 : i.call(n, a));
|
|
24
|
+
], i = u(({ tag: t = "button", variant: e, className: o, children: a, ...n }, l) => /* @__PURE__ */ d(
|
|
25
|
+
t,
|
|
26
|
+
{
|
|
27
|
+
...n,
|
|
28
|
+
ref: l,
|
|
29
|
+
className: s(
|
|
30
|
+
"btn flex gap-1",
|
|
31
|
+
{
|
|
32
|
+
disabled: n.disabled
|
|
42
33
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
`btn-${e}`,
|
|
35
|
+
o
|
|
36
|
+
),
|
|
37
|
+
disabled: n.disabled,
|
|
38
|
+
onClick: (r) => !n.disabled && n.onClick?.(r),
|
|
39
|
+
children: a
|
|
40
|
+
}
|
|
41
|
+
));
|
|
42
|
+
i.displayName = "Button";
|
|
43
|
+
c("Button", i);
|
|
48
44
|
export {
|
|
49
45
|
k as BUTTON_VARIANTS,
|
|
50
|
-
|
|
46
|
+
i as Button
|
|
51
47
|
};
|
|
52
48
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/molecules/button/Button.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport { type ButtonHTMLAttributes, forwardRef, type
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/molecules/button/Button.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport { type ButtonHTMLAttributes, forwardRef, type PropsWithChildren } from \"react\";\n\nimport { registerComponent } from \"../../registries/components\";\n\nexport const BUTTON_VARIANTS = [\n \"primary\",\n \"secondary\",\n \"success\",\n \"danger\",\n \"warning\",\n \"info\",\n \"light\",\n \"dark\",\n \"link\",\n \"outline-primary\",\n \"outline-secondary\",\n \"outline-success\",\n \"outline-danger\",\n \"outline-warning\",\n \"outline-info\",\n \"outline-light\",\n \"outline-dark\",\n \"outline-link\"\n];\n\ninterface BaseButtonProps<T extends HTMLElement> extends ButtonHTMLAttributes<T> {\n tag?: \"button\" | \"a\" | \"input\" | \"div\";\n variant?: (typeof BUTTON_VARIANTS)[keyof typeof BUTTON_VARIANTS] | string;\n}\n\ninterface HTMLAnchorProps extends BaseButtonProps<HTMLAnchorElement> {\n tag: \"a\";\n}\n\ninterface HTMLButtonProps extends BaseButtonProps<HTMLButtonElement> {\n tag?: \"button\";\n}\n\ninterface HTMLInputProps extends BaseButtonProps<HTMLInputElement> {\n tag: \"input\";\n}\n\ninterface HTMLDivProps extends BaseButtonProps<HTMLDivElement> {\n tag: \"div\";\n}\n\nexport type ButtonProps = HTMLAnchorProps | HTMLButtonProps | HTMLInputProps | HTMLDivProps;\n\nexport const Button = forwardRef(({ tag: Tag = \"button\", variant, className, children, ...props }: PropsWithChildren<ButtonProps>, ref) => {\n return (\n <Tag\n {...(props as any)}\n ref={ref as any}\n className={cx(\n \"btn flex gap-1\",\n {\n disabled: props.disabled\n },\n `btn-${variant}`,\n className\n )}\n disabled={props.disabled}\n onClick={(evt) => !props.disabled && props.onClick?.(evt as any)}\n >\n {children}\n </Tag>\n );\n});\n\nButton.displayName = \"Button\";\n\nregisterComponent(\"Button\", Button);\n"],"names":["BUTTON_VARIANTS","Button","forwardRef","Tag","variant","className","children","props","ref","jsx","cx","evt","registerComponent"],"mappings":";;;;AAKO,MAAMA,IAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAyBaC,IAASC,EAAW,CAAC,EAAE,KAAKC,IAAM,UAAU,SAAAC,GAAS,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAAyCC,MAE/H,gBAAAC;AAAA,EAACN;AAAA,EAAA;AAAA,IACE,GAAII;AAAA,IACL,KAAAC;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACA;AAAA,QACE,UAAUH,EAAM;AAAA,MAAA;AAAA,MAElB,OAAOH,CAAO;AAAA,MACdC;AAAA,IAAA;AAAA,IAEF,UAAUE,EAAM;AAAA,IAChB,SAAS,CAACI,MAAQ,CAACJ,EAAM,YAAYA,EAAM,UAAUI,CAAU;AAAA,IAE9D,UAAAL;AAAA,EAAA;AAAA,CAGN;AAEDL,EAAO,cAAc;AAErBW,EAAkB,UAAUX,CAAM;"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { c as i } from "../../chunks/index.js";
|
|
3
|
+
import { registerComponent as s } from "../../registries/components.js";
|
|
4
|
+
function o({ children: a, label: e, className: c }) {
|
|
5
|
+
return /* @__PURE__ */ d("div", { className: i("card", c), children: [
|
|
6
|
+
/* @__PURE__ */ r("div", { className: "card-header ", children: /* @__PURE__ */ r("h4", { className: "card-title", children: e }) }),
|
|
6
7
|
/* @__PURE__ */ r("div", { className: "card-body", role: "article", children: a })
|
|
7
8
|
] });
|
|
8
9
|
}
|
|
10
|
+
s("Card", o);
|
|
9
11
|
export {
|
|
10
|
-
|
|
12
|
+
o as Card
|
|
11
13
|
};
|
|
12
14
|
//# sourceMappingURL=Card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sources":["../../../src/molecules/card/Card.tsx"],"sourcesContent":["import classnames from \"classnames\";\nimport { PropsWithChildren } from \"react\";\n\nexport interface CardProps {\n label: string;\n className?: string;\n}\n\nexport function Card({ children, label, className }: PropsWithChildren<CardProps>) {\n return (\n <div className={classnames(\"card\", className)}>\n <div className={\"card-header \"}>\n <h4 className={\"card-title\"}>{label}</h4>\n </div>\n <div className={\"card-body\"} role={\"article\"}>\n {children}\n </div>\n </div>\n );\n}\n"],"names":["Card","children","label","className","classnames","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../../src/molecules/card/Card.tsx"],"sourcesContent":["import classnames from \"classnames\";\nimport { PropsWithChildren } from \"react\";\n\nimport { registerComponent } from \"../../registries/components.js\";\n\nexport interface CardProps {\n label: string;\n className?: string;\n}\n\nexport function Card({ children, label, className }: PropsWithChildren<CardProps>) {\n return (\n <div className={classnames(\"card\", className)}>\n <div className={\"card-header \"}>\n <h4 className={\"card-title\"}>{label}</h4>\n </div>\n <div className={\"card-body\"} role={\"article\"}>\n {children}\n </div>\n </div>\n );\n}\n\nregisterComponent(\"Card\", Card);\n"],"names":["Card","children","label","className","classnames","jsx","registerComponent"],"mappings":";;;AAUO,SAASA,EAAK,EAAE,UAAAC,GAAU,OAAAC,GAAO,WAAAC,KAA2C;AACjF,2BACG,OAAA,EAAI,WAAWC,EAAW,QAAQD,CAAS,GAC1C,UAAA;AAAA,IAAA,gBAAAE,EAAC,OAAA,EAAI,WAAW,gBACd,UAAA,gBAAAA,EAAC,QAAG,WAAW,cAAe,aAAM,EAAA,CACtC;AAAA,sBACC,OAAA,EAAI,WAAW,aAAa,MAAM,WAChC,UAAAJ,EAAA,CACH;AAAA,EAAA,GACF;AAEJ;AAEAK,EAAkB,QAAQN,CAAI;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormControl.js","sources":["../../../../src/molecules/forms/form-control/FormControl.tsx"],"sourcesContent":["import classnames from \"classnames\";\nimport omit from \"lodash/omit\";\nimport { HTMLAttributes, InputHTMLAttributes, PropsWithChildren, ReactNode } from \"react\";\n\nimport { registerComponent } from \"../../../registries/components\";\n\nexport type BaseFormControlProps<Value = unknown> = {\n label?: string;\n description?: string | ReactNode;\n before?: ReactNode | string;\n after?: ReactNode | string;\n shadow?: boolean;\n value?: Value;\n onChange?: (name: string | undefined, value: Value) => void;\n /**\n * The input size\n */\n size?: \"small\" | string;\n};\nexport type FormControlProps<\n Value = unknown,\n Attributes extends HTMLAttributes<HTMLElement> = InputHTMLAttributes<HTMLInputElement>\n> = BaseFormControlProps<Value> & Omit<Attributes, \"onChange\" | \"value\" | \"size\">;\n\nexport function cleanFormControlProps(props: FormControlProps, omitted: string[] = []): any {\n return omit(props, [\"label\", \"description\", \"prefix\", \"suffix\", \"size\", \"shadow\", ...omitted]);\n}\n\nexport function FormControl<Value = unknown>({\n children,\n name = \"\",\n id = name,\n required,\n before,\n after,\n description,\n label,\n size,\n className\n}: PropsWithChildren<FormControlProps<Value>>) {\n return (\n <div\n data-testid={name && `form-group-${name}`}\n id={`form-group-${name || \"\"}`}\n className={classnames(\n \"form-group\",\n {\n \"-with-before\": !!before,\n \"-with-after\": !!after\n },\n size && `-size-${size}`,\n className\n )}\n >\n {label && (\n <label htmlFor={id} data-testid='form-control-label' className={`col-form-label ${required ? \" field-required\" : \"\"}`}>\n {label}\n </label>\n )}\n <div className={\"input-group\"}>\n {before && (\n <div className='input-group-prepend'>\n <span className='input-group-text' data-testid='form-control-prefix'>\n {before}\n </span>\n </div>\n )}\n {children}\n {after && (\n <div className='input-group-append'>\n <span className='input-group-text' data-testid='form-control-suffix'>\n {after}\n </span>\n </div>\n )}\n </div>\n {description && (\n <div data-testid='form-control-description' className='form-text text-muted'>\n {description}\n </div>\n )}\n </div>\n );\n}\n\nregisterComponent(\"FormControl\", FormControl);\n"],"names":["cleanFormControlProps","props","omitted","omit","FormControl","children","name","id","required","before","after","description","label","size","className","jsxs","classnames","jsx","registerComponent"],"mappings":";;;;AAwBO,SAASA,EAAsBC,GAAyBC,IAAoB,IAAS;
|
|
1
|
+
{"version":3,"file":"FormControl.js","sources":["../../../../src/molecules/forms/form-control/FormControl.tsx"],"sourcesContent":["import classnames from \"classnames\";\nimport omit from \"lodash/omit\";\nimport { HTMLAttributes, InputHTMLAttributes, PropsWithChildren, ReactNode } from \"react\";\n\nimport { registerComponent } from \"../../../registries/components\";\n\nexport type BaseFormControlProps<Value = unknown> = {\n label?: string;\n description?: string | ReactNode;\n before?: ReactNode | string;\n after?: ReactNode | string;\n shadow?: boolean;\n value?: Value;\n onChange?: (name: string | undefined, value: Value) => void;\n /**\n * The input size\n */\n size?: \"small\" | string;\n};\nexport type FormControlProps<\n Value = unknown,\n Attributes extends HTMLAttributes<HTMLElement> = InputHTMLAttributes<HTMLInputElement>\n> = BaseFormControlProps<Value> & Omit<Attributes, \"onChange\" | \"value\" | \"size\">;\n\nexport function cleanFormControlProps(props: FormControlProps, omitted: string[] = []): any {\n return omit(props, [\"label\", \"description\", \"prefix\", \"suffix\", \"size\", \"shadow\", ...omitted]);\n}\n\nexport function FormControl<Value = unknown>({\n children,\n name = \"\",\n id = name,\n required,\n before,\n after,\n description,\n label,\n size,\n className\n}: PropsWithChildren<FormControlProps<Value>>) {\n return (\n <div\n data-testid={name && `form-group-${name}`}\n id={`form-group-${name || \"\"}`}\n className={classnames(\n \"form-group\",\n {\n \"-with-before\": !!before,\n \"-with-after\": !!after\n },\n size && `-size-${size}`,\n className\n )}\n >\n {label && (\n <label htmlFor={id} data-testid='form-control-label' className={`col-form-label ${required ? \" field-required\" : \"\"}`}>\n {label}\n </label>\n )}\n <div className={\"input-group\"}>\n {before && (\n <div className='input-group-prepend'>\n <span className='input-group-text' data-testid='form-control-prefix'>\n {before}\n </span>\n </div>\n )}\n {children}\n {after && (\n <div className='input-group-append'>\n <span className='input-group-text' data-testid='form-control-suffix'>\n {after}\n </span>\n </div>\n )}\n </div>\n {description && (\n <div data-testid='form-control-description' className='form-text text-muted'>\n {description}\n </div>\n )}\n </div>\n );\n}\n\nregisterComponent(\"FormControl\", FormControl);\n"],"names":["cleanFormControlProps","props","omitted","omit","FormControl","children","name","id","required","before","after","description","label","size","className","jsxs","classnames","jsx","registerComponent"],"mappings":";;;;AAwBO,SAASA,EAAsBC,GAAyBC,IAAoB,IAAS;AAC1F,SAAOC,EAAKF,GAAO,CAAC,SAAS,eAAe,UAAU,UAAU,QAAQ,UAAU,GAAGC,CAAO,CAAC;AAC/F;AAEO,SAASE,EAA6B;AAAA,EAC3C,UAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,IAAAC,IAAKD;AAAA,EACL,UAAAE;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AACF,GAA+C;AAC7C,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAaT,KAAQ,cAAcA,CAAI;AAAA,MACvC,IAAI,cAAcA,KAAQ,EAAE;AAAA,MAC5B,WAAWU;AAAAA,QACT;AAAA,QACA;AAAA,UACE,gBAAgB,CAAC,CAACP;AAAA,UAClB,eAAe,CAAC,CAACC;AAAA,QAAA;AAAA,QAEnBG,KAAQ,SAASA,CAAI;AAAA,QACrBC;AAAA,MAAA;AAAA,MAGD,UAAA;AAAA,QAAAF,KACC,gBAAAK,EAAC,SAAA,EAAM,SAASV,GAAI,eAAY,sBAAqB,WAAW,kBAAkBC,IAAW,oBAAoB,EAAE,IAChH,UAAAI,GACH;AAAA,QAEF,gBAAAG,EAAC,OAAA,EAAI,WAAW,eACb,UAAA;AAAA,UAAAN,KACC,gBAAAQ,EAAC,OAAA,EAAI,WAAU,uBACb,UAAA,gBAAAA,EAAC,QAAA,EAAK,WAAU,oBAAmB,eAAY,uBAC5C,UAAAR,EAAA,CACH,GACF;AAAA,UAEDJ;AAAA,UACAK,KACC,gBAAAO,EAAC,OAAA,EAAI,WAAU,sBACb,UAAA,gBAAAA,EAAC,QAAA,EAAK,WAAU,oBAAmB,eAAY,uBAC5C,UAAAP,EAAA,CACH,EAAA,CACF;AAAA,QAAA,GAEJ;AAAA,QACCC,KACC,gBAAAM,EAAC,OAAA,EAAI,eAAY,4BAA2B,WAAU,wBACnD,UAAAN,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;AAEAO,EAAkB,eAAed,CAAW;"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { registerComponent as d, getComponent as
|
|
3
|
-
function I(
|
|
4
|
-
const { name: o, id: t = o, label:
|
|
5
|
-
return
|
|
6
|
-
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { registerComponent as d, getComponent as r } from "../../../registries/components.js";
|
|
3
|
+
function I(s) {
|
|
4
|
+
const { name: o, id: t = o, label: p, required: e, description: i, before: m, after: a, size: c, className: u, layout: l = "choicesjs", ...f } = s, g = r("FormControl"), C = r([`InputTags.${l}`, "Input"]);
|
|
5
|
+
return /* @__PURE__ */ n(
|
|
6
|
+
g,
|
|
7
7
|
{
|
|
8
8
|
id: t,
|
|
9
9
|
name: o,
|
|
10
|
-
label:
|
|
11
|
-
required:
|
|
12
|
-
description:
|
|
13
|
-
before:
|
|
14
|
-
after:
|
|
15
|
-
size:
|
|
16
|
-
className:
|
|
17
|
-
children: /* @__PURE__ */
|
|
10
|
+
label: p,
|
|
11
|
+
required: e,
|
|
12
|
+
description: i,
|
|
13
|
+
before: m,
|
|
14
|
+
after: a,
|
|
15
|
+
size: c,
|
|
16
|
+
className: u,
|
|
17
|
+
children: /* @__PURE__ */ n(C, { ...f, id: t, name: o, required: e })
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTags.js","sources":["../../../../src/molecules/forms/input-tags/InputTags.tsx"],"sourcesContent":["import { ComponentType } from \"react\";\n\nimport { getComponent, registerComponent } from \"../../../registries/components\";\nimport { type FormControl as DefaultFormControl } from \"../form-control/FormControl\";\nimport type { InputTagsProps } from \"./InputTags.interface\";\n\nexport function InputTags<Data = string>(props: InputTagsProps) {\n const { name, id = name, label, required, description, before, after, size, className, layout = \"choicesjs\", ...otherProps } = props;\n\n const FormControl = getComponent<typeof DefaultFormControl>(\"FormControl\");\n const Component = getComponent<ComponentType<InputTagsProps<Data>>>([`InputTags.${layout}`, \"Input\"]);\n
|
|
1
|
+
{"version":3,"file":"InputTags.js","sources":["../../../../src/molecules/forms/input-tags/InputTags.tsx"],"sourcesContent":["import { ComponentType } from \"react\";\n\nimport { getComponent, registerComponent } from \"../../../registries/components\";\nimport { type FormControl as DefaultFormControl } from \"../form-control/FormControl\";\nimport type { InputTagsProps } from \"./InputTags.interface\";\n\nexport function InputTags<Data = string>(props: InputTagsProps) {\n const { name, id = name, label, required, description, before, after, size, className, layout = \"choicesjs\", ...otherProps } = props;\n\n const FormControl = getComponent<typeof DefaultFormControl>(\"FormControl\");\n const Component = getComponent<ComponentType<InputTagsProps<Data>>>([`InputTags.${layout}`, \"Input\"]);\n\n return (\n <FormControl\n id={id}\n name={name}\n label={label}\n required={required}\n description={description}\n before={before}\n after={after}\n size={size}\n className={className}\n >\n <Component {...(otherProps as any)} id={id} name={name} required={required} />\n </FormControl>\n );\n}\n\nregisterComponent(\"InputTags\", InputTags);\n"],"names":["InputTags","props","name","id","label","required","description","before","after","size","className","layout","otherProps","FormControl","getComponent","Component","jsx","registerComponent"],"mappings":";;AAMO,SAASA,EAAyBC,GAAuB;AAC9D,QAAM,EAAE,MAAAC,GAAM,IAAAC,IAAKD,GAAM,OAAAE,GAAO,UAAAC,GAAU,aAAAC,GAAa,QAAAC,GAAQ,OAAAC,GAAO,MAAAC,GAAM,WAAAC,GAAW,QAAAC,IAAS,aAAa,GAAGC,MAAeX,GAEzHY,IAAcC,EAAwC,aAAa,GACnEC,IAAYD,EAAkD,CAAC,aAAaH,CAAM,IAAI,OAAO,CAAC;AAEpG,SACE,gBAAAK;AAAA,IAACH;AAAA,IAAA;AAAA,MACC,IAAAV;AAAA,MACA,MAAAD;AAAA,MACA,OAAAE;AAAA,MACA,UAAAC;AAAA,MACA,aAAAC;AAAA,MACA,QAAAC;AAAA,MACA,OAAAC;AAAA,MACA,MAAAC;AAAA,MACA,WAAAC;AAAA,MAEA,4BAACK,GAAA,EAAW,GAAIH,GAAoB,IAAAT,GAAQ,MAAAD,GAAY,UAAAG,EAAA,CAAoB;AAAA,IAAA;AAAA,EAAA;AAGlF;AAEAY,EAAkB,aAAajB,CAAS;"}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { useRef as u, useEffect as
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import C from "@formio/choices.js";
|
|
3
|
+
import { useRef as u, useEffect as I } from "react";
|
|
4
4
|
import { c as l } from "../../../../chunks/index.module.js";
|
|
5
|
-
import { registerComponent as
|
|
6
|
-
import { cleanFormControlProps as
|
|
7
|
-
function
|
|
8
|
-
const { value:
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
}, 100), d = l((
|
|
12
|
-
const
|
|
13
|
-
|
|
5
|
+
import { registerComponent as g } from "../../../../registries/components.js";
|
|
6
|
+
import { cleanFormControlProps as E } from "../../form-control/FormControl.js";
|
|
7
|
+
function P(s) {
|
|
8
|
+
const { value: r, onChange: o, name: c = "", delimiter: m, customProperties: a, ...p } = s, i = u(null), n = u(null), f = l((e) => {
|
|
9
|
+
const t = (r || []).concat(e);
|
|
10
|
+
o?.(c, [...t]);
|
|
11
|
+
}, 100), d = l((e) => {
|
|
12
|
+
const t = (r || []).filter((v) => v !== e);
|
|
13
|
+
o?.(c, [...t]);
|
|
14
14
|
});
|
|
15
|
-
return
|
|
15
|
+
return I(() => {
|
|
16
16
|
if (i.current) {
|
|
17
|
-
const
|
|
17
|
+
const e = new C(i.current, {
|
|
18
18
|
duplicateItemsAllowed: !1,
|
|
19
19
|
...a,
|
|
20
20
|
delimiter: m,
|
|
21
21
|
editItems: !0,
|
|
22
22
|
removeItemButton: !0
|
|
23
23
|
});
|
|
24
|
-
|
|
25
|
-
f(
|
|
26
|
-
}),
|
|
27
|
-
d(
|
|
24
|
+
e.setValue(r || []), n.current = e, e.passedElement.element.addEventListener("addItem", (t) => {
|
|
25
|
+
f(t.detail.value);
|
|
26
|
+
}), e.passedElement.element.addEventListener("removeItem", (t) => {
|
|
27
|
+
d(t.detail.value);
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
return () => {
|
|
31
|
-
|
|
31
|
+
n.current && n.current.destroy();
|
|
32
32
|
};
|
|
33
33
|
}, [m]), {
|
|
34
34
|
otherProps: {
|
|
@@ -36,16 +36,16 @@ function T(n) {
|
|
|
36
36
|
name: c
|
|
37
37
|
},
|
|
38
38
|
ref: i,
|
|
39
|
-
instanceRef:
|
|
39
|
+
instanceRef: n
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const { ref:
|
|
44
|
-
return /* @__PURE__ */
|
|
42
|
+
function x(s) {
|
|
43
|
+
const { ref: r, otherProps: o } = P(s);
|
|
44
|
+
return /* @__PURE__ */ h("input", { type: "text", ...E(o), ref: r });
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
g("InputTags.choicesjs", x);
|
|
47
47
|
export {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
x as ChoicesTags,
|
|
49
|
+
P as useChoiceTags
|
|
50
50
|
};
|
|
51
51
|
//# sourceMappingURL=ChoicesTags.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoicesTags.js","sources":["../../../../../src/molecules/forms/input-tags/components/ChoicesTags.tsx"],"sourcesContent":["import Choices from \"@formio/choices.js\";\nimport { useEffect, useRef } from \"react\";\nimport { useDebouncedCallback } from \"use-debounce\";\n\nimport { registerComponent } from \"../../../../registries/components\";\nimport { cleanFormControlProps } from \"../../form-control/FormControl\";\nimport type { InputTagsProps } from \"../InputTags.interface\";\n\nexport function useChoiceTags<Data = string>(props: InputTagsProps<Data>) {\n const { value, onChange, name = \"\", delimiter, customProperties, ...otherProps } = props;\n const ref = useRef<HTMLInputElement | null>(null);\n const instanceRef = useRef<Choices | null>(null);\n\n const onAdd = useDebouncedCallback((add: Data) => {\n const values = ((value || []) as Data[]).concat(add);\n\n onChange?.(name, [...values]);\n }, 100);\n\n const onDelete = useDebouncedCallback((remove: Data) => {\n const values = (value || []).filter((v) => v !== remove);\n\n onChange?.(name, [...values]);\n });\n\n useEffect(() => {\n if (ref.current) {\n const instance = new Choices(ref.current!, {\n duplicateItemsAllowed: false,\n ...customProperties,\n delimiter,\n editItems: true,\n removeItemButton: true\n });\n\n instance.setValue((value || []) as string[]);\n\n instanceRef.current = instance;\n\n instance.passedElement.element.addEventListener(\"addItem\", (event: { detail: { value: unknown } }) => {\n onAdd(event.detail.value as Data);\n });\n\n instance.passedElement.element.addEventListener(\"removeItem\", (event: { detail: { value: unknown } }) => {\n onDelete(event.detail.value as Data);\n });\n }\n\n return () => {\n if (instanceRef.current) {\n instanceRef.current.destroy();\n }\n };\n }, [delimiter]);\n\n return {\n otherProps: {\n ...otherProps,\n name\n },\n ref,\n instanceRef\n };\n}\n\nexport function ChoicesTags<Data = string>(props: InputTagsProps<Data>) {\n const { ref, otherProps } = useChoiceTags<Data>(props);\n\n return <input type='text' {...cleanFormControlProps(otherProps)} ref={ref} />;\n}\n\nregisterComponent(\"InputTags.choicesjs\", ChoicesTags);\n"],"names":["useChoiceTags","props","value","onChange","name","delimiter","customProperties","otherProps","ref","useRef","instanceRef","onAdd","useDebouncedCallback","add","values","onDelete","remove","useEffect","instance","Choices","event","ChoicesTags","jsx","cleanFormControlProps","registerComponent"],"mappings":";;;;;;AAQO,SAASA,EAA6BC,GAA6B;
|
|
1
|
+
{"version":3,"file":"ChoicesTags.js","sources":["../../../../../src/molecules/forms/input-tags/components/ChoicesTags.tsx"],"sourcesContent":["import Choices from \"@formio/choices.js\";\nimport { useEffect, useRef } from \"react\";\nimport { useDebouncedCallback } from \"use-debounce\";\n\nimport { registerComponent } from \"../../../../registries/components\";\nimport { cleanFormControlProps } from \"../../form-control/FormControl\";\nimport type { InputTagsProps } from \"../InputTags.interface\";\n\nexport function useChoiceTags<Data = string>(props: InputTagsProps<Data>) {\n const { value, onChange, name = \"\", delimiter, customProperties, ...otherProps } = props;\n const ref = useRef<HTMLInputElement | null>(null);\n const instanceRef = useRef<Choices | null>(null);\n\n const onAdd = useDebouncedCallback((add: Data) => {\n const values = ((value || []) as Data[]).concat(add);\n\n onChange?.(name, [...values]);\n }, 100);\n\n const onDelete = useDebouncedCallback((remove: Data) => {\n const values = (value || []).filter((v) => v !== remove);\n\n onChange?.(name, [...values]);\n });\n\n useEffect(() => {\n if (ref.current) {\n const instance = new Choices(ref.current!, {\n duplicateItemsAllowed: false,\n ...customProperties,\n delimiter,\n editItems: true,\n removeItemButton: true\n });\n\n instance.setValue((value || []) as string[]);\n\n instanceRef.current = instance;\n\n instance.passedElement.element.addEventListener(\"addItem\", (event: { detail: { value: unknown } }) => {\n onAdd(event.detail.value as Data);\n });\n\n instance.passedElement.element.addEventListener(\"removeItem\", (event: { detail: { value: unknown } }) => {\n onDelete(event.detail.value as Data);\n });\n }\n\n return () => {\n if (instanceRef.current) {\n instanceRef.current.destroy();\n }\n };\n }, [delimiter]);\n\n return {\n otherProps: {\n ...otherProps,\n name\n },\n ref,\n instanceRef\n };\n}\n\nexport function ChoicesTags<Data = string>(props: InputTagsProps<Data>) {\n const { ref, otherProps } = useChoiceTags<Data>(props);\n\n return <input type='text' {...cleanFormControlProps(otherProps)} ref={ref} />;\n}\n\nregisterComponent(\"InputTags.choicesjs\", ChoicesTags);\n"],"names":["useChoiceTags","props","value","onChange","name","delimiter","customProperties","otherProps","ref","useRef","instanceRef","onAdd","useDebouncedCallback","add","values","onDelete","remove","useEffect","instance","Choices","event","ChoicesTags","jsx","cleanFormControlProps","registerComponent"],"mappings":";;;;;;AAQO,SAASA,EAA6BC,GAA6B;AACxE,QAAM,EAAE,OAAAC,GAAO,UAAAC,GAAU,MAAAC,IAAO,IAAI,WAAAC,GAAW,kBAAAC,GAAkB,GAAGC,EAAA,IAAeN,GAC7EO,IAAMC,EAAgC,IAAI,GAC1CC,IAAcD,EAAuB,IAAI,GAEzCE,IAAQC,EAAqB,CAACC,MAAc;AAChD,UAAMC,KAAWZ,KAAS,CAAA,GAAe,OAAOW,CAAG;AAEnD,IAAAV,IAAWC,GAAM,CAAC,GAAGU,CAAM,CAAC;AAAA,EAC9B,GAAG,GAAG,GAEAC,IAAWH,EAAqB,CAACI,MAAiB;AACtD,UAAMF,KAAUZ,KAAS,CAAA,GAAI,OAAO,CAAC,MAAM,MAAMc,CAAM;AAEvD,IAAAb,IAAWC,GAAM,CAAC,GAAGU,CAAM,CAAC;AAAA,EAC9B,CAAC;AAED,SAAAG,EAAU,MAAM;AACd,QAAIT,EAAI,SAAS;AACf,YAAMU,IAAW,IAAIC,EAAQX,EAAI,SAAU;AAAA,QACzC,uBAAuB;AAAA,QACvB,GAAGF;AAAA,QACH,WAAAD;AAAA,QACA,WAAW;AAAA,QACX,kBAAkB;AAAA,MAAA,CACnB;AAED,MAAAa,EAAS,SAAUhB,KAAS,EAAe,GAE3CQ,EAAY,UAAUQ,GAEtBA,EAAS,cAAc,QAAQ,iBAAiB,WAAW,CAACE,MAA0C;AACpG,QAAAT,EAAMS,EAAM,OAAO,KAAa;AAAA,MAClC,CAAC,GAEDF,EAAS,cAAc,QAAQ,iBAAiB,cAAc,CAACE,MAA0C;AACvG,QAAAL,EAASK,EAAM,OAAO,KAAa;AAAA,MACrC,CAAC;AAAA,IACH;AAEA,WAAO,MAAM;AACX,MAAIV,EAAY,WACdA,EAAY,QAAQ,QAAA;AAAA,IAExB;AAAA,EACF,GAAG,CAACL,CAAS,CAAC,GAEP;AAAA,IACL,YAAY;AAAA,MACV,GAAGE;AAAA,MACH,MAAAH;AAAA,IAAA;AAAA,IAEF,KAAAI;AAAA,IACA,aAAAE;AAAA,EAAA;AAEJ;AAEO,SAASW,EAA2BpB,GAA6B;AACtE,QAAM,EAAE,KAAAO,GAAK,YAAAD,MAAeP,EAAoBC,CAAK;AAErD,SAAO,gBAAAqB,EAAC,WAAM,MAAK,QAAQ,GAAGC,EAAsBhB,CAAU,GAAG,KAAAC,GAAU;AAC7E;AAEAgB,EAAkB,uBAAuBH,CAAW;"}
|