@envisiongroup/porygon 1.0.0-rc.9 → 1.0.0
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/README.md +50 -14
- package/dist/index.d.ts +9 -15
- package/dist/index.js +95 -55
- package/dist/react-components/buttons/EFWButton/EFWButton.d.ts +1 -1
- package/dist/react-components/buttons/EFWButton/EFWButton.hooks.js +32 -31
- package/dist/react-components/buttons/EFWButton/EFWButton.js +158 -90
- package/dist/react-components/buttons/EFWButton/EFWButton.types.d.ts +32 -6
- package/dist/react-components/buttons/EFWButton/index.d.ts +1 -1
- package/dist/react-components/buttons/EFWDrawerButton/EFWDrawerButton.d.ts +1 -1
- package/dist/react-components/buttons/EFWDrawerButton/EFWDrawerButton.types.d.ts +1 -1
- package/dist/react-components/buttons/EFWGroupButton/EFWGroupButton.d.ts +1 -63
- package/dist/react-components/buttons/EFWGroupButton/EFWGroupButton.js +120 -85
- package/dist/react-components/buttons/EFWGroupButton/EFWGroupButton.types.d.ts +7 -1
- package/dist/react-components/buttons/EFWGroupButton/index.d.ts +1 -1
- package/dist/react-components/commons/caretPositioning.d.ts +35 -0
- package/dist/react-components/commons/caretPositioning.js +28 -0
- package/dist/react-components/commons/utils.d.ts +1 -1
- package/dist/react-components/commons/utils.js +1 -1
- package/dist/react-components/commons/valueNormalization.d.ts +28 -0
- package/dist/react-components/commons/valueNormalization.js +6 -0
- package/dist/react-components/fields/Attachments/EFWAttachments.js +205 -0
- package/dist/react-components/fields/{EFWAttachments → Attachments}/EFWAttachments.types.d.ts +32 -2
- package/dist/react-components/fields/Attachments/EFWAttachments.utils.d.ts +8 -0
- package/dist/react-components/fields/Attachments/EFWAttachments.utils.js +4 -0
- package/dist/react-components/fields/{EFWAttachments/EFWAttachmentsCard → Attachments}/EFWAttachmentsCard.d.ts +2 -11
- package/dist/react-components/fields/Attachments/EFWAttachmentsCard.js +164 -0
- package/dist/react-components/fields/{EFWAttachments/EFWAttachmentsCard → Attachments}/EFWAttachmentsCard.types.d.ts +21 -1
- package/dist/react-components/fields/Attachments/EFWAttachmentsField.js +70 -0
- package/dist/react-components/fields/{EFWAttachmentsField → Attachments}/EFWAttachmentsField.types.d.ts +2 -2
- package/dist/react-components/fields/Attachments/index.d.ts +5 -0
- package/dist/react-components/fields/Attachments/index.js +8 -0
- package/dist/react-components/fields/{EFWDatePicker → DatePicker}/EFWDatePicker.d.ts +1 -3
- package/dist/react-components/fields/DatePicker/EFWDatePicker.js +134 -0
- package/dist/react-components/fields/{EFWDatePicker → DatePicker}/EFWDatePicker.types.d.ts +19 -7
- package/dist/react-components/fields/DatePicker/EFWDatePicker.utils.d.ts +19 -0
- package/dist/react-components/fields/DatePicker/EFWDatePicker.utils.js +179 -0
- package/dist/react-components/fields/DatePicker/EFWDatePickerField.js +251 -0
- package/dist/react-components/fields/DatePicker/EFWDatePickerField.types.d.ts +15 -0
- package/dist/react-components/fields/DatePicker/index.d.ts +6 -0
- package/dist/react-components/fields/DatePicker/index.js +11 -0
- package/dist/react-components/fields/Input/EFWInput.d.ts +10 -0
- package/dist/react-components/fields/Input/EFWInput.js +260 -0
- package/dist/react-components/fields/{EFWInput → Input}/EFWInput.types.d.ts +120 -25
- package/dist/react-components/fields/Input/EFWInput.utils.d.ts +101 -0
- package/dist/react-components/fields/Input/EFWInput.utils.js +222 -0
- package/dist/react-components/fields/Input/EFWInput.validation.d.ts +20 -0
- package/dist/react-components/fields/Input/EFWInput.validation.js +72 -0
- package/dist/react-components/fields/Input/EFWInputField.js +86 -0
- package/dist/react-components/fields/{EFWInputField → Input}/EFWInputField.types.d.ts +2 -2
- package/dist/react-components/fields/Input/index.d.ts +5 -0
- package/dist/react-components/fields/Input/index.js +8 -0
- package/dist/react-components/fields/NumberInput/EFWNumberInput.js +339 -0
- package/dist/react-components/fields/{EFWNumberInput → NumberInput}/EFWNumberInput.types.d.ts +33 -14
- package/dist/react-components/fields/{EFWNumberInput → NumberInput}/EFWNumberInput.utils.d.ts +20 -14
- package/dist/react-components/fields/NumberInput/EFWNumberInput.utils.js +86 -0
- package/dist/react-components/fields/NumberInput/EFWNumberInputField.js +84 -0
- package/dist/react-components/fields/{EFWNumberInputField → NumberInput}/EFWNumberInputField.types.d.ts +2 -2
- package/dist/react-components/fields/NumberInput/index.d.ts +5 -0
- package/dist/react-components/fields/NumberInput/index.js +8 -0
- package/dist/react-components/fields/Switch/EFWSwitch.js +75 -0
- package/dist/react-components/fields/{EFWSwitch → Switch}/EFWSwitch.types.d.ts +18 -10
- package/dist/react-components/fields/Switch/EFWSwitch.utils.d.ts +9 -0
- package/dist/react-components/fields/Switch/EFWSwitch.utils.js +4 -0
- package/dist/react-components/fields/Switch/EFWSwitchField.js +62 -0
- package/dist/react-components/fields/{EFWSwitchField → Switch}/EFWSwitchField.types.d.ts +6 -2
- package/dist/react-components/fields/Switch/index.d.ts +5 -0
- package/dist/react-components/fields/Switch/index.js +8 -0
- package/dist/react-components/fields/TagPicker/EFWTagPicker.js +384 -0
- package/dist/react-components/fields/{EFWTagPicker → TagPicker}/EFWTagPicker.types.d.ts +30 -17
- package/dist/react-components/fields/TagPicker/EFWTagPicker.utils.d.ts +6 -0
- package/dist/react-components/fields/TagPicker/EFWTagPicker.utils.js +4 -0
- package/dist/react-components/fields/TagPicker/EFWTagPickerField.js +83 -0
- package/dist/react-components/fields/{EFWTagPickerField → TagPicker}/EFWTagPickerField.types.d.ts +2 -2
- package/dist/react-components/fields/TagPicker/index.d.ts +5 -0
- package/dist/react-components/fields/TagPicker/index.js +8 -0
- package/dist/react-components/fields/TextArea/EFWTextArea.js +153 -0
- package/dist/react-components/fields/{EFWTextArea → TextArea}/EFWTextArea.types.d.ts +26 -8
- package/dist/react-components/fields/TextArea/EFWTextArea.utils.d.ts +6 -0
- package/dist/react-components/fields/TextArea/EFWTextArea.utils.js +4 -0
- package/dist/react-components/fields/TextArea/EFWTextAreaField.js +80 -0
- package/dist/react-components/fields/{EFWTextAreaField → TextArea}/EFWTextAreaField.types.d.ts +2 -2
- package/dist/react-components/fields/TextArea/index.d.ts +5 -0
- package/dist/react-components/fields/TextArea/index.js +8 -0
- package/dist/react-components/fields/_shared/EFWField/EFWField.js +119 -0
- package/dist/react-components/fields/{EFWField → _shared/EFWField}/EFWField.types.d.ts +24 -13
- package/dist/react-components/fields/_shared/EFWField/EFWField.utils.js +20 -0
- package/dist/react-components/fields/_shared/EFWField/useSyncedValidationState.d.ts +50 -0
- package/dist/react-components/fields/_shared/EFWField/useSyncedValidationState.js +41 -0
- package/dist/react-components/fields/test-utils/testUtils.js +10 -0
- package/dist/react-components/forms/EFWForm/EFWForm.converter.d.ts +16 -1
- package/dist/react-components/forms/EFWForm/EFWForm.converter.js +51 -20
- package/dist/react-components/forms/EFWForm/EFWForm.flatConverter.d.ts +130 -0
- package/dist/react-components/forms/EFWForm/EFWForm.flatConverter.js +279 -0
- package/dist/react-components/forms/EFWForm/EFWForm.hooks.js +21 -18
- package/dist/react-components/forms/EFWForm/EFWForm.js +866 -403
- package/dist/react-components/forms/EFWForm/EFWForm.types.d.ts +213 -89
- package/dist/react-components/forms/EFWForm/EFWForm.utils.d.ts +10 -5
- package/dist/react-components/forms/EFWForm/EFWForm.utils.js +356 -229
- package/dist/react-components/forms/EFWForm/index.d.ts +5 -2
- package/dist/react-components/forms/EFWForm/index.js +10 -6
- package/dist/react-components/forms/EFWFormMessageBarGroup/EFWFormMessageBarGroup.js +55 -55
- package/dist/react-components/forms/EFWMessageBarManager/EFWMessageBarManager.js +38 -29
- package/dist/react-components/hooks/useDrawer/component/EFWDrawer/EFWDrawer.js +49 -47
- package/dist/react-components/hooks/useDrawer/component/EFWDrawer/EFWDrawer.types.d.ts +1 -0
- package/dist/react-components/hooks/useDrawer/component/EFWDrawerLoader/EFWDrawerLoader.d.ts +5 -3
- package/dist/react-components/hooks/useDrawer/component/EFWDrawerLoader/EFWDrawerLoader.js +6 -6
- package/dist/react-components/hooks/useDrawer/index.d.ts +1 -1
- package/dist/react-components/hooks/useDrawer/useDrawer.d.ts +4 -2
- package/dist/react-components/hooks/useDrawer/useDrawer.js +216 -111
- package/dist/react-components/hooks/useDrawer/useDrawer.types.d.ts +15 -2
- package/dist/react-components/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +42 -0
- package/dist/react-components/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +5 -0
- package/dist/react-components/i18n/PorygonI18nProvider.d.ts +13 -0
- package/dist/react-components/i18n/PorygonI18nProvider.js +145 -0
- package/dist/react-components/i18n/defaultLocaleText.d.ts +6 -0
- package/dist/react-components/i18n/defaultLocaleText.js +176 -0
- package/dist/react-components/i18n/index.d.ts +4 -0
- package/dist/react-components/i18n/index.js +19 -0
- package/dist/react-components/i18n/localePresets.d.ts +10 -0
- package/dist/react-components/i18n/localePresets.js +366 -0
- package/dist/react-components/i18n/porygonI18n.types.d.ts +169 -0
- package/dist/react-components/layout/MainNavItems/MainNavItems.js +13 -13
- package/dist/react-components/tables/EFWTable/EFWTable.d.ts +2 -5
- package/dist/react-components/tables/EFWTable/EFWTable.js +916 -525
- package/dist/react-components/tables/EFWTable/EFWTable.types.d.ts +256 -62
- package/dist/react-components/tables/EFWTable/components/EFWTableBody/EFWTableBody.d.ts +5 -1
- package/dist/react-components/tables/EFWTable/components/EFWTableBody/EFWTableBody.js +97 -52
- package/dist/react-components/tables/EFWTable/components/EFWTableBody/EFWTableBody.types.d.ts +4 -1
- package/dist/react-components/tables/EFWTable/components/EFWTableCell/EFWTableCell.d.ts +1 -12
- package/dist/react-components/tables/EFWTable/components/EFWTableCell/EFWTableCell.js +47 -22
- package/dist/react-components/tables/EFWTable/components/EFWTableCell/EFWTableCell.types.d.ts +13 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.d.ts +1 -1
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.js +94 -69
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.types.d.ts +7 -16
- package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/index.d.ts +1 -1
- package/dist/react-components/tables/EFWTable/components/EFWTableHeader/EFWTableHeader.d.ts +1 -1
- package/dist/react-components/tables/EFWTable/components/EFWTableHeader/EFWTableHeader.js +218 -83
- package/dist/react-components/tables/EFWTable/components/EFWTableHeader/EFWTableHeader.types.d.ts +3 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableOverlay/EFWTableOverlay.js +90 -88
- package/dist/react-components/tables/EFWTable/components/EFWTableOverlay/EFWTableOverlay.types.d.ts +5 -0
- package/dist/react-components/tables/EFWTable/components/EFWTableRow/EFWTableRow.d.ts +1 -18
- package/dist/react-components/tables/EFWTable/components/EFWTableRow/EFWTableRow.js +83 -45
- package/dist/react-components/tables/EFWTable/components/EFWTableRow/EFWTableRow.types.d.ts +23 -0
- package/dist/react-components/tables/EFWTable/hooks/useDefaultAddButton/useDefaultAddButton.d.ts +2 -1
- package/dist/react-components/tables/EFWTable/hooks/useDefaultAddButton/useDefaultAddButton.js +65 -48
- package/dist/react-components/tables/EFWTable/hooks/useDefaultDeleteButton/useDefaultDeleteButton.d.ts +2 -1
- package/dist/react-components/tables/EFWTable/hooks/useDefaultDeleteButton/useDefaultDeleteButton.js +71 -48
- package/dist/react-components/tables/EFWTable/hooks/useDefaultFilterButton/useDefaultFilterButton.d.ts +17 -0
- package/dist/react-components/tables/EFWTable/hooks/useDefaultFilterButton/useDefaultFilterButton.js +255 -0
- package/dist/react-components/tables/EFWTable/hooks/useDefaultUpdateButton/useDefaultUpdateButton.d.ts +2 -1
- package/dist/react-components/tables/EFWTable/hooks/useDefaultUpdateButton/useDefaultUpdateButton.js +72 -52
- package/dist/react-components/tables/EFWTable/hooks/useStableColumnRenderers/useStableColumnRenderers.d.ts +10 -0
- package/dist/react-components/tables/EFWTable/hooks/useStableColumnRenderers/useStableColumnRenderers.js +28 -0
- package/dist/react-components/tables/EFWTable/hooks/useTableController/useTableController.js +151 -115
- package/dist/react-components/tables/EFWTable/hooks/useTableSelection/useTableSelection.d.ts +1 -1
- package/dist/react-components/tables/EFWTable/hooks/useTableSelection/useTableSelection.js +100 -53
- package/dist/react-components/tables/EFWTable/hooks/useTableSelection/useTableSelection.types.d.ts +5 -1
- package/dist/react-components/tables/EFWTable/index.d.ts +4 -1
- package/dist/react-components/tables/EFWTable/index.js +7 -5
- package/dist/react-components/tables/EFWTable/utils/CellRenderer/CellRenderer.js +26 -23
- package/dist/react-components/tables/EFWTable/utils/cache.d.ts +1 -8
- package/dist/react-components/tables/EFWTable/utils/cache.js +40 -49
- package/dist/react-components/tables/EFWTable/utils/filterFunctions.d.ts +16 -0
- package/dist/react-components/tables/EFWTable/utils/filterFunctions.js +52 -0
- package/dist/react-components/tables/EFWTable/utils/hashing.d.ts +2 -2
- package/dist/react-components/tables/EFWTable/utils/hashing.js +2 -2
- package/package.json +49 -22
- package/dist/react-components/fields/EFWAttachments/EFWAttachments.js +0 -125
- package/dist/react-components/fields/EFWAttachments/EFWAttachmentsCard/EFWAttachmentsCard.js +0 -107
- package/dist/react-components/fields/EFWAttachments/EFWAttachmentsCard/index.d.ts +0 -1
- package/dist/react-components/fields/EFWAttachments/index.d.ts +0 -2
- package/dist/react-components/fields/EFWAttachments/index.js +0 -4
- package/dist/react-components/fields/EFWAttachmentsField/EFWAttachmentsField.js +0 -57
- package/dist/react-components/fields/EFWAttachmentsField/index.d.ts +0 -2
- package/dist/react-components/fields/EFWAttachmentsField/index.js +0 -4
- package/dist/react-components/fields/EFWDatePicker/EFWDatePicker.js +0 -114
- package/dist/react-components/fields/EFWDatePicker/EFWDatePicker.utils.d.ts +0 -24
- package/dist/react-components/fields/EFWDatePicker/EFWDatePicker.utils.js +0 -90
- package/dist/react-components/fields/EFWDatePicker/index.d.ts +0 -2
- package/dist/react-components/fields/EFWDatePicker/index.js +0 -4
- package/dist/react-components/fields/EFWDatePickerField/EFWDatePickerField.js +0 -65
- package/dist/react-components/fields/EFWDatePickerField/EFWDatePickerField.types.d.ts +0 -7
- package/dist/react-components/fields/EFWDatePickerField/index.d.ts +0 -2
- package/dist/react-components/fields/EFWDatePickerField/index.js +0 -4
- package/dist/react-components/fields/EFWField/EFWField.js +0 -96
- package/dist/react-components/fields/EFWField/EFWField.utils.js +0 -17
- package/dist/react-components/fields/EFWInput/EFWInput.d.ts +0 -26
- package/dist/react-components/fields/EFWInput/EFWInput.js +0 -119
- package/dist/react-components/fields/EFWInput/EFWInput.utils.d.ts +0 -20
- package/dist/react-components/fields/EFWInput/EFWInput.utils.js +0 -83
- package/dist/react-components/fields/EFWInput/index.d.ts +0 -2
- package/dist/react-components/fields/EFWInput/index.js +0 -4
- package/dist/react-components/fields/EFWInputField/EFWInputField.js +0 -73
- package/dist/react-components/fields/EFWInputField/EFWInputField.utils.d.ts +0 -1
- package/dist/react-components/fields/EFWInputField/EFWInputField.utils.js +0 -0
- package/dist/react-components/fields/EFWInputField/index.d.ts +0 -2
- package/dist/react-components/fields/EFWInputField/index.js +0 -4
- package/dist/react-components/fields/EFWNumberInput/EFWNumberInput.js +0 -198
- package/dist/react-components/fields/EFWNumberInput/EFWNumberInput.utils.js +0 -76
- package/dist/react-components/fields/EFWNumberInput/index.d.ts +0 -2
- package/dist/react-components/fields/EFWNumberInput/index.js +0 -4
- package/dist/react-components/fields/EFWNumberInputField/EFWNumberInputField.js +0 -67
- package/dist/react-components/fields/EFWNumberInputField/EFWNumberInputField.utils.d.ts +0 -1
- package/dist/react-components/fields/EFWNumberInputField/EFWNumberInputField.utils.js +0 -0
- package/dist/react-components/fields/EFWNumberInputField/index.d.ts +0 -2
- package/dist/react-components/fields/EFWNumberInputField/index.js +0 -4
- package/dist/react-components/fields/EFWSwitch/EFWSwitch.js +0 -55
- package/dist/react-components/fields/EFWSwitch/index.d.ts +0 -2
- package/dist/react-components/fields/EFWSwitch/index.js +0 -4
- package/dist/react-components/fields/EFWSwitchField/EFWSwitchField.js +0 -55
- package/dist/react-components/fields/EFWSwitchField/index.d.ts +0 -2
- package/dist/react-components/fields/EFWSwitchField/index.js +0 -4
- package/dist/react-components/fields/EFWTagPicker/EFWTagPicker.js +0 -244
- package/dist/react-components/fields/EFWTagPicker/index.d.ts +0 -2
- package/dist/react-components/fields/EFWTagPicker/index.js +0 -4
- package/dist/react-components/fields/EFWTagPickerField/EFWTagPickerField.js +0 -74
- package/dist/react-components/fields/EFWTagPickerField/EFWTagPickerField.utils.d.ts +0 -1
- package/dist/react-components/fields/EFWTagPickerField/EFWTagPickerField.utils.js +0 -0
- package/dist/react-components/fields/EFWTagPickerField/index.d.ts +0 -2
- package/dist/react-components/fields/EFWTagPickerField/index.js +0 -4
- package/dist/react-components/fields/EFWTextArea/EFWTextArea.js +0 -105
- package/dist/react-components/fields/EFWTextArea/EFWTextArea.utils.d.ts +0 -1
- package/dist/react-components/fields/EFWTextArea/EFWTextArea.utils.js +0 -0
- package/dist/react-components/fields/EFWTextArea/index.d.ts +0 -2
- package/dist/react-components/fields/EFWTextArea/index.js +0 -4
- package/dist/react-components/fields/EFWTextAreaField/EFWTextAreaField.js +0 -71
- package/dist/react-components/fields/EFWTextAreaField/EFWTextAreaField.utils.d.ts +0 -1
- package/dist/react-components/fields/EFWTextAreaField/EFWTextAreaField.utils.js +0 -0
- package/dist/react-components/fields/EFWTextAreaField/index.d.ts +0 -2
- package/dist/react-components/fields/EFWTextAreaField/index.js +0 -4
- package/dist/react-components/fields/types.d.ts +0 -1
- package/dist/react-components/fields/types.js +0 -0
- package/dist/utils/htmlConverter.d.ts +0 -15
- package/dist/utils/htmlConverter.js +0 -12
- /package/dist/react-components/fields/{EFWAttachments → Attachments}/EFWAttachments.d.ts +0 -0
- /package/dist/react-components/fields/{EFWAttachmentsField → Attachments}/EFWAttachmentsField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWDatePickerField → DatePicker}/EFWDatePickerField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWInputField → Input}/EFWInputField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWNumberInput → NumberInput}/EFWNumberInput.d.ts +0 -0
- /package/dist/react-components/fields/{EFWNumberInputField → NumberInput}/EFWNumberInputField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWSwitch → Switch}/EFWSwitch.d.ts +0 -0
- /package/dist/react-components/fields/{EFWSwitchField → Switch}/EFWSwitchField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWTagPicker → TagPicker}/EFWTagPicker.d.ts +0 -0
- /package/dist/react-components/fields/{EFWTagPickerField → TagPicker}/EFWTagPickerField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWTextArea → TextArea}/EFWTextArea.d.ts +0 -0
- /package/dist/react-components/fields/{EFWTextAreaField → TextArea}/EFWTextAreaField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWField → _shared/EFWField}/EFWField.d.ts +0 -0
- /package/dist/react-components/fields/{EFWField → _shared/EFWField}/EFWField.utils.d.ts +0 -0
- /package/dist/react-components/fields/{EFWField → _shared/EFWField}/index.d.ts +0 -0
- /package/dist/react-components/fields/{EFWField → _shared/EFWField}/index.js +0 -0
- /package/dist/{react-components/fields/EFWAttachments/EFWAttachmentsCard/index.js → vite-raw.d.js} +0 -0
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useFormController as
|
|
3
|
-
import { EFWForm as
|
|
1
|
+
import { getFormFieldDisplayText as e } from "./EFWForm.converter.js";
|
|
2
|
+
import { useFormController as F } from "./EFWForm.hooks.js";
|
|
3
|
+
import { EFWForm as m } from "./EFWForm.js";
|
|
4
|
+
import { EFWConversionError as f, EFWValuesToFlat as p, flatToEFWValues as s } from "./EFWForm.flatConverter.js";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
f as EFWConversionError,
|
|
7
|
+
m as EFWForm,
|
|
8
|
+
p as EFWValuesToFlat,
|
|
9
|
+
s as flatToEFWValues,
|
|
10
|
+
e as getFormFieldDisplayText,
|
|
11
|
+
F as useFormController
|
|
8
12
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { DismissRegular as
|
|
4
|
-
import { makeStyles as
|
|
5
|
-
const $ =
|
|
2
|
+
import { useState as c } from "react";
|
|
3
|
+
import { DismissRegular as D } from "@fluentui/react-icons";
|
|
4
|
+
import { makeStyles as E, MessageBarGroup as F, mergeClasses as S, MessageBar as k, MessageBarBody as A, MessageBarTitle as P, MessageBarActions as T, Button as m } from "@fluentui/react-components";
|
|
5
|
+
const $ = E({
|
|
6
6
|
efwMessageBarGroup: {
|
|
7
7
|
width: "100%",
|
|
8
8
|
display: "flex",
|
|
@@ -20,67 +20,67 @@ const $ = D({
|
|
|
20
20
|
justifyContent: "end",
|
|
21
21
|
gap: "5px"
|
|
22
22
|
}
|
|
23
|
-
}),
|
|
23
|
+
}), z = (g) => {
|
|
24
24
|
const {
|
|
25
25
|
style: d = {},
|
|
26
|
-
animate:
|
|
27
|
-
messages:
|
|
28
|
-
onDismiss:
|
|
29
|
-
} =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (n)
|
|
35
|
-
n(s);
|
|
26
|
+
animate: u = void 0,
|
|
27
|
+
messages: s = [],
|
|
28
|
+
onDismiss: o
|
|
29
|
+
} = g, f = $(), [i, l] = c(s), [M, x] = c(s);
|
|
30
|
+
s !== M && (x(s), l(s));
|
|
31
|
+
const y = (r) => {
|
|
32
|
+
if (o)
|
|
33
|
+
o(r);
|
|
36
34
|
else {
|
|
37
|
-
const
|
|
38
|
-
|
|
35
|
+
const t = i.filter(
|
|
36
|
+
(a) => a.id !== r
|
|
37
|
+
);
|
|
38
|
+
l(t);
|
|
39
39
|
}
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/* @__PURE__ */ p(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
40
|
+
}, B = () => i.map(
|
|
41
|
+
({
|
|
42
|
+
intent: r,
|
|
43
|
+
id: t,
|
|
44
|
+
title: a,
|
|
45
|
+
message: h = "",
|
|
46
|
+
layout: v = "multiline",
|
|
47
|
+
actions: G = [],
|
|
48
|
+
dismissable: w = !0
|
|
49
|
+
}) => /* @__PURE__ */ p(k, { layout: v, intent: r, children: [
|
|
50
|
+
/* @__PURE__ */ p(A, { children: [
|
|
51
|
+
a && /* @__PURE__ */ e(P, { children: a }),
|
|
52
|
+
h
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ e(
|
|
55
|
+
T,
|
|
56
|
+
{
|
|
57
|
+
containerAction: w ? /* @__PURE__ */ e(
|
|
58
|
+
m,
|
|
59
|
+
{
|
|
60
|
+
onClick: () => y(t),
|
|
61
|
+
"aria-label": "dismiss",
|
|
62
|
+
appearance: "transparent",
|
|
63
|
+
icon: /* @__PURE__ */ e(D, {})
|
|
64
|
+
}
|
|
65
|
+
) : void 0,
|
|
66
|
+
children: G.filter((n) => n.content).map((n) => {
|
|
67
|
+
const { id: C, content: b, ...j } = n;
|
|
68
|
+
return /* @__PURE__ */ e(m, { ...j, children: b }, C);
|
|
69
|
+
})
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
] }, `${r}-${t}`)
|
|
73
|
+
);
|
|
72
74
|
return /* @__PURE__ */ e(
|
|
73
75
|
F,
|
|
74
76
|
{
|
|
75
|
-
className: S(
|
|
76
|
-
u.efwMessageBarGroup
|
|
77
|
-
),
|
|
77
|
+
className: S(f.efwMessageBarGroup),
|
|
78
78
|
style: d,
|
|
79
|
-
animate:
|
|
80
|
-
children:
|
|
79
|
+
animate: u,
|
|
80
|
+
children: B()
|
|
81
81
|
}
|
|
82
82
|
);
|
|
83
83
|
};
|
|
84
84
|
export {
|
|
85
|
-
|
|
85
|
+
z as EFWFormMessageBarGroup
|
|
86
86
|
};
|
|
@@ -1,32 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as I } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as v, useState as d, useCallback as c, useImperativeHandle as b, useMemo as j } from "react";
|
|
3
3
|
import { EFWFormMessageBarGroup as W } from "../EFWFormMessageBarGroup/EFWFormMessageBarGroup.js";
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
style:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
4
|
+
const A = v(
|
|
5
|
+
(u, f) => {
|
|
6
|
+
const { style: x, initialExternalMessages: a = [] } = u, [M, i] = d([]), [g, t] = d(a), o = a.map((e) => String(e.id)).join("|"), [p, E] = d(o);
|
|
7
|
+
o !== p && (E(o), t(a));
|
|
8
|
+
const B = c(
|
|
9
|
+
(e, s = "internal") => {
|
|
10
|
+
(s === "internal" ? i : t)((l) => l.some((n) => n.id === e.id) ? l.map(
|
|
11
|
+
(n) => n.id === e.id ? { ...e } : n
|
|
12
|
+
) : [...l, { ...e }]);
|
|
13
|
+
},
|
|
14
|
+
[]
|
|
15
|
+
), m = c((e) => {
|
|
16
|
+
i((s) => s.filter((r) => r.id !== e)), t((s) => s.filter((r) => r.id !== e));
|
|
17
|
+
}, []), F = c(() => {
|
|
18
|
+
i([]), t([]);
|
|
19
|
+
}, []);
|
|
20
|
+
b(f, () => ({
|
|
21
|
+
addMessageBar: B,
|
|
22
|
+
removeMessageBar: m,
|
|
23
|
+
removeAllMessagesBar: F
|
|
24
|
+
}));
|
|
25
|
+
const S = j(
|
|
26
|
+
() => [...M, ...g],
|
|
27
|
+
[M, g]
|
|
28
|
+
);
|
|
29
|
+
return /* @__PURE__ */ I(
|
|
30
|
+
W,
|
|
31
|
+
{
|
|
32
|
+
style: x,
|
|
33
|
+
messages: S,
|
|
34
|
+
onDismiss: m
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
);
|
|
30
39
|
export {
|
|
31
|
-
|
|
40
|
+
A as EFWMessageBarManager
|
|
32
41
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as k, jsx as
|
|
1
|
+
import { jsxs as k, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import * as n from "react";
|
|
3
|
-
import { makeStyles as
|
|
4
|
-
import { Dismiss24Regular as
|
|
5
|
-
import { EFWButton as
|
|
6
|
-
import { EFWGroupButton as
|
|
7
|
-
const
|
|
3
|
+
import { makeStyles as B, useRestoreFocusTarget as D, Drawer as R, DrawerHeader as z, DrawerHeaderTitle as C, DrawerBody as N, DrawerFooter as S, tokens as e } from "@fluentui/react-components";
|
|
4
|
+
import { Dismiss24Regular as E } from "@fluentui/react-icons";
|
|
5
|
+
import { EFWButton as T } from "../../../../buttons/EFWButton/EFWButton.js";
|
|
6
|
+
import { EFWGroupButton as W } from "../../../../buttons/EFWGroupButton/EFWGroupButton.js";
|
|
7
|
+
const j = B({
|
|
8
8
|
drawerContainer: {
|
|
9
9
|
transform: "translateZ(0px)"
|
|
10
10
|
},
|
|
@@ -21,52 +21,53 @@ const W = D({
|
|
|
21
21
|
* Aplica padding vertical y horizontal usando tokens de diseño.
|
|
22
22
|
*/
|
|
23
23
|
drawerHeader: {
|
|
24
|
-
padding:
|
|
25
|
-
paddingLeft:
|
|
26
|
-
paddingRight:
|
|
24
|
+
padding: e.spacingVerticalL,
|
|
25
|
+
paddingLeft: e.spacingHorizontalL,
|
|
26
|
+
paddingRight: e.spacingHorizontalL
|
|
27
27
|
},
|
|
28
28
|
/**
|
|
29
29
|
* Estilos para el cuerpo del drawer.
|
|
30
30
|
* Aplica padding inferior y lateral usando tokens de diseño.
|
|
31
31
|
*/
|
|
32
32
|
drawerBody: {
|
|
33
|
-
paddingBottom:
|
|
34
|
-
paddingLeft:
|
|
35
|
-
paddingRight:
|
|
33
|
+
paddingBottom: e.spacingVerticalL,
|
|
34
|
+
paddingLeft: e.spacingHorizontalL,
|
|
35
|
+
paddingRight: e.spacingHorizontalL
|
|
36
36
|
},
|
|
37
37
|
/**
|
|
38
38
|
* Estilos para el pie del drawer.
|
|
39
39
|
* Aplica padding, disposición flexible y espaciado entre elementos.
|
|
40
40
|
*/
|
|
41
41
|
drawerFooter: {
|
|
42
|
-
padding:
|
|
43
|
-
paddingLeft:
|
|
44
|
-
paddingRight:
|
|
42
|
+
padding: e.spacingVerticalM,
|
|
43
|
+
paddingLeft: e.spacingHorizontalL,
|
|
44
|
+
paddingRight: e.spacingHorizontalL,
|
|
45
45
|
display: "flex",
|
|
46
46
|
justifyContent: "flex-start",
|
|
47
|
-
gap:
|
|
47
|
+
gap: e.spacingHorizontalS
|
|
48
48
|
}
|
|
49
|
-
}),
|
|
49
|
+
}), A = n.memo(({
|
|
50
50
|
isOpen: s,
|
|
51
|
-
onClose:
|
|
51
|
+
onClose: a,
|
|
52
52
|
onOpenChange: l,
|
|
53
53
|
// Nueva prop
|
|
54
54
|
title: f,
|
|
55
|
-
content:
|
|
55
|
+
content: o,
|
|
56
56
|
buttons: p = [],
|
|
57
57
|
size: m,
|
|
58
58
|
position: w,
|
|
59
|
-
modalType: h
|
|
59
|
+
modalType: h,
|
|
60
|
+
labels: x
|
|
60
61
|
}) => {
|
|
61
|
-
const
|
|
62
|
+
const t = j(), L = D(), i = n.useRef(null), F = n.useCallback(
|
|
62
63
|
(c, u) => {
|
|
63
64
|
if (!u.open && s) {
|
|
64
|
-
const d = c.target,
|
|
65
|
-
if ((d ===
|
|
66
|
-
const
|
|
67
|
-
if (!
|
|
68
|
-
const g =
|
|
69
|
-
'[
|
|
65
|
+
const d = c.target, H = c.currentTarget;
|
|
66
|
+
if ((d === H || d?.classList.contains("fui-DrawerDialog__backdrop") || d?.getAttribute("role") === "presentation") && i.current) {
|
|
67
|
+
const b = document.activeElement;
|
|
68
|
+
if (!i.current.contains(b)) {
|
|
69
|
+
const g = i.current.querySelector(
|
|
70
|
+
'[data-efw-drawer-close-button="true"]'
|
|
70
71
|
);
|
|
71
72
|
g && g.focus();
|
|
72
73
|
}
|
|
@@ -75,13 +76,13 @@ const W = D({
|
|
|
75
76
|
l(c, u);
|
|
76
77
|
},
|
|
77
78
|
[s, l]
|
|
78
|
-
),
|
|
79
|
+
), y = n.useMemo(() => typeof o == "function" ? o(a) : o, [o, a]);
|
|
79
80
|
return /* @__PURE__ */ k(
|
|
80
|
-
|
|
81
|
+
R,
|
|
81
82
|
{
|
|
82
|
-
ref:
|
|
83
|
+
ref: i,
|
|
83
84
|
as: "aside",
|
|
84
|
-
className:
|
|
85
|
+
className: t.drawerContainer,
|
|
85
86
|
"data-efw-drawer": !0,
|
|
86
87
|
size: m,
|
|
87
88
|
position: w,
|
|
@@ -89,44 +90,45 @@ const W = D({
|
|
|
89
90
|
open: s,
|
|
90
91
|
onOpenChange: F,
|
|
91
92
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ r(
|
|
93
94
|
"div",
|
|
94
95
|
{
|
|
95
|
-
...
|
|
96
|
-
className:
|
|
96
|
+
...L,
|
|
97
|
+
className: t.focusSentinel,
|
|
97
98
|
tabIndex: -1,
|
|
98
99
|
"data-efw-drawer-focus-sentinel": !0
|
|
99
100
|
}
|
|
100
101
|
),
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
|
|
102
|
+
/* @__PURE__ */ r(z, { className: t.drawerHeader, children: /* @__PURE__ */ r(
|
|
103
|
+
C,
|
|
103
104
|
{
|
|
104
105
|
id: "drawer-title",
|
|
105
|
-
action: /* @__PURE__ */
|
|
106
|
-
|
|
106
|
+
action: /* @__PURE__ */ r(
|
|
107
|
+
T,
|
|
107
108
|
{
|
|
108
109
|
appearance: "subtle",
|
|
109
|
-
icon: /* @__PURE__ */
|
|
110
|
-
"aria-label":
|
|
111
|
-
|
|
110
|
+
icon: /* @__PURE__ */ r(E, {}),
|
|
111
|
+
"aria-label": x.closeButtonAriaLabel,
|
|
112
|
+
"data-efw-drawer-close-button": "true",
|
|
113
|
+
onClick: a
|
|
112
114
|
}
|
|
113
115
|
),
|
|
114
116
|
children: f
|
|
115
117
|
}
|
|
116
118
|
) }),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
p.length > 0 && /* @__PURE__ */
|
|
119
|
-
|
|
119
|
+
/* @__PURE__ */ r(N, { className: t.drawerBody, children: y }),
|
|
120
|
+
p.length > 0 && /* @__PURE__ */ r(S, { className: t.drawerFooter, children: /* @__PURE__ */ r(
|
|
121
|
+
W,
|
|
120
122
|
{
|
|
121
123
|
buttons: p,
|
|
122
|
-
onClickParams:
|
|
124
|
+
onClickParams: a
|
|
123
125
|
}
|
|
124
126
|
) })
|
|
125
127
|
]
|
|
126
128
|
}
|
|
127
129
|
);
|
|
128
130
|
});
|
|
129
|
-
|
|
131
|
+
A.displayName = "EFWDrawer";
|
|
130
132
|
export {
|
|
131
|
-
|
|
133
|
+
A as EFWDrawer
|
|
132
134
|
};
|
package/dist/react-components/hooks/useDrawer/component/EFWDrawerLoader/EFWDrawerLoader.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
3
|
+
interface EFWDrawerLoaderProps {
|
|
4
|
+
loadingText: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const EFWDrawerLoader: React.MemoExoticComponent<({ loadingText }: EFWDrawerLoaderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Spinner as
|
|
4
|
-
const n =
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import { Spinner as m, Text as o } from "@fluentui/react-components";
|
|
4
|
+
const n = t.memo(({ loadingText: r }) => /* @__PURE__ */ i(
|
|
5
5
|
"div",
|
|
6
6
|
{
|
|
7
7
|
style: {
|
|
@@ -13,8 +13,8 @@ const n = i.memo(({}) => /* @__PURE__ */ r(
|
|
|
13
13
|
gap: "10px"
|
|
14
14
|
},
|
|
15
15
|
children: [
|
|
16
|
-
/* @__PURE__ */ e(
|
|
17
|
-
/* @__PURE__ */ e(o, { children:
|
|
16
|
+
/* @__PURE__ */ e(m, { size: "medium" }),
|
|
17
|
+
/* @__PURE__ */ e(o, { children: r })
|
|
18
18
|
]
|
|
19
19
|
}
|
|
20
20
|
));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { useDrawer } from './useDrawer';
|
|
2
|
-
export type { UseDrawerProps, DrawerOpenHandler, DrawerCloseHandler } from './useDrawer.types';
|
|
2
|
+
export type { UseDrawerProps, DrawerOpenHandler, DrawerCloseHandler, UseDrawerLabels } from './useDrawer.types';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { DrawerCloseHandler, DrawerOpenHandler, DrawerState, UseDrawerProps } from './useDrawer.types';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export declare function useDrawer({ title: initialTitle, content: initialContent, buttons: initialButtons, size: initialSize, position: initialPosition, modalType: initialModalType, drawerOnOpen, drawerOnClose, deferContentRendering: initialDeferContentRendering, contentRenderDelay: initialContentRenderDelay, }: UseDrawerProps): {
|
|
3
|
+
export declare function useDrawer({ title: initialTitle, content: initialContent, buttons: initialButtons, size: initialSize, position: initialPosition, modalType: initialModalType, drawerOnOpen, drawerOnClose, deferContentRendering: initialDeferContentRendering, contentRenderDelay: initialContentRenderDelay, labels: initialLabels, }: UseDrawerProps): {
|
|
4
4
|
openDrawer: DrawerOpenHandler;
|
|
5
5
|
closeDrawer: DrawerCloseHandler;
|
|
6
|
-
updateDrawer: (updates: Partial<DrawerState
|
|
6
|
+
updateDrawer: (updates: Partial<DrawerState>, options?: {
|
|
7
|
+
force?: boolean;
|
|
8
|
+
}) => void;
|
|
7
9
|
isOpen: boolean;
|
|
8
10
|
isContentReady: boolean;
|
|
9
11
|
DrawerElement: React.ReactPortal | null;
|