@leav/ui 0.3.6-7338b86 → 0.3.6-75eae8d
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/dist/__mocks__/common/attribute.d.ts +1 -0
- package/dist/__mocks__/common/attribute.js +8 -1
- package/dist/__mocks__/common/attribute.js.map +1 -1
- package/dist/__mocks__/common/form.d.ts +1 -0
- package/dist/__mocks__/common/form.js +18 -2
- package/dist/__mocks__/common/form.js.map +1 -1
- package/dist/__mocks__/common/value.js +2 -1
- package/dist/__mocks__/common/value.js.map +1 -1
- package/dist/_gqlTypes/index.d.ts +102 -4
- package/dist/_gqlTypes/index.js +83 -2
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/records/getRecordColumnsValues.d.ts +4 -2
- package/dist/_queries/records/getRecordColumnsValues.js +4 -1
- package/dist/_queries/records/getRecordColumnsValues.js.map +1 -1
- package/dist/_queries/records/recordFormAttributeFragment.js +1 -0
- package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
- package/dist/_utils/interleaveElement.d.ts +1 -0
- package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js → _utils/interleaveElement.js} +2 -6
- package/dist/_utils/interleaveElement.js.map +1 -0
- package/dist/components/CreateDirectory/CreateDirectory.js +1 -1
- package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
- package/dist/components/EditApplication/EditApplication.js +2 -2
- package/dist/components/EditApplication/EditApplication.js.map +1 -1
- package/dist/components/EditApplication/_types.d.ts +2 -2
- package/dist/components/Explorer/DataView.d.ts +8 -0
- package/dist/components/Explorer/DataView.js +33 -7
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +3 -3
- package/dist/components/Explorer/Explorer.js +42 -19
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/TableCell.d.ts +1 -1
- package/dist/components/Explorer/TableCell.js +116 -36
- package/dist/components/Explorer/TableCell.js.map +1 -1
- package/dist/components/Explorer/TableTagGroup.d.ts +1 -0
- package/dist/components/Explorer/TableTagGroup.js +9 -1
- package/dist/components/Explorer/TableTagGroup.js.map +1 -1
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +22 -4
- package/dist/components/Explorer/_queries/useExplorerData.js +88 -4
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +23 -1
- package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.d.ts +2 -0
- package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js +37 -0
- package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.d.ts +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js +11 -4
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +5 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +12 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +11 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +61 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +19 -52
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +76 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +9 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +33 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +37 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +89 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +23 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +10 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +75 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +44 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js +72 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +53 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +15 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +114 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/index.d.ts +4 -4
- package/dist/components/Explorer/manage-view-settings/index.js +3 -3
- package/dist/components/Explorer/manage-view-settings/index.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/{useOpenSettings.js → useOpenViewSettings.js} +5 -3
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.d.ts +1 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +5 -5
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +109 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.d.ts +10 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +32 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +2 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +9 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +111 -16
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +161 -24
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
- package/dist/components/Explorer/useDeactivateAction.js +3 -2
- package/dist/components/Explorer/useDeactivateAction.js.map +1 -1
- package/dist/components/Explorer/useEditAction.js +5 -3
- package/dist/components/Explorer/useEditAction.js.map +1 -1
- package/dist/components/Explorer/usePagination.d.ts +7 -0
- package/dist/components/Explorer/usePagination.js +25 -0
- package/dist/components/Explorer/usePagination.js.map +1 -0
- package/dist/components/Explorer/usePrimaryActions.d.ts +1 -9
- package/dist/components/Explorer/usePrimaryActions.js +4 -12
- package/dist/components/Explorer/usePrimaryActions.js.map +1 -1
- package/dist/components/Explorer/useSearchInput.d.ts +10 -0
- package/dist/components/Explorer/useSearchInput.js +31 -0
- package/dist/components/Explorer/useSearchInput.js.map +1 -0
- package/dist/components/Explorer/useTableScrollableHeight.d.ts +5 -0
- package/dist/components/Explorer/useTableScrollableHeight.js +15 -0
- package/dist/components/Explorer/useTableScrollableHeight.js.map +1 -0
- package/dist/components/Explorer/useViewSettingsReducer.d.ts +7 -0
- package/dist/components/Explorer/useViewSettingsReducer.js +60 -0
- package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -0
- package/dist/components/ExportModal/ExportModal.js +2 -2
- package/dist/components/ExportModal/ExportModal.js.map +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +5 -5
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +2 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +15 -2
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +5 -16
- package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +5 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +15 -8
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +3 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +2 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +2 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.d.ts +6 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +18 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +4 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +94 -294
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +8 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +28 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +26 -18
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +16 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +22 -19
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +44 -42
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +19 -19
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +13 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +25 -402
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/{MonoValueSelect.d.ts → DSListSelect.d.ts} +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/{MonoValueSelect.js → DSListSelect.js} +32 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +10 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.d.ts +42 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +55 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +12 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +37 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +4 -7
- package/dist/components/SelectTreeNode/SelectTreeNode.js +17 -135
- package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +16 -0
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +131 -0
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -0
- package/dist/components/SelectTreeNode/index.d.ts +1 -1
- package/dist/components/SelectTreeNode/index.js +1 -1
- package/dist/components/SelectTreeNode/index.js.map +1 -1
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.d.ts +4 -7
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js +10 -10
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +1 -1
- package/dist/components/SelectTreeNodeModal/index.d.ts +1 -2
- package/dist/components/SelectTreeNodeModal/index.js +1 -2
- package/dist/components/SelectTreeNodeModal/index.js.map +1 -1
- package/dist/components/UploadFiles/UploadFiles.js +1 -1
- package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
- package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js +2 -2
- package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js.map +1 -1
- package/dist/hooks/useDebouncedValue/index.d.ts +1 -0
- package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer → hooks/useDebouncedValue}/index.js +1 -2
- package/dist/hooks/useDebouncedValue/index.js.map +1 -0
- package/dist/locales/en/shared.json +34 -6
- package/dist/locales/fr/shared.json +34 -6
- package/package.json +5 -2
- package/dist/components/Explorer/manage-view-settings/_shared/useGetLibraryColumns.d.ts +0 -10
- package/dist/components/Explorer/manage-view-settings/_shared/useGetLibraryColumns.js +0 -24
- package/dist/components/Explorer/manage-view-settings/_shared/useGetLibraryColumns.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenSettings.d.ts +0 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenSettings.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +0 -138
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +0 -361
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +0 -7
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js +0 -7
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +0 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js +0 -19
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js +0 -32
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js +0 -51
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js +0 -26
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +0 -1
package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts
CHANGED
|
@@ -1,29 +1,59 @@
|
|
|
1
|
+
import { SortOrder } from '../../../../_gqlTypes';
|
|
2
|
+
import { IExplorerFilter } from '../../_types';
|
|
1
3
|
export type ViewType = 'table' | 'list' | 'timeline' | 'mosaic';
|
|
2
4
|
export declare const ViewSettingsActionTypes: {
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
5
|
+
readonly RESET: "RESET";
|
|
6
|
+
readonly ADD_ATTRIBUTE: "ADD_ATTRIBUTE";
|
|
7
|
+
readonly REMOVE_ATTRIBUTE: "REMOVE_ATTRIBUTE";
|
|
8
|
+
readonly MOVE_ATTRIBUTE: "MOVE_ATTRIBUTE";
|
|
9
|
+
readonly RESET_ATTRIBUTES: "RESET_ATTRIBUTES";
|
|
7
10
|
readonly CHANGE_VIEW_TYPE: "CHANGE_VIEW_TYPE";
|
|
11
|
+
readonly ADD_SORT: "ADD_SORT";
|
|
12
|
+
readonly REMOVE_SORT: "REMOVE_SORT";
|
|
13
|
+
readonly MOVE_SORT: "MOVE_SORT";
|
|
14
|
+
readonly CHANGE_SORT_ORDER: "CHANGE_SORT_ORDER";
|
|
15
|
+
readonly CHANGE_PAGE_SIZE: "CHANGE_PAGE_SIZE";
|
|
16
|
+
readonly CHANGE_FULLTEXT_SEARCH: "CHANGE_FULLTEXT_SEARCH";
|
|
17
|
+
readonly CLEAR_FULLTEXT_SEARCH: "CLEAR_FULLTEXT_SEARCH";
|
|
18
|
+
readonly ADD_FILTER: "ADD_FILTER";
|
|
19
|
+
readonly RESET_FILTER: "RESET_FILTER";
|
|
20
|
+
readonly REMOVE_FILTER: "REMOVE_FILTER";
|
|
21
|
+
readonly MOVE_FILTER: "MOVE_FILTER";
|
|
22
|
+
readonly CHANGE_FILTER_CONFIG: "CHANGE_FILTER_CONFIG";
|
|
8
23
|
};
|
|
9
24
|
export interface IViewSettingsState {
|
|
10
25
|
viewType: ViewType;
|
|
11
|
-
|
|
26
|
+
attributesIds: string[];
|
|
27
|
+
fulltextSearch: string;
|
|
28
|
+
sort: Array<{
|
|
29
|
+
attributeId: string;
|
|
30
|
+
order: SortOrder;
|
|
31
|
+
}>;
|
|
32
|
+
pageSize: number;
|
|
33
|
+
filters: IExplorerFilter[];
|
|
34
|
+
maxFilters: number;
|
|
35
|
+
canAddFilter: boolean;
|
|
12
36
|
}
|
|
13
|
-
interface
|
|
14
|
-
type: typeof ViewSettingsActionTypes.
|
|
37
|
+
interface IViewSettingsActionChangePageSize {
|
|
38
|
+
type: typeof ViewSettingsActionTypes.CHANGE_PAGE_SIZE;
|
|
15
39
|
payload: {
|
|
16
|
-
|
|
40
|
+
pageSize: number;
|
|
17
41
|
};
|
|
18
42
|
}
|
|
19
|
-
interface
|
|
20
|
-
type: typeof ViewSettingsActionTypes.
|
|
43
|
+
interface IViewSettingsActionAddAttribute {
|
|
44
|
+
type: typeof ViewSettingsActionTypes.ADD_ATTRIBUTE;
|
|
21
45
|
payload: {
|
|
22
|
-
|
|
46
|
+
attributeId: string;
|
|
23
47
|
};
|
|
24
48
|
}
|
|
25
|
-
interface
|
|
26
|
-
type: typeof ViewSettingsActionTypes.
|
|
49
|
+
interface IViewSettingsActionRemoveAttribute {
|
|
50
|
+
type: typeof ViewSettingsActionTypes.REMOVE_ATTRIBUTE;
|
|
51
|
+
payload: {
|
|
52
|
+
attributeId: string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
interface IViewSettingsActionMoveAttribute {
|
|
56
|
+
type: typeof ViewSettingsActionTypes.MOVE_ATTRIBUTE;
|
|
27
57
|
payload: {
|
|
28
58
|
indexFrom: number;
|
|
29
59
|
indexTo: number;
|
|
@@ -35,9 +65,74 @@ interface IViewSettingsActionChangeViewType {
|
|
|
35
65
|
viewType: ViewType;
|
|
36
66
|
};
|
|
37
67
|
}
|
|
38
|
-
interface
|
|
39
|
-
type: typeof ViewSettingsActionTypes.
|
|
68
|
+
interface IViewSettingsActionResetAttributes {
|
|
69
|
+
type: typeof ViewSettingsActionTypes.RESET_ATTRIBUTES;
|
|
70
|
+
}
|
|
71
|
+
interface IViewSettingsActionAddSort {
|
|
72
|
+
type: typeof ViewSettingsActionTypes.ADD_SORT;
|
|
73
|
+
payload: {
|
|
74
|
+
attributeId: string;
|
|
75
|
+
order: SortOrder;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
interface IViewSettingsActionRemoveSort {
|
|
79
|
+
type: typeof ViewSettingsActionTypes.REMOVE_SORT;
|
|
80
|
+
payload: {
|
|
81
|
+
attributeId: string;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
interface IViewSettingsActionChangeSortOrder {
|
|
85
|
+
type: typeof ViewSettingsActionTypes.CHANGE_SORT_ORDER;
|
|
86
|
+
payload: {
|
|
87
|
+
attributeId: string;
|
|
88
|
+
order: SortOrder;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
interface IViewSettingsActionMoveSort {
|
|
92
|
+
type: typeof ViewSettingsActionTypes.MOVE_SORT;
|
|
93
|
+
payload: {
|
|
94
|
+
indexFrom: number;
|
|
95
|
+
indexTo: number;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
interface IViewSettingsActionChangeFulltextSearch {
|
|
99
|
+
type: typeof ViewSettingsActionTypes.CHANGE_FULLTEXT_SEARCH;
|
|
100
|
+
payload: {
|
|
101
|
+
search: string;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
interface IViewSettingsActionClearFulltextSearch {
|
|
105
|
+
type: typeof ViewSettingsActionTypes.CLEAR_FULLTEXT_SEARCH;
|
|
106
|
+
}
|
|
107
|
+
interface IViewSettingsActionAddFilter {
|
|
108
|
+
type: typeof ViewSettingsActionTypes.ADD_FILTER;
|
|
109
|
+
payload: Omit<IExplorerFilter, 'id' | 'value' | 'condition'>;
|
|
110
|
+
}
|
|
111
|
+
interface IViewSettingsActionResetFilter {
|
|
112
|
+
type: typeof ViewSettingsActionTypes.RESET_FILTER;
|
|
113
|
+
payload: Pick<IExplorerFilter, 'id'>;
|
|
114
|
+
}
|
|
115
|
+
interface IViewSettingsActionRemoveFilter {
|
|
116
|
+
type: typeof ViewSettingsActionTypes.REMOVE_FILTER;
|
|
117
|
+
payload: Pick<IExplorerFilter, 'id'>;
|
|
118
|
+
}
|
|
119
|
+
interface IViewSettingsActionChangeFilterConfig {
|
|
120
|
+
type: typeof ViewSettingsActionTypes.CHANGE_FILTER_CONFIG;
|
|
121
|
+
payload: IExplorerFilter;
|
|
122
|
+
}
|
|
123
|
+
interface IViewSettingsActionMoveFilter {
|
|
124
|
+
type: typeof ViewSettingsActionTypes.MOVE_FILTER;
|
|
125
|
+
payload: {
|
|
126
|
+
indexFrom: number;
|
|
127
|
+
indexTo: number;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
interface IViewSettingsActionReset {
|
|
131
|
+
type: typeof ViewSettingsActionTypes.RESET;
|
|
132
|
+
payload: IViewSettingsState;
|
|
40
133
|
}
|
|
41
|
-
|
|
134
|
+
type Reducer<PAYLOAD = 'no_payload'> = PAYLOAD extends 'no_payload' ? (state: IViewSettingsState) => IViewSettingsState : (state: IViewSettingsState, payload: PAYLOAD) => IViewSettingsState;
|
|
135
|
+
export declare const clearFulltextSearch: Reducer;
|
|
136
|
+
export type IViewSettingsAction = IViewSettingsActionResetAttributes | IViewSettingsActionAddAttribute | IViewSettingsActionRemoveAttribute | IViewSettingsActionMoveAttribute | IViewSettingsActionChangeViewType | IViewSettingsActionAddSort | IViewSettingsActionRemoveSort | IViewSettingsActionChangeSortOrder | IViewSettingsActionMoveSort | IViewSettingsActionChangePageSize | IViewSettingsActionChangeFulltextSearch | IViewSettingsActionClearFulltextSearch | IViewSettingsActionAddFilter | IViewSettingsActionResetFilter | IViewSettingsActionRemoveFilter | IViewSettingsActionChangeFilterConfig | IViewSettingsActionMoveFilter | IViewSettingsActionReset;
|
|
42
137
|
export declare const viewSettingsReducer: (state: IViewSettingsState, action: IViewSettingsAction) => IViewSettingsState;
|
|
43
138
|
export {};
|
package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js
CHANGED
|
@@ -1,55 +1,192 @@
|
|
|
1
1
|
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
2
2
|
// This file is released under LGPL V3
|
|
3
3
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
|
+
import { RecordFilterCondition } from '../../../../_gqlTypes';
|
|
5
|
+
import { v4 as uuid } from 'uuid';
|
|
4
6
|
export const ViewSettingsActionTypes = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
RESET: 'RESET',
|
|
8
|
+
ADD_ATTRIBUTE: 'ADD_ATTRIBUTE',
|
|
9
|
+
REMOVE_ATTRIBUTE: 'REMOVE_ATTRIBUTE',
|
|
10
|
+
MOVE_ATTRIBUTE: 'MOVE_ATTRIBUTE',
|
|
11
|
+
RESET_ATTRIBUTES: 'RESET_ATTRIBUTES',
|
|
12
|
+
CHANGE_VIEW_TYPE: 'CHANGE_VIEW_TYPE',
|
|
13
|
+
ADD_SORT: 'ADD_SORT',
|
|
14
|
+
REMOVE_SORT: 'REMOVE_SORT',
|
|
15
|
+
MOVE_SORT: 'MOVE_SORT',
|
|
16
|
+
CHANGE_SORT_ORDER: 'CHANGE_SORT_ORDER',
|
|
17
|
+
CHANGE_PAGE_SIZE: 'CHANGE_PAGE_SIZE',
|
|
18
|
+
CHANGE_FULLTEXT_SEARCH: 'CHANGE_FULLTEXT_SEARCH',
|
|
19
|
+
CLEAR_FULLTEXT_SEARCH: 'CLEAR_FULLTEXT_SEARCH',
|
|
20
|
+
ADD_FILTER: 'ADD_FILTER',
|
|
21
|
+
RESET_FILTER: 'RESET_FILTER',
|
|
22
|
+
REMOVE_FILTER: 'REMOVE_FILTER',
|
|
23
|
+
MOVE_FILTER: 'MOVE_FILTER',
|
|
24
|
+
CHANGE_FILTER_CONFIG: 'CHANGE_FILTER_CONFIG'
|
|
10
25
|
};
|
|
11
|
-
const
|
|
26
|
+
const changePageSize = (state, payload) => ({
|
|
12
27
|
...state,
|
|
13
|
-
|
|
28
|
+
pageSize: payload.pageSize
|
|
14
29
|
});
|
|
15
|
-
const
|
|
30
|
+
const addAttribute = (state, payload) => ({
|
|
16
31
|
...state,
|
|
17
|
-
|
|
32
|
+
attributesIds: [...state.attributesIds, payload.attributeId]
|
|
18
33
|
});
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
34
|
+
const removeAttribute = (state, payload) => ({
|
|
35
|
+
...state,
|
|
36
|
+
attributesIds: state.attributesIds.filter(attributesId => attributesId !== payload.attributeId)
|
|
37
|
+
});
|
|
38
|
+
const moveAttribute = (state, payload) => {
|
|
39
|
+
const attributesIds = [...state.attributesIds];
|
|
40
|
+
const [attributeIdToMove] = attributesIds.splice(payload.indexFrom, 1);
|
|
41
|
+
// TODO use newES6 syntax (toSpliced)
|
|
42
|
+
attributesIds.splice(payload.indexTo, 0, attributeIdToMove);
|
|
23
43
|
return {
|
|
24
44
|
...state,
|
|
25
|
-
|
|
45
|
+
attributesIds
|
|
26
46
|
};
|
|
27
47
|
};
|
|
28
|
-
const
|
|
48
|
+
const resetAttributes = state => ({
|
|
29
49
|
...state,
|
|
30
|
-
|
|
50
|
+
attributesIds: []
|
|
31
51
|
});
|
|
32
52
|
const changeViewType = (state, payload) => ({
|
|
33
53
|
...state,
|
|
34
54
|
viewType: payload.viewType
|
|
35
55
|
});
|
|
56
|
+
const addSort = (state, payload) => ({
|
|
57
|
+
...state,
|
|
58
|
+
sort: [...state.sort, { attributeId: payload.attributeId, order: payload.order }]
|
|
59
|
+
});
|
|
60
|
+
const removeSort = (state, payload) => ({
|
|
61
|
+
...state,
|
|
62
|
+
sort: state.sort.filter(({ attributeId }) => attributeId !== payload.attributeId)
|
|
63
|
+
});
|
|
64
|
+
const changeSortOrder = (state, payload) => ({
|
|
65
|
+
...state,
|
|
66
|
+
sort: state.sort.map(sort => (sort.attributeId === payload.attributeId ? { ...sort, order: payload.order } : sort))
|
|
67
|
+
});
|
|
68
|
+
const moveSort = (state, payload) => {
|
|
69
|
+
const attributesUsedToSort = [...state.sort];
|
|
70
|
+
const [sortToMove] = attributesUsedToSort.splice(payload.indexFrom, 1);
|
|
71
|
+
attributesUsedToSort.splice(payload.indexTo, 0, sortToMove);
|
|
72
|
+
return {
|
|
73
|
+
...state,
|
|
74
|
+
sort: attributesUsedToSort
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
const changeFulltextSearch = (state, payload) => ({
|
|
78
|
+
...state,
|
|
79
|
+
fulltextSearch: payload.search
|
|
80
|
+
});
|
|
81
|
+
export const clearFulltextSearch = state => ({
|
|
82
|
+
...state,
|
|
83
|
+
fulltextSearch: ''
|
|
84
|
+
});
|
|
85
|
+
const addFilter = (state, payload) => {
|
|
86
|
+
if (!state.canAddFilter) {
|
|
87
|
+
return state;
|
|
88
|
+
}
|
|
89
|
+
const newFilters = [
|
|
90
|
+
...state.filters,
|
|
91
|
+
{ ...payload, id: uuid(), condition: RecordFilterCondition.EQUAL, value: null }
|
|
92
|
+
];
|
|
93
|
+
return {
|
|
94
|
+
...state,
|
|
95
|
+
filters: newFilters,
|
|
96
|
+
canAddFilter: newFilters.length < state.maxFilters
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
const resetFilter = (state, payload) => ({
|
|
100
|
+
...state,
|
|
101
|
+
filters: state.filters.map(filter => {
|
|
102
|
+
if (filter.id === payload.id) {
|
|
103
|
+
return {
|
|
104
|
+
...filter,
|
|
105
|
+
condition: RecordFilterCondition.EQUAL,
|
|
106
|
+
value: null
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
return filter;
|
|
110
|
+
})
|
|
111
|
+
});
|
|
112
|
+
const removeFilter = (state, payload) => {
|
|
113
|
+
const newFilters = state.filters.filter(({ id }) => id !== payload.id);
|
|
114
|
+
return {
|
|
115
|
+
...state,
|
|
116
|
+
filters: newFilters,
|
|
117
|
+
canAddFilter: newFilters.length < state.maxFilters
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
const changeFilterConfig = (state, payload) => ({
|
|
121
|
+
...state,
|
|
122
|
+
filters: state.filters.map(filter => (filter.id === payload.id ? { ...filter, ...payload } : filter))
|
|
123
|
+
});
|
|
124
|
+
const moveFilter = (state, payload) => {
|
|
125
|
+
const attributesUsedToFilter = [...state.filters];
|
|
126
|
+
const [filterToMove] = attributesUsedToFilter.splice(payload.indexFrom, 1);
|
|
127
|
+
attributesUsedToFilter.splice(payload.indexTo, 0, filterToMove);
|
|
128
|
+
return {
|
|
129
|
+
...state,
|
|
130
|
+
filters: attributesUsedToFilter
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
const reset = (_, payload) => payload;
|
|
36
134
|
export const viewSettingsReducer = (state, action) => {
|
|
37
135
|
switch (action.type) {
|
|
38
|
-
case ViewSettingsActionTypes.
|
|
39
|
-
return
|
|
136
|
+
case ViewSettingsActionTypes.CHANGE_PAGE_SIZE: {
|
|
137
|
+
return changePageSize(state, action.payload);
|
|
138
|
+
}
|
|
139
|
+
case ViewSettingsActionTypes.ADD_ATTRIBUTE: {
|
|
140
|
+
return addAttribute(state, action.payload);
|
|
40
141
|
}
|
|
41
|
-
case ViewSettingsActionTypes.
|
|
42
|
-
return
|
|
142
|
+
case ViewSettingsActionTypes.REMOVE_ATTRIBUTE: {
|
|
143
|
+
return removeAttribute(state, action.payload);
|
|
43
144
|
}
|
|
44
|
-
case ViewSettingsActionTypes.
|
|
45
|
-
return
|
|
145
|
+
case ViewSettingsActionTypes.MOVE_ATTRIBUTE: {
|
|
146
|
+
return moveAttribute(state, action.payload);
|
|
46
147
|
}
|
|
47
|
-
case ViewSettingsActionTypes.
|
|
48
|
-
return
|
|
148
|
+
case ViewSettingsActionTypes.RESET_ATTRIBUTES: {
|
|
149
|
+
return resetAttributes(state);
|
|
49
150
|
}
|
|
50
151
|
case ViewSettingsActionTypes.CHANGE_VIEW_TYPE: {
|
|
51
152
|
return changeViewType(state, action.payload);
|
|
52
153
|
}
|
|
154
|
+
case ViewSettingsActionTypes.ADD_SORT: {
|
|
155
|
+
return addSort(state, action.payload);
|
|
156
|
+
}
|
|
157
|
+
case ViewSettingsActionTypes.REMOVE_SORT: {
|
|
158
|
+
return removeSort(state, action.payload);
|
|
159
|
+
}
|
|
160
|
+
case ViewSettingsActionTypes.MOVE_SORT: {
|
|
161
|
+
return moveSort(state, action.payload);
|
|
162
|
+
}
|
|
163
|
+
case ViewSettingsActionTypes.CHANGE_SORT_ORDER: {
|
|
164
|
+
return changeSortOrder(state, action.payload);
|
|
165
|
+
}
|
|
166
|
+
case ViewSettingsActionTypes.CHANGE_FULLTEXT_SEARCH: {
|
|
167
|
+
return changeFulltextSearch(state, action.payload);
|
|
168
|
+
}
|
|
169
|
+
case ViewSettingsActionTypes.CLEAR_FULLTEXT_SEARCH: {
|
|
170
|
+
return clearFulltextSearch(state);
|
|
171
|
+
}
|
|
172
|
+
case ViewSettingsActionTypes.ADD_FILTER: {
|
|
173
|
+
return addFilter(state, action.payload);
|
|
174
|
+
}
|
|
175
|
+
case ViewSettingsActionTypes.RESET_FILTER: {
|
|
176
|
+
return resetFilter(state, action.payload);
|
|
177
|
+
}
|
|
178
|
+
case ViewSettingsActionTypes.REMOVE_FILTER: {
|
|
179
|
+
return removeFilter(state, action.payload);
|
|
180
|
+
}
|
|
181
|
+
case ViewSettingsActionTypes.CHANGE_FILTER_CONFIG: {
|
|
182
|
+
return changeFilterConfig(state, action.payload);
|
|
183
|
+
}
|
|
184
|
+
case ViewSettingsActionTypes.MOVE_FILTER: {
|
|
185
|
+
return moveFilter(state, action.payload);
|
|
186
|
+
}
|
|
187
|
+
case ViewSettingsActionTypes.RESET: {
|
|
188
|
+
return reset(state, action.payload);
|
|
189
|
+
}
|
|
53
190
|
default:
|
|
54
191
|
return state;
|
|
55
192
|
}
|
package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewSettingsReducer.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;
|
|
1
|
+
{"version":3,"file":"viewSettingsReducer.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAY,qBAAqB,EAAC,MAAM,eAAe,CAAC;AAE/D,OAAO,EAAC,EAAE,IAAI,IAAI,EAAC,MAAM,MAAM,CAAC;AAIhC,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACnC,KAAK,EAAE,OAAO;IACd,aAAa,EAAE,eAAe;IAC9B,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;IAChC,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;IACtB,iBAAiB,EAAE,mBAAmB;IACtC,gBAAgB,EAAE,kBAAkB;IACpC,sBAAsB,EAAE,wBAAwB;IAChD,qBAAqB,EAAE,uBAAuB;IAC9C,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,cAAc;IAC5B,aAAa,EAAE,eAAe;IAC9B,WAAW,EAAE,aAAa;IAC1B,oBAAoB,EAAE,sBAAsB;CACtC,CAAC;AAqHX,MAAM,cAAc,GAA0D,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IAC/F,GAAG,KAAK;IACR,QAAQ,EAAE,OAAO,CAAC,QAAQ;CAC7B,CAAC,CAAC;AAEH,MAAM,YAAY,GAAwD,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IAC3F,GAAG,KAAK;IACR,aAAa,EAAE,CAAC,GAAG,KAAK,CAAC,aAAa,EAAE,OAAO,CAAC,WAA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CAAC,CAAC;YACtC,OAAO,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC5C,CAAC;QACD,KAAK,uBAAuB,CAAC,YAAY,CAAC,CAAC,CAAC;YACxC,OAAO,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC9C,CAAC;QACD,KAAK,uBAAuB,CAAC,aAAa,CAAC,CAAC,CAAC;YACzC,OAAO,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC/C,CAAC;QACD,KAAK,uBAAuB,CAAC,oBAAoB,CAAC,CAAC,CAAC;YAChD,OAAO,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QACrD,CAAC;QACD,KAAK,uBAAuB,CAAC,WAAW,CAAC,CAAC,CAAC;YACvC,OAAO,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC;QACD,KAAK,uBAAuB,CAAC,KAAK,CAAC,CAAC,CAAC;YACjC,OAAO,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;QACD;YACI,OAAO,KAAK,CAAC;IACrB,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { FaTrash } from 'react-icons/fa';
|
|
|
6
6
|
import { KitModal } from 'aristid-ds';
|
|
7
7
|
import { useDeactivateRecordsMutation } from '../../_gqlTypes';
|
|
8
8
|
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
9
|
+
import { useMemo } from 'react';
|
|
9
10
|
/**
|
|
10
11
|
* Hook used to get the action for `<DataView />` component.
|
|
11
12
|
*
|
|
@@ -26,7 +27,7 @@ export const useDeactivateAction = ({ isEnabled }) => {
|
|
|
26
27
|
cache.gc();
|
|
27
28
|
}
|
|
28
29
|
});
|
|
29
|
-
const _deactivateAction = {
|
|
30
|
+
const _deactivateAction = useMemo(() => ({
|
|
30
31
|
label: t('explorer.deactivate-item'),
|
|
31
32
|
icon: _jsx(FaTrash, {}),
|
|
32
33
|
isDanger: true,
|
|
@@ -43,7 +44,7 @@ export const useDeactivateAction = ({ isEnabled }) => {
|
|
|
43
44
|
}
|
|
44
45
|
})
|
|
45
46
|
})
|
|
46
|
-
};
|
|
47
|
+
}), [t, deactivateRecordsMutation]);
|
|
47
48
|
return {
|
|
48
49
|
deactivateAction: isEnabled ? _deactivateAction : null
|
|
49
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDeactivateAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useDeactivateAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"useDeactivateAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useDeactivateAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAC,SAAS,EAAa,EAAE,EAAE;IAC3D,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MA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Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
3
|
// This file is released under LGPL V3
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
-
import { useState } from 'react';
|
|
5
|
+
import { useMemo, useState } from 'react';
|
|
6
6
|
import { FaPen } from 'react-icons/fa';
|
|
7
7
|
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
8
8
|
import { EditRecordModal } from '../../components/RecordEdition/EditRecordModal';
|
|
@@ -33,6 +33,7 @@ export const useEditAction = ({ isEnabled }) => {
|
|
|
33
33
|
variables: {
|
|
34
34
|
libraryId: item.libraryId,
|
|
35
35
|
attributeIds: ['id'],
|
|
36
|
+
pagination: { limit: 1 },
|
|
36
37
|
filters: [
|
|
37
38
|
{
|
|
38
39
|
condition: RecordFilterCondition.EQUAL,
|
|
@@ -44,9 +45,10 @@ export const useEditAction = ({ isEnabled }) => {
|
|
|
44
45
|
});
|
|
45
46
|
setEditingItem(null);
|
|
46
47
|
};
|
|
47
|
-
|
|
48
|
+
const editAction = useMemo(() => ({
|
|
48
49
|
editAction: isEnabled ? _editAction : null,
|
|
49
50
|
editModal: isEnabled && editingItem !== null ? (_jsx(EditRecordModal, { open: true, record: editingItem.whoAmI, library: editingItem.libraryId, onClose: () => _handleEditModalClose(editingItem) })) : null
|
|
50
|
-
};
|
|
51
|
+
}), [isEnabled, editingItem]);
|
|
52
|
+
return editAction;
|
|
51
53
|
};
|
|
52
54
|
//# sourceMappingURL=useEditAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useEditAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useEditAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useEditAction.t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,CAAC,CAAC;QACH,cAAc,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC,CAAC;IAEF,MAAM,UAAU,GAAG,OAAO,CACtB,GAAG,EAAE,CAAC,CAAC;QACH,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI;QAC1C,SAAS,EACL,SAAS,IAAI,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,CAChC,KAAC,eAAe,IACZ,IAAI,QACJ,MAAM,EAAE,WAAW,CAAC,MAAM,EAC1B,OAAO,EAAE,WAAW,CAAC,SAAS,EAC9B,OAAO,EAAE,GAAG,EAAE,CAAC,qBAAqB,CAAC,WAAW,CAAC,GACnD,CACL,CAAC,CAAC,CAAC,IAAI;KACf,CAAC,EACF,CAAC,SAAS,EAAE,WAAW,CAAC,CAC3B,CAAC;IAEF,OAAO,UAAU,CAAC;AACtB,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { IViewSettingsAction } from './manage-view-settings';
|
|
3
|
+
export declare const usePagination: (dispatch: Dispatch<IViewSettingsAction>) => {
|
|
4
|
+
currentPage: number;
|
|
5
|
+
setNewPage: (newCurrentPage: number, ignoredPageSize: number) => void;
|
|
6
|
+
setNewPageSize: (ignoredCurrentPage: number, newPageSize: number) => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
2
|
+
// This file is released under LGPL V3
|
|
3
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { ViewSettingsActionTypes } from './manage-view-settings';
|
|
6
|
+
export const usePagination = (dispatch) => {
|
|
7
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
8
|
+
const setNewPage = (newCurrentPage, ignoredPageSize) => {
|
|
9
|
+
setCurrentPage(newCurrentPage);
|
|
10
|
+
};
|
|
11
|
+
const setNewPageSize = (ignoredCurrentPage, newPageSize) => {
|
|
12
|
+
dispatch({
|
|
13
|
+
type: ViewSettingsActionTypes.CHANGE_PAGE_SIZE,
|
|
14
|
+
payload: {
|
|
15
|
+
pageSize: newPageSize
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
currentPage,
|
|
21
|
+
setNewPage,
|
|
22
|
+
setNewPageSize
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=usePagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePagination.js","sourceRoot":"","sources":["../../../src/components/Explorer/usePagination.tsx"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAW,QAAQ,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EAAsB,uBAAuB,EAAC,MAAM,wBAAwB,CAAC;AAEpF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAuC,EAAE,EAAE;IACrE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAElD,MAAM,UAAU,GAAG,CAAC,cAAsB,EAAE,eAAuB,EAAE,EAAE;QACnE,cAAc,CAAC,cAAc,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,CAAC,kBAA0B,EAAE,WAAmB,EAAE,EAAE;QACvE,QAAQ,CAAC;YACL,IAAI,EAAE,uBAAuB,CAAC,gBAAgB;YAC9C,OAAO,EAAE;gBACL,QAAQ,EAAE,WAAW;aACxB;SACJ,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,OAAO;QACH,WAAW;QACX,UAAU;QACV,cAAc;KACjB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -5,15 +5,7 @@ import { IPrimaryAction } from './_types';
|
|
|
5
5
|
* Based on default actions and custom actions, it returns a primary with first action as "main" action and the others
|
|
6
6
|
* in the dropdown accessible via a split button.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* It returns also two parts : one for the call action button - one for displayed the modal required by the action.
|
|
11
|
-
* It also returns the modal required for default actions (like create record).
|
|
12
|
-
*
|
|
13
|
-
* TODO: change params to match to signature
|
|
14
|
-
* @param isEnabled - whether the action is present
|
|
15
|
-
* @param library - the library's id to add new item
|
|
16
|
-
* @param refetch - method to call to refresh the list. New item will be visible if it matches filters and sorts
|
|
8
|
+
* @param {Object[]} actions - list of actions to be display as one button: the primary action button
|
|
17
9
|
*/
|
|
18
10
|
export declare const usePrimaryActionsButton: (actions: IPrimaryAction[]) => {
|
|
19
11
|
primaryButton: JSX.Element;
|
|
@@ -6,24 +6,16 @@ import { KitButton, KitSpace } from 'aristid-ds';
|
|
|
6
6
|
* Based on default actions and custom actions, it returns a primary with first action as "main" action and the others
|
|
7
7
|
* in the dropdown accessible via a split button.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* It returns also two parts : one for the call action button - one for displayed the modal required by the action.
|
|
12
|
-
* It also returns the modal required for default actions (like create record).
|
|
13
|
-
*
|
|
14
|
-
* TODO: change params to match to signature
|
|
15
|
-
* @param isEnabled - whether the action is present
|
|
16
|
-
* @param library - the library's id to add new item
|
|
17
|
-
* @param refetch - method to call to refresh the list. New item will be visible if it matches filters and sorts
|
|
9
|
+
* @param {Object[]} actions - list of actions to be display as one button: the primary action button
|
|
18
10
|
*/
|
|
19
11
|
export const usePrimaryActionsButton = (actions) => {
|
|
20
|
-
const [
|
|
12
|
+
const [firstAction, ...dropdownActions] = actions;
|
|
21
13
|
return {
|
|
22
|
-
primaryButton:
|
|
14
|
+
primaryButton: actions.length === 0 ? null : (_jsx(KitButton, { type: "primary", icon: firstAction.icon, onClick: firstAction.callback, items: dropdownActions.map((action, index) => ({
|
|
23
15
|
key: index,
|
|
24
16
|
label: (_jsxs(KitSpace, { size: 8, children: [action.icon, " ", action.label] })),
|
|
25
17
|
onClick: action.callback
|
|
26
|
-
})), children:
|
|
18
|
+
})), children: firstAction.label }))
|
|
27
19
|
};
|
|
28
20
|
};
|
|
29
21
|
//# sourceMappingURL=usePrimaryActions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePrimaryActions.js","sourceRoot":"","sources":["../../../src/components/Explorer/usePrimaryActions.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"usePrimaryActions.js","sourceRoot":"","sources":["../../../src/components/Explorer/usePrimaryActions.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,OAAyB,EAAE,EAAE;IACjE,MAAM,CAAC,WAAW,EAAE,GAAG,eAAe,CAAC,GAAG,OAAO,CAAC;IAElD,OAAO;QACH,aAAa,EACT,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC1B,KAAC,SAAS,IACN,IAAI,EAAC,SAAS,EACd,IAAI,EAAE,WAAW,CAAC,IAAI,EACtB,OAAO,EAAE,WAAW,CAAC,QAAQ,EAC7B,KAAK,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;gBAC3C,GAAG,EAAE,KAAK;gBACV,KAAK,EAAE,CACH,MAAC,QAAQ,IAAC,IAAI,EAAE,CAAC,aACZ,MAAM,CAAC,IAAI,OAAG,MAAM,CAAC,KAAK,IACpB,CACd;gBACD,OAAO,EAAE,MAAM,CAAC,QAAQ;aAC3B,CAAC,CAAC,YAEF,WAAW,CAAC,KAAK,GACV,CACf;KACR,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { IViewSettingsAction, IViewSettingsState } from './manage-view-settings/store-view-settings/viewSettingsReducer';
|
|
3
|
+
interface IUseSearchInputParams {
|
|
4
|
+
view: IViewSettingsState;
|
|
5
|
+
dispatch: Dispatch<IViewSettingsAction>;
|
|
6
|
+
}
|
|
7
|
+
export declare const useSearchInput: ({ view, dispatch }: IUseSearchInputParams) => {
|
|
8
|
+
searchInput: JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
6
|
+
import { KitInput } from 'aristid-ds';
|
|
7
|
+
import { useState } from 'react';
|
|
8
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
9
|
+
import { faMagnifyingGlass } from '@fortawesome/free-solid-svg-icons';
|
|
10
|
+
import { ViewSettingsActionTypes } from './manage-view-settings/store-view-settings/viewSettingsReducer';
|
|
11
|
+
export const useSearchInput = ({ view, dispatch }) => {
|
|
12
|
+
const { t } = useSharedTranslation();
|
|
13
|
+
const [search, setSearch] = useState(view.fulltextSearch);
|
|
14
|
+
const _handleChange = e => {
|
|
15
|
+
if (!e.target.value) {
|
|
16
|
+
setSearch('');
|
|
17
|
+
dispatch({ type: ViewSettingsActionTypes.CLEAR_FULLTEXT_SEARCH });
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
setSearch(e.target.value);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const _handleSubmit = e => {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
dispatch({ type: ViewSettingsActionTypes.CHANGE_FULLTEXT_SEARCH, payload: { search } });
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
searchInput: (_jsx("form", { onSubmit: _handleSubmit, children: _jsx(KitInput, { prefix: _jsx(FontAwesomeIcon, { icon: faMagnifyingGlass }), title: String(t('global.search')), placeholder: String(t('global.search')), value: search ?? '', onChange: _handleChange }) }))
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=useSearchInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSearchInput.js","sourceRoot":"","sources":["../../../src/components/Explorer/useSearchInput.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAA0C,QAAQ,EAAC,MAAM,OAAO,CAAC;AACxE,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,iBAAiB,EAAC,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAGH,uBAAuB,EAC1B,MAAM,gEAAgE,CAAC;AAOxE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAwB,EAAE,EAAE;IACtE,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAS,IAAI,CAAC,cAAc,CAAC,CAAC;IAElE,MAAM,aAAa,GAAgD,CAAC,CAAC,EAAE;QACnE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAClB,SAAS,CAAC,EAAE,CAAC,CAAC;YACd,QAAQ,CAAC,EAAC,IAAI,EAAE,uBAAuB,CAAC,qBAAqB,EAAC,CAAC,CAAC;QACpE,CAAC;aAAM,CAAC;YACJ,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC9B,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,aAAa,GAA+C,CAAC,CAAC,EAAE;QAClE,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,QAAQ,CAAC,EAAC,IAAI,EAAE,uBAAuB,CAAC,sBAAsB,EAAE,OAAO,EAAE,EAAC,MAAM,EAAC,EAAC,CAAC,CAAC;IACxF,CAAC,CAAC;IAEF,OAAO;QACH,WAAW,EAAE,CACT,eAAM,QAAQ,EAAE,aAAa,YACzB,KAAC,QAAQ,IACL,MAAM,EAAE,KAAC,eAAe,IAAC,IAAI,EAAE,iBAAiB,GAAI,EACpD,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EACjC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EACvC,KAAK,EAAE,MAAM,IAAI,EAAE,EACnB,QAAQ,EAAE,aAAa,GACzB,GACC,CACV;KACJ,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
2
|
+
// This file is released under LGPL V3
|
|
3
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
|
+
import { useMeasure } from '@uidotdev/usehooks';
|
|
6
|
+
const headerTableHeight = 56;
|
|
7
|
+
export const defaultPaginationHeight = 56;
|
|
8
|
+
export const useTableScrollableHeight = (withPagination) => {
|
|
9
|
+
const [containerRef, { height }] = useMeasure();
|
|
10
|
+
const scrollHeight = useMemo(() => height === null
|
|
11
|
+
? '100vh'
|
|
12
|
+
: `${height - headerTableHeight - (withPagination ? defaultPaginationHeight : 0)}px`, [withPagination, height]);
|
|
13
|
+
return { containerRef, scrollHeight };
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useTableScrollableHeight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTableScrollableHeight.js","sourceRoot":"","sources":["../../../src/components/Explorer/useTableScrollableHeight.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAE9C,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,cAAuB,EAAE,EAAE;IAChE,MAAM,CAAC,YAAY,EAAE,EAAC,MAAM,EAAC,CAAC,GAAG,UAAU,EAAE,CAAC;IAE9C,MAAM,YAAY,GAAG,OAAO,CACxB,GAAG,EAAE,CACD,MAAM,KAAK,IAAI;QACX,CAAC,CAAC,OAAO;QACT,CAAC,CAAC,GAAG,MAAM,GAAG,iBAAiB,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAC5F,CAAC,cAAc,EAAE,MAAM,CAAC,CAC3B,CAAC;IAEF,OAAO,EAAC,YAAY,EAAE,YAAY,EAAC,CAAC;AACxC,CAAC,CAAC"}
|