@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
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import { jsxs as t, Fragment as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Text as l } from "@fluentui/react-components";
|
|
3
|
+
import { DEFAULT_EFW_TABLE_LOCALE_TEXT as i, DEFAULT_EFW_BUTTONS_LOCALE_TEXT as d, DEFAULT_EFW_FIELDS_LOCALE_TEXT as n, DEFAULT_EFW_FORM_LOCALE_TEXT as s } from "./defaultLocaleText.js";
|
|
4
|
+
import { enLocalizedStrings as c, ptLocalizedStrings as m } from "../fields/DatePicker/EFWDatePicker.utils.js";
|
|
5
|
+
const u = {
|
|
6
|
+
requiredFieldError: "This field is required",
|
|
7
|
+
requiredFieldsNotification: "Please complete all required fields and try again.",
|
|
8
|
+
unsupportedFieldType: (e) => `Unsupported field type: ${e}`
|
|
9
|
+
}, p = {
|
|
10
|
+
input: {
|
|
11
|
+
labels: {
|
|
12
|
+
placeholder: "",
|
|
13
|
+
emptyState: "No data available"
|
|
14
|
+
},
|
|
15
|
+
validationMessages: {
|
|
16
|
+
minLength: (e) => `Please enter more than ${e} characters.`,
|
|
17
|
+
maxLength: (e) => `Please enter fewer than ${e} characters.`,
|
|
18
|
+
creditCardInvalid: "The credit card number entered is not valid.",
|
|
19
|
+
chileanRutInvalid: "The national ID entered is not valid.",
|
|
20
|
+
dateInvalid: "The date entered is not valid.",
|
|
21
|
+
dateInvalidWithFormat: "The date entered is not valid. Use DD/MM/YYYY format.",
|
|
22
|
+
timeInvalid: "Use HH:MM format (00:00 - 23:59).",
|
|
23
|
+
emailInvalid: "The email entered is not valid.",
|
|
24
|
+
formatInvalid: "The format of the value entered is not valid."
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
numberInput: {
|
|
28
|
+
labels: {
|
|
29
|
+
placeholder: "",
|
|
30
|
+
emptyState: "No data available"
|
|
31
|
+
},
|
|
32
|
+
validationMessages: {
|
|
33
|
+
invalidNumber: "The value entered is not a valid number.",
|
|
34
|
+
minValue: (e, a) => `The value must be greater than or equal to ${a}.`,
|
|
35
|
+
maxValue: (e, a) => `The value must be less than or equal to ${a}.`
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
textArea: {
|
|
39
|
+
labels: {
|
|
40
|
+
placeholder: "",
|
|
41
|
+
emptyState: "No data available"
|
|
42
|
+
},
|
|
43
|
+
validationMessages: {
|
|
44
|
+
maxLength: (e) => `Please enter fewer than ${e} characters.`
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
switch: {
|
|
48
|
+
labels: {
|
|
49
|
+
checkedText: "Yes",
|
|
50
|
+
uncheckedText: "No",
|
|
51
|
+
emptyState: "No data available"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
tagPicker: {
|
|
55
|
+
labels: {
|
|
56
|
+
placeholder: "Select an option",
|
|
57
|
+
noMatchesMessage: "No matches found",
|
|
58
|
+
loadingMessage: "Searching...",
|
|
59
|
+
emptyState: "No data available",
|
|
60
|
+
selectedItemsAriaLabel: "Selected items",
|
|
61
|
+
inputAriaLabel: "Select items"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
datePicker: {
|
|
65
|
+
labels: {
|
|
66
|
+
placeholder: "DD/MM/YYYY",
|
|
67
|
+
emptyState: "No data available"
|
|
68
|
+
},
|
|
69
|
+
calendarStrings: c
|
|
70
|
+
},
|
|
71
|
+
attachments: {
|
|
72
|
+
labels: {
|
|
73
|
+
attachButtonLabel: "Attach files",
|
|
74
|
+
emptyMessage: "No files available",
|
|
75
|
+
downloadMenuItemLabel: "Download",
|
|
76
|
+
removeMenuItemLabel: "Remove attachment",
|
|
77
|
+
maxFileSizeExceededMessage: (e, a) => `An attachment exceeds the maximum size of ${a}.`
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}, E = {
|
|
81
|
+
button: {
|
|
82
|
+
labels: {
|
|
83
|
+
loadingText: "Processing...",
|
|
84
|
+
defaultErrorMessage: "An error occurred",
|
|
85
|
+
operationFailedMessage: "Operation failed",
|
|
86
|
+
unknownErrorMessage: "Unknown error",
|
|
87
|
+
parseErrorMessage: "Unable to parse error"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
groupButton: {
|
|
91
|
+
labels: {
|
|
92
|
+
invalidButtonText: "Invalid button (missing or unknown 'kind' property)"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
drawer: {
|
|
96
|
+
labels: {
|
|
97
|
+
closeButtonAriaLabel: "Close",
|
|
98
|
+
loadingContentText: "Loading content..."
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}, L = {
|
|
102
|
+
addButtonLabel: "Create",
|
|
103
|
+
addDrawerTitle: "Create item",
|
|
104
|
+
addDrawerDescription: /* @__PURE__ */ t(o, { children: [
|
|
105
|
+
"Complete required fields to create a new row. Fields marked with",
|
|
106
|
+
" ",
|
|
107
|
+
/* @__PURE__ */ r(l, { style: { color: "var(--colorPaletteRedForeground1)" }, children: "*" }),
|
|
108
|
+
" are mandatory."
|
|
109
|
+
] }),
|
|
110
|
+
addActionText: "Create",
|
|
111
|
+
addLoadingText: "Saving...",
|
|
112
|
+
addSuccessText: "Saved!",
|
|
113
|
+
addErrorTitle: "Error while saving item",
|
|
114
|
+
updateButtonLabel: "Edit",
|
|
115
|
+
updateDrawerTitle: "Edit item",
|
|
116
|
+
updateDrawerDescription: /* @__PURE__ */ t(o, { children: [
|
|
117
|
+
"Update required fields for the selected row. Fields marked with",
|
|
118
|
+
" ",
|
|
119
|
+
/* @__PURE__ */ r(l, { style: { color: "var(--colorPaletteRedForeground1)" }, children: "*" }),
|
|
120
|
+
" are mandatory."
|
|
121
|
+
] }),
|
|
122
|
+
updateActionText: "Update",
|
|
123
|
+
updateLoadingText: "Updating...",
|
|
124
|
+
updateSuccessText: "Updated!",
|
|
125
|
+
updateErrorTitleSingle: "Error while updating item",
|
|
126
|
+
updateErrorTitleMultiple: "Error while updating items",
|
|
127
|
+
drawerCloseButtonAriaLabel: "Close",
|
|
128
|
+
drawerLoadingContentText: "Loading content...",
|
|
129
|
+
deleteButtonLabel: "Delete",
|
|
130
|
+
deleteDrawerTitle: "Delete item",
|
|
131
|
+
deleteConfirmSingle: "Are you sure you want to delete the selected row?",
|
|
132
|
+
deleteConfirmMultiple: (e) => `Are you sure you want to delete ${e} selected rows?`,
|
|
133
|
+
deleteActionText: "Delete",
|
|
134
|
+
deleteLoadingText: "Deleting...",
|
|
135
|
+
deleteSuccessText: "Deleted!",
|
|
136
|
+
deleteErrorTitleSingle: "Error while deleting item",
|
|
137
|
+
deleteErrorTitleMultiple: "Error while deleting items",
|
|
138
|
+
cancelButtonLabel: "Cancel",
|
|
139
|
+
filterButtonLabel: "",
|
|
140
|
+
filterDrawerTitle: "Filters",
|
|
141
|
+
filterDrawerDescription: "Type or select options to filter by one or multiple properties. Filters apply automatically.",
|
|
142
|
+
filterClearButtonLabel: "Clear filters",
|
|
143
|
+
filterCloseButtonLabel: "Close",
|
|
144
|
+
filterEmptyChoiceOptionLabel: "(Empty)",
|
|
145
|
+
filterBooleanTrueLabel: "Yes",
|
|
146
|
+
filterBooleanFalseLabel: "No",
|
|
147
|
+
filterTextPlaceholder: "Type text...",
|
|
148
|
+
filterNumberPlaceholder: "Enter a number...",
|
|
149
|
+
filterNotePlaceholder: "Type text...",
|
|
150
|
+
filterChoicePlaceholder: "Select an option",
|
|
151
|
+
filterMultiChoicePlaceholder: "Select one or more options",
|
|
152
|
+
filterDatePlaceholder: "DD/MM/YYYY",
|
|
153
|
+
filterBooleanPlaceholder: "Select Yes or No",
|
|
154
|
+
overlayEmptyTitle: "No data available",
|
|
155
|
+
overlayEmptyDescription: "Rows will appear here after data is loaded",
|
|
156
|
+
overlayLoadingTitle: "Loading data...",
|
|
157
|
+
overlayLoadingDescription: "Please wait while data is loading",
|
|
158
|
+
overlayErrorTitle: "Error while loading data",
|
|
159
|
+
overlayErrorDescription: "Something went wrong while loading data",
|
|
160
|
+
overlayRetryButtonLabel: "Retry",
|
|
161
|
+
overlayEmptyImageAlt: "No data",
|
|
162
|
+
filteredEmptyTitle: "No results for current filters",
|
|
163
|
+
filteredEmptyDescription: "Adjust or clear filters to see rows.",
|
|
164
|
+
commandBarClearSelectionTitle: "Clear selection",
|
|
165
|
+
commandBarSelectedCountLabel: (e) => `${e} selected`,
|
|
166
|
+
commandBarSelectedCountShortLabel: (e) => `${e}`,
|
|
167
|
+
sortStateAscLabel: "Sorted ascending, click for descending",
|
|
168
|
+
sortStateDescLabel: "Sorted descending, click to clear sorting",
|
|
169
|
+
sortStateNoneLabel: "Click to sort",
|
|
170
|
+
loadingMoreAriaLabel: "Loading more rows",
|
|
171
|
+
loadingMoreSpinnerLabel: "Loading more...",
|
|
172
|
+
resizeColumnAriaLabel: "Resize column"
|
|
173
|
+
}, T = {
|
|
174
|
+
requiredFieldError: "Este campo é obrigatório",
|
|
175
|
+
requiredFieldsNotification: "Por favor, preencha todos os campos obrigatórios e tente novamente.",
|
|
176
|
+
unsupportedFieldType: (e) => `Tipo de campo não suportado: ${e}`
|
|
177
|
+
}, g = {
|
|
178
|
+
input: {
|
|
179
|
+
labels: {
|
|
180
|
+
placeholder: "",
|
|
181
|
+
emptyState: "Sem dados disponíveis"
|
|
182
|
+
},
|
|
183
|
+
validationMessages: {
|
|
184
|
+
minLength: (e) => `Por favor, informe mais de ${e} caracteres.`,
|
|
185
|
+
maxLength: (e) => `Por favor, informe menos de ${e} caracteres.`,
|
|
186
|
+
creditCardInvalid: "O número do cartão informado não é válido.",
|
|
187
|
+
chileanRutInvalid: "O R.U.T informado não é válido.",
|
|
188
|
+
dateInvalid: "A data informada não é válida.",
|
|
189
|
+
dateInvalidWithFormat: "A data informada não é válida. Use o formato DD/MM/AAAA.",
|
|
190
|
+
timeInvalid: "Use o formato HH:MM (00:00 - 23:59).",
|
|
191
|
+
emailInvalid: "O e-mail informado não é válido.",
|
|
192
|
+
formatInvalid: "O formato do valor informado não é válido."
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
numberInput: {
|
|
196
|
+
labels: {
|
|
197
|
+
placeholder: "",
|
|
198
|
+
emptyState: "Sem dados disponíveis"
|
|
199
|
+
},
|
|
200
|
+
validationMessages: {
|
|
201
|
+
invalidNumber: "O valor informado não é um número válido.",
|
|
202
|
+
minValue: (e, a) => `O valor deve ser maior ou igual a ${a}.`,
|
|
203
|
+
maxValue: (e, a) => `O valor deve ser menor ou igual a ${a}.`
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
textArea: {
|
|
207
|
+
labels: {
|
|
208
|
+
placeholder: "",
|
|
209
|
+
emptyState: "Sem dados disponíveis"
|
|
210
|
+
},
|
|
211
|
+
validationMessages: {
|
|
212
|
+
maxLength: (e) => `Por favor, informe menos de ${e} caracteres.`
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
switch: {
|
|
216
|
+
labels: {
|
|
217
|
+
checkedText: "Sim",
|
|
218
|
+
uncheckedText: "Não",
|
|
219
|
+
emptyState: "Sem dados disponíveis"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
tagPicker: {
|
|
223
|
+
labels: {
|
|
224
|
+
placeholder: "Selecione uma opção",
|
|
225
|
+
noMatchesMessage: "Nenhum resultado encontrado",
|
|
226
|
+
loadingMessage: "Buscando informações...",
|
|
227
|
+
emptyState: "Sem dados disponíveis",
|
|
228
|
+
selectedItemsAriaLabel: "Itens selecionados",
|
|
229
|
+
inputAriaLabel: "Selecionar itens"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
datePicker: {
|
|
233
|
+
labels: {
|
|
234
|
+
placeholder: "DD/MM/YYYY",
|
|
235
|
+
emptyState: "Sem dados disponíveis"
|
|
236
|
+
},
|
|
237
|
+
calendarStrings: m
|
|
238
|
+
},
|
|
239
|
+
attachments: {
|
|
240
|
+
labels: {
|
|
241
|
+
attachButtonLabel: "Anexar arquivos",
|
|
242
|
+
emptyMessage: "Sem arquivos disponíveis",
|
|
243
|
+
downloadMenuItemLabel: "Baixar",
|
|
244
|
+
removeMenuItemLabel: "Remover anexo",
|
|
245
|
+
maxFileSizeExceededMessage: (e, a) => `Existe um anexo que excede o tamanho máximo de ${a}.`
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}, h = {
|
|
249
|
+
button: {
|
|
250
|
+
labels: {
|
|
251
|
+
loadingText: "Processando...",
|
|
252
|
+
defaultErrorMessage: "Ocorreu um erro",
|
|
253
|
+
operationFailedMessage: "A operação falhou",
|
|
254
|
+
unknownErrorMessage: "Erro desconhecido",
|
|
255
|
+
parseErrorMessage: "Não foi possível interpretar o erro"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
groupButton: {
|
|
259
|
+
labels: {
|
|
260
|
+
invalidButtonText: "Botão inválido (propriedade 'kind' ausente ou desconhecida)"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
drawer: {
|
|
264
|
+
labels: {
|
|
265
|
+
closeButtonAriaLabel: "Fechar",
|
|
266
|
+
loadingContentText: "Carregando conteúdo..."
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}, v = {
|
|
270
|
+
addButtonLabel: "Novo",
|
|
271
|
+
addDrawerTitle: "Novo item",
|
|
272
|
+
addDrawerDescription: /* @__PURE__ */ t(o, { children: [
|
|
273
|
+
"Preencha os campos obrigatórios para criar um novo item na tabela. Os campos marcados com",
|
|
274
|
+
" ",
|
|
275
|
+
/* @__PURE__ */ r(l, { style: { color: "var(--colorPaletteRedForeground1)" }, children: "*" }),
|
|
276
|
+
" são obrigatórios."
|
|
277
|
+
] }),
|
|
278
|
+
addActionText: "Criar",
|
|
279
|
+
addLoadingText: "Salvando...",
|
|
280
|
+
addSuccessText: "Salvo!",
|
|
281
|
+
addErrorTitle: "Erro ao tentar salvar o item",
|
|
282
|
+
updateButtonLabel: "Editar",
|
|
283
|
+
updateDrawerTitle: "Editar item",
|
|
284
|
+
updateDrawerDescription: /* @__PURE__ */ t(o, { children: [
|
|
285
|
+
"Preencha os campos obrigatórios para atualizar o item selecionado. Os campos marcados com",
|
|
286
|
+
" ",
|
|
287
|
+
/* @__PURE__ */ r(l, { style: { color: "var(--colorPaletteRedForeground1)" }, children: "*" }),
|
|
288
|
+
" são obrigatórios."
|
|
289
|
+
] }),
|
|
290
|
+
updateActionText: "Atualizar",
|
|
291
|
+
updateLoadingText: "Atualizando...",
|
|
292
|
+
updateSuccessText: "Atualizado!",
|
|
293
|
+
updateErrorTitleSingle: "Erro ao tentar atualizar o item",
|
|
294
|
+
updateErrorTitleMultiple: "Erro ao tentar atualizar os itens",
|
|
295
|
+
drawerCloseButtonAriaLabel: "Fechar",
|
|
296
|
+
drawerLoadingContentText: "Carregando conteúdo...",
|
|
297
|
+
deleteButtonLabel: "Excluir",
|
|
298
|
+
deleteDrawerTitle: "Excluir item",
|
|
299
|
+
deleteConfirmSingle: "Tem certeza de que deseja excluir o item selecionado?",
|
|
300
|
+
deleteConfirmMultiple: (e) => `Tem certeza de que deseja excluir os ${e} itens selecionados?`,
|
|
301
|
+
deleteActionText: "Excluir",
|
|
302
|
+
deleteLoadingText: "Excluindo...",
|
|
303
|
+
deleteSuccessText: "Excluído!",
|
|
304
|
+
deleteErrorTitleSingle: "Erro ao tentar excluir o item",
|
|
305
|
+
deleteErrorTitleMultiple: "Erro ao tentar excluir os itens",
|
|
306
|
+
cancelButtonLabel: "Cancelar",
|
|
307
|
+
filterButtonLabel: "",
|
|
308
|
+
filterDrawerTitle: "Filtros",
|
|
309
|
+
filterDrawerDescription: "Digite ou selecione uma opção para pesquisar por uma ou mais propriedades. Os filtros são aplicados automaticamente.",
|
|
310
|
+
filterClearButtonLabel: "Limpar filtros",
|
|
311
|
+
filterCloseButtonLabel: "Fechar",
|
|
312
|
+
filterEmptyChoiceOptionLabel: "(Vazio)",
|
|
313
|
+
filterBooleanTrueLabel: "Sim",
|
|
314
|
+
filterBooleanFalseLabel: "Não",
|
|
315
|
+
filterTextPlaceholder: "Digite o texto...",
|
|
316
|
+
filterNumberPlaceholder: "Digite um número...",
|
|
317
|
+
filterNotePlaceholder: "Digite o texto...",
|
|
318
|
+
filterChoicePlaceholder: "Selecione uma opção",
|
|
319
|
+
filterMultiChoicePlaceholder: "Selecione uma ou mais opções",
|
|
320
|
+
filterDatePlaceholder: "DD/MM/AAAA",
|
|
321
|
+
filterBooleanPlaceholder: "Selecione Sim ou Não",
|
|
322
|
+
overlayEmptyTitle: "Sem dados disponíveis",
|
|
323
|
+
overlayEmptyDescription: "Os dados aparecerão aqui assim que forem adicionados registros",
|
|
324
|
+
overlayLoadingTitle: "Carregando dados...",
|
|
325
|
+
overlayLoadingDescription: "Aguarde enquanto os dados são carregados",
|
|
326
|
+
overlayErrorTitle: "Erro ao carregar dados",
|
|
327
|
+
overlayErrorDescription: "Ocorreu um erro ao carregar os dados",
|
|
328
|
+
overlayRetryButtonLabel: "Tentar novamente",
|
|
329
|
+
overlayEmptyImageAlt: "Sem dados",
|
|
330
|
+
filteredEmptyTitle: "Sem resultados para o filtro aplicado",
|
|
331
|
+
filteredEmptyDescription: "Ajuste ou limpe os filtros para ver registros.",
|
|
332
|
+
commandBarClearSelectionTitle: "Limpar seleção",
|
|
333
|
+
commandBarSelectedCountLabel: (e) => `Selecionados (${e})`,
|
|
334
|
+
commandBarSelectedCountShortLabel: (e) => `(${e})`,
|
|
335
|
+
sortStateAscLabel: "Ordenado em ordem crescente, clique para ordem decrescente",
|
|
336
|
+
sortStateDescLabel: "Ordenado em ordem decrescente, clique para remover a ordenação",
|
|
337
|
+
sortStateNoneLabel: "Clique para ordenar",
|
|
338
|
+
loadingMoreAriaLabel: "Carregando mais itens",
|
|
339
|
+
loadingMoreSpinnerLabel: "Carregando mais...",
|
|
340
|
+
resizeColumnAriaLabel: "Redimensionar coluna"
|
|
341
|
+
}, b = {
|
|
342
|
+
form: s,
|
|
343
|
+
fields: n,
|
|
344
|
+
buttons: d,
|
|
345
|
+
table: i
|
|
346
|
+
}, f = {
|
|
347
|
+
form: u,
|
|
348
|
+
fields: p,
|
|
349
|
+
buttons: E,
|
|
350
|
+
table: L
|
|
351
|
+
}, S = {
|
|
352
|
+
form: T,
|
|
353
|
+
fields: g,
|
|
354
|
+
buttons: h,
|
|
355
|
+
table: v
|
|
356
|
+
}, C = {
|
|
357
|
+
"es-ES": b,
|
|
358
|
+
"en-EN": f,
|
|
359
|
+
"pt-BR": S
|
|
360
|
+
};
|
|
361
|
+
export {
|
|
362
|
+
C as PORYGON_LOCALES,
|
|
363
|
+
f as PORYGON_LOCALE_EN,
|
|
364
|
+
b as PORYGON_LOCALE_ES,
|
|
365
|
+
S as PORYGON_LOCALE_PT_BR
|
|
366
|
+
};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { EFWInputLabels, EFWInputValidationMessages } from '../fields/Input/EFWInput.types';
|
|
3
|
+
import { EFWNumberInputLabels, EFWNumberInputValidationMessages } from '../fields/NumberInput/EFWNumberInput.types';
|
|
4
|
+
import { EFWTextAreaLabels, EFWTextAreaValidationMessages } from '../fields/TextArea/EFWTextArea.types';
|
|
5
|
+
import { EFWSwitchLabels } from '../fields/Switch/EFWSwitch.types';
|
|
6
|
+
import { EFWTagPickerLabels } from '../fields/TagPicker/EFWTagPicker.types';
|
|
7
|
+
import { EFWDatePickerLabels, CalendarStrings } from '../fields/DatePicker/EFWDatePicker.types';
|
|
8
|
+
import { EFWAttachmentsLabels } from '../fields/Attachments/EFWAttachments.types';
|
|
9
|
+
import { EFWButtonLabels } from '../buttons/EFWButton/EFWButton.types';
|
|
10
|
+
import { EFWGroupButtonLabels } from '../buttons/EFWGroupButton/EFWGroupButton.types';
|
|
11
|
+
import { UseDrawerLabels } from '../hooks/useDrawer/useDrawer.types';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Tipo utilitario que hace opcionales todas las propiedades de un objeto de forma recursiva.
|
|
15
|
+
*/
|
|
16
|
+
export type DeepPartial<T> = {
|
|
17
|
+
[P in keyof T]?: T[P] extends object ? T[P] extends (...args: unknown[]) => unknown ? T[P] : DeepPartial<T[P]> : T[P];
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Textos localizables para los campos de formulario EFW, agrupados por componente.
|
|
21
|
+
* Cada sub-objeto contiene `labels` y opcionalmente `validationMessages`.
|
|
22
|
+
*/
|
|
23
|
+
export interface EFWFieldsLocaleText {
|
|
24
|
+
input: {
|
|
25
|
+
labels: Required<EFWInputLabels>;
|
|
26
|
+
validationMessages: Required<EFWInputValidationMessages>;
|
|
27
|
+
};
|
|
28
|
+
numberInput: {
|
|
29
|
+
labels: Required<EFWNumberInputLabels>;
|
|
30
|
+
validationMessages: Required<EFWNumberInputValidationMessages>;
|
|
31
|
+
};
|
|
32
|
+
textArea: {
|
|
33
|
+
labels: Required<EFWTextAreaLabels>;
|
|
34
|
+
validationMessages: Required<EFWTextAreaValidationMessages>;
|
|
35
|
+
};
|
|
36
|
+
switch: {
|
|
37
|
+
labels: Required<EFWSwitchLabels>;
|
|
38
|
+
};
|
|
39
|
+
tagPicker: {
|
|
40
|
+
labels: Required<EFWTagPickerLabels>;
|
|
41
|
+
};
|
|
42
|
+
datePicker: {
|
|
43
|
+
labels: Required<EFWDatePickerLabels>;
|
|
44
|
+
calendarStrings: CalendarStrings;
|
|
45
|
+
};
|
|
46
|
+
attachments: {
|
|
47
|
+
labels: Required<EFWAttachmentsLabels>;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export interface EFWFormLocaleText {
|
|
51
|
+
requiredFieldError: string;
|
|
52
|
+
requiredFieldsNotification: string;
|
|
53
|
+
unsupportedFieldType: (fieldType: string) => string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Versión extendida de `EFWFormLocaleText` que permite incluir traducciones
|
|
57
|
+
* de campos (`fields`) y botones/drawers (`buttons`) directamente en
|
|
58
|
+
* la prop `localeText` de `EFWForm`, sin necesidad de un `PorygonI18nProvider` externo.
|
|
59
|
+
*
|
|
60
|
+
* Internamente, `EFWForm` envuelve su contenido con un `PorygonI18nProvider` local
|
|
61
|
+
* cuando se detectan estas claves, manteniendo la jerarquía de merge:
|
|
62
|
+
* `defaultLocaleText → provider externo → EFWForm.localeText → per-field props`.
|
|
63
|
+
*/
|
|
64
|
+
export interface EFWFormExtendedLocaleText extends EFWFormLocaleText {
|
|
65
|
+
fields?: DeepPartial<EFWFieldsLocaleText>;
|
|
66
|
+
buttons?: DeepPartial<EFWButtonsLocaleText>;
|
|
67
|
+
}
|
|
68
|
+
export interface EFWButtonsLocaleText {
|
|
69
|
+
button: {
|
|
70
|
+
labels: Required<EFWButtonLabels>;
|
|
71
|
+
};
|
|
72
|
+
groupButton: {
|
|
73
|
+
labels: Required<EFWGroupButtonLabels>;
|
|
74
|
+
};
|
|
75
|
+
drawer: {
|
|
76
|
+
labels: Required<UseDrawerLabels>;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export interface EFWTableLocaleText {
|
|
80
|
+
addButtonLabel: string;
|
|
81
|
+
addDrawerTitle: string;
|
|
82
|
+
addDrawerDescription: ReactNode;
|
|
83
|
+
addActionText: string;
|
|
84
|
+
addLoadingText: string;
|
|
85
|
+
addSuccessText: string;
|
|
86
|
+
addErrorTitle: string;
|
|
87
|
+
updateButtonLabel: string;
|
|
88
|
+
updateDrawerTitle: string;
|
|
89
|
+
updateDrawerDescription: ReactNode;
|
|
90
|
+
updateActionText: string;
|
|
91
|
+
updateLoadingText: string;
|
|
92
|
+
updateSuccessText: string;
|
|
93
|
+
updateErrorTitleSingle: string;
|
|
94
|
+
updateErrorTitleMultiple: string;
|
|
95
|
+
drawerCloseButtonAriaLabel?: string;
|
|
96
|
+
drawerLoadingContentText?: string;
|
|
97
|
+
deleteButtonLabel: string;
|
|
98
|
+
deleteDrawerTitle: string;
|
|
99
|
+
deleteConfirmSingle: string;
|
|
100
|
+
deleteConfirmMultiple: (count: number) => string;
|
|
101
|
+
deleteActionText: string;
|
|
102
|
+
deleteLoadingText: string;
|
|
103
|
+
deleteSuccessText: string;
|
|
104
|
+
deleteErrorTitleSingle: string;
|
|
105
|
+
deleteErrorTitleMultiple: string;
|
|
106
|
+
cancelButtonLabel: string;
|
|
107
|
+
filterButtonLabel: string;
|
|
108
|
+
filterDrawerTitle: string;
|
|
109
|
+
filterDrawerDescription: ReactNode;
|
|
110
|
+
filterClearButtonLabel: string;
|
|
111
|
+
filterCloseButtonLabel: string;
|
|
112
|
+
filterEmptyChoiceOptionLabel: string;
|
|
113
|
+
filterBooleanTrueLabel: string;
|
|
114
|
+
filterBooleanFalseLabel: string;
|
|
115
|
+
filterTextPlaceholder: string;
|
|
116
|
+
filterNumberPlaceholder: string;
|
|
117
|
+
filterNotePlaceholder: string;
|
|
118
|
+
filterChoicePlaceholder: string;
|
|
119
|
+
filterMultiChoicePlaceholder: string;
|
|
120
|
+
filterDatePlaceholder: string;
|
|
121
|
+
filterBooleanPlaceholder: string;
|
|
122
|
+
overlayEmptyTitle: string;
|
|
123
|
+
overlayEmptyDescription: string;
|
|
124
|
+
overlayLoadingTitle: string;
|
|
125
|
+
overlayLoadingDescription: string;
|
|
126
|
+
overlayErrorTitle: string;
|
|
127
|
+
overlayErrorDescription: string;
|
|
128
|
+
overlayRetryButtonLabel: string;
|
|
129
|
+
overlayEmptyImageAlt: string;
|
|
130
|
+
filteredEmptyTitle: string;
|
|
131
|
+
filteredEmptyDescription: string;
|
|
132
|
+
commandBarClearSelectionTitle: string;
|
|
133
|
+
commandBarSelectedCountLabel: (count: number) => string;
|
|
134
|
+
commandBarSelectedCountShortLabel: (count: number) => string;
|
|
135
|
+
sortStateAscLabel: string;
|
|
136
|
+
sortStateDescLabel: string;
|
|
137
|
+
sortStateNoneLabel: string;
|
|
138
|
+
loadingMoreAriaLabel: string;
|
|
139
|
+
loadingMoreSpinnerLabel: string;
|
|
140
|
+
resizeColumnAriaLabel: string;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Versión extendida de `EFWTableLocaleText` que permite incluir traducciones
|
|
144
|
+
* de formularios (`form`), campos (`fields`) y botones/drawers (`buttons`)
|
|
145
|
+
* directamente en la prop `localeText` de `EFWTable`, sin necesidad de un
|
|
146
|
+
* `PorygonI18nProvider` externo.
|
|
147
|
+
*
|
|
148
|
+
* Internamente, `EFWTable` envuelve su contenido con un `PorygonI18nProvider` local
|
|
149
|
+
* cuando se detectan estas claves, permitiendo que los drawers CRUD hereden
|
|
150
|
+
* las traducciones automáticamente.
|
|
151
|
+
*/
|
|
152
|
+
export interface EFWTableExtendedLocaleText extends EFWTableLocaleText {
|
|
153
|
+
form?: Partial<EFWFormLocaleText>;
|
|
154
|
+
fields?: DeepPartial<EFWFieldsLocaleText>;
|
|
155
|
+
buttons?: DeepPartial<EFWButtonsLocaleText>;
|
|
156
|
+
}
|
|
157
|
+
export interface PorygonResolvedLocaleText {
|
|
158
|
+
form: EFWFormLocaleText;
|
|
159
|
+
table: EFWTableLocaleText;
|
|
160
|
+
fields: EFWFieldsLocaleText;
|
|
161
|
+
buttons: EFWButtonsLocaleText;
|
|
162
|
+
}
|
|
163
|
+
export type PorygonLocalePresetCode = 'es-ES' | 'en-EN' | 'pt-BR';
|
|
164
|
+
export interface PorygonLocaleText {
|
|
165
|
+
form?: Partial<EFWFormLocaleText>;
|
|
166
|
+
table?: Partial<EFWTableLocaleText>;
|
|
167
|
+
fields?: DeepPartial<EFWFieldsLocaleText>;
|
|
168
|
+
buttons?: DeepPartial<EFWButtonsLocaleText>;
|
|
169
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
2
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
|
|
3
|
+
import v from "react";
|
|
4
4
|
const G = (p, t = !1) => p.map((e, c) => /* @__PURE__ */ u("div", { children: [
|
|
5
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:
|
|
6
|
+
e.items.map(({ type: a, label: m, icon: n, value: d, categoryValue: N, subItems: g, href: l, openInNewTab: C, onClick: f }, o) => {
|
|
7
7
|
if (a === "navItem") {
|
|
8
|
-
const
|
|
9
|
-
f ? f() :
|
|
8
|
+
const i = () => {
|
|
9
|
+
f ? f() : l && C && window.open(l, "_blank", "noopener,noreferrer");
|
|
10
10
|
};
|
|
11
11
|
return /* @__PURE__ */ r(
|
|
12
12
|
s,
|
|
13
13
|
{
|
|
14
|
-
icon: n &&
|
|
14
|
+
icon: n && v.createElement(n, {
|
|
15
15
|
// Esto es necesario debido a un aparente error en el 'icon'
|
|
16
16
|
// dentro NavItem. Evita que el ícono interfiera con el clic en la opción del menú
|
|
17
17
|
style: { pointerEvents: "none" }
|
|
18
18
|
}),
|
|
19
|
-
value: d ||
|
|
20
|
-
onClick:
|
|
19
|
+
value: d || l || "",
|
|
20
|
+
onClick: i,
|
|
21
21
|
children: !t && m
|
|
22
22
|
},
|
|
23
|
-
|
|
23
|
+
o
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
26
|
return a === "navCategory" ? /* @__PURE__ */ u(y, { value: N || "", children: [
|
|
27
|
-
/* @__PURE__ */ r(S, { icon: n &&
|
|
28
|
-
/* @__PURE__ */ r(_, { children: g?.map(({ value:
|
|
29
|
-
] },
|
|
27
|
+
/* @__PURE__ */ r(S, { icon: n && v.createElement(n), children: !t && m }),
|
|
28
|
+
/* @__PURE__ */ r(_, { children: g?.map(({ value: i, label: E }, I) => /* @__PURE__ */ r(j, { value: i, children: !t && E }, I)) })
|
|
29
|
+
] }, o) : a === "navDivider" ? /* @__PURE__ */ r(k, {}, o) : null;
|
|
30
30
|
}),
|
|
31
|
-
e.footer && !t && (typeof e.footer == "string" ? /* @__PURE__ */ r("span", { children: e.footer }) :
|
|
32
|
-
] }, c));
|
|
31
|
+
e.footer && !t && (typeof e.footer == "string" ? /* @__PURE__ */ r("span", { children: e.footer }) : v.createElement(e.footer))
|
|
32
|
+
] }, e.title || `section-${c}`));
|
|
33
33
|
export {
|
|
34
34
|
G as MainNavItems
|
|
35
35
|
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { EFWTableProps } from './EFWTable.types';
|
|
2
2
|
import { EFWFormFieldProps } from '../../forms/EFWForm';
|
|
3
3
|
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const COLS_MIN_WIDTH = 80;
|
|
4
|
+
export declare const COLS_MIN_WIDTH = 120;
|
|
6
5
|
export declare const COLS_MAX_WIDTH = 2500;
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const SELECTOR_CELL_HEIGHT = 48;
|
|
9
|
-
export declare const EFWTable: <T extends readonly EFWFormFieldProps[] = EFWFormFieldProps[]>({ appearance, style, className, fields, items: itemsProp, defaultItems, 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, overlayState: overlayStateProp, defaultOverlayState, onOverlayStateChange, overlayCustomization, overlayHeight, }: EFWTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const EFWTable: <T extends readonly EFWFormFieldProps[] = EFWFormFieldProps[]>({ appearance, style, className, fields, localeText: localeTextOverrides, items: itemsProp, defaultItems, height, itemSize, dense, rowAnimationConfig, cellLineClamp, enableSelection, enableCommandBar, defaultSelectedItems, onSelectionChange, onRowClick, onRowDoubleClick, resizableColumns, columnConfig: columnConfigOptions, useVirtualization, autoSizeColumns, tableRef: externalTableRef, onItemsChange, onScroll, onScrollEnd, scrollEndThreshold, loadingMore, addButtonConfig, updateButtonConfig, deleteButtonConfig, filterButtonConfig, alwaysButtons, noSelectionButtons, singleSelectionButtons, multiSelectionButtons, beforeAddItems, beforeUpdateItems, beforeDeleteItems, defaultSorting, onSortChange, onFilterChange, columnRenderers, useDefaultRendererAsFallback, overlayState: overlayStateProp, defaultOverlayState, onOverlayStateChange, overlayCustomization, overlayHeight, }: EFWTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|