@leav/ui 1.4.0 → 1.4.1-148fd69b
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/application.js +4 -4
- package/dist/__mocks__/common/attribute.js +34 -34
- package/dist/__mocks__/common/attribute.js.map +1 -1
- package/dist/__mocks__/common/filter.js +4 -4
- package/dist/__mocks__/common/filter.js.map +1 -1
- package/dist/__mocks__/common/form.js +58 -58
- package/dist/__mocks__/common/form.js.map +1 -1
- package/dist/__mocks__/common/import.js +5 -5
- package/dist/__mocks__/common/label.js +1 -1
- package/dist/__mocks__/common/library.js +25 -25
- package/dist/__mocks__/common/library.js.map +1 -1
- package/dist/__mocks__/common/mockSearchContextProvider.js +1 -1
- package/dist/__mocks__/common/record.js +3 -3
- package/dist/__mocks__/common/tree.js +7 -7
- package/dist/__mocks__/common/treeElements.js +14 -14
- package/dist/__mocks__/common/value.js +6 -6
- package/dist/__mocks__/common/versionProfile.js +1 -1
- package/dist/__mocks__/common/view.js +5 -5
- package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js +10 -10
- package/dist/__mocks__/mockQuery/mockGetRecordsFromLibraryQuery.js +5 -5
- package/dist/__mocks__/mockQuery/mockGetViewListQuery.js +12 -12
- package/dist/_gqlTypes/index.d.ts +49 -8
- package/dist/_gqlTypes/index.js +45 -4
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/export/exportQuery.js +2 -2
- package/dist/_queries/records/getRecordPropertiesQuery.js +1 -1
- package/dist/_queries/records/getRecordPropertiesQuery.js.map +1 -1
- package/dist/_queries/records/getRecordsFromLibraryQuery.d.ts +1 -1
- package/dist/_utils/getFiltersFromRequest.js +9 -9
- package/dist/_utils/getFiltersFromRequest.js.map +1 -1
- package/dist/_utils/getRequestFromFilter.js +5 -5
- package/dist/_utils/index.js +14 -14
- package/dist/_utils/index.js.map +1 -1
- package/dist/antdTheme/index.js +6 -6
- package/dist/antdTheme/index.js.map +1 -1
- package/dist/components/AttributePicker/AttributePicker.d.ts +1 -1
- package/dist/components/AttributePicker/AttributePicker.js +1 -1
- package/dist/components/AttributePicker/AttributePicker.js.map +1 -1
- package/dist/components/AttributePicker/AttributesList/AttributesList.d.ts +1 -1
- package/dist/components/AttributePicker/AttributesList/AttributesList.js +30 -30
- package/dist/components/AttributePicker/AttributesList/AttributesList.js.map +1 -1
- package/dist/components/AttributesSelectionList/Attribute/Attribute.js +2 -2
- package/dist/components/AttributesSelectionList/AttributesSelectionList.d.ts +1 -1
- package/dist/components/AttributesSelectionList/AttributesSelectionList.js +6 -6
- package/dist/components/AttributesSelectionList/AttributesSelectionList.js.map +1 -1
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/SelectedAttribute.js +1 -1
- package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.js +1 -1
- package/dist/components/AttributesSelectionList/helpers/attributeToSelectedAttribute.js +1 -1
- package/dist/components/AttributesSelectionList/reducer/__mocks__/attributesSelectionListStateContext.js +1 -1
- package/dist/components/AttributesSelectionList/reducer/attributesSelectionListReducer.js +3 -3
- package/dist/components/AttributesSelectionList/reducer/attributesSelectionListStateContext.js +1 -1
- package/dist/components/AttributesSelectionList/reducer/attributesSelectionListStateContext.js.map +1 -1
- package/dist/components/CreateDirectory/CreateDirectory.js +15 -15
- package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
- package/dist/components/DeactivateRecordsModal/DeactivateRecordsModal.d.ts +1 -1
- package/dist/components/DeactivateRecordsModal/DeactivateRecordsModal.js +3 -3
- package/dist/components/DeactivateRecordsModal/DeactivateRecordsModal.js.map +1 -1
- package/dist/components/EditApplication/EditApplication.d.ts +1 -1
- package/dist/components/EditApplication/EditApplication.js +5 -5
- package/dist/components/EditApplication/EditApplication.js.map +1 -1
- package/dist/components/EditApplication/EditApplicationInfo/EditApplicationInfo.js +18 -18
- package/dist/components/EditApplication/EditApplicationInfo/EditApplicationInfo.js.map +1 -1
- package/dist/components/EditApplication/EditApplicationInfo/EditApplicationInfoForm/EditApplicationInfoForm.d.ts +1 -1
- package/dist/components/EditApplication/EditApplicationInfo/EditApplicationInfoForm/EditApplicationInfoForm.js +13 -13
- package/dist/components/EditApplication/EditApplicationInfo/EditApplicationInfoForm/EditApplicationInfoForm.js.map +1 -1
- package/dist/components/EditApplication/EditApplicationInfo/EditApplicationInfoForm/ModuleSelector/ModuleSelector.js +1 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttribute.js +4 -4
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfo.js +20 -20
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfo.js.map +1 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/EditAttributeInfoForm.d.ts +1 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/EditAttributeInfoForm.js +12 -12
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/EditAttributeInfoForm.js.map +1 -1
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/LinkedLibraryForm/LinkedLibraryForm.js +2 -2
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/LinkedTreeForm/LinkedTreeForm.js +2 -2
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/ValuesVersionsForm/ValuesVersionsForm.js +4 -4
- package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/ValuesVersionsForm/ValuesVersionsForm.js.map +1 -1
- package/dist/components/EditAttributeModal/EditAttributeModal.d.ts +1 -1
- package/dist/components/EditAttributeModal/EditAttributeModal.js +9 -9
- package/dist/components/EditAttributeModal/EditAttributeModal.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibrary.d.ts +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibrary.js +8 -8
- package/dist/components/EditLibraryModal/EditLibrary/EditLibrary.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/AttributeCell/AttributeCell.js +4 -4
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/AttributesList.js +20 -20
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/AttributesList.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/EditLibraryAttributes.js +6 -6
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryIndexation/EditLibraryIndexation.js +9 -9
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryIndexation/EditLibraryIndexation.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryInfo/EditLibraryInfo.js +19 -19
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryInfo/EditLibraryInfo.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryInfo/EditLibraryInfoForm/EditLibraryInfoForm.d.ts +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryInfo/EditLibraryInfoForm/EditLibraryInfoForm.js +18 -18
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryInfo/EditLibraryInfoForm/EditLibraryInfoForm.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditLibraryPreviewsSettings.js +6 -6
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditLibraryPreviewsSettings.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditPreviewsSettingsModal/EditPreviewsSettingsModal.d.ts +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditPreviewsSettingsModal/EditPreviewsSettingsModal.js +12 -12
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditPreviewsSettingsModal/EditPreviewsSettingsModal.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/EditPreviewsSettingsModal/SizesEditor/SizesEditor.js +13 -13
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/PreviewsSettingsList/PreviewsSettingsList.d.ts +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/PreviewsSettingsList/PreviewsSettingsList.js +10 -10
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryPreviewsSettings/PreviewsSettingsList/PreviewsSettingsList.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibraryModal.d.ts +1 -1
- package/dist/components/EditLibraryModal/EditLibraryModal.js +11 -11
- package/dist/components/EditLibraryModal/EditLibraryModal.js.map +1 -1
- package/dist/components/EditTreeModal/EditTree/EditTree.js +4 -4
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfo.js +20 -20
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfo.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 +8 -8
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/EditTreeInfoForm.js.map +1 -1
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/TreeLibrariesForm/TreeLibrariesForm.js +10 -10
- package/dist/components/EditTreeModal/EditTreeModal.js +8 -8
- package/dist/components/EditTreeModal/EditTreeModal.js.map +1 -1
- package/dist/components/EntityCard/EntityCard.d.ts +1 -1
- package/dist/components/EntityCard/EntityCard.js +5 -5
- package/dist/components/EntityCard/EntityCard.js.map +1 -1
- package/dist/components/EntityPreview/EntityPreviewList/EntityPreviewList.js +2 -2
- package/dist/components/EntityPreview/EntityPreviewTile/EntityPreviewTile.d.ts +1 -1
- package/dist/components/EntityPreview/EntityPreviewTile/EntityPreviewTile.js +1 -1
- package/dist/components/EntityPreview/EntityPreviewTile/EntityPreviewTile.js.map +1 -1
- package/dist/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/dist/components/ErrorDisplay/ErrorDisplay.d.ts +1 -1
- package/dist/components/ErrorDisplay/ErrorDisplay.js +5 -5
- package/dist/components/ErrorDisplay/ErrorDisplay.js.map +1 -1
- package/dist/components/Explorer/DataView.js +8 -8
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +4 -2
- package/dist/components/Explorer/Explorer.js +65 -51
- 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/ExplorerTitle.js +3 -3
- package/dist/components/Explorer/ExplorerTitle.js.map +1 -1
- 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/TableCell.js +11 -11
- package/dist/components/Explorer/TableCell.js.map +1 -1
- package/dist/components/Explorer/TableNameCell.js +4 -4
- package/dist/components/Explorer/_constants.d.ts +1 -0
- package/dist/components/Explorer/_constants.js +3 -2
- package/dist/components/Explorer/_constants.js.map +1 -1
- package/dist/components/Explorer/_queries/useExecuteUpdateViewMutation.js +2 -2
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +4 -3
- package/dist/components/Explorer/_queries/useExplorerData.js +20 -20
- 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.d.ts +1 -1
- package/dist/components/Explorer/actions-item/useEditStatusItemAction.js +45 -36
- package/dist/components/Explorer/actions-item/useEditStatusItemAction.js.map +1 -1
- package/dist/components/Explorer/actions-item/useReplaceItemAction.d.ts +1 -1
- package/dist/components/Explorer/actions-item/useReplaceItemAction.js +3 -3
- package/dist/components/Explorer/actions-item/useReplaceItemAction.js.map +1 -1
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.d.ts +1 -1
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js +24 -17
- 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 +24 -17
- 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 +16 -16
- package/dist/components/Explorer/actions-mass/useMassActions.js.map +1 -1
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.d.ts +2 -2
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +13 -13
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -1
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.d.ts +1 -1
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +3 -3
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.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/conditionsHelper.js +1 -1
- package/dist/components/Explorer/link-item/LinkModal.js +11 -11
- package/dist/components/Explorer/link-item/LinkModal.js.map +1 -1
- package/dist/components/Explorer/link-item/useAddLinkMassAction.d.ts +1 -1
- package/dist/components/Explorer/link-item/useAddLinkMassAction.js +5 -5
- package/dist/components/Explorer/link-item/useAddLinkMassAction.js.map +1 -1
- package/dist/components/Explorer/link-item/useReplaceLinkMassAction.d.ts +1 -1
- package/dist/components/Explorer/link-item/useReplaceLinkMassAction.js +5 -5
- package/dist/components/Explorer/link-item/useReplaceLinkMassAction.js.map +1 -1
- package/dist/components/Explorer/list-saved-views/SavedViews.js +3 -3
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js +2 -2
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +5 -5
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +2 -2
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +3 -3
- 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 -15
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js +2 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +5 -5
- 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/LabelViewFormModal.js +2 -2
- 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 +12 -12
- 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 +20 -8
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.js +3 -3
- package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.js +5 -5
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js +5 -1
- 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 +10 -8
- 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 +21 -9
- package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +18 -18
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +2 -2
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +3 -6
- 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 +23 -147
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
- package/dist/components/Explorer/useColumnWidth.js +2 -2
- package/dist/components/Explorer/useLoadView.js +21 -14
- package/dist/components/Explorer/useLoadView.js.map +1 -1
- package/dist/components/Explorer/usePagination.js +3 -3
- package/dist/components/Explorer/useSearchInput.d.ts +1 -1
- package/dist/components/Explorer/useSearchInput.js +3 -3
- package/dist/components/Explorer/useSearchInput.js.map +1 -1
- package/dist/components/Explorer/useViewSettingsReducer.js +21 -26
- 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/Filters/filter-items/filter-type/BooleanAttributeDropdown.js +35 -0
- 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 +2 -2
- 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 +6 -6
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +14 -14
- 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 +8 -8
- 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 +11 -11
- 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 +13 -13
- 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 +3 -3
- 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 +3 -3
- 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 +12 -12
- 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 +27 -27
- 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 +33 -32
- 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 +22 -22
- package/dist/components/Filters/useTransformFilters.js.map +1 -0
- package/dist/components/FloatingMenu/FloatingMenu.js +2 -2
- package/dist/components/ImageMissing/ImageMissing.js +1 -1
- package/dist/components/ImportModal/ImportModal.js +16 -16
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +14 -14
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportScheduleModal/ImportScheduleModal.d.ts +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportScheduleModal/ImportScheduleModal.js +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportScheduleModal/ImportScheduleModal.js.map +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportSheetSettings/ImportSheetSettings.d.ts +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportSheetSettings/ImportSheetSettings.js +7 -7
- package/dist/components/ImportModal/ImportModalConfigStep/ImportSheetSettings/ImportSheetSettings.js.map +1 -1
- package/dist/components/ImportModal/ImportModalSelectFileStep/ImportModalSelectFileStep.js +7 -7
- package/dist/components/ImportModal/ImportModalSelectFileStep/ImportModalSelectFileStep.js.map +1 -1
- package/dist/components/ImportModal/importReducer/ImportReducerContext.js +1 -1
- package/dist/components/ImportModal/importReducer/importReducer.js +15 -15
- package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.js +1 -1
- package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.js.map +1 -1
- package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.js +9 -9
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.d.ts +1 -1
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js +23 -23
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +13 -13
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.js +4 -4
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/FilterTreeCondition.js +3 -3
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.js +15 -15
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.js +7 -7
- package/dist/components/LibraryItemsList/FiltersPanel/mustHideValue.js +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsList.js +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsList.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +15 -15
- package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListEmpty/LibraryItemsListEmpty.js +2 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/BodyCell.js +2 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.js +2 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/AllValuesCount.js +2 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.js +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.js +7 -7
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js +2 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.js +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.js +6 -6
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +12 -12
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Table.js +7 -7
- package/dist/components/LibraryItemsList/MenuItemList/MenuItemList.js +1 -1
- package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.js +8 -21
- package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.js.map +1 -1
- package/dist/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.js +13 -13
- package/dist/components/LibraryItemsList/MenuSelection/MenuSelection.js +10 -10
- package/dist/components/LibraryItemsList/MenuView/MenuView.js +26 -26
- package/dist/components/LibraryItemsList/Sidebar/Sidebar.js +1 -1
- package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.js +6 -6
- package/dist/components/LibraryItemsList/TileDisplay/TileDisplay.js +1 -1
- package/dist/components/LibraryItemsList/TileDisplay/helpers/getItemPreviewSize.js +3 -3
- package/dist/components/LibraryItemsList/VersionsPanel/VersionsPanel.js +2 -2
- package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +5 -5
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js +8 -8
- package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.js +8 -8
- package/dist/components/LibraryItemsList/constants.js +1 -1
- package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.d.ts +1 -1
- package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.js +4 -4
- package/dist/components/LibraryItemsList/helpers/extractAttributesFromLibrary.js +4 -4
- package/dist/components/LibraryItemsList/helpers/getFieldFromKey.js +2 -2
- package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +6 -6
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +18 -18
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +1 -1
- package/dist/components/LibraryItemsList/hooks/useUpdateViewsOrderMutation.js +9 -9
- package/dist/components/LibraryItemsList/hooks/useUpdateViewsOrderMutation.js.map +1 -1
- package/dist/components/LibraryItemsList/manageItems.js +1 -1
- package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.js +3 -3
- package/dist/components/LibraryItemsList/shared/SelectCellsBtn.js +2 -2
- package/dist/components/LibraryPicker/LibrariesList/LibrariesList.d.ts +1 -1
- package/dist/components/LibraryPicker/LibrariesList/LibrariesList.js +15 -15
- package/dist/components/LibraryPicker/LibrariesList/LibrariesList.js.map +1 -1
- package/dist/components/LibraryPicker/LibraryPicker.d.ts +1 -1
- package/dist/components/LibraryPicker/LibraryPicker.js +1 -1
- package/dist/components/LibraryPicker/LibraryPicker.js.map +1 -1
- package/dist/components/List/List.js +1 -1
- 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/{ExportModal → Notifications}/index.js +1 -1
- package/dist/components/Notifications/index.js.map +1 -0
- package/dist/components/RecordCard/RecordCard.d.ts +1 -1
- package/dist/components/RecordCard/RecordCard.js +6 -6
- package/dist/components/RecordCard/RecordCard.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +16 -17
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordButtons/EditRecordButtons.js +1 -1
- package/dist/components/RecordEdition/EditRecordButtons/SidebarButton.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +7 -7
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/hooks/__mocks__/useDeleteValueMutation.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/__mocks__/useSaveValueMutation.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.js +3 -3
- package/dist/components/RecordEdition/EditRecordContent/hooks/useExecuteDeleteValueMutation.js +4 -4
- package/dist/components/RecordEdition/EditRecordContent/hooks/useExecuteSaveValueBatchMutation.js +6 -6
- package/dist/components/RecordEdition/EditRecordContent/hooks/useTabManagement.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/linkFieldReducer/linkFieldReducer.js +19 -19
- package/dist/components/RecordEdition/EditRecordContent/reducers/linkFieldReducer/linkFieldReducer.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/AddValueBtn/AddValueBtn.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/ValueDetailsBtn.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionBtn/ValuesVersionBtn.js +7 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +15 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useExplorerLinkRecords.d.ts +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useExplorerLinkRecords.js +12 -12
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useExplorerLinkRecords.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js +19 -16
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +20 -12
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +4 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +3 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js +9 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +3 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +21 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeItem.js +3 -3
- 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 +6 -6
- 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.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js +19 -19
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/index.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/DeleteAllValuesButton.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/DeleteAllValuesButton.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/calculatedInheritedFlags.js +6 -6
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.js +8 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.d.ts +2 -2
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +4 -4
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordModal/useEditRecordModal.js +4 -2
- 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 +17 -4
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.js +2 -2
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js +9 -9
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js +6 -6
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +4 -4
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +16 -16
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.js +3 -3
- package/dist/components/RecordEdition/_types.d.ts +2 -2
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +10 -10
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducerContext.js +1 -1
- package/dist/components/RecordEdition/hooks/useCreateCancelConfirm/useCreateCancelConfirm.js +1 -1
- package/dist/components/RecordEdition/hooks/useGetSubmitButtons.d.ts +2 -2
- package/dist/components/RecordHistory/RecordHistory.js +2 -2
- package/dist/components/RecordHistory/hooks/useFetchRecordHistory.d.ts +1 -1
- package/dist/components/RecordHistory/hooks/useFetchRecordHistory.js +8 -8
- package/dist/components/RecordHistory/hooks/useFetchRecordHistory.js.map +1 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModal.js +1 -1
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/FileModalContent.js +2 -2
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/FileModalSidebar/FileModalSidebar.js +8 -8
- package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/ImageFile/ImageFile.js +2 -2
- package/dist/components/RecordPreviewWithModal/RecordPreviewWithModal.js +1 -1
- package/dist/components/SearchModal/SearchModal.js +1 -1
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js +12 -12
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +1 -0
- package/dist/components/SelectTreeNode/SelectTreeNode.js +3 -3
- package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +1 -0
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +18 -25
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
- package/dist/components/SelectTreeNode/TreeNodeTitle.d.ts +10 -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/SelectTreeNodeModalOld/SelectTreeNodeModalOld.js +3 -3
- package/dist/components/SelectTreeNodeModalOld/SelectTreeNodeModalOld.js.map +1 -1
- package/dist/components/SimpleErrorBoundary/SimpleErrorBoundary.js +1 -1
- package/dist/components/TreePicker/TreePicker.d.ts +1 -1
- package/dist/components/TreePicker/TreePicker.js +1 -1
- package/dist/components/TreePicker/TreePicker.js.map +1 -1
- package/dist/components/TreePicker/TreesList/TreesList.js +13 -13
- package/dist/components/TreePicker/TreesList/TreesList.js.map +1 -1
- package/dist/components/TriggerPreviewsGenerationModal/TriggerPreviewsGenerationModal.d.ts +1 -1
- package/dist/components/TriggerPreviewsGenerationModal/TriggerPreviewsGenerationModal.js +7 -7
- package/dist/components/TriggerPreviewsGenerationModal/TriggerPreviewsGenerationModal.js.map +1 -1
- package/dist/components/UploadFiles/UploadFiles.d.ts +1 -1
- package/dist/components/UploadFiles/UploadFiles.js +25 -25
- package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
- package/dist/components/ValuesVersionConfigurator/ValuesVersionConfigurator.d.ts +1 -1
- package/dist/components/ValuesVersionConfigurator/ValuesVersionConfigurator.js +3 -3
- package/dist/components/ValuesVersionConfigurator/ValuesVersionConfigurator.js.map +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +2 -1
- package/dist/components/index.js.map +1 -1
- package/dist/constants.d.ts +6 -4
- package/dist/constants.js +8 -6
- package/dist/constants.js.map +1 -1
- package/dist/contexts/EditRecordModalContext/EditRecordModalContext.js +1 -1
- package/dist/contexts/EditRecordModalContext/EditRecordModalProvider.js +2 -2
- package/dist/contexts/EditRecordModalContext/EditRecordModalProvider.js.map +1 -1
- package/dist/gqlPossibleTypes/index.js +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/useAntdLocale/useAntdLocale.js +1 -1
- package/dist/hooks/useAuth/useAuth.js +1 -1
- package/dist/hooks/useCanEditRecord/useCanEditRecord.js +8 -8
- package/dist/hooks/useCanEditRecord/useCanEditRecord.js.map +1 -1
- package/dist/hooks/useExecuteDeleteViewMutation/useExecuteDeleteViewMutation.js +3 -3
- package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js +8 -8
- package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -1
- package/dist/hooks/useGetLibraryDetailExtendedQuery/useGetLibraryDetailExtendedQuery.js +3 -3
- package/dist/hooks/useGetLibraryDetailExtendedQuery/useGetLibraryDetailExtendedQuery.js.map +1 -1
- package/dist/hooks/useGetPreparedFileData/useGetPreparedFileData.js +3 -3
- package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -1
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js +11 -11
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
- package/dist/hooks/useGetRecordUpdatesSubscription/useGetRecordUpdatesSubscription.js +1 -1
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js +5 -5
- package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/messageHandlers.d.ts +3 -3
- package/dist/hooks/useIFrameMessenger/messageHandlers.js +16 -20
- package/dist/hooks/useIFrameMessenger/messageHandlers.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/schema.d.ts +88 -5
- package/dist/hooks/useIFrameMessenger/schema.js +49 -57
- 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 +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/hooks/useLang/__mocks__/useLang.js +1 -1
- package/dist/hooks/useLibraryVersionTrees/useLibraryVersionTrees.js +1 -1
- package/dist/hooks/useLoginChecker/useLoginChecker.js +2 -2
- package/dist/hooks/useRecordsConsultationHistory/useRecordsConsultationHistory.js +3 -3
- package/dist/hooks/useRedirectToLogin/useRedirectToLogin.js +1 -1
- package/dist/hooks/useRefreshFieldValues/useRefreshFieldValues.js +8 -8
- package/dist/hooks/useRefreshFieldValues/useRefreshFieldValues.js.map +1 -1
- package/dist/hooks/useSharedTranslation/__mocks__/useSharedTranslation.js +2 -2
- package/dist/hooks/useSharedTranslation/useSharedTranslation.js +3 -3
- package/dist/hooks/useValuesCacheUpdate/useValuesCacheUpdate.js +2 -2
- package/dist/locales/en/shared.json +29 -5
- package/dist/locales/fr/shared.json +29 -5
- package/dist/testing/MockedLangContextProvider/MockedLangContextProvider.js +1 -1
- package/dist/testing/MockedUserContextProvider/MockedUserContextProvider.js +3 -3
- package/dist/types/search.d.ts +5 -5
- package/dist/types/search.js +7 -7
- package/dist/types/search.js.map +1 -1
- 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 +0 -27
- 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/ExportModal/ExportModal.d.ts +0 -10
- package/dist/components/ExportModal/ExportModal.js +0 -123
- package/dist/components/ExportModal/ExportModal.js.map +0 -1
- package/dist/components/ExportModal/index.d.ts +0 -1
- package/dist/components/ExportModal/index.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
|
@@ -30,7 +30,7 @@ function FileModal({ fileId, libraryId, open, onClose }) {
|
|
|
30
30
|
const { t } = useSharedTranslation();
|
|
31
31
|
const { loading, error, fileData } = useGetPreparedFileData(libraryId, fileId);
|
|
32
32
|
const footerButtons = [
|
|
33
|
-
_jsx(Button, { "aria-label": t('global.close'), onClick: onClose, children: t('global.close') }, "close")
|
|
33
|
+
_jsx(Button, { "aria-label": t('global.close'), onClick: onClose, children: t('global.close') }, "close"),
|
|
34
34
|
];
|
|
35
35
|
const footer = _jsx(ModalFooter, { children: footerButtons });
|
|
36
36
|
return (_jsxs(StyledModal, { open: open, destroyOnClose: true, okText: t('global.close'), onCancel: onClose, width: "90vw", centered: true, style: { padding: 0, maxWidth: `${fileModalWidth}px` }, styles: { body: { height: 'calc(100vh - 12rem)', overflowY: 'auto', padding: 0 } }, footer: footer, children: [loading && _jsx(Loading, {}), !loading && (error || !fileData) && (_jsx(ErrorDisplay, { message: error?.message ?? t('global.element_not_found') })), !loading && !error && fileData && _jsx(FileModalContent, { fileData: fileData })] }));
|
package/dist/components/RecordPreviewWithModal/FileModal/FileModalContent/FileModalContent.js
CHANGED
|
@@ -59,7 +59,7 @@ function FileModalContent({ fileData }) {
|
|
|
59
59
|
let fileViewer;
|
|
60
60
|
const viewerProps = {
|
|
61
61
|
fileData,
|
|
62
|
-
fallback: _jsx(NoDisplayFile, { fileData: fileData, noPreviewMessage: true, fallback: null })
|
|
62
|
+
fallback: _jsx(NoDisplayFile, { fileData: fileData, noPreviewMessage: true, fallback: null }),
|
|
63
63
|
};
|
|
64
64
|
const fileType = getFileType(fileData?.file_name?.[0]?.value);
|
|
65
65
|
switch (fileType) {
|
|
@@ -78,7 +78,7 @@ function FileModalContent({ fileData }) {
|
|
|
78
78
|
default:
|
|
79
79
|
fileViewer = _jsx(NoDisplayFile, { fileData: fileData, fallback: null });
|
|
80
80
|
}
|
|
81
|
-
return (_jsxs(Container, { children: [_jsx(Title, { "data-testid": "title-section", children: _jsx(RecordCard, { record: fileData.whoAmI, size: PreviewSize.
|
|
81
|
+
return (_jsxs(Container, { children: [_jsx(Title, { "data-testid": "title-section", children: _jsx(RecordCard, { record: fileData.whoAmI, size: PreviewSize.SMALL }) }), _jsx(Content, { "data-testid": "content-section", children: fileViewer }), _jsx(FileModalSidebar, { fileData: fileData })] }));
|
|
82
82
|
}
|
|
83
83
|
export default FileModalContent;
|
|
84
84
|
//# sourceMappingURL=FileModalContent.js.map
|
|
@@ -47,32 +47,32 @@ function FileModalSidebar({ fileData }) {
|
|
|
47
47
|
const summaryContent = [
|
|
48
48
|
{
|
|
49
49
|
title: t('record_summary.id'),
|
|
50
|
-
value: fileData.id
|
|
50
|
+
value: fileData.id,
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
title: t('record_summary.label'),
|
|
54
|
-
value: fileData.whoAmI.label
|
|
54
|
+
value: fileData.whoAmI.label,
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
title: t('record_summary.created_at'),
|
|
58
58
|
value: t('record_summary.created_at_value', {
|
|
59
59
|
date: fileData.created_at?.[0]?.value,
|
|
60
60
|
user: fileData.created_by?.[0]?.value.whoAmI.label,
|
|
61
|
-
interpolation: { escapeValue: false }
|
|
62
|
-
})
|
|
61
|
+
interpolation: { escapeValue: false },
|
|
62
|
+
}),
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
title: t('record_summary.modified_at'),
|
|
66
66
|
value: t('record_summary.modified_at_value', {
|
|
67
67
|
date: fileData.modified_at?.[0]?.value,
|
|
68
68
|
user: fileData.modified_by?.[0]?.value.whoAmI.label,
|
|
69
|
-
interpolation: { escapeValue: false }
|
|
70
|
-
})
|
|
69
|
+
interpolation: { escapeValue: false },
|
|
70
|
+
}),
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
title: t('file_data.path'),
|
|
74
|
-
value: _jsx(Path, { children: '/' + fileData.file_path?.[0]?.value })
|
|
75
|
-
}
|
|
74
|
+
value: _jsx(Path, { children: '/' + fileData.file_path?.[0]?.value }),
|
|
75
|
+
},
|
|
76
76
|
];
|
|
77
77
|
return (_jsxs(_Fragment, { children: [_jsxs(Sidebar, { "data-testid": "sidebar-section", children: [_jsx(Descriptions, { layout: "horizontal", column: 1, style: { padding: '1rem' }, children: summaryContent.map((item, index) => {
|
|
78
78
|
const { title, value } = item;
|
|
@@ -46,7 +46,7 @@ const RecordPreviewWithModal = ({ previewFile, imageStyle, showTransparency = fa
|
|
|
46
46
|
const _handleClosePreviewModal = () => setPreviewModalOpen(false);
|
|
47
47
|
return (_jsxs(_Fragment, { children: [_jsxs(DivClickHandler, { "$isClickable": isPreviewClickable, onClick: _handlePreviewClick, "data-testid": "click-handler", children: [_jsx(EntityPreview, { imageStyle: {
|
|
48
48
|
background: showTransparency ? themeVars.checkerBoard : 'transparent',
|
|
49
|
-
...imageStyle
|
|
49
|
+
...imageStyle,
|
|
50
50
|
}, ...recordPreviewProps }), isPreviewClickable && (_jsx(DivOverlay, { title: t('record_summary.preview_title'), children: _jsx(EyeOutlined, {}) }))] }), isPreviewModalOpen && (_jsx(FileModal, { open: isPreviewModalOpen, fileId: fileId, libraryId: fileLibraryId, onClose: _handleClosePreviewModal }))] }));
|
|
51
51
|
};
|
|
52
52
|
export default RecordPreviewWithModal;
|
|
@@ -24,7 +24,7 @@ export const SearchModal = ({ visible, setVisible, submitAction, libId }) => {
|
|
|
24
24
|
setSelection(newSelection);
|
|
25
25
|
};
|
|
26
26
|
const renderModal = (content) => (_jsx(Modal, { open: visible, onCancel: _handleModalClose, width: "95vw", styles: { body: { height: '90vh', overflow: 'hidden' } }, style: {
|
|
27
|
-
top: '1rem'
|
|
27
|
+
top: '1rem',
|
|
28
28
|
}, onOk: _handleOk, okText: t('global.apply'), cancelText: t('global.cancel'), children: content }));
|
|
29
29
|
const { loading, data, error } = useGetLibraryDetailExtendedQuery({ library: libId });
|
|
30
30
|
if (loading) {
|
|
@@ -10,7 +10,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
|
10
10
|
import { faXmark } from '@fortawesome/free-solid-svg-icons';
|
|
11
11
|
import { FaExchangeAlt, FaEye, FaPlus } from 'react-icons/fa';
|
|
12
12
|
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
13
|
-
import { useExplorerSelectionIdsLazyQuery } from '../../_gqlTypes';
|
|
13
|
+
import { useExplorerSelectionIdsLazyQuery, } from '../../_gqlTypes';
|
|
14
14
|
import { Explorer } from '../../components/Explorer';
|
|
15
15
|
import { useEditRecordModal } from '../RecordEdition/EditRecordModal/useEditRecordModal';
|
|
16
16
|
const modalMaxWidth = 1200;
|
|
@@ -48,7 +48,7 @@ const ModalMainStyledDiv = styled.div `
|
|
|
48
48
|
height: 100%;
|
|
49
49
|
position: relative;
|
|
50
50
|
`;
|
|
51
|
-
export const SelectRecordForLinkModal = ({ className, open, childLibraryId, replacementMode, valuesList, allowFreeEntry, selectionMode, joinLibraryContext, hideSelectAllAction, onSelectionCompleted, onClose }) => {
|
|
51
|
+
export const SelectRecordForLinkModal = ({ className, open, childLibraryId, replacementMode, valuesList, allowFreeEntry, selectionMode, joinLibraryContext, hideSelectAllAction, onSelectionCompleted, onClose, }) => {
|
|
52
52
|
const { t } = useSharedTranslation();
|
|
53
53
|
const explorerContainerRef = useRef(null);
|
|
54
54
|
const _handleClose = () => {
|
|
@@ -59,14 +59,14 @@ export const SelectRecordForLinkModal = ({ className, open, childLibraryId, repl
|
|
|
59
59
|
const _footer = (_jsx(ModalFooterStyledDiv, { children: _jsx(KitSpace, { children: _jsx(KitButton, { "aria-label": _closeButtonLabel, icon: _jsx(FontAwesomeIcon, { icon: faXmark }), onClick: _handleClose, children: _closeButtonLabel }, "close") }) }));
|
|
60
60
|
const [getRecordIdsFromFilters] = useExplorerSelectionIdsLazyQuery({
|
|
61
61
|
fetchPolicy: 'no-cache',
|
|
62
|
-
onCompleted: onSelectionCompleted
|
|
62
|
+
onCompleted: onSelectionCompleted,
|
|
63
63
|
});
|
|
64
64
|
const { EditRecordModal, openEditRecordModal } = useEditRecordModal();
|
|
65
65
|
return (_jsx(StyledModal, { className: className, open: open, onCancel: _handleClose, destroyOnClose: true, closable: false, cancelText: t('global.cancel'), width: "90vw", centered: true, footer: _footer, children: _jsx(ModalMainStyledDiv, { ref: explorerContainerRef, children: _jsxs(Explorer.EditSettingsContextProvider, { panelElement: () => explorerContainerRef.current ?? document.body, children: [_jsx(Explorer, { entrypoint: {
|
|
66
66
|
type: 'library',
|
|
67
67
|
libraryId: childLibraryId,
|
|
68
68
|
valuesList,
|
|
69
|
-
allowFreeEntry
|
|
69
|
+
allowFreeEntry,
|
|
70
70
|
}, showCreateOnNoResultOnly: true, selectionMode: selectionMode, hideSelectAllAction: hideSelectAllAction, massActions: [
|
|
71
71
|
{
|
|
72
72
|
label: replacementMode
|
|
@@ -77,11 +77,11 @@ export const SelectRecordForLinkModal = ({ className, open, childLibraryId, repl
|
|
|
77
77
|
await getRecordIdsFromFilters({
|
|
78
78
|
variables: {
|
|
79
79
|
libraryId: childLibraryId,
|
|
80
|
-
filters: massSelectionFilter
|
|
81
|
-
}
|
|
80
|
+
filters: massSelectionFilter,
|
|
81
|
+
},
|
|
82
82
|
});
|
|
83
|
-
}
|
|
84
|
-
}
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
85
|
], primaryActions: [], defaultActionsForItem: [], defaultMassActions: [], itemActions: [
|
|
86
86
|
{
|
|
87
87
|
label: t('explorer.edit-item'),
|
|
@@ -95,12 +95,12 @@ export const SelectRecordForLinkModal = ({ className, open, childLibraryId, repl
|
|
|
95
95
|
label: item.whoAmI?.label,
|
|
96
96
|
subLabel: item.whoAmI?.subLabel,
|
|
97
97
|
color: item.whoAmI?.color,
|
|
98
|
-
library: { id: item.libraryId }
|
|
98
|
+
library: { id: item.libraryId },
|
|
99
99
|
},
|
|
100
|
-
editionFormId: 'edition'
|
|
100
|
+
editionFormId: 'edition',
|
|
101
101
|
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
104
|
], defaultPrimaryActions: ['create'], joinLibraryContext: joinLibraryContext, showSearch: true, ignoreViewByDefault: true }), EditRecordModal] }) }) }));
|
|
105
105
|
};
|
|
106
106
|
//# sourceMappingURL=SelectRecordForLinkModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectRecordForLinkModal.js","sourceRoot":"","sources":["../../../src/components/SelectRecordForLinkModal/SelectRecordForLinkModal.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAA8C,MAAM,EAAC,MAAM,OAAO,CAAC;AAC1E,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAE3E,+BAA+B;AAC/B,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAGH,gCAAgC,
|
|
1
|
+
{"version":3,"file":"SelectRecordForLinkModal.js","sourceRoot":"","sources":["../../../src/components/SelectRecordForLinkModal/SelectRecordForLinkModal.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAA8C,MAAM,EAAC,MAAM,OAAO,CAAC;AAC1E,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAE3E,+BAA+B;AAC/B,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AA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AE,EAClB,qBAAqB,EAAE,EAAE,EACzB,kBAAkB,EAAE,EAAE,EACtB,WAAW,EAAE;4BACT;gCACI,KAAK,EAAE,CAAC,CAAC,oBAAoB,CAAC;gCAC9B,IAAI,EAAE,KAAC,KAAK,KAAG;gCACf,uBAAuB,EAAE,IAAI;gCAC7B,QAAQ,EAAE,IAAI,CAAC,EAAE;oCACb,mBAAmB,CAAC;wCAChB,OAAO,EAAE,IAAI,CAAC,SAAS;wCACvB,MAAM,EAAE;4CACJ,EAAE,EAAE,IAAI,CAAC,MAAM;4CACf,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK;4CACzB,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ;4CAC/B,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK;4CACzB,OAAO,EAAE,EAAC,EAAE,EAAE,IAAI,CAAC,SAAS,EAAC;yCAChC;wCACD,aAAa,EAAE,SAAS;qCAC3B,CAAC,CAAC;gCACP,CAAC;6BACJ;yBACJ,EACD,qBAAqB,EAAE,CAAC,QAAQ,CAAC,EACjC,kBAAkB,EAAE,kBAAkB,EACtC,UAAU,QACV,mBAAmB,SACrB,EACD,eAAe,IAEmB,GACtB,GACX,CACjB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -9,11 +9,11 @@ import { ErrorDisplay } from '../..';
|
|
|
9
9
|
import useLang from '../../hooks/useLang';
|
|
10
10
|
import { SelectTreeNodeContent } from './SelectTreeNodeContent';
|
|
11
11
|
import { SelectTreeNodeContentSkeleton } from './SelectTreeNodeContentSkeleton';
|
|
12
|
-
export const SelectTreeNode = ({ treeId, childrenAsRecordValuePermissionFilter, onSelect, onCheck, selectedNodes, disabledNodes, selectableLibraries, multiple = false, checkStrictly = true, checkable = false, canSelectRoot = false, loadRecursively =
|
|
12
|
+
export const SelectTreeNode = ({ treeId, childrenAsRecordValuePermissionFilter, onSelect, onCheck, selectedNodes, disabledNodes, selectableLibraries, multiple = false, checkStrictly = true, checkable = false, canSelectRoot = false, loadRecursively = true, noPagination = false, showSelectChildrenButton = false, }) => {
|
|
13
13
|
const { lang } = useLang();
|
|
14
14
|
const { t } = useSharedTranslation();
|
|
15
15
|
const { loading, error, data } = useTreeDataQueryQuery({
|
|
16
|
-
variables: { treeId }
|
|
16
|
+
variables: { treeId },
|
|
17
17
|
});
|
|
18
18
|
if (loading) {
|
|
19
19
|
return _jsx(SelectTreeNodeContentSkeleton, {});
|
|
@@ -24,6 +24,6 @@ export const SelectTreeNode = ({ treeId, childrenAsRecordValuePermissionFilter,
|
|
|
24
24
|
if (!data?.trees.list[0]) {
|
|
25
25
|
return _jsx(ErrorDisplay, { message: t('error.unknown_tree', { treeId }) });
|
|
26
26
|
}
|
|
27
|
-
return (_jsx(SelectTreeNodeContent, { treeData: { id: treeId, label: localizedTranslation(data.trees.list[0].label, lang) || treeId }, childrenAsRecordValuePermissionFilter: childrenAsRecordValuePermissionFilter, onCheck: onCheck, onSelect: onSelect, multiple: multiple, checkable: checkable, checkStrictly: checkStrictly, selectedNodes: selectedNodes, disabledNodes: disabledNodes, canSelectRoot: canSelectRoot, selectableLibraries: selectableLibraries, loadRecursively: loadRecursively, noPagination: noPagination }));
|
|
27
|
+
return (_jsx(SelectTreeNodeContent, { treeData: { id: treeId, label: localizedTranslation(data.trees.list[0].label, lang) || treeId }, childrenAsRecordValuePermissionFilter: childrenAsRecordValuePermissionFilter, onCheck: onCheck, onSelect: onSelect, multiple: multiple, checkable: checkable, checkStrictly: checkStrictly, selectedNodes: selectedNodes, disabledNodes: disabledNodes, canSelectRoot: canSelectRoot, selectableLibraries: selectableLibraries, loadRecursively: loadRecursively, noPagination: noPagination, showSelectChildrenButton: showSelectChildrenButton }));
|
|
28
28
|
};
|
|
29
29
|
//# sourceMappingURL=SelectTreeNode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectTreeNode.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/SelectTreeNode.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAkD,qBAAqB,EAAC,MAAM,eAAe,CAAC;AACrG,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AACnC,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAE1C,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,6BAA6B,EAAC,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectTreeNode.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/SelectTreeNode.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAkD,qBAAqB,EAAC,MAAM,eAAe,CAAC;AACrG,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AACnC,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAE1C,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,6BAA6B,EAAC,MAAM,iCAAiC,CAAC;AAmB9E,MAAM,CAAC,MAAM,cAAc,GAA4C,CAAC,EACpE,MAAM,EACN,qCAAqC,EACrC,QAAQ,EACR,OAAO,EACP,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,QAAQ,GAAG,KAAK,EAChB,aAAa,GAAG,IAAI,EACpB,SAAS,GAAG,KAAK,EACjB,aAAa,GAAG,KAAK,EACrB,eAAe,GAAG,IAAI,EACtB,YAAY,GAAG,KAAK,EACpB,wBAAwB,GAAG,KAAK,GACnC,EAAE,EAAE;IACD,MAA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eContentProps {
|
|
|
18
18
|
selectableLibraries?: string[];
|
|
19
19
|
loadRecursively?: boolean;
|
|
20
20
|
noPagination?: boolean;
|
|
21
|
+
showSelectChildrenButton?: boolean;
|
|
21
22
|
}
|
|
22
23
|
export declare const SelectTreeNodeContent: FunctionComponent<ISelectTreeNodeContentProps>;
|
|
23
24
|
export {};
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
3
|
// This file is released under LGPL V3
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
-
import { useEffect,
|
|
5
|
+
import { useEffect, useState } from 'react';
|
|
6
6
|
import { KitTree } from 'aristid-ds';
|
|
7
7
|
import { Spin } from 'antd';
|
|
8
8
|
import { useTreeNodeChildrenLazyQuery } from '../../_gqlTypes';
|
|
@@ -10,7 +10,7 @@ import { defaultPaginationPageSize, ErrorDisplay } from '../..';
|
|
|
10
10
|
import { TreeNodeTitle } from './TreeNodeTitle';
|
|
11
11
|
import { _isObjectSelection } from './_types';
|
|
12
12
|
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
13
|
-
export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePermissionFilter, onSelect, onCheck, selectedNodes, disabledNodes, multiple = false, checkable = false, checkStrictly = true, canSelectRoot = false, selectableLibraries, loadRecursively =
|
|
13
|
+
export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePermissionFilter, onSelect, onCheck, selectedNodes = [], disabledNodes = [], multiple = false, checkable = false, checkStrictly = true, canSelectRoot = false, selectableLibraries, loadRecursively = true, noPagination = false, showSelectChildrenButton = false, }) => {
|
|
14
14
|
const { t } = useSharedTranslation();
|
|
15
15
|
const rootNode = {
|
|
16
16
|
title: tree.label,
|
|
@@ -20,23 +20,18 @@ export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePer
|
|
|
20
20
|
isLeaf: false,
|
|
21
21
|
parents: [],
|
|
22
22
|
paginationOffset: 0,
|
|
23
|
-
children: []
|
|
23
|
+
children: [],
|
|
24
24
|
};
|
|
25
25
|
// As we'll fetch children when a node is expanded, we store the whole tree content in a hash map
|
|
26
26
|
// to make update easier and more efficient
|
|
27
27
|
const [treeMap, setTreeMap] = useState({
|
|
28
|
-
[tree.id]: rootNode
|
|
28
|
+
[tree.id]: rootNode,
|
|
29
29
|
});
|
|
30
30
|
const [fetchError, setFetchError] = useState();
|
|
31
31
|
const [loadTreeContent, { error, called }] = useTreeNodeChildrenLazyQuery();
|
|
32
|
-
const isFetching = useRef(false);
|
|
33
32
|
const _fetchTreeContent = async (parentNodeKey, offset = 0, currentTreeMap = { ...treeMap }) => {
|
|
34
33
|
try {
|
|
35
|
-
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
isFetching.current = true;
|
|
39
|
-
const { data: { treeNodeChildren } } = await loadTreeContent({
|
|
34
|
+
const { data: { treeNodeChildren }, } = await loadTreeContent({
|
|
40
35
|
variables: {
|
|
41
36
|
treeId: tree.id,
|
|
42
37
|
node: parentNodeKey && parentNodeKey !== tree.id ? parentNodeKey : null,
|
|
@@ -44,10 +39,10 @@ export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePer
|
|
|
44
39
|
? undefined
|
|
45
40
|
: {
|
|
46
41
|
limit: defaultPaginationPageSize,
|
|
47
|
-
offset
|
|
42
|
+
offset,
|
|
48
43
|
},
|
|
49
|
-
childrenAsRecordValuePermissionFilter
|
|
50
|
-
}
|
|
44
|
+
childrenAsRecordValuePermissionFilter,
|
|
45
|
+
},
|
|
51
46
|
});
|
|
52
47
|
const parentMapKey = parentNodeKey ?? tree.id;
|
|
53
48
|
const totalCount = treeNodeChildren.totalCount;
|
|
@@ -64,11 +59,13 @@ export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePer
|
|
|
64
59
|
children: [],
|
|
65
60
|
parents: currentParents,
|
|
66
61
|
paginationOffset: 0,
|
|
67
|
-
disabled: disabledNodes
|
|
62
|
+
disabled: disabledNodes.includes(e.id),
|
|
68
63
|
}));
|
|
64
|
+
const existingKeys = new Set(parentElement.children.map(child => child.key));
|
|
65
|
+
const newNodes = formattedNodes.filter(node => !existingKeys.has(node.key));
|
|
69
66
|
parentElement.children = [
|
|
70
67
|
...parentElement.children.filter(child => !child.key.startsWith(`__showMore${parentMapKey}`)),
|
|
71
|
-
...
|
|
68
|
+
...newNodes,
|
|
72
69
|
];
|
|
73
70
|
for (const node of formattedNodes) {
|
|
74
71
|
currentTreeMap[node.key] = node;
|
|
@@ -83,7 +80,7 @@ export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePer
|
|
|
83
80
|
key: showMoreKey,
|
|
84
81
|
isLeaf: false,
|
|
85
82
|
children: [],
|
|
86
|
-
paginationOffset: 0
|
|
83
|
+
paginationOffset: 0,
|
|
87
84
|
};
|
|
88
85
|
parentElement.children.push(showMoreElement);
|
|
89
86
|
}
|
|
@@ -104,9 +101,6 @@ export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePer
|
|
|
104
101
|
catch (err) {
|
|
105
102
|
setFetchError(err.message);
|
|
106
103
|
}
|
|
107
|
-
finally {
|
|
108
|
-
isFetching.current = false;
|
|
109
|
-
}
|
|
110
104
|
};
|
|
111
105
|
useEffect(() => {
|
|
112
106
|
_fetchTreeContent(undefined, 0);
|
|
@@ -129,6 +123,10 @@ export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePer
|
|
|
129
123
|
await _fetchTreeContent(id, paginationOffset);
|
|
130
124
|
};
|
|
131
125
|
const _handleSelect = (_, e) => {
|
|
126
|
+
// Prevent selecting when clicking on select all children button
|
|
127
|
+
if (e.nativeEvent.target instanceof HTMLButtonElement) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
132
130
|
// If user clicked on the text "show more", we load more children instead of selecting the node
|
|
133
131
|
if ('isShowMore' in e.node && e.node.isShowMore) {
|
|
134
132
|
_handleLoadData(e.node);
|
|
@@ -169,11 +167,6 @@ export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePer
|
|
|
169
167
|
if (error || fetchError) {
|
|
170
168
|
return _jsx(ErrorDisplay, { message: error?.message ?? fetchError });
|
|
171
169
|
}
|
|
172
|
-
return (_jsx(KitTree, { checkStrictly: checkStrictly, treeData: [treeMap[rootNode.key]], loadData: loadRecursively ? undefined : _handleLoadData, multiple: multiple, checkable: checkable, defaultExpandedKeys: selectedNodes
|
|
173
|
-
const dataNode = node;
|
|
174
|
-
return (_jsx(TreeNodeTitle, { title: dataNode.title, checkable: checkable,
|
|
175
|
-
// We don't want to select the "show more" text
|
|
176
|
-
isSelected: selectedNodes?.includes(dataNode.id) && !dataNode.isShowMore, isDisabled: disabledNodes?.includes(dataNode.id) }));
|
|
177
|
-
}, onSelect: _handleSelect, onCheck: _handleCheck }));
|
|
170
|
+
return (_jsx(KitTree, { checkStrictly: checkStrictly, treeData: [treeMap[rootNode.key]], loadData: loadRecursively ? undefined : _handleLoadData, multiple: multiple, checkable: checkable, defaultExpandedKeys: selectedNodes.length > 0 ? [...selectedNodes, tree.id] : [tree.id], selectedKeys: selectedNodes, checkedKeys: selectedNodes, titleRender: node => (_jsx(TreeNodeTitle, { checkable: checkable, disabledNodes: disabledNodes, loadRecursively: loadRecursively, node: node, onSelect: onSelect, selectedNodes: selectedNodes, showSelectChildrenButton: showSelectChildrenButton })), onSelect: _handleSelect, onCheck: _handleCheck }));
|
|
178
171
|
};
|
|
179
172
|
//# sourceMappingURL=SelectTreeNodeContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectTreeNodeContent.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/SelectTreeNodeContent.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAA8C,SAAS,EAAE,
|
|
1
|
+
{"version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
import { type ITreeNodeWithRecord } from '../../types';
|
|
2
4
|
interface ITreeNodeTitleProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
checkable: boolean;
|
|
6
|
+
disabledNodes: string[];
|
|
7
|
+
loadRecursively: boolean;
|
|
8
|
+
node: ITreeMapElement;
|
|
9
|
+
onSelect: (node: ITreeNodeWithRecord, selected: boolean) => void;
|
|
10
|
+
selectedNodes: string[];
|
|
11
|
+
showSelectChildrenButton: boolean;
|
|
7
12
|
}
|
|
8
13
|
export declare const TreeNodeTitle: FunctionComponent<ITreeNodeTitleProps>;
|
|
9
14
|
export {};
|
|
@@ -1,8 +1,54 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import { KitButton, KitTag, KitTypography } from 'aristid-ds';
|
|
6
7
|
import { FaCheck } from 'react-icons/fa';
|
|
7
|
-
|
|
8
|
+
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
9
|
+
import styled from 'styled-components';
|
|
10
|
+
const TreeNodeLine = styled.div `
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
`;
|
|
15
|
+
const TreeNodeLineSection = styled.div `
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: calc(var(--general-spacing-xs) * 1px);
|
|
19
|
+
`;
|
|
20
|
+
export const TreeNodeTitle = ({ checkable, disabledNodes, loadRecursively, node, onSelect, selectedNodes, showSelectChildrenButton, }) => {
|
|
21
|
+
const { t } = useSharedTranslation();
|
|
22
|
+
const [hover, setHover] = useState(false);
|
|
23
|
+
const isSelected = selectedNodes.includes(node.id) && !node.isShowMore;
|
|
24
|
+
const isDisabled = disabledNodes.includes(node.id);
|
|
25
|
+
const buttonInSelectMode = node.children
|
|
26
|
+
.filter(child => !child.isShowMore && !disabledNodes.includes(child.id))
|
|
27
|
+
.every(child => !selectedNodes.includes(child.id));
|
|
28
|
+
const handleChildrenSelection = (event) => {
|
|
29
|
+
event.stopPropagation();
|
|
30
|
+
node.children.forEach(child => {
|
|
31
|
+
if (node.disabled || child.isShowMore) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
onSelect(child, buttonInSelectMode);
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
return (_jsxs(TreeNodeLine, { onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), children: [_jsxs(TreeNodeLineSection, { children: [_jsx(KitTypography.Text, { size: "fontSize5", disabled: isDisabled, children: node.title }), _jsx(SelectedChildrenCount, { node: node, selectedNodes: selectedNodes, loadRecursively: loadRecursively })] }), _jsxs(TreeNodeLineSection, { children: [showSelectChildrenButton && node.children.length > 0 && hover && (_jsx(KitButton, { size: "s", onClick: e => handleChildrenSelection(e), children: t(`tree-node-selection.${buttonInSelectMode ? 'select_children' : 'unselect_children'}`) })), !checkable && isSelected && (_jsx(FaCheck, { color: isDisabled ? 'var(--general-utilities-text-disabled)' : 'var(--general-utilities-text-blue)' }))] })] }));
|
|
38
|
+
};
|
|
39
|
+
const SelectedChildrenCount = ({ node, selectedNodes, loadRecursively }) => {
|
|
40
|
+
// it can work only if all children are loaded
|
|
41
|
+
if (!loadRecursively) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
const selectedChildrenCount = countSelectedNodes(node, selectedNodes);
|
|
45
|
+
return selectedChildrenCount > 0 ? _jsx(KitTag, { idCardProps: { description: selectedChildrenCount } }) : null;
|
|
46
|
+
};
|
|
47
|
+
const countSelectedNodes = (node, selectedNodes) => node.children?.reduce((count, child) => {
|
|
48
|
+
if (selectedNodes.includes(child.id) && !child.isShowMore) {
|
|
49
|
+
count += 1;
|
|
50
|
+
}
|
|
51
|
+
count += countSelectedNodes(child, selectedNodes);
|
|
52
|
+
return count;
|
|
53
|
+
}, 0) ?? 0;
|
|
8
54
|
//# sourceMappingURL=TreeNodeTitle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNodeTitle.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/TreeNodeTitle.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"TreeNodeTitle.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/TreeNodeTitle.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAyB,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAI9B,CAAC;AACF,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIrC,CAAC;AAWF,MAAM,CAAC,MAAM,aAAa,GAA2C,CAAC,EAClE,SAAS,EACT,aAAa,EACb,eAAe,EACf,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,wBAAwB,GAC3B,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,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Aa,CAAC,CAAC;IAClD,OAAO,KAAK,CAAC;AACjB,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/_types.ts"],"names":[],"mappings":"AAuBA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAA4B,EAAkD,EAAE,CAC/G,SAAS,IAAI,SAAS,IAAI,aAAa,IAAI,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/_types.ts"],"names":[],"mappings":"AAuBA,gEAAgE;AAChE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAA4B,EAAkD,EAAE,CAC/G,SAAS,IAAI,SAAS,IAAI,aAAa,IAAI,SAAS,CAAC"}
|
|
@@ -8,13 +8,13 @@ import { SelectTreeNode } from '../SelectTreeNode';
|
|
|
8
8
|
import { KitButton, KitModal } from 'aristid-ds';
|
|
9
9
|
// Todo: check usages of this component (Filter and VersionTree) if still used
|
|
10
10
|
// or if it can be removed in favor of the new SelectTreeNodeModal
|
|
11
|
-
export const SelectTreeNodeModalOld = ({ treeId, selectedNodeKey, onSubmit, isVisible, onClose, canSelectRoot = false }) => {
|
|
11
|
+
export const SelectTreeNodeModalOld = ({ treeId, selectedNodeKey, onSubmit, isVisible, onClose, canSelectRoot = false, }) => {
|
|
12
12
|
const { t } = useSharedTranslation();
|
|
13
13
|
const [selectedNode, setSelectedNode] = useState({
|
|
14
14
|
id: selectedNodeKey,
|
|
15
15
|
key: selectedNodeKey,
|
|
16
16
|
title: '',
|
|
17
|
-
children: []
|
|
17
|
+
children: [],
|
|
18
18
|
});
|
|
19
19
|
const _handleCancel = () => {
|
|
20
20
|
onClose();
|
|
@@ -28,7 +28,7 @@ export const SelectTreeNodeModalOld = ({ treeId, selectedNodeKey, onSubmit, isVi
|
|
|
28
28
|
};
|
|
29
29
|
return (_jsx(KitModal, { isOpen: isVisible, showCloseIcon: true, onClose: _handleCancel, close: _handleCancel, onCancel: _handleCancel, title: t('tree-node-selection.title'), width: "70rem", styles: { body: { maxHeight: '80vh', overflowY: 'auto' } }, centered: true, footer: [
|
|
30
30
|
_jsx(KitButton, { onClick: _handleCancel, children: t('global.cancel') }, "cancel"),
|
|
31
|
-
_jsx(KitButton, { type: "primary", onClick: _handleApply, children: t('global.apply') }, "add")
|
|
31
|
+
_jsx(KitButton, { type: "primary", onClick: _handleApply, children: t('global.apply') }, "add"),
|
|
32
32
|
], destroyOnClose: true, children: _jsx(SelectTreeNode, { treeId: treeId, onSelect: _onSelect, selectedNodes: [selectedNode?.key], canSelectRoot: canSelectRoot }) }));
|
|
33
33
|
};
|
|
34
34
|
//# sourceMappingURL=SelectTreeNodeModalOld.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectTreeNodeModalOld.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNodeModalOld/SelectTreeNodeModalOld.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAyB,QAAQ,EAAC,MAAM,OAAO,CAAC;AACvD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAW/C,8EAA8E;AAC9E,kEAAkE;AAClE,MAAM,CAAC,MAAM,sBAAsB,GAAiD,CAAC,EACjF,MAAM,EACN,eAAe,EACf,QAAQ,EACR,SAAS,EACT,OAAO,EACP,aAAa,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"SelectTreeNodeModalOld.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNodeModalOld/SelectTreeNodeModalOld.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AAC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EAAE,EAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAC,EAAC,EACtD,QAAQ,QACR,MAAM,EAAE;YACJ,KAAC,SAAS,IAAc,OAAO,EAAE,aAAa,YACzC,CAAC,CAAC,eAAe,CAAC,IADR,QAAQ,CAEX;YACZ,KAAC,SAAS,IAAC,IAAI,EAAC,SAAS,EAAW,OAAO,EAAE,YAAY,YACpD,CAAC,CAAC,cAAc,CAAC,IADQ,KAAK,CAEvB;SACf,EACD,cAAc,kBAEd,KAAC,cAAc,IACX,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,SAAS,EACnB,aAAa,EAAE,CAAC,YAAY,EAAE,GAAG,CAAC,EAClC,aAAa,EAAE,aAAa,GAC9B,GACK,CACd,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -7,5 +7,5 @@ interface ITreePickerProps {
|
|
|
7
7
|
multiple?: boolean;
|
|
8
8
|
showSelected?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare function TreePicker({ open, onClose, onSubmit, selected, multiple, showSelected }: ITreePickerProps): JSX.Element;
|
|
10
|
+
declare function TreePicker({ open, onClose, onSubmit, selected, multiple, showSelected, }: ITreePickerProps): JSX.Element;
|
|
11
11
|
export default TreePicker;
|
|
@@ -6,7 +6,7 @@ import { Modal } from 'antd';
|
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
8
8
|
import { TreesList } from './TreesList';
|
|
9
|
-
function TreePicker({ open, onClose, onSubmit, selected = [], multiple = true, showSelected = false }) {
|
|
9
|
+
function TreePicker({ open, onClose, onSubmit, selected = [], multiple = true, showSelected = false, }) {
|
|
10
10
|
const { t } = useSharedTranslation();
|
|
11
11
|
const [selectedTrees, setSelectedTrees] = useState([]);
|
|
12
12
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreePicker.js","sourceRoot":"","sources":["../../../src/components/TreePicker/TreePicker.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,KAAK,EAAC,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAWtC,SAAS,UAAU,CAAC,EAChB,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,IAAI,EACf,YAAY,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"TreePicker.js","sourceRoot":"","sources":["../../../src/components/TreePicker/TreePicker.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,KAAK,EAAC,MAAM,MAAM,CAAC;AAC3B,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAWtC,SAAS,UAAU,CAAC,EAChB,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,IAAI,EACf,YAAY,GAAG,KAAK,GACL;IACf,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAsB,EAAE,CAAC,CAAC;IAC5E,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,MAAM,aAAa,GAAG,CAAC,SAA8B,EAAE,EAAE;QACrD,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC,CAAC;IAEF,MAAM,aAAa,G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