@leav/ui 0.4.0-fd9dcf3f → 1.0.0-6e54bb6d
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 +450 -211
- package/dist/_gqlTypes/index.js +246 -76
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/attributes/attributeDetailsFragment.js +1 -0
- package/dist/_queries/attributes/attributeDetailsFragment.js.map +1 -1
- package/dist/_utils/attributeType.d.ts +2 -1
- package/dist/_utils/attributeType.js +2 -1
- package/dist/_utils/attributeType.js.map +1 -1
- package/dist/components/Explorer/DataView.js +3 -3
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +1 -1
- package/dist/components/Explorer/Explorer.js +13 -4
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerToolbar.js +11 -2
- package/dist/components/Explorer/ExplorerToolbar.js.map +1 -1
- package/dist/components/Explorer/TableCell.js +25 -9
- package/dist/components/Explorer/TableCell.js.map +1 -1
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.d.ts +1 -1
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.js +99 -31
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.js.map +1 -1
- package/dist/components/Explorer/_queries/useExplorerData.js +32 -27
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +74 -8
- package/dist/components/Explorer/_types.js +5 -0
- package/dist/components/Explorer/_types.js.map +1 -1
- package/dist/components/Explorer/actions-item/useReplaceItemAction.d.ts +2 -1
- package/dist/components/Explorer/actions-item/useReplaceItemAction.js +2 -2
- package/dist/components/Explorer/actions-item/useReplaceItemAction.js.map +1 -1
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.d.ts +3 -1
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +9 -19
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -1
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.d.ts +6 -3
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +5 -19
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js.map +1 -1
- package/dist/components/Explorer/link-item/LinkModal.d.ts +3 -0
- package/dist/components/Explorer/link-item/LinkModal.js +44 -4
- package/dist/components/Explorer/link-item/LinkModal.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +4 -4
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.d.ts +9 -3
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js +78 -13
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +21 -8
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js +9 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueListDropDown.d.ts +9 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueListDropDown.js +131 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueListDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TreeAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TreeAttributeDropDown.js +69 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TreeAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.d.ts +6 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +43 -4
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js +29 -8
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +2 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +3 -2
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +57 -14
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
- package/dist/components/Explorer/useLoadView.d.ts +1 -1
- package/dist/components/Explorer/useLoadView.js +32 -38
- package/dist/components/Explorer/useLoadView.js.map +1 -1
- package/dist/components/Explorer/useSearchInput.js +2 -0
- package/dist/components/Explorer/useSearchInput.js.map +1 -1
- package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js +1 -12
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +33 -214
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.d.ts +3 -3
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +15 -22
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +6 -16
- package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.d.ts +5 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.js +28 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useTabManagement.d.ts +11 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useTabManagement.js +35 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useTabManagement.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/FormDivider/FormDivider.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.js +6 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +6 -33
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.d.ts +3 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.js +9 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record-in-edition/useLinkRecords.d.ts → link-record/useExplorerLinkRecords.d.ts} +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record-in-edition/useLinkRecords.js → link-record/useExplorerLinkRecords.js} +3 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useExplorerLinkRecords.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record-in-edition/useLinkRecordsInEdition.d.ts → link-record/useLinkRecords.d.ts} +5 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js +76 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +26 -21
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +10 -23
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/{useDisplayTreeNode.d.ts → TreeNodeList.d.ts} +3 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.js +5 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.d.ts +1 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js +12 -16
- 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 +2 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js +51 -63
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.d.ts +1 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.js +6 -10
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +45 -7
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +46 -8
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +2 -1
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.d.ts +3 -0
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +7 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -1
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.d.ts +2 -5
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +1 -1
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js.map +1 -1
- package/dist/components/RecordEdition/index.d.ts +1 -1
- package/dist/components/RecordEdition/index.js +1 -1
- package/dist/components/RecordEdition/index.js.map +1 -1
- package/dist/components/RecordHistory/RecordHistory.d.ts +8 -0
- package/dist/components/RecordHistory/RecordHistory.js +33 -0
- package/dist/components/RecordHistory/RecordHistory.js.map +1 -0
- package/dist/components/RecordHistory/RecordHistoryLogEntry.d.ts +8 -0
- package/dist/components/RecordHistory/RecordHistoryLogEntry.js +53 -0
- package/dist/components/RecordHistory/RecordHistoryLogEntry.js.map +1 -0
- package/dist/components/RecordHistory/_types.d.ts +8 -0
- package/dist/components/RecordHistory/_types.js +2 -0
- package/dist/components/RecordHistory/_types.js.map +1 -0
- package/dist/components/RecordHistory/hooks/useFetchRecordHistory.d.ts +14 -0
- package/dist/components/RecordHistory/hooks/useFetchRecordHistory.js +25 -0
- package/dist/components/RecordHistory/hooks/useFetchRecordHistory.js.map +1 -0
- package/dist/components/RecordHistory/index.d.ts +1 -0
- package/dist/components/{LinkSelect → RecordHistory}/index.js +1 -2
- package/dist/components/RecordHistory/index.js.map +1 -0
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.d.ts +2 -0
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js +6 -4
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +5 -3
- package/dist/components/SelectTreeNode/SelectTreeNode.js +2 -3
- package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +3 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +68 -55
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
- package/dist/components/SelectTreeNode/_types.d.ts +18 -0
- package/dist/components/SelectTreeNode/_types.js +2 -0
- package/dist/components/SelectTreeNode/_types.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -1
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js +2 -2
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/types.d.ts +2 -0
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.d.ts +3 -3
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js +5 -1
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js.map +1 -1
- package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.d.ts +6 -3
- package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.js +1 -3
- package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.js.map +1 -1
- package/dist/locales/en/shared.json +14 -1
- package/dist/locales/fr/shared.json +13 -0
- package/package.json +17 -4
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +0 -10
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +0 -75
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +0 -1
- package/dist/components/LinkSelect/LinkSelect.d.ts +0 -15
- package/dist/components/LinkSelect/LinkSelect.js +0 -88
- package/dist/components/LinkSelect/LinkSelect.js.map +0 -1
- package/dist/components/LinkSelect/index.d.ts +0 -2
- package/dist/components/LinkSelect/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecord/creationErrorContext.d.ts +0 -6
- package/dist/components/RecordEdition/EditRecord/creationErrorContext.js +0 -7
- package/dist/components/RecordEdition/EditRecord/creationErrorContext.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.d.ts +0 -5
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js +0 -28
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.d.ts +0 -121
- package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js +0 -31
- package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useEditRecord.d.ts +0 -5
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useEditRecord.js +0 -39
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useEditRecord.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useUnselectRecord.d.ts +0 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useUnselectRecord.js +0 -23
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useUnselectRecord.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-mass/useUnselectAllRecords.d.ts +0 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-mass/useUnselectAllRecords.js +0 -23
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-mass/useUnselectAllRecords.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useCreateRecord.d.ts +0 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useCreateRecord.js +0 -26
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useCreateRecord.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useRecordSelector.d.ts +0 -12
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useRecordSelector.js +0 -24
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useRecordSelector.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecords.d.ts +0 -19
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecords.js +0 -103
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecords.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecordsInCreation.d.ts +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecordsInCreation.js +0 -104
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecordsInCreation.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecords.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecordsInEdition.js +0 -311
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecordsInEdition.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/LinkActionsButtons.d.ts +0 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/LinkActionsButtons.js +0 -15
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/LinkActionsButtons.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.d.ts +0 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.js +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/ValuesList.d.ts +0 -16
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/ValuesList.js +0 -35
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/ValuesList.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/index.js +0 -6
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/useDisplayTreeNode.js +0 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/useDisplayTreeNode.js.map +0 -1
|
@@ -49,31 +49,33 @@ const _mappingLink = (data, libraryId, availableLangs) => {
|
|
|
49
49
|
return acc;
|
|
50
50
|
}, {})
|
|
51
51
|
: {};
|
|
52
|
-
const records = data.records.list.length &&
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
52
|
+
const records = (data.records.list.length &&
|
|
53
|
+
data.records.list[0].property
|
|
54
|
+
.map((linkValue, index) => {
|
|
55
|
+
if (!linkValue.payload) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
libraryId,
|
|
60
|
+
// same link id can be duplicated, so we add the index to the key
|
|
61
|
+
key: linkValue.payload.whoAmI.id + index, // For <KitTable /> only
|
|
62
|
+
itemId: linkValue.payload.whoAmI.id, // For <KitTable /> only
|
|
63
|
+
canActivate: true,
|
|
64
|
+
canDelete: true,
|
|
65
|
+
active: true,
|
|
66
|
+
whoAmI: {
|
|
67
|
+
label: null,
|
|
68
|
+
subLabel: null,
|
|
69
|
+
color: null,
|
|
70
|
+
preview: null,
|
|
71
|
+
...linkValue.payload.whoAmI
|
|
72
|
+
},
|
|
73
|
+
propertiesById: linkValue.payload.properties.reduce((acc, { attributeId, values }) => ({ ...acc, [attributeId]: values }), {}),
|
|
74
|
+
id_value: linkValue.id_value ?? undefined
|
|
75
|
+
};
|
|
76
|
+
})
|
|
77
|
+
.filter(Boolean)) ||
|
|
78
|
+
[];
|
|
77
79
|
return {
|
|
78
80
|
totalCount: records.length,
|
|
79
81
|
attributes,
|
|
@@ -85,7 +87,7 @@ export const useExplorerData = ({ entrypoint, libraryId, attributeIds, fulltextS
|
|
|
85
87
|
const isLibrary = entrypoint.type === 'library';
|
|
86
88
|
const isLink = entrypoint.type === 'link';
|
|
87
89
|
const { data: attributeData } = useExplorerLinkAttributeQuery({
|
|
88
|
-
skip:
|
|
90
|
+
skip: isLibrary,
|
|
89
91
|
variables: {
|
|
90
92
|
id: entrypoint.linkAttributeId
|
|
91
93
|
}
|
|
@@ -101,6 +103,9 @@ export const useExplorerData = ({ entrypoint, libraryId, attributeIds, fulltextS
|
|
|
101
103
|
attributeIds
|
|
102
104
|
}
|
|
103
105
|
});
|
|
106
|
+
const allowFreeEntry = isLibrary ? entrypoint.allowFreeEntry : undefined;
|
|
107
|
+
const valuesList = !isLibrary || (fulltextSearch && allowFreeEntry) ? undefined : entrypoint.valuesList; // Remove values list for free entry values list on search
|
|
108
|
+
const preparedFilters = prepareFiltersForRequest(filters, filtersOperator, valuesList);
|
|
104
109
|
const { data: libraryData, loading: libraryLoading, refetch: libraryRefetch } = useExplorerLibraryDataQuery({
|
|
105
110
|
fetchPolicy: 'network-only',
|
|
106
111
|
skip: skip || !isLibrary,
|
|
@@ -110,7 +115,7 @@ export const useExplorerData = ({ entrypoint, libraryId, attributeIds, fulltextS
|
|
|
110
115
|
pagination,
|
|
111
116
|
searchQuery: fulltextSearch,
|
|
112
117
|
multipleSort: sorts,
|
|
113
|
-
filters:
|
|
118
|
+
filters: preparedFilters
|
|
114
119
|
}
|
|
115
120
|
});
|
|
116
121
|
const isMultivalue = !!attributeData?.attributes?.list?.[0]?.multiple_values;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExplorerData.js","sourceRoot":"","sources":["../../../../src/components/Explorer/_queries/useExplorerData.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAC,+BAA+B,EAAE,OAAO,EAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"useExplorerData.js","sourceRoot":"","sources":["../../../../src/components/Explorer/_queries/useExplorerData.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAC,+BAA+B,EAAE,OAAO,EAAC,MAAM,WAAW,CAAC;AASnE,OAAO,EAKH,2BAA2B,EAC3B,6BAA6B,EAC7B,wBAAwB,EAC3B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;AAEpE,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAExC,MAAM,eAAe,GAAG,CACpB,IAA8B,EAC9B,SAAiB,EACjB,cAAwB,EACX,EAAE;IACf,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM;QACvC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE;YACrD,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG;gBACxB,GAAG,QAAQ,CAAC,mBAAmB;gBAC/B,KAAK,EAAE,oBAAoB,CAAC,QAAQ,CAAC,mBAAmB,CAAC,KAAK,EAAE,cAAc,CAAC;aAClF,CAAC;YAEF,OAAO,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,CAAC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE5B,MAAM,GAAG,GAAG,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/D,+BAA+B,CAAC,EAAC,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,GAAG,EAAC,EAAE,CAAC,SAAS,CAAC,CAAC;IAEpF,OAAO;QACH,IAAI,EAAE,YAAY;QAClB,YAAY;QACZ,0BAA0B;QAC1B,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,WAAW;QACjD,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,WAAW;KACpD,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Override } from '@leav/utils';
|
|
2
|
-
import { AttributeFormat, AttributePropertiesFragment, AttributeType, PropertyValueFragment, RecordFilterCondition, RecordFilterInput, RecordIdentityFragment, ViewDetailsFilterFragment } from '../../_gqlTypes';
|
|
2
|
+
import { AttributeFormat, AttributePropertiesFragment, AttributeType, LinkAttributeDetailsFragment, PropertyValueFragment, RecordFilterCondition, RecordFilterInput, RecordIdentityFragment, StandardAttributeDetailsFragment, ViewDetailsFilterFragment } from '../../_gqlTypes';
|
|
3
3
|
import { Key, ReactElement } from 'react';
|
|
4
4
|
import { IViewSettingsState } from './manage-view-settings';
|
|
5
5
|
import { ThroughConditionFilter } from '../../types/search';
|
|
@@ -36,7 +36,7 @@ export interface IItemAction {
|
|
|
36
36
|
icon: ReactElement | ((item: IItemData) => ReactElement);
|
|
37
37
|
label: string | ((item: IItemData) => string);
|
|
38
38
|
iconOnly?: boolean;
|
|
39
|
-
isDanger?: boolean;
|
|
39
|
+
isDanger?: boolean | ((item: IItemData) => boolean);
|
|
40
40
|
disabled?: boolean | ((item: IItemData) => boolean);
|
|
41
41
|
}
|
|
42
42
|
export interface IPrimaryAction {
|
|
@@ -52,24 +52,49 @@ export interface IMassActions {
|
|
|
52
52
|
}
|
|
53
53
|
export type FeatureHook<T = {}> = {
|
|
54
54
|
isEnabled: boolean;
|
|
55
|
+
isVisible?: boolean;
|
|
55
56
|
} & T;
|
|
56
|
-
interface IExplorerFilterBaseAttribute {
|
|
57
|
+
export interface IExplorerFilterBaseAttribute {
|
|
57
58
|
type: AttributeType;
|
|
59
|
+
/**
|
|
60
|
+
* Used to display the label of the filter.
|
|
61
|
+
*
|
|
62
|
+
* > Not displayed when filter is hidden
|
|
63
|
+
*/
|
|
58
64
|
label: string;
|
|
65
|
+
/**
|
|
66
|
+
* Used to verify unicity: one filter per attribute
|
|
67
|
+
*/
|
|
68
|
+
id: string;
|
|
69
|
+
format?: AttributeFormat | null | undefined;
|
|
70
|
+
valuesList?: NonNullable<StandardAttributeDetailsFragment['valuesList']> | NonNullable<LinkAttributeDetailsFragment['valuesList']>;
|
|
59
71
|
}
|
|
60
|
-
interface IExplorerFilterStandardAttribute extends IExplorerFilterBaseAttribute {
|
|
72
|
+
export interface IExplorerFilterStandardAttribute extends IExplorerFilterBaseAttribute {
|
|
61
73
|
format: AttributeFormat;
|
|
62
74
|
}
|
|
63
|
-
interface IExplorerFilterLinkAttribute extends IExplorerFilterBaseAttribute {
|
|
75
|
+
export interface IExplorerFilterLinkAttribute extends IExplorerFilterBaseAttribute {
|
|
64
76
|
linkedLibrary?: {
|
|
65
77
|
id: string;
|
|
66
78
|
};
|
|
67
79
|
}
|
|
80
|
+
export interface IExplorerFilterTreeAttribute extends IExplorerFilterBaseAttribute {
|
|
81
|
+
linkedTree?: {
|
|
82
|
+
id: string;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
68
85
|
interface IExplorerBaseFilter {
|
|
69
86
|
id: string;
|
|
87
|
+
attribute: IExplorerFilterBaseAttribute;
|
|
88
|
+
condition: RecordFilterCondition | ThroughConditionFilter | null;
|
|
89
|
+
/**
|
|
90
|
+
* Used to build filter field.
|
|
91
|
+
*
|
|
92
|
+
* - ex: `campaigns_id_pac`
|
|
93
|
+
* - ex with **subField**: `campaigns_id_pac.id`
|
|
94
|
+
*/
|
|
70
95
|
field: string;
|
|
71
96
|
value: string | null;
|
|
72
|
-
hidden?: boolean;
|
|
97
|
+
hidden?: boolean | undefined;
|
|
73
98
|
}
|
|
74
99
|
export interface IExplorerFilterStandard extends IExplorerBaseFilter {
|
|
75
100
|
attribute: IExplorerFilterStandardAttribute;
|
|
@@ -85,10 +110,37 @@ export interface IExplorerFilterThrough extends IExplorerBaseFilter {
|
|
|
85
110
|
subCondition: RecordFilterCondition | null;
|
|
86
111
|
subField: string | null;
|
|
87
112
|
}
|
|
88
|
-
export
|
|
113
|
+
export interface IExplorerFilterTree extends Omit<IExplorerBaseFilter, 'value' | 'field'> {
|
|
114
|
+
attribute: IExplorerFilterTreeAttribute;
|
|
115
|
+
condition: RecordFilterCondition | null;
|
|
116
|
+
value: string[] | null;
|
|
117
|
+
field: string[];
|
|
118
|
+
}
|
|
119
|
+
export interface IExplorerFilterValueList extends Omit<IExplorerBaseFilter, 'value'> {
|
|
120
|
+
attribute: (IExplorerFilterStandardAttribute | IExplorerFilterLinkAttribute) & {
|
|
121
|
+
valuesList: NonNullable<StandardAttributeDetailsFragment['valuesList']> | NonNullable<LinkAttributeDetailsFragment['valuesList']>;
|
|
122
|
+
};
|
|
123
|
+
value: string[] | null;
|
|
124
|
+
condition: RecordFilterCondition | null;
|
|
125
|
+
}
|
|
126
|
+
export interface IExplorerFilterStandardValueList extends Omit<IExplorerFilterStandard, 'attribute' | 'value'>, IExplorerFilterValueList {
|
|
127
|
+
attribute: IExplorerFilterStandardAttribute & {
|
|
128
|
+
valuesList: NonNullable<StandardAttributeDetailsFragment['valuesList']>;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
export interface IExplorerFilterLinkValueList extends Omit<IExplorerFilterLink, 'attribute' | 'value'>, IExplorerFilterValueList {
|
|
132
|
+
attribute: IExplorerFilterLinkAttribute & {
|
|
133
|
+
valuesList: NonNullable<LinkAttributeDetailsFragment['valuesList']>;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
export type ExplorerFilter = IExplorerFilterStandard | IExplorerFilterLink | IExplorerFilterThrough | IExplorerFilterValueList | IExplorerFilterTree;
|
|
89
137
|
export declare const isExplorerFilterStandard: (filter: ExplorerFilter) => filter is IExplorerFilterStandard;
|
|
90
138
|
export declare const isExplorerFilterLink: (filter: ExplorerFilter) => filter is IExplorerFilterLink;
|
|
91
139
|
export declare const isExplorerFilterThrough: (filter: ExplorerFilter) => filter is IExplorerFilterThrough;
|
|
140
|
+
export declare const isExplorerFilterValueList: (filter: ExplorerFilter) => filter is IExplorerFilterValueList;
|
|
141
|
+
export declare const isExplorerFilterStandardWithValueList: (filter: ExplorerFilter) => filter is IExplorerFilterStandardValueList;
|
|
142
|
+
export declare const isExplorerFilterLinkWithValueList: (filter: ExplorerFilter) => filter is IExplorerFilterLinkValueList;
|
|
143
|
+
export declare const isExplorerFilterTree: (filter: ExplorerFilter) => filter is IExplorerFilterTree;
|
|
92
144
|
export interface IFilterDropDownProps {
|
|
93
145
|
filter: ExplorerFilter;
|
|
94
146
|
}
|
|
@@ -104,6 +156,14 @@ export interface IEntrypointTree {
|
|
|
104
156
|
export interface IEntrypointLibrary {
|
|
105
157
|
type: 'library';
|
|
106
158
|
libraryId: string;
|
|
159
|
+
/**
|
|
160
|
+
* Used to display a list of values instead of all library records when adding a link
|
|
161
|
+
*/
|
|
162
|
+
valuesList?: string[];
|
|
163
|
+
/**
|
|
164
|
+
* Used to allow free entry when adding a link with values list
|
|
165
|
+
*/
|
|
166
|
+
allowFreeEntry?: boolean;
|
|
107
167
|
}
|
|
108
168
|
export interface IEntrypointLink {
|
|
109
169
|
type: 'link';
|
|
@@ -116,6 +176,12 @@ export type ValidFieldFilter = Override<ViewDetailsFilterFragment, {
|
|
|
116
176
|
condition: NonNullable<ViewDetailsFilterFragment['condition']>;
|
|
117
177
|
hidden: boolean;
|
|
118
178
|
}>;
|
|
179
|
+
export type ValidFieldFilterStandardValuesList = Override<ValidFieldFilter, {
|
|
180
|
+
valuesList: StandardAttributeDetailsFragment['valuesList'];
|
|
181
|
+
}>;
|
|
182
|
+
export type ValidFieldFilterLinkValuesList = Override<ValidFieldFilter, {
|
|
183
|
+
valuesList: LinkAttributeDetailsFragment['valuesList'];
|
|
184
|
+
}>;
|
|
119
185
|
export type ValidFieldFilterThrough = Override<ValidFieldFilter, {
|
|
120
186
|
condition: ThroughConditionFilter.THROUGH;
|
|
121
187
|
hidden: boolean;
|
|
@@ -123,7 +189,7 @@ export type ValidFieldFilterThrough = Override<ValidFieldFilter, {
|
|
|
123
189
|
subField: NonNullable<ViewDetailsFilterFragment['field']>;
|
|
124
190
|
subCondition?: ViewDetailsFilterFragment['condition'];
|
|
125
191
|
};
|
|
126
|
-
export type validFilter = ValidFieldFilter | ValidFieldFilterThrough;
|
|
192
|
+
export type validFilter = ValidFieldFilter | ValidFieldFilterThrough | ValidFieldFilterStandardValuesList | ValidFieldFilterLinkValuesList;
|
|
127
193
|
export type Entrypoint = IEntrypointTree | IEntrypointLibrary | IEntrypointLink;
|
|
128
194
|
export interface IUserView extends Pick<IView, 'shared' | 'display' | 'sort' | 'attributes'> {
|
|
129
195
|
label: Record<string, string>;
|
|
@@ -5,4 +5,9 @@ export const isExplorerFilterLink = (filter) => [AttributeType.simple_link, Attr
|
|
|
5
5
|
filter.condition !== ThroughConditionFilter.THROUGH;
|
|
6
6
|
export const isExplorerFilterThrough = (filter) => [AttributeType.simple_link, AttributeType.advanced_link].includes(filter.attribute.type) &&
|
|
7
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;
|
|
8
13
|
//# sourceMappingURL=_types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../src/components/Explorer/_types.ts"],"names":[],"mappings":"AAIA,OAAO,EAGH,aAAa,
|
|
1
|
+
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../src/components/Explorer/_types.ts"],"names":[],"mappings":"AAIA,OAAO,EAGH,aAAa,EAQhB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAC,sBAAsB,EAAC,MAAM,kBAAkB,CAAC;AAiKxD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,MAAsB,EAAqC,EAAE,CAClG,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAEnF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAsB,EAAiC,EAAE,CAC1F,CAAC,aAAa,CAAC,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;IACxF,MAAM,CAAC,SAAS,KAAK,sBAAsB,CAAC,OAAO,CAAC;AAExD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,MAAsB,EAAoC,EAAE,CAChG,CAAC,aAAa,CAAC,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;IACxF,MAAM,CAAC,SAAS,KAAK,sBAAsB,CAAC,OAAO,CAAC;AAExD,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,MAAsB,EAAsC,EAAE,CACpG,CAAC,wBAAwB,CAAC,MAAM,CAAC,IAAI,oBAAoB,CAAC,MAAM,CAAC,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;AAE9F,MAAM,CAAC,MAAM,qCAAqC,GAAG,CACjD,MAAsB,EACoB,EAAE,CAC5C,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;AAE1G,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,MAAsB,EAA0C,EAAE,CAChH,CAAC,aAAa,CAAC,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;AAEpH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAsB,EAAiC,EAAE,CAC1F,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,aAAa,CAAC,IAAI,CAAC;AAEjD,MAAM,WAAW,GAAG,CAAC,MAAsB,EAAyE,EAAE,CAClH,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,UAAU,IAAI,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC"}
|
|
@@ -12,7 +12,8 @@ import { ISubmitMultipleResult } from '../../../components/RecordEdition/EditRec
|
|
|
12
12
|
* @param onReplace - callback to let outside world know about replacing feedback
|
|
13
13
|
* @param canReplaceLinkValues - check permission to delete link values
|
|
14
14
|
*/
|
|
15
|
-
export declare const useReplaceItemAction: ({ isEnabled, onReplace, canReplaceLinkValues }: FeatureHook<{
|
|
15
|
+
export declare const useReplaceItemAction: ({ isEnabled, onReplace, isMultivalue, canReplaceLinkValues }: FeatureHook<{
|
|
16
|
+
isMultivalue: boolean;
|
|
16
17
|
onReplace?: (replaceValuesResult: ISubmitMultipleResult) => void;
|
|
17
18
|
canReplaceLinkValues: boolean;
|
|
18
19
|
}>) => {
|
|
@@ -18,7 +18,7 @@ import { LinkModal } from '../link-item/LinkModal';
|
|
|
18
18
|
* @param onReplace - callback to let outside world know about replacing feedback
|
|
19
19
|
* @param canReplaceLinkValues - check permission to delete link values
|
|
20
20
|
*/
|
|
21
|
-
export const useReplaceItemAction = ({ isEnabled, onReplace, canReplaceLinkValues }) => {
|
|
21
|
+
export const useReplaceItemAction = ({ isEnabled, onReplace, isMultivalue, canReplaceLinkValues }) => {
|
|
22
22
|
const { t } = useSharedTranslation();
|
|
23
23
|
const [isReplaceModalOpen, setIsReplaceModalOpen] = useState(false);
|
|
24
24
|
const [linkIdSelected, setLinkIdSelected] = useState();
|
|
@@ -33,7 +33,7 @@ export const useReplaceItemAction = ({ isEnabled, onReplace, canReplaceLinkValue
|
|
|
33
33
|
}), [canReplaceLinkValues]);
|
|
34
34
|
const replaceAction = useMemo(() => ({
|
|
35
35
|
replaceItemAction: isEnabled ? _replaceItemAction : null,
|
|
36
|
-
replaceItemModal: isEnabled && isReplaceModalOpen ? (_jsx(LinkModal, { open: true, linkId: linkIdSelected, onReplace: onReplace, onClose: () => {
|
|
36
|
+
replaceItemModal: isEnabled && isReplaceModalOpen ? (_jsx(LinkModal, { open: true, linkId: linkIdSelected, isMultivalue: isMultivalue, onReplace: onReplace, onClose: () => {
|
|
37
37
|
setIsReplaceModalOpen(false);
|
|
38
38
|
} })) : null
|
|
39
39
|
}), [isEnabled, isReplaceModalOpen, _replaceItemAction]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReplaceItemAction.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-item/useReplaceItemAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACxC,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAGjD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACjC,SAAS,EACT,SAAS,EACT,oBAAoB,
|
|
1
|
+
{"version":3,"file":"useReplaceItemAction.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-item/useReplaceItemAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACxC,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAGjD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACjC,SAAS,EACT,SAAS,EACT,YAAY,EACZ,oBAAoB,EAKtB,EAAE,EAAE;IACF,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,EAAsB,CAAC;IAE3E,MAAM,kBAAkB,GAAgB,OAAO,CAC3C,GAAG,EAAE,CAAC,CAAC;QACH,KAAK,EAAE,CAAC,CAAC,uBAAuB,CAAE;QAClC,IAAI,EAAE,KAAC,aAAa,KAAG;QACvB,QAAQ,EAAE,CAAC,oBAAoB;QAC/B,QAAQ,EAAE,IAAI,CAAC,EAAE;YACb,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACjC,qBAAqB,CAAC,CAAC,kBAAkB,CAAC,CAAC;QAC/C,CAAC;KACJ,CAAC,EACF,CAAC,oBAAoB,CAAC,CACzB,CAAC;IAEF,MAAM,aAAa,GAAG,OAAO,CACzB,GAAG,EAAE,CAAC,CAAC;QACH,iBAAiB,EAAE,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI;QACxD,gBAAgB,EACZ,SAAS,IAAI,kBAAkB,CAAC,CAAC,CAAC,CAC9B,KAAC,SAAS,IACN,IAAI,QACJ,MAAM,EAAE,cAAc,EACtB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,GAAG,EAAE;gBACV,qBAAqB,CAAC,KAAK,CAAC,CAAC;YACjC,CAAC,GACH,CACL,CAAC,CAAC,CAAC,IAAI;KACf,CAAC,EACF,CAAC,SAAS,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CACtD,CAAC;IAEF,OAAO,aAAa,CAAC;AACzB,CAAC,CAAC"}
|
|
@@ -10,17 +10,19 @@ import { FeatureHook, Entrypoint, IPrimaryAction } from '../_types';
|
|
|
10
10
|
* It returns also two parts : one for the call action button - one for displayed the modal required by the action.
|
|
11
11
|
*
|
|
12
12
|
* @param isEnabled - whether the action is present
|
|
13
|
+
* @param isVisible - wether the button should be visible or not
|
|
13
14
|
* @param libraryId - the library's id to add new item
|
|
14
15
|
* @param entrypoint - represent the current entrypoint
|
|
15
16
|
* @param totalCount - used for display purpose only
|
|
16
17
|
* @param onCreate - callback to let outside world known about creating item (and linking)
|
|
17
18
|
* @param refetch - method to call to refresh the list. New item will be visible if it matches filters and sorts
|
|
18
19
|
*/
|
|
19
|
-
export declare const useCreatePrimaryAction: ({ isEnabled, libraryId, entrypoint, totalCount, canCreateAndLinkValue, onCreate, formId, joinLibraryContext, refetch }: FeatureHook<{
|
|
20
|
+
export declare const useCreatePrimaryAction: ({ isEnabled, isVisible, libraryId, entrypoint, totalCount, canCreateAndLinkValue, isMultivalue, onCreate, formId, joinLibraryContext, refetch }: FeatureHook<{
|
|
20
21
|
libraryId: string;
|
|
21
22
|
entrypoint: Entrypoint;
|
|
22
23
|
totalCount: number;
|
|
23
24
|
canCreateAndLinkValue: boolean;
|
|
25
|
+
isMultivalue: boolean;
|
|
24
26
|
onCreate?: ({ recordIdCreated, saveValuesResultOnLink }: {
|
|
25
27
|
recordIdCreated: string;
|
|
26
28
|
saveValuesResultOnLink?: ISubmitMultipleResult;
|
|
@@ -8,7 +8,7 @@ import { useKitNotification } from 'aristid-ds';
|
|
|
8
8
|
import { CreateDirectory, EditRecordModal, UploadFiles } from '../../../components';
|
|
9
9
|
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
10
10
|
import useSaveValueBatchMutation from '../../../components/RecordEdition/EditRecordContent/hooks/useExecuteSaveValueBatchMutation';
|
|
11
|
-
import { LibraryBehavior, useExplorerLibraryDetailsQuery
|
|
11
|
+
import { AttributeType, LibraryBehavior, useExplorerLibraryDetailsQuery } from '../../../_gqlTypes';
|
|
12
12
|
import { CREATE_RECORD_MODAL_CLASSNAME } from '../_constants';
|
|
13
13
|
/**
|
|
14
14
|
* Hook used to get the action for `<DataView />` component.
|
|
@@ -18,31 +18,18 @@ import { CREATE_RECORD_MODAL_CLASSNAME } from '../_constants';
|
|
|
18
18
|
* It returns also two parts : one for the call action button - one for displayed the modal required by the action.
|
|
19
19
|
*
|
|
20
20
|
* @param isEnabled - whether the action is present
|
|
21
|
+
* @param isVisible - wether the button should be visible or not
|
|
21
22
|
* @param libraryId - the library's id to add new item
|
|
22
23
|
* @param entrypoint - represent the current entrypoint
|
|
23
24
|
* @param totalCount - used for display purpose only
|
|
24
25
|
* @param onCreate - callback to let outside world known about creating item (and linking)
|
|
25
26
|
* @param refetch - method to call to refresh the list. New item will be visible if it matches filters and sorts
|
|
26
27
|
*/
|
|
27
|
-
export const useCreatePrimaryAction = ({ isEnabled, libraryId, entrypoint, totalCount, canCreateAndLinkValue, onCreate, formId, joinLibraryContext, refetch }) => {
|
|
28
|
+
export const useCreatePrimaryAction = ({ isEnabled, isVisible, libraryId, entrypoint, totalCount, canCreateAndLinkValue, isMultivalue, onCreate, formId, joinLibraryContext, refetch }) => {
|
|
28
29
|
const { t } = useSharedTranslation();
|
|
29
30
|
const [isModalCreationVisible, setIsModalCreationVisible] = useState(false);
|
|
30
|
-
const [multipleValues, setIsMultivalues] = useState(false);
|
|
31
31
|
const { saveValues } = useSaveValueBatchMutation();
|
|
32
32
|
const { kitNotification } = useKitNotification();
|
|
33
|
-
useExplorerLinkAttributeQuery({
|
|
34
|
-
skip: entrypoint.type !== 'link',
|
|
35
|
-
variables: {
|
|
36
|
-
id: joinLibraryContext?.mandatoryAttribute.id || entrypoint.linkAttributeId
|
|
37
|
-
},
|
|
38
|
-
onCompleted: data => {
|
|
39
|
-
const attributeData = data?.attributes?.list?.[0];
|
|
40
|
-
if (!attributeData) {
|
|
41
|
-
throw new Error('Unknown link attribute');
|
|
42
|
-
}
|
|
43
|
-
setIsMultivalues(attributeData.multiple_values);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
33
|
const _getLibraryId = () => (joinLibraryContext?.mandatoryAttribute &&
|
|
47
34
|
'linked_library' in joinLibraryContext.mandatoryAttribute &&
|
|
48
35
|
joinLibraryContext.mandatoryAttribute.linked_library?.id) ||
|
|
@@ -51,15 +38,18 @@ export const useCreatePrimaryAction = ({ isEnabled, libraryId, entrypoint, total
|
|
|
51
38
|
variables: { libraryId: _getLibraryId() },
|
|
52
39
|
skip: !isEnabled
|
|
53
40
|
});
|
|
54
|
-
if (error || loading) {
|
|
41
|
+
if (error || loading || !isVisible) {
|
|
55
42
|
return { createPrimaryAction: null, createModal: null };
|
|
56
43
|
}
|
|
57
44
|
let canCreateRecord;
|
|
58
|
-
if (
|
|
45
|
+
if (joinLibraryContext?.mandatoryAttribute?.type === AttributeType.tree) {
|
|
46
|
+
canCreateRecord = false;
|
|
47
|
+
}
|
|
48
|
+
else if (entrypoint.type === 'library') {
|
|
59
49
|
canCreateRecord = true;
|
|
60
50
|
}
|
|
61
51
|
else {
|
|
62
|
-
canCreateRecord = canCreateAndLinkValue && (
|
|
52
|
+
canCreateRecord = canCreateAndLinkValue && (isMultivalue || totalCount === 0);
|
|
63
53
|
}
|
|
64
54
|
const _createPrimaryAction = {
|
|
65
55
|
callback: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreatePrimaryAction.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-primary/useCreatePrimaryAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAe,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,kBAAkB,EAAC,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAC,eAAe,EAAE,eAAe,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,yBAAyB,MAAM,uFAAuF,CAAC;AAE9H,OAAO,
|
|
1
|
+
{"version":3,"file":"useCreatePrimaryAction.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-primary/useCreatePrimaryAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAe,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,kBAAkB,EAAC,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAC,eAAe,EAAE,eAAe,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC7E,O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E,CAAC,EAAC,eAAe,EAAE,SAAS,CAAC,EAAE,EAAC,CAAC,CAAC;oBAChD,CAAC;gBACL,CAAC,EACD,aAAa,EAAE,CAAC,QAAQ,CAAC,GAC3B,CACL,CAAC;YACF,MAAM;IACd,CAAC;IAED,OAAO;QACH,mBAAmB,EAAE,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI;QAC5D,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI;KAC5D,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ISubmitMultipleResult } from '../../../components/RecordEdition/EditRecordContent/_types';
|
|
2
|
-
import {
|
|
2
|
+
import { FeatureHook, IPrimaryAction } from '../_types';
|
|
3
|
+
import { JoinLibraryContextFragment } from '../../../_gqlTypes';
|
|
3
4
|
/**
|
|
4
5
|
* Hook used to get the action for `<DataView />` component.
|
|
5
6
|
*
|
|
@@ -8,14 +9,16 @@ import { Entrypoint, FeatureHook, IPrimaryAction } from '../_types';
|
|
|
8
9
|
* It returns also two parts : one for the call action button - one for displaying the modal required by the action.
|
|
9
10
|
*
|
|
10
11
|
* @param isEnabled - whether the action is present
|
|
12
|
+
* @param isVisible - wether the button should be visible or not
|
|
11
13
|
* @param maxItemsLeft - the number of items that can be added
|
|
12
14
|
* @param onLink - callback to let outside world know about linking feedback
|
|
13
15
|
*/
|
|
14
|
-
export declare const useLinkPrimaryAction: ({ isEnabled,
|
|
15
|
-
entrypoint: Entrypoint;
|
|
16
|
+
export declare const useLinkPrimaryAction: ({ isEnabled, isVisible, maxItemsLeft, linkId, canAddLinkValue, joinLibraryContext, isMultivalue, onLink }: FeatureHook<{
|
|
16
17
|
linkId?: string;
|
|
17
18
|
maxItemsLeft: number | null;
|
|
18
19
|
canAddLinkValue: boolean;
|
|
20
|
+
joinLibraryContext?: JoinLibraryContextFragment;
|
|
21
|
+
isMultivalue: boolean;
|
|
19
22
|
onLink?: (saveValuesResult: ISubmitMultipleResult) => void;
|
|
20
23
|
}>) => {
|
|
21
24
|
linkPrimaryAction: IPrimaryAction;
|
|
@@ -6,7 +6,6 @@ import { useState } from 'react';
|
|
|
6
6
|
import { FaPlus } from 'react-icons/fa';
|
|
7
7
|
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
8
8
|
import { LinkModal } from '../link-item/LinkModal';
|
|
9
|
-
import { useExplorerLinkAttributeQuery } from '../../../_gqlTypes';
|
|
10
9
|
/**
|
|
11
10
|
* Hook used to get the action for `<DataView />` component.
|
|
12
11
|
*
|
|
@@ -15,28 +14,15 @@ import { useExplorerLinkAttributeQuery } from '../../../_gqlTypes';
|
|
|
15
14
|
* It returns also two parts : one for the call action button - one for displaying the modal required by the action.
|
|
16
15
|
*
|
|
17
16
|
* @param isEnabled - whether the action is present
|
|
17
|
+
* @param isVisible - wether the button should be visible or not
|
|
18
18
|
* @param maxItemsLeft - the number of items that can be added
|
|
19
19
|
* @param onLink - callback to let outside world know about linking feedback
|
|
20
20
|
*/
|
|
21
|
-
export const useLinkPrimaryAction = ({ isEnabled,
|
|
21
|
+
export const useLinkPrimaryAction = ({ isEnabled, isVisible, maxItemsLeft, linkId, canAddLinkValue, joinLibraryContext, isMultivalue, onLink }) => {
|
|
22
22
|
const { t } = useSharedTranslation();
|
|
23
23
|
const [isLinkModalVisible, setIsLinkModalVisible] = useState(false);
|
|
24
|
-
const [multipleValues, setIsMultivalues] = useState(false);
|
|
25
24
|
const disableAddItemAction = maxItemsLeft === 0 || !canAddLinkValue;
|
|
26
|
-
|
|
27
|
-
skip: entrypoint.type !== 'link',
|
|
28
|
-
variables: {
|
|
29
|
-
id: entrypoint.linkAttributeId
|
|
30
|
-
},
|
|
31
|
-
onCompleted: data => {
|
|
32
|
-
const attributeData = data?.attributes?.list?.[0];
|
|
33
|
-
if (!attributeData) {
|
|
34
|
-
throw new Error('Unknown link attribute');
|
|
35
|
-
}
|
|
36
|
-
setIsMultivalues(attributeData.multiple_values);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
const replacementMode = linkId && !multipleValues;
|
|
25
|
+
const replacementMode = linkId && !isMultivalue;
|
|
40
26
|
const _linkPrimaryAction = {
|
|
41
27
|
callback: () => {
|
|
42
28
|
setIsLinkModalVisible(true);
|
|
@@ -46,8 +32,8 @@ export const useLinkPrimaryAction = ({ isEnabled, maxItemsLeft, entrypoint, link
|
|
|
46
32
|
label: replacementMode ? t('record_edition.replace-by-existing-item') : t('explorer.add-existing-item')
|
|
47
33
|
};
|
|
48
34
|
return {
|
|
49
|
-
linkPrimaryAction: isEnabled ? _linkPrimaryAction : null,
|
|
50
|
-
linkModal: isLinkModalVisible ? (_jsx(LinkModal, { open: true, onLink: onLink, linkId: replacementMode ? linkId : undefined, onClose: () => {
|
|
35
|
+
linkPrimaryAction: isEnabled && isVisible ? _linkPrimaryAction : null,
|
|
36
|
+
linkModal: isLinkModalVisible ? (_jsx(LinkModal, { open: true, onLink: onLink, joinLibraryContext: joinLibraryContext, isMultivalue: isMultivalue, linkId: replacementMode ? linkId : undefined, onClose: () => {
|
|
51
37
|
setIsLinkModalVisible(false);
|
|
52
38
|
} })) : null
|
|
53
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLinkPrimaryAction.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-primary/useLinkPrimaryAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAGpE,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"useLinkPrimaryAction.js","sourceRoot":"","sources":["../../../../src/components/Explorer/actions-primary/use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BAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC5C,OAAO,EAAE,GAAG,EAAE;gBACV,qBAAqB,CAAC,KAAK,CAAC,CAAC;YACjC,CAAC,GACH,CACL,CAAC,CAAC,CAAC,IAAI;KACX,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
+
import { JoinLibraryContextFragment } from '../../../_gqlTypes';
|
|
2
3
|
import { ISubmitMultipleResult } from '../../../components/RecordEdition/EditRecordContent/_types';
|
|
3
4
|
interface ILinkModalProps {
|
|
4
5
|
open: boolean;
|
|
5
6
|
linkId?: string;
|
|
7
|
+
joinLibraryContext?: JoinLibraryContextFragment;
|
|
8
|
+
isMultivalue: boolean;
|
|
6
9
|
onClose: () => void;
|
|
7
10
|
onLink?: (saveValuesResult: ISubmitMultipleResult) => void;
|
|
8
11
|
onReplace?: (replaceValuesResult: ISubmitMultipleResult) => void;
|
|
@@ -1,20 +1,32 @@
|
|
|
1
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';
|
|
2
6
|
import { useExplorerLinkAttributeQuery } from '../../../_gqlTypes';
|
|
3
7
|
import { SelectRecordForLinkModal } from '../../../components/SelectRecordForLinkModal';
|
|
4
8
|
import { useAddLinkMassAction } from './useAddLinkMassAction';
|
|
5
9
|
import { useViewSettingsContext } from '../manage-view-settings/store-view-settings/useViewSettingsContext';
|
|
6
10
|
import { useReplaceLinkMassAction } from './useReplaceLinkMassAction';
|
|
7
11
|
import { LINK_RECORDS_MODAL_CLASSNAME } from '../_constants';
|
|
8
|
-
|
|
12
|
+
import { SelectTreeNodeModal } from '../../../components';
|
|
13
|
+
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
14
|
+
export const LinkModal = ({ open, linkId, joinLibraryContext, isMultivalue, onLink, onReplace, onClose }) => {
|
|
15
|
+
const { t } = useSharedTranslation();
|
|
9
16
|
const { view } = useViewSettingsContext();
|
|
17
|
+
const linkedLibraryId = joinLibraryContext &&
|
|
18
|
+
'linked_library' in joinLibraryContext.mandatoryAttribute &&
|
|
19
|
+
joinLibraryContext.mandatoryAttribute.linked_library?.id;
|
|
20
|
+
const linkedTreeId = joinLibraryContext &&
|
|
21
|
+
'linked_tree' in joinLibraryContext.mandatoryAttribute &&
|
|
22
|
+
joinLibraryContext.mandatoryAttribute.linked_tree?.id;
|
|
23
|
+
const isReplacement = !!linkId;
|
|
10
24
|
const { data: attributeData } = useExplorerLinkAttributeQuery({
|
|
11
25
|
skip: view.entrypoint.type !== 'link',
|
|
12
26
|
variables: {
|
|
13
27
|
id: view.entrypoint.linkAttributeId
|
|
14
28
|
}
|
|
15
29
|
});
|
|
16
|
-
const isMultiple = attributeData?.attributes?.list?.[0]?.multiple_values;
|
|
17
|
-
const isReplacement = !!linkId;
|
|
18
30
|
const { createLinks } = useAddLinkMassAction({
|
|
19
31
|
store: { view },
|
|
20
32
|
linkAttributeId: view.entrypoint.linkAttributeId,
|
|
@@ -28,6 +40,34 @@ export const LinkModal = ({ open, linkId, onLink, onReplace, onClose }) => {
|
|
|
28
40
|
onReplace,
|
|
29
41
|
closeModal: onClose
|
|
30
42
|
});
|
|
31
|
-
|
|
43
|
+
const linkAttributeData = attributeData?.attributes?.list[0];
|
|
44
|
+
const isValuesListEnabled = linkAttributeData && 'valuesList' in linkAttributeData && linkAttributeData.valuesList?.enable;
|
|
45
|
+
const valuesList = useMemo(() => (isValuesListEnabled ? linkAttributeData.valuesList?.linkedValues?.map(value => value.id) : undefined), [isValuesListEnabled, linkAttributeData]);
|
|
46
|
+
const allowFreeEntry = useMemo(() => (isValuesListEnabled ? Boolean(linkAttributeData.valuesList?.allowFreeEntry) : false), [isValuesListEnabled, linkAttributeData]);
|
|
47
|
+
return linkedTreeId ? (_jsx(SelectTreeNodeModal, { open: true, attribute: {
|
|
48
|
+
multiple_values: isMultivalue,
|
|
49
|
+
linked_tree: {
|
|
50
|
+
id: linkedTreeId
|
|
51
|
+
}
|
|
52
|
+
}, title: t(isMultivalue ? 'tree-node-selection.title_many' : 'tree-node-selection.title'),
|
|
53
|
+
// We can select new node(s), ignoring current value(s).
|
|
54
|
+
// Selected element might be duplicated in link attribute in backend for now.
|
|
55
|
+
backendValues: [], onClose: onClose, onConfirm: selectedNodes => {
|
|
56
|
+
const nodeIds = selectedNodes.map(node => node.id);
|
|
57
|
+
if (isReplacement) {
|
|
58
|
+
replaceLink({
|
|
59
|
+
records: {
|
|
60
|
+
list: nodeIds.map(id => ({ id }))
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
createLinks({
|
|
66
|
+
records: {
|
|
67
|
+
list: nodeIds.map(id => ({ id }))
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
} })) : (_jsx(SelectRecordForLinkModal, { className: LINK_RECORDS_MODAL_CLASSNAME, open: open, childLibraryId: linkedLibraryId || view.libraryId, onSelectionCompleted: isReplacement ? replaceLink : createLinks, replacementMode: isReplacement, selectionMode: isReplacement || !isMultivalue ? 'simple' : 'multiple', hideSelectAllAction: (isReplacement || !isMultivalue) && view.entrypoint.type === 'link', valuesList: valuesList, allowFreeEntry: allowFreeEntry, onClose: onClose }));
|
|
32
72
|
};
|
|
33
73
|
//# sourceMappingURL=LinkModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkModal.js","sourceRoot":"","sources":["../../../../src/components/Explorer/link-item/LinkModal.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"LinkModal.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