@leav/ui 1.4.0 → 1.4.1-11aaf57c
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/_gqlTypes/index.d.ts +49 -3
- package/dist/_gqlTypes/index.js +50 -3
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/export/exportQuery.js +2 -2
- package/dist/_queries/records/getRecordsFromLibraryQuery.d.ts +1 -1
- package/dist/_utils/index.js +4 -4
- package/dist/components/AttributePicker/AttributesList/AttributesList.js +1 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/LinkedLibraryForm/LinkedLibraryForm.js +1 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/LinkedTreeForm/LinkedTreeForm.js +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/AttributeCell/AttributeCell.js +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditPreviewsSettingsModal/EditPreviewsSettingsModal.js +5 -5
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/TreeLibrariesForm/TreeLibrariesForm.js +1 -1
- package/dist/components/EntityCard/EntityCard.js +5 -5
- package/dist/components/Explorer/Explorer.d.ts +3 -1
- package/dist/components/Explorer/Explorer.js +54 -40
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerFiltersAndSorts.d.ts +7 -0
- package/dist/components/Explorer/ExplorerFiltersAndSorts.js +44 -0
- package/dist/components/Explorer/ExplorerFiltersAndSorts.js.map +1 -0
- package/dist/components/Explorer/ExplorerToolbar.d.ts +3 -1
- package/dist/components/Explorer/ExplorerToolbar.js +16 -47
- package/dist/components/Explorer/ExplorerToolbar.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/useExplorerData.d.ts +3 -2
- package/dist/components/Explorer/_queries/useExplorerData.js +1 -1
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +4 -117
- package/dist/components/Explorer/_types.js +1 -12
- package/dist/components/Explorer/_types.js.map +1 -1
- package/dist/components/Explorer/actions-item/useEditStatusItemAction.js +17 -8
- package/dist/components/Explorer/actions-item/useEditStatusItemAction.js.map +1 -1
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js +12 -5
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js.map +1 -1
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.d.ts +3 -1
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js +14 -7
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js.map +1 -1
- package/dist/components/Explorer/actions-mass/useExportMassAction.d.ts +17 -0
- package/dist/components/Explorer/actions-mass/useExportMassAction.js +100 -0
- package/dist/components/Explorer/actions-mass/useExportMassAction.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useMassActions.d.ts +3 -1
- package/dist/components/Explorer/actions-mass/useMassActions.js +4 -4
- package/dist/components/Explorer/actions-mass/useMassActions.js.map +1 -1
- package/dist/components/Explorer/actions-primary/usePrimaryActions.d.ts +3 -1
- package/dist/components/Explorer/actions-primary/usePrimaryActions.js +14 -10
- package/dist/components/Explorer/actions-primary/usePrimaryActions.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +3 -3
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +2 -2
- 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 +3 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.d.ts +2 -1
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js +6 -6
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js +15 -3
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js +4 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js +4 -2
- package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js +15 -3
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +1 -4
- 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 +8 -9
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +4 -128
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
- package/dist/components/Explorer/useLoadView.js +15 -8
- package/dist/components/Explorer/useLoadView.js.map +1 -1
- package/dist/components/Explorer/useSearchInput.js +1 -1
- package/dist/components/Explorer/useSearchInput.js.map +1 -1
- package/dist/components/Explorer/useViewSettingsReducer.js +5 -10
- package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -1
- package/dist/components/Filters/FiltersProvider.d.ts +3 -0
- package/dist/components/Filters/FiltersProvider.js +8 -0
- package/dist/components/Filters/FiltersProvider.js.map +1 -0
- package/dist/components/Filters/_types.d.ts +130 -0
- package/dist/components/Filters/_types.js +14 -0
- package/dist/components/Filters/_types.js.map +1 -0
- package/dist/components/Filters/conditionsHelper.d.ts +2 -0
- package/dist/components/Filters/conditionsHelper.js +16 -0
- package/dist/components/Filters/conditionsHelper.js.map +1 -0
- package/dist/components/Filters/context/filtersContext.d.ts +6 -0
- package/dist/components/Filters/context/filtersContext.js +9 -0
- package/dist/components/Filters/context/filtersContext.js.map +1 -0
- package/dist/components/Filters/context/filtersInitialState.d.ts +2 -0
- package/dist/components/Filters/context/filtersInitialState.js +10 -0
- package/dist/components/Filters/context/filtersInitialState.js.map +1 -0
- package/dist/components/Filters/context/filtersReducer.d.ts +64 -0
- package/dist/components/Filters/context/filtersReducer.js +179 -0
- package/dist/components/Filters/context/filtersReducer.js.map +1 -0
- package/dist/components/Filters/context/useFiltersReducer.d.ts +13 -0
- package/dist/components/Filters/context/useFiltersReducer.js +68 -0
- package/dist/components/Filters/context/useFiltersReducer.js.map +1 -0
- package/dist/components/Filters/filter-items/CommonFilterItem.d.ts +8 -0
- package/dist/components/{Explorer/manage-view-settings/_shared → Filters/filter-items}/CommonFilterItem.js +7 -7
- package/dist/components/Filters/filter-items/CommonFilterItem.js.map +1 -0
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/BooleanAttributeDropdown.js +16 -8
- package/dist/components/Filters/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/ColorAttributeDropDown.js +1 -1
- package/dist/components/Filters/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -0
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/DateAttributeDropDown.js +3 -3
- package/dist/components/Filters/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/DateRangeAttributeDropDown.js +1 -1
- package/dist/components/Filters/filter-items/filter-type/DateRangeAttributeDropDown.js.map +1 -0
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/EncryptedAttributeDropDown.js +1 -1
- package/dist/components/Filters/filter-items/filter-type/EncryptedAttributeDropDown.js.map +1 -0
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/ExtendedAttributeDropDown.js +1 -1
- package/dist/components/Filters/filter-items/filter-type/ExtendedAttributeDropDown.js.map +1 -0
- package/dist/components/Filters/filter-items/filter-type/FilterDropDown.d.ts +3 -0
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/FilterDropDown.js +9 -9
- package/dist/components/Filters/filter-items/filter-type/FilterDropDown.js.map +1 -0
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/FilterDropdownContent.d.ts +3 -3
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/FilterDropdownContent.js +6 -6
- package/dist/components/Filters/filter-items/filter-type/FilterDropdownContent.js.map +1 -0
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/FilterValueListDropDown.d.ts +3 -3
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/FilterValueListDropDown.js +5 -5
- package/dist/components/Filters/filter-items/filter-type/FilterValueListDropDown.js.map +1 -0
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/LinkAttributeDropdown.js +6 -6
- package/dist/components/Filters/filter-items/filter-type/LinkAttributeDropdown.js.map +1 -0
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/NumericAttributeDropDown.js +2 -2
- package/dist/components/Filters/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/TextAttributeDropDown.js +2 -2
- package/dist/components/Filters/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/TreeAttributeDropDown.js +10 -10
- package/dist/components/Filters/filter-items/filter-type/TreeAttributeDropDown.js.map +1 -0
- package/dist/components/Filters/filter-items/filter-type/_types.d.ts +18 -0
- package/dist/components/Filters/filter-items/filter-type/_types.js.map +1 -0
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/useConditionOptionsByType.d.ts +7 -7
- package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/useConditionOptionsByType.js +14 -14
- package/dist/components/Filters/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
- package/dist/components/Filters/index.d.ts +8 -0
- package/dist/components/Filters/index.js +12 -0
- package/dist/components/Filters/index.js.map +1 -0
- package/dist/components/Filters/prepareFiltersForRequest.d.ts +4 -0
- package/dist/components/{Explorer/_queries → Filters}/prepareFiltersForRequest.js +12 -11
- package/dist/components/Filters/prepareFiltersForRequest.js.map +1 -0
- package/dist/components/Filters/useFilters.d.ts +1724 -0
- package/dist/components/Filters/useFilters.js +28 -0
- package/dist/components/Filters/useFilters.js.map +1 -0
- package/dist/components/Filters/useFiltersContext.d.ts +4 -0
- package/dist/components/Filters/useFiltersContext.js +13 -0
- package/dist/components/Filters/useFiltersContext.js.map +1 -0
- package/dist/components/{Explorer/manage-view-settings/_shared → Filters}/useTransformFilters.d.ts +9 -9
- package/dist/components/{Explorer/manage-view-settings/_shared → Filters}/useTransformFilters.js +8 -8
- package/dist/components/Filters/useTransformFilters.js.map +1 -0
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js +5 -5
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/AllValuesCount.js +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.js +1 -1
- package/dist/components/LibraryItemsList/MenuItemList/MenuItemList.js +1 -1
- package/dist/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.js +2 -2
- package/dist/components/LibraryItemsList/MenuSelection/MenuSelection.js +1 -1
- package/dist/components/LibraryItemsList/MenuView/MenuView.js +6 -6
- package/dist/components/LibraryItemsList/Sidebar/Sidebar.js +1 -1
- package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.js +1 -1
- package/dist/components/LibraryItemsList/TileDisplay/helpers/getItemPreviewSize.js +3 -3
- package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.d.ts +1 -1
- package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.js +4 -4
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +2 -2
- package/dist/components/LibraryPicker/LibrariesList/LibrariesList.js +2 -2
- package/dist/components/Notifications/InitNotificationsSubscription.d.ts +2 -0
- package/dist/components/Notifications/InitNotificationsSubscription.js +7 -0
- package/dist/components/Notifications/InitNotificationsSubscription.js.map +1 -0
- package/dist/components/Notifications/hooks/useNotificationSubscription.d.ts +4 -0
- package/dist/components/Notifications/hooks/useNotificationSubscription.js +33 -0
- package/dist/components/Notifications/hooks/useNotificationSubscription.js.map +1 -0
- package/dist/components/Notifications/index.d.ts +1 -0
- package/dist/components/Notifications/index.js +5 -0
- package/dist/components/Notifications/index.js.map +1 -0
- package/dist/components/RecordCard/RecordCard.js +4 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +9 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js +5 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +12 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +14 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.js +3 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js +4 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.d.ts +2 -2
- package/dist/components/RecordEdition/EditRecordModal/useEditRecordModal.js +3 -1
- package/dist/components/RecordEdition/EditRecordModal/useEditRecordModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +3 -2
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +15 -2
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
- package/dist/components/RecordEdition/_types.d.ts +2 -2
- package/dist/components/RecordEdition/hooks/useGetSubmitButtons.d.ts +2 -2
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/FileModalContent.js +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.js +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +11 -18
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
- package/dist/components/SelectTreeNode/TreeNodeTitle.d.ts +9 -5
- package/dist/components/SelectTreeNode/TreeNodeTitle.js +49 -3
- package/dist/components/SelectTreeNode/TreeNodeTitle.js.map +1 -1
- package/dist/components/SelectTreeNode/_types.js +1 -0
- package/dist/components/SelectTreeNode/_types.js.map +1 -1
- package/dist/components/TreePicker/TreesList/TreesList.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/constants.d.ts +6 -4
- package/dist/constants.js +6 -4
- package/dist/constants.js.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/messageHandlers.d.ts +3 -3
- package/dist/hooks/useIFrameMessenger/messageHandlers.js +12 -16
- package/dist/hooks/useIFrameMessenger/messageHandlers.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/schema.d.ts +85 -4
- package/dist/hooks/useIFrameMessenger/schema.js +49 -54
- package/dist/hooks/useIFrameMessenger/schema.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/types.d.ts +33 -31
- package/dist/hooks/useIFrameMessenger/types.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.d.ts +2 -2
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js.map +1 -1
- package/dist/hooks/useIFrameMessengerClient/iFrameMessengerClientContext.d.ts +2 -2
- package/dist/hooks/useIFrameMessengerClient/useIFrameMessengerClient.d.ts +2 -2
- package/dist/locales/en/shared.json +29 -5
- package/dist/locales/fr/shared.json +29 -5
- package/dist/types/search.d.ts +5 -5
- package/dist/types/search.js +5 -5
- package/package.json +4 -4
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.d.ts +0 -4
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +0 -6
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +0 -3
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueListDropDown.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TreeAttributeDropDown.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.d.ts +0 -18
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.js.map +0 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +0 -1
- /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/BooleanAttributeDropdown.d.ts +0 -0
- /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/ColorAttributeDropDown.d.ts +0 -0
- /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/DateAttributeDropDown.d.ts +0 -0
- /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/DateRangeAttributeDropDown.d.ts +0 -0
- /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/EncryptedAttributeDropDown.d.ts +0 -0
- /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/ExtendedAttributeDropDown.d.ts +0 -0
- /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/LinkAttributeDropdown.d.ts +0 -0
- /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/NumericAttributeDropDown.d.ts +0 -0
- /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/TextAttributeDropDown.d.ts +0 -0
- /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/TreeAttributeDropDown.d.ts +0 -0
- /package/dist/components/{Explorer/manage-view-settings → Filters}/filter-items/filter-type/_types.js +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Override } from '@leav/utils';
|
|
2
|
-
import { type
|
|
2
|
+
import { type AttributePropertiesFragment, type PropertyValueFragment, type RecordFilterInput, type RecordIdentityFragment } from '../../_gqlTypes';
|
|
3
3
|
import { type Key, type ReactElement } from 'react';
|
|
4
4
|
import { type IViewSettingsState } from './manage-view-settings';
|
|
5
|
-
import { ThroughConditionFilter } from '../../types/search';
|
|
6
5
|
import { type IView } from '../../types';
|
|
7
6
|
import { type MASS_SELECTION_ALL } from './_constants';
|
|
7
|
+
import { type UIFilter, type ValidFilter } from '../Filters/_types';
|
|
8
8
|
export type MassSelection = Key[] | typeof MASS_SELECTION_ALL;
|
|
9
9
|
export interface IExplorerData {
|
|
10
10
|
totalCount: number;
|
|
@@ -35,7 +35,6 @@ export interface IItemAction {
|
|
|
35
35
|
callback: (item: IItemData) => void;
|
|
36
36
|
icon: ReactElement | ((item: IItemData) => ReactElement);
|
|
37
37
|
label: string | ((item: IItemData) => string);
|
|
38
|
-
iconOnly?: boolean;
|
|
39
38
|
isDanger?: boolean | ((item: IItemData) => boolean);
|
|
40
39
|
disabled?: boolean | ((item: IItemData) => boolean);
|
|
41
40
|
useItemActionOnRowClick?: boolean;
|
|
@@ -55,101 +54,9 @@ export type FeatureHook<T = {}> = {
|
|
|
55
54
|
isEnabled: boolean;
|
|
56
55
|
isVisible?: boolean;
|
|
57
56
|
} & T;
|
|
58
|
-
export interface IExplorerFilterBaseAttribute {
|
|
59
|
-
type: AttributeType;
|
|
60
|
-
/**
|
|
61
|
-
* Used to display the label of the filter.
|
|
62
|
-
*
|
|
63
|
-
* > Not displayed when filter is hidden
|
|
64
|
-
*/
|
|
65
|
-
label: string;
|
|
66
|
-
/**
|
|
67
|
-
* Used to verify unicity: one filter per attribute
|
|
68
|
-
*/
|
|
69
|
-
id: string;
|
|
70
|
-
format?: AttributeFormat | null | undefined;
|
|
71
|
-
valuesList?: NonNullable<StandardAttributeDetailsFragment['valuesList']> | NonNullable<LinkAttributeDetailsFragment['valuesList']>;
|
|
72
|
-
}
|
|
73
|
-
export interface IExplorerFilterStandardAttribute extends IExplorerFilterBaseAttribute {
|
|
74
|
-
format: AttributeFormat;
|
|
75
|
-
}
|
|
76
|
-
export interface IExplorerFilterLinkAttribute extends IExplorerFilterBaseAttribute {
|
|
77
|
-
linkedLibrary?: {
|
|
78
|
-
id: string;
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
export interface IExplorerFilterTreeAttribute extends IExplorerFilterBaseAttribute {
|
|
82
|
-
linkedTree?: {
|
|
83
|
-
id: string;
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
interface IExplorerBaseFilter {
|
|
87
|
-
id: string;
|
|
88
|
-
attribute: IExplorerFilterBaseAttribute;
|
|
89
|
-
condition: RecordFilterCondition | ThroughConditionFilter | null;
|
|
90
|
-
/**
|
|
91
|
-
* Used to build filter field.
|
|
92
|
-
*
|
|
93
|
-
* - ex: `campaigns_id_pac`
|
|
94
|
-
* - ex with **subField**: `campaigns_id_pac.id`
|
|
95
|
-
*/
|
|
96
|
-
field: string;
|
|
97
|
-
value: string | null;
|
|
98
|
-
formattedValue?: string | null;
|
|
99
|
-
hidden?: boolean | undefined;
|
|
100
|
-
}
|
|
101
|
-
export interface IExplorerFilterStandard extends IExplorerBaseFilter {
|
|
102
|
-
attribute: IExplorerFilterStandardAttribute;
|
|
103
|
-
condition: RecordFilterCondition | null;
|
|
104
|
-
}
|
|
105
|
-
export interface IExplorerFilterLink extends IExplorerBaseFilter {
|
|
106
|
-
attribute: IExplorerFilterLinkAttribute;
|
|
107
|
-
condition: RecordFilterCondition | null;
|
|
108
|
-
}
|
|
109
|
-
export interface IExplorerFilterThrough extends IExplorerBaseFilter {
|
|
110
|
-
attribute: IExplorerFilterLinkAttribute;
|
|
111
|
-
condition: ThroughConditionFilter.THROUGH | null;
|
|
112
|
-
subCondition: RecordFilterCondition | null;
|
|
113
|
-
subField: string | null;
|
|
114
|
-
}
|
|
115
|
-
export interface IExplorerFilterTree extends Omit<IExplorerBaseFilter, 'value' | 'formattedValue' | 'field'> {
|
|
116
|
-
attribute: IExplorerFilterTreeAttribute;
|
|
117
|
-
condition: RecordFilterCondition | null;
|
|
118
|
-
value: string[] | null;
|
|
119
|
-
formattedValue?: string[] | null;
|
|
120
|
-
field: string[];
|
|
121
|
-
}
|
|
122
|
-
export interface IExplorerFilterValueList extends Omit<IExplorerBaseFilter, 'value' | 'formattedValue'> {
|
|
123
|
-
attribute: (IExplorerFilterStandardAttribute | IExplorerFilterLinkAttribute) & {
|
|
124
|
-
valuesList: NonNullable<StandardAttributeDetailsFragment['valuesList']> | NonNullable<LinkAttributeDetailsFragment['valuesList']>;
|
|
125
|
-
};
|
|
126
|
-
value: string[] | null;
|
|
127
|
-
condition: RecordFilterCondition | null;
|
|
128
|
-
}
|
|
129
|
-
export interface IExplorerFilterStandardValueList extends Omit<IExplorerFilterStandard, 'attribute' | 'value'>, IExplorerFilterValueList {
|
|
130
|
-
attribute: IExplorerFilterStandardAttribute & {
|
|
131
|
-
valuesList: NonNullable<StandardAttributeDetailsFragment['valuesList']>;
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
export interface IExplorerFilterLinkValueList extends Omit<IExplorerFilterLink, 'attribute' | 'value'>, IExplorerFilterValueList {
|
|
135
|
-
attribute: IExplorerFilterLinkAttribute & {
|
|
136
|
-
valuesList: NonNullable<LinkAttributeDetailsFragment['valuesList']>;
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
export type ExplorerFilter = IExplorerFilterStandard | IExplorerFilterLink | IExplorerFilterThrough | IExplorerFilterValueList | IExplorerFilterTree;
|
|
140
|
-
export declare const isExplorerFilterStandard: (filter: ExplorerFilter) => filter is IExplorerFilterStandard;
|
|
141
|
-
export declare const isExplorerFilterLink: (filter: ExplorerFilter) => filter is IExplorerFilterLink;
|
|
142
|
-
export declare const isExplorerFilterThrough: (filter: ExplorerFilter) => filter is IExplorerFilterThrough;
|
|
143
|
-
export declare const isExplorerFilterValueList: (filter: ExplorerFilter) => filter is IExplorerFilterValueList;
|
|
144
|
-
export declare const isExplorerFilterStandardWithValueList: (filter: ExplorerFilter) => filter is IExplorerFilterStandardValueList;
|
|
145
|
-
export declare const isExplorerFilterLinkWithValueList: (filter: ExplorerFilter) => filter is IExplorerFilterLinkValueList;
|
|
146
|
-
export declare const isExplorerFilterTree: (filter: ExplorerFilter) => filter is IExplorerFilterTree;
|
|
147
|
-
export interface IFilterDropDownProps {
|
|
148
|
-
filter: ExplorerFilter;
|
|
149
|
-
}
|
|
150
57
|
export type DefaultViewSettings = Override<Partial<IViewSettingsState>, {
|
|
151
58
|
filtersOperator?: 'AND' | 'OR';
|
|
152
|
-
filters?:
|
|
59
|
+
filters?: UIFilter[];
|
|
153
60
|
}>;
|
|
154
61
|
export interface IEntrypointTree {
|
|
155
62
|
type: 'tree';
|
|
@@ -174,30 +81,11 @@ export interface IEntrypointLink {
|
|
|
174
81
|
parentRecordId: string;
|
|
175
82
|
linkAttributeId: string;
|
|
176
83
|
}
|
|
177
|
-
export type ValidFieldFilter = Override<ViewDetailsFilterFragment, {
|
|
178
|
-
field: NonNullable<ViewDetailsFilterFragment['field']>;
|
|
179
|
-
condition: NonNullable<ViewDetailsFilterFragment['condition']>;
|
|
180
|
-
hidden: boolean;
|
|
181
|
-
}>;
|
|
182
|
-
export type ValidFieldFilterStandardValuesList = Override<ValidFieldFilter, {
|
|
183
|
-
valuesList: StandardAttributeDetailsFragment['valuesList'];
|
|
184
|
-
}>;
|
|
185
|
-
export type ValidFieldFilterLinkValuesList = Override<ValidFieldFilter, {
|
|
186
|
-
valuesList: LinkAttributeDetailsFragment['valuesList'];
|
|
187
|
-
}>;
|
|
188
|
-
export type ValidFieldFilterThrough = Override<ValidFieldFilter, {
|
|
189
|
-
condition: ThroughConditionFilter.THROUGH;
|
|
190
|
-
hidden: boolean;
|
|
191
|
-
}> & {
|
|
192
|
-
subField: NonNullable<ViewDetailsFilterFragment['field']>;
|
|
193
|
-
subCondition?: ViewDetailsFilterFragment['condition'];
|
|
194
|
-
};
|
|
195
|
-
export type validFilter = ValidFieldFilter | ValidFieldFilterThrough | ValidFieldFilterStandardValuesList | ValidFieldFilterLinkValuesList;
|
|
196
84
|
export type Entrypoint = IEntrypointTree | IEntrypointLibrary | IEntrypointLink;
|
|
197
85
|
export interface IUserView extends Pick<IView, 'shared' | 'display' | 'sort' | 'attributes'> {
|
|
198
86
|
label: Record<string, string>;
|
|
199
87
|
id: IView['id'] | null;
|
|
200
|
-
filters:
|
|
88
|
+
filters: ValidFilter[];
|
|
201
89
|
ownerId: string | null;
|
|
202
90
|
}
|
|
203
91
|
export interface IDataViewOnAction {
|
|
@@ -205,4 +93,3 @@ export interface IDataViewOnAction {
|
|
|
205
93
|
label: Record<string, string> | null;
|
|
206
94
|
}
|
|
207
95
|
export type SetNewPage = (newCurrentPage: number, ignoredPageSize: number) => void;
|
|
208
|
-
export {};
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { ThroughConditionFilter } from '../../types/search';
|
|
3
|
-
export const isExplorerFilterStandard = (filter) => [AttributeType.simple, AttributeType.advanced].includes(filter.attribute.type);
|
|
4
|
-
export const isExplorerFilterLink = (filter) => [AttributeType.simple_link, AttributeType.advanced_link].includes(filter.attribute.type) &&
|
|
5
|
-
filter.condition !== ThroughConditionFilter.THROUGH;
|
|
6
|
-
export const isExplorerFilterThrough = (filter) => [AttributeType.simple_link, AttributeType.advanced_link].includes(filter.attribute.type) &&
|
|
7
|
-
filter.condition === ThroughConditionFilter.THROUGH;
|
|
8
|
-
export const isExplorerFilterValueList = (filter) => (isExplorerFilterStandard(filter) || isExplorerFilterLink(filter)) && isValueList(filter);
|
|
9
|
-
export const isExplorerFilterStandardWithValueList = (filter) => [AttributeType.simple, AttributeType.advanced].includes(filter.attribute.type) && isValueList(filter);
|
|
10
|
-
export const isExplorerFilterLinkWithValueList = (filter) => [AttributeType.simple_link, AttributeType.advanced_link].includes(filter.attribute.type) && isValueList(filter);
|
|
11
|
-
export const isExplorerFilterTree = (filter) => filter.attribute.type === AttributeType.tree;
|
|
12
|
-
const isValueList = (filter) => !!filter.attribute?.valuesList && filter.attribute?.valuesList.enable;
|
|
1
|
+
export {};
|
|
13
2
|
//# sourceMappingURL=_types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../src/components/Explorer/_types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../src/components/Explorer/_types.ts"],"names":[],"mappings":""}
|
|
@@ -9,7 +9,7 @@ import { useActivateRecordsMutation, useDeactivateRecordsMutation, useDeleteValu
|
|
|
9
9
|
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
10
10
|
import { useValuesCacheUpdate } from '../../../hooks/useValuesCacheUpdate';
|
|
11
11
|
import { ViewSettingsActionTypes } from '../manage-view-settings';
|
|
12
|
-
import { MASS_SELECTION_ALL } from '../_constants';
|
|
12
|
+
import { BREAK_TWO_LINES, MASS_SELECTION_ALL } from '../_constants';
|
|
13
13
|
/**
|
|
14
14
|
* Hook used to get the action for `<DataView />` component.
|
|
15
15
|
*
|
|
@@ -116,15 +116,24 @@ export const useEditStatusItemAction = ({ isEnabled, canDeleteLinkValues, store:
|
|
|
116
116
|
disabled: (item) => entrypoint.type === 'link' ? !canDeleteLinkValues : item.active ? !item.canDelete : !item.canActivate,
|
|
117
117
|
callback: item => {
|
|
118
118
|
const { itemId, id_value } = item;
|
|
119
|
+
const title = entrypoint.type === 'library'
|
|
120
|
+
? item.active
|
|
121
|
+
? t('explorer.deactivate_item_one')
|
|
122
|
+
: t('explorer.activate_item_one')
|
|
123
|
+
: t('explorer.delete_link_one');
|
|
124
|
+
const content = entrypoint.type === 'library'
|
|
125
|
+
? item.active
|
|
126
|
+
? t('explorer.deactivate_item_description_one')
|
|
127
|
+
: t('explorer.activate_item_description_one')
|
|
128
|
+
: t('explorer.delete_link_description_one');
|
|
119
129
|
KitModal.confirm({
|
|
130
|
+
width: '100%',
|
|
131
|
+
style: { content: { width: '90vw', maxWidth: '656px' } },
|
|
120
132
|
type: 'confirm',
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
: t('records_activation.confirm_one')
|
|
126
|
-
: t('record_edition.delete_link_confirm'),
|
|
127
|
-
okText: t('global.submit') ?? undefined,
|
|
133
|
+
icon: false,
|
|
134
|
+
title,
|
|
135
|
+
content: content + BREAK_TWO_LINES + t('global.are_you_sure'),
|
|
136
|
+
okText: t('global.confirm') ?? undefined,
|
|
128
137
|
cancelText: t('global.cancel') ?? undefined,
|
|
129
138
|
onOk: async () => {
|
|
130
139
|
switch (entrypoint.type) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditStatusItemAction.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-item/useEditStatusItemAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAgB,OAAO,EAAC,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAE,cAAc,EAAC,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAGH,0BAA0B,EAC1B,4BAA4B,EAC5B,sBAAsB,EACzB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAoD,uBAAuB,EAAC,MAAM,yBAAyB,CAAC;AACnH,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"useEditStatusItemAction.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-item/useEditStatusItemAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAgB,OAAO,EAAC,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAE,cAAc,EAAC,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAGH,0BAA0B,EAC1B,4BAA4B,EAC5B,sBAAsB,EACzB,MAAM,eAAe,C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3C,IAAI,EAAE,KAAK,IAAI,EAAE;oBACb,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;wBACtB,KAAK,SAAS;4BACV,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gCACd,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;4BACjC,CAAC;4BAED,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC;wBAC/B,KAAK,MAAM;4BACP,MAAM,OAAO,GAAG,MAAM,wBAAwB,CAAC;gCAC3C,SAAS,EAAE;oCACP,OAAO,EAAE,UAAU,CAAC,eAAe;oCACnC,SAAS,EAAE,UAAU,CAAC,eAAe;oCACrC,QAAQ,EAAE,UAAU,CAAC,cAAc;oCACnC,KAAK,EAAE;wCACH,OAAO,EAAE,MAAM;wCACf,QAAQ;qCACX;iCACJ;6BACJ,CAAC,CAAC;4BACH,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;4BACjB,OAAO,OAAO,CAAC;wBACnB;4BACI,OAAO;oBACf,CAAC;gBACL,CAAC;aACJ,CAAC,CAAC;QACP,CAAC;KACJ,CAAC,EACF;QACI,CAAC;QACD,yBAAyB;QACzB,wBAAwB;QACxB,uBAAuB;QACvB,mBAAmB;QACnB,UAAU,CAAC,IAAI;QACf,IAAI,CAAC,aAAa;QAClB,QAAQ;KACX,CACJ,CAAC;IAEF,OAAO;QACH,oBAAoB,EAAE,SAAS,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI;KACjE,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { KitAlert, KitModal } from 'aristid-ds';
|
|
|
8
8
|
import { useDeactivateRecordsMutation } from '../../../_gqlTypes';
|
|
9
9
|
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
10
10
|
import { ViewSettingsActionTypes } from '../manage-view-settings';
|
|
11
|
-
import { MASS_SELECTION_ALL } from '../_constants';
|
|
11
|
+
import { BREAK_TWO_LINES, MASS_SELECTION_ALL } from '../_constants';
|
|
12
12
|
import { SUCCESS_ALERT_DURATION } from '../../../constants';
|
|
13
13
|
/**
|
|
14
14
|
* Hook used to get the action for mass actions only available on selection.
|
|
@@ -31,12 +31,19 @@ export const useDeactivateMassAction = ({ isEnabled, store: { view, dispatch },
|
|
|
31
31
|
icon: _jsx(FaTrash, {}),
|
|
32
32
|
callback: massSelectionFilter => {
|
|
33
33
|
KitModal.confirm({
|
|
34
|
+
width: '100%',
|
|
35
|
+
style: { content: { width: '90vw', maxWidth: '656px' } },
|
|
34
36
|
type: 'confirm',
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
icon: false,
|
|
38
|
+
title: t('explorer.deactivate_item', {
|
|
37
39
|
count: view.massSelection === MASS_SELECTION_ALL ? Infinity : view.massSelection.length
|
|
38
|
-
}),
|
|
39
|
-
|
|
40
|
+
}) ?? undefined,
|
|
41
|
+
content: t('explorer.deactivate_item_description', {
|
|
42
|
+
count: view.massSelection === MASS_SELECTION_ALL ? Infinity : view.massSelection.length
|
|
43
|
+
}) +
|
|
44
|
+
BREAK_TWO_LINES +
|
|
45
|
+
t('global.are_you_sure'),
|
|
46
|
+
okText: t('global.confirm') ?? undefined,
|
|
40
47
|
cancelText: t('global.cancel') ?? undefined,
|
|
41
48
|
onOk: async () => {
|
|
42
49
|
const { data } = await deactivateRecordsMutation({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDeactivateMassAction.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-mass/useDeactivateMassAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAgB,OAAO,EAAC,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAC,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAoD,uBAAuB,EAAC,MAAM,yBAAyB,CAAC;AACnH,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"useDeactivateMassAction.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-mass/useDeactivateMassAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAgB,OAAO,EAAC,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAC,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAoD,uBAAuB,EAAC,MAAM,yBAAyB,CAAC;AACnH,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAElE,OAAO,EAAC,sBAAsB,EAAC,MAAM,eAAe,CAAC;AAErD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACpC,SAAS,EACT,KAAK,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,EACvB,cAAc,EACd,UAAU,EACV,YAAY,EACZ,OAAO,EAUT,EAAE,EAAE;IACF,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,CAAC,yBAAyB,CAAC,GAAG,4BAA4B,EAAE,CAAC;IAEnE,MAAM,qBAAqB,GAAiB,OAAO,CAC/C,GAAG,EAAE,CAAC,CAAC;QACH,KAAK,EAAE,CAAC,CAAC,gCAAgC,CAAC;QAC1C,IAAI,EAAE,KAAC,OAAO,KAAG;QACjB,QAAQ,EAAE,mBAAmB,CAAC,EAAE;Y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CAAC,CAAC,4CAA4C,EAAE;4BACzD,KAAK,EAAE,IAAI,EAAE,iBAAiB,CAAC,MAAM;4BACrC,KAAK;yBACR,CAAC;wBACF,QAAQ,EAAE,IAAI;qBACjB,CAAC,CAAC;oBACH,IACI,IAAI,CAAC,aAAa,KAAK,kBAAkB;wBACzC,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAC/D,CAAC;wBACC,MAAM,OAAO,CAAC;4BACV,UAAU,EAAE;gCACR,KAAK,EAAE,IAAI,CAAC,QAAQ;gCACpB,MAAM,EAAE,CAAC;6BACZ;yBACJ,CAAC,CAAC;oBACP,CAAC;yBAAM,CAAC;wBACJ,MAAM,OAAO,EAAE,CAAC;oBACpB,CAAC;oBACD,YAAY,EAAE,CAAC,mBAAmB,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;oBACxD,QAAQ,CAAC;wBACL,IAAI,EAAE,uBAAuB,CAAC,iBAAiB;wBAC/C,OAAO,EAAE,EAAE;qBACd,CAAC,CAAC;gBACP,CAAC;aACJ,CAAC,CAAC;QACP,CAAC;KACJ,CAAC,EACF,CAAC,CAAC,EAAE,yBAAyB,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,CAAC,CACxG,CAAC;IAEF,OAAO;QACH,oBAAoB,EAAE,SAAS,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI;KACjE,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -2,7 +2,8 @@ import { type FeatureHook, type IMassActions } from '../_types';
|
|
|
2
2
|
import { type IViewSettingsAction, type IViewSettingsState } from '../manage-view-settings';
|
|
3
3
|
import { type Dispatch } from 'react';
|
|
4
4
|
import { useExplorerData } from '../_queries/useExplorerData';
|
|
5
|
-
|
|
5
|
+
import { type IUIFiltersState } from '../../../components/Filters/context/filtersReducer';
|
|
6
|
+
export declare const useDeleteLinkValues: ({ isEnabled, store: { view, dispatch }, filtersStore: { filters, filtersOperator }, pagination, allVisibleKeys, onDelete, refetch }: FeatureHook<{
|
|
6
7
|
pagination: null | {
|
|
7
8
|
limit: number;
|
|
8
9
|
offset: number;
|
|
@@ -11,6 +12,7 @@ export declare const useDeleteLinkValues: ({ isEnabled, store: { view, dispatch
|
|
|
11
12
|
view: IViewSettingsState;
|
|
12
13
|
dispatch: Dispatch<IViewSettingsAction>;
|
|
13
14
|
};
|
|
15
|
+
filtersStore: IUIFiltersState;
|
|
14
16
|
allVisibleKeys: string[];
|
|
15
17
|
onDelete?: IMassActions["callback"];
|
|
16
18
|
refetch: ReturnType<typeof useExplorerData>["refetch"];
|
|
@@ -9,8 +9,8 @@ import { useExplorerData } from '../_queries/useExplorerData';
|
|
|
9
9
|
import { FaTrash } from 'react-icons/fa';
|
|
10
10
|
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
11
11
|
import { KitModal } from 'aristid-ds';
|
|
12
|
-
import { MASS_SELECTION_ALL } from '../_constants';
|
|
13
|
-
export const useDeleteLinkValues = ({ isEnabled, store: { view, dispatch }, pagination, allVisibleKeys, onDelete, refetch }) => {
|
|
12
|
+
import { BREAK_TWO_LINES, MASS_SELECTION_ALL } from '../_constants';
|
|
13
|
+
export const useDeleteLinkValues = ({ isEnabled, store: { view, dispatch }, filtersStore: { filters, filtersOperator }, pagination, allVisibleKeys, onDelete, refetch }) => {
|
|
14
14
|
const { t } = useSharedTranslation();
|
|
15
15
|
const { saveValues } = useSaveValueBatchMutation();
|
|
16
16
|
const isLink = view.entrypoint.type === 'link';
|
|
@@ -21,8 +21,8 @@ export const useDeleteLinkValues = ({ isEnabled, store: { view, dispatch }, pagi
|
|
|
21
21
|
fulltextSearch: view.fulltextSearch,
|
|
22
22
|
pagination,
|
|
23
23
|
sorts: view.sort,
|
|
24
|
-
filtersOperator
|
|
25
|
-
filters
|
|
24
|
+
filtersOperator,
|
|
25
|
+
filters,
|
|
26
26
|
skip: !isLink
|
|
27
27
|
});
|
|
28
28
|
const _unlinkMassAction = useMemo(() => ({
|
|
@@ -30,11 +30,18 @@ export const useDeleteLinkValues = ({ isEnabled, store: { view, dispatch }, pagi
|
|
|
30
30
|
icon: _jsx(FaTrash, {}),
|
|
31
31
|
callback: massSelectionFilter => {
|
|
32
32
|
KitModal.confirm({
|
|
33
|
+
width: '100%',
|
|
34
|
+
style: { content: { width: '90vw', maxWidth: '656px' } },
|
|
33
35
|
type: 'confirm',
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
icon: false,
|
|
37
|
+
title: t('explorer.delete_link', {
|
|
36
38
|
count: view.massSelection === MASS_SELECTION_ALL ? Infinity : view.massSelection.length
|
|
37
|
-
}),
|
|
39
|
+
}) ?? undefined,
|
|
40
|
+
content: t('explorer.delete_link_description', {
|
|
41
|
+
count: view.massSelection === MASS_SELECTION_ALL ? Infinity : view.massSelection.length
|
|
42
|
+
}) +
|
|
43
|
+
BREAK_TWO_LINES +
|
|
44
|
+
t('global.are_you_sure'),
|
|
38
45
|
okText: t('global.submit') ?? undefined,
|
|
39
46
|
cancelText: t('global.cancel') ?? undefined,
|
|
40
47
|
onOk: async () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDeleteLinkValues.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-mass/useDeleteLinkValues.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,yBAAyB,MAAM,uFAAuF,CAAC;AAE9H,OAAO,EAAoD,uBAAuB,EAAC,MAAM,yBAAyB,CAAC;AACnH,OAAO,EAA0B,OAAO,EAAC,MAAM,OAAO,CAAC;AACvD,OAAO,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"useDeleteLinkValues.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-mass/useDeleteLinkValues.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,yBAAyB,MAAM,uFAAuF,CAAC;AAE9H,OAAO,EAAoD,uBAAuB,EAAC,MAAM,yBAAyB,CAAC;AACnH,OAAO,EAA0B,OAAO,EAAC,MAAM,OAAO,CAAC;AACvD,OAAO,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAKlE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAChC,SAAS,EACT,KAAK,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,EACvB,YAAY,EAAE,EAAC,OAAO,EAAE,eAAe,EAAC,EACxC,UAAU,EACV,cAAc,EACd,QAAQ,EACR,OAAO,EAWT,EAAE,EAAE;IACF,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,UAAU,EAAC,GAAG,yBAAyB,EAAE,CAAC;IAEjD,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,MAAM,CAAC;IAC/C,MAAM,EAAC,IAAI,EAAE,QAAQ,EAAE,0BAA0B,EAAE,eAAe,EAAC,GAAG,eAAe,CAAC;QAClF,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,SAAS,EAAE,IAAI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O,EAAC,EAAE,EAAE,CAAC,OAAc,CAAC,CAC5C,CAAC;wBACF,MAAM,OAAO,EAAE,CAAC;oBACpB,CAAC;oBACD,QAAQ,CAAC;wBACL,IAAI,EAAE,uBAAuB,CAAC,iBAAiB;wBAC/C,OAAO,EAAE,EAAE;qBACd,CAAC,CAAC;gBACP,CAAC;aACJ,CAAC,CAAC;QACP,CAAC;KACJ,CAAC,EACF,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAChF,CAAC;IAEF,OAAO;QACH,gBAAgB,EAAE,SAAS,IAAI,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI;KAC5E,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Dispatch } from 'react';
|
|
2
|
+
import { type FeatureHook, type IMassActions } from '../_types';
|
|
3
|
+
import { type IViewSettingsAction, type IViewSettingsState } from '../manage-view-settings';
|
|
4
|
+
/**
|
|
5
|
+
* Hook that provides a mass action configuration for exporting selected or all items
|
|
6
|
+
* from a view/data set
|
|
7
|
+
*/
|
|
8
|
+
export declare const useExportMassAction: ({ isEnabled, store: { view, dispatch }, totalCount, onExport }: FeatureHook<{
|
|
9
|
+
store: {
|
|
10
|
+
view: IViewSettingsState;
|
|
11
|
+
dispatch: Dispatch<IViewSettingsAction>;
|
|
12
|
+
};
|
|
13
|
+
totalCount: number;
|
|
14
|
+
onExport?: IMassActions["callback"];
|
|
15
|
+
}>) => {
|
|
16
|
+
exportMassAction: IMassActions;
|
|
17
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { useMemo } from 'react';
|
|
6
|
+
import { FaFileExport } from 'react-icons/fa';
|
|
7
|
+
import { KitAlert, KitModal } from 'aristid-ds';
|
|
8
|
+
import { useExportLazyQuery } from '../../../_gqlTypes';
|
|
9
|
+
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
10
|
+
import { ViewSettingsActionTypes } from '../manage-view-settings';
|
|
11
|
+
import { BREAK_TWO_LINES, MASS_SELECTION_ALL } from '../_constants';
|
|
12
|
+
import { ERROR_ALERT_DURATION, SUCCESS_ALERT_DURATION } from '../../../constants';
|
|
13
|
+
/**
|
|
14
|
+
* Hook that provides a mass action configuration for exporting selected or all items
|
|
15
|
+
* from a view/data set
|
|
16
|
+
*/
|
|
17
|
+
export const useExportMassAction = ({ isEnabled, store: { view, dispatch }, totalCount, onExport }) => {
|
|
18
|
+
const { t } = useSharedTranslation();
|
|
19
|
+
const [exportQuery] = useExportLazyQuery();
|
|
20
|
+
const _exportMassAction = useMemo(() => ({
|
|
21
|
+
label: t('explorer.massAction.export'),
|
|
22
|
+
icon: _jsx(FaFileExport, {}),
|
|
23
|
+
callback: massSelectionFilter => {
|
|
24
|
+
KitModal.confirm({
|
|
25
|
+
width: '100%',
|
|
26
|
+
style: { content: { width: '90vw', maxWidth: '656px' } },
|
|
27
|
+
icon: false,
|
|
28
|
+
type: 'confirm',
|
|
29
|
+
title: t('explorer.export_item', {
|
|
30
|
+
count: view.massSelection === MASS_SELECTION_ALL ? Infinity : view.massSelection.length
|
|
31
|
+
}) ?? undefined,
|
|
32
|
+
content: t('explorer.export_item_description', {
|
|
33
|
+
count: view.massSelection === MASS_SELECTION_ALL ? Infinity : view.massSelection.length
|
|
34
|
+
}) +
|
|
35
|
+
BREAK_TWO_LINES +
|
|
36
|
+
t('global.are_you_sure'),
|
|
37
|
+
okText: t('global.confirm') ?? undefined,
|
|
38
|
+
cancelText: t('global.cancel') ?? undefined,
|
|
39
|
+
onOk: async () => {
|
|
40
|
+
try {
|
|
41
|
+
const { data, error } = await exportQuery({
|
|
42
|
+
variables: {
|
|
43
|
+
library: view.libraryId,
|
|
44
|
+
filters: massSelectionFilter,
|
|
45
|
+
profile: 'default'
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
if (error) {
|
|
49
|
+
// Preserve the extensions property which contains the error code
|
|
50
|
+
const graphQLError = error.graphQLErrors?.[0];
|
|
51
|
+
const errorWithExtensions = new Error(error.message);
|
|
52
|
+
errorWithExtensions.extensions = graphQLError?.extensions;
|
|
53
|
+
throw errorWithExtensions;
|
|
54
|
+
}
|
|
55
|
+
const total = view.massSelection === MASS_SELECTION_ALL ? totalCount : view.massSelection.length;
|
|
56
|
+
KitAlert.success({
|
|
57
|
+
showIcon: true,
|
|
58
|
+
duration: SUCCESS_ALERT_DURATION,
|
|
59
|
+
message: t('explorer.massAction.export_message'),
|
|
60
|
+
description: t('explorer.massAction.export_description', {
|
|
61
|
+
count: data?.export.length,
|
|
62
|
+
total
|
|
63
|
+
}),
|
|
64
|
+
closable: true
|
|
65
|
+
});
|
|
66
|
+
onExport?.(massSelectionFilter, view.massSelection);
|
|
67
|
+
// Reset selection when export is done
|
|
68
|
+
dispatch({ type: ViewSettingsActionTypes.SET_SELECTED_KEYS, payload: [] });
|
|
69
|
+
}
|
|
70
|
+
catch (e) {
|
|
71
|
+
if (e.extensions?.code === 'CUSTOM_CONFIG_ERROR') {
|
|
72
|
+
KitAlert.error({
|
|
73
|
+
showIcon: true,
|
|
74
|
+
duration: ERROR_ALERT_DURATION,
|
|
75
|
+
message: t('error.error_occurred'),
|
|
76
|
+
description: t('explorer.massAction.export_config_error_description', {
|
|
77
|
+
library: view.libraryId
|
|
78
|
+
}),
|
|
79
|
+
closable: true
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
KitAlert.error({
|
|
84
|
+
showIcon: true,
|
|
85
|
+
duration: ERROR_ALERT_DURATION,
|
|
86
|
+
message: t('error.error_occurred'),
|
|
87
|
+
description: t('explorer.massAction.export_error_description'),
|
|
88
|
+
closable: true
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}), [t, exportQuery, view.massSelection, dispatch, view.libraryId]);
|
|
96
|
+
return {
|
|
97
|
+
exportMassAction: isEnabled ? _exportMassAction : null
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=useExportMassAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExportMassAction.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-mass/useExportMassAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAgB,OAAO,EAAC,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,QAAQ,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AACjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAoD,uBAAuB,EAAC,MAAM,yBAAyB,CAAC;AACnH,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAClE,OAAO,EAAC,oBAAoB,EAAE,sBAAsB,EAAC,MAAM,eAAe,CAAC;AAE3E;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAChC,SAAS,EACT,KAAK,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,EACvB,UAAU,EACV,QAAQ,EAQV,EAAE,EAAE;IACF,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,CAAC,WAAW,CAAC,GAAG,kBAAkB,EAAE,CAAC;IAE3C,MAAM,i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AAC,CAAC;wBACP,CAAC;6BAAM,CAAC;4BACJ,QAAQ,CAAC,KAAK,CAAC;gCACX,QAAQ,EAAE,IAAI;gCACd,QAAQ,EAAE,oBAAoB;gCAC9B,OAAO,EAAE,CAAC,CAAC,sBAAsB,CAAC;gCAClC,WAAW,EAAE,CAAC,CAAC,8CAA8C,CAAC;gCAC9D,QAAQ,EAAE,IAAI;6BACjB,CAAC,CAAC;wBACP,CAAC;oBACL,CAAC;gBACL,CAAC;aACJ,CAAC,CAAC;QACP,CAAC;KACJ,CAAC,EACF,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,CACjE,CAAC;IAEF,OAAO;QACH,gBAAgB,EAAE,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI;KACzD,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type Dispatch } from 'react';
|
|
2
2
|
import { type IMassActions, type MassSelection } from '../_types';
|
|
3
3
|
import { type IViewSettingsAction, type IViewSettingsState } from '../manage-view-settings';
|
|
4
|
+
import { type IUIFiltersState } from '../../../components/Filters/context/filtersReducer';
|
|
4
5
|
/**
|
|
5
6
|
* Hook used to manage mass selection as the snackbar and all kind of selection (manual, all in page, all in filters)
|
|
6
7
|
*
|
|
@@ -12,12 +13,13 @@ import { type IViewSettingsAction, type IViewSettingsState } from '../manage-vie
|
|
|
12
13
|
* @param massActions - array of all actions available on mass selection
|
|
13
14
|
* @param snackbarId - id of the snackbar displayed
|
|
14
15
|
*/
|
|
15
|
-
export declare const useMassActions: ({ isEnabled, store: { dispatch, view }, totalCount, allVisibleKeys, massActions, snackbarId }: {
|
|
16
|
+
export declare const useMassActions: ({ isEnabled, store: { dispatch, view }, filtersStore: { filters, filtersOperator }, totalCount, allVisibleKeys, massActions, snackbarId }: {
|
|
16
17
|
isEnabled: boolean;
|
|
17
18
|
store: {
|
|
18
19
|
view: IViewSettingsState;
|
|
19
20
|
dispatch: Dispatch<IViewSettingsAction>;
|
|
20
21
|
};
|
|
22
|
+
filtersStore: IUIFiltersState;
|
|
21
23
|
totalCount: number;
|
|
22
24
|
allVisibleKeys: string[];
|
|
23
25
|
massActions: IMassActions[];
|
|
@@ -10,7 +10,7 @@ import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
|
10
10
|
import { interleaveElement } from '../../../_utils/interleaveElement';
|
|
11
11
|
import { MASS_SELECTION_ALL } from '../_constants';
|
|
12
12
|
import { ViewSettingsActionTypes } from '../manage-view-settings';
|
|
13
|
-
import { prepareFiltersForRequest } from '
|
|
13
|
+
import { prepareFiltersForRequest } from '../../../components/Filters';
|
|
14
14
|
/**
|
|
15
15
|
* Hook used to manage mass selection as the snackbar and all kind of selection (manual, all in page, all in filters)
|
|
16
16
|
*
|
|
@@ -22,7 +22,7 @@ import { prepareFiltersForRequest } from '../_queries/prepareFiltersForRequest';
|
|
|
22
22
|
* @param massActions - array of all actions available on mass selection
|
|
23
23
|
* @param snackbarId - id of the snackbar displayed
|
|
24
24
|
*/
|
|
25
|
-
export const useMassActions = ({ isEnabled, store: { dispatch, view }, totalCount, allVisibleKeys, massActions, snackbarId }) => {
|
|
25
|
+
export const useMassActions = ({ isEnabled, store: { dispatch, view }, filtersStore: { filters, filtersOperator }, totalCount, allVisibleKeys, massActions, snackbarId }) => {
|
|
26
26
|
const { t } = useSharedTranslation();
|
|
27
27
|
useEffect(() => {
|
|
28
28
|
if (view.massSelection === MASS_SELECTION_ALL || view.massSelection.length !== 0) {
|
|
@@ -41,7 +41,7 @@ export const useMassActions = ({ isEnabled, store: { dispatch, view }, totalCoun
|
|
|
41
41
|
icon,
|
|
42
42
|
onClick: async () => {
|
|
43
43
|
await callback(view.massSelection === MASS_SELECTION_ALL
|
|
44
|
-
? prepareFiltersForRequest(
|
|
44
|
+
? prepareFiltersForRequest(filters, filtersOperator)
|
|
45
45
|
: interleaveElement({ operator: RecordFilterOperator.OR }, view.massSelection.map(key => [
|
|
46
46
|
{
|
|
47
47
|
field: 'id',
|
|
@@ -60,7 +60,7 @@ export const useMassActions = ({ isEnabled, store: { dispatch, view }, totalCoun
|
|
|
60
60
|
else {
|
|
61
61
|
closeKitSnackBar(snackbarId);
|
|
62
62
|
}
|
|
63
|
-
}, [view.massSelection,
|
|
63
|
+
}, [view.massSelection, filters, totalCount]);
|
|
64
64
|
useEffect(() => () => closeKitSnackBar(snackbarId), []);
|
|
65
65
|
const isOnePage = view.pageSize > totalCount;
|
|
66
66
|
const hasSelectedAllAvailableItems = view.massSelection === MASS_SELECTION_ALL || view.massSelection.length === totalCount;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMassActions.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-mass/useMassActions.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,eAAe,EAAC,MAAM,YAAY,CAAC;AACjG,OAAO,EAAgB,WAAW,EAAE,SAAS,EAAS,MAAM,OAAO,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,qBAAqB,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AACjD,OAAO,EAAoD,uBAAuB,EAAC,MAAM,yBAAyB,CAAC;AACnH,OAAO,EAAC,wBAAwB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"useMassActions.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-mass/useMassActions.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,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
@@ -8,10 +8,12 @@ import { type IViewSettingsState } from '../manage-view-settings';
|
|
|
8
8
|
*
|
|
9
9
|
* @param view - list of actions to be display as one button: the primary action button
|
|
10
10
|
* @param actions - list of actions to be display as one button: the primary action button
|
|
11
|
+
* @param hideFirstActionLabel - allows to hide its label when only one primary action
|
|
11
12
|
*/
|
|
12
|
-
export declare const usePrimaryActionsButton: ({ view, actions }: {
|
|
13
|
+
export declare const usePrimaryActionsButton: ({ view, actions, hideFirstActionLabel }: {
|
|
13
14
|
view: IViewSettingsState;
|
|
14
15
|
actions: IPrimaryAction[];
|
|
16
|
+
hideFirstActionLabel: boolean;
|
|
15
17
|
}) => {
|
|
16
18
|
primaryButton: JSX.Element;
|
|
17
19
|
};
|