@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,87 +1,222 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { flexRender as
|
|
3
|
-
import { tokens as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { flexRender as L } from "@tanstack/react-table";
|
|
3
|
+
import { makeStyles as D, tokens as t, mergeClasses as p } from "@fluentui/react-components";
|
|
4
|
+
import { Filter16Filled as b, ArrowSortUpLines16Filled as F, ArrowSortDownLines16Filled as R, ArrowSort16Regular as $ } from "@fluentui/react-icons";
|
|
5
|
+
import { COLS_MAX_WIDTH as O, COLS_MIN_WIDTH as _ } from "../../EFWTable.js";
|
|
6
|
+
const j = D({
|
|
7
|
+
separator: {
|
|
8
|
+
position: "absolute",
|
|
9
|
+
right: 0,
|
|
10
|
+
top: 0,
|
|
11
|
+
height: "100%",
|
|
12
|
+
width: "5px",
|
|
13
|
+
cursor: "col-resize",
|
|
14
|
+
userSelect: "none",
|
|
15
|
+
touchAction: "none",
|
|
16
|
+
backgroundColor: "transparent",
|
|
17
|
+
display: "flex",
|
|
18
|
+
flexDirection: "column",
|
|
19
|
+
justifyContent: "center",
|
|
20
|
+
alignItems: "flex-end",
|
|
21
|
+
maxWidth: "10px",
|
|
22
|
+
"& div": {
|
|
23
|
+
width: "1px",
|
|
24
|
+
height: "60%",
|
|
25
|
+
display: "inline-block",
|
|
26
|
+
flexShrink: 0,
|
|
27
|
+
transition: "width 240ms cubic-bezier(0.22, 1, 0.36, 1), background-color 240ms cubic-bezier(0.22, 1, 0.36, 1)",
|
|
28
|
+
backgroundColor: t.colorNeutralStroke1
|
|
22
29
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
);
|
|
81
|
-
})
|
|
82
|
-
)
|
|
30
|
+
"&:hover div, &:active div, &:focus-visible div": {
|
|
31
|
+
width: "3px",
|
|
32
|
+
backgroundColor: t.colorBrandBackground
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
sortButton: {
|
|
36
|
+
appearance: "none",
|
|
37
|
+
background: "none",
|
|
38
|
+
border: "none",
|
|
39
|
+
padding: "0",
|
|
40
|
+
margin: "0",
|
|
41
|
+
font: "inherit",
|
|
42
|
+
color: "inherit",
|
|
43
|
+
cursor: "pointer",
|
|
44
|
+
display: "flex",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
gap: "4px",
|
|
47
|
+
width: "100%",
|
|
48
|
+
userSelect: "none",
|
|
49
|
+
overflow: "hidden",
|
|
50
|
+
textAlign: "left",
|
|
51
|
+
":focus-visible": {
|
|
52
|
+
outline: `2px solid ${t.colorBrandBackground}`,
|
|
53
|
+
outlineOffset: "2px",
|
|
54
|
+
borderRadius: t.borderRadiusSmall
|
|
55
|
+
},
|
|
56
|
+
":hover [data-sort-icon]": {
|
|
57
|
+
display: "block"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
sortIcon: {
|
|
61
|
+
flexShrink: 0,
|
|
62
|
+
color: t.colorNeutralForeground3,
|
|
63
|
+
display: "none"
|
|
64
|
+
},
|
|
65
|
+
sortIconActive: {
|
|
66
|
+
flexShrink: 0,
|
|
67
|
+
color: t.colorBrandBackground
|
|
68
|
+
},
|
|
69
|
+
filterIconActive: {
|
|
70
|
+
flexShrink: 0,
|
|
71
|
+
color: t.colorBrandBackground
|
|
72
|
+
},
|
|
73
|
+
tableHeader: {
|
|
74
|
+
position: "sticky",
|
|
75
|
+
top: 0,
|
|
76
|
+
backgroundColor: t.colorNeutralBackground1,
|
|
77
|
+
zIndex: 40,
|
|
78
|
+
display: "grid"
|
|
79
|
+
},
|
|
80
|
+
tableCell: {
|
|
81
|
+
fontWeight: "bold",
|
|
82
|
+
backgroundColor: "inherit",
|
|
83
|
+
overflow: "hidden",
|
|
84
|
+
textOverflow: "ellipsis",
|
|
85
|
+
whiteSpace: "nowrap",
|
|
86
|
+
boxSizing: "border-box"
|
|
83
87
|
}
|
|
84
|
-
)
|
|
88
|
+
}), M = (a) => a ? {
|
|
89
|
+
fontSize: t.fontSizeBase200,
|
|
90
|
+
lineHeight: t.lineHeightBase400
|
|
91
|
+
} : {
|
|
92
|
+
fontSize: t.fontSizeBase300,
|
|
93
|
+
lineHeight: t.lineHeightBase600
|
|
94
|
+
}, X = ({
|
|
95
|
+
table: a,
|
|
96
|
+
gridTemplateColumns: x,
|
|
97
|
+
columnSizing: f,
|
|
98
|
+
dense: u = !0,
|
|
99
|
+
stickyColumnsInfo: g,
|
|
100
|
+
resizableColumns: h,
|
|
101
|
+
localeText: s
|
|
102
|
+
}) => {
|
|
103
|
+
const S = M(u), i = j(), y = p(i.tableHeader, "table-header"), k = p(i.tableCell, "table-cell"), v = p(
|
|
104
|
+
i.separator,
|
|
105
|
+
"table-separator"
|
|
106
|
+
);
|
|
107
|
+
return /* @__PURE__ */ o(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
className: y,
|
|
111
|
+
style: {
|
|
112
|
+
gridTemplateColumns: x,
|
|
113
|
+
height: u ? "32px" : "44px"
|
|
114
|
+
},
|
|
115
|
+
children: a.getHeaderGroups().map(
|
|
116
|
+
(w) => w.headers.map((e) => {
|
|
117
|
+
const n = e.id === "select", r = g.stickyColumns.includes(
|
|
118
|
+
e.id
|
|
119
|
+
), C = g.stickyPositions[e.id] || 0, z = f[e.id] || e.getSize(), I = e.column.columnDef.minSize || _, B = e.column.columnDef.maxSize || O, A = !n && e.column.getCanSort(), l = e.column.getIsSorted(), m = !n && e.column.getIsFiltered(), H = e.column.getToggleSortingHandler(), N = l === "asc" ? s.sortStateAscLabel : l === "desc" ? s.sortStateDescLabel : s.sortStateNoneLabel, c = L(
|
|
120
|
+
e.column.columnDef.header,
|
|
121
|
+
e.getContext()
|
|
122
|
+
), W = A ? /* @__PURE__ */ d(
|
|
123
|
+
"button",
|
|
124
|
+
{
|
|
125
|
+
type: "button",
|
|
126
|
+
className: i.sortButton,
|
|
127
|
+
onClick: H,
|
|
128
|
+
title: N,
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ o(
|
|
131
|
+
"span",
|
|
132
|
+
{
|
|
133
|
+
style: {
|
|
134
|
+
overflow: "hidden",
|
|
135
|
+
textOverflow: "ellipsis",
|
|
136
|
+
whiteSpace: "nowrap"
|
|
137
|
+
},
|
|
138
|
+
children: c
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
m && /* @__PURE__ */ o(b, { className: i.filterIconActive }),
|
|
142
|
+
l === "asc" && /* @__PURE__ */ o(F, { className: i.sortIconActive }),
|
|
143
|
+
l === "desc" && /* @__PURE__ */ o(R, { className: i.sortIconActive }),
|
|
144
|
+
!l && /* @__PURE__ */ o(
|
|
145
|
+
$,
|
|
146
|
+
{
|
|
147
|
+
className: i.sortIcon,
|
|
148
|
+
"data-sort-icon": !0
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
) : m ? /* @__PURE__ */ d(
|
|
154
|
+
"span",
|
|
155
|
+
{
|
|
156
|
+
style: {
|
|
157
|
+
display: "flex",
|
|
158
|
+
alignItems: "center",
|
|
159
|
+
gap: "4px",
|
|
160
|
+
minWidth: 0
|
|
161
|
+
},
|
|
162
|
+
children: [
|
|
163
|
+
/* @__PURE__ */ o(
|
|
164
|
+
"span",
|
|
165
|
+
{
|
|
166
|
+
style: {
|
|
167
|
+
overflow: "hidden",
|
|
168
|
+
textOverflow: "ellipsis",
|
|
169
|
+
whiteSpace: "nowrap"
|
|
170
|
+
},
|
|
171
|
+
children: c
|
|
172
|
+
}
|
|
173
|
+
),
|
|
174
|
+
/* @__PURE__ */ o(b, { className: i.filterIconActive })
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
) : c;
|
|
178
|
+
return /* @__PURE__ */ d(
|
|
179
|
+
"div",
|
|
180
|
+
{
|
|
181
|
+
className: `${k}${r || n ? " sticky-column" : ""}`,
|
|
182
|
+
style: {
|
|
183
|
+
width: `${z}px`,
|
|
184
|
+
minWidth: `${I}px`,
|
|
185
|
+
maxWidth: `${B}px`,
|
|
186
|
+
position: r || n ? "sticky" : "relative",
|
|
187
|
+
left: r || n ? `${C}px` : "auto",
|
|
188
|
+
zIndex: r || n ? 50 : 1,
|
|
189
|
+
padding: n ? "0px" : "4px 8px",
|
|
190
|
+
textAlign: n ? "center" : "left",
|
|
191
|
+
...S
|
|
192
|
+
},
|
|
193
|
+
children: [
|
|
194
|
+
W,
|
|
195
|
+
h && e.column.getCanResize() && !n && /* @__PURE__ */ o(
|
|
196
|
+
"div",
|
|
197
|
+
{
|
|
198
|
+
role: "separator",
|
|
199
|
+
"aria-orientation": "vertical",
|
|
200
|
+
"aria-label": s.resizeColumnAriaLabel,
|
|
201
|
+
tabIndex: 0,
|
|
202
|
+
className: v,
|
|
203
|
+
onMouseDown: e.getResizeHandler(),
|
|
204
|
+
onTouchStart: e.getResizeHandler(),
|
|
205
|
+
style: {
|
|
206
|
+
zIndex: r ? 40 : 10
|
|
207
|
+
},
|
|
208
|
+
children: /* @__PURE__ */ o("div", {})
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
e.id
|
|
214
|
+
);
|
|
215
|
+
})
|
|
216
|
+
)
|
|
217
|
+
}
|
|
218
|
+
);
|
|
219
|
+
};
|
|
85
220
|
export {
|
|
86
|
-
|
|
221
|
+
X as EFWTableHeader
|
|
87
222
|
};
|
package/dist/react-components/tables/EFWTable/components/EFWTableHeader/EFWTableHeader.types.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
2
|
import { EFWTableItem } from '../../EFWTable.types';
|
|
3
|
+
import { EFWTableLocaleText } from '../../../../i18n';
|
|
3
4
|
|
|
4
5
|
export interface EFWTableHeaderProps {
|
|
5
6
|
table: Table<EFWTableItem>;
|
|
6
7
|
gridTemplateColumns: string;
|
|
7
8
|
columnSizing: Record<string, number>;
|
|
9
|
+
dense: boolean;
|
|
8
10
|
stickyColumnsInfo: {
|
|
9
11
|
stickyColumns: string[];
|
|
10
12
|
stickyPositions: Record<string, number>;
|
|
11
13
|
};
|
|
12
14
|
resizableColumns: boolean;
|
|
15
|
+
localeText: EFWTableLocaleText;
|
|
13
16
|
}
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
import { jsx as e, Fragment as
|
|
2
|
-
import { makeStyles as
|
|
3
|
-
import { ErrorCircle24Regular as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
title: "Sin datos disponibles",
|
|
7
|
-
description: "Los datos aparecerán aquí una vez se agreguen registros"
|
|
8
|
-
},
|
|
9
|
-
loading: {
|
|
10
|
-
title: "Cargando datos...",
|
|
11
|
-
description: "Por favor espere mientras se cargan los datos"
|
|
12
|
-
},
|
|
13
|
-
error: {
|
|
14
|
-
title: "Error al cargar datos",
|
|
15
|
-
description: "Ha ocurrido un error al cargar los datos",
|
|
16
|
-
retryButtonText: "Reintentar"
|
|
17
|
-
}
|
|
18
|
-
}, R = B({
|
|
1
|
+
import { jsx as e, Fragment as E, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { makeStyles as j, tokens as n, mergeClasses as l, Card as L, CardPreview as A, Image as D, CardHeader as F, Body1 as S, Body1Stronger as T, Spinner as b, Button as V } from "@fluentui/react-components";
|
|
3
|
+
import { ErrorCircle24Regular as k, ArrowClockwise20Regular as M } from "@fluentui/react-icons";
|
|
4
|
+
import { useTableLocaleText as R } from "../../../../i18n/PorygonI18nProvider.js";
|
|
5
|
+
const W = "https://res-1.public.onecdn.static.microsoft/files/sp-client/odsp-media-53ad6982/images/emptyfolder/empty_list_placeholder2.webp", O = j({
|
|
19
6
|
// Container principal
|
|
20
7
|
container: {
|
|
21
8
|
display: "flex",
|
|
@@ -29,7 +16,7 @@ const M = "https://res-1.public.onecdn.static.microsoft/files/sp-client/odsp-med
|
|
|
29
16
|
height: "fit-content"
|
|
30
17
|
},
|
|
31
18
|
caption: {
|
|
32
|
-
color:
|
|
19
|
+
color: n.colorNeutralForeground3,
|
|
33
20
|
width: "100%",
|
|
34
21
|
textAlign: "center"
|
|
35
22
|
},
|
|
@@ -39,35 +26,35 @@ const M = "https://res-1.public.onecdn.static.microsoft/files/sp-client/odsp-med
|
|
|
39
26
|
flexDirection: "column",
|
|
40
27
|
alignItems: "center",
|
|
41
28
|
justifyContent: "center",
|
|
42
|
-
gap:
|
|
43
|
-
padding:
|
|
29
|
+
gap: n.spacingVerticalM,
|
|
30
|
+
padding: n.spacingVerticalXXL,
|
|
44
31
|
"& div": {
|
|
45
32
|
display: "grid"
|
|
46
33
|
}
|
|
47
34
|
},
|
|
48
35
|
loadingText: {
|
|
49
|
-
color:
|
|
36
|
+
color: n.colorNeutralForeground2,
|
|
50
37
|
textAlign: "center"
|
|
51
38
|
},
|
|
52
39
|
// Error state
|
|
53
40
|
errorIcon: {
|
|
54
|
-
color:
|
|
41
|
+
color: n.colorStatusDangerForeground1,
|
|
55
42
|
fontSize: "48px",
|
|
56
|
-
marginBottom:
|
|
43
|
+
marginBottom: n.spacingVerticalS
|
|
57
44
|
},
|
|
58
45
|
errorContainer: {
|
|
59
46
|
display: "flex",
|
|
60
47
|
flexDirection: "column",
|
|
61
48
|
alignItems: "center",
|
|
62
49
|
justifyContent: "center",
|
|
63
|
-
gap:
|
|
64
|
-
padding:
|
|
50
|
+
gap: n.spacingVerticalS,
|
|
51
|
+
padding: n.spacingVerticalL,
|
|
65
52
|
"& div": {
|
|
66
53
|
display: "grid"
|
|
67
54
|
}
|
|
68
55
|
},
|
|
69
56
|
retryButton: {
|
|
70
|
-
marginTop:
|
|
57
|
+
marginTop: n.spacingVerticalM
|
|
71
58
|
},
|
|
72
59
|
// Partial loading overlay
|
|
73
60
|
partialLoadingWrapper: {
|
|
@@ -89,58 +76,73 @@ const M = "https://res-1.public.onecdn.static.microsoft/files/sp-client/odsp-med
|
|
|
89
76
|
}
|
|
90
77
|
}), U = (C) => {
|
|
91
78
|
const {
|
|
92
|
-
config:
|
|
79
|
+
config: i,
|
|
93
80
|
height: m,
|
|
94
81
|
customization: p = {},
|
|
82
|
+
localeText: N,
|
|
95
83
|
className: y,
|
|
96
84
|
style: u,
|
|
97
|
-
cardClassName:
|
|
98
|
-
cardStyle:
|
|
85
|
+
cardClassName: v,
|
|
86
|
+
cardStyle: x,
|
|
99
87
|
captionClassName: h,
|
|
100
|
-
children:
|
|
101
|
-
} = C, t = R()
|
|
102
|
-
|
|
88
|
+
children: f
|
|
89
|
+
} = C, t = O(), a = R(N), s = {
|
|
90
|
+
empty: {
|
|
91
|
+
title: a.overlayEmptyTitle,
|
|
92
|
+
description: a.overlayEmptyDescription
|
|
93
|
+
},
|
|
94
|
+
loading: {
|
|
95
|
+
title: a.overlayLoadingTitle,
|
|
96
|
+
description: a.overlayLoadingDescription
|
|
97
|
+
},
|
|
98
|
+
error: {
|
|
99
|
+
title: a.overlayErrorTitle,
|
|
100
|
+
description: a.overlayErrorDescription,
|
|
101
|
+
retryButtonText: a.overlayRetryButtonLabel
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
switch (i.state) {
|
|
103
105
|
case "none":
|
|
104
|
-
return
|
|
106
|
+
return f ? /* @__PURE__ */ e(E, { children: f }) : null;
|
|
105
107
|
case "empty":
|
|
106
|
-
return
|
|
108
|
+
return B();
|
|
107
109
|
case "loading":
|
|
108
110
|
return w();
|
|
109
111
|
case "error":
|
|
110
|
-
return
|
|
112
|
+
return I();
|
|
111
113
|
case "partial-loading":
|
|
112
114
|
return z();
|
|
113
115
|
default:
|
|
114
|
-
return
|
|
116
|
+
return f ? /* @__PURE__ */ e(E, { children: f }) : null;
|
|
115
117
|
}
|
|
116
|
-
function
|
|
117
|
-
const r = p.empty || {},
|
|
118
|
+
function B() {
|
|
119
|
+
const r = p.empty || {}, c = i.message || r.title || s.empty.title, o = i.description || r.description || s.empty.description, d = i.imageUrl || r.imageUrl || W;
|
|
118
120
|
return /* @__PURE__ */ e(
|
|
119
121
|
"div",
|
|
120
122
|
{
|
|
121
|
-
className:
|
|
123
|
+
className: l(t.container, y),
|
|
122
124
|
style: { height: m, ...u },
|
|
123
125
|
children: /* @__PURE__ */ g(
|
|
124
|
-
|
|
126
|
+
L,
|
|
125
127
|
{
|
|
126
|
-
className:
|
|
127
|
-
style:
|
|
128
|
+
className: l(t.card, v),
|
|
129
|
+
style: x,
|
|
128
130
|
appearance: "subtle",
|
|
129
131
|
children: [
|
|
130
|
-
/* @__PURE__ */ e(
|
|
131
|
-
|
|
132
|
+
/* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(
|
|
133
|
+
D,
|
|
132
134
|
{
|
|
133
135
|
style: { height: 80 },
|
|
134
|
-
src:
|
|
135
|
-
alt:
|
|
136
|
+
src: d,
|
|
137
|
+
alt: a.overlayEmptyImageAlt,
|
|
136
138
|
fit: "contain"
|
|
137
139
|
}
|
|
138
140
|
) }),
|
|
139
141
|
/* @__PURE__ */ e(
|
|
140
142
|
F,
|
|
141
143
|
{
|
|
142
|
-
header: /* @__PURE__ */ e(
|
|
143
|
-
description: /* @__PURE__ */ e(
|
|
144
|
+
header: /* @__PURE__ */ e(T, { align: "center", style: { width: "100%" }, children: c }),
|
|
145
|
+
description: /* @__PURE__ */ e(S, { align: "center", className: l(t.caption, h), children: o })
|
|
144
146
|
}
|
|
145
147
|
)
|
|
146
148
|
]
|
|
@@ -150,49 +152,49 @@ const M = "https://res-1.public.onecdn.static.microsoft/files/sp-client/odsp-med
|
|
|
150
152
|
);
|
|
151
153
|
}
|
|
152
154
|
function w() {
|
|
153
|
-
const r = p.loading || {},
|
|
155
|
+
const r = p.loading || {}, c = i.message || r.title || s.loading.title, o = i.description || r.description || s.loading.description, d = r.spinnerSize || "small";
|
|
154
156
|
return /* @__PURE__ */ e(
|
|
155
157
|
"div",
|
|
156
158
|
{
|
|
157
|
-
className:
|
|
159
|
+
className: l(t.container, y),
|
|
158
160
|
style: { height: m, ...u },
|
|
159
161
|
children: /* @__PURE__ */ g("div", { className: t.loadingContainer, children: [
|
|
160
|
-
/* @__PURE__ */ e(
|
|
162
|
+
/* @__PURE__ */ e(b, { size: d }),
|
|
161
163
|
/* @__PURE__ */ g("div", { children: [
|
|
162
|
-
/* @__PURE__ */ e(
|
|
163
|
-
/* @__PURE__ */ e(
|
|
164
|
+
/* @__PURE__ */ e(T, { className: t.loadingText, children: c }),
|
|
165
|
+
o && /* @__PURE__ */ e(S, { className: l(t.caption, h), children: o })
|
|
164
166
|
] })
|
|
165
167
|
] })
|
|
166
168
|
}
|
|
167
169
|
);
|
|
168
170
|
}
|
|
169
|
-
function
|
|
170
|
-
const r = p.error || {},
|
|
171
|
+
function I() {
|
|
172
|
+
const r = p.error || {}, c = i.message || r.title || s.error.title, o = i.description || r.description || s.error.description, d = i.retryButtonText || r.retryButtonText || s.error.retryButtonText;
|
|
171
173
|
return /* @__PURE__ */ e(
|
|
172
174
|
"div",
|
|
173
175
|
{
|
|
174
|
-
className:
|
|
176
|
+
className: l(t.container, y),
|
|
175
177
|
style: { height: m, ...u },
|
|
176
178
|
children: /* @__PURE__ */ e(
|
|
177
|
-
|
|
179
|
+
L,
|
|
178
180
|
{
|
|
179
|
-
className:
|
|
180
|
-
style:
|
|
181
|
+
className: l(t.card, v),
|
|
182
|
+
style: x,
|
|
181
183
|
appearance: "subtle",
|
|
182
184
|
children: /* @__PURE__ */ g("div", { className: t.errorContainer, children: [
|
|
183
|
-
/* @__PURE__ */ e(
|
|
185
|
+
/* @__PURE__ */ e(k, { className: t.errorIcon }),
|
|
184
186
|
/* @__PURE__ */ g("div", { children: [
|
|
185
|
-
/* @__PURE__ */ e(
|
|
186
|
-
/* @__PURE__ */ e(
|
|
187
|
+
/* @__PURE__ */ e(T, { align: "center", style: { width: "100%" }, children: c }),
|
|
188
|
+
/* @__PURE__ */ e(S, { align: "center", className: l(t.caption, h), children: o })
|
|
187
189
|
] }),
|
|
188
|
-
|
|
189
|
-
|
|
190
|
+
i.onRetry && /* @__PURE__ */ e(
|
|
191
|
+
V,
|
|
190
192
|
{
|
|
191
193
|
className: t.retryButton,
|
|
192
194
|
appearance: "primary",
|
|
193
|
-
icon: /* @__PURE__ */ e(
|
|
194
|
-
onClick:
|
|
195
|
-
children:
|
|
195
|
+
icon: /* @__PURE__ */ e(M, {}),
|
|
196
|
+
onClick: i.onRetry,
|
|
197
|
+
children: d
|
|
196
198
|
}
|
|
197
199
|
)
|
|
198
200
|
] })
|
|
@@ -202,52 +204,52 @@ const M = "https://res-1.public.onecdn.static.microsoft/files/sp-client/odsp-med
|
|
|
202
204
|
);
|
|
203
205
|
}
|
|
204
206
|
function z() {
|
|
205
|
-
const r = p.partialLoading || {},
|
|
207
|
+
const r = p.partialLoading || {}, c = r.opacity ?? 0.7, o = r.showSpinner ?? !0, d = r.spinnerSize || "small";
|
|
206
208
|
return /* @__PURE__ */ g("div", { className: t.partialLoadingWrapper, children: [
|
|
207
|
-
|
|
209
|
+
f,
|
|
208
210
|
/* @__PURE__ */ e(
|
|
209
211
|
"div",
|
|
210
212
|
{
|
|
211
213
|
className: t.partialLoadingOverlay,
|
|
212
214
|
style: {
|
|
213
|
-
backgroundColor: `rgba(255, 255, 255, ${
|
|
215
|
+
backgroundColor: `rgba(255, 255, 255, ${c})`
|
|
214
216
|
},
|
|
215
|
-
children:
|
|
217
|
+
children: o && /* @__PURE__ */ e(b, { size: d })
|
|
216
218
|
}
|
|
217
219
|
)
|
|
218
220
|
] });
|
|
219
221
|
}
|
|
220
|
-
},
|
|
222
|
+
}, H = (C) => {
|
|
221
223
|
const {
|
|
222
|
-
title:
|
|
224
|
+
title: i,
|
|
223
225
|
description: m,
|
|
224
226
|
imageUrl: p,
|
|
225
|
-
height:
|
|
226
|
-
className:
|
|
227
|
-
style:
|
|
228
|
-
cardClassName:
|
|
229
|
-
cardStyle:
|
|
230
|
-
captionClassName:
|
|
227
|
+
height: N,
|
|
228
|
+
className: y,
|
|
229
|
+
style: u,
|
|
230
|
+
cardClassName: v,
|
|
231
|
+
cardStyle: x,
|
|
232
|
+
captionClassName: h
|
|
231
233
|
} = C;
|
|
232
234
|
return /* @__PURE__ */ e(
|
|
233
235
|
U,
|
|
234
236
|
{
|
|
235
237
|
config: {
|
|
236
238
|
state: "empty",
|
|
237
|
-
message:
|
|
239
|
+
message: i,
|
|
238
240
|
description: m,
|
|
239
241
|
imageUrl: p
|
|
240
242
|
},
|
|
241
|
-
height:
|
|
242
|
-
className:
|
|
243
|
-
style:
|
|
244
|
-
cardClassName:
|
|
245
|
-
cardStyle:
|
|
246
|
-
captionClassName:
|
|
243
|
+
height: N,
|
|
244
|
+
className: y,
|
|
245
|
+
style: u,
|
|
246
|
+
cardClassName: v,
|
|
247
|
+
cardStyle: x,
|
|
248
|
+
captionClassName: h
|
|
247
249
|
}
|
|
248
250
|
);
|
|
249
251
|
};
|
|
250
252
|
export {
|
|
251
|
-
|
|
253
|
+
H as EFWTableEmpty,
|
|
252
254
|
U as EFWTableOverlay
|
|
253
255
|
};
|
package/dist/react-components/tables/EFWTable/components/EFWTableOverlay/EFWTableOverlay.types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { SpinnerProps } from '@fluentui/react-components';
|
|
3
|
+
import { EFWTableLocaleText } from '../../../../i18n';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Estados posibles del overlay de la tabla
|
|
@@ -66,6 +67,8 @@ export interface EFWTableOverlayConfig {
|
|
|
66
67
|
description?: string;
|
|
67
68
|
/** Callback para reintentar (solo para estado error) */
|
|
68
69
|
onRetry?: () => void;
|
|
70
|
+
/** Texto del botón de reintentar (solo para estado error) */
|
|
71
|
+
retryButtonText?: string;
|
|
69
72
|
/** URL de imagen personalizada (para empty/error) */
|
|
70
73
|
imageUrl?: string;
|
|
71
74
|
}
|
|
@@ -112,6 +115,8 @@ export interface EFWTableOverlayCustomization {
|
|
|
112
115
|
export interface EFWTableOverlayProps {
|
|
113
116
|
/** Configuración del estado actual */
|
|
114
117
|
config: EFWTableOverlayConfig;
|
|
118
|
+
/** Textos localizados para labels internos del overlay. */
|
|
119
|
+
localeText?: Partial<EFWTableLocaleText>;
|
|
115
120
|
/** Altura del contenedor */
|
|
116
121
|
height?: number | string;
|
|
117
122
|
/** Personalización por estado */
|