@leav/ui 0.3.6-e218b23 → 0.3.6-e275df8
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/__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 +526 -76
- package/dist/_gqlTypes/index.js +312 -57
- 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 +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 +6 -3
- 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/CreateDirectory/CreateDirectory.js +0 -2
- package/dist/components/CreateDirectory/CreateDirectory.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 +10 -2
- package/dist/components/Explorer/DataView.js +80 -22
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +42 -5
- package/dist/components/Explorer/Explorer.js +116 -32
- 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 +6 -0
- package/dist/components/Explorer/ExplorerToolbar.js +53 -0
- package/dist/components/Explorer/ExplorerToolbar.js.map +1 -0
- package/dist/components/Explorer/TableCell.js +16 -7
- 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 -8
- package/dist/components/Explorer/_queries/useExplorerData.js +79 -76
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +86 -15
- 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} +7 -4
- package/dist/components/Explorer/{useEditAction.js → actions-item/useEditItemAction.js} +11 -10
- package/dist/components/Explorer/actions-item/useEditItemAction.js.map +1 -0
- package/dist/components/Explorer/actions-item/useRemoveItemAction.d.ts +24 -0
- package/dist/components/Explorer/actions-item/useRemoveItemAction.js +113 -0
- package/dist/components/Explorer/actions-item/useRemoveItemAction.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.d.ts +28 -0
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js +72 -0
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.d.ts +19 -0
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js +85 -0
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useMassActions.d.ts +27 -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/actions-primary/useCreatePrimaryAction.d.ts +31 -0
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +114 -0
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -0
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.d.ts +20 -0
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +39 -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 +9 -0
- package/dist/components/Explorer/link-item/LinkModal.js +82 -0
- package/dist/components/Explorer/link-item/LinkModal.js.map +1 -0
- package/dist/components/Explorer/link-item/useLinkMassAction.d.ts +31 -0
- package/dist/components/Explorer/link-item/useLinkMassAction.js +59 -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 +15 -4
- 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 -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.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 +11 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +55 -10
- 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 +14 -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 +8 -0
- package/dist/components/Explorer/manage-view-settings/save-view/SaveViewModal.js +44 -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 +22 -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 +52 -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/useShareView.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js +64 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useShareView.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 +62 -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 +30 -28
- 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 +23 -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 +47 -13
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +125 -38
- 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 +81 -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 +4 -3
- package/dist/components/Explorer/useViewSettingsReducer.js +108 -39
- 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/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 +5 -10
- 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 +2 -0
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +83 -77
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.d.ts +3 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +12 -9
- 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 +3 -8
- 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 +92 -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 +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 +2 -6
- 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.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +13 -6
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +4 -0
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +3 -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/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 → 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 +48 -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 +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 +81 -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/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 +3 -4
- 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} +8 -7
- package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -0
- 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 +69 -12
- package/dist/locales/fr/shared.json +72 -15
- package/dist/types/views.d.ts +4 -4
- package/package.json +5 -5
- 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 -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.d.ts +0 -19
- 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.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
|
@@ -1,44 +1,19 @@
|
|
|
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, KitDivider, KitInputNumber, KitSelect, KitSpace } from 'aristid-ds';
|
|
7
|
-
import { FaClock, FaTrash } from 'react-icons/fa';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
2
|
import styled from 'styled-components';
|
|
3
|
+
import { KitInputNumber, KitSelect } from 'aristid-ds';
|
|
9
4
|
import { AttributeConditionFilter } from '../../../../../types';
|
|
10
|
-
import {
|
|
11
|
-
import { ViewSettingsActionTypes } from '../../store-view-settings/viewSettingsReducer';
|
|
5
|
+
import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
12
6
|
import { useConditionsOptionsByType } from './useConditionOptionsByType';
|
|
13
7
|
const InputNumberStyled = styled(KitInputNumber) `
|
|
14
8
|
width: 100%;
|
|
15
9
|
`;
|
|
16
|
-
export const NumericAttributeDropDown = ({ filter }) => {
|
|
10
|
+
export const NumericAttributeDropDown = ({ filter, onFilterChange, selectDropDownRef }) => {
|
|
17
11
|
const { t } = useSharedTranslation();
|
|
18
|
-
const { dispatch } = useViewSettingsContext();
|
|
19
12
|
const { conditionOptionsByType } = useConditionsOptionsByType(filter);
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
type: ViewSettingsActionTypes.CHANGE_FILTER_CONFIG,
|
|
23
|
-
payload: filterData
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
const _onConditionChanged = condition => _updateFilter({ ...filter, condition });
|
|
27
|
-
const _onInputChanged = value => _updateFilter({ ...filter, value: value === null ? null : String(value) });
|
|
28
|
-
const _onResetFilter = () => dispatch({
|
|
29
|
-
type: ViewSettingsActionTypes.RESET_FILTER,
|
|
30
|
-
payload: {
|
|
31
|
-
id: filter.id
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
const _onDeleteFilter = () => dispatch({
|
|
35
|
-
type: ViewSettingsActionTypes.REMOVE_FILTER,
|
|
36
|
-
payload: {
|
|
37
|
-
id: filter.id
|
|
38
|
-
}
|
|
39
|
-
});
|
|
13
|
+
const _onConditionChanged = condition => onFilterChange({ ...filter, condition });
|
|
14
|
+
const _onInputChanged = value => onFilterChange({ ...filter, value: value === null ? null : String(value) });
|
|
40
15
|
const showInput = filter.condition !== AttributeConditionFilter.IS_EMPTY &&
|
|
41
16
|
filter.condition !== AttributeConditionFilter.IS_NOT_EMPTY;
|
|
42
|
-
return (_jsxs(
|
|
17
|
+
return (_jsxs(_Fragment, { children: [_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, getPopupContainer: () => selectDropDownRef?.current ?? document.body }), showInput && (_jsx(InputNumberStyled, { placeholder: String(t('explorer.type-a-value')), value: filter.value, onChange: _onInputChanged }))] }));
|
|
43
18
|
};
|
|
44
19
|
//# sourceMappingURL=NumericAttributeDropDown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumericAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"NumericAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,cAAc,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AACrD,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,iBAAiB,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;;CAE/C,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAoD,CAAC,EACtF,MAAM,EACN,cAAc,EACd,iBAAiB,EACpB,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EAAC,sBAAsB,EAAC,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAEpE,MAAM,mBAAmB,GAAiD,SAAS,CAAC,EAAE,CAClF,cAAc,CAAC,EAAC,GAAG,MAAM,EAAE,SAAS,EAAC,CAAC,CAAC;IAE3C,MAAM,eAAe,GAAsD,KAAK,CAAC,EAAE,CAC/E,cAAc,CAAC,EAAC,GAAG,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC,CAAC,CAAC;IAE9E,MAAM,SAAS,GACX,MAAM,CAAC,SAAS,KAAK,wBAAwB,CAAC,QAAQ;QACtD,MAAM,CAAC,SAAS,KAAK,wBAAwB,CAAC,YAAY,CAAC;IAE/D,OAAO,CACH,8BACI,KAAC,SAAS,IACN,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,mBAAmB,EAC7B,KAAK,EAAE,MAAM,CAAC,SAAS,EACvB,iBAAiB,EAAE,GAAG,EAAE,CAAC,iBAAiB,EAAE,OAAO,IAAI,QAAQ,CAAC,IAAI,GACtE,EACD,SAAS,IAAI,CACV,KAAC,iBAAiB,IACd,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,EAC/C,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,QAAQ,EAAE,eAAe,GAC3B,CACL,IACF,CACN,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare const TextAttributeDropDown: FunctionComponent<
|
|
2
|
+
import { IFilterChildrenDropDownProps } from './_types';
|
|
3
|
+
export declare const TextAttributeDropDown: FunctionComponent<IFilterChildrenDropDownProps>;
|
|
@@ -1,30 +1,17 @@
|
|
|
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, KitDivider, KitInput, KitSelect, KitSpace } from 'aristid-ds';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
2
|
import styled from 'styled-components';
|
|
8
|
-
import {
|
|
3
|
+
import { KitInput, KitSelect } from 'aristid-ds';
|
|
9
4
|
import { AttributeConditionFilter } from '../../../../../types';
|
|
10
|
-
import {
|
|
11
|
-
import { ViewSettingsActionTypes } from '../../store-view-settings/viewSettingsReducer';
|
|
5
|
+
import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
12
6
|
import { useConditionsOptionsByType } from './useConditionOptionsByType';
|
|
13
7
|
const InputStyled = styled(KitInput) `
|
|
14
8
|
width: 100%;
|
|
15
9
|
`;
|
|
16
|
-
export const TextAttributeDropDown = ({ filter }) => {
|
|
10
|
+
export const TextAttributeDropDown = ({ filter, onFilterChange, selectDropDownRef }) => {
|
|
17
11
|
const { t } = useSharedTranslation();
|
|
18
|
-
const { dispatch } = useViewSettingsContext();
|
|
19
12
|
const { conditionOptionsByType } = useConditionsOptionsByType(filter);
|
|
20
|
-
const _updateFilter = (filterData) => {
|
|
21
|
-
dispatch({
|
|
22
|
-
type: ViewSettingsActionTypes.CHANGE_FILTER_CONFIG,
|
|
23
|
-
payload: filterData
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
13
|
const _onConditionChanged = condition => {
|
|
27
|
-
|
|
14
|
+
onFilterChange({ ...filter, condition });
|
|
28
15
|
};
|
|
29
16
|
// TODO debounce ?
|
|
30
17
|
const _onInputChanged = event => {
|
|
@@ -32,22 +19,10 @@ export const TextAttributeDropDown = ({ filter }) => {
|
|
|
32
19
|
if (shouldIgnoreInputChange) {
|
|
33
20
|
return;
|
|
34
21
|
}
|
|
35
|
-
|
|
22
|
+
onFilterChange({ ...filter, value: event.target.value.length === 0 ? null : event.target.value });
|
|
36
23
|
};
|
|
37
|
-
const _onResetFilter = () => dispatch({
|
|
38
|
-
type: ViewSettingsActionTypes.RESET_FILTER,
|
|
39
|
-
payload: {
|
|
40
|
-
id: filter.id
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
const _onDeleteFilter = () => dispatch({
|
|
44
|
-
type: ViewSettingsActionTypes.REMOVE_FILTER,
|
|
45
|
-
payload: {
|
|
46
|
-
id: filter.id
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
24
|
const showSearch = filter.condition !== AttributeConditionFilter.IS_EMPTY &&
|
|
50
25
|
filter.condition !== AttributeConditionFilter.IS_NOT_EMPTY;
|
|
51
|
-
return (_jsxs(
|
|
26
|
+
return (_jsxs(_Fragment, { children: [_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, getPopupContainer: () => selectDropDownRef?.current ?? document.body, "aria-label": String(t('explorer.filter-condition')) }), showSearch && (_jsx(InputStyled, { placeholder: String(t('explorer.type-a-value')), value: filter.value ?? undefined, onChange: _onInputChanged }))] }));
|
|
52
27
|
};
|
|
53
28
|
//# sourceMappingURL=TextAttributeDropDown.js.map
|
|
@@ -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,cAAc,EACd,iBAAiB,EACpB,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EAAC,sBAAsB,EAAC,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAEpE,MAAM,mBAAmB,GAAiD,SAAS,CAAC,EAAE;QAClF,cAAc,CAAC,EAAC,GAAG,MAA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efObject } 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,SAAS,CAAC,EAAE;QACzB,wBAAwB,CAAC,QAAQ;QACjC,wBAAwB,CAAC,YAAY;QACrC,wBAAwB,CAAC,QAAQ;QACjC,wBAAwB,CAAC,YAAY;KACxC;IACD,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,EAAE;IAC7B,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE;QACpB,wBAAwB,CAAC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AAE,KAAK,EAAE,wBAAwB,CAAC,uBAAuB,EAAC;IACtG,EAAC,KAAK,EAAE,CAAC,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,wBAAwB,CAAC,OAAO,EAAC;CACzE,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,MAAsB,EAAE,EAAE;IACjE,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,OAAO;QACH,sBAAsB,EAAE,6BAA6B,CAAC,CAAC,CAAC;aACnD,MAAM,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAChB,wBAAwB,CAAC,MAAM,CAAC;YAC5B,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;YAC7D,CAAC,CAAC,oBAAoB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC7C;aACA,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACZ,GAAG,MAAM;YACT,KAAK,EACD,wBAAwB,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;gBAC9E,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;gBAChD,CAAC,CAAC,MAAM,CAAC,KAAK;SACzB,CAAC,CAAC;KACV,CAAC;AACN,CAAC,CAAC"}
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.d.ts
CHANGED
|
@@ -4,11 +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' | 'my-views';
|
|
7
8
|
export interface IEditSettingsContext {
|
|
8
9
|
setActiveSettings: (params: IActiveSettings) => void;
|
|
9
10
|
activeSettings: null | IActiveSettings;
|
|
10
|
-
panelElement: Element | DocumentFragment | null;
|
|
11
|
-
|
|
11
|
+
panelElement: (() => Element | DocumentFragment) | null;
|
|
12
|
+
closeSettingsPanel: () => void;
|
|
12
13
|
}
|
|
13
14
|
export declare const EditSettingsContext: import("react").Context<IEditSettingsContext>;
|
|
14
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;
|
|
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,3 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { SettingsPanelPages } from './EditSettingsContext';
|
|
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
|
+
}>) => {
|
|
8
|
+
openSettingsPanel: (pageName?: SettingsPanelPages) => void;
|
|
9
|
+
viewSettingsButton: ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
10
|
+
viewListButton: ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
11
|
+
viewName: string;
|
|
3
12
|
};
|
package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js
CHANGED
|
@@ -1,21 +1,66 @@
|
|
|
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();
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
23
|
+
const { lang } = useLang();
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (!isEnabled) {
|
|
26
|
+
closeSettingsPanel();
|
|
27
|
+
}
|
|
28
|
+
return () => {
|
|
29
|
+
closeSettingsPanel();
|
|
30
|
+
};
|
|
31
|
+
}, [isEnabled]);
|
|
32
|
+
const rootPanel = { pageName: 'router-menu', title: t('explorer.settings') };
|
|
33
|
+
const _changePanelPage = ({ pageName, title, onClickLeftButton }) => {
|
|
34
|
+
setActiveSettings({
|
|
35
|
+
...activeSettings,
|
|
36
|
+
content: _jsx(SettingsPanel, { library: view.libraryId, page: pageName }),
|
|
37
|
+
title,
|
|
38
|
+
onClickLeftButton
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const _openSettingsPanel = (pageName = 'router-menu') => {
|
|
42
|
+
const chanelPageParams = {
|
|
43
|
+
pageName,
|
|
44
|
+
title: t(`explorer.${pageName}`)
|
|
45
|
+
};
|
|
46
|
+
if (pageName !== rootPanel.pageName) {
|
|
47
|
+
chanelPageParams.onClickLeftButton = () => {
|
|
48
|
+
_changePanelPage(rootPanel);
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
_changePanelPage(chanelPageParams);
|
|
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]);
|
|
17
59
|
return {
|
|
18
|
-
|
|
60
|
+
openSettingsPanel: _openSettingsPanel,
|
|
61
|
+
viewSettingsButton: button,
|
|
62
|
+
viewListButton,
|
|
63
|
+
viewName: viewName === '' ? t('explorer.default-view') : viewName
|
|
19
64
|
};
|
|
20
65
|
};
|
|
21
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,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAEpD,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;;CAE1C,CAAC;AAQF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAC,IAAI,EAAE,SAAS,GAAG,IAAI,EAA0C,EAAE,EAAE;IACrG,MAAM,EAAC,cAAc,EAAE,iBAAiB,EAAE,kBAAkB,EAAC,GAAG,eAAe,EAAE,CAAC;IAClF,MAAM,CAAC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C,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,QAAQ;KACpE,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,36 @@
|
|
|
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 { KitTypography } from 'aristid-ds';
|
|
6
|
+
import { KitInput, KitTypography } from 'aristid-ds';
|
|
8
7
|
import { FaFilter, FaList, FaSortAlphaDown } 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 { useOpenViewSettings } from '../open-view-settings/useOpenViewSettings';
|
|
15
|
+
import { SavedViews } from '../../list-saved-views/SavedViews';
|
|
16
|
+
import { ViewActionsButtons } from '../save-view/ViewActionsButtons';
|
|
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);
|
|
20
25
|
`;
|
|
21
26
|
const ConfigurationStyledMenu = styled.menu `
|
|
22
27
|
padding: 0;
|
|
23
28
|
`;
|
|
24
|
-
export const SettingsPanel = ({ library }) => {
|
|
29
|
+
export const SettingsPanel = ({ library, page = 'router-menu' }) => {
|
|
25
30
|
const { t } = useSharedTranslation();
|
|
26
|
-
const {
|
|
27
|
-
const {
|
|
28
|
-
const [currentPage, setCurrentPage] = useState('router-menu');
|
|
29
|
-
const _goToAdvancedSettingsPage = (page) => {
|
|
30
|
-
if (!activeSettings) {
|
|
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
|
-
});
|
|
49
|
-
};
|
|
31
|
+
const { view } = useViewSettingsContext();
|
|
32
|
+
const { openSettingsPanel, viewName } = useOpenViewSettings({ view, isEnabled: true });
|
|
50
33
|
// TODO: look for MemoryRouter
|
|
51
|
-
return (_jsxs(ContentWrapperStyledDiv, { children: [
|
|
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, {})] }));
|
|
52
35
|
};
|
|
53
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;
|
|
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,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