@leav/ui 0.3.6-683846a → 0.3.6-692fc29
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.js +1 -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 +1 -1
- package/dist/__mocks__/common/value.js.map +1 -1
- package/dist/_gqlTypes/index.d.ts +445 -35
- package/dist/_gqlTypes/index.js +253 -37
- 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/records/createRecordMutation.js +2 -3
- package/dist/_queries/records/createRecordMutation.js.map +1 -1
- package/dist/_queries/records/getRecordColumnsValues.d.ts +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/_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 +1 -1
- package/dist/_utils/index.js.map +1 -1
- 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/EditApplication/EditApplicationInfo/EditApplicationInfoForm/EditApplicationInfoForm.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/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/EditTreeInfoForm.d.ts +1 -1
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/EditTreeInfoForm.js.map +1 -1
- package/dist/components/Explorer/DataView.d.ts +8 -2
- package/dist/components/Explorer/DataView.js +76 -22
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +10 -4
- package/dist/components/Explorer/Explorer.js +84 -30
- 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 +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 +1 -0
- package/dist/components/Explorer/_constants.js +1 -0
- package/dist/components/Explorer/_constants.js.map +1 -1
- 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 +13 -7
- package/dist/components/Explorer/_queries/useExplorerData.js +71 -82
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +82 -14
- 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/actions-primary/usePrimaryActions.d.ts +17 -0
- package/dist/components/Explorer/actions-primary/usePrimaryActions.js +27 -0
- package/dist/components/Explorer/actions-primary/usePrimaryActions.js.map +1 -0
- package/dist/components/Explorer/{nullValuesConditions.d.ts → conditionsHelper.d.ts} +1 -0
- package/dist/components/Explorer/{nullValuesConditions.js → conditionsHelper.js} +3 -1
- 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 +73 -0
- package/dist/components/Explorer/link-item/LinkModal.js.map +1 -0
- package/dist/components/Explorer/link-item/useLinkMassAction.d.ts +24 -0
- package/dist/components/Explorer/link-item/useLinkMassAction.js +57 -0
- package/dist/components/Explorer/link-item/useLinkMassAction.js.map +1 -0
- package/dist/components/Explorer/list-saved-views/SavedViews.d.ts +2 -0
- package/dist/components/Explorer/list-saved-views/SavedViews.js +74 -0
- package/dist/components/Explorer/list-saved-views/SavedViews.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 +8 -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/_shared/useTransformFilters.d.ts +17 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js +93 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +1 -2
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +13 -3
- 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 +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +16 -31
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -1
- 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 +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +13 -37
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -1
- 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 +37 -20
- 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 +8 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js +41 -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 +7 -32
- 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 +7 -32
- 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 +13 -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 +6 -4
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +17 -19
- 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 -3
- 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.d.ts +1 -0
- 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 +9 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +34 -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.js +10 -44
- 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 +8 -0
- package/dist/components/Explorer/manage-view-settings/save-view/SaveViewModal.js +40 -0
- package/dist/components/Explorer/manage-view-settings/save-view/SaveViewModal.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/ViewActionsButtons.d.ts +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/ViewActionsButtons.js +24 -0
- package/dist/components/Explorer/manage-view-settings/save-view/ViewActionsButtons.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js +24 -0
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js +51 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js +20 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js +48 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +13 -11
- 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 +16 -0
- 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 -9
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +112 -20
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
- 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/useLoadView.d.ts +3 -0
- package/dist/components/Explorer/useLoadView.js +79 -0
- package/dist/components/Explorer/useLoadView.js.map +1 -0
- package/dist/components/Explorer/useSearchInput.d.ts +10 -4
- package/dist/components/Explorer/useSearchInput.js +10 -1
- package/dist/components/Explorer/useSearchInput.js.map +1 -1
- package/dist/components/Explorer/useViewSettingsReducer.d.ts +2 -2
- package/dist/components/Explorer/useViewSettingsReducer.js +86 -59
- package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -1
- package/dist/components/ImportModal/ImportModalSelectFileStep/ImportModalSelectFileStep.js +1 -2
- package/dist/components/ImportModal/ImportModalSelectFileStep/ImportModalSelectFileStep.js.map +1 -1
- package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.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 +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +1 -1
- package/dist/components/LibraryItemsList/MenuView/MenuView.js +1 -1
- package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +81 -66
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +5 -5
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +8 -2
- package/dist/components/RecordEdition/EditRecordContent/_types.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/useCreateRecordMutation.d.ts +5 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js +28 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js.map +1 -0
- 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/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.js +89 -26
- 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 +46 -7
- 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 +12 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +7 -7
- 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/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/ValueMetadata → 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/ValueInfo → Breacrumb}/index.js +2 -2
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/index.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +44 -18
- 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 +3 -282
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +28 -61
- 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 +73 -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 → 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/AttributeDetails → 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/useExecuteSaveViewMutation.js +2 -1
- package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -1
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.d.ts +1 -1
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js +2 -2
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js.map +1 -1
- package/dist/locales/en/shared.json +60 -12
- package/dist/locales/fr/shared.json +62 -14
- package/package.json +4 -4
- package/dist/components/Explorer/display-view-filters/ExplorerToolBar.d.ts +0 -4
- package/dist/components/Explorer/display-view-filters/ExplorerToolBar.js +0 -47
- package/dist/components/Explorer/display-view-filters/ExplorerToolBar.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 -72
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js.map +0 -1
- package/dist/components/Explorer/nullValuesConditions.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.d.ts +0 -12
- 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 +0 -6
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"TextAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAC;AACnD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;;CAEnC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAoD,CAAC,EACnF,MAAM,EACN,cA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,CACX,KAAC,WAAW,IACR,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,EAC/C,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,SAAS,EAChC,QAAQ,EAAE,eAAe,GAC3B,CACL,IACF,CACN,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { IExplorerFilterStandard, IExplorerFilterLink, IExplorerFilterThrough } from '../../../_types';
|
|
3
|
+
export interface IFilterChildrenDropDownProps {
|
|
4
|
+
filter: IExplorerFilterStandard;
|
|
5
|
+
onFilterChange: (filterData: IExplorerFilterStandard) => void;
|
|
6
|
+
selectDropDownRef?: RefObject<HTMLDivElement>;
|
|
7
|
+
}
|
|
8
|
+
export interface IFilterChildrenLinkDropDownProps {
|
|
9
|
+
filter: IExplorerFilterLink | IExplorerFilterThrough;
|
|
10
|
+
onFilterChange: (filterData: IExplorerFilterLink | IExplorerFilterThrough) => void;
|
|
11
|
+
removeThroughCondition: boolean;
|
|
12
|
+
selectDropDownRef?: RefObject<HTMLDivElement>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/_types.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { AttributeFormat } from '../../../../../_gqlTypes';
|
|
2
|
-
import {
|
|
3
|
-
import { AttributeConditionType } from '../../../../../types';
|
|
4
|
-
export declare const
|
|
1
|
+
import { AttributeFormat, RecordFilterCondition } from '../../../../../_gqlTypes';
|
|
2
|
+
import { ExplorerFilter } from '../../../_types';
|
|
3
|
+
import { AttributeConditionType, ThroughConditionFilter } from '../../../../../types';
|
|
4
|
+
export declare const conditionsByFormat: Record<AttributeFormat, RecordFilterCondition[]>;
|
|
5
|
+
export declare const linkFilterConditions: Array<RecordFilterCondition | ThroughConditionFilter>;
|
|
6
|
+
export declare const useConditionsOptionsByType: (filter: ExplorerFilter) => {
|
|
5
7
|
conditionOptionsByType: {
|
|
6
8
|
label: string;
|
|
7
9
|
value: AttributeConditionType;
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
// This file is released under LGPL V3
|
|
3
3
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
4
|
import { AttributeFormat } from '../../../../../_gqlTypes';
|
|
5
|
+
import { isExplorerFilterStandard } from '../../../_types';
|
|
5
6
|
import { AttributeConditionFilter } from '../../../../../types';
|
|
6
7
|
import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
7
|
-
const conditionsByFormat = {
|
|
8
|
+
export const conditionsByFormat = {
|
|
8
9
|
[AttributeFormat.text]: [
|
|
9
10
|
AttributeConditionFilter.CONTAINS,
|
|
10
11
|
AttributeConditionFilter.NOT_CONTAINS,
|
|
@@ -22,7 +23,6 @@ const conditionsByFormat = {
|
|
|
22
23
|
AttributeConditionFilter.IS_NOT_EMPTY
|
|
23
24
|
],
|
|
24
25
|
[AttributeFormat.boolean]: [],
|
|
25
|
-
[AttributeFormat.color]: [],
|
|
26
26
|
[AttributeFormat.date]: [
|
|
27
27
|
AttributeConditionFilter.EQUAL,
|
|
28
28
|
AttributeConditionFilter.NOT_EQUAL,
|
|
@@ -37,19 +37,10 @@ const conditionsByFormat = {
|
|
|
37
37
|
AttributeConditionFilter.NEXT_MONTH,
|
|
38
38
|
AttributeConditionFilter.BETWEEN
|
|
39
39
|
],
|
|
40
|
-
[AttributeFormat.date_range]: [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
AttributeConditionFilter.START_BEFORE,
|
|
45
|
-
AttributeConditionFilter.END_ON,
|
|
46
|
-
AttributeConditionFilter.END_AFTER,
|
|
47
|
-
AttributeConditionFilter.END_BEFORE,
|
|
48
|
-
AttributeConditionFilter.IS_EMPTY,
|
|
49
|
-
AttributeConditionFilter.IS_NOT_EMPTY
|
|
50
|
-
],
|
|
51
|
-
[AttributeFormat.encrypted]: [],
|
|
52
|
-
[AttributeFormat.extended]: [],
|
|
40
|
+
[AttributeFormat.date_range]: [AttributeConditionFilter.IS_EMPTY, AttributeConditionFilter.IS_NOT_EMPTY],
|
|
41
|
+
[AttributeFormat.encrypted]: [AttributeConditionFilter.IS_EMPTY, AttributeConditionFilter.IS_NOT_EMPTY],
|
|
42
|
+
[AttributeFormat.extended]: [AttributeConditionFilter.IS_EMPTY, AttributeConditionFilter.IS_NOT_EMPTY],
|
|
43
|
+
[AttributeFormat.color]: [AttributeConditionFilter.IS_EMPTY, AttributeConditionFilter.IS_NOT_EMPTY],
|
|
53
44
|
[AttributeFormat.numeric]: [
|
|
54
45
|
AttributeConditionFilter.EQUAL,
|
|
55
46
|
AttributeConditionFilter.NOT_EQUAL,
|
|
@@ -59,6 +50,10 @@ const conditionsByFormat = {
|
|
|
59
50
|
AttributeConditionFilter.GREATER_THAN
|
|
60
51
|
]
|
|
61
52
|
};
|
|
53
|
+
export const linkFilterConditions = [
|
|
54
|
+
...conditionsByFormat[AttributeFormat.text],
|
|
55
|
+
AttributeConditionFilter.THROUGH
|
|
56
|
+
];
|
|
62
57
|
const _getAttributeConditionOptions = (t) => [
|
|
63
58
|
{ label: t('filters.contains'), value: AttributeConditionFilter.CONTAINS },
|
|
64
59
|
{ label: t('filters.not-contains'), value: AttributeConditionFilter.NOT_CONTAINS },
|
|
@@ -97,13 +92,16 @@ const _getAttributeConditionOptions = (t) => [
|
|
|
97
92
|
];
|
|
98
93
|
export const useConditionsOptionsByType = (filter) => {
|
|
99
94
|
const { t } = useSharedTranslation();
|
|
100
|
-
const attributeConditionOptions = _getAttributeConditionOptions(t);
|
|
101
95
|
return {
|
|
102
|
-
conditionOptionsByType:
|
|
103
|
-
.filter(({ value }) =>
|
|
96
|
+
conditionOptionsByType: _getAttributeConditionOptions(t)
|
|
97
|
+
.filter(({ value }) => isExplorerFilterStandard(filter)
|
|
98
|
+
? conditionsByFormat[filter.attribute.format].includes(value)
|
|
99
|
+
: linkFilterConditions.includes(value))
|
|
104
100
|
.map(option => ({
|
|
105
101
|
...option,
|
|
106
|
-
label: option.textByFormat?.[filter.attribute.format]
|
|
102
|
+
label: isExplorerFilterStandard(filter) && option.textByFormat?.[filter.attribute.format]
|
|
103
|
+
? option.textByFormat?.[filter.attribute.format]
|
|
104
|
+
: option.label
|
|
107
105
|
}))
|
|
108
106
|
};
|
|
109
107
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConditionOptionsByType.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"useConditionOptionsByType.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,eAAe,EAAwB,MAAM,eAAe,CAAC;AACrE,OAAO,EAAiB,wBAAwB,EAAC,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAC,wBAAwB,EAAiD,MAAM,WAAW,CAAC;AAEnG,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,MAAM,CAAC,MAAM,kBAAkB,GAAqD;IAChF,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE;QACpB,wBAAwB,CAAC,QAAQ;QACjC,wBAAwB,CAAC,YAAY;QACrC,wBAAwB,CAAC,KAAK;QAC9B,wBAAwB,CAAC,SAAS;QAClC,wBAAwB,CAAC,UAAU;QACnC,wBAAwB,CAAC,QAAQ;QACjC,wBAAwB,CAAC,QAAQ;QACjC,wBAAwB,CAAC,YAAY;KACxC;IACD,CAAC,eAAe,CAAC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CHANGED
|
@@ -4,12 +4,12 @@ interface IActiveSettings {
|
|
|
4
4
|
title: string;
|
|
5
5
|
onClickLeftButton?: () => void;
|
|
6
6
|
}
|
|
7
|
-
export type SettingsPanelPages = 'router-menu' | 'configure-display' | 'sort-items' | 'filter-items';
|
|
7
|
+
export type SettingsPanelPages = 'router-menu' | 'configure-display' | 'sort-items' | 'filter-items' | 'my-views';
|
|
8
8
|
export interface IEditSettingsContext {
|
|
9
9
|
setActiveSettings: (params: IActiveSettings) => void;
|
|
10
10
|
activeSettings: null | IActiveSettings;
|
|
11
|
-
panelElement: Element | DocumentFragment | null;
|
|
12
|
-
|
|
11
|
+
panelElement: (() => Element | DocumentFragment) | null;
|
|
12
|
+
closeSettingsPanel: () => void;
|
|
13
13
|
}
|
|
14
14
|
export declare const EditSettingsContext: import("react").Context<IEditSettingsContext>;
|
|
15
15
|
export {};
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js
CHANGED
|
@@ -8,8 +8,8 @@ export const EditSettingsContext = createContext({
|
|
|
8
8
|
},
|
|
9
9
|
activeSettings: null,
|
|
10
10
|
panelElement: null,
|
|
11
|
-
|
|
12
|
-
throw new Error('
|
|
11
|
+
closeSettingsPanel: () => {
|
|
12
|
+
throw new Error('Element must be wrapped into EditSettingsContextProvider');
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
//# sourceMappingURL=EditSettingsContext.js.map
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditSettingsContext.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAY,MAAM,OAAO,CAAC;AAiB/C,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAuB;IACnE,iBAAiB,EAAE,GAAG,EAAE;QACpB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;IACD,cAAc,EAAE,IAAI;IACpB,YAAY,EAAE,IAAI;IAClB,
|
|
1
|
+
{"version":3,"file":"EditSettingsContext.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAY,MAAM,OAAO,CAAC;AAiB/C,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAuB;IACnE,iBAAiB,EAAE,GAAG,EAAE;QACpB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;IACD,cAAc,EAAE,IAAI;IACpB,YAAY,EAAE,IAAI;IAClB,kBAAkB,EAAE,GAAG,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAChF,CAAC;CACJ,CAAC,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { FunctionComponent } from 'react';
|
|
|
2
2
|
import { IEditSettingsContext } from './EditSettingsContext';
|
|
3
3
|
interface IEditSettingsContextProviderProps {
|
|
4
4
|
panelElement?: IEditSettingsContext['panelElement'];
|
|
5
|
+
children: React.ReactNode;
|
|
5
6
|
}
|
|
6
7
|
export declare const EditSettingsContextProvider: FunctionComponent<IEditSettingsContextProviderProps>;
|
|
7
8
|
export {};
|
|
@@ -6,12 +6,12 @@ import { useState } from 'react';
|
|
|
6
6
|
import { EditSettingsContext } from './EditSettingsContext';
|
|
7
7
|
export const EditSettingsContextProvider = ({ children, panelElement }) => {
|
|
8
8
|
const [activeSettings, setActiveSettings] = useState(null);
|
|
9
|
-
const
|
|
9
|
+
const closeSettingsPanel = () => setActiveSettings(null);
|
|
10
10
|
return (_jsx(EditSettingsContext.Provider, { value: {
|
|
11
11
|
activeSettings,
|
|
12
12
|
setActiveSettings,
|
|
13
13
|
panelElement: panelElement ?? null,
|
|
14
|
-
|
|
14
|
+
closeSettingsPanel
|
|
15
15
|
}, children: children }));
|
|
16
16
|
};
|
|
17
17
|
//# sourceMappingURL=EditSettingsContextProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditSettingsContextProvider.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoB,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EAAC,mBAAmB,EAAuB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"EditSettingsContextProvider.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoB,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EAAC,mBAAmB,EAAuB,MAAM,uBAAuB,CAAC;AAOhF,MAAM,CAAC,MAAM,2BAA2B,GAAyD,CAAC,EAC9F,QAAQ,EACR,YAAY,EACf,EAAE,EAAE;IACD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAyC,IAAI,CAAC,CAAC;IACnG,MAAM,kBAAkB,GAAG,GAAG,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEzD,OAAO,CACH,KAAC,mBAAmB,CAAC,QAAQ,IACzB,KAAK,EAAE;YACH,cAAc;YACd,iBAAiB;YACjB,YAAY,EAAE,YAAY,IAAI,IAAI;YAClC,kBAAkB;SACrB,YAEA,QAAQ,GACkB,CAClC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { useEditSettings } from './useEditSettings';
|
|
|
4
4
|
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
5
5
|
export const SidePanel = () => {
|
|
6
6
|
const { t } = useSharedTranslation();
|
|
7
|
-
const { activeSettings,
|
|
7
|
+
const { activeSettings, closeSettingsPanel } = useEditSettings();
|
|
8
8
|
if (!activeSettings) {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
@@ -12,8 +12,8 @@ export const SidePanel = () => {
|
|
|
12
12
|
const makeA11yBackButton = {
|
|
13
13
|
title: String(t('explorer.back')) /* TODO: avoid transform null to 'null' */
|
|
14
14
|
};
|
|
15
|
-
return (_jsx(KitSidePanel, { initialOpen: true, floating: true, closable: true, idCardProps: { title: activeSettings.title }, leftActionProps: activeSettings.onClickLeftButton
|
|
15
|
+
return (_jsx(KitSidePanel, { initialOpen: true, floating: true, closable: true, closeOnEsc: true, idCardProps: { title: activeSettings.title }, leftActionProps: activeSettings.onClickLeftButton
|
|
16
16
|
? { onClick: activeSettings.onClickLeftButton, ...makeA11yBackButton }
|
|
17
|
-
: undefined, onClose:
|
|
17
|
+
: undefined, onClose: closeSettingsPanel, children: activeSettings.content }));
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=SidePanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidePanel.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-settings/SidePanel.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AACxC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,MAAM,CAAC,MAAM,SAAS,GAAsB,GAAG,EAAE;IAC7C,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EAAC,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"SidePanel.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/open-view-settings/SidePanel.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AACxC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,MAAM,CAAC,MAAM,SAAS,GAAsB,GAAG,EAAE;IAC7C,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EAAC,cAAc,EAAE,kBAAkB,EAAC,GAAG,eAAe,EAAE,CAAC;IAE/D,IAAI,CAAC,cAAc,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,gEAAgE;IAEhE,MAAM,kBAAkB,GAA4C;QAChE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,0CAA0C;KAC/E,CAAC;IAEF,OAAO,CACH,KAAC,YAAY,IACT,WAAW,QACX,QAAQ,QACR,QAAQ,QACR,UAAU,QACV,WAAW,EAAE,EAAC,KAAK,EAAE,cAAc,CAAC,KAAK,EAAC,EAC1C,eAAe,EACX,cAAc,CAAC,iBAAiB;YAC5B,CAAC,CAAC,EAAC,OAAO,EAAE,cAAc,CAAC,iBAAiB,EAAE,GAAG,kBAAkB,EAAC;YACpE,CAAC,CAAC,SAAS,EAEnB,OAAO,EAAE,kBAAkB,YAE1B,cAAc,CAAC,OAAO,GACZ,CAClB,CAAC;AACN,CAAC,CAAC"}
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { SettingsPanelPages } from './EditSettingsContext';
|
|
2
|
-
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { IViewSettingsState } from '../store-view-settings/viewSettingsReducer';
|
|
4
|
+
import { FeatureHook } from '../../_types';
|
|
5
|
+
export declare const useOpenViewSettings: ({ view, isEnabled }: FeatureHook<{
|
|
6
|
+
view: IViewSettingsState;
|
|
7
|
+
}>) => {
|
|
3
8
|
openSettingsPanel: (pageName?: SettingsPanelPages) => void;
|
|
4
|
-
viewSettingsButton:
|
|
9
|
+
viewSettingsButton: ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
10
|
+
viewListButton: ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
11
|
+
viewName: string;
|
|
5
12
|
};
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js
CHANGED
|
@@ -1,20 +1,39 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, 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
|
-
import { KitButton } from 'aristid-ds';
|
|
6
|
-
import { FaSlidersH } from 'react-icons/fa';
|
|
5
|
+
import { KitButton, KitTag } from 'aristid-ds';
|
|
6
|
+
import { FaBars, 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
|
+
import styled from 'styled-components';
|
|
14
|
+
import { MASS_SELECTION_ALL } from '../../_constants';
|
|
15
|
+
const ModifiedStyledKitTag = styled(KitTag) `
|
|
16
|
+
margin: 0;
|
|
17
|
+
`;
|
|
18
|
+
export const useOpenViewSettings = ({ view, isEnabled = true }) => {
|
|
19
|
+
const { activeSettings, setActiveSettings, closeSettingsPanel } = useEditSettings();
|
|
20
|
+
const [button, setButton] = useState(null);
|
|
21
|
+
const [viewListButton, setViewListButton] = useState(null);
|
|
12
22
|
const { t } = useSharedTranslation();
|
|
23
|
+
const { lang } = useLang();
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (!isEnabled) {
|
|
26
|
+
closeSettingsPanel();
|
|
27
|
+
}
|
|
28
|
+
return () => {
|
|
29
|
+
closeSettingsPanel();
|
|
30
|
+
};
|
|
31
|
+
}, [isEnabled]);
|
|
13
32
|
const rootPanel = { pageName: 'router-menu', title: t('explorer.settings') };
|
|
14
33
|
const _changePanelPage = ({ pageName, title, onClickLeftButton }) => {
|
|
15
34
|
setActiveSettings({
|
|
16
35
|
...activeSettings,
|
|
17
|
-
content: _jsx(SettingsPanel, { library:
|
|
36
|
+
content: _jsx(SettingsPanel, { library: view.libraryId, page: pageName }),
|
|
18
37
|
title,
|
|
19
38
|
onClickLeftButton
|
|
20
39
|
});
|
|
@@ -31,9 +50,17 @@ export const useOpenViewSettings = (library) => {
|
|
|
31
50
|
}
|
|
32
51
|
_changePanelPage(chanelPageParams);
|
|
33
52
|
};
|
|
53
|
+
const viewName = localizedTranslation(view?.viewLabels ?? {}, lang);
|
|
54
|
+
const isMassSelectionAll = view.massSelection === MASS_SELECTION_ALL;
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
setButton(_jsx(KitButton, { type: "secondary", icon: _jsx(FaSlidersH, {}), onClick: () => _openSettingsPanel(), disabled: isMassSelectionAll, title: String(t('explorer.settings')) /* TODO: avoid transform null to 'null' */ }));
|
|
57
|
+
setViewListButton(_jsxs(KitButton, { type: "secondary", icon: _jsx(FaBars, {}), onClick: () => _openSettingsPanel('my-views'), disabled: isMassSelectionAll, title: String(t('explorer.manage-views')) /* TODO: avoid transform null to 'null' */, children: [viewName === '' ? t('explorer.manage-views') : viewName, view.viewModified && (_jsx(ModifiedStyledKitTag, { type: "error", idCardProps: { description: String(t('explorer.modified')) } }))] }));
|
|
58
|
+
}, [view.viewModified, viewName, isMassSelectionAll]);
|
|
34
59
|
return {
|
|
35
60
|
openSettingsPanel: _openSettingsPanel,
|
|
36
|
-
viewSettingsButton:
|
|
61
|
+
viewSettingsButton: button,
|
|
62
|
+
viewListButton,
|
|
63
|
+
viewName: viewName === '' ? t('explorer.default-view') : viewName
|
|
37
64
|
};
|
|
38
65
|
};
|
|
39
66
|
//# 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;
|
|
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,EAAE,MAAM,EAAC,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAe,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAExD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,kBAA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AC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,EAAC,GAAI,CACpG,IACO,CACf,CAAC;IACN,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAEtD,OAAO;QACH,iBAAiB,EAAE,kBAAkB;QACrC,kBAAkB,EAAE,MAAM;QAC1B,cAAc;QACd,QAAQ,EAAE,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,QAAQ;KACpE,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,70 +1,36 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
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 { FaFilter, FaList,
|
|
6
|
+
import { KitInput, KitTypography } from 'aristid-ds';
|
|
7
|
+
import { FaFilter, FaList, FaSortAlphaDown } from 'react-icons/fa';
|
|
8
8
|
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
9
9
|
import { ConfigureDisplay } from '../configure-display/ConfigureDisplay';
|
|
10
10
|
import { SortItems } from '../sort-items/SortItems';
|
|
11
11
|
import { SettingItem } from './SettingItem';
|
|
12
12
|
import { FilterItems } from '../filter-items/FilterItems';
|
|
13
13
|
import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
|
|
14
|
-
import useExecuteSaveViewMutation from '../../../../hooks/useExecuteSaveViewMutation';
|
|
15
|
-
import { useLang } from '../../../../hooks';
|
|
16
|
-
import { mapViewTypeFromExplorerToLegacy } from '../../_constants';
|
|
17
|
-
import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
|
|
18
14
|
import { useOpenViewSettings } from '../open-view-settings/useOpenViewSettings';
|
|
15
|
+
import { SavedViews } from '../../list-saved-views/SavedViews';
|
|
16
|
+
import { ViewActionsButtons } from '../save-view/ViewActionsButtons';
|
|
19
17
|
const ContentWrapperStyledDiv = styled.div `
|
|
20
18
|
display: flex;
|
|
21
19
|
flex-direction: column;
|
|
22
|
-
gap: calc(var(--general-spacing-s) * 1px);
|
|
23
20
|
justify-content: space-between;
|
|
24
21
|
height: 100%;
|
|
25
22
|
`;
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
justify-content: center;
|
|
29
|
-
gap: calc(var(--general-spacing-xs) * 1px);
|
|
30
|
-
padding: calc(var(--general-spacing-xxs) * 1px) 0;
|
|
23
|
+
const ViewNameStyledKitInput = styled(KitInput) `
|
|
24
|
+
margin-bottom: calc(var(--general-spacing-s) * 1px);
|
|
31
25
|
`;
|
|
32
26
|
const ConfigurationStyledMenu = styled.menu `
|
|
33
27
|
padding: 0;
|
|
34
28
|
`;
|
|
35
29
|
export const SettingsPanel = ({ library, page = 'router-menu' }) => {
|
|
36
30
|
const { t } = useSharedTranslation();
|
|
37
|
-
const {
|
|
38
|
-
const { openSettingsPanel } = useOpenViewSettings(
|
|
39
|
-
const { view, dispatch } = useViewSettingsContext();
|
|
40
|
-
const { saveView } = useExecuteSaveViewMutation();
|
|
41
|
-
const _handleSaveView = () => {
|
|
42
|
-
saveView({
|
|
43
|
-
view: {
|
|
44
|
-
id: view.viewId,
|
|
45
|
-
library,
|
|
46
|
-
shared: false,
|
|
47
|
-
display: {
|
|
48
|
-
type: mapViewTypeFromExplorerToLegacy[view.viewType]
|
|
49
|
-
},
|
|
50
|
-
filters: view.filters.map(filter => ({
|
|
51
|
-
field: filter.field,
|
|
52
|
-
value: filter.value,
|
|
53
|
-
condition: filter.condition
|
|
54
|
-
})),
|
|
55
|
-
sort: view.sort.map(({ field: attributeId, order }) => ({ field: attributeId, order })),
|
|
56
|
-
attributes: view.attributesIds,
|
|
57
|
-
label: {
|
|
58
|
-
//TODO: add a better label when view management is more advanced
|
|
59
|
-
[defaultLang]: 'user view'
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
const _handleReinitView = () => {
|
|
65
|
-
dispatch({ type: ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS });
|
|
66
|
-
};
|
|
31
|
+
const { view } = useViewSettingsContext();
|
|
32
|
+
const { openSettingsPanel, viewName } = useOpenViewSettings({ view, isEnabled: true });
|
|
67
33
|
// TODO: look for MemoryRouter
|
|
68
|
-
return (_jsxs(ContentWrapperStyledDiv, { children: [page === 'router-menu' && (_jsxs(_Fragment, { children: [_jsxs("nav", { children: [_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') }), _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') })] })] })
|
|
34
|
+
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') })] }))] })] }), _jsx(ViewActionsButtons, {})] })), page === 'configure-display' && _jsx(ConfigureDisplay, { libraryId: library }), page === 'sort-items' && _jsx(SortItems, { libraryId: library }), page === 'filter-items' && _jsx(FilterItems, { libraryId: library }), page === 'my-views' && _jsx(SavedViews, {})] }));
|
|
69
35
|
};
|
|
70
36
|
//# 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;AAEvC,OAAO,EAAC,
|
|
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,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,WAAW,EAAC,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAC,sBAAsB,EAAC,MAAM,+CAA+C,C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E,KAAC,QAAQ,KAAG,EAClB,KAAK,EAAE,CAAC,CAAC,kBAAkB,CAAC,EAC5B,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,8BAA8B,EAAE,EAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAC,CAAC,CAAC,EAC9E,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,cAAc,CAAC,GAClD,EACF,KAAC,WAAW,IACR,IAAI,EAAE,KAAC,eAAe,KAAG,EACzB,KAAK,EAAE,CAAC,CAAC,qBAAqB,CAAC,EAC/B,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,YAAY,CAAC,GAChD,IACH,CACN,IACqB,IACxB,EACN,KAAC,kBAAkB,KAAG,IACvB,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,EAC9D,IAAI,KAAK,UAAU,IAAI,KAAC,UAAU,KAAG,IAChB,CAC7B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
|
|
7
|
+
export const SaveViewModal = ({ isOpen, onSave, onClose }) => {
|
|
8
|
+
const { t } = useSharedTranslation();
|
|
9
|
+
const { defaultLang, availableLangs } = useLang();
|
|
10
|
+
const { view } = useViewSettingsContext();
|
|
11
|
+
const [form] = AntForm.useForm();
|
|
12
|
+
const _toggleModal = () => {
|
|
13
|
+
if (isOpen) {
|
|
14
|
+
form.resetFields();
|
|
15
|
+
}
|
|
16
|
+
onClose();
|
|
17
|
+
};
|
|
18
|
+
const _handleSaveView = () => {
|
|
19
|
+
form.validateFields();
|
|
20
|
+
const hasError = form.getFieldsError().some(field => field.errors.length > 0);
|
|
21
|
+
const hasOnlyEmptyField = Object.entries(form.getFieldsValue()).some(([language, value]) => language === defaultLang && !value);
|
|
22
|
+
if (hasError || hasOnlyEmptyField) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
onSave(form.getFieldsValue());
|
|
26
|
+
onClose();
|
|
27
|
+
};
|
|
28
|
+
const _onCheck = () => {
|
|
29
|
+
form.validateFields();
|
|
30
|
+
};
|
|
31
|
+
const _preventCloseSettingsPanel = e => e.stopPropagation();
|
|
32
|
+
return (_jsx(KitModal
|
|
33
|
+
// TODO: remove appElement and put in the test : "KitModal.setAppElement(document.body) once exposed"
|
|
34
|
+
, {
|
|
35
|
+
// TODO: remove appElement and put in the test : "KitModal.setAppElement(document.body) once exposed"
|
|
36
|
+
appElement: document.body, title: t('explorer.save-view-as'), 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 => (_jsx(AntForm.Item, { name: lang, rules: [
|
|
37
|
+
{ required: lang === defaultLang, message: String(t('errors.standard_field_required')) }
|
|
38
|
+
], children: _jsx(KitInput, { label: lang, required: lang === defaultLang, onMouseDown: _preventCloseSettingsPanel, onBlur: _onCheck }) }, lang))) }) }) }));
|
|
39
|
+
};
|
|
40
|
+
//# 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,sBAAsB,EAAC,MAAM,+CAA+C,CAAC;AAQrF,MAAM,CAAC,MAAM,aAAa,GAAsC,CAAC,EAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAC,EAAE,EAAE;IAC1F,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,WAAW,EAAE,cAAc,EAAC,GAAG,OAAO,EAAE,CAAC;IAChD,MAAM,EAAC,IAAI,EAAC,GAAG,sBAAsB,EAAE,CAAC;IAExC,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,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,MAA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AE,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,YAClD,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACxB,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,IAAI,CAYE,CAClB,CAAC,GACY,GACZ,GACH,CACd,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ViewActionsButtons: () => JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
6
|
+
import { KitButton } from 'aristid-ds';
|
|
7
|
+
import { FaShare } from 'react-icons/fa';
|
|
8
|
+
import { useCreateNewView } from './useCreateNewView';
|
|
9
|
+
import styled from 'styled-components';
|
|
10
|
+
import { useUpdateView } from './useUpdateView';
|
|
11
|
+
import { useResetView } from './useResetView';
|
|
12
|
+
const StyledFooter = styled.footer `
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
padding-bottom: calc(var(--general-spacing-xs) * 1px);
|
|
16
|
+
`;
|
|
17
|
+
export const ViewActionsButtons = () => {
|
|
18
|
+
const { t } = useSharedTranslation();
|
|
19
|
+
const { updateViewButton } = useUpdateView();
|
|
20
|
+
const { createNewViewButton } = useCreateNewView();
|
|
21
|
+
const { resetViewButton } = useResetView();
|
|
22
|
+
return (_jsxs(StyledFooter, { children: [updateViewButton, createNewViewButton, _jsx(KitButton, { type: "redirect", icon: _jsx(FaShare, {}), onClick: () => null, children: t('explorer.share-view') }), resetViewButton] }));
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=ViewActionsButtons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewActionsButtons.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/save-view/ViewActionsButtons.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAA;;;;CAIjC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACnC,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,gBAAgB,EAAC,GAAG,aAAa,EAAE,CAAC;IAC3C,MAAM,EAAC,mBAAmB,EAAC,GAAG,gBAAgB,EAAE,CAAC;IACjD,MAAM,EAAC,eAAe,EAAC,GAAG,YAAY,EAAE,CAAC;IAEzC,OAAO,CACH,MAAC,YAAY,eACR,gBAAgB,EAChB,mBAAmB,EACpB,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,EACX,eAAe,IACL,CAClB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { mapViewTypeFromExplorerToLegacy } from '../../_constants';
|
|
2
|
+
import { isExplorerFilterThrough } from '../../_types';
|
|
3
|
+
export const prepareViewForRequest = (view, label) => ({
|
|
4
|
+
library: view.libraryId,
|
|
5
|
+
shared: false,
|
|
6
|
+
display: {
|
|
7
|
+
type: mapViewTypeFromExplorerToLegacy[view.viewType]
|
|
8
|
+
},
|
|
9
|
+
filters: view.filters.map(filter => isExplorerFilterThrough(filter)
|
|
10
|
+
? {
|
|
11
|
+
field: `${filter.field}.${filter.subField}`,
|
|
12
|
+
value: filter.value,
|
|
13
|
+
condition: filter.subCondition
|
|
14
|
+
}
|
|
15
|
+
: {
|
|
16
|
+
field: filter.field,
|
|
17
|
+
value: filter.value,
|
|
18
|
+
condition: filter.condition
|
|
19
|
+
}),
|
|
20
|
+
sort: view.sort.map(({ field, order }) => ({ field, order })),
|
|
21
|
+
attributes: view.attributesIds,
|
|
22
|
+
label
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=prepareViewForRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepareViewForRequest.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,+BAA+B,EAAC,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAC,uBAAuB,EAAC,MAAM,cAAc,CAAC;AAGrD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAwB,EAAE,KAA6B,EAAa,EAAE,CAAC,CAAC;IAC1G,OAAO,EAAE,IAAI,CAAC,SAAS;IACvB,MAAM,EAAE,KAAK;IACb,OAAO,EAAE;QACL,IAAI,EAAE,+BAA+B,CAAC,IAAI,CAAC,QAAQ,CAAC;KACvD;IACD,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAC/B,uBAAuB,CAAC,MAAM,CAAC;QAC3B,CAAC,CAAC;YACI,KAAK,EAAE,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,QAAQ,EAAE;YAC3C,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,SAAS,EAAE,MAAM,CAAC,YAAY;SACjC;QACH,CAAC,CAAC;YACI,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,SAAS,EAAE,MAAM,CAAC,SAAS;SAC9B,CACV;IACD,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAC,KAAK,EAAE,KAAK,EAAC,EAAE,EAAE,CAAC,CAAC,EAAC,KAAK,EAAE,KAAK,EAAC,CAAC,CAAC;IACzD,UAAU,EAAE,IAAI,CAAC,aAAa;IAC9B,KAAK;CACR,CAAC,CAAC"}
|