@envisiongroup/porygon 1.0.0-rc.9 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +388 -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,22 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { VirtualItem, Virtualizer } from '@tanstack/react-virtual';
|
|
4
|
-
import { EFWTableItem } from '../../EFWTable.types';
|
|
2
|
+
import { EFWTableRowProps } from './EFWTableRow.types';
|
|
5
3
|
|
|
6
|
-
interface EFWTableRowProps {
|
|
7
|
-
row: Row<EFWTableItem>;
|
|
8
|
-
virtualRow: VirtualItem | null;
|
|
9
|
-
rowVirtualizer: Virtualizer<HTMLDivElement, Element> | null;
|
|
10
|
-
useVirtualization: boolean;
|
|
11
|
-
enableSelection: boolean;
|
|
12
|
-
gridTemplateColumns: string;
|
|
13
|
-
columnSizing: Record<string, number>;
|
|
14
|
-
stickyColumnsInfo: {
|
|
15
|
-
stickyColumns: string[];
|
|
16
|
-
stickyPositions: Record<string, number>;
|
|
17
|
-
};
|
|
18
|
-
onRowClick: (row: Row<EFWTableItem>, event: React.MouseEvent) => void;
|
|
19
|
-
}
|
|
20
4
|
/**
|
|
21
5
|
* Componente EFWTableRow exportado directamente sin memoización.
|
|
22
6
|
* TanStack Table maneja internamente el estado de selección y los objetos row
|
|
@@ -24,4 +8,3 @@ interface EFWTableRowProps {
|
|
|
24
8
|
* lo que hace que React.memo no detecte los cambios correctamente.
|
|
25
9
|
*/
|
|
26
10
|
export declare const EFWTableRow: React.FC<EFWTableRowProps>;
|
|
27
|
-
export {};
|
|
@@ -1,60 +1,98 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import k from "react";
|
|
3
|
+
import { makeStyles as R, tokens as o, mergeClasses as h } from "@fluentui/react-components";
|
|
4
|
+
import { EFWTableCell as T } from "../EFWTableCell/EFWTableCell.js";
|
|
5
|
+
const I = 900, E = R({
|
|
6
|
+
tableRow: {
|
|
7
|
+
display: "grid",
|
|
8
|
+
backgroundColor: o.colorNeutralBackground1,
|
|
9
|
+
borderBottom: `0.5px solid ${o.colorNeutralStroke1}`,
|
|
10
|
+
"&:hover": {
|
|
11
|
+
backgroundColor: o.colorNeutralBackground1Hover
|
|
12
|
+
},
|
|
13
|
+
"&.selected": {
|
|
14
|
+
backgroundColor: o.colorNeutralBackground1Selected,
|
|
15
|
+
"&:hover": {
|
|
16
|
+
backgroundColor: o.colorNeutralBackground1Selected
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}), D = ({
|
|
5
21
|
row: r,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
stripeIndex: m,
|
|
23
|
+
dense: f = !0,
|
|
24
|
+
rowAnimationSignal: n,
|
|
25
|
+
virtualRow: c,
|
|
26
|
+
rowVirtualizer: l,
|
|
27
|
+
useVirtualization: t,
|
|
28
|
+
enableSelection: b,
|
|
29
|
+
gridTemplateColumns: g,
|
|
30
|
+
columnSizing: p,
|
|
31
|
+
stickyColumnsInfo: y,
|
|
32
|
+
onRowClick: w,
|
|
33
|
+
onRowDoubleClick: d
|
|
14
34
|
}) => {
|
|
15
|
-
const
|
|
16
|
-
|
|
35
|
+
const x = E(), a = k.useRef(null), C = r.getIsSelected(), B = m & 1 ? "odd" : "even", S = h(x.tableRow, "table-row", C && "selected"), s = n?.delay ?? 0, u = n?.token, N = k.useCallback((e) => {
|
|
36
|
+
e && t && l?.measureElement(e), a.current?.cancel(), a.current = null, !(!e || !u) && typeof e.animate == "function" && (typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches || (a.current = e.animate(
|
|
37
|
+
[
|
|
38
|
+
{
|
|
39
|
+
backgroundColor: o.colorNeutralBackground1,
|
|
40
|
+
boxShadow: "0 0 0 0 transparent"
|
|
41
|
+
//transform: 'scale(1)',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
backgroundColor: o.colorBrandBackground2,
|
|
45
|
+
boxShadow: `inset 0 0 0 2px ${o.colorBrandStroke1}`
|
|
46
|
+
//transform: 'scale(1.002)',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
backgroundColor: o.colorNeutralBackground1,
|
|
50
|
+
boxShadow: "0 0 0 0 transparent"
|
|
51
|
+
//transform: 'scale(1)',
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
{
|
|
55
|
+
delay: s,
|
|
56
|
+
duration: I,
|
|
57
|
+
easing: "ease-out"
|
|
58
|
+
}
|
|
59
|
+
)));
|
|
60
|
+
}, [s, u, l, t]);
|
|
61
|
+
return /* @__PURE__ */ i(
|
|
17
62
|
"div",
|
|
18
63
|
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
64
|
+
"data-row-index": r.index,
|
|
65
|
+
"data-row-parity": B,
|
|
66
|
+
ref: N,
|
|
67
|
+
...t && c ? {
|
|
68
|
+
"data-index": c.index
|
|
22
69
|
} : {},
|
|
23
|
-
className:
|
|
24
|
-
|
|
70
|
+
className: S,
|
|
71
|
+
role: "row",
|
|
72
|
+
tabIndex: 0,
|
|
73
|
+
onKeyDown: (e) => {
|
|
74
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
|
|
75
|
+
},
|
|
76
|
+
onClick: (e) => w(r, e),
|
|
77
|
+
onDoubleClick: d ? (e) => d(r, e) : void 0,
|
|
25
78
|
style: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
cursor: o ? "pointer" : "default",
|
|
29
|
-
borderBottom: `0.5px solid ${t.colorNeutralStroke1}`,
|
|
30
|
-
"--current-row-bg": l(r.getIsSelected())
|
|
79
|
+
gridTemplateColumns: g,
|
|
80
|
+
cursor: b ? "pointer" : "default"
|
|
31
81
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"--current-row-bg",
|
|
35
|
-
l(r.getIsSelected(), !0)
|
|
36
|
-
);
|
|
37
|
-
} : void 0,
|
|
38
|
-
onMouseLeave: o ? (e) => {
|
|
39
|
-
e.currentTarget.style.setProperty(
|
|
40
|
-
"--current-row-bg",
|
|
41
|
-
l(r.getIsSelected())
|
|
42
|
-
);
|
|
43
|
-
} : void 0,
|
|
44
|
-
children: r.getVisibleCells().map((e) => /* @__PURE__ */ s(
|
|
45
|
-
p,
|
|
82
|
+
children: r.getVisibleCells().map((e) => /* @__PURE__ */ i(
|
|
83
|
+
T,
|
|
46
84
|
{
|
|
47
85
|
cell: e,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
86
|
+
dense: f,
|
|
87
|
+
columnSizing: p,
|
|
88
|
+
stickyColumnsInfo: y,
|
|
89
|
+
useVirtualization: t
|
|
51
90
|
},
|
|
52
91
|
e.id
|
|
53
92
|
))
|
|
54
|
-
}
|
|
55
|
-
r.id
|
|
93
|
+
}
|
|
56
94
|
);
|
|
57
|
-
},
|
|
95
|
+
}, F = D;
|
|
58
96
|
export {
|
|
59
|
-
|
|
97
|
+
F as EFWTableRow
|
|
60
98
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Row } from '@tanstack/react-table';
|
|
3
|
+
import { VirtualItem, Virtualizer } from '@tanstack/react-virtual';
|
|
4
|
+
import { EFWTableItem, EFWTableRowAnimationSignal } from '../../EFWTable.types';
|
|
5
|
+
|
|
6
|
+
export interface EFWTableRowProps {
|
|
7
|
+
row: Row<EFWTableItem>;
|
|
8
|
+
stripeIndex: number;
|
|
9
|
+
dense?: boolean;
|
|
10
|
+
rowAnimationSignal?: EFWTableRowAnimationSignal;
|
|
11
|
+
virtualRow: VirtualItem | null;
|
|
12
|
+
rowVirtualizer: Virtualizer<HTMLDivElement, Element> | null;
|
|
13
|
+
useVirtualization: boolean;
|
|
14
|
+
enableSelection: boolean;
|
|
15
|
+
gridTemplateColumns: string;
|
|
16
|
+
columnSizing: Record<string, number>;
|
|
17
|
+
stickyColumnsInfo: {
|
|
18
|
+
stickyColumns: string[];
|
|
19
|
+
stickyPositions: Record<string, number>;
|
|
20
|
+
};
|
|
21
|
+
onRowClick: (row: Row<EFWTableItem>, event: React.MouseEvent) => void;
|
|
22
|
+
onRowDoubleClick?: (row: Row<EFWTableItem>, event: React.MouseEvent) => void;
|
|
23
|
+
}
|
package/dist/react-components/tables/EFWTable/hooks/useDefaultAddButton/useDefaultAddButton.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EFWFormFieldProps } from '../../../../forms/EFWForm';
|
|
2
2
|
import { EFWTableCommandBarButton, DefaultDrawerButtonProps } from '../../components/EFWTableCommandBar/EFWTableCommandBar.types';
|
|
3
|
+
import { EFWTableLocaleText } from '../../../../i18n';
|
|
3
4
|
|
|
4
|
-
export declare const useDefaultAddButton: <T extends readonly EFWFormFieldProps[] = EFWFormFieldProps[]>(addButtonConfig: DefaultDrawerButtonProps<T
|
|
5
|
+
export declare const useDefaultAddButton: <T extends readonly EFWFormFieldProps[] = EFWFormFieldProps[]>(addButtonConfig: DefaultDrawerButtonProps<T>, localeText: EFWTableLocaleText) => EFWTableCommandBarButton<T>;
|
package/dist/react-components/tables/EFWTable/hooks/useDefaultAddButton/useDefaultAddButton.js
CHANGED
|
@@ -1,74 +1,91 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Text as
|
|
3
|
-
import { Add20Regular as
|
|
4
|
-
import { getErrorMessage as
|
|
5
|
-
import { mergeButtonProps as
|
|
6
|
-
import { useFormController as
|
|
7
|
-
import { EFWForm as
|
|
8
|
-
const
|
|
9
|
-
const { formRef:
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Text as V } from "@fluentui/react-components";
|
|
3
|
+
import { Add20Regular as $ } from "@fluentui/react-icons";
|
|
4
|
+
import { getErrorMessage as c } from "../../../../commons/utils.js";
|
|
5
|
+
import { mergeButtonProps as q, generateFormProps as G } from "../../components/EFWTableCommandBar/EFWTableCommandBar.utils.js";
|
|
6
|
+
import { useFormController as H } from "../../../../forms/EFWForm/EFWForm.hooks.js";
|
|
7
|
+
import { EFWForm as J } from "../../../../forms/EFWForm/EFWForm.js";
|
|
8
|
+
const te = (p, u) => {
|
|
9
|
+
const e = u, { formRef: m, getValues: f, validateForm: g, setDisabled: t, addMessageBar: a, removeAllMessagesBar: b } = H(), w = q({
|
|
10
10
|
enabled: !0,
|
|
11
11
|
props: {
|
|
12
|
-
children:
|
|
12
|
+
children: e.addButtonLabel,
|
|
13
13
|
appearance: "primary",
|
|
14
|
-
icon: /* @__PURE__ */
|
|
14
|
+
icon: /* @__PURE__ */ n($, {}),
|
|
15
|
+
collapseLabel: "xs",
|
|
15
16
|
drawerConfig: {
|
|
16
|
-
title:
|
|
17
|
+
title: e.addDrawerTitle,
|
|
17
18
|
size: "small",
|
|
18
19
|
position: "end"
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
|
-
},
|
|
22
|
+
}, p), { enabled: C, props: T, form: x, insertPosition: y = "start" } = w, { children: s, appearance: B, icon: i, collapseLabel: D, drawerConfig: F, style: L, className: R } = T || {}, {
|
|
23
|
+
title: h,
|
|
24
|
+
size: E,
|
|
25
|
+
position: k,
|
|
26
|
+
modalType: v,
|
|
27
|
+
labels: A,
|
|
28
|
+
contentRenderDelay: P,
|
|
29
|
+
deferContentRendering: M
|
|
30
|
+
} = F || {};
|
|
22
31
|
return {
|
|
23
32
|
enabled: C,
|
|
24
33
|
kind: "EFWDrawerButton",
|
|
25
34
|
props: {
|
|
26
|
-
icon:
|
|
27
|
-
children:
|
|
28
|
-
appearance:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
modalType:
|
|
41
|
-
|
|
35
|
+
icon: i,
|
|
36
|
+
children: s,
|
|
37
|
+
appearance: B,
|
|
38
|
+
collapseLabel: D,
|
|
39
|
+
style: L,
|
|
40
|
+
className: R,
|
|
41
|
+
onClick: (K, z, W) => {
|
|
42
|
+
const { tableMethods: d } = W, _ = d.getFields(), S = /* @__PURE__ */ n(V, { children: e.addDrawerDescription }), j = G(_, x);
|
|
43
|
+
z({
|
|
44
|
+
size: E,
|
|
45
|
+
title: h,
|
|
46
|
+
position: k,
|
|
47
|
+
deferContentRendering: M ?? !0,
|
|
48
|
+
contentRenderDelay: P,
|
|
49
|
+
modalType: v,
|
|
50
|
+
labels: {
|
|
51
|
+
closeButtonAriaLabel: e.drawerCloseButtonAriaLabel,
|
|
52
|
+
loadingContentText: e.drawerLoadingContentText,
|
|
53
|
+
...A ?? {}
|
|
54
|
+
},
|
|
55
|
+
content: /* @__PURE__ */ n(J, { formRef: m, description: S, ...j }),
|
|
42
56
|
buttons: [
|
|
43
57
|
{
|
|
44
58
|
kind: "EFWButton",
|
|
45
59
|
props: {
|
|
46
|
-
icon:
|
|
47
|
-
children:
|
|
60
|
+
icon: i,
|
|
61
|
+
children: e.addActionText || s,
|
|
48
62
|
appearance: "primary",
|
|
49
63
|
autoLoading: !0,
|
|
50
|
-
loadingText:
|
|
64
|
+
labels: { loadingText: e.addLoadingText },
|
|
51
65
|
successConfig: {
|
|
52
|
-
text:
|
|
66
|
+
text: e.addSuccessText
|
|
53
67
|
},
|
|
54
|
-
onClick: async (
|
|
55
|
-
if (
|
|
56
|
-
const
|
|
57
|
-
|
|
68
|
+
onClick: async (I, o) => {
|
|
69
|
+
if (g()) {
|
|
70
|
+
const N = f(), l = t(!0);
|
|
71
|
+
b();
|
|
58
72
|
try {
|
|
59
|
-
const
|
|
60
|
-
|
|
73
|
+
const r = await d.addItem(
|
|
74
|
+
N,
|
|
75
|
+
{ position: y }
|
|
76
|
+
);
|
|
77
|
+
return r.failed?.length ? (t(!1, l), a({
|
|
61
78
|
id: "add-operation-error",
|
|
62
79
|
intent: "error",
|
|
63
|
-
title:
|
|
64
|
-
message:
|
|
80
|
+
title: `${e.addErrorTitle}:`,
|
|
81
|
+
message: c(r.failed[0].error)
|
|
65
82
|
}), { success: !1 }) : (setTimeout(o, 100), { success: !0 });
|
|
66
|
-
} catch (
|
|
67
|
-
return console.error(
|
|
83
|
+
} catch (r) {
|
|
84
|
+
return console.error(r), t(!1, l), a({
|
|
68
85
|
id: "delete-unexpected-error",
|
|
69
86
|
intent: "error",
|
|
70
|
-
title:
|
|
71
|
-
message:
|
|
87
|
+
title: e.addErrorTitle,
|
|
88
|
+
message: c(r)
|
|
72
89
|
}), { success: !1 };
|
|
73
90
|
}
|
|
74
91
|
} else
|
|
@@ -79,8 +96,8 @@ const Q = (c) => {
|
|
|
79
96
|
{
|
|
80
97
|
kind: "EFWButton",
|
|
81
98
|
props: {
|
|
82
|
-
children:
|
|
83
|
-
onClick: (
|
|
99
|
+
children: e.cancelButtonLabel,
|
|
100
|
+
onClick: (I, o) => {
|
|
84
101
|
o();
|
|
85
102
|
}
|
|
86
103
|
}
|
|
@@ -92,5 +109,5 @@ const Q = (c) => {
|
|
|
92
109
|
};
|
|
93
110
|
};
|
|
94
111
|
export {
|
|
95
|
-
|
|
112
|
+
te as useDefaultAddButton
|
|
96
113
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EFWFormFieldProps } from '../../../../forms/EFWForm';
|
|
2
2
|
import { EFWTableCommandBarButton, DefaultDrawerButtonProps } from '../../components/EFWTableCommandBar/EFWTableCommandBar.types';
|
|
3
|
+
import { EFWTableLocaleText } from '../../../../i18n';
|
|
3
4
|
|
|
4
|
-
export declare const useDefaultDeleteButton: <T extends readonly EFWFormFieldProps[] = EFWFormFieldProps[]>(deleteButtonConfig
|
|
5
|
+
export declare const useDefaultDeleteButton: <T extends readonly EFWFormFieldProps[] = EFWFormFieldProps[]>(deleteButtonConfig: DefaultDrawerButtonProps<T> | undefined, localeText: EFWTableLocaleText) => EFWTableCommandBarButton<T>;
|
package/dist/react-components/tables/EFWTable/hooks/useDefaultDeleteButton/useDefaultDeleteButton.js
CHANGED
|
@@ -1,78 +1,101 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Delete20Regular as
|
|
3
|
-
import { getErrorMessage as
|
|
4
|
-
import { mergeButtonProps as
|
|
5
|
-
import { useFormController as
|
|
6
|
-
import { EFWForm as
|
|
7
|
-
const
|
|
8
|
-
const { formRef:
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Delete20Regular as j } from "@fluentui/react-icons";
|
|
3
|
+
import { getErrorMessage as m } from "../../../../commons/utils.js";
|
|
4
|
+
import { mergeButtonProps as q } from "../../components/EFWTableCommandBar/EFWTableCommandBar.utils.js";
|
|
5
|
+
import { useFormController as N } from "../../../../forms/EFWForm/EFWForm.hooks.js";
|
|
6
|
+
import { EFWForm as V } from "../../../../forms/EFWForm/EFWForm.js";
|
|
7
|
+
const X = (g = {}, f) => {
|
|
8
|
+
const e = f, { formRef: w, addMessageBar: c, removeAllMessagesBar: C } = N(), h = q({
|
|
9
9
|
enabled: !0,
|
|
10
10
|
props: {
|
|
11
|
-
children:
|
|
12
|
-
icon: /* @__PURE__ */
|
|
11
|
+
children: e.deleteButtonLabel,
|
|
12
|
+
icon: /* @__PURE__ */ a(j, {}),
|
|
13
|
+
collapseLabel: "xs",
|
|
13
14
|
drawerConfig: {
|
|
14
|
-
title:
|
|
15
|
+
title: e.deleteDrawerTitle,
|
|
15
16
|
size: "small",
|
|
16
17
|
position: "end"
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
},
|
|
20
|
+
}, g), { enabled: b, props: y } = h, { children: u, appearance: T, icon: p, collapseLabel: x, drawerConfig: B, style: E, className: D } = y || {}, {
|
|
21
|
+
title: L,
|
|
22
|
+
size: R,
|
|
23
|
+
position: k,
|
|
24
|
+
modalType: M,
|
|
25
|
+
labels: A,
|
|
26
|
+
contentRenderDelay: F,
|
|
27
|
+
deferContentRendering: S
|
|
28
|
+
} = B || {};
|
|
20
29
|
return {
|
|
21
|
-
enabled:
|
|
30
|
+
enabled: b,
|
|
22
31
|
kind: "EFWDrawerButton",
|
|
23
32
|
props: {
|
|
24
|
-
icon:
|
|
25
|
-
children:
|
|
26
|
-
appearance:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
icon: p,
|
|
34
|
+
children: u,
|
|
35
|
+
appearance: T,
|
|
36
|
+
collapseLabel: x,
|
|
37
|
+
style: E,
|
|
38
|
+
className: D,
|
|
39
|
+
onClick: (G, z, W) => {
|
|
40
|
+
const { selectedRows: o, tableMethods: $ } = W, v = o.length > 1 ? e.deleteConfirmMultiple(o.length) : e.deleteConfirmSingle, P = o.length === 1 ? o[0].item : {}, _ = o.map((i) => i.index);
|
|
41
|
+
z({
|
|
42
|
+
size: R,
|
|
31
43
|
title: L,
|
|
32
|
-
position:
|
|
33
|
-
deferContentRendering: !0,
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
position: k,
|
|
45
|
+
deferContentRendering: S ?? !0,
|
|
46
|
+
contentRenderDelay: F,
|
|
47
|
+
modalType: M,
|
|
48
|
+
labels: {
|
|
49
|
+
closeButtonAriaLabel: e.drawerCloseButtonAriaLabel,
|
|
50
|
+
loadingContentText: e.drawerLoadingContentText,
|
|
51
|
+
...A ?? {}
|
|
52
|
+
},
|
|
53
|
+
content: /* @__PURE__ */ a(V, { defaultValues: P, formRef: w, description: v }),
|
|
36
54
|
buttons: [
|
|
37
55
|
{
|
|
38
56
|
kind: "EFWButton",
|
|
39
57
|
props: {
|
|
40
|
-
icon:
|
|
41
|
-
children:
|
|
58
|
+
icon: p,
|
|
59
|
+
children: e.deleteActionText || u,
|
|
42
60
|
appearance: "primary",
|
|
43
61
|
autoLoading: !0,
|
|
44
|
-
loadingText:
|
|
62
|
+
labels: { loadingText: e.deleteLoadingText },
|
|
45
63
|
successConfig: {
|
|
46
|
-
text:
|
|
64
|
+
text: e.deleteSuccessText
|
|
47
65
|
},
|
|
48
|
-
onClick: async (i,
|
|
49
|
-
|
|
66
|
+
onClick: async (i, d) => {
|
|
67
|
+
C();
|
|
50
68
|
try {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
69
|
+
const r = await $.deleteItems(_);
|
|
70
|
+
if (r.failed?.length) {
|
|
71
|
+
const s = r.failed.map((t) => {
|
|
72
|
+
const l = m(t.error);
|
|
73
|
+
return {
|
|
74
|
+
key: `delete-error-${t.index}-${l}`,
|
|
75
|
+
message: l
|
|
76
|
+
};
|
|
77
|
+
}), n = r.failed.length > 1;
|
|
55
78
|
return c({
|
|
56
79
|
id: "delete-operation-error",
|
|
57
80
|
intent: "error",
|
|
58
|
-
title:
|
|
59
|
-
message: /* @__PURE__ */
|
|
81
|
+
title: n ? `${e.deleteErrorTitleMultiple}:` : `${e.deleteErrorTitleSingle}:`,
|
|
82
|
+
message: /* @__PURE__ */ a("ul", { children: s.map((t) => /* @__PURE__ */ a("li", { children: t.message }, t.key)) })
|
|
60
83
|
}), { success: !1 };
|
|
61
84
|
}
|
|
62
|
-
return
|
|
85
|
+
return setTimeout(() => {
|
|
63
86
|
try {
|
|
64
|
-
const
|
|
65
|
-
l &&
|
|
87
|
+
const s = document.activeElement?.closest?.('[role="dialog"]'), n = Array.from(document.querySelectorAll("[data-efw-drawer-focus-sentinel]")), t = s ? n.filter((I) => !s.contains(I)) : n, l = t[t.length - 1] || n[n.length - 1];
|
|
88
|
+
l && l.focus();
|
|
66
89
|
} catch {
|
|
67
90
|
}
|
|
68
|
-
|
|
91
|
+
d();
|
|
69
92
|
}, 100), { success: !0 };
|
|
70
|
-
} catch (
|
|
71
|
-
return console.error("Error durante actualización:",
|
|
93
|
+
} catch (r) {
|
|
94
|
+
return console.error("Error durante actualización:", r), c({
|
|
72
95
|
id: "delete-unexpected-error",
|
|
73
96
|
intent: "error",
|
|
74
|
-
title:
|
|
75
|
-
message:
|
|
97
|
+
title: e.deleteErrorTitleSingle,
|
|
98
|
+
message: m(r)
|
|
76
99
|
}), { success: !1 };
|
|
77
100
|
}
|
|
78
101
|
}
|
|
@@ -81,9 +104,9 @@ const H = (p = {}) => {
|
|
|
81
104
|
{
|
|
82
105
|
kind: "EFWButton",
|
|
83
106
|
props: {
|
|
84
|
-
children:
|
|
85
|
-
onClick: (i,
|
|
86
|
-
|
|
107
|
+
children: e.cancelButtonLabel,
|
|
108
|
+
onClick: (i, d) => {
|
|
109
|
+
d();
|
|
87
110
|
}
|
|
88
111
|
}
|
|
89
112
|
}
|
|
@@ -94,5 +117,5 @@ const H = (p = {}) => {
|
|
|
94
117
|
};
|
|
95
118
|
};
|
|
96
119
|
export {
|
|
97
|
-
|
|
120
|
+
X as useDefaultDeleteButton
|
|
98
121
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EFWFormFieldProps } from '../../../../forms/EFWForm';
|
|
2
|
+
import { DefaultFilterButtonProps, EFWTableCommandBarButton } from '../../components/EFWTableCommandBar/EFWTableCommandBar.types';
|
|
3
|
+
import { EFWTableLocaleText } from '../../../../i18n';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Hook que crea un botón de filtro por defecto para EFWTable.
|
|
7
|
+
*
|
|
8
|
+
* - Siempre visible (agregar a `alwaysButtons` o usar `filterButtonConfig` en EFWTable)
|
|
9
|
+
* - Abre un drawer con EFWForm que contiene solo los campos con `filterable: true`
|
|
10
|
+
* - Aplica filtros en tiempo real (live filtering) a medida que el usuario ingresa valores
|
|
11
|
+
* - Choice/MultiChoice en un mismo campo aplican OR (A o B)
|
|
12
|
+
* - Distintos campos aplican AND (TanStack)
|
|
13
|
+
* - El ícono cambia cuando hay filtros activos
|
|
14
|
+
* - Incluye botón "Limpiar filtros" para quitar todos los filtros
|
|
15
|
+
* - Los campos Boolean se renderizan como Choice con opciones Sí/No (sin selección = sin filtro)
|
|
16
|
+
*/
|
|
17
|
+
export declare const useDefaultFilterButton: <T extends readonly EFWFormFieldProps[] = EFWFormFieldProps[]>(filterButtonConfig: DefaultFilterButtonProps<T>, localeText: EFWTableLocaleText) => EFWTableCommandBarButton<T>;
|