@envisiongroup/porygon 0.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +11 -0
- package/README.md +69 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +60 -0
- package/dist/react-components/buttons/EFWButton/EFWButton.d.ts +59 -0
- package/dist/react-components/buttons/EFWButton/EFWButton.hooks.d.ts +45 -0
- package/dist/react-components/buttons/EFWButton/EFWButton.hooks.js +75 -0
- package/dist/react-components/buttons/EFWButton/EFWButton.js +164 -0
- package/dist/react-components/buttons/EFWButton/EFWButton.types.d.ts +282 -0
- package/dist/react-components/buttons/EFWButton/index.d.ts +3 -0
- package/dist/react-components/buttons/EFWButton/index.js +6 -0
- package/dist/react-components/buttons/EFWDrawerButton/EFWDrawerButton.d.ts +36 -0
- package/dist/react-components/buttons/EFWDrawerButton/EFWDrawerButton.js +32 -0
- package/dist/react-components/buttons/EFWDrawerButton/EFWDrawerButton.types.d.ts +87 -0
- package/dist/react-components/buttons/EFWDrawerButton/index.d.ts +12 -0
- package/dist/react-components/buttons/EFWDrawerButton/index.js +4 -0
- package/dist/react-components/buttons/EFWGroupButton/EFWGroupButton.d.ts +65 -0
- package/dist/react-components/buttons/EFWGroupButton/EFWGroupButton.js +129 -0
- package/dist/react-components/buttons/EFWGroupButton/EFWGroupButton.types.d.ts +232 -0
- package/dist/react-components/buttons/EFWGroupButton/index.d.ts +2 -0
- package/dist/react-components/buttons/EFWGroupButton/index.js +4 -0
- package/dist/react-components/commons/utils.d.ts +55 -0
- package/dist/react-components/commons/utils.js +18 -0
- package/dist/react-components/fields/EFWAttachments/EFWAttachments.d.ts +18 -0
- package/dist/react-components/fields/EFWAttachments/EFWAttachments.js +124 -0
- package/dist/react-components/fields/EFWAttachments/EFWAttachments.types.d.ts +78 -0
- package/dist/react-components/fields/EFWAttachments/EFWAttachmentsCard/EFWAttachmentsCard.d.ts +23 -0
- package/dist/react-components/fields/EFWAttachments/EFWAttachmentsCard/EFWAttachmentsCard.js +107 -0
- package/dist/react-components/fields/EFWAttachments/EFWAttachmentsCard/EFWAttachmentsCard.types.d.ts +73 -0
- package/dist/react-components/fields/EFWAttachments/EFWAttachmentsCard/index.d.ts +1 -0
- package/dist/react-components/fields/EFWAttachments/EFWAttachmentsCard/index.js +0 -0
- package/dist/react-components/fields/EFWAttachments/index.d.ts +2 -0
- package/dist/react-components/fields/EFWAttachments/index.js +4 -0
- package/dist/react-components/fields/EFWAttachmentsField/EFWAttachmentsField.d.ts +21 -0
- package/dist/react-components/fields/EFWAttachmentsField/EFWAttachmentsField.js +55 -0
- package/dist/react-components/fields/EFWAttachmentsField/EFWAttachmentsField.types.d.ts +7 -0
- package/dist/react-components/fields/EFWAttachmentsField/index.d.ts +2 -0
- package/dist/react-components/fields/EFWAttachmentsField/index.js +4 -0
- package/dist/react-components/fields/EFWDatePicker/EFWDatePicker.d.ts +34 -0
- package/dist/react-components/fields/EFWDatePicker/EFWDatePicker.js +135 -0
- package/dist/react-components/fields/EFWDatePicker/EFWDatePicker.types.d.ts +81 -0
- package/dist/react-components/fields/EFWDatePicker/EFWDatePicker.utils.d.ts +22 -0
- package/dist/react-components/fields/EFWDatePicker/EFWDatePicker.utils.js +76 -0
- package/dist/react-components/fields/EFWDatePicker/index.d.ts +2 -0
- package/dist/react-components/fields/EFWDatePicker/index.js +4 -0
- package/dist/react-components/fields/EFWDatePickerField/EFWDatePickerField.d.ts +3 -0
- package/dist/react-components/fields/EFWDatePickerField/EFWDatePickerField.js +63 -0
- package/dist/react-components/fields/EFWDatePickerField/EFWDatePickerField.types.d.ts +7 -0
- package/dist/react-components/fields/EFWDatePickerField/index.d.ts +2 -0
- package/dist/react-components/fields/EFWDatePickerField/index.js +4 -0
- package/dist/react-components/fields/EFWField/EFWField.d.ts +53 -0
- package/dist/react-components/fields/EFWField/EFWField.js +90 -0
- package/dist/react-components/fields/EFWField/EFWField.types.d.ts +294 -0
- package/dist/react-components/fields/EFWField/EFWField.utils.d.ts +3 -0
- package/dist/react-components/fields/EFWField/EFWField.utils.js +17 -0
- package/dist/react-components/fields/EFWField/index.d.ts +2 -0
- package/dist/react-components/fields/EFWField/index.js +4 -0
- package/dist/react-components/fields/EFWInput/EFWInput.d.ts +26 -0
- package/dist/react-components/fields/EFWInput/EFWInput.js +100 -0
- package/dist/react-components/fields/EFWInput/EFWInput.types.d.ts +257 -0
- package/dist/react-components/fields/EFWInput/EFWInput.utils.d.ts +20 -0
- package/dist/react-components/fields/EFWInput/EFWInput.utils.js +84 -0
- package/dist/react-components/fields/EFWInput/index.d.ts +2 -0
- package/dist/react-components/fields/EFWInput/index.js +4 -0
- package/dist/react-components/fields/EFWInputField/EFWInputField.d.ts +3 -0
- package/dist/react-components/fields/EFWInputField/EFWInputField.js +71 -0
- package/dist/react-components/fields/EFWInputField/EFWInputField.types.d.ts +6 -0
- package/dist/react-components/fields/EFWInputField/EFWInputField.utils.d.ts +1 -0
- package/dist/react-components/fields/EFWInputField/EFWInputField.utils.js +0 -0
- package/dist/react-components/fields/EFWInputField/index.d.ts +2 -0
- package/dist/react-components/fields/EFWInputField/index.js +4 -0
- package/dist/react-components/fields/EFWNumberInput/EFWNumberInput.d.ts +8 -0
- package/dist/react-components/fields/EFWNumberInput/EFWNumberInput.js +183 -0
- package/dist/react-components/fields/EFWNumberInput/EFWNumberInput.types.d.ts +226 -0
- package/dist/react-components/fields/EFWNumberInput/EFWNumberInput.utils.d.ts +74 -0
- package/dist/react-components/fields/EFWNumberInput/EFWNumberInput.utils.js +76 -0
- package/dist/react-components/fields/EFWNumberInput/index.d.ts +2 -0
- package/dist/react-components/fields/EFWNumberInput/index.js +4 -0
- package/dist/react-components/fields/EFWNumberInputField/EFWNumberInputField.d.ts +3 -0
- package/dist/react-components/fields/EFWNumberInputField/EFWNumberInputField.js +65 -0
- package/dist/react-components/fields/EFWNumberInputField/EFWNumberInputField.types.d.ts +6 -0
- package/dist/react-components/fields/EFWNumberInputField/EFWNumberInputField.utils.d.ts +1 -0
- package/dist/react-components/fields/EFWNumberInputField/EFWNumberInputField.utils.js +0 -0
- package/dist/react-components/fields/EFWNumberInputField/index.d.ts +2 -0
- package/dist/react-components/fields/EFWNumberInputField/index.js +4 -0
- package/dist/react-components/fields/EFWSwitch/EFWSwitch.d.ts +3 -0
- package/dist/react-components/fields/EFWSwitch/EFWSwitch.js +54 -0
- package/dist/react-components/fields/EFWSwitch/EFWSwitch.types.d.ts +49 -0
- package/dist/react-components/fields/EFWSwitch/index.d.ts +2 -0
- package/dist/react-components/fields/EFWSwitch/index.js +4 -0
- package/dist/react-components/fields/EFWSwitchField/EFWSwitchField.d.ts +3 -0
- package/dist/react-components/fields/EFWSwitchField/EFWSwitchField.js +53 -0
- package/dist/react-components/fields/EFWSwitchField/EFWSwitchField.types.d.ts +7 -0
- package/dist/react-components/fields/EFWSwitchField/index.d.ts +2 -0
- package/dist/react-components/fields/EFWSwitchField/index.js +4 -0
- package/dist/react-components/fields/EFWTagPicker/EFWTagPicker.d.ts +8 -0
- package/dist/react-components/fields/EFWTagPicker/EFWTagPicker.js +230 -0
- package/dist/react-components/fields/EFWTagPicker/EFWTagPicker.types.d.ts +136 -0
- package/dist/react-components/fields/EFWTagPicker/index.d.ts +2 -0
- package/dist/react-components/fields/EFWTagPicker/index.js +4 -0
- package/dist/react-components/fields/EFWTagPickerField/EFWTagPickerField.d.ts +3 -0
- package/dist/react-components/fields/EFWTagPickerField/EFWTagPickerField.js +72 -0
- package/dist/react-components/fields/EFWTagPickerField/EFWTagPickerField.types.d.ts +8 -0
- package/dist/react-components/fields/EFWTagPickerField/EFWTagPickerField.utils.d.ts +1 -0
- package/dist/react-components/fields/EFWTagPickerField/EFWTagPickerField.utils.js +0 -0
- package/dist/react-components/fields/EFWTagPickerField/index.d.ts +2 -0
- package/dist/react-components/fields/EFWTagPickerField/index.js +4 -0
- package/dist/react-components/fields/EFWTextArea/EFWTextArea.d.ts +3 -0
- package/dist/react-components/fields/EFWTextArea/EFWTextArea.js +103 -0
- package/dist/react-components/fields/EFWTextArea/EFWTextArea.types.d.ts +79 -0
- package/dist/react-components/fields/EFWTextArea/EFWTextArea.utils.d.ts +1 -0
- package/dist/react-components/fields/EFWTextArea/EFWTextArea.utils.js +0 -0
- package/dist/react-components/fields/EFWTextArea/index.d.ts +2 -0
- package/dist/react-components/fields/EFWTextArea/index.js +4 -0
- package/dist/react-components/fields/EFWTextAreaField/EFWTextAreaField.d.ts +3 -0
- package/dist/react-components/fields/EFWTextAreaField/EFWTextAreaField.js +69 -0
- package/dist/react-components/fields/EFWTextAreaField/EFWTextAreaField.types.d.ts +6 -0
- package/dist/react-components/fields/EFWTextAreaField/EFWTextAreaField.utils.d.ts +1 -0
- package/dist/react-components/fields/EFWTextAreaField/EFWTextAreaField.utils.js +0 -0
- package/dist/react-components/fields/EFWTextAreaField/index.d.ts +2 -0
- package/dist/react-components/fields/EFWTextAreaField/index.js +4 -0
- package/dist/react-components/fields/types.d.ts +1 -0
- package/dist/react-components/fields/types.js +0 -0
- package/dist/react-components/forms/EFWForm/EFWForm.converter.d.ts +3 -0
- package/dist/react-components/forms/EFWForm/EFWForm.converter.js +30 -0
- package/dist/react-components/forms/EFWForm/EFWForm.d.ts +96 -0
- package/dist/react-components/forms/EFWForm/EFWForm.hooks.d.ts +55 -0
- package/dist/react-components/forms/EFWForm/EFWForm.hooks.js +41 -0
- package/dist/react-components/forms/EFWForm/EFWForm.js +363 -0
- package/dist/react-components/forms/EFWForm/EFWForm.types.d.ts +981 -0
- package/dist/react-components/forms/EFWForm/EFWForm.utils.d.ts +19 -0
- package/dist/react-components/forms/EFWForm/EFWForm.utils.js +252 -0
- package/dist/react-components/forms/EFWForm/index.d.ts +4 -0
- package/dist/react-components/forms/EFWForm/index.js +8 -0
- package/dist/react-components/forms/EFWFormMessageBarGroup/EFWFormMessageBarGroup.d.ts +3 -0
- package/dist/react-components/forms/EFWFormMessageBarGroup/EFWFormMessageBarGroup.js +86 -0
- package/dist/react-components/forms/EFWFormMessageBarGroup/EFWFormMessageBarGroup.types.d.ts +34 -0
- package/dist/react-components/forms/EFWFormMessageBarGroup/index.d.ts +2 -0
- package/dist/react-components/forms/EFWFormMessageBarGroup/index.js +4 -0
- package/dist/react-components/forms/EFWMessageBarManager/EFWMessageBarManager.d.ts +3 -0
- package/dist/react-components/forms/EFWMessageBarManager/EFWMessageBarManager.js +32 -0
- package/dist/react-components/forms/EFWMessageBarManager/EFWMessageBarManager.types.d.ts +7 -0
- package/dist/react-components/hooks/useDrawer/component/EFWDrawer/EFWDrawer.d.ts +3 -0
- package/dist/react-components/hooks/useDrawer/component/EFWDrawer/EFWDrawer.js +96 -0
- package/dist/react-components/hooks/useDrawer/component/EFWDrawer/EFWDrawer.types.d.ts +15 -0
- package/dist/react-components/hooks/useDrawer/component/EFWDrawer/index.d.ts +2 -0
- package/dist/react-components/hooks/useDrawer/component/EFWDrawer/index.js +4 -0
- package/dist/react-components/hooks/useDrawer/component/EFWDrawerLoader/EFWDrawerLoader.d.ts +5 -0
- package/dist/react-components/hooks/useDrawer/component/EFWDrawerLoader/EFWDrawerLoader.js +24 -0
- package/dist/react-components/hooks/useDrawer/component/EFWDrawerLoader/index.d.ts +1 -0
- package/dist/react-components/hooks/useDrawer/component/EFWDrawerLoader/index.js +4 -0
- package/dist/react-components/hooks/useDrawer/index.d.ts +2 -0
- package/dist/react-components/hooks/useDrawer/index.js +4 -0
- package/dist/react-components/hooks/useDrawer/useDrawer.d.ts +10 -0
- package/dist/react-components/hooks/useDrawer/useDrawer.js +158 -0
- package/dist/react-components/hooks/useDrawer/useDrawer.types.d.ts +72 -0
- package/dist/react-components/layout/MainNavBar/MainNavBar.js +81 -0
- package/dist/react-components/layout/MainNavBar/index.js +4 -0
- package/dist/react-components/layout/MainNavItems/MainNavItems.js +35 -0
- package/dist/react-components/layout/MainNavItems/MainNavItems.styles.js +0 -0
- package/dist/react-components/layout/MainNavItems/index.js +4 -0
- package/dist/react-components/layout/NavBarContext/NavBarContext.js +24 -0
- package/dist/react-components/tables/EFWTable/EFWTable.d.ts +8 -0
- package/dist/react-components/tables/EFWTable/EFWTable.js +585 -0
- package/dist/react-components/tables/EFWTable/EFWTable.types.d.ts +367 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableBody/EFWTableBody.d.ts +3 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableBody/EFWTableBody.js +75 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableBody/EFWTableBody.types.d.ts +18 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableBody/index.d.ts +2 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableBody/index.js +4 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableCell/EFWTableCell.d.ts +16 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableCell/EFWTableCell.js +38 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.d.ts +17 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.js +105 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.types.d.ts +94 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.utils.d.ts +14 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.utils.js +26 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/index.d.ts +2 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/index.js +4 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableEmpty/EFWTableEmpty.d.ts +3 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableEmpty/EFWTableEmpty.js +46 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableEmpty/EFWTableEmpty.types.d.ts +6 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableEmpty/index.d.ts +2 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableEmpty/index.js +4 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableHeader/EFWTableHeader.d.ts +3 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableHeader/EFWTableHeader.js +87 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableHeader/EFWTableHeader.types.d.ts +13 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableHeader/index.d.ts +2 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableHeader/index.js +4 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableRow/EFWTableRow.d.ts +22 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableRow/EFWTableRow.js +60 -0
- package/dist/react-components/tables/EFWTable/hooks/useDefaultAddButton/useDefaultAddButton.d.ts +3 -0
- package/dist/react-components/tables/EFWTable/hooks/useDefaultAddButton/useDefaultAddButton.js +95 -0
- package/dist/react-components/tables/EFWTable/hooks/useDefaultDeleteButton/useDefaultDeleteButton.d.ts +3 -0
- package/dist/react-components/tables/EFWTable/hooks/useDefaultDeleteButton/useDefaultDeleteButton.js +89 -0
- package/dist/react-components/tables/EFWTable/hooks/useDefaultUpdateButton/useDefaultUpdateButton.d.ts +3 -0
- package/dist/react-components/tables/EFWTable/hooks/useDefaultUpdateButton/useDefaultUpdateButton.js +98 -0
- package/dist/react-components/tables/EFWTable/hooks/useTableController/useTableController copy.d.ts +4 -0
- package/dist/react-components/tables/EFWTable/hooks/useTableController/useTableController copy.js +178 -0
- package/dist/react-components/tables/EFWTable/hooks/useTableController/useTableController.d.ts +4 -0
- package/dist/react-components/tables/EFWTable/hooks/useTableController/useTableController.js +178 -0
- package/dist/react-components/tables/EFWTable/hooks/useTableController/useTableController.types copy.d.ts +16 -0
- package/dist/react-components/tables/EFWTable/hooks/useTableController/useTableController.types copy.js +0 -0
- package/dist/react-components/tables/EFWTable/hooks/useTableController/useTableController.types.d.ts +16 -0
- package/dist/react-components/tables/EFWTable/hooks/useTableSelection/useTableSelection.d.ts +3 -0
- package/dist/react-components/tables/EFWTable/hooks/useTableSelection/useTableSelection.js +67 -0
- package/dist/react-components/tables/EFWTable/hooks/useTableSelection/useTableSelection.types.d.ts +37 -0
- package/dist/react-components/tables/EFWTable/index.d.ts +3 -0
- package/dist/react-components/tables/EFWTable/index.js +6 -0
- package/dist/react-components/tables/EFWTable/utils/CellRenderer/CellRenderer.d.ts +7 -0
- package/dist/react-components/tables/EFWTable/utils/CellRenderer/CellRenderer.js +38 -0
- package/dist/react-components/tables/EFWTable/utils/CellRenderer/CellRenderer.types.d.ts +14 -0
- package/dist/react-components/tables/EFWTable/utils/cache.d.ts +37 -0
- package/dist/react-components/tables/EFWTable/utils/cache.js +127 -0
- package/dist/react-components/tables/EFWTable/utils/comparison.d.ts +6 -0
- package/dist/react-components/tables/EFWTable/utils/comparison.js +56 -0
- package/dist/react-components/tables/EFWTable/utils/constants.d.ts +8 -0
- package/dist/react-components/tables/EFWTable/utils/constants.js +9 -0
- package/dist/react-components/tables/EFWTable/utils/context.d.ts +8 -0
- package/dist/react-components/tables/EFWTable/utils/context.js +8 -0
- package/dist/react-components/tables/EFWTable/utils/general.d.ts +4 -0
- package/dist/react-components/tables/EFWTable/utils/general.js +4 -0
- package/dist/react-components/tables/EFWTable/utils/hashing.d.ts +18 -0
- package/dist/react-components/tables/EFWTable/utils/hashing.js +43 -0
- package/dist/react-components/tables/EFWTable/utils/index.d.ts +11 -0
- package/dist/react-components/tables/EFWTable/utils/index.js +24 -0
- package/dist/react-components/tables/EFWTable/utils/renderers.d.ts +8 -0
- package/dist/react-components/tables/EFWTable/utils/renderers.js +25 -0
- package/dist/react-components/tables/EFWTable/utils/types.d.ts +31 -0
- package/dist/react-components/tables/EFWTable/utils/types.js +0 -0
- package/dist/utils/htmlConverter.d.ts +15 -0
- package/dist/utils/htmlConverter.js +12 -0
- package/package.json +114 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { createPortal as _ } from "react-dom";
|
|
4
|
+
import { EFWDrawerLoader as y } from "./component/EFWDrawerLoader/EFWDrawerLoader.js";
|
|
5
|
+
import { EFWDrawer as M } from "./component/EFWDrawer/EFWDrawer.js";
|
|
6
|
+
const v = (r, c) => {
|
|
7
|
+
switch (c.type) {
|
|
8
|
+
case "OPEN":
|
|
9
|
+
return {
|
|
10
|
+
...r,
|
|
11
|
+
isOpen: !0,
|
|
12
|
+
isMounted: !0,
|
|
13
|
+
isClosing: !1,
|
|
14
|
+
isContentReady: !1,
|
|
15
|
+
wasContentShown: !1,
|
|
16
|
+
...c.payload || {}
|
|
17
|
+
};
|
|
18
|
+
case "START_CLOSE":
|
|
19
|
+
return {
|
|
20
|
+
...r,
|
|
21
|
+
isOpen: !1,
|
|
22
|
+
isClosing: !0,
|
|
23
|
+
// Mantener el estado de qué se estaba mostrando
|
|
24
|
+
wasContentShown: r.isContentReady
|
|
25
|
+
};
|
|
26
|
+
case "FINISH_CLOSE":
|
|
27
|
+
return {
|
|
28
|
+
...r,
|
|
29
|
+
isClosing: !1,
|
|
30
|
+
isMounted: !1,
|
|
31
|
+
isContentReady: !1,
|
|
32
|
+
wasContentShown: !1
|
|
33
|
+
};
|
|
34
|
+
case "CONTENT_READY":
|
|
35
|
+
return {
|
|
36
|
+
...r,
|
|
37
|
+
isContentReady: !0,
|
|
38
|
+
wasContentShown: !0
|
|
39
|
+
};
|
|
40
|
+
case "UPDATE_CONTENT":
|
|
41
|
+
return {
|
|
42
|
+
...r,
|
|
43
|
+
...c.payload
|
|
44
|
+
};
|
|
45
|
+
default:
|
|
46
|
+
return r;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
function z({
|
|
50
|
+
title: r = "",
|
|
51
|
+
content: c,
|
|
52
|
+
buttons: w = [],
|
|
53
|
+
size: E = "small",
|
|
54
|
+
position: O = "end",
|
|
55
|
+
modalType: h = "modal",
|
|
56
|
+
drawerOnOpen: p,
|
|
57
|
+
drawerOnClose: C,
|
|
58
|
+
deferContentRendering: l = !1,
|
|
59
|
+
contentRenderDelay: i = 500
|
|
60
|
+
}) {
|
|
61
|
+
const n = t.useRef(null), o = t.useRef(), u = t.useRef(), [e, a] = t.useReducer(v, {
|
|
62
|
+
isOpen: !1,
|
|
63
|
+
isMounted: !1,
|
|
64
|
+
isClosing: !1,
|
|
65
|
+
isContentReady: !1,
|
|
66
|
+
wasContentShown: !1,
|
|
67
|
+
title: r,
|
|
68
|
+
content: c,
|
|
69
|
+
buttons: w,
|
|
70
|
+
size: E,
|
|
71
|
+
position: O,
|
|
72
|
+
modalType: h
|
|
73
|
+
});
|
|
74
|
+
t.useEffect(() => (n.current || (n.current = document.createElement("div"), n.current.className = "drawer-portal-container", document.body.appendChild(n.current)), () => {
|
|
75
|
+
n.current && document.body.contains(n.current) && (document.body.removeChild(n.current), n.current = null), o.current && clearTimeout(o.current), u.current && clearTimeout(u.current);
|
|
76
|
+
}), []), t.useEffect(() => (e.isOpen && !e.isContentReady && !e.isClosing && (o.current && clearTimeout(o.current), l && i > 0 ? o.current = setTimeout(() => {
|
|
77
|
+
a({ type: "CONTENT_READY" });
|
|
78
|
+
}, i) : a({ type: "CONTENT_READY" })), () => {
|
|
79
|
+
o.current && clearTimeout(o.current);
|
|
80
|
+
}), [e.isOpen, e.isContentReady, e.isClosing, l, i]);
|
|
81
|
+
const R = t.useCallback(
|
|
82
|
+
(f) => {
|
|
83
|
+
u.current && (clearTimeout(u.current), u.current = void 0), a({ type: "OPEN", payload: f }), p && Promise.resolve(p()).catch(console.error);
|
|
84
|
+
},
|
|
85
|
+
[p]
|
|
86
|
+
), s = t.useCallback(() => {
|
|
87
|
+
o.current && (clearTimeout(o.current), o.current = void 0), a({ type: "START_CLOSE" }), C && Promise.resolve(C()).catch(console.error);
|
|
88
|
+
}, [C]), S = t.useCallback((f) => {
|
|
89
|
+
a({ type: "UPDATE_CONTENT", payload: f });
|
|
90
|
+
}, []), m = t.useCallback(
|
|
91
|
+
(f, b) => {
|
|
92
|
+
!b.open && e.isOpen && (s(), u.current = setTimeout(() => {
|
|
93
|
+
a({ type: "FINISH_CLOSE" });
|
|
94
|
+
}, 600));
|
|
95
|
+
},
|
|
96
|
+
[s, e.isOpen]
|
|
97
|
+
), T = t.useMemo(() => {
|
|
98
|
+
if (!e.isMounted || !e.content)
|
|
99
|
+
return null;
|
|
100
|
+
if (e.isClosing)
|
|
101
|
+
return e.wasContentShown ? typeof e.content == "function" ? e.content(s) : e.content : l && !e.wasContentShown ? /* @__PURE__ */ d(y, { delay: i }) : null;
|
|
102
|
+
if (e.isOpen) {
|
|
103
|
+
if (l && !e.isContentReady)
|
|
104
|
+
return /* @__PURE__ */ d(y, { delay: i });
|
|
105
|
+
if (e.isContentReady)
|
|
106
|
+
return typeof e.content == "function" ? e.content(s) : e.content;
|
|
107
|
+
}
|
|
108
|
+
return null;
|
|
109
|
+
}, [
|
|
110
|
+
e.isMounted,
|
|
111
|
+
e.isOpen,
|
|
112
|
+
e.isClosing,
|
|
113
|
+
e.content,
|
|
114
|
+
e.isContentReady,
|
|
115
|
+
e.wasContentShown,
|
|
116
|
+
l,
|
|
117
|
+
i,
|
|
118
|
+
s
|
|
119
|
+
]), N = t.useMemo(() => !e.isMounted || !n.current ? null : _(
|
|
120
|
+
/* @__PURE__ */ d(
|
|
121
|
+
M,
|
|
122
|
+
{
|
|
123
|
+
isOpen: e.isOpen,
|
|
124
|
+
onClose: s,
|
|
125
|
+
onOpenChange: m,
|
|
126
|
+
title: e.title,
|
|
127
|
+
content: T,
|
|
128
|
+
buttons: e.buttons,
|
|
129
|
+
size: e.size,
|
|
130
|
+
position: e.position,
|
|
131
|
+
modalType: e.modalType
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
n.current
|
|
135
|
+
), [
|
|
136
|
+
e.isMounted,
|
|
137
|
+
e.isOpen,
|
|
138
|
+
e.title,
|
|
139
|
+
e.buttons,
|
|
140
|
+
e.size,
|
|
141
|
+
e.position,
|
|
142
|
+
e.modalType,
|
|
143
|
+
T,
|
|
144
|
+
s,
|
|
145
|
+
m
|
|
146
|
+
]);
|
|
147
|
+
return {
|
|
148
|
+
openDrawer: R,
|
|
149
|
+
closeDrawer: s,
|
|
150
|
+
updateDrawer: S,
|
|
151
|
+
isOpen: e.isOpen,
|
|
152
|
+
isContentReady: e.isContentReady,
|
|
153
|
+
DrawerElement: N
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
export {
|
|
157
|
+
z as useDrawer
|
|
158
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { EFWGroupButtonConfig } from '../../buttons/EFWGroupButton';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Interfaz que define las propiedades base para el componente Drawer.
|
|
5
|
+
* @interface DrawerBase
|
|
6
|
+
* @property {React.ReactNode} [title] - Título del drawer.
|
|
7
|
+
* @property {React.ReactNode | ((closeDrawer: DrawerCloseHandler) => React.ReactNode)} [content] - Contenido del drawer, puede ser un nodo React o una función que recibe el manejador de cierre.
|
|
8
|
+
* @property {EFWGroupButtonConfig<DrawerCloseHandler>[]} [buttons] - Configuración de los botones del footer.
|
|
9
|
+
* @property {'modal' | 'non-modal' | 'alert'} [modalType] - Tipo de modalidad del drawer.
|
|
10
|
+
* @property {'start' | 'end' | 'bottom'} position - Posición del drawer en la pantalla.
|
|
11
|
+
* @property {'small' | 'medium' | 'large' | 'full'} size - Tamaño del drawer.
|
|
12
|
+
*/
|
|
13
|
+
export interface DrawerBase {
|
|
14
|
+
title?: React.ReactNode;
|
|
15
|
+
content?: React.ReactNode | ((closeDrawer: DrawerCloseHandler) => React.ReactNode);
|
|
16
|
+
buttons?: EFWGroupButtonConfig<DrawerCloseHandler>[];
|
|
17
|
+
modalType?: 'modal' | 'non-modal' | 'alert';
|
|
18
|
+
position?: 'start' | 'end' | 'bottom';
|
|
19
|
+
size?: 'small' | 'medium' | 'large' | 'full';
|
|
20
|
+
deferContentRendering?: boolean;
|
|
21
|
+
contentRenderDelay?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Interfaz para las opciones de apertura del drawer.
|
|
25
|
+
* @interface DrawerOpenOptions
|
|
26
|
+
* @extends DrawerBase
|
|
27
|
+
*/
|
|
28
|
+
export interface DrawerOpenOptions extends DrawerBase {
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Interfaz para las opciones de configuración del hook useDrawer.
|
|
32
|
+
* @interface UseDrawerProps
|
|
33
|
+
* @extends DrawerBase
|
|
34
|
+
* @property {() => void | Promise<void>} [drawerOnOpen] - Callback ejecutado al abrir el drawer.
|
|
35
|
+
* @property {() => void | Promise<void>} [drawerOnClose] - Callback ejecutado al cerrar el drawer.
|
|
36
|
+
*/
|
|
37
|
+
export interface UseDrawerProps extends DrawerBase {
|
|
38
|
+
readonly drawerOnOpen?: () => void | Promise<void>;
|
|
39
|
+
readonly drawerOnClose?: () => void | Promise<void>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Tipo para la función que abre el drawer.
|
|
43
|
+
* @typedef {function} DrawerOpenHandler
|
|
44
|
+
* @param {DrawerOpenOptions} [options] - Opciones para abrir el drawer.
|
|
45
|
+
*/
|
|
46
|
+
export type DrawerOpenHandler = (options?: DrawerOpenOptions) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Tipo para la función que cierra el drawer.
|
|
49
|
+
* @typedef {function} DrawerCloseHandler
|
|
50
|
+
*/
|
|
51
|
+
export type DrawerCloseHandler = () => void;
|
|
52
|
+
/**
|
|
53
|
+
* Interfaz que define el estado interno del drawer.
|
|
54
|
+
* @interface DrawerState
|
|
55
|
+
* @property {boolean} isOpen - Indica si el drawer está abierto.
|
|
56
|
+
* @property {React.ReactNode} title - Título del drawer.
|
|
57
|
+
* @property {React.ReactNode | ((closeDrawer: DrawerCloseHandler) => React.ReactNode)} [content] - Contenido del drawer.
|
|
58
|
+
* @property {EFWGroupButtonConfig<DrawerCloseHandler>[]} buttons - Botones del footer.
|
|
59
|
+
* @property {'small' | 'medium' | 'large' | 'full'} size - Tamaño del drawer.
|
|
60
|
+
* @property {'start' | 'end' | 'bottom'} position - Posición del drawer.
|
|
61
|
+
* @property {'modal' | 'non-modal' | 'alert'} modalType - Tipo de modalidad.
|
|
62
|
+
*/
|
|
63
|
+
export interface DrawerState {
|
|
64
|
+
isOpen: boolean;
|
|
65
|
+
title: React.ReactNode;
|
|
66
|
+
content?: React.ReactNode | ((closeDrawer: DrawerCloseHandler) => React.ReactNode);
|
|
67
|
+
buttons: EFWGroupButtonConfig<DrawerCloseHandler>[];
|
|
68
|
+
size: 'small' | 'medium' | 'large' | 'full';
|
|
69
|
+
position: 'start' | 'end' | 'bottom';
|
|
70
|
+
modalType: 'modal' | 'non-modal' | 'alert';
|
|
71
|
+
isContentReady: boolean;
|
|
72
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles as x, tokens as u, NavDrawer as v, NavDrawerHeader as S, Link as w, Image as N, NavDrawerBody as C } from "@fluentui/react-components";
|
|
3
|
+
import { useState as a } from "react";
|
|
4
|
+
import { MainNavItems as I } from "../MainNavItems/MainNavItems.js";
|
|
5
|
+
const V = x({
|
|
6
|
+
root: {
|
|
7
|
+
overflow: "hidden",
|
|
8
|
+
display: "flex",
|
|
9
|
+
height: "100%"
|
|
10
|
+
},
|
|
11
|
+
content: {
|
|
12
|
+
flex: "1",
|
|
13
|
+
padding: "16px",
|
|
14
|
+
display: "grid",
|
|
15
|
+
justifyContent: "flex-start",
|
|
16
|
+
alignItems: "flex-start"
|
|
17
|
+
},
|
|
18
|
+
field: {
|
|
19
|
+
display: "flex",
|
|
20
|
+
marginTop: "4px",
|
|
21
|
+
marginLeft: "8px",
|
|
22
|
+
flexDirection: "column",
|
|
23
|
+
gridRowGap: u.spacingVerticalS
|
|
24
|
+
}
|
|
25
|
+
}), L = (i) => {
|
|
26
|
+
const {
|
|
27
|
+
type: l = "inline",
|
|
28
|
+
open: n = !0,
|
|
29
|
+
density: o = "medium",
|
|
30
|
+
navSections: r,
|
|
31
|
+
logoImageExpanded: s
|
|
32
|
+
} = i, d = V(), c = !1, [m, p] = a(""), [g, h] = a(""), y = (k, t) => {
|
|
33
|
+
p(t.categoryValue), h(t.value);
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ e(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
style: {
|
|
39
|
+
height: "100%"
|
|
40
|
+
},
|
|
41
|
+
children: /* @__PURE__ */ f(
|
|
42
|
+
v,
|
|
43
|
+
{
|
|
44
|
+
style: { ...d, width: "100%", height: "100%" },
|
|
45
|
+
onNavItemSelect: y,
|
|
46
|
+
tabbable: !0,
|
|
47
|
+
selectedValue: g,
|
|
48
|
+
selectedCategoryValue: m,
|
|
49
|
+
type: l,
|
|
50
|
+
open: n,
|
|
51
|
+
density: o,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ e(S, { children: /* @__PURE__ */ e(w, { onClick: () => {
|
|
54
|
+
}, children: /* @__PURE__ */ e(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
style: {
|
|
58
|
+
margin: "10px 0 15px",
|
|
59
|
+
width: 140,
|
|
60
|
+
height: void 0
|
|
61
|
+
},
|
|
62
|
+
children: /* @__PURE__ */ e(
|
|
63
|
+
N,
|
|
64
|
+
{
|
|
65
|
+
src: s,
|
|
66
|
+
alt: "Company logo",
|
|
67
|
+
fit: "contain"
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
) }) }),
|
|
72
|
+
/* @__PURE__ */ e(C, { children: I(r, c) })
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
export {
|
|
80
|
+
L as MainNavBar
|
|
81
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { NavSectionHeader as h, NavItem as s, NavCategory as y, NavCategoryItem as S, NavSubItemGroup as _, NavSubItem as j, NavDivider as k } from "@fluentui/react-components";
|
|
3
|
+
import i from "react";
|
|
4
|
+
const G = (p, t = !1) => p.map((e, c) => /* @__PURE__ */ u("div", { children: [
|
|
5
|
+
e.title && !t && /* @__PURE__ */ r(h, { children: e.title }),
|
|
6
|
+
e.items.map(({ type: a, label: m, icon: n, value: d, categoryValue: N, subItems: g, href: o, openInNewTab: C, onClick: f }, l) => {
|
|
7
|
+
if (a === "navItem") {
|
|
8
|
+
const v = () => {
|
|
9
|
+
f ? f() : o && C && window.open(o, "_blank", "noopener,noreferrer");
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ r(
|
|
12
|
+
s,
|
|
13
|
+
{
|
|
14
|
+
icon: n && i.createElement(n, {
|
|
15
|
+
// Esto es necesario debido a un aparente error en el 'icon'
|
|
16
|
+
// dentro NavItem. Evita que el ícono interfiera con el clic en la opción del menú
|
|
17
|
+
style: { pointerEvents: "none" }
|
|
18
|
+
}),
|
|
19
|
+
value: d || o || "",
|
|
20
|
+
onClick: v,
|
|
21
|
+
children: !t && m
|
|
22
|
+
},
|
|
23
|
+
l
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
return a === "navCategory" ? /* @__PURE__ */ u(y, { value: N || "", children: [
|
|
27
|
+
/* @__PURE__ */ r(S, { icon: n && i.createElement(n), children: !t && m }),
|
|
28
|
+
/* @__PURE__ */ r(_, { children: g?.map(({ value: v, label: E }, I) => /* @__PURE__ */ r(j, { value: v, children: !t && E }, I)) })
|
|
29
|
+
] }, l) : a === "navDivider" ? /* @__PURE__ */ r(k, {}, l) : null;
|
|
30
|
+
}),
|
|
31
|
+
e.footer && !t && (typeof e.footer == "string" ? /* @__PURE__ */ r("span", { children: e.footer }) : i.createElement(e.footer))
|
|
32
|
+
] }, c));
|
|
33
|
+
export {
|
|
34
|
+
G as MainNavItems
|
|
35
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as l, useState as c, useEffect as u, useContext as N } from "react";
|
|
3
|
+
const o = l(void 0), a = "isNavBarCollapsed", B = ({ children: e }) => {
|
|
4
|
+
const [r, s] = c(() => {
|
|
5
|
+
const t = localStorage.getItem(a);
|
|
6
|
+
return t !== null ? JSON.parse(t) : !0;
|
|
7
|
+
});
|
|
8
|
+
u(() => {
|
|
9
|
+
localStorage.setItem(a, JSON.stringify(r));
|
|
10
|
+
}, [r]);
|
|
11
|
+
const n = () => {
|
|
12
|
+
s((t) => !t);
|
|
13
|
+
};
|
|
14
|
+
return /* @__PURE__ */ v(o.Provider, { value: { isNavBarCollapsed: r, toggleNavBar: n }, children: e });
|
|
15
|
+
}, p = () => {
|
|
16
|
+
const e = N(o);
|
|
17
|
+
if (!e)
|
|
18
|
+
throw new Error("useNavBar debe usarse dentro de un NavBarProvider");
|
|
19
|
+
return e;
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
B as NavBarProvider,
|
|
23
|
+
p as useNavBar
|
|
24
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EFWTableProps } from './EFWTable.types';
|
|
2
|
+
|
|
3
|
+
export declare const COLS_DEF_WIDTH = 120;
|
|
4
|
+
export declare const COLS_MIN_WIDTH = 80;
|
|
5
|
+
export declare const COLS_MAX_WIDTH = 500;
|
|
6
|
+
export declare const SELECTOR_CELL_WIDTH = 48;
|
|
7
|
+
export declare const SELECTOR_CELL_HEIGHT = 48;
|
|
8
|
+
export declare const EFWTable: ({ appearance, style, className, fields, items: initialItems, height, itemSize, enableSelection, enableCommandBar, defaultSelectedItems, onSelectionChange, onRowClick, resizableColumns, columnSizing: columnSizingOptions, useVirtualization, autoSizeColumns, tableRef: externalTableRef, onItemsChange, onScroll, addButtonConfig, updateButtonConfig, deleteButtonConfig, alwaysButtons, noSelectionButtons, singleSelectionButtons, multiSelectionButtons, beforeAddItems, beforeUpdateItems, beforeDeleteItems, columnRenderers, useDefaultRendererAsFallback, }: EFWTableProps) => import("react/jsx-runtime").JSX.Element;
|