@envisiongroup/porygon 1.0.0-rc.8 → 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,40 +1,65 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { flexRender as
|
|
3
|
-
import { COLS_MAX_WIDTH as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { flexRender as r } from "@tanstack/react-table";
|
|
3
|
+
import { COLS_MAX_WIDTH as h, COLS_MIN_WIDTH as f } from "../../EFWTable.js";
|
|
4
|
+
const C = [
|
|
5
|
+
"Text",
|
|
6
|
+
"Note",
|
|
7
|
+
"Choice",
|
|
8
|
+
"MultiChoice",
|
|
9
|
+
"Attachments"
|
|
10
|
+
], g = ({
|
|
5
11
|
cell: t,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
dense: e = !0,
|
|
13
|
+
columnSizing: a,
|
|
14
|
+
stickyColumnsInfo: o,
|
|
15
|
+
useVirtualization: S
|
|
9
16
|
// Mantenido para compatibilidad de API
|
|
10
17
|
}) => {
|
|
11
|
-
const i = t.column.id === "select",
|
|
12
|
-
|
|
18
|
+
const i = t.column.id === "select", n = o.stickyColumns.includes(
|
|
19
|
+
t.column.id
|
|
20
|
+
), s = o.stickyPositions[t.column.id] || 0, u = a[t.column.id] || t.column.getSize(), l = t.column.columnDef.meta?.typeAsString, c = t.column.columnDef.meta?.cellLineClamp, p = c != null && l != null && C.includes(l), d = t.column.columnDef.minSize || f, x = t.column.columnDef.maxSize || h;
|
|
21
|
+
return /* @__PURE__ */ m(
|
|
13
22
|
"div",
|
|
14
23
|
{
|
|
15
|
-
className: `table-cell
|
|
24
|
+
className: `table-cell${n || i ? " sticky-column" : ""}`,
|
|
25
|
+
"data-internalname": i ? void 0 : t.column.id,
|
|
26
|
+
"data-typeasstring": i ? void 0 : t.column.columnDef.meta?.typeAsString,
|
|
16
27
|
style: {
|
|
17
|
-
width: `${
|
|
18
|
-
minWidth: `${
|
|
19
|
-
maxWidth: `${
|
|
20
|
-
position:
|
|
21
|
-
left:
|
|
22
|
-
zIndex:
|
|
23
|
-
padding: i ? "0px" : "8px",
|
|
28
|
+
width: `${u}px`,
|
|
29
|
+
minWidth: `${d}px`,
|
|
30
|
+
maxWidth: `${x}px`,
|
|
31
|
+
position: n || i ? "sticky" : "static",
|
|
32
|
+
left: n || i ? `${s}px` : "auto",
|
|
33
|
+
zIndex: n ? 10 : 0,
|
|
34
|
+
padding: i ? "0px" : e ? "8px" : "12px",
|
|
24
35
|
whiteSpace: i ? "nowrap" : "pre-wrap",
|
|
25
36
|
wordWrap: i ? "normal" : "break-word",
|
|
26
37
|
verticalAlign: "top",
|
|
27
|
-
minHeight: "32px",
|
|
38
|
+
minHeight: e ? "32px" : "44px",
|
|
28
39
|
//minHeight: useVirtualization ? '32px' : 'auto',
|
|
29
40
|
overflow: "hidden",
|
|
30
41
|
textAlign: i ? "center" : "left",
|
|
31
|
-
backgroundColor:
|
|
42
|
+
//backgroundColor: 'var(--current-row-bg)',
|
|
43
|
+
backgroundColor: "inherit",
|
|
32
44
|
boxSizing: "border-box"
|
|
33
45
|
},
|
|
34
|
-
children:
|
|
46
|
+
children: p ? /* @__PURE__ */ m(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
className: "cell-line-clamp-wrapper",
|
|
50
|
+
style: {
|
|
51
|
+
display: "-webkit-box",
|
|
52
|
+
WebkitLineClamp: c,
|
|
53
|
+
WebkitBoxOrient: "vertical",
|
|
54
|
+
overflow: "hidden",
|
|
55
|
+
textOverflow: "ellipsis"
|
|
56
|
+
},
|
|
57
|
+
children: r(t.column.columnDef.cell, t.getContext())
|
|
58
|
+
}
|
|
59
|
+
) : r(t.column.columnDef.cell, t.getContext())
|
|
35
60
|
}
|
|
36
61
|
);
|
|
37
|
-
},
|
|
62
|
+
}, w = g;
|
|
38
63
|
export {
|
|
39
|
-
|
|
64
|
+
w as EFWTableCell
|
|
40
65
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Cell } from '@tanstack/react-table';
|
|
2
|
+
import { EFWTableItem } from '../../EFWTable.types';
|
|
3
|
+
|
|
4
|
+
export interface EFWTableCellProps {
|
|
5
|
+
cell: Cell<EFWTableItem, unknown>;
|
|
6
|
+
dense?: boolean;
|
|
7
|
+
columnSizing: Record<string, number>;
|
|
8
|
+
stickyColumnsInfo: {
|
|
9
|
+
stickyColumns: string[];
|
|
10
|
+
stickyPositions: Record<string, number>;
|
|
11
|
+
};
|
|
12
|
+
useVirtualization: boolean;
|
|
13
|
+
}
|
package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.d.ts
CHANGED
|
@@ -14,6 +14,6 @@ import { EFWFormFieldProps } from '../../../../forms/EFWForm';
|
|
|
14
14
|
* @param {EFWTableCommandBarProps} props - Propiedades del componente.
|
|
15
15
|
* @returns {JSX.Element|null} - El grupo de botones renderizados o null si no hay botones visibles.
|
|
16
16
|
*/
|
|
17
|
-
declare const EFWTableCommandBarInner: <T extends readonly EFWFormFieldProps[] = EFWFormFieldProps[]>({ alwaysButtons, noSelectionButtons, singleSelectionButtons, multiSelectionButtons, selectedRows, tableMethods, containerStyle, gap, className, }: EFWTableCommandBarProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare const EFWTableCommandBarInner: <T extends readonly EFWFormFieldProps[] = EFWFormFieldProps[]>({ alwaysButtons, noSelectionButtons, singleSelectionButtons, multiSelectionButtons, selectedRows, tableMethods, containerStyle, gap, className, localeText: localeTextOverrides, }: EFWTableCommandBarProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export declare const EFWTableCommandBar: typeof EFWTableCommandBarInner;
|
|
19
19
|
export {};
|
package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.js
CHANGED
|
@@ -1,96 +1,121 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import n, { useCallback as
|
|
3
|
-
import {
|
|
4
|
-
import { Dismiss20Regular as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { jsx as t, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import n, { useCallback as M } from "react";
|
|
3
|
+
import { makeStyles as I, tokens as j, CardHeader as D, Button as G } from "@fluentui/react-components";
|
|
4
|
+
import { Dismiss20Regular as H } from "@fluentui/react-icons";
|
|
5
|
+
import { useTableLocaleText as O } from "../../../../i18n/PorygonI18nProvider.js";
|
|
6
|
+
import { EFWGroupButton as $ } from "../../../../buttons/EFWGroupButton/EFWGroupButton.js";
|
|
7
|
+
const s = [], A = [], Y = I({
|
|
8
|
+
commandBar: {
|
|
9
|
+
padding: "4px 8px 3px",
|
|
10
|
+
borderBottom: `1px solid ${j.colorNeutralStroke1}`,
|
|
11
|
+
transition: "background-color 0.2s ease",
|
|
12
|
+
containerName: "commandBar",
|
|
13
|
+
containerType: "inline-size",
|
|
14
|
+
"& .fui-CardHeader__header": {
|
|
15
|
+
flexShrink: 0,
|
|
16
|
+
flexGrow: 0
|
|
17
|
+
},
|
|
18
|
+
"& .fui-CardHeader__action": {
|
|
19
|
+
flex: 1,
|
|
20
|
+
minWidth: 0
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
fullLabel: {
|
|
24
|
+
"@container commandBar (max-width: 640px)": {
|
|
25
|
+
display: "none"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
shortLabel: {
|
|
29
|
+
display: "none",
|
|
30
|
+
"@container commandBar (max-width: 640px)": {
|
|
31
|
+
display: "inline"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}), w = ({
|
|
35
|
+
alwaysButtons: d = s,
|
|
36
|
+
noSelectionButtons: p = s,
|
|
37
|
+
singleSelectionButtons: u = s,
|
|
38
|
+
multiSelectionButtons: f = s,
|
|
39
|
+
selectedRows: r = A,
|
|
40
|
+
tableMethods: i,
|
|
41
|
+
containerStyle: S,
|
|
42
|
+
gap: g,
|
|
43
|
+
className: E,
|
|
44
|
+
localeText: _
|
|
16
45
|
}) => {
|
|
17
|
-
const e = n.useMemo(() =>
|
|
18
|
-
(
|
|
19
|
-
const
|
|
20
|
-
...
|
|
21
|
-
...
|
|
22
|
-
style:
|
|
23
|
-
...
|
|
46
|
+
const c = Y(), m = O(_), e = n.useMemo(() => r.length, [r]), a = n.useCallback(
|
|
47
|
+
(L, B) => L.map((o, N) => {
|
|
48
|
+
const W = o.enabled === void 0 ? !0 : typeof o.enabled == "boolean" ? o.enabled : o.enabled(r, i), T = B.active && W, l = o.props || {}, v = T ? l.style : { ...l.style, display: "none" }, P = {
|
|
49
|
+
...l,
|
|
50
|
+
...l.id ? {} : { id: `${B.prefix}-${N}` },
|
|
51
|
+
style: v,
|
|
52
|
+
...T ? {} : {
|
|
24
53
|
"aria-hidden": !0,
|
|
25
|
-
tabIndex:
|
|
54
|
+
tabIndex: l.tabIndex ?? -1
|
|
26
55
|
}
|
|
27
56
|
};
|
|
28
57
|
return {
|
|
29
|
-
...
|
|
58
|
+
...o,
|
|
30
59
|
props: P
|
|
31
60
|
};
|
|
32
61
|
}),
|
|
33
|
-
[
|
|
34
|
-
),
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
() =>
|
|
38
|
-
[
|
|
39
|
-
), f = n.useMemo(
|
|
40
|
-
() => o(p, { active: e === 0, prefix: "no-selected-button" }),
|
|
41
|
-
[o, p, e]
|
|
42
|
-
), b = n.useMemo(
|
|
43
|
-
() => o(m, { active: e === 1, prefix: "one-selected-button" }),
|
|
44
|
-
[o, e, m]
|
|
45
|
-
), x = n.useMemo(
|
|
46
|
-
() => o(d, { active: e > 1, prefix: "many-selected-button" }),
|
|
47
|
-
[o, d, e]
|
|
62
|
+
[r, i]
|
|
63
|
+
), k = M(() => {
|
|
64
|
+
i.deselectAllRows();
|
|
65
|
+
}, [i]), x = n.useMemo(
|
|
66
|
+
() => a(d, { active: !0, prefix: "always-button" }),
|
|
67
|
+
[d, a]
|
|
48
68
|
), y = n.useMemo(
|
|
69
|
+
() => a(p, { active: e === 0, prefix: "no-selected-button" }),
|
|
70
|
+
[a, p, e]
|
|
71
|
+
), b = n.useMemo(
|
|
72
|
+
() => a(u, { active: e === 1, prefix: "one-selected-button" }),
|
|
73
|
+
[a, e, u]
|
|
74
|
+
), h = n.useMemo(
|
|
75
|
+
() => a(f, { active: e > 1, prefix: "many-selected-button" }),
|
|
76
|
+
[a, f, e]
|
|
77
|
+
), C = n.useMemo(
|
|
49
78
|
() => [
|
|
50
|
-
...
|
|
51
|
-
...
|
|
79
|
+
...x,
|
|
80
|
+
...y,
|
|
52
81
|
...b,
|
|
53
|
-
...
|
|
82
|
+
...h
|
|
54
83
|
],
|
|
55
|
-
[
|
|
84
|
+
[x, h, y, b]
|
|
56
85
|
);
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
|
|
86
|
+
return /* @__PURE__ */ t(
|
|
87
|
+
D,
|
|
59
88
|
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
transition: "background-color 0.2s ease"
|
|
64
|
-
},
|
|
65
|
-
header: e > 0 ? /* @__PURE__ */ S(
|
|
66
|
-
_,
|
|
89
|
+
className: c.commandBar,
|
|
90
|
+
header: e > 0 ? /* @__PURE__ */ F(
|
|
91
|
+
G,
|
|
67
92
|
{
|
|
93
|
+
style: { minWidth: "auto", paddingLeft: 7, paddingRight: 7 },
|
|
68
94
|
appearance: "subtle",
|
|
69
|
-
icon: /* @__PURE__ */
|
|
70
|
-
onClick:
|
|
71
|
-
title:
|
|
95
|
+
icon: /* @__PURE__ */ t(H, {}),
|
|
96
|
+
onClick: k,
|
|
97
|
+
title: m.commandBarClearSelectionTitle,
|
|
72
98
|
iconPosition: "after",
|
|
73
99
|
children: [
|
|
74
|
-
|
|
75
|
-
e
|
|
76
|
-
")"
|
|
100
|
+
/* @__PURE__ */ t("span", { className: c.fullLabel, children: m.commandBarSelectedCountLabel(e) }),
|
|
101
|
+
/* @__PURE__ */ t("span", { className: c.shortLabel, children: m.commandBarSelectedCountShortLabel(e) })
|
|
77
102
|
]
|
|
78
103
|
}
|
|
79
|
-
) : /* @__PURE__ */
|
|
80
|
-
action:
|
|
81
|
-
|
|
104
|
+
) : /* @__PURE__ */ t("div", { style: { height: 32 } }),
|
|
105
|
+
action: C.length > 0 ? /* @__PURE__ */ t(
|
|
106
|
+
$,
|
|
82
107
|
{
|
|
83
|
-
buttons:
|
|
84
|
-
onClickParams: { selectedRows:
|
|
85
|
-
style:
|
|
86
|
-
gap:
|
|
87
|
-
className:
|
|
108
|
+
buttons: C,
|
|
109
|
+
onClickParams: { selectedRows: r, tableMethods: i },
|
|
110
|
+
style: { justifyContent: "flex-end", ...S },
|
|
111
|
+
gap: g,
|
|
112
|
+
className: E
|
|
88
113
|
}
|
|
89
114
|
) : null
|
|
90
115
|
}
|
|
91
116
|
);
|
|
92
|
-
},
|
|
93
|
-
|
|
117
|
+
}, z = n.memo(w);
|
|
118
|
+
z.displayName = "EFWTableCommandBar";
|
|
94
119
|
export {
|
|
95
|
-
|
|
120
|
+
z as EFWTableCommandBar
|
|
96
121
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { EFWTableItem, EFWTableMethods, EFWTableRow } from '../../EFWTable.types';
|
|
1
|
+
import { EFWTableItem, EFWTableInsertPosition, EFWTableMethods, EFWTableRow } from '../../EFWTable.types';
|
|
2
2
|
import { EFWGroupButtonConfig } from '../../../../buttons/EFWGroupButton';
|
|
3
3
|
import { EFWFormFieldProps, EFWFormProps } from '../../../../forms/EFWForm';
|
|
4
4
|
import { EFWDrawerButtonProps } from '../../../../buttons/EFWDrawerButton';
|
|
5
|
+
import { EFWTableLocaleText } from '../../../../i18n';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Interfaz que define los parámetros pasados al manejador de eventos onClick del CommandBar.
|
|
@@ -22,24 +23,9 @@ export interface CommandBarOnClickParams<T extends readonly EFWFormFieldProps[]
|
|
|
22
23
|
*/
|
|
23
24
|
tableMethods: EFWTableMethods<T>;
|
|
24
25
|
}
|
|
25
|
-
export interface CommandBarOnClickParams<T extends readonly EFWFormFieldProps[] = EFWFormFieldProps[]> {
|
|
26
|
-
/**
|
|
27
|
-
* Un arreglo de filas seleccionadas de la tabla.
|
|
28
|
-
*
|
|
29
|
-
* @type {EFWTableRow[]}
|
|
30
|
-
*/
|
|
31
|
-
selectedRows: EFWTableRow<EFWTableItem<T>>[];
|
|
32
|
-
/**
|
|
33
|
-
* Métodos disponibles para interactuar con la tabla.
|
|
34
|
-
*
|
|
35
|
-
* @type {EFWTableMethods}
|
|
36
|
-
*/
|
|
37
|
-
tableMethods: EFWTableMethods<T>;
|
|
38
|
-
}
|
|
39
26
|
export type EFWTableCommandBarButton<T extends readonly EFWFormFieldProps[] = EFWFormFieldProps[]> = EFWGroupButtonConfig<CommandBarOnClickParams<T>> & {
|
|
40
27
|
enabled?: boolean | ((selectedRows: EFWTableRow<EFWTableItem<T>>[], tableMethods: EFWTableMethods<T>) => boolean);
|
|
41
28
|
};
|
|
42
|
-
export type EFWTableCommandBarButtonsFn<T extends readonly EFWFormFieldProps[] = EFWFormFieldProps[]> = (selectedRows: EFWTableRow<EFWTableItem<T>>[], tableMethods: EFWTableMethods<T>) => EFWTableCommandBarButton<T>[];
|
|
43
29
|
/**
|
|
44
30
|
* Propiedades del componente EFWTableCommandBar.
|
|
45
31
|
*
|
|
@@ -82,9 +68,12 @@ export interface EFWTableCommandBarProps<T extends readonly EFWFormFieldProps[]
|
|
|
82
68
|
gap?: string | number;
|
|
83
69
|
/** Clase CSS opcional para el contenedor. */
|
|
84
70
|
className?: string;
|
|
71
|
+
/** Textos localizados para labels internos del command bar. */
|
|
72
|
+
localeText?: Partial<EFWTableLocaleText>;
|
|
85
73
|
}
|
|
86
74
|
export type DefaultDrawerButtonProps<T extends readonly EFWFormFieldProps[] = EFWFormFieldProps[]> = {
|
|
87
75
|
enabled?: boolean | ((selectedRows: EFWTableRow<EFWTableItem<T>>[], tableMethods: EFWTableMethods<T>) => boolean);
|
|
76
|
+
insertPosition?: EFWTableInsertPosition;
|
|
88
77
|
form?: Omit<EFWFormProps<T>, 'formRef'> & {
|
|
89
78
|
fields?: T;
|
|
90
79
|
};
|
|
@@ -92,3 +81,5 @@ export type DefaultDrawerButtonProps<T extends readonly EFWFormFieldProps[] = EF
|
|
|
92
81
|
drawerConfig?: Omit<EFWDrawerButtonProps['drawerConfig'], 'buttons'>;
|
|
93
82
|
};
|
|
94
83
|
};
|
|
84
|
+
/** Configuración del botón de filtro. Igual que DefaultDrawerButtonProps sin `insertPosition`. */
|
|
85
|
+
export type DefaultFilterButtonProps<T extends readonly EFWFormFieldProps[] = EFWFormFieldProps[]> = Omit<DefaultDrawerButtonProps<T>, 'insertPosition'>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { EFWTableCommandBar } from './EFWTableCommandBar';
|
|
2
|
-
export type { EFWTableCommandBarProps } from './EFWTableCommandBar.types';
|
|
2
|
+
export type { EFWTableCommandBarProps, EFWTableCommandBarButton, DefaultFilterButtonProps } from './EFWTableCommandBar.types';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { EFWTableHeaderProps } from './EFWTableHeader.types';
|
|
2
2
|
|
|
3
|
-
export declare const EFWTableHeader: ({ table, gridTemplateColumns, columnSizing, stickyColumnsInfo, resizableColumns }: EFWTableHeaderProps) => React.ReactElement;
|
|
3
|
+
export declare const EFWTableHeader: ({ table, gridTemplateColumns, columnSizing, dense, stickyColumnsInfo, resizableColumns, localeText, }: EFWTableHeaderProps) => React.ReactElement;
|