@leav/ui 0.3.6-8bd5a2d → 0.3.6-8c2b8a1
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 +9 -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 +15 -0
- package/dist/__mocks__/common/form.js.map +1 -1
- package/dist/__mocks__/common/value.js +3 -1
- package/dist/__mocks__/common/value.js.map +1 -1
- package/dist/__mocks__/common/view.js +7 -5
- package/dist/__mocks__/common/view.js.map +1 -1
- package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js +1 -1
- package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js.map +1 -1
- package/dist/__mocks__/mockQuery/mockGetViewListQuery.js +2 -1
- package/dist/__mocks__/mockQuery/mockGetViewListQuery.js.map +1 -1
- package/dist/_gqlTypes/index.d.ts +373 -72
- package/dist/_gqlTypes/index.js +204 -48
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/libraries/getLibraryDetailExtendQuery.d.ts +3 -4
- package/dist/_queries/libraries/getLibraryDetailExtendQuery.js +2 -3
- package/dist/_queries/libraries/getLibraryDetailExtendQuery.js.map +1 -1
- package/dist/_queries/records/getRecordColumnsValues.d.ts +5 -3
- package/dist/_queries/records/getRecordColumnsValues.js +4 -1
- package/dist/_queries/records/getRecordColumnsValues.js.map +1 -1
- package/dist/_queries/records/getRecordsFromLibraryQuery.js +1 -0
- package/dist/_queries/records/getRecordsFromLibraryQuery.js.map +1 -1
- package/dist/_queries/records/recordFormAttributeFragment.js +2 -0
- package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
- package/dist/_queries/views/saveViewMutation.js +1 -1
- package/dist/_queries/views/viewDetailsFragment.js +14 -11
- package/dist/_queries/views/viewDetailsFragment.js.map +1 -1
- package/dist/_utils/index.js +5 -2
- package/dist/_utils/index.js.map +1 -1
- package/dist/_utils/interleaveElement.d.ts +1 -0
- package/dist/_utils/interleaveElement.js +5 -0
- package/dist/_utils/interleaveElement.js.map +1 -0
- package/dist/antdTheme/index.d.ts +0 -3
- package/dist/antdTheme/index.js +3 -42
- package/dist/antdTheme/index.js.map +1 -1
- package/dist/components/Explorer/DataView.d.ts +6 -1
- package/dist/components/Explorer/DataView.js +69 -18
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +8 -6
- package/dist/components/Explorer/Explorer.js +66 -38
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerTitle.d.ts +2 -0
- package/dist/components/Explorer/ExplorerTitle.js +28 -11
- package/dist/components/Explorer/ExplorerTitle.js.map +1 -1
- package/dist/components/Explorer/ExplorerToolbar.d.ts +5 -0
- package/dist/components/Explorer/ExplorerToolbar.js +45 -0
- package/dist/components/Explorer/ExplorerToolbar.js.map +1 -0
- package/dist/components/Explorer/TableCell.js +15 -6
- package/dist/components/Explorer/TableCell.js.map +1 -1
- package/dist/components/Explorer/_constants.d.ts +5 -0
- package/dist/components/Explorer/_constants.js +18 -0
- package/dist/components/Explorer/_constants.js.map +1 -0
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.d.ts +4 -0
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.js +81 -0
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.js.map +1 -0
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +14 -6
- package/dist/components/Explorer/_queries/useExplorerData.js +70 -19
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +41 -2
- package/dist/components/Explorer/conditionsHelper.d.ts +2 -0
- package/dist/components/Explorer/conditionsHelper.js +16 -0
- package/dist/components/Explorer/conditionsHelper.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +6 -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 +3 -1
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +9 -3
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +17 -22
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +1 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +3 -3
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -1
- 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 +22 -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/ColorAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.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 +66 -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/DateRangeAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +60 -6
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +11 -27
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +11 -26
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +6 -9
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +25 -7
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.d.ts +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +2 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +24 -6
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.d.ts +2 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +45 -28
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +25 -21
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +13 -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 +41 -12
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +69 -23
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
- package/dist/components/Explorer/useColumnWidth.d.ts +6 -0
- package/dist/components/Explorer/useColumnWidth.js +48 -0
- package/dist/components/Explorer/useColumnWidth.js.map +1 -0
- package/dist/components/Explorer/useCreateAction.d.ts +4 -2
- package/dist/components/Explorer/useCreateAction.js +35 -2
- package/dist/components/Explorer/useCreateAction.js.map +1 -1
- package/dist/components/Explorer/useDeactivateMassAction.d.ts +27 -0
- package/dist/components/Explorer/useDeactivateMassAction.js +71 -0
- package/dist/components/Explorer/useDeactivateMassAction.js.map +1 -0
- package/dist/components/Explorer/useEditAction.js +7 -6
- package/dist/components/Explorer/useEditAction.js.map +1 -1
- package/dist/components/Explorer/useMassActions.d.ts +27 -0
- package/dist/components/Explorer/useMassActions.js +109 -0
- package/dist/components/Explorer/useMassActions.js.map +1 -0
- package/dist/components/Explorer/usePrimaryActions.js +14 -7
- package/dist/components/Explorer/usePrimaryActions.js.map +1 -1
- package/dist/components/Explorer/useRemoveAction.d.ts +23 -0
- package/dist/components/Explorer/useRemoveAction.js +109 -0
- package/dist/components/Explorer/useRemoveAction.js.map +1 -0
- package/dist/components/Explorer/useSearchInput.d.ts +10 -4
- package/dist/components/Explorer/useSearchInput.js +9 -1
- package/dist/components/Explorer/useSearchInput.js.map +1 -1
- package/dist/components/Explorer/useViewSettingsReducer.d.ts +8 -0
- package/dist/components/Explorer/useViewSettingsReducer.js +126 -0
- package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -0
- package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +7 -11
- package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js +7 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +7 -5
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +1 -1
- package/dist/components/LibraryItemsList/MenuView/MenuView.js +4 -9
- package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
- package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +2 -3
- package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +1 -1
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js +3 -3
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
- package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js +4 -9
- package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js.map +1 -1
- package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +7 -5
- package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +25 -33
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +61 -73
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +17 -4
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +3 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +5 -2
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +6 -3
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.d.ts +3 -1
- package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js +8 -2
- package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useExecuteSaveValueBatchMutation.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 +2 -2
- 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 +16 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +95 -58
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +3 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +54 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +25 -6
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +16 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +14 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +14 -20
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +38 -29
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +14 -15
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +5 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +8 -17
- 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} +29 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +3 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +3 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +7 -6
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +10 -4
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +2 -2
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +4 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +36 -3
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.d.ts +4 -7
- package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js +6 -8
- package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.d.ts +9 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js +42 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.d.ts +6 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js +35 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.d.ts +2 -281
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +25 -56
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js +1 -13
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js.map +1 -1
- package/dist/components/RecordEdition/{EditRecordContent → EditRecordSkeleton}/EditRecordSkeleton.d.ts +1 -1
- package/dist/components/RecordEdition/{EditRecordContent → EditRecordSkeleton}/EditRecordSkeleton.js +2 -2
- package/dist/components/RecordEdition/EditRecordSkeleton/EditRecordSkeleton.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSkeleton/index.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordSkeleton/index.js +6 -0
- package/dist/components/RecordEdition/EditRecordSkeleton/index.js.map +1 -0
- package/dist/components/RecordEdition/index.d.ts +1 -0
- package/dist/components/RecordEdition/index.js +1 -0
- package/dist/components/RecordEdition/index.js.map +1 -1
- package/dist/constants.d.ts +3 -0
- package/dist/constants.js +3 -0
- package/dist/constants.js.map +1 -1
- package/dist/hooks/useExecuteSaveViewMutation/index.d.ts +1 -0
- package/dist/hooks/useExecuteSaveViewMutation/index.js +5 -0
- package/dist/hooks/useExecuteSaveViewMutation/index.js.map +1 -0
- package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.d.ts +6 -0
- package/dist/hooks/{useExecuteAddViewMutation/useExecuteAddViewMutation.js → useExecuteSaveViewMutation/useExecuteSaveViewMutation.js} +6 -6
- package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -0
- package/dist/locales/en/shared.json +39 -11
- package/dist/locales/fr/shared.json +41 -13
- package/dist/types/views.d.ts +4 -4
- package/package.json +4 -2
- package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.d.ts +0 -2
- package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js +0 -41
- package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.d.ts +0 -3
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js +0 -69
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js.map +0 -1
- package/dist/components/Explorer/useDeactivateAction.d.ts +0 -12
- package/dist/components/Explorer/useDeactivateAction.js +0 -51
- package/dist/components/Explorer/useDeactivateAction.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordSkeleton.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.d.ts +0 -8
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js +0 -23
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +0 -1
- package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.d.ts +0 -6
- package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.js.map +0 -1
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
export const defaultPageSizeOptions = [20, 50, 100];
|
|
2
2
|
export const defaultMaxFilters = 3;
|
|
3
3
|
export const viewSettingsInitialState = {
|
|
4
|
+
libraryId: '',
|
|
4
5
|
viewType: 'table',
|
|
6
|
+
entrypoint: {
|
|
7
|
+
type: 'library',
|
|
8
|
+
libraryId: ''
|
|
9
|
+
},
|
|
5
10
|
attributesIds: [],
|
|
6
11
|
fulltextSearch: '',
|
|
7
12
|
sort: [],
|
|
8
13
|
pageSize: defaultPageSizeOptions[0],
|
|
9
14
|
filters: [],
|
|
10
15
|
maxFilters: defaultMaxFilters,
|
|
11
|
-
|
|
16
|
+
massSelection: [],
|
|
17
|
+
initialViewSettings: {
|
|
18
|
+
viewType: 'table',
|
|
19
|
+
attributesIds: [],
|
|
20
|
+
sort: [],
|
|
21
|
+
pageSize: defaultPageSizeOptions[0],
|
|
22
|
+
filters: []
|
|
23
|
+
}
|
|
12
24
|
};
|
|
13
25
|
//# sourceMappingURL=viewSettingsInitialState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewSettingsInitialState.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;AAEpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAEnC,MAAM,CAAC,MAAM,wBAAwB,GAAuB;IACxD,QAAQ,EAAE,OAAO;IACjB,aAAa,EAAE,EAAE;IACjB,cAAc,EAAE,EAAE;IAClB,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,sBAAsB,CAAC,CAAC,CAAC;IACnC,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,iBAAiB;IAC7B,
|
|
1
|
+
{"version":3,"file":"viewSettingsInitialState.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;AAEpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAEnC,MAAM,CAAC,MAAM,wBAAwB,GAAuB;IACxD,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,OAAO;IACjB,UAAU,EAAE;QACR,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,EAAE;KAChB;IACD,aAAa,EAAE,EAAE;IACjB,cAAc,EAAE,EAAE;IAClB,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,sBAAsB,CAAC,CAAC,CAAC;IACnC,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,iBAAiB;IAC7B,aAAa,EAAE,EAAE;IACjB,mBAAmB,EAAE;QACjB,QAAQ,EAAE,OAAO;QACjB,aAAa,EAAE,EAAE;QACjB,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,sBAAsB,CAAC,CAAC,CAAC;QACnC,OAAO,EAAE,EAAE;KACd;CACJ,CAAC"}
|
package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { SortOrder } from '../../../../_gqlTypes';
|
|
2
|
-
import { IExplorerFilter } from '../../_types';
|
|
2
|
+
import { Entrypoint, IExplorerFilter } from '../../_types';
|
|
3
|
+
import { MASS_SELECTION_ALL } from '../../_constants';
|
|
3
4
|
export type ViewType = 'table' | 'list' | 'timeline' | 'mosaic';
|
|
5
|
+
export type MassSelection = string[] | typeof MASS_SELECTION_ALL;
|
|
4
6
|
export declare const ViewSettingsActionTypes: {
|
|
7
|
+
readonly RESET: "RESET";
|
|
5
8
|
readonly ADD_ATTRIBUTE: "ADD_ATTRIBUTE";
|
|
6
9
|
readonly REMOVE_ATTRIBUTE: "REMOVE_ATTRIBUTE";
|
|
7
10
|
readonly MOVE_ATTRIBUTE: "MOVE_ATTRIBUTE";
|
|
@@ -15,22 +18,29 @@ export declare const ViewSettingsActionTypes: {
|
|
|
15
18
|
readonly CHANGE_FULLTEXT_SEARCH: "CHANGE_FULLTEXT_SEARCH";
|
|
16
19
|
readonly CLEAR_FULLTEXT_SEARCH: "CLEAR_FULLTEXT_SEARCH";
|
|
17
20
|
readonly ADD_FILTER: "ADD_FILTER";
|
|
21
|
+
readonly RESET_FILTER: "RESET_FILTER";
|
|
18
22
|
readonly REMOVE_FILTER: "REMOVE_FILTER";
|
|
19
23
|
readonly MOVE_FILTER: "MOVE_FILTER";
|
|
20
24
|
readonly CHANGE_FILTER_CONFIG: "CHANGE_FILTER_CONFIG";
|
|
25
|
+
readonly SET_SELECTED_KEYS: "SET_SELECTED_KEYS";
|
|
26
|
+
readonly RESTORE_INITIAL_VIEW_SETTINGS: "RESTORE_INITIAL_VIEW_SETTINGS";
|
|
21
27
|
};
|
|
22
28
|
export interface IViewSettingsState {
|
|
29
|
+
libraryId: string;
|
|
30
|
+
viewId?: string;
|
|
31
|
+
entrypoint: Entrypoint;
|
|
23
32
|
viewType: ViewType;
|
|
24
33
|
attributesIds: string[];
|
|
25
34
|
fulltextSearch: string;
|
|
26
35
|
sort: Array<{
|
|
27
|
-
|
|
36
|
+
field: string;
|
|
28
37
|
order: SortOrder;
|
|
29
38
|
}>;
|
|
30
39
|
pageSize: number;
|
|
31
40
|
filters: IExplorerFilter[];
|
|
32
41
|
maxFilters: number;
|
|
33
|
-
|
|
42
|
+
initialViewSettings: Pick<IViewSettingsState, 'viewType' | 'attributesIds' | 'sort' | 'pageSize' | 'filters'>;
|
|
43
|
+
massSelection: MassSelection;
|
|
34
44
|
}
|
|
35
45
|
interface IViewSettingsActionChangePageSize {
|
|
36
46
|
type: typeof ViewSettingsActionTypes.CHANGE_PAGE_SIZE;
|
|
@@ -69,20 +79,20 @@ interface IViewSettingsActionResetAttributes {
|
|
|
69
79
|
interface IViewSettingsActionAddSort {
|
|
70
80
|
type: typeof ViewSettingsActionTypes.ADD_SORT;
|
|
71
81
|
payload: {
|
|
72
|
-
|
|
82
|
+
field: string;
|
|
73
83
|
order: SortOrder;
|
|
74
84
|
};
|
|
75
85
|
}
|
|
76
86
|
interface IViewSettingsActionRemoveSort {
|
|
77
87
|
type: typeof ViewSettingsActionTypes.REMOVE_SORT;
|
|
78
88
|
payload: {
|
|
79
|
-
|
|
89
|
+
field: string;
|
|
80
90
|
};
|
|
81
91
|
}
|
|
82
92
|
interface IViewSettingsActionChangeSortOrder {
|
|
83
93
|
type: typeof ViewSettingsActionTypes.CHANGE_SORT_ORDER;
|
|
84
94
|
payload: {
|
|
85
|
-
|
|
95
|
+
field: string;
|
|
86
96
|
order: SortOrder;
|
|
87
97
|
};
|
|
88
98
|
}
|
|
@@ -104,13 +114,15 @@ interface IViewSettingsActionClearFulltextSearch {
|
|
|
104
114
|
}
|
|
105
115
|
interface IViewSettingsActionAddFilter {
|
|
106
116
|
type: typeof ViewSettingsActionTypes.ADD_FILTER;
|
|
107
|
-
payload: Omit<IExplorerFilter, 'id'>;
|
|
117
|
+
payload: Omit<IExplorerFilter, 'id' | 'value' | 'condition'>;
|
|
118
|
+
}
|
|
119
|
+
interface IViewSettingsActionResetFilter {
|
|
120
|
+
type: typeof ViewSettingsActionTypes.RESET_FILTER;
|
|
121
|
+
payload: Pick<IExplorerFilter, 'id'>;
|
|
108
122
|
}
|
|
109
123
|
interface IViewSettingsActionRemoveFilter {
|
|
110
124
|
type: typeof ViewSettingsActionTypes.REMOVE_FILTER;
|
|
111
|
-
payload:
|
|
112
|
-
id: string;
|
|
113
|
-
};
|
|
125
|
+
payload: Pick<IExplorerFilter, 'id'>;
|
|
114
126
|
}
|
|
115
127
|
interface IViewSettingsActionChangeFilterConfig {
|
|
116
128
|
type: typeof ViewSettingsActionTypes.CHANGE_FILTER_CONFIG;
|
|
@@ -123,8 +135,25 @@ interface IViewSettingsActionMoveFilter {
|
|
|
123
135
|
indexTo: number;
|
|
124
136
|
};
|
|
125
137
|
}
|
|
126
|
-
|
|
138
|
+
interface IViewSettingsActionReset {
|
|
139
|
+
type: typeof ViewSettingsActionTypes.RESET;
|
|
140
|
+
payload: IViewSettingsState;
|
|
141
|
+
}
|
|
142
|
+
interface IViewSettingsActionSetSelectedKeys {
|
|
143
|
+
type: typeof ViewSettingsActionTypes.SET_SELECTED_KEYS;
|
|
144
|
+
payload: MassSelection;
|
|
145
|
+
}
|
|
146
|
+
interface IViewSettingsActionRestoreInitialViewSettings {
|
|
147
|
+
type: typeof ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS;
|
|
148
|
+
}
|
|
149
|
+
type Reducer<PAYLOAD extends {
|
|
150
|
+
type: keyof typeof ViewSettingsActionTypes;
|
|
151
|
+
payload?: unknown;
|
|
152
|
+
} = {
|
|
153
|
+
type: any;
|
|
154
|
+
payload: 'no_payload';
|
|
155
|
+
}> = PAYLOAD['payload'] extends 'no_payload' ? (state: IViewSettingsState) => IViewSettingsState : (state: IViewSettingsState, payload: PAYLOAD['payload']) => IViewSettingsState;
|
|
127
156
|
export declare const clearFulltextSearch: Reducer;
|
|
128
|
-
export type IViewSettingsAction = IViewSettingsActionResetAttributes | IViewSettingsActionAddAttribute | IViewSettingsActionRemoveAttribute | IViewSettingsActionMoveAttribute | IViewSettingsActionChangeViewType | IViewSettingsActionAddSort | IViewSettingsActionRemoveSort | IViewSettingsActionChangeSortOrder | IViewSettingsActionMoveSort | IViewSettingsActionChangePageSize | IViewSettingsActionChangeFulltextSearch | IViewSettingsActionClearFulltextSearch | IViewSettingsActionAddFilter | IViewSettingsActionRemoveFilter | IViewSettingsActionChangeFilterConfig | IViewSettingsActionMoveFilter;
|
|
157
|
+
export type IViewSettingsAction = IViewSettingsActionResetAttributes | IViewSettingsActionAddAttribute | IViewSettingsActionRemoveAttribute | IViewSettingsActionMoveAttribute | IViewSettingsActionChangeViewType | IViewSettingsActionAddSort | IViewSettingsActionRemoveSort | IViewSettingsActionChangeSortOrder | IViewSettingsActionMoveSort | IViewSettingsActionChangePageSize | IViewSettingsActionChangeFulltextSearch | IViewSettingsActionClearFulltextSearch | IViewSettingsActionAddFilter | IViewSettingsActionResetFilter | IViewSettingsActionRemoveFilter | IViewSettingsActionChangeFilterConfig | IViewSettingsActionMoveFilter | IViewSettingsActionReset | IViewSettingsActionSetSelectedKeys | IViewSettingsActionRestoreInitialViewSettings;
|
|
129
158
|
export declare const viewSettingsReducer: (state: IViewSettingsState, action: IViewSettingsAction) => IViewSettingsState;
|
|
130
159
|
export {};
|
package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
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 { v4 as uuid } from 'uuid';
|
|
5
|
+
import { hasOnlyNoValueConditions } from '../../conditionsHelper';
|
|
6
|
+
import { conditionsByFormat } from '../filter-items/filter-type/useConditionOptionsByType';
|
|
1
7
|
export const ViewSettingsActionTypes = {
|
|
8
|
+
RESET: 'RESET',
|
|
2
9
|
ADD_ATTRIBUTE: 'ADD_ATTRIBUTE',
|
|
3
10
|
REMOVE_ATTRIBUTE: 'REMOVE_ATTRIBUTE',
|
|
4
11
|
MOVE_ATTRIBUTE: 'MOVE_ATTRIBUTE',
|
|
@@ -12,9 +19,12 @@ export const ViewSettingsActionTypes = {
|
|
|
12
19
|
CHANGE_FULLTEXT_SEARCH: 'CHANGE_FULLTEXT_SEARCH',
|
|
13
20
|
CLEAR_FULLTEXT_SEARCH: 'CLEAR_FULLTEXT_SEARCH',
|
|
14
21
|
ADD_FILTER: 'ADD_FILTER',
|
|
22
|
+
RESET_FILTER: 'RESET_FILTER',
|
|
15
23
|
REMOVE_FILTER: 'REMOVE_FILTER',
|
|
16
24
|
MOVE_FILTER: 'MOVE_FILTER',
|
|
17
|
-
CHANGE_FILTER_CONFIG: 'CHANGE_FILTER_CONFIG'
|
|
25
|
+
CHANGE_FILTER_CONFIG: 'CHANGE_FILTER_CONFIG',
|
|
26
|
+
SET_SELECTED_KEYS: 'SET_SELECTED_KEYS',
|
|
27
|
+
RESTORE_INITIAL_VIEW_SETTINGS: 'RESTORE_INITIAL_VIEW_SETTINGS'
|
|
18
28
|
};
|
|
19
29
|
const changePageSize = (state, payload) => ({
|
|
20
30
|
...state,
|
|
@@ -48,15 +58,15 @@ const changeViewType = (state, payload) => ({
|
|
|
48
58
|
});
|
|
49
59
|
const addSort = (state, payload) => ({
|
|
50
60
|
...state,
|
|
51
|
-
sort: [...state.sort, {
|
|
61
|
+
sort: [...state.sort, { field: payload.field, order: payload.order }]
|
|
52
62
|
});
|
|
53
63
|
const removeSort = (state, payload) => ({
|
|
54
64
|
...state,
|
|
55
|
-
sort: state.sort.filter(({ attributeId }) => attributeId !== payload.
|
|
65
|
+
sort: state.sort.filter(({ field: attributeId }) => attributeId !== payload.field)
|
|
56
66
|
});
|
|
57
67
|
const changeSortOrder = (state, payload) => ({
|
|
58
68
|
...state,
|
|
59
|
-
sort: state.sort.map(sort => (sort.
|
|
69
|
+
sort: state.sort.map(sort => (sort.field === payload.field ? { ...sort, order: payload.order } : sort))
|
|
60
70
|
});
|
|
61
71
|
const moveSort = (state, payload) => {
|
|
62
72
|
const attributesUsedToSort = [...state.sort];
|
|
@@ -75,25 +85,40 @@ export const clearFulltextSearch = state => ({
|
|
|
75
85
|
...state,
|
|
76
86
|
fulltextSearch: ''
|
|
77
87
|
});
|
|
78
|
-
const addFilter = (state, payload) => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
};
|
|
88
|
+
const addFilter = (state, payload) => ({
|
|
89
|
+
...state,
|
|
90
|
+
filters: [
|
|
91
|
+
...state.filters,
|
|
92
|
+
{
|
|
93
|
+
...payload,
|
|
94
|
+
id: uuid(),
|
|
95
|
+
condition: hasOnlyNoValueConditions(payload.attribute.format)
|
|
96
|
+
? null
|
|
97
|
+
: (conditionsByFormat[payload.attribute.format][0] ?? null),
|
|
98
|
+
value: null
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
const resetFilter = (state, payload) => ({
|
|
103
|
+
...state,
|
|
104
|
+
filters: state.filters.map(filter => {
|
|
105
|
+
if (filter.id === payload.id) {
|
|
106
|
+
const initialViewFilter = state.initialViewSettings.filters.find(({ id }) => id === payload.id);
|
|
107
|
+
return (initialViewFilter ?? {
|
|
108
|
+
...filter,
|
|
109
|
+
condition: hasOnlyNoValueConditions(filter.attribute.format)
|
|
110
|
+
? null
|
|
111
|
+
: (conditionsByFormat[filter.attribute.format][0] ?? null),
|
|
112
|
+
value: null
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
return filter;
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
const removeFilter = (state, payload) => ({
|
|
119
|
+
...state,
|
|
120
|
+
filters: state.filters.filter(({ id }) => id !== payload.id)
|
|
121
|
+
});
|
|
97
122
|
const changeFilterConfig = (state, payload) => ({
|
|
98
123
|
...state,
|
|
99
124
|
filters: state.filters.map(filter => (filter.id === payload.id ? { ...filter, ...payload } : filter))
|
|
@@ -107,6 +132,15 @@ const moveFilter = (state, payload) => {
|
|
|
107
132
|
filters: attributesUsedToFilter
|
|
108
133
|
};
|
|
109
134
|
};
|
|
135
|
+
const reset = (_, payload) => payload;
|
|
136
|
+
const setSelectedKeys = (state, payload) => ({
|
|
137
|
+
...state,
|
|
138
|
+
massSelection: payload
|
|
139
|
+
});
|
|
140
|
+
const restoreInitialViewSettings = state => ({
|
|
141
|
+
...state,
|
|
142
|
+
...state.initialViewSettings
|
|
143
|
+
});
|
|
110
144
|
export const viewSettingsReducer = (state, action) => {
|
|
111
145
|
switch (action.type) {
|
|
112
146
|
case ViewSettingsActionTypes.CHANGE_PAGE_SIZE: {
|
|
@@ -148,6 +182,9 @@ export const viewSettingsReducer = (state, action) => {
|
|
|
148
182
|
case ViewSettingsActionTypes.ADD_FILTER: {
|
|
149
183
|
return addFilter(state, action.payload);
|
|
150
184
|
}
|
|
185
|
+
case ViewSettingsActionTypes.RESET_FILTER: {
|
|
186
|
+
return resetFilter(state, action.payload);
|
|
187
|
+
}
|
|
151
188
|
case ViewSettingsActionTypes.REMOVE_FILTER: {
|
|
152
189
|
return removeFilter(state, action.payload);
|
|
153
190
|
}
|
|
@@ -157,6 +194,15 @@ export const viewSettingsReducer = (state, action) => {
|
|
|
157
194
|
case ViewSettingsActionTypes.MOVE_FILTER: {
|
|
158
195
|
return moveFilter(state, action.payload);
|
|
159
196
|
}
|
|
197
|
+
case ViewSettingsActionTypes.RESET: {
|
|
198
|
+
return reset(state, action.payload);
|
|
199
|
+
}
|
|
200
|
+
case ViewSettingsActionTypes.SET_SELECTED_KEYS: {
|
|
201
|
+
return setSelectedKeys(state, action.payload);
|
|
202
|
+
}
|
|
203
|
+
case ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS: {
|
|
204
|
+
return restoreInitialViewSettings(state);
|
|
205
|
+
}
|
|
160
206
|
default:
|
|
161
207
|
return state;
|
|
162
208
|
}
|
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":"
|
|
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,EAAC,EAAE,IAAI,IAAI,EAAC,MAAM,MAAM,CAAC;AAGhC,OAAO,EAAC,wBAAwB,EAAC,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EAAC,kBAAkB,EAAC,MAAM,uDAAuD,CAAC;AAKzF,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;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C,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,KAAK,uBAAuB,CAAC,iBAAiB,CAAC,CAAC,CAAC;YAC7C,OAAO,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAClD,CAAC;QACD,KAAK,uBAAuB,CAAC,6BAA6B,CAAC,CAAC,CAAC;YACzD,OAAO,0BAA0B,CAAC,KAAK,CAAC,CAAC;QAC7C,CAAC;QACD;YACI,OAAO,KAAK,CAAC;IACrB,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { isTypeStandard } from '@leav/utils';
|
|
5
|
+
import { useEffect, useRef, useState } from 'react';
|
|
6
|
+
import { AttributeFormat } from '../../_gqlTypes';
|
|
7
|
+
const FieldColumnWidth = {
|
|
8
|
+
TINY: 125,
|
|
9
|
+
SMALL: 150,
|
|
10
|
+
MEDIUM: 250,
|
|
11
|
+
LARGE: 300
|
|
12
|
+
};
|
|
13
|
+
const _getFieldColumWidth = (field) => {
|
|
14
|
+
if (!field || !isTypeStandard(field.type) || field.multiple_values) {
|
|
15
|
+
return FieldColumnWidth.LARGE;
|
|
16
|
+
}
|
|
17
|
+
switch (field.format) {
|
|
18
|
+
case AttributeFormat.boolean:
|
|
19
|
+
return FieldColumnWidth.TINY;
|
|
20
|
+
case AttributeFormat.numeric:
|
|
21
|
+
case AttributeFormat.date:
|
|
22
|
+
return FieldColumnWidth.SMALL;
|
|
23
|
+
case AttributeFormat.date_range:
|
|
24
|
+
return FieldColumnWidth.LARGE;
|
|
25
|
+
default:
|
|
26
|
+
return FieldColumnWidth.MEDIUM;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export const useColumnWidth = () => {
|
|
30
|
+
const ref = useRef(null);
|
|
31
|
+
const [columnWidth, setColumnWidth] = useState(FieldColumnWidth.TINY);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (ref.current) {
|
|
34
|
+
const columnElement = ref.current;
|
|
35
|
+
const columnElementtWidth = columnElement.getBoundingClientRect().width;
|
|
36
|
+
const lastColumnsInlinePadding = 36;
|
|
37
|
+
if (columnElementtWidth !== columnWidth - lastColumnsInlinePadding) {
|
|
38
|
+
setColumnWidth(columnElementtWidth + lastColumnsInlinePadding);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}, [ref.current]);
|
|
42
|
+
return {
|
|
43
|
+
ref,
|
|
44
|
+
getFieldColumnWidth: _getFieldColumWidth,
|
|
45
|
+
columnWidth
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=useColumnWidth.js.map
|
|
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tE,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;YACd,MAAM,aAAa,GAAG,GAAG,CAAC,OAAO,CAAC;YAClC,MAAM,mBAAmB,GAAG,aAAa,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC;YACxE,MAAM,wBAAwB,GAAG,EAAE,CAAC;YAEpC,IAAI,mBAAmB,KAAK,WAAW,GAAG,wBAAwB,EAAE,CAAC;gBACjE,cAAc,CAAC,mBAAmB,GAAG,wBAAwB,CAAC,CAAC;YACnE,CAAC;QACL,CAAC;IACL,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;IAElB,OAAO;QACH,GAAG;QACH,mBAAmB,EAAE,mBAAmB;QACxC,WAAW;KACd,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionHook, IPrimaryAction } from './_types';
|
|
1
|
+
import { ActionHook, Entrypoint, IPrimaryAction } from './_types';
|
|
2
2
|
/**
|
|
3
3
|
* Hook used to get the action for `<DataView />` component.
|
|
4
4
|
*
|
|
@@ -10,8 +10,10 @@ import { ActionHook, IPrimaryAction } from './_types';
|
|
|
10
10
|
* @param library - the library's id to add new item
|
|
11
11
|
* @param refetch - method to call to refresh the list. New item will be visible if it matches filters and sorts
|
|
12
12
|
*/
|
|
13
|
-
export declare const useCreateAction: ({ isEnabled, library, refetch }: ActionHook<{
|
|
13
|
+
export declare const useCreateAction: ({ isEnabled, library, entrypoint, itemsCount, refetch }: ActionHook<{
|
|
14
14
|
library: string;
|
|
15
|
+
entrypoint: Entrypoint;
|
|
16
|
+
itemsCount: number;
|
|
15
17
|
refetch: () => void;
|
|
16
18
|
}>) => {
|
|
17
19
|
createAction: IPrimaryAction;
|
|
@@ -6,6 +6,8 @@ import { useState } from 'react';
|
|
|
6
6
|
import { FaPlus } from 'react-icons/fa';
|
|
7
7
|
import { EditRecordModal } from '../../components';
|
|
8
8
|
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
9
|
+
import useSaveValueBatchMutation from '../../components/RecordEdition/EditRecordContent/hooks/useExecuteSaveValueBatchMutation';
|
|
10
|
+
import { useExplorerLinkAttributeQuery } from '../../_gqlTypes';
|
|
9
11
|
/**
|
|
10
12
|
* Hook used to get the action for `<DataView />` component.
|
|
11
13
|
*
|
|
@@ -17,23 +19,54 @@ import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
|
17
19
|
* @param library - the library's id to add new item
|
|
18
20
|
* @param refetch - method to call to refresh the list. New item will be visible if it matches filters and sorts
|
|
19
21
|
*/
|
|
20
|
-
export const useCreateAction = ({ isEnabled, library, refetch }) => {
|
|
22
|
+
export const useCreateAction = ({ isEnabled, library, entrypoint, itemsCount, refetch }) => {
|
|
21
23
|
const { t } = useSharedTranslation();
|
|
22
24
|
const [isRecordCreationVisible, setRecordCreationVisible] = useState(false);
|
|
25
|
+
const [multipleValues, setIsMultivalues] = useState(false);
|
|
26
|
+
const { saveValues } = useSaveValueBatchMutation();
|
|
27
|
+
useExplorerLinkAttributeQuery({
|
|
28
|
+
skip: entrypoint.type !== 'link',
|
|
29
|
+
variables: {
|
|
30
|
+
id: entrypoint.linkAttributeId
|
|
31
|
+
},
|
|
32
|
+
onCompleted: data => {
|
|
33
|
+
const attributeData = data?.attributes?.list?.[0];
|
|
34
|
+
if (!attributeData) {
|
|
35
|
+
throw new Error('Unknown link attribute');
|
|
36
|
+
}
|
|
37
|
+
setIsMultivalues(attributeData.multiple_values);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const canCreateRecord = entrypoint.type === 'library' ? true : multipleValues || itemsCount === 0;
|
|
23
41
|
const createAction = {
|
|
24
42
|
callback: () => {
|
|
25
43
|
setRecordCreationVisible(true);
|
|
26
44
|
},
|
|
27
45
|
icon: _jsx(FaPlus, {}),
|
|
46
|
+
disabled: !canCreateRecord,
|
|
28
47
|
label: t('explorer.create-one')
|
|
29
48
|
};
|
|
30
49
|
return {
|
|
31
50
|
createAction: isEnabled ? createAction : null,
|
|
32
51
|
createModal: isRecordCreationVisible ? (_jsx(EditRecordModal, { open: true, record: null, library: library, onClose: () => {
|
|
33
52
|
setRecordCreationVisible(false);
|
|
34
|
-
}, onCreate:
|
|
53
|
+
}, onCreate: newRecord => {
|
|
35
54
|
refetch();
|
|
36
55
|
setRecordCreationVisible(false);
|
|
56
|
+
if (entrypoint.type === 'link') {
|
|
57
|
+
saveValues({
|
|
58
|
+
id: entrypoint.parentRecordId,
|
|
59
|
+
library: {
|
|
60
|
+
id: entrypoint.parentLibraryId
|
|
61
|
+
}
|
|
62
|
+
}, [
|
|
63
|
+
{
|
|
64
|
+
attribute: entrypoint.linkAttributeId,
|
|
65
|
+
idValue: null,
|
|
66
|
+
value: newRecord.id
|
|
67
|
+
}
|
|
68
|
+
]);
|
|
69
|
+
}
|
|
37
70
|
}, submitButtons: ['create'] })) : null
|
|
38
71
|
};
|
|
39
72
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useCreateAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"useCreateAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useCreateAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,eAAe,E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,IAAI,CAAC,CAAC;QACnC,CAAC;QACD,IAAI,EAAE,KAAC,MAAM,KAAG;QAChB,QAAQ,EAAE,CAAC,eAAe;QAC1B,KAAK,EAAE,CAAC,CAAC,qBAAqB,CAAC;KAClC,CAAC;IAEF,OAAO;QACH,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI;QAC7C,WAAW,EAAE,uBAAuB,CAAC,CAAC,CAAC,CACnC,KAAC,eAAe,IACZ,IAAI,QACJ,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,GAAG,EAAE;gBACV,wBAAwB,CAAC,KAAK,CAAC,CAAC;YACpC,CAAC,EACD,QAAQ,EAAE,SAAS,CAAC,EAAE;gBAClB,OAAO,EAAE,CAAC;gBACV,wBAAwB,CAAC,KAAK,CAAC,CAAC;gBAChC,IAAI,UAAU,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;oBAC7B,UAAU,CACN;wBACI,EAAE,EAAE,UAAU,CAAC,cAAc;wBAC7B,OAAO,EAAE;4BACL,EAAE,EAAE,UAAU,CAAC,eAAe;yBACjC;qBACJ,EACD;wBACI;4BACI,SAAS,EAAE,UAAU,CAAC,eAAe;4BACrC,OAAO,EAAE,IAAI;4BACb,KAAK,EAAE,SAAS,CAAC,EAAE;yBACtB;qBACJ,CACJ,CAAC;gBACN,CAAC;YACL,CAAC,EACD,aAAa,EAAE,CAAC,QAAQ,CAAC,GAC3B,CACL,CAAC,CAAC,CAAC,IAAI;KACX,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { ActionHook, IMassActions } from './_types';
|
|
3
|
+
import { IViewSettingsAction, IViewSettingsState } from './manage-view-settings';
|
|
4
|
+
import type { useExplorerData } from './_queries/useExplorerData';
|
|
5
|
+
/**
|
|
6
|
+
* Hook used to get the action for mass actions only available on selection.
|
|
7
|
+
*
|
|
8
|
+
* When the mutation for deactivation is done, the Apollo cache will be clean (`Record` and `RecordIdentity`)
|
|
9
|
+
* from deactivated record.
|
|
10
|
+
*
|
|
11
|
+
* @param isEnabled - whether the action is present
|
|
12
|
+
* @param view - represent the current view
|
|
13
|
+
* @param dispatch - method to change the current view
|
|
14
|
+
* @param libraryId - concerned library
|
|
15
|
+
* @param allVisibleKeys - list of all visible keys used to know if we need to change page
|
|
16
|
+
* @param refetch - method to get fresh data when we delete last page
|
|
17
|
+
*/
|
|
18
|
+
export declare const useDeactivateMassAction: ({ isEnabled, store: { view, dispatch }, allVisibleKeys, refetch }: ActionHook<{
|
|
19
|
+
store: {
|
|
20
|
+
view: IViewSettingsState;
|
|
21
|
+
dispatch: Dispatch<IViewSettingsAction>;
|
|
22
|
+
};
|
|
23
|
+
allVisibleKeys: string[];
|
|
24
|
+
refetch: ReturnType<typeof useExplorerData>["refetch"];
|
|
25
|
+
}>) => {
|
|
26
|
+
deactivateMassAction: IMassActions;
|
|
27
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
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 { useMemo } from 'react';
|
|
6
|
+
import { FaTrash } from 'react-icons/fa';
|
|
7
|
+
import { KitModal } from 'aristid-ds';
|
|
8
|
+
import { useDeactivateRecordsMutation } from '../../_gqlTypes';
|
|
9
|
+
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
10
|
+
import { ViewSettingsActionTypes } from './manage-view-settings';
|
|
11
|
+
import { MASS_SELECTION_ALL } from './_constants';
|
|
12
|
+
/**
|
|
13
|
+
* Hook used to get the action for mass actions only available on selection.
|
|
14
|
+
*
|
|
15
|
+
* When the mutation for deactivation is done, the Apollo cache will be clean (`Record` and `RecordIdentity`)
|
|
16
|
+
* from deactivated record.
|
|
17
|
+
*
|
|
18
|
+
* @param isEnabled - whether the action is present
|
|
19
|
+
* @param view - represent the current view
|
|
20
|
+
* @param dispatch - method to change the current view
|
|
21
|
+
* @param libraryId - concerned library
|
|
22
|
+
* @param allVisibleKeys - list of all visible keys used to know if we need to change page
|
|
23
|
+
* @param refetch - method to get fresh data when we delete last page
|
|
24
|
+
*/
|
|
25
|
+
export const useDeactivateMassAction = ({ isEnabled, store: { view, dispatch }, allVisibleKeys, refetch }) => {
|
|
26
|
+
const { t } = useSharedTranslation();
|
|
27
|
+
const [deactivateRecordsMutation] = useDeactivateRecordsMutation();
|
|
28
|
+
const _deactivateMassAction = useMemo(() => ({
|
|
29
|
+
label: t('explorer.massAction.deactivate'),
|
|
30
|
+
icon: _jsx(FaTrash, {}),
|
|
31
|
+
callback: massSelectionFilter => {
|
|
32
|
+
KitModal.confirm({
|
|
33
|
+
type: 'confirm',
|
|
34
|
+
dangerConfirm: true,
|
|
35
|
+
content: t('records_deactivation.confirm', {
|
|
36
|
+
count: view.massSelection === MASS_SELECTION_ALL ? Infinity : view.massSelection.length
|
|
37
|
+
}),
|
|
38
|
+
okText: t('global.submit') ?? undefined,
|
|
39
|
+
cancelText: t('global.cancel') ?? undefined,
|
|
40
|
+
onOk: async () => {
|
|
41
|
+
await deactivateRecordsMutation({
|
|
42
|
+
variables: {
|
|
43
|
+
libraryId: view.libraryId,
|
|
44
|
+
filters: massSelectionFilter
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
if (view.massSelection === MASS_SELECTION_ALL ||
|
|
48
|
+
allVisibleKeys.every(key => view.massSelection.includes(key))) {
|
|
49
|
+
await refetch({
|
|
50
|
+
pagination: {
|
|
51
|
+
limit: view.pageSize,
|
|
52
|
+
offset: 0
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
await refetch();
|
|
58
|
+
}
|
|
59
|
+
dispatch({
|
|
60
|
+
type: ViewSettingsActionTypes.SET_SELECTED_KEYS,
|
|
61
|
+
payload: []
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}), [t, deactivateRecordsMutation, view.massSelection, dispatch, view.libraryId, allVisibleKeys, refetch]);
|
|
67
|
+
return {
|
|
68
|
+
deactivateMassAction: isEnabled ? _deactivateMassAction : null
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=useDeactivateMassAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDeactivateMassAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useDeactivateMassAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAW,OAAO,EAAC,MAAM,OAAO,CAAC;AACxC,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,EAA0C,uBAAuB,EAAC,MAAM,wBAAwB,CAAC;AACxG,OAAO,EAAC,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAGhD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACpC,SAAS,EACT,KAAK,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,EACvB,cAAc,EACd,OAAO,EAQT,EAAE,EAAE;IACF,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,CAAC,yBAAyB,CAAC,GAAG,4BAA4B,EAAE,CAAC;IAEnE,MAAM,qBAAqB,GAAiB,OAAO,CAC/C,GAAG,EAAE,CAAC,CAAC;QACH,KAAK,EAAE,CA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a,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,CAAC,CACxG,CAAC;IAEF,OAAO;QACH,oBAAoB,EAAE,SAAS,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI;KACjE,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -2,11 +2,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
// 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';
|
|
9
|
-
import { RecordFilterCondition,
|
|
9
|
+
import { RecordFilterCondition, useExplorerLibraryDataLazyQuery } from '../../_gqlTypes';
|
|
10
10
|
/**
|
|
11
11
|
* Hook used to get the action for `<DataView />` component.
|
|
12
12
|
*
|
|
@@ -19,7 +19,7 @@ import { RecordFilterCondition, useExplorerLazyQuery } from '../../_gqlTypes';
|
|
|
19
19
|
*/
|
|
20
20
|
export const useEditAction = ({ isEnabled }) => {
|
|
21
21
|
const { t } = useSharedTranslation();
|
|
22
|
-
const [refreshItem] =
|
|
22
|
+
const [refreshItem] = useExplorerLibraryDataLazyQuery({ fetchPolicy: 'network-only' });
|
|
23
23
|
const [editingItem, setEditingItem] = useState(null);
|
|
24
24
|
const _editAction = {
|
|
25
25
|
label: t('explorer.edit-item'),
|
|
@@ -32,7 +32,7 @@ export const useEditAction = ({ isEnabled }) => {
|
|
|
32
32
|
refreshItem({
|
|
33
33
|
variables: {
|
|
34
34
|
libraryId: item.libraryId,
|
|
35
|
-
attributeIds: ['id'],
|
|
35
|
+
attributeIds: ['id'], // TODO: get list of displayed attributes stored in the view
|
|
36
36
|
pagination: { limit: 1 },
|
|
37
37
|
filters: [
|
|
38
38
|
{
|
|
@@ -45,9 +45,10 @@ export const useEditAction = ({ isEnabled }) => {
|
|
|
45
45
|
});
|
|
46
46
|
setEditingItem(null);
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
const editAction = useMemo(() => ({
|
|
49
49
|
editAction: isEnabled ? _editAction : null,
|
|
50
50
|
editModal: isEnabled && editingItem !== null ? (_jsx(EditRecordModal, { open: true, record: editingItem.whoAmI, library: editingItem.libraryId, onClose: () => _handleEditModalClose(editingItem) })) : null
|
|
51
|
-
};
|
|
51
|
+
}), [isEnabled, editingItem]);
|
|
52
|
+
return editAction;
|
|
52
53
|
};
|
|
53
54
|
//# sourceMappingURL=useEditAction.js.map
|