@leav/ui 0.3.6-eab60f2 → 0.3.6-ebd477a
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 -2
- 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 -2
- 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 +541 -82
- package/dist/_gqlTypes/index.js +313 -56
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/attributes/attributeDetailsFragment.js +0 -1
- package/dist/_queries/attributes/attributeDetailsFragment.js.map +1 -1
- package/dist/_queries/attributes/getAttributesByLib.js +7 -5
- package/dist/_queries/attributes/getAttributesByLib.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/createRecordMutation.js +2 -3
- package/dist/_queries/records/createRecordMutation.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/attributeType.d.ts +3 -0
- package/dist/_utils/attributeType.js +7 -0
- package/dist/_utils/attributeType.js.map +1 -0
- 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/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfo.js +0 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfo.js.map +1 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/EditAttributeInfoForm.js +2 -5
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/EditAttributeInfoForm.js.map +1 -1
- package/dist/components/Explorer/DataView.d.ts +7 -1
- package/dist/components/Explorer/DataView.js +76 -21
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +9 -6
- package/dist/components/Explorer/Explorer.js +80 -37
- 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 +4 -0
- package/dist/components/Explorer/ExplorerToolbar.js +49 -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 +99 -0
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.js.map +1 -0
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +15 -7
- package/dist/components/Explorer/_queries/useExplorerData.js +73 -20
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +67 -8
- package/dist/components/Explorer/_types.js +7 -1
- package/dist/components/Explorer/_types.js.map +1 -1
- package/dist/components/Explorer/{useEditAction.d.ts → actions-item/useEditItemAction.d.ts} +4 -4
- package/dist/components/Explorer/{useEditAction.js → actions-item/useEditItemAction.js} +10 -10
- package/dist/components/Explorer/actions-item/useEditItemAction.js.map +1 -0
- package/dist/components/Explorer/actions-item/useRemoveItemAction.d.ts +23 -0
- package/dist/components/Explorer/actions-item/useRemoveItemAction.js +109 -0
- package/dist/components/Explorer/actions-item/useRemoveItemAction.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.d.ts +27 -0
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js +71 -0
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useMassActions.d.ts +28 -0
- package/dist/components/Explorer/actions-mass/useMassActions.js +111 -0
- package/dist/components/Explorer/actions-mass/useMassActions.js.map +1 -0
- package/dist/components/Explorer/{useCreateAction.d.ts → actions-primary/useCreatePrimaryAction.d.ts} +9 -5
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +75 -0
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -0
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.d.ts +17 -0
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +38 -0
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js.map +1 -0
- package/dist/components/Explorer/{usePrimaryActions.d.ts → actions-primary/usePrimaryActions.d.ts} +1 -1
- package/dist/components/Explorer/actions-primary/usePrimaryActions.js +25 -0
- package/dist/components/Explorer/actions-primary/usePrimaryActions.js.map +1 -0
- 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/link-item/LinkModal.d.ts +7 -0
- package/dist/components/Explorer/link-item/LinkModal.js +72 -0
- package/dist/components/Explorer/link-item/LinkModal.js.map +1 -0
- package/dist/components/Explorer/link-item/useLinkMassAction.d.ts +22 -0
- package/dist/components/Explorer/link-item/useLinkMassAction.js +55 -0
- package/dist/components/Explorer/link-item/useLinkMassAction.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +3 -2
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -1
- 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 +20 -10
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.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 +32 -14
- 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/FilterDropdownContent.d.ts +7 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js +40 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js.map +1 -0
- 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/LinkAttributeDropdown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.js +79 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.js.map +1 -0
- 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 +8 -28
- 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 +8 -27
- 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/_types.d.ts +10 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.js +2 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +11 -13
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +34 -8
- 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 +3 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js +2 -2
- 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/EditSettingsContextProvider.js +2 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js +3 -3
- 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 +10 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +41 -7
- 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 +23 -31
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/SaveViewModal.d.ts +7 -0
- package/dist/components/Explorer/manage-view-settings/save-view/SaveViewModal.js +42 -0
- package/dist/components/Explorer/manage-view-settings/save-view/SaveViewModal.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useSaveView.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useSaveView.js +17 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useSaveView.js.map +1 -0
- 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 +49 -14
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +99 -23
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/useManageViews.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/useManageViews.js +48 -0
- package/dist/components/Explorer/manage-view-settings/useManageViews.js.map +1 -0
- package/dist/components/Explorer/useColumnWidth.d.ts +8 -0
- package/dist/components/Explorer/useColumnWidth.js +49 -0
- package/dist/components/Explorer/useColumnWidth.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 +215 -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 +78 -76
- 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 +2 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +2 -1
- 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/shared/ValueDetailsBtn/ValueDetailsBtn.js +1 -7
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/ValueDetailsBtn.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/StandardField/ComputeIndicator.js +2 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +95 -28
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +2 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +45 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +9 -3
- 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 +6 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +7 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +13 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +6 -6
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +4 -15
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js +5 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +1 -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 +0 -5
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +4 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.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/AttributeSummary/AttributeSummary.d.ts +7 -0
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/AttributeSummary.js +9 -0
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/AttributeSummary.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/index.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordSidebar/{ValueDetails/AttributeDetails → AttributeSummary}/index.js +2 -2
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/index.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.js +25 -0
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.d.ts +3 -0
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js +53 -0
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/index.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordSidebar/{ValueDetails → Breacrumb}/index.js +2 -2
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/index.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +4 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +41 -6
- 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/ValuesSummary/ValuesSummary.d.ts +8 -0
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +66 -0
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/index.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordSidebar/{ValueDetails/TreeValuePath → ValuesSummary}/index.js +2 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/index.js.map +1 -0
- 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/{EditRecordSidebar/ValueDetails/ValueMetadata → EditRecordSkeleton}/index.js +2 -2
- package/dist/components/RecordEdition/EditRecordSkeleton/index.js.map +1 -0
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.d.ts +12 -10
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +15 -13
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js.map +1 -1
- 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/components/SelectTreeNode/SelectTreeNodeContent.js +1 -3
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.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/{components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo → hooks/useExecuteSaveViewMutation}/index.js +1 -2
- 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 +56 -12
- package/dist/locales/fr/shared.json +58 -14
- package/dist/types/views.d.ts +4 -4
- package/package.json +2 -2
- package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.d.ts +0 -2
- package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js +0 -37
- 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/useCreateAction.js +0 -40
- package/dist/components/Explorer/useCreateAction.js.map +0 -1
- package/dist/components/Explorer/useDeactivateAction.d.ts +0 -12
- package/dist/components/Explorer/useDeactivateAction.js +0 -52
- package/dist/components/Explorer/useDeactivateAction.js.map +0 -1
- package/dist/components/Explorer/useEditAction.js.map +0 -1
- package/dist/components/Explorer/usePrimaryActions.js +0 -21
- package/dist/components/Explorer/usePrimaryActions.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/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.d.ts +0 -6
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.js +0 -56
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/TreeValuePath.d.ts +0 -8
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/TreeValuePath.js +0 -41
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/TreeValuePath.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.d.ts +0 -10
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js +0 -63
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.js +0 -76
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/ValueMetadata.d.ts +0 -11
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/ValueMetadata.js +0 -43
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/ValueMetadata.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/index.js.map +0 -1
- package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.d.ts +0 -6
- package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.js.map +0 -1
package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js
CHANGED
|
@@ -7,15 +7,49 @@ import { FaSlidersH } from 'react-icons/fa';
|
|
|
7
7
|
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
8
8
|
import { SettingsPanel } from '../router-menu/SettingsPanel';
|
|
9
9
|
import { useEditSettings } from './useEditSettings';
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
import { localizedTranslation } from '@leav/utils';
|
|
11
|
+
import { useLang } from '../../../../hooks';
|
|
12
|
+
import { useEffect, useState } from 'react';
|
|
13
|
+
export const useOpenViewSettings = ({ view, isEnabled = true }) => {
|
|
14
|
+
const { activeSettings, setActiveSettings, closeSettingsPanel } = useEditSettings();
|
|
15
|
+
const [button, setButton] = useState(null);
|
|
12
16
|
const { t } = useSharedTranslation();
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
const { lang } = useLang();
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (!isEnabled) {
|
|
20
|
+
closeSettingsPanel();
|
|
21
|
+
}
|
|
22
|
+
}, [isEnabled]);
|
|
23
|
+
const rootPanel = { pageName: 'router-menu', title: t('explorer.settings') };
|
|
24
|
+
const _changePanelPage = ({ pageName, title, onClickLeftButton }) => {
|
|
25
|
+
setActiveSettings({
|
|
26
|
+
...activeSettings,
|
|
27
|
+
content: _jsx(SettingsPanel, { library: view.libraryId, page: pageName }),
|
|
28
|
+
title,
|
|
29
|
+
onClickLeftButton
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const _openSettingsPanel = (pageName = 'router-menu') => {
|
|
33
|
+
const chanelPageParams = {
|
|
34
|
+
pageName,
|
|
35
|
+
title: t(`explorer.${pageName}`)
|
|
36
|
+
};
|
|
37
|
+
if (pageName !== rootPanel.pageName) {
|
|
38
|
+
chanelPageParams.onClickLeftButton = () => {
|
|
39
|
+
_changePanelPage(rootPanel);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
_changePanelPage(chanelPageParams);
|
|
43
|
+
};
|
|
44
|
+
let viewName = localizedTranslation(view?.viewLabels ?? {}, lang);
|
|
45
|
+
viewName = viewName === '' ? t('explorer.default-view') : viewName;
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
setButton(_jsx(KitButton, { type: "secondary", icon: _jsx(FaSlidersH, {}), onClick: () => _openSettingsPanel(), title: String(t('explorer.settings')) /* TODO: avoid transform null to 'null' */, children: viewName }));
|
|
48
|
+
}, [viewName]);
|
|
17
49
|
return {
|
|
18
|
-
|
|
50
|
+
openSettingsPanel: _openSettingsPanel,
|
|
51
|
+
viewSettingsButton: button,
|
|
52
|
+
viewName
|
|
19
53
|
};
|
|
20
54
|
};
|
|
21
55
|
//# sourceMappingURL=useOpenViewSettings.js.map
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOpenViewSettings.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"useOpenViewSettings.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;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C;SACnC,CAAC;QACF,IAAI,QAAQ,KAAK,SAAS,CAAC,QAAQ,EAAE,CAAC;YAClC,gBAAgB,CAAC,iBAAiB,GAAG,GAAG,EAAE;gBACtC,gBAAgB,CAAC,SAAS,CAAC,CAAC;YAChC,CAAC,CAAC;QACN,CAAC;QAED,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACvC,CAAC,CAAC;IAEF,IAAI,QAAQ,GAAG,oBAAoB,CAAC,IAAI,EAAE,UAAU,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;IAClE,QAAQ,GAAG,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAEnE,SAAS,CAAC,GAAG,EAAE;QACX,SAAS,CACL,KAAC,SAAS,IACN,IAAI,EAAC,WAAW,EAChB,IAAI,EAAE,KAAC,UAAU,KAAG,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,EAAE,EACnC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,0CAA0C,YAE/E,QAAQ,GACD,CACf,CAAC;IACN,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO;QACH,iBAAiB,EAAE,kBAAkB;QACrC,kBAAkB,EAAE,MAAM;QAC1B,QAAQ;KACX,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
|
|
2
|
+
import { SettingsPanelPages } from '../open-view-settings/EditSettingsContext';
|
|
3
3
|
interface ISettingsPanelProps {
|
|
4
4
|
library: string;
|
|
5
|
+
page?: SettingsPanelPages;
|
|
5
6
|
}
|
|
6
7
|
export declare const SettingsPanel: FunctionComponent<ISettingsPanelProps>;
|
|
7
8
|
export {};
|
|
@@ -1,53 +1,45 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } 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
5
|
import styled from 'styled-components';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { FaFilter, FaList, FaSortAlphaDown } from 'react-icons/fa';
|
|
6
|
+
import { KitButton, KitInput, KitTypography } from 'aristid-ds';
|
|
7
|
+
import { FaFilter, FaList, FaSave, FaShare, FaSortAlphaDown, FaUndo } from 'react-icons/fa';
|
|
9
8
|
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
10
|
-
import { useEditSettings } from '../open-view-settings/useEditSettings';
|
|
11
9
|
import { ConfigureDisplay } from '../configure-display/ConfigureDisplay';
|
|
12
10
|
import { SortItems } from '../sort-items/SortItems';
|
|
13
11
|
import { SettingItem } from './SettingItem';
|
|
14
12
|
import { FilterItems } from '../filter-items/FilterItems';
|
|
15
13
|
import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
|
|
14
|
+
import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
|
|
15
|
+
import { useOpenViewSettings } from '../open-view-settings/useOpenViewSettings';
|
|
16
|
+
import { useSaveView } from '../save-view/useSaveView';
|
|
16
17
|
const ContentWrapperStyledDiv = styled.div `
|
|
17
18
|
display: flex;
|
|
18
19
|
flex-direction: column;
|
|
19
|
-
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
height: 100%;
|
|
22
|
+
`;
|
|
23
|
+
const ViewNameStyledKitInput = styled(KitInput) `
|
|
24
|
+
margin-bottom: calc(var(--general-spacing-s) * 1px);
|
|
25
|
+
`;
|
|
26
|
+
const FooterStyledDiv = styled.footer `
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
padding-bottom: calc(var(--general-spacing-xs) * 1px);
|
|
20
30
|
`;
|
|
21
31
|
const ConfigurationStyledMenu = styled.menu `
|
|
22
32
|
padding: 0;
|
|
23
33
|
`;
|
|
24
|
-
export const SettingsPanel = ({ library }) => {
|
|
34
|
+
export const SettingsPanel = ({ library, page = 'router-menu' }) => {
|
|
25
35
|
const { t } = useSharedTranslation();
|
|
26
|
-
const {
|
|
27
|
-
const {
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
throw Error('Should not be able to change side pane page if there is no side panel!');
|
|
32
|
-
}
|
|
33
|
-
const _changePanelPage = ({ pageName, title, onClickLeftButton }) => {
|
|
34
|
-
setCurrentPage(pageName);
|
|
35
|
-
setActiveSettings({
|
|
36
|
-
...activeSettings,
|
|
37
|
-
title,
|
|
38
|
-
onClickLeftButton
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
_changePanelPage({
|
|
42
|
-
pageName: page,
|
|
43
|
-
title: t(`explorer.${page}`),
|
|
44
|
-
onClickLeftButton: () => {
|
|
45
|
-
const rootPanel = { pageName: 'router-menu', title: t('explorer.settings') };
|
|
46
|
-
_changePanelPage(rootPanel);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
36
|
+
const { view, dispatch } = useViewSettingsContext();
|
|
37
|
+
const { openSettingsPanel, viewName } = useOpenViewSettings({ view });
|
|
38
|
+
const { saveViewModal, toggleModal } = useSaveView();
|
|
39
|
+
const _handleReinitView = () => {
|
|
40
|
+
dispatch({ type: ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS });
|
|
49
41
|
};
|
|
50
42
|
// TODO: look for MemoryRouter
|
|
51
|
-
return (_jsxs(ContentWrapperStyledDiv, { children: [
|
|
43
|
+
return (_jsxs(ContentWrapperStyledDiv, { children: [page === 'router-menu' && (_jsxs(_Fragment, { children: [_jsxs("nav", { children: [_jsx(ViewNameStyledKitInput, { disabled: true, value: viewName }), _jsx(KitTypography.Title, { level: "h4", children: t('explorer.router-menu') }), _jsxs(ConfigurationStyledMenu, { children: [_jsx(SettingItem, { icon: _jsx(FaList, {}), title: t('explorer.configure-display'), onClick: () => openSettingsPanel('configure-display') }), view.entrypoint.type === 'library' && (_jsxs(_Fragment, { children: [_jsx(SettingItem, { icon: _jsx(FaFilter, {}), title: t('explorer.filters'), value: String(t('explorer.active-items-number', { count: view.filters.length })), onClick: () => openSettingsPanel('filter-items') }), _jsx(SettingItem, { icon: _jsx(FaSortAlphaDown, {}), title: t('explorer.sort-items'), onClick: () => openSettingsPanel('sort-items') })] }))] })] }), saveViewModal, _jsxs(FooterStyledDiv, { children: [_jsx(KitButton, { type: "redirect", icon: _jsx(FaSave, {}), onClick: toggleModal, children: t('explorer.save-view') }), _jsx(KitButton, { type: "redirect", icon: _jsx(FaShare, {}), onClick: () => null, children: t('explorer.share-view') }), _jsx(KitButton, { type: "redirect", icon: _jsx(FaUndo, {}), onClick: _handleReinitView, children: t('explorer.reinit-view') })] })] })), page === 'configure-display' && _jsx(ConfigureDisplay, { libraryId: library }), page === 'sort-items' && _jsx(SortItems, { libraryId: library }), page === 'filter-items' && _jsx(FilterItems, { libraryId: library })] }));
|
|
52
44
|
};
|
|
53
45
|
//# sourceMappingURL=SettingsPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsPanel.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/router-menu/SettingsPanel.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,MAAM,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SettingsPanel.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/router-menu/SettingsPanel.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,SAAS,EAAE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AAU,EAAC,IAAI,EAAE,KAAC,MAAM,KAAG,EAAE,OAAO,EAAE,WAAW,YAC5D,CAAC,CAAC,oBAAoB,CAAC,GAChB,EACZ,KAAC,SAAS,IAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAE,KAAC,OAAO,KAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,YAC5D,CAAC,CAAC,qBAAqB,CAAC,GACjB,EACZ,KAAC,SAAS,IAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAE,KAAC,MAAM,KAAG,EAAE,OAAO,EAAE,iBAAiB,YAClE,CAAC,CAAC,sBAAsB,CAAC,GAClB,IACE,IACnB,CACN,EACA,IAAI,KAAK,mBAAmB,IAAI,KAAC,gBAAgB,IAAC,SAAS,EAAE,OAAO,GAAI,EACxE,IAAI,KAAK,YAAY,IAAI,KAAC,SAAS,IAAC,SAAS,EAAE,OAAO,GAAI,EAC1D,IAAI,KAAK,cAAc,IAAI,KAAC,WAAW,IAAC,SAAS,EAAE,OAAO,GAAI,IACzC,CAC7B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FaTimes, FaSave } from 'react-icons/fa';
|
|
3
|
+
import { KitModal, KitButton, AntForm, KitInputWrapper, KitInput } from 'aristid-ds';
|
|
4
|
+
import { useLang } from '../../../../hooks';
|
|
5
|
+
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
6
|
+
import { useManageViews } from '../useManageViews';
|
|
7
|
+
import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
|
|
8
|
+
export const SaveViewModal = ({ isOpen, onClose }) => {
|
|
9
|
+
const { t } = useSharedTranslation();
|
|
10
|
+
const { defaultLang, availableLangs } = useLang();
|
|
11
|
+
const { view } = useViewSettingsContext();
|
|
12
|
+
const { handleSaveView } = useManageViews();
|
|
13
|
+
const [form] = AntForm.useForm();
|
|
14
|
+
const _toggleModal = () => {
|
|
15
|
+
if (isOpen) {
|
|
16
|
+
form.resetFields();
|
|
17
|
+
}
|
|
18
|
+
onClose();
|
|
19
|
+
};
|
|
20
|
+
const _handleSaveView = () => {
|
|
21
|
+
form.validateFields();
|
|
22
|
+
const hasError = form.getFieldsError().filter(field => field.errors.length > 0).length > 0;
|
|
23
|
+
const hasOnlyEmptyField = Object.entries(form.getFieldsValue()).filter(field => field[0] === defaultLang && !!field[1]).length === 0;
|
|
24
|
+
if (hasError || hasOnlyEmptyField) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
handleSaveView(form.getFieldsValue());
|
|
28
|
+
onClose();
|
|
29
|
+
};
|
|
30
|
+
const _onCheck = () => {
|
|
31
|
+
form.validateFields();
|
|
32
|
+
};
|
|
33
|
+
const _preventCloseSettingsPanel = e => e.stopPropagation();
|
|
34
|
+
return (_jsx(KitModal
|
|
35
|
+
// TODO: remove appElement and put in the test : "KitModal.setAppElement(document.body) once exposed"
|
|
36
|
+
, {
|
|
37
|
+
// TODO: remove appElement and put in the test : "KitModal.setAppElement(document.body) once exposed"
|
|
38
|
+
appElement: document.body, title: t('explorer.save-view'), showCloseIcon: false, close: _toggleModal, isOpen: isOpen, footer: _jsxs(_Fragment, { children: [_jsx(KitButton, { type: "secondary", onClick: _toggleModal, icon: _jsx(FaTimes, {}), children: t('global.close') }), _jsx(KitButton, { type: "primary", onClick: _handleSaveView, icon: _jsx(FaSave, {}), children: t('global.save') })] }), children: _jsx(AntForm, { name: "label", form: form, initialValues: { ...view.viewLabels }, children: _jsx(KitInputWrapper, { label: String(t('explorer.view-name')), children: availableLangs.map((lang, index) => (_jsx(AntForm.Item, { name: lang, rules: [
|
|
39
|
+
{ required: lang === defaultLang, message: String(t('errors.standard_field_required')) }
|
|
40
|
+
], children: _jsx(KitInput, { label: lang, required: lang === defaultLang, onMouseDown: _preventCloseSettingsPanel, onBlur: _onCheck }) }, index))) }) }) }));
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=SaveViewModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveViewModal.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/save-view/SaveViewModal.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,OAAO,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AACnF,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAC,sBAAsB,EAAC,MAAM,+CAA+C,CAAC;AAOrF,MAAM,CAAC,MAAM,aAAa,GAAsC,CAAC,EAAC,MAAM,EAAE,OAAO,EAAC,EAAE,EAAE;IAClF,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,WAAW,EAAE,cAAc,EAAC,GAAG,OAAO,EAAE,CAAC;IAEhD,MAAM,EAAC,IAAI,EAAC,GAAG,sBAAsB,EAAE,CAAC;IACxC,MAAM,EAAC,cAAc,EAAC,GAAG,cAAc,EAAE,CAAC;IAE1C,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAEjC,MAAM,YAAY,GAAG,GAAG,EAAE;QACtB,IAAI,MAAM,EAAE,CAAC;YACT,IAAI,CAAC,WAAW,EAAE,CAAC;QACvB,CAAC;QACD,OAAO,EAAE,CAAC;IACd,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,GAAG,EAAE;QACzB,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAA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I,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,EAAC,GAAG,IAAI,CAAC,UAAU,EAAC,YACjE,KAAC,eAAe,IAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,YAClD,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CACjC,KAAC,OAAO,CAAC,IAAI,IAET,IAAI,EAAE,IAAI,EACV,KAAK,EAAE;wBACH,EAAC,QAAQ,EAAE,IAAI,KAAK,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,EAAC;qBACzF,YAED,KAAC,QAAQ,IACL,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,IAAI,KAAK,WAAW,EAC9B,WAAW,EAAE,0BAA0B,EACvC,MAAM,EAAE,QAAQ,GAClB,IAXG,KAAK,CAYC,CAClB,CAAC,GACY,GACZ,GACH,CACd,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { useState } from 'react';
|
|
6
|
+
import { SaveViewModal } from './SaveViewModal';
|
|
7
|
+
export const useSaveView = () => {
|
|
8
|
+
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
9
|
+
const _toggleModal = () => {
|
|
10
|
+
setIsModalOpen(!isModalOpen);
|
|
11
|
+
};
|
|
12
|
+
return {
|
|
13
|
+
saveViewModal: _jsx(SaveViewModal, { isOpen: isModalOpen, onClose: _toggleModal }),
|
|
14
|
+
toggleModal: _toggleModal
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=useSaveView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSaveView.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/save-view/useSaveView.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC5B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEtD,MAAM,YAAY,GAAG,GAAG,EAAE;QACtB,cAAc,CAAC,CAAC,WAAW,CAAC,CAAC;IACjC,CAAC,CAAC;IAEF,OAAO;QACH,aAAa,EAAE,KAAC,aAAa,IAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,GAAI;QAC5E,WAAW,EAAE,YAAY;KAC5B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FaEye, FaEyeSlash, FaSearch } from 'react-icons/fa';
|
|
3
3
|
import { KitInput, KitTypography } from 'aristid-ds';
|
|
4
4
|
import styled from 'styled-components';
|
|
@@ -10,6 +10,10 @@ import { useAttributeDetailsData } from '../_shared/useAttributeDetailsData';
|
|
|
10
10
|
import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
|
|
11
11
|
import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
|
|
12
12
|
import { SortListItem } from './SortListItem';
|
|
13
|
+
const StyledListContainer = styled.div `
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
`;
|
|
13
17
|
const StyledList = styled.ul `
|
|
14
18
|
padding: calc(var(--general-spacing-s) * 1px) 0;
|
|
15
19
|
margin: 0;
|
|
@@ -24,18 +28,18 @@ const StyledFaEye = styled(FaEye) `
|
|
|
24
28
|
`;
|
|
25
29
|
export const SortItems = ({ libraryId }) => {
|
|
26
30
|
const { t } = useSharedTranslation();
|
|
27
|
-
const { view
|
|
31
|
+
const { view, dispatch } = useViewSettingsContext();
|
|
28
32
|
const { onSearchChanged, searchFilteredColumnsIds, attributeDetailsById } = useAttributeDetailsData(libraryId);
|
|
29
33
|
const sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
|
|
30
34
|
coordinateGetter: sortableKeyboardCoordinates
|
|
31
35
|
}));
|
|
32
|
-
const _toggleColumnVisibility = (
|
|
33
|
-
const isAttributeAlreadySorting = sort.some(sortItem => sortItem.
|
|
36
|
+
const _toggleColumnVisibility = (field) => () => {
|
|
37
|
+
const isAttributeAlreadySorting = view.sort.some(sortItem => sortItem.field === field);
|
|
34
38
|
if (isAttributeAlreadySorting) {
|
|
35
39
|
dispatch({
|
|
36
40
|
type: ViewSettingsActionTypes.REMOVE_SORT,
|
|
37
41
|
payload: {
|
|
38
|
-
|
|
42
|
+
field
|
|
39
43
|
}
|
|
40
44
|
});
|
|
41
45
|
}
|
|
@@ -44,32 +48,32 @@ export const SortItems = ({ libraryId }) => {
|
|
|
44
48
|
type: ViewSettingsActionTypes.ADD_SORT,
|
|
45
49
|
payload: {
|
|
46
50
|
order: SortOrder.asc,
|
|
47
|
-
|
|
51
|
+
field
|
|
48
52
|
}
|
|
49
53
|
});
|
|
50
54
|
}
|
|
51
55
|
};
|
|
52
|
-
const _changeOrderActiveFilterTo = (
|
|
56
|
+
const _changeOrderActiveFilterTo = (field) => (order) => {
|
|
53
57
|
dispatch({
|
|
54
58
|
type: ViewSettingsActionTypes.CHANGE_SORT_ORDER,
|
|
55
59
|
payload: {
|
|
56
|
-
|
|
60
|
+
field,
|
|
57
61
|
order
|
|
58
62
|
}
|
|
59
63
|
});
|
|
60
64
|
};
|
|
61
65
|
const _handleDragEnd = ({ active: draggedElement, over: dropTarget }) => {
|
|
62
|
-
const indexFrom = activeFilters.findIndex(({
|
|
63
|
-
const indexTo = activeFilters.findIndex(({
|
|
66
|
+
const indexFrom = activeFilters.findIndex(({ field }) => field === String(draggedElement.id));
|
|
67
|
+
const indexTo = activeFilters.findIndex(({ field }) => field === String(dropTarget?.id));
|
|
64
68
|
if (!dropTarget || indexFrom === indexTo || indexTo === -1) {
|
|
65
69
|
return;
|
|
66
70
|
}
|
|
67
71
|
dispatch({ type: ViewSettingsActionTypes.MOVE_SORT, payload: { indexFrom, indexTo } });
|
|
68
72
|
};
|
|
69
|
-
const activeFilters = sort.filter(({
|
|
70
|
-
const inactiveFilters = searchFilteredColumnsIds.filter(
|
|
71
|
-
return (_jsxs(
|
|
72
|
-
label: attributeDetailsById[
|
|
73
|
+
const activeFilters = view.sort.filter(({ field }) => searchFilteredColumnsIds.includes(field));
|
|
74
|
+
const inactiveFilters = searchFilteredColumnsIds.filter(field => view.sort.every(sortItem => sortItem.field !== field));
|
|
75
|
+
return (_jsxs(StyledListContainer, { children: [activeFilters.length > 0 && (_jsx(StyledList, { "aria-label": t('explorer.sort-list.active'), children: _jsx(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: _handleDragEnd, children: _jsx(SortableContext, { items: activeFilters.map(({ field }) => ({ id: field })), strategy: verticalListSortingStrategy, children: activeFilters.map(({ field, order }) => (_jsx(SortListItem, { attributeId: field, isDraggable: true, filterChipProps: {
|
|
76
|
+
label: attributeDetailsById[field].label,
|
|
73
77
|
values: [
|
|
74
78
|
order === SortOrder.asc
|
|
75
79
|
? t('explorer.sort-ascending')
|
|
@@ -90,20 +94,20 @@ export const SortItems = ({ libraryId }) => {
|
|
|
90
94
|
label: t('explorer.sort-descending')
|
|
91
95
|
}
|
|
92
96
|
],
|
|
93
|
-
onSelect: ({ selectedKeys: [newOrder] }) => _changeOrderActiveFilterTo(
|
|
94
|
-
onDeselect: ({ selectedKeys: [newOrder] }) => _changeOrderActiveFilterTo(
|
|
97
|
+
onSelect: ({ selectedKeys: [newOrder] }) => _changeOrderActiveFilterTo(field)(newOrder),
|
|
98
|
+
onDeselect: ({ selectedKeys: [newOrder] }) => _changeOrderActiveFilterTo(field)(newOrder)
|
|
95
99
|
}
|
|
96
100
|
}
|
|
97
101
|
}, visibilityButtonProps: {
|
|
98
102
|
icon: _jsx(StyledFaEye, {}),
|
|
99
103
|
title: String(t('explorer.hide')),
|
|
100
|
-
onClick: _toggleColumnVisibility(
|
|
101
|
-
} },
|
|
102
|
-
label: attributeDetailsById[
|
|
104
|
+
onClick: _toggleColumnVisibility(field)
|
|
105
|
+
} }, field))) }) }) })), _jsx(KitTypography.Title, { level: "h4", children: t('explorer.available-attributes') }), _jsx(KitInput, { placeholder: String(t('global.search')), onChange: onSearchChanged, allowClear: true, prefix: _jsx(FaSearch, {}) }), _jsx(StyledList, { "aria-label": t('explorer.sort-list.inactive'), children: inactiveFilters.map(field => (_jsx(SortListItem, { attributeId: field, filterChipProps: {
|
|
106
|
+
label: attributeDetailsById[field].label
|
|
103
107
|
}, visibilityButtonProps: {
|
|
104
108
|
icon: _jsx(StyledEyeSlash, {}),
|
|
105
109
|
title: String(t('explorer.show')),
|
|
106
|
-
onClick: _toggleColumnVisibility(
|
|
107
|
-
} },
|
|
110
|
+
onClick: _toggleColumnVisibility(field)
|
|
111
|
+
} }, field))) })] }));
|
|
108
112
|
};
|
|
109
113
|
//# sourceMappingURL=SortItems.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortItems.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/sort-items/SortItems.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AACxC,OAAO,EACH,aAAa,EACb,UAAU,EAEV,cAAc,EACd,aAAa,EACb,SAAS,EACT,UAAU,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,eAAe,EAAE,2BAA2B,EAAE,2BAA2B,EAAC,MAAM,mBAAmB,CAAC;AAC5G,OAAO,EAAC,uBAAuB,EAAC,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAC,uBAAuB,EAAC,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAC,sBAAsB,EAAC,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C,MAAM,UAAU,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;CAK3B,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;;CAExC,CAAC;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEhC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAA2C,CAAC,EAAC,SAAS,EAAC,EAAE,EAAE;IAC7E,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,
|
|
1
|
+
{"version":3,"file":"SortItems.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/sort-items/SortItems.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AACxC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C,KAAK,CAAC,CAAC,KAAK;qBAC3C,EACD,qBAAqB,EAAE;wBACnB,IAAI,EAAE,KAAC,cAAc,KAAG;wBACxB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;wBACjC,OAAO,EAAE,uBAAuB,CAAC,KAAK,CAAC;qBAC1C,IATI,KAAK,CAUZ,CACL,CAAC,GACO,IACK,CACzB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -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 {
|
|
2
|
+
import { Entrypoint, ExplorerFilter } 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,31 @@ 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";
|
|
27
|
+
readonly UPDATE_VIEW_NAME: "UPDATE_VIEW_NAME";
|
|
21
28
|
};
|
|
22
29
|
export interface IViewSettingsState {
|
|
30
|
+
libraryId: string;
|
|
31
|
+
viewId?: string;
|
|
32
|
+
viewLabels?: Record<string, string>;
|
|
33
|
+
entrypoint: Entrypoint;
|
|
23
34
|
viewType: ViewType;
|
|
24
35
|
attributesIds: string[];
|
|
25
36
|
fulltextSearch: string;
|
|
26
37
|
sort: Array<{
|
|
27
|
-
|
|
38
|
+
field: string;
|
|
28
39
|
order: SortOrder;
|
|
29
40
|
}>;
|
|
30
41
|
pageSize: number;
|
|
31
|
-
filters:
|
|
42
|
+
filters: ExplorerFilter[];
|
|
32
43
|
maxFilters: number;
|
|
33
|
-
|
|
44
|
+
initialViewSettings: Pick<IViewSettingsState, 'viewType' | 'attributesIds' | 'sort' | 'pageSize' | 'filters'>;
|
|
45
|
+
massSelection: MassSelection;
|
|
34
46
|
}
|
|
35
47
|
interface IViewSettingsActionChangePageSize {
|
|
36
48
|
type: typeof ViewSettingsActionTypes.CHANGE_PAGE_SIZE;
|
|
@@ -69,20 +81,20 @@ interface IViewSettingsActionResetAttributes {
|
|
|
69
81
|
interface IViewSettingsActionAddSort {
|
|
70
82
|
type: typeof ViewSettingsActionTypes.ADD_SORT;
|
|
71
83
|
payload: {
|
|
72
|
-
|
|
84
|
+
field: string;
|
|
73
85
|
order: SortOrder;
|
|
74
86
|
};
|
|
75
87
|
}
|
|
76
88
|
interface IViewSettingsActionRemoveSort {
|
|
77
89
|
type: typeof ViewSettingsActionTypes.REMOVE_SORT;
|
|
78
90
|
payload: {
|
|
79
|
-
|
|
91
|
+
field: string;
|
|
80
92
|
};
|
|
81
93
|
}
|
|
82
94
|
interface IViewSettingsActionChangeSortOrder {
|
|
83
95
|
type: typeof ViewSettingsActionTypes.CHANGE_SORT_ORDER;
|
|
84
96
|
payload: {
|
|
85
|
-
|
|
97
|
+
field: string;
|
|
86
98
|
order: SortOrder;
|
|
87
99
|
};
|
|
88
100
|
}
|
|
@@ -104,17 +116,19 @@ interface IViewSettingsActionClearFulltextSearch {
|
|
|
104
116
|
}
|
|
105
117
|
interface IViewSettingsActionAddFilter {
|
|
106
118
|
type: typeof ViewSettingsActionTypes.ADD_FILTER;
|
|
107
|
-
payload: Omit<
|
|
119
|
+
payload: Omit<ExplorerFilter, 'id' | 'value' | 'condition'>;
|
|
120
|
+
}
|
|
121
|
+
interface IViewSettingsActionResetFilter {
|
|
122
|
+
type: typeof ViewSettingsActionTypes.RESET_FILTER;
|
|
123
|
+
payload: Pick<ExplorerFilter, 'id'>;
|
|
108
124
|
}
|
|
109
125
|
interface IViewSettingsActionRemoveFilter {
|
|
110
126
|
type: typeof ViewSettingsActionTypes.REMOVE_FILTER;
|
|
111
|
-
payload:
|
|
112
|
-
id: string;
|
|
113
|
-
};
|
|
127
|
+
payload: Pick<ExplorerFilter, 'id'>;
|
|
114
128
|
}
|
|
115
129
|
interface IViewSettingsActionChangeFilterConfig {
|
|
116
130
|
type: typeof ViewSettingsActionTypes.CHANGE_FILTER_CONFIG;
|
|
117
|
-
payload:
|
|
131
|
+
payload: ExplorerFilter;
|
|
118
132
|
}
|
|
119
133
|
interface IViewSettingsActionMoveFilter {
|
|
120
134
|
type: typeof ViewSettingsActionTypes.MOVE_FILTER;
|
|
@@ -123,8 +137,29 @@ interface IViewSettingsActionMoveFilter {
|
|
|
123
137
|
indexTo: number;
|
|
124
138
|
};
|
|
125
139
|
}
|
|
126
|
-
|
|
140
|
+
interface IViewSettingsActionReset {
|
|
141
|
+
type: typeof ViewSettingsActionTypes.RESET;
|
|
142
|
+
payload: IViewSettingsState;
|
|
143
|
+
}
|
|
144
|
+
interface IViewSettingsActionSetSelectedKeys {
|
|
145
|
+
type: typeof ViewSettingsActionTypes.SET_SELECTED_KEYS;
|
|
146
|
+
payload: MassSelection;
|
|
147
|
+
}
|
|
148
|
+
interface IViewSettingsActionRestoreInitialViewSettings {
|
|
149
|
+
type: typeof ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS;
|
|
150
|
+
}
|
|
151
|
+
interface IViewSettingsActionUpdateViewName {
|
|
152
|
+
type: typeof ViewSettingsActionTypes.UPDATE_VIEW_NAME;
|
|
153
|
+
payload: Record<string, string>;
|
|
154
|
+
}
|
|
155
|
+
type Reducer<PAYLOAD extends {
|
|
156
|
+
type: keyof typeof ViewSettingsActionTypes;
|
|
157
|
+
payload?: unknown;
|
|
158
|
+
} = {
|
|
159
|
+
type: any;
|
|
160
|
+
payload: 'no_payload';
|
|
161
|
+
}> = PAYLOAD['payload'] extends 'no_payload' ? (state: IViewSettingsState) => IViewSettingsState : (state: IViewSettingsState, payload: PAYLOAD['payload']) => IViewSettingsState;
|
|
127
162
|
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;
|
|
163
|
+
export type IViewSettingsAction = IViewSettingsActionResetAttributes | IViewSettingsActionAddAttribute | IViewSettingsActionRemoveAttribute | IViewSettingsActionMoveAttribute | IViewSettingsActionChangeViewType | IViewSettingsActionAddSort | IViewSettingsActionRemoveSort | IViewSettingsActionChangeSortOrder | IViewSettingsActionMoveSort | IViewSettingsActionChangePageSize | IViewSettingsActionChangeFulltextSearch | IViewSettingsActionClearFulltextSearch | IViewSettingsActionAddFilter | IViewSettingsActionResetFilter | IViewSettingsActionRemoveFilter | IViewSettingsActionChangeFilterConfig | IViewSettingsActionMoveFilter | IViewSettingsActionReset | IViewSettingsActionSetSelectedKeys | IViewSettingsActionRestoreInitialViewSettings | IViewSettingsActionUpdateViewName;
|
|
129
164
|
export declare const viewSettingsReducer: (state: IViewSettingsState, action: IViewSettingsAction) => IViewSettingsState;
|
|
130
165
|
export {};
|