@leav/ui 0.4.0-8ea6b77 → 0.4.0-8eb44cb
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/form.js +5 -1
- package/dist/__mocks__/common/form.js.map +1 -1
- package/dist/__mocks__/common/value.d.ts +1 -2
- package/dist/__mocks__/common/value.js +0 -11
- package/dist/__mocks__/common/value.js.map +1 -1
- package/dist/_gqlTypes/index.d.ts +283 -0
- package/dist/_gqlTypes/index.js +151 -0
- 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/_queries/records/activateRecordsMutation.d.ts +1 -0
- package/dist/_queries/records/activateRecordsMutation.js +15 -0
- package/dist/_queries/records/activateRecordsMutation.js.map +1 -0
- package/dist/_queries/records/getRecordFormQuery.js +4 -0
- package/dist/_queries/records/getRecordFormQuery.js.map +1 -1
- package/dist/components/CreateDirectory/CreateDirectory.js +4 -4
- package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/DeleteButton/DeleteButton.js +3 -2
- package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/DeleteButton/DeleteButton.js.map +1 -1
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/TreeLibrariesForm/TreeLibrariesForm.js +8 -1
- package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/TreeLibrariesForm/TreeLibrariesForm.js.map +1 -1
- package/dist/components/ErrorBoundary/ErrorBoundaryContent/ErrorBoundaryContent.d.ts +2 -2
- package/dist/components/ErrorBoundary/ErrorBoundaryContent/ErrorBoundaryContent.js +4 -3
- package/dist/components/ErrorBoundary/ErrorBoundaryContent/ErrorBoundaryContent.js.map +1 -1
- package/dist/components/Explorer/DataView.d.ts +2 -1
- package/dist/components/Explorer/DataView.js +31 -11
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +5 -4
- package/dist/components/Explorer/Explorer.js +24 -11
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/IdCard.js +1 -1
- package/dist/components/Explorer/IdCard.js.map +1 -1
- package/dist/components/Explorer/TableCell.js +22 -11
- package/dist/components/Explorer/TableCell.js.map +1 -1
- package/dist/components/Explorer/TableTagGroup.d.ts +0 -1
- package/dist/components/Explorer/TableTagGroup.js +3 -16
- package/dist/components/Explorer/TableTagGroup.js.map +1 -1
- package/dist/components/Explorer/_constants.d.ts +3 -0
- package/dist/components/Explorer/_constants.js +3 -0
- package/dist/components/Explorer/_constants.js.map +1 -1
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +1 -0
- package/dist/components/Explorer/_queries/useExplorerData.js +20 -10
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +7 -3
- package/dist/components/Explorer/_types.js.map +1 -1
- package/dist/components/Explorer/actions-item/useEditItemAction.d.ts +2 -1
- package/dist/components/Explorer/actions-item/useEditItemAction.js +4 -2
- package/dist/components/Explorer/actions-item/useEditItemAction.js.map +1 -1
- package/dist/components/Explorer/actions-item/{useRemoveItemAction.d.ts → useEditStatusItemAction.d.ts} +4 -2
- package/dist/components/Explorer/actions-item/{useRemoveItemAction.js → useEditStatusItemAction.js} +81 -24
- package/dist/components/Explorer/actions-item/useEditStatusItemAction.js.map +1 -0
- package/dist/components/Explorer/actions-item/useReplaceItemAction.d.ts +21 -0
- package/dist/components/Explorer/actions-item/useReplaceItemAction.js +42 -0
- package/dist/components/Explorer/actions-item/useReplaceItemAction.js.map +1 -0
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js +5 -5
- package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js.map +1 -1
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.d.ts +2 -1
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +10 -3
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -1
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.d.ts +5 -2
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +20 -4
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js.map +1 -1
- package/dist/components/Explorer/link-item/LinkModal.d.ts +2 -0
- package/dist/components/Explorer/link-item/LinkModal.js +14 -4
- package/dist/components/Explorer/link-item/LinkModal.js.map +1 -1
- package/dist/components/Explorer/link-item/{useLinkMassAction.d.ts → useAddLinkMassAction.d.ts} +1 -1
- package/dist/components/Explorer/link-item/{useLinkMassAction.js → useAddLinkMassAction.js} +2 -2
- package/dist/components/Explorer/link-item/useAddLinkMassAction.js.map +1 -0
- package/dist/components/Explorer/link-item/useReplaceLinkMassAction.d.ts +23 -0
- package/dist/components/Explorer/link-item/useReplaceLinkMassAction.js +35 -0
- package/dist/components/Explorer/link-item/useReplaceLinkMassAction.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +11 -9
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -1
- package/dist/components/Explorer/useColumnWidth.js +2 -1
- package/dist/components/Explorer/useColumnWidth.js.map +1 -1
- package/dist/components/Explorer/useLoadView.js +4 -2
- package/dist/components/Explorer/useLoadView.js.map +1 -1
- package/dist/components/Explorer/usePagination.d.ts +2 -1
- package/dist/components/Explorer/usePagination.js.map +1 -1
- package/dist/components/Explorer/useSearchInput.d.ts +3 -1
- package/dist/components/Explorer/useSearchInput.js +2 -1
- package/dist/components/Explorer/useSearchInput.js.map +1 -1
- package/dist/components/Explorer/useViewSettingsReducer.d.ts +1 -1
- package/dist/components/Explorer/useViewSettingsReducer.js +43 -19
- package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
- package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.js +1 -0
- package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +2 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.utils.js +2 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.utils.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.d.ts +4 -0
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.js +4 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.js.map +1 -1
- package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.js +3 -3
- package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.js.map +1 -1
- package/dist/components/LinkSelect/LinkSelect.d.ts +12 -0
- package/dist/components/LinkSelect/LinkSelect.js +44 -0
- package/dist/components/LinkSelect/LinkSelect.js.map +1 -0
- package/dist/components/LinkSelect/index.d.ts +2 -0
- package/dist/components/{RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd → LinkSelect}/index.js +2 -2
- package/dist/components/LinkSelect/index.js.map +1 -0
- package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +2 -4
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +37 -39
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordButtons/EditRecordButtons.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordButtons/EditRecordButtons.js +43 -0
- package/dist/components/RecordEdition/EditRecordButtons/EditRecordButtons.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordButtons/SidebarButton.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordButtons/SidebarButton.js +25 -0
- package/dist/components/RecordEdition/EditRecordButtons/SidebarButton.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordButtons/index.d.ts +2 -0
- package/dist/components/RecordEdition/{EditRecordContent/uiElements/TreeField/TreeFieldValue → EditRecordButtons}/index.js +2 -2
- package/dist/components/RecordEdition/EditRecordButtons/index.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.d.ts +3 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +12 -3
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +5 -0
- package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/formConstants.d.ts +1 -0
- package/dist/components/RecordEdition/EditRecordContent/formConstants.js +1 -0
- package/dist/components/RecordEdition/EditRecordContent/formConstants.js.map +1 -1
- 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/LinkField/LinkField.d.ts +8 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +101 -92
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useEditRecord.d.ts +5 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useEditRecord.js +39 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useEditRecord.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useUnselectRecord.d.ts +8 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useUnselectRecord.js +23 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useUnselectRecord.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-mass/useUnselectAllRecords.d.ts +9 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-mass/useUnselectAllRecords.js +23 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-mass/useUnselectAllRecords.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useCreateRecord.d.ts +8 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useCreateRecord.js +26 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useCreateRecord.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useRecordSelector.d.ts +12 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useRecordSelector.js +24 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useRecordSelector.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecords.d.ts +19 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecords.js +103 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecords.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecordsInCreation.d.ts +22 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecordsInCreation.js +104 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecordsInCreation.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecords.d.ts +22 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecords.js +85 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecords.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecordsInEdition.d.ts +27 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecordsInEdition.js +124 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecordsInEdition.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/ExplorerWrapper.d.ts +265 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/ExplorerWrapper.js +13 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/ExplorerWrapper.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/LinkActionsButtons.d.ts +9 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/LinkActionsButtons.js +15 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/LinkActionsButtons.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.d.ts +4 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.js +22 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +34 -47
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +1 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +1 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +1 -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 -5
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +1 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +1 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +1 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +1 -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 +2 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +2 -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 +5 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +1 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.d.ts +4 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +67 -215
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeFieldWrapper.d.ts +265 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeFieldWrapper.js +13 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeFieldWrapper.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeItem.d.ts +10 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeItem.js +51 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeItem.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/useDisplayTreeNode.d.ts +11 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/useDisplayTreeNode.js +8 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/useDisplayTreeNode.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.d.ts +15 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js +44 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.d.ts +23 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js +145 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/{StandardField → shared}/ComputeIndicator.d.ts +4 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/ComputeIndicator.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/DeleteAllValuesButton.d.ts +8 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/{StandardField → shared}/DeleteAllValuesButton.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/DeleteAllValuesButton.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/calculatedInheritedFlags.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.d.ts +17 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.js +76 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.d.ts +4 -0
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +51 -51
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +3 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +9 -7
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js +2 -2
- package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +18 -12
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +3 -0
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.js +2 -2
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.js.map +1 -1
- package/dist/components/RecordEdition/constants.d.ts +2 -0
- package/dist/components/RecordEdition/constants.js +6 -0
- package/dist/components/RecordEdition/constants.js.map +1 -0
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.d.ts +29 -3
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +65 -5
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js.map +1 -1
- package/dist/components/RecordEdition/hooks/useGetSubmitButtons.d.ts +1 -1
- package/dist/components/RecordEdition/hooks/useGetSubmitButtons.js +3 -3
- package/dist/components/RecordEdition/hooks/useGetSubmitButtons.js.map +1 -1
- package/dist/components/RecordEdition/index.d.ts +2 -0
- package/dist/components/RecordEdition/index.js +2 -0
- package/dist/components/RecordEdition/index.js.map +1 -1
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.d.ts +2 -0
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js +8 -6
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +3 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.js +4 -4
- package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +3 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +14 -6
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContentSkeleton.d.ts +2 -0
- package/dist/components/SelectTreeNode/SelectTreeNodeContentSkeleton.js +17 -0
- package/dist/components/SelectTreeNode/SelectTreeNodeContentSkeleton.js.map +1 -0
- package/dist/components/SelectTreeNode/TreeNodeTitle.d.ts +9 -0
- package/dist/components/SelectTreeNode/TreeNodeTitle.js +8 -0
- package/dist/components/SelectTreeNode/TreeNodeTitle.js.map +1 -0
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js +1 -1
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +1 -1
- package/dist/components/SimpleErrorBoundary/SimpleErrorBoundary.d.ts +1 -1
- package/dist/components/SimpleErrorBoundary/SimpleErrorBoundary.js.map +1 -1
- package/dist/components/SimpleErrorBoundary/SimpleErrorBoundaryContent/SimpleErrorBoundaryContent.d.ts +2 -2
- package/dist/components/SimpleErrorBoundary/SimpleErrorBoundaryContent/SimpleErrorBoundaryContent.js +6 -3
- package/dist/components/SimpleErrorBoundary/SimpleErrorBoundaryContent/SimpleErrorBoundaryContent.js.map +1 -1
- package/dist/components/UploadFiles/UploadFiles.js +4 -4
- package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
- package/dist/constants.d.ts +3 -1
- package/dist/constants.js +3 -1
- package/dist/constants.js.map +1 -1
- package/dist/contexts/LangContext/LangContext.d.ts +1 -2
- package/dist/contexts/LangContext/LangContext.js +2 -2
- package/dist/contexts/LangContext/LangContext.js.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useAppLang/useAppLang.js.map +1 -1
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js +1 -1
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/messageHandlers.d.ts +14 -0
- package/dist/hooks/useIFrameMessenger/messageHandlers.js +118 -0
- package/dist/hooks/useIFrameMessenger/messageHandlers.js.map +1 -0
- package/dist/hooks/useIFrameMessenger/types.d.ts +91 -0
- package/dist/hooks/useIFrameMessenger/types.js +2 -0
- package/dist/hooks/useIFrameMessenger/types.js.map +1 -0
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.d.ts +11 -0
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js +73 -0
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js.map +1 -0
- package/dist/hooks/useRedirectToLogin/useRedirectToLogin.js +1 -1
- package/dist/hooks/useRedirectToLogin/useRedirectToLogin.js.map +1 -1
- package/dist/locales/en/shared.json +14 -1
- package/dist/locales/fr/shared.json +14 -1
- package/dist/types/trees.d.ts +1 -0
- package/package.json +3 -4
- package/dist/components/Explorer/actions-item/useRemoveItemAction.js.map +0 -1
- package/dist/components/Explorer/link-item/useLinkMassAction.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/FloatingMenuHandler/FloatingMenuHandler.d.ts +0 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/FloatingMenuHandler/FloatingMenuHandler.js +0 -29
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/FloatingMenuHandler/FloatingMenuHandler.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/FloatingMenuHandler/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/FloatingMenuHandler/index.js +0 -6
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/FloatingMenuHandler/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -20
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +0 -53
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/useGetOptionsQuery.d.ts +0 -19
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/useGetOptionsQuery.js +0 -111
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/useGetOptionsQuery.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -20
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +0 -71
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/useGetOptionsQuery.d.ts +0 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/useGetOptionsQuery.js +0 -58
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/useGetOptionsQuery.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/RecordIdentityCell/RecordIdentityCell.d.ts +0 -6
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/RecordIdentityCell/RecordIdentityCell.js +0 -11
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/RecordIdentityCell/RecordIdentityCell.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/RecordIdentityCell/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/RecordIdentityCell/index.js +0 -6
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/RecordIdentityCell/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/QuickSearch/QuickSearch.d.ts +0 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/QuickSearch/QuickSearch.js +0 -50
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/QuickSearch/QuickSearch.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/QuickSearch/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/QuickSearch/index.js +0 -6
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/QuickSearch/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/ValuesAdd.d.ts +0 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/ValuesAdd.js +0 -215
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/ValuesAdd.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.d.ts +0 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeFieldValue/TreeFieldValue.d.ts +0 -10
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeFieldValue/TreeFieldValue.js +0 -50
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeFieldValue/TreeFieldValue.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeFieldValue/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeFieldValue/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.d.ts +0 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +0 -106
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/index.js +0 -6
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/index.js.map +0 -1
- /package/dist/components/RecordEdition/EditRecordContent/uiElements/{StandardField → shared}/ComputeIndicator.js +0 -0
- /package/dist/components/RecordEdition/EditRecordContent/uiElements/{StandardField → shared}/calculatedInheritedFlags.d.ts +0 -0
- /package/dist/components/RecordEdition/EditRecordContent/uiElements/{StandardField → shared}/calculatedInheritedFlags.js +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
2
|
+
// This file is released under LGPL V3
|
|
3
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
|
+
export const EDIT_RECORD_SIDEBAR_TOGGLE_BUTON_ID = 'edit-record-side-bar-toggle-button';
|
|
5
|
+
export const EDIT_RECORD_MODAL_HEADER_CONTAINER_BUTTONS = 'edit-record-modal-header-container-buttons';
|
|
6
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/RecordEdition/constants.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,MAAM,CAAC,MAAM,mCAAmC,GAAG,oCAAoC,CAAC;AAExF,MAAM,CAAC,MAAM,0CAA0C,GAAG,4CAA4C,CAAC"}
|
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
import { IRecordIdentityWhoAmI } from '../../../types/records';
|
|
2
2
|
import { IValueVersion } from '../../../types/values';
|
|
3
3
|
import { RecordFormAttributeFragment, RecordUpdateSubscription, ValueDetailsFragment } from '../../../_gqlTypes';
|
|
4
|
-
import { RecordFormElementsValueStandardValue } from '../../../hooks/useGetRecordForm';
|
|
4
|
+
import { RecordFormElementsValueLinkValue, RecordFormElementsValueStandardValue, RecordFormElementsValueTreeValue } from '../../../hooks/useGetRecordForm';
|
|
5
5
|
import { SystemTranslation } from '../../../types';
|
|
6
6
|
export interface IRecordPropertyWithAttribute {
|
|
7
7
|
attribute: RecordFormAttributeFragment;
|
|
8
8
|
globalValues?: Array<RecordFormElementsValueStandardValue['payload']>;
|
|
9
9
|
calculatedValue?: RecordFormElementsValueStandardValue['payload'];
|
|
10
10
|
}
|
|
11
|
+
export declare const EditRecordSidebarContentTypeMap: {
|
|
12
|
+
readonly SUMMARY: "summary";
|
|
13
|
+
readonly VALUE_DETAILS: "valueDetails";
|
|
14
|
+
readonly VALUES_VERSIONS: "valuesVersions";
|
|
15
|
+
readonly NONE: "none";
|
|
16
|
+
};
|
|
17
|
+
export type EditRecordSidebarContentType = (typeof EditRecordSidebarContentTypeMap)[keyof typeof EditRecordSidebarContentTypeMap];
|
|
11
18
|
export interface IEditRecordReducerState {
|
|
12
19
|
record: IRecordIdentityWhoAmI;
|
|
13
20
|
libraryId: string;
|
|
14
21
|
libraryLabel: SystemTranslation | null;
|
|
15
22
|
activeAttribute: IRecordPropertyWithAttribute;
|
|
16
|
-
sidebarContent:
|
|
23
|
+
sidebarContent: EditRecordSidebarContentType;
|
|
24
|
+
enableSidebar: boolean;
|
|
25
|
+
isOpenSidebar: boolean;
|
|
17
26
|
sidebarDefaultHidden?: boolean;
|
|
18
27
|
valuesVersion: IValueVersion;
|
|
19
28
|
originValuesVersion: IValueVersion;
|
|
@@ -30,7 +39,11 @@ export declare enum EditRecordReducerActionsTypes {
|
|
|
30
39
|
SET_RECORD = "SET_RECORD",
|
|
31
40
|
SET_LIBRARY_LABEL = "SET_LIBRARY_LABEL",
|
|
32
41
|
SET_ACTIVE_VALUE = "SET_ACTIVE_VALUE",
|
|
42
|
+
INITIALIZE_SIDEBAR = "INITIALIZE_SIDEBAR",
|
|
43
|
+
SET_ENABLE_SIDEBAR = "SET_ENABLE_SIDEBAR",
|
|
33
44
|
SET_SIDEBAR_CONTENT = "SET_SIDEBAR_CONTENT",
|
|
45
|
+
SET_SIDEBAR_IS_OPEN = "SET_SIDEBAR_IS_OPEN",
|
|
46
|
+
SET_SIDEBAR_DEFAULT_HIDDEN = "SET_SIDEBAR_DEFAULT_HIDDEN",
|
|
34
47
|
SET_VALUES_VERSION = "SET_VALUES_VERSION",
|
|
35
48
|
REQUEST_REFRESH = "REQUEST_REFRESH",
|
|
36
49
|
REFRESH_DONE = "REFRESH_DONE",
|
|
@@ -46,10 +59,23 @@ export type IEditRecordReducerActions = {
|
|
|
46
59
|
} | {
|
|
47
60
|
type: EditRecordReducerActionsTypes.SET_ACTIVE_VALUE;
|
|
48
61
|
attribute?: IEditRecordReducerState['activeAttribute']['attribute'];
|
|
49
|
-
values?: RecordFormElementsValueStandardValue[];
|
|
62
|
+
values?: RecordFormElementsValueStandardValue[] | RecordFormElementsValueLinkValue[] | RecordFormElementsValueTreeValue[];
|
|
63
|
+
} | {
|
|
64
|
+
type: EditRecordReducerActionsTypes.INITIALIZE_SIDEBAR;
|
|
65
|
+
enabled: IEditRecordReducerState['enableSidebar'];
|
|
66
|
+
isOpenByDefault: IEditRecordReducerState['sidebarDefaultHidden'];
|
|
67
|
+
} | {
|
|
68
|
+
type: EditRecordReducerActionsTypes.SET_ENABLE_SIDEBAR;
|
|
69
|
+
enabled: IEditRecordReducerState['enableSidebar'];
|
|
70
|
+
} | {
|
|
71
|
+
type: EditRecordReducerActionsTypes.SET_SIDEBAR_IS_OPEN;
|
|
72
|
+
isOpen: IEditRecordReducerState['isOpenSidebar'];
|
|
50
73
|
} | {
|
|
51
74
|
type: EditRecordReducerActionsTypes.SET_SIDEBAR_CONTENT;
|
|
52
75
|
content: IEditRecordReducerState['sidebarContent'];
|
|
76
|
+
} | {
|
|
77
|
+
type: EditRecordReducerActionsTypes.SET_SIDEBAR_DEFAULT_HIDDEN;
|
|
78
|
+
value: IEditRecordReducerState['sidebarDefaultHidden'];
|
|
53
79
|
} | {
|
|
54
80
|
type: EditRecordReducerActionsTypes.SET_VALUES_VERSION;
|
|
55
81
|
valuesVersion: IEditRecordReducerState['valuesVersion'];
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
+
import { TypeGuards } from '../../../components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards';
|
|
2
|
+
export const EditRecordSidebarContentTypeMap = {
|
|
3
|
+
SUMMARY: 'summary',
|
|
4
|
+
VALUE_DETAILS: 'valueDetails',
|
|
5
|
+
VALUES_VERSIONS: 'valuesVersions',
|
|
6
|
+
NONE: 'none'
|
|
7
|
+
};
|
|
1
8
|
export var EditRecordReducerActionsTypes;
|
|
2
9
|
(function (EditRecordReducerActionsTypes) {
|
|
3
10
|
EditRecordReducerActionsTypes["SET_RECORD"] = "SET_RECORD";
|
|
4
11
|
EditRecordReducerActionsTypes["SET_LIBRARY_LABEL"] = "SET_LIBRARY_LABEL";
|
|
5
12
|
EditRecordReducerActionsTypes["SET_ACTIVE_VALUE"] = "SET_ACTIVE_VALUE";
|
|
13
|
+
EditRecordReducerActionsTypes["INITIALIZE_SIDEBAR"] = "INITIALIZE_SIDEBAR";
|
|
14
|
+
EditRecordReducerActionsTypes["SET_ENABLE_SIDEBAR"] = "SET_ENABLE_SIDEBAR";
|
|
6
15
|
EditRecordReducerActionsTypes["SET_SIDEBAR_CONTENT"] = "SET_SIDEBAR_CONTENT";
|
|
16
|
+
EditRecordReducerActionsTypes["SET_SIDEBAR_IS_OPEN"] = "SET_SIDEBAR_IS_OPEN";
|
|
17
|
+
EditRecordReducerActionsTypes["SET_SIDEBAR_DEFAULT_HIDDEN"] = "SET_SIDEBAR_DEFAULT_HIDDEN";
|
|
7
18
|
EditRecordReducerActionsTypes["SET_VALUES_VERSION"] = "SET_VALUES_VERSION";
|
|
8
19
|
EditRecordReducerActionsTypes["REQUEST_REFRESH"] = "REQUEST_REFRESH";
|
|
9
20
|
EditRecordReducerActionsTypes["REFRESH_DONE"] = "REFRESH_DONE";
|
|
@@ -15,7 +26,9 @@ export const initialState = {
|
|
|
15
26
|
libraryId: null,
|
|
16
27
|
libraryLabel: null,
|
|
17
28
|
activeAttribute: null,
|
|
18
|
-
|
|
29
|
+
enableSidebar: false,
|
|
30
|
+
isOpenSidebar: false,
|
|
31
|
+
sidebarContent: EditRecordSidebarContentTypeMap.NONE,
|
|
19
32
|
sidebarDefaultHidden: false,
|
|
20
33
|
valuesVersion: null,
|
|
21
34
|
originValuesVersion: null,
|
|
@@ -32,22 +45,68 @@ const editRecordReducer = (state, action) => {
|
|
|
32
45
|
return { ...state, record: action.record };
|
|
33
46
|
case EditRecordReducerActionsTypes.SET_LIBRARY_LABEL:
|
|
34
47
|
return { ...state, libraryLabel: action.label };
|
|
48
|
+
case EditRecordReducerActionsTypes.INITIALIZE_SIDEBAR: {
|
|
49
|
+
const { enabled, isOpenByDefault } = action;
|
|
50
|
+
// If the sidebar is not enabled, don't check for isOpenByDefault
|
|
51
|
+
const isOpen = enabled && isOpenByDefault;
|
|
52
|
+
return {
|
|
53
|
+
...state,
|
|
54
|
+
enableSidebar: enabled,
|
|
55
|
+
sidebarDefaultHidden: !isOpenByDefault,
|
|
56
|
+
sidebarContent: isOpen ? EditRecordSidebarContentTypeMap.SUMMARY : EditRecordSidebarContentTypeMap.NONE,
|
|
57
|
+
isOpenSidebar: isOpen
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
case EditRecordReducerActionsTypes.SET_ENABLE_SIDEBAR:
|
|
61
|
+
return { ...state, enableSidebar: action.enabled };
|
|
62
|
+
case EditRecordReducerActionsTypes.SET_SIDEBAR_DEFAULT_HIDDEN:
|
|
63
|
+
return { ...state, sidebarDefaultHidden: action.value };
|
|
35
64
|
case EditRecordReducerActionsTypes.SET_ACTIVE_VALUE:
|
|
36
|
-
const newSidebarContent = action.attribute !== null
|
|
65
|
+
const newSidebarContent = action.attribute !== null
|
|
66
|
+
? EditRecordSidebarContentTypeMap.VALUE_DETAILS
|
|
67
|
+
: state.sidebarDefaultHidden
|
|
68
|
+
? EditRecordSidebarContentTypeMap.NONE
|
|
69
|
+
: EditRecordSidebarContentTypeMap.SUMMARY;
|
|
37
70
|
return {
|
|
38
71
|
...state,
|
|
39
72
|
activeAttribute: {
|
|
40
73
|
attribute: action.attribute ?? state.activeAttribute?.attribute ?? null,
|
|
41
74
|
globalValues: action.values
|
|
42
75
|
?.filter(value => !value.isCalculated && !value.isInherited)
|
|
43
|
-
.map(value =>
|
|
44
|
-
|
|
45
|
-
|
|
76
|
+
.map(value => {
|
|
77
|
+
if (TypeGuards.isRecordFormElementsValuesLinkValue(value)) {
|
|
78
|
+
return value.linkValue.whoAmI.label ?? value.linkValue.whoAmI.id;
|
|
79
|
+
}
|
|
80
|
+
if (TypeGuards.isRecordFormElementsValuesTreeValue(value)) {
|
|
81
|
+
return value.treeValue.record.whoAmI.label ?? value.treeValue.record.whoAmI.id;
|
|
82
|
+
}
|
|
83
|
+
return value?.payload;
|
|
84
|
+
}),
|
|
85
|
+
calculatedValue: (() => {
|
|
86
|
+
const calculatedOrInheritedValue = action.values?.filter(value => value.isCalculated || value.isInherited)?.[0];
|
|
87
|
+
if (TypeGuards.isRecordFormElementsValuesLinkValue(calculatedOrInheritedValue)) {
|
|
88
|
+
return (calculatedOrInheritedValue.linkValue.whoAmI.label ??
|
|
89
|
+
calculatedOrInheritedValue.linkValue.whoAmI.id);
|
|
90
|
+
}
|
|
91
|
+
if (TypeGuards.isRecordFormElementsValuesTreeValue(calculatedOrInheritedValue)) {
|
|
92
|
+
return (calculatedOrInheritedValue.treeValue.record.whoAmI.label ??
|
|
93
|
+
calculatedOrInheritedValue.treeValue.record.whoAmI.id);
|
|
94
|
+
}
|
|
95
|
+
return calculatedOrInheritedValue?.payload;
|
|
96
|
+
})()
|
|
46
97
|
},
|
|
47
98
|
sidebarContent: newSidebarContent
|
|
48
99
|
};
|
|
49
100
|
case EditRecordReducerActionsTypes.SET_SIDEBAR_CONTENT:
|
|
50
101
|
return { ...state, sidebarContent: action.content };
|
|
102
|
+
case EditRecordReducerActionsTypes.SET_SIDEBAR_IS_OPEN:
|
|
103
|
+
return {
|
|
104
|
+
...state,
|
|
105
|
+
sidebarContent: action.isOpen
|
|
106
|
+
? EditRecordSidebarContentTypeMap.SUMMARY
|
|
107
|
+
: EditRecordSidebarContentTypeMap.NONE,
|
|
108
|
+
isOpenSidebar: action.isOpen
|
|
109
|
+
};
|
|
51
110
|
case EditRecordReducerActionsTypes.SET_VALUES_VERSION:
|
|
52
111
|
return { ...state, valuesVersion: action.valuesVersion };
|
|
53
112
|
case EditRecordReducerActionsTypes.REQUEST_REFRESH:
|
|
@@ -74,6 +133,7 @@ const editRecordReducer = (state, action) => {
|
|
|
74
133
|
case EditRecordReducerActionsTypes.CLEAR_EXTERNAL_UPDATE:
|
|
75
134
|
return { ...state, externalUpdate: { ...initialState.externalUpdate } };
|
|
76
135
|
default:
|
|
136
|
+
console.warn('Unknown action type in editRecordReducer:', action);
|
|
77
137
|
return state;
|
|
78
138
|
}
|
|
79
139
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editRecordReducer.js","sourceRoot":"","sources":["../../../../src/components/RecordEdition/editRecordReducer/editRecordReducer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editRecordReducer.js","sourceRoot":"","sources":["../../../../src/components/RecordEdition/editRecordReducer/editRecordReducer.ts"],"names":[],"mappings":"AAYA,OAAO,EAAC,UAAU,EAAC,MAAM,uEAAuE,CAAC;AAQjG,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC3C,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,cAAc;IAC7B,eAAe,EAAE,gBAAgB;IACjC,IAAI,EAAE,MAAM;CACN,CAAC;AA0BX,MAAM,CAAN,IAAY,6BAcX;AAdD,WAAY,6BAA6B;IACrC,0DAAyB,CAAA;IACzB,wEAAuC,CAAA;IACvC,sEAAqC,CAAA;IACrC,0EAAyC,CAAA;IACzC,0EAAyC,CAAA;IACzC,4EAA2C,CAAA;IAC3C,4EAA2C,CAAA;IAC3C,0FAAyD,CAAA;IACzD,0EAAyC,CAAA;IACzC,oEAAmC,CAAA;IACnC,8DAA6B,CAAA;IAC7B,4EAA2C,CAAA;IAC3C,gFAA+C,CAAA;AACnD,CAAC,EAdW,6BAA6B,KAA7B,6BAA6B,QAcxC;AA6DD,MAAM,CAAC,MAAM,YAAY,GAA4B;IACjD,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IACf,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,IAAI;IACrB,aAAa,EAAE,KAAK;IACpB,aAAa,EAAE,KAAK;IACpB,cAAc,EAAE,+BAA+B,CAAC,IAAI;IACpD,oBAAoB,EAAE,KAAK;IAC3B,aAAa,EAAE,IAAI;IACnB,mBAAmB,EAAE,IAAI;IACzB,gBAAgB,EAAE,KAAK;IACvB,cAAc,EAAE;QACZ,SAAS,EAAE,EAAE;QACb,aAAa,EAAE,EAAE;KACpB;IACD,cAAc,EAAE,KAAK;CACxB,CAAC;AAEF,MAAM,iBAAiB,GAAG,CACtB,KAA8B,EAC9B,MAAiC,EACV,EAAE;IACzB,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,6BAA6B,CAAC,UAAU;YACzC,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AC,QAAQ,CAAC,CAAC;YAEvE,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC,MAAM,CACzC,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC;gBACpB,GAAG,GAAG;gBACN,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE;oBACtB,GAAG,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;oBAC5D,YAAY,CAAC,KAAK;iBACrB;aACJ,CAAC,EACF,EAAE,CACL,CAAC;YAEF,QAAQ,CAAC,cAAc,GAAG;gBACtB,SAAS,EAAE,YAAY;gBACvB,aAAa,EAAE,EAAC,GAAG,CAAC,KAAK,CAAC,cAAc,EAAE,aAAa,IAAI,EAAE,CAAC,EAAE,GAAG,SAAS,EAAC;aAChF,CAAC;YAEF,OAAO,QAAQ,CAAC;QACpB,KAAK,6BAA6B,CAAC,qBAAqB;YACpD,OAAO,EAAC,GAAG,KAAK,EAAE,cAAc,EAAE,EAAC,GAAG,YAAY,CAAC,cAAc,EAAC,EAAC,CAAC;QACxE;YACI,OAAO,CAAC,IAAI,CAAC,2CAA2C,EAAE,MAAM,CAAC,CAAC;YAClE,OAAO,KAAK,CAAC;IACrB,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { possibleSubmitButtons, submitButtonsName } from '../_types';
|
|
2
|
-
export declare const useGetSubmitButtons: (buttons: possibleSubmitButtons, isInCreateMode: boolean, onClickSubmit: (button: submitButtonsName) => void) => any[];
|
|
2
|
+
export declare const useGetSubmitButtons: (buttons: possibleSubmitButtons, id: string, isInCreateMode: boolean, onClickSubmit: (button: submitButtonsName) => void) => any[];
|
|
@@ -7,17 +7,17 @@ import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
|
7
7
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
8
8
|
import { faPenToSquare, faCheck } from '@fortawesome/free-solid-svg-icons';
|
|
9
9
|
import { EDIT_OR_CREATE_RECORD_FORM_ID } from '../EditRecordContent/formConstants';
|
|
10
|
-
export const useGetSubmitButtons = (buttons, isInCreateMode, onClickSubmit) => {
|
|
10
|
+
export const useGetSubmitButtons = (buttons, id, isInCreateMode, onClickSubmit) => {
|
|
11
11
|
const { t } = useSharedTranslation();
|
|
12
12
|
const headerSubmitButtons = [];
|
|
13
13
|
if (!isInCreateMode) {
|
|
14
14
|
return [];
|
|
15
15
|
}
|
|
16
16
|
if (buttons.includes('create')) {
|
|
17
|
-
headerSubmitButtons.push(_jsx(KitButton, { form: EDIT_OR_CREATE_RECORD_FORM_ID, type: !buttons.includes('createAndEdit') ? 'primary' : 'secondary', htmlType: "submit", icon: _jsx(FontAwesomeIcon, { icon: faCheck }), onClick: () => onClickSubmit('create'), children: t('record_edition.create') }, "create"));
|
|
17
|
+
headerSubmitButtons.push(_jsx(KitButton, { form: id ?? EDIT_OR_CREATE_RECORD_FORM_ID, type: !buttons.includes('createAndEdit') ? 'primary' : 'secondary', htmlType: "submit", icon: _jsx(FontAwesomeIcon, { icon: faCheck }), onClick: () => onClickSubmit('create'), children: t('record_edition.create') }, "create"));
|
|
18
18
|
}
|
|
19
19
|
if (buttons.includes('createAndEdit')) {
|
|
20
|
-
headerSubmitButtons.push(_jsx(KitButton, { form: EDIT_OR_CREATE_RECORD_FORM_ID, type: "primary", htmlType: "submit", icon: _jsx(FontAwesomeIcon, { icon: faPenToSquare }), onClick: () => onClickSubmit('createAndEdit'), children: t('record_edition.create_and_edit') }, "createAndEdit"));
|
|
20
|
+
headerSubmitButtons.push(_jsx(KitButton, { form: id ?? EDIT_OR_CREATE_RECORD_FORM_ID, type: "primary", htmlType: "submit", icon: _jsx(FontAwesomeIcon, { icon: faPenToSquare }), onClick: () => onClickSubmit('createAndEdit'), children: t('record_edition.create_and_edit') }, "createAndEdit"));
|
|
21
21
|
}
|
|
22
22
|
return headerSubmitButtons;
|
|
23
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetSubmitButtons.js","sourceRoot":"","sources":["../../../../src/components/RecordEdition/hooks/useGetSubmitButtons.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,aAAa,EAAE,OAAO,EAAC,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAC,6BAA6B,EAAC,MAAM,oCAAoC,CAAC;AAEjF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAC/B,OAA8B,EAC9B,cAAuB,EACvB,aAAkD,EACpD,EAAE;IACA,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,mBAAmB,GAAG,EAAE,CAAC;IAE/B,IAAI,CAAC,cAAc,EAAE,CAAC;QAClB,OAAO,EAAE,CAAC;IACd,CAAC;IAED,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,mBAAmB,CAAC,IAAI,CACpB,KAAC,SAAS,IAEN,IAAI,EAAE,6BAA6B,
|
|
1
|
+
{"version":3,"file":"useGetSubmitButtons.js","sourceRoot":"","sources":["../../../../src/components/RecordEdition/hooks/useGetSubmitButtons.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,aAAa,EAAE,OAAO,EAAC,MAAM,mCAAmC,CAA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CAAC"}
|
|
@@ -5,3 +5,5 @@ export { EditRecord } from './EditRecord';
|
|
|
5
5
|
export { EditRecordModal } from './EditRecordModal';
|
|
6
6
|
export { EditRecordPage } from './EditRecordPage';
|
|
7
7
|
export { default as EditRecordSidebar } from './EditRecordSidebar';
|
|
8
|
+
export { default as useExecuteSaveValueBatchMutation } from './EditRecordContent/hooks/useExecuteSaveValueBatchMutation';
|
|
9
|
+
export { default as useCreateRecordMutation } from './EditRecordContent/hooks/useCreateRecordMutation';
|
|
@@ -8,4 +8,6 @@ export { EditRecord } from './EditRecord';
|
|
|
8
8
|
export { EditRecordModal } from './EditRecordModal';
|
|
9
9
|
export { EditRecordPage } from './EditRecordPage';
|
|
10
10
|
export { default as EditRecordSidebar } from './EditRecordSidebar';
|
|
11
|
+
export { default as useExecuteSaveValueBatchMutation } from './EditRecordContent/hooks/useExecuteSaveValueBatchMutation';
|
|
12
|
+
export { default as useCreateRecordMutation } from './EditRecordContent/hooks/useCreateRecordMutation';
|
|
11
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/RecordEdition/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/RecordEdition/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,gCAAgC,EAAC,MAAM,4DAA4D,CAAC;AACvH,OAAO,EAAC,OAAO,IAAI,uBAAuB,EAAC,MAAM,mDAAmD,CAAC"}
|
|
@@ -2,8 +2,10 @@ import { ComponentProps, FunctionComponent } from 'react';
|
|
|
2
2
|
import { ExplorerSelectionIdsQuery } from '../../_gqlTypes';
|
|
3
3
|
import { Explorer } from '../../components/Explorer';
|
|
4
4
|
interface ISelectRecordForLinkModalProps {
|
|
5
|
+
className?: string;
|
|
5
6
|
open: boolean;
|
|
6
7
|
childLibraryId: string;
|
|
8
|
+
replacementMode: boolean;
|
|
7
9
|
selectionMode: ComponentProps<typeof Explorer>['selectionMode'];
|
|
8
10
|
hideSelectAllAction: ComponentProps<typeof Explorer>['hideSelectAllAction'];
|
|
9
11
|
onSelectionCompleted: (data: ExplorerSelectionIdsQuery) => void;
|
|
@@ -8,7 +8,7 @@ import { closeKitSnackBar, KitButton, KitSpace, AntModal } from 'aristid-ds';
|
|
|
8
8
|
// TODO: harmonize icon sources
|
|
9
9
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
10
10
|
import { faXmark } from '@fortawesome/free-solid-svg-icons';
|
|
11
|
-
import { FaPlus } from 'react-icons/fa';
|
|
11
|
+
import { FaExchangeAlt, FaPlus } from 'react-icons/fa';
|
|
12
12
|
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
13
13
|
import { useExplorerSelectionIdsLazyQuery } from '../../_gqlTypes';
|
|
14
14
|
import { Explorer } from '../../components/Explorer';
|
|
@@ -47,7 +47,7 @@ const ModalMainStyledDiv = styled.div `
|
|
|
47
47
|
height: 100%;
|
|
48
48
|
position: relative;
|
|
49
49
|
`;
|
|
50
|
-
export const SelectRecordForLinkModal = ({ open, childLibraryId, selectionMode, hideSelectAllAction, onSelectionCompleted, onClose }) => {
|
|
50
|
+
export const SelectRecordForLinkModal = ({ className, open, childLibraryId, replacementMode, selectionMode, hideSelectAllAction, onSelectionCompleted, onClose }) => {
|
|
51
51
|
const { t } = useSharedTranslation();
|
|
52
52
|
const explorerContainerRef = useRef(null);
|
|
53
53
|
const _handleClose = () => {
|
|
@@ -60,13 +60,15 @@ export const SelectRecordForLinkModal = ({ open, childLibraryId, selectionMode,
|
|
|
60
60
|
fetchPolicy: 'no-cache',
|
|
61
61
|
onCompleted: onSelectionCompleted
|
|
62
62
|
});
|
|
63
|
-
return (_jsx(StyledModal, { open: open, onCancel: _handleClose, destroyOnClose: true, closable: false, cancelText: t('global.cancel'), width: "90vw", centered: true, footer: _footer, children: _jsx(ModalMainStyledDiv, { ref: explorerContainerRef, children: _jsx(Explorer.EditSettingsContextProvider, { panelElement: () => explorerContainerRef.current ?? document.body, children: _jsx(Explorer, { entrypoint: {
|
|
63
|
+
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: _jsx(Explorer.EditSettingsContextProvider, { panelElement: () => explorerContainerRef.current ?? document.body, children: _jsx(Explorer, { entrypoint: {
|
|
64
64
|
type: 'library',
|
|
65
65
|
libraryId: childLibraryId
|
|
66
66
|
}, selectionMode: selectionMode, hideSelectAllAction: hideSelectAllAction, massActions: [
|
|
67
67
|
{
|
|
68
|
-
label:
|
|
69
|
-
|
|
68
|
+
label: replacementMode
|
|
69
|
+
? t('explorer.massAction.replace-link')
|
|
70
|
+
: t('explorer.massAction.add-link'),
|
|
71
|
+
icon: replacementMode ? _jsx(FaExchangeAlt, {}) : _jsx(FaPlus, {}),
|
|
70
72
|
callback: async (massSelectionFilter) => {
|
|
71
73
|
await getRecordIdsFromFilters({
|
|
72
74
|
variables: {
|
|
@@ -76,6 +78,6 @@ export const SelectRecordForLinkModal = ({ open, childLibraryId, selectionMode,
|
|
|
76
78
|
});
|
|
77
79
|
}
|
|
78
80
|
}
|
|
79
|
-
], primaryActions: [], defaultActionsForItem: [], defaultMassActions: [], itemActions: [], defaultPrimaryActions: [] }) }) }) }));
|
|
81
|
+
], primaryActions: [], defaultActionsForItem: [], defaultMassActions: [], itemActions: [], defaultPrimaryActions: [], showSearch: true }) }) }) }));
|
|
80
82
|
};
|
|
81
83
|
//# 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,EAAoC,MAAM,EAAC,MAAM,OAAO,CAAC;AAChE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC3E,+BAA+B;AAC/B,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectRecordForLinkModal.js","sourceRoot":"","sources":["../../../src/components/SelectRecordForLinkModal/SelectRecordForLinkModal.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoC,MAAM,EAAC,MAAM,OAAO,CAAC;AAChE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC3E,+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,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAA4B,gCAAgC,EAAC,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAEjD,MAAM,aAAa,GAAG,IAAK,CAAC;AAE5B,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;;;qBAGf,aAAa;;;;;;;;;;;;;;;;;;;CAmBjC,CAAC;AAEF,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAKtC,CAAC;AAEF,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIpC,CAAC;AAaF,MAAM,CAAC,MAAM,wBAAwB,GAAsD,CAAC,EACxF,SAAS,EACT,IAAI,EACJ,cAAc,EACd,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,OAAO,EACV,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,oBAAoB,GAAG,MAAM,CAAiB,IAAI,CA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8B,CAAC;4BACvC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,KAAC,aAAa,KAAG,CAAC,CAAC,CAAC,KAAC,MAAM,KAAG;4BACtD,QAAQ,EAAE,KAAK,EAAC,mBAAmB,EAAC,EAAE;gCAClC,MAAM,uBAAuB,CAAC;oCAC1B,SAAS,EAAE;wCACP,SAAS,EAAE,cAAc;wCACzB,OAAO,EAAE,mBAAmB;qCAC/B;iCACJ,CAAC,CAAC;4BACP,CAAC;yBACJ;qBACJ,EACD,cAAc,EAAE,EAAE,EAClB,qBAAqB,EAAE,EAAE,EACzB,kBAAkB,EAAE,EAAE,EACtB,WAAW,EAAE,EAAE,EACf,qBAAqB,EAAE,EAAE,EACzB,UAAU,SACZ,GAEiC,GACtB,GACX,CACjB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -2,10 +2,12 @@ import { FunctionComponent } from 'react';
|
|
|
2
2
|
import { ITreeNodeWithRecord } from '../../types/trees';
|
|
3
3
|
interface ISelectTreeNodeProps {
|
|
4
4
|
treeId: string;
|
|
5
|
-
|
|
5
|
+
selectedNodes?: string[];
|
|
6
|
+
disabledNodes?: string[];
|
|
6
7
|
onSelect: (node: ITreeNodeWithRecord, selected: boolean) => void;
|
|
7
8
|
onCheck?: (selection: ITreeNodeWithRecord[]) => void;
|
|
8
9
|
multiple?: boolean;
|
|
10
|
+
checkable?: boolean;
|
|
9
11
|
canSelectRoot?: boolean;
|
|
10
12
|
selectableLibraries?: string[];
|
|
11
13
|
}
|
|
@@ -8,15 +8,15 @@ import { useTreeDataQueryQuery } from '../../_gqlTypes';
|
|
|
8
8
|
import { ErrorDisplay } from '../..';
|
|
9
9
|
import useLang from '../../hooks/useLang';
|
|
10
10
|
import { SelectTreeNodeContent } from './SelectTreeNodeContent';
|
|
11
|
-
import {
|
|
12
|
-
export const SelectTreeNode = ({ treeId, onSelect, onCheck,
|
|
11
|
+
import { SelectTreeNodeContentSkeleton } from './SelectTreeNodeContentSkeleton';
|
|
12
|
+
export const SelectTreeNode = ({ treeId, onSelect, onCheck, selectedNodes, disabledNodes, multiple = false, checkable = false, canSelectRoot = false, selectableLibraries }) => {
|
|
13
13
|
const { lang } = useLang();
|
|
14
14
|
const { t } = useSharedTranslation();
|
|
15
15
|
const { loading, error, data } = useTreeDataQueryQuery({
|
|
16
16
|
variables: { treeId }
|
|
17
17
|
});
|
|
18
18
|
if (loading) {
|
|
19
|
-
return _jsx(
|
|
19
|
+
return _jsx(SelectTreeNodeContentSkeleton, {});
|
|
20
20
|
}
|
|
21
21
|
if (error) {
|
|
22
22
|
return _jsx(ErrorDisplay, { message: error.message });
|
|
@@ -25,6 +25,6 @@ export const SelectTreeNode = ({ treeId, onSelect, onCheck, selectedNode, multip
|
|
|
25
25
|
return _jsx(ErrorDisplay, { message: t('error.unknown_tree', { treeId }) });
|
|
26
26
|
}
|
|
27
27
|
const label = localizedTranslation(data.trees.list[0].label, lang) || treeId;
|
|
28
|
-
return (_jsx(SelectTreeNodeContent, { treeData: { id: treeId, label }, onCheck: onCheck, onSelect: onSelect, multiple: multiple,
|
|
28
|
+
return (_jsx(SelectTreeNodeContent, { treeData: { id: treeId, label }, onCheck: onCheck, onSelect: onSelect, multiple: multiple, checkable: checkable, selectedNodes: selectedNodes, disabledNodes: disabledNodes, canSelectRoot: canSelectRoot, selectableLibraries: selectableLibraries }));
|
|
29
29
|
};
|
|
30
30
|
//# 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,EAAC,qBAAqB,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,EAAC,YA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AAK,CAAC,OAAO,GAAI,CAAC;IACpD,CAAC;IAED,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACvB,OAAO,KAAC,YAAY,IAAC,OAAO,EAAE,CAAC,CAAC,oBAAoB,EAAE,EAAC,MAAM,EAAC,CAAC,GAAI,CAAC;IACxE,CAAC;IAED,MAAM,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC;IAE7E,OAAO,CACH,KAAC,qBAAqB,IAClB,QAAQ,EAAE,EAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAC,EAC7B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,GAC1C,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -5,10 +5,12 @@ interface ISelectTreeNodeContentProps {
|
|
|
5
5
|
id: string;
|
|
6
6
|
label: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
selectedNodes?: string[];
|
|
9
|
+
disabledNodes?: string[];
|
|
9
10
|
onSelect: (node: ITreeNodeWithRecord, selected: boolean) => void;
|
|
10
11
|
onCheck?: (selection: ITreeNodeWithRecord[]) => void;
|
|
11
12
|
multiple?: boolean;
|
|
13
|
+
checkable?: boolean;
|
|
12
14
|
canSelectRoot?: boolean;
|
|
13
15
|
selectableLibraries?: string[];
|
|
14
16
|
}
|
|
@@ -8,6 +8,7 @@ import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
|
8
8
|
import { useTreeNodeChildrenLazyQuery } from '../../_gqlTypes';
|
|
9
9
|
import { defaultPaginationPageSize, ErrorDisplay } from '../..';
|
|
10
10
|
import { KitTree } from 'aristid-ds';
|
|
11
|
+
import { TreeNodeTitle } from './TreeNodeTitle';
|
|
11
12
|
const _isObjectSelection = (selection) => 'checked' in selection && 'halfChecked' in selection;
|
|
12
13
|
const _constructTreeContent = (data) => data.map(e => ({
|
|
13
14
|
record: e.record,
|
|
@@ -17,7 +18,7 @@ const _constructTreeContent = (data) => data.map(e => ({
|
|
|
17
18
|
isLeaf: !e.childrenCount,
|
|
18
19
|
children: []
|
|
19
20
|
}));
|
|
20
|
-
export const SelectTreeNodeContent = ({ treeData: tree, onSelect, onCheck,
|
|
21
|
+
export const SelectTreeNodeContent = ({ treeData: tree, onSelect, onCheck, selectedNodes: initSelectedNodes, disabledNodes, multiple = false, checkable = false, canSelectRoot = false, selectableLibraries }) => {
|
|
21
22
|
const { t } = useSharedTranslation();
|
|
22
23
|
const rootNode = {
|
|
23
24
|
title: tree.label,
|
|
@@ -33,7 +34,7 @@ export const SelectTreeNodeContent = ({ treeData: tree, onSelect, onCheck, selec
|
|
|
33
34
|
const [treeMap, setTreeMap] = useState({
|
|
34
35
|
[tree.id]: rootNode
|
|
35
36
|
});
|
|
36
|
-
const [
|
|
37
|
+
const [selectedNodes, setSelectedNodes] = useState(initSelectedNodes);
|
|
37
38
|
const [fetchError, setFetchError] = useState();
|
|
38
39
|
const [loadTreeContent, { error, called }] = useTreeNodeChildrenLazyQuery();
|
|
39
40
|
const _fetchTreeContent = async (parentNodeKey, offset = 0) => {
|
|
@@ -56,7 +57,11 @@ export const SelectTreeNodeContent = ({ treeData: tree, onSelect, onCheck, selec
|
|
|
56
57
|
const showMoreKey = '__showMore' + parentMapKey + offset;
|
|
57
58
|
parentElement.children = parentElement.children.filter(child => !child.key.match(`__showMore${parentMapKey}`));
|
|
58
59
|
for (const node of formattedNodes) {
|
|
59
|
-
const nodeForTreeMap = {
|
|
60
|
+
const nodeForTreeMap = {
|
|
61
|
+
...node,
|
|
62
|
+
paginationOffset: 0,
|
|
63
|
+
disabled: disabledNodes?.includes(node.id)
|
|
64
|
+
};
|
|
60
65
|
newTreeMap[nodeForTreeMap.key] = nodeForTreeMap;
|
|
61
66
|
parentElement.paginationOffset = offset;
|
|
62
67
|
parentElement.children.push(nodeForTreeMap);
|
|
@@ -83,8 +88,8 @@ export const SelectTreeNodeContent = ({ treeData: tree, onSelect, onCheck, selec
|
|
|
83
88
|
}
|
|
84
89
|
};
|
|
85
90
|
useEffect(() => {
|
|
86
|
-
|
|
87
|
-
}, [
|
|
91
|
+
setSelectedNodes(initSelectedNodes);
|
|
92
|
+
}, [initSelectedNodes]);
|
|
88
93
|
useEffect(() => {
|
|
89
94
|
// Load root
|
|
90
95
|
_fetchTreeContent();
|
|
@@ -125,6 +130,9 @@ export const SelectTreeNodeContent = ({ treeData: tree, onSelect, onCheck, selec
|
|
|
125
130
|
return _jsx(ErrorDisplay, { message: error?.message ?? fetchError });
|
|
126
131
|
}
|
|
127
132
|
const treeData = [treeMap[rootNode.key]];
|
|
128
|
-
return (_jsx(KitTree, { defaultExpandedKeys: [tree.id], multiple: multiple,
|
|
133
|
+
return (_jsx(KitTree, { defaultExpandedKeys: [tree.id], multiple: multiple, selectedKeys: selectedNodes, checkedKeys: selectedNodes, titleRender: node => {
|
|
134
|
+
const dataNode = node;
|
|
135
|
+
return (_jsx(TreeNodeTitle, { title: dataNode.title, checkable: checkable, isSelected: selectedNodes?.includes(dataNode.id), isDisabled: disabledNodes?.includes(dataNode.id) }));
|
|
136
|
+
}, onSelect: _handleSelect, onCheck: _handleCheck, treeData: treeData, loadData: _handleLoadData, checkStrictly: true, checkable: checkable }));
|
|
129
137
|
};
|
|
130
138
|
//# 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,sEA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EAAE,OAAO,IAAI,UAAU,GAAI,CAAC;IACnE,CAAC;IAED,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAEzC,OAAO,CACH,KAAC,OAAO,IACJ,mBAAmB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAC9B,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,aAAa,EAC3B,WAAW,EAAE,aAAa,EAC1B,WAAW,EAAE,IAAI,CAAC,EAAE;YAChB,MAAM,QAAQ,GAAG,IAAuB,CAAC;YAEzC,OAAO,CACH,KAAC,aAAa,IACV,KAAK,EAAE,QAAQ,CAAC,KAAK,EACrB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,aAAa,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,EAChD,UAAU,EAAE,aAAa,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,GAClD,CACL,CAAC;QACN,CAAC,EACD,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,eAAe,EACzB,aAAa,QACb,SAAS,EAAE,SAAS,GACtB,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { KitSkeleton } from 'aristid-ds';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
const KitFirstNodeSkeletonInput = styled(KitSkeleton.KitInputSkeleton) `
|
|
5
|
+
width: 300px;
|
|
6
|
+
`;
|
|
7
|
+
const KitSecondeNodeSkeletonInput = styled(KitSkeleton.KitInputSkeleton) `
|
|
8
|
+
width: 300px;
|
|
9
|
+
margin-top: calc(var(--general-spacing-xs) * 1px);
|
|
10
|
+
`;
|
|
11
|
+
const KitLeafSkeletonInput = styled(KitSkeleton.KitInputSkeleton) `
|
|
12
|
+
width: 300px;
|
|
13
|
+
margin-top: calc(var(--general-spacing-xs) * 1px);
|
|
14
|
+
margin-left: calc(var(--general-spacing-s) * 1px);
|
|
15
|
+
`;
|
|
16
|
+
export const SelectTreeNodeContentSkeleton = () => (_jsxs(_Fragment, { children: [_jsx(KitFirstNodeSkeletonInput, { active: true }), _jsx(KitLeafSkeletonInput, { active: true }), _jsx(KitLeafSkeletonInput, { active: true }), _jsx(KitLeafSkeletonInput, { active: true }), _jsx(KitSecondeNodeSkeletonInput, { active: true }), _jsx(KitLeafSkeletonInput, { active: true }), _jsx(KitLeafSkeletonInput, { active: true }), _jsx(KitLeafSkeletonInput, { active: true })] }));
|
|
17
|
+
//# sourceMappingURL=SelectTreeNodeContentSkeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectTreeNodeContentSkeleton.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/SelectTreeNodeContentSkeleton.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AACvC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,yBAAyB,GAAG,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAA;;CAErE,CAAC;AAEF,MAAM,2BAA2B,GAAG,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAA;;;CAGvE,CAAC;AAEF,MAAM,oBAAoB,GAAG,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAA;;;;CAIhE,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAsB,GAAG,EAAE,CAAC,CAClE,8BACI,KAAC,yBAAyB,IAAC,MAAM,SAAG,EACpC,KAAC,oBAAoB,IAAC,MAAM,SAAG,EAC/B,KAAC,oBAAoB,IAAC,MAAM,SAAG,EAC/B,KAAC,oBAAoB,IAAC,MAAM,SAAG,EAC/B,KAAC,2BAA2B,IAAC,MAAM,SAAG,EACtC,KAAC,oBAAoB,IAAC,MAAM,SAAG,EAC/B,KAAC,oBAAoB,IAAC,MAAM,SAAG,EAC/B,KAAC,oBAAoB,IAAC,MAAM,SAAG,IAChC,CACN,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
interface ITreeNodeTitleProps {
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
checkable?: boolean;
|
|
5
|
+
isSelected?: boolean;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const TreeNodeTitle: FunctionComponent<ITreeNodeTitleProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { KitTypography } from 'aristid-ds';
|
|
6
|
+
import { FaCheck } from 'react-icons/fa';
|
|
7
|
+
export const TreeNodeTitle = ({ title, checkable, isSelected, isDisabled }) => checkable ? (_jsx(_Fragment, { children: title })) : (_jsxs("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'space-between' }, children: [_jsx(KitTypography.Text, { size: "fontSize5", disabled: isDisabled, children: title }), isSelected && (_jsx(FaCheck, { color: isDisabled ? 'var(--general-utilities-text-disabled)' : 'var(--general-utilities-text-blue)' }))] }));
|
|
8
|
+
//# sourceMappingURL=TreeNodeTitle.js.map
|
|
@@ -0,0 +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;AAEzC,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AASvC,MAAM,CAAC,MAAM,aAAa,GAA2C,CAAC,EAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAC,EAAE,EAAE,CAChH,SAAS,CAAC,CAAC,CAAC,CACR,4BAAG,KAAK,GAAI,CACf,CAAC,CAAC,CAAC,CACA,eAAK,KAAK,EAAE,EAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAC,aAChF,KAAC,aAAa,CAAC,IAAI,IAAC,IAAI,EAAC,WAAW,EAAC,QAAQ,EAAE,UAAU,YACpD,KAAK,GACW,EACpB,UAAU,IAAI,CACX,KAAC,OAAO,IACJ,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,wCAAwC,CAAC,CAAC,CAAC,oCAAoC,GACrG,CACL,IACC,CACT,CAAC"}
|
|
@@ -27,6 +27,6 @@ export const SelectTreeNodeModal = ({ treeId, selectedNodeKey, onSubmit, isVisib
|
|
|
27
27
|
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: [
|
|
28
28
|
_jsx(KitButton, { onClick: _handleCancel, children: t('global.cancel') }, "cancel"),
|
|
29
29
|
_jsx(KitButton, { type: "primary", onClick: _handleApply, children: t('global.apply') }, "add")
|
|
30
|
-
], destroyOnClose: true, children: _jsx(SelectTreeNode, { treeId: treeId, onSelect: _onSelect,
|
|
30
|
+
], destroyOnClose: true, children: _jsx(SelectTreeNode, { treeId: treeId, onSelect: _onSelect, selectedNodes: [selectedNode?.key], canSelectRoot: canSelectRoot }) }));
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=SelectTreeNodeModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectTreeNodeModal.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNodeModal/SelectTreeNodeModal.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoB,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClD,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,MAAM,CAAC,MAAM,mBAAmB,GAAiD,CAAC,EAC9E,MAAM,EACN,eAAe,EACf,QAAQ,EACR,SAAS,EACT,OAAO,EACP,aAAa,GAAG,KAAK,EACxB,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAY;QACxD,EAAE,EAAE,eAAe;QACnB,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,EAAE;KACf,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG,GAAG,EAAE;QACvB,OAAO,EAAE,CAAC;IACd,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,GAAG,EAAE;QACtB,QAAQ,CAAC,YAAY,CAAC,CAAC;QACvB,OAAO,EAAE,CAAC;IACd,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,CAAC,IAAyB,EAAE,QAAiB,EAAE,EAAE;QAC/D,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC,CAAC;IAEF,OAAO,CACH,KAAC,QAAQ,IACL,MAAM,EAAE,SAAS,EACjB,aAAa,QACb,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,CAAC,CAAC,2BAA2B,CAAC,EACrC,KAAK,EAAC,OAAO,EACb,MAAM,EAAE,EAAC,IAAI,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,
|
|
1
|
+
{"version":3,"file":"SelectTreeNodeModal.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNodeModal/SelectTreeNodeModal.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoB,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClD,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,MAAM,CAAC,MAAM,mBAAmB,GAAiD,CAAC,EAC9E,MAAM,EACN,eAAe,EACf,QAAQ,EACR,SAAS,EACT,OAAO,EACP,aAAa,GAAG,KAAK,EACxB,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAY;QACxD,EAAE,EAAE,eAAe;QACnB,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,EAA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rorBoundary extends Component<ISimpleErrorBoundaryProps, ISimpleErrorBoundaryState> {
|
|
10
|
-
|
|
10
|
+
constructor(props: any);
|
|
11
11
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
12
12
|
render(): ReactNode;
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleErrorBoundary.js","sourceRoot":"","sources":["../../../src/components/SimpleErrorBoundary/SimpleErrorBoundary.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAuB,MAAM,OAAO,CAAC;AACtD,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AAWtE,MAAM,OAAO,mBAAoB,SAAQ,SAA+D;IACpG,
|
|
1
|
+
{"version":3,"file":"SimpleErrorBoundary.js","sourceRoot":"","sources":["../../../src/components/SimpleErrorBoundary/SimpleErrorBoundary.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAuB,MAAM,OAAO,CAAC;AACtD,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AAWtE,MAAM,OAAO,mBAAoB,SAAQ,SAA+D;IACpG,YAAmB,KAAK;QACpB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAC,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC;IAChD,CAAC;IAEM,iBAAiB,CAAC,KAAY,EAAE,SAAoB;QACvD,wEAAwE;QACxE,IAAI,CAAC,QAAQ,CAAC;YACV,KAAK;YACL,SAAS;SACZ,CAAC,CAAC;IACP,CAAC;IAEM,MAAM;QACT,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;YACvB,gBAAgB;YAChB,OAAO,KAAC,0BAA0B,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,GAAI,CAAC;QACpG,CAAC;QAED,iCAAiC;QACjC,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC/B,CAAC;CACJ"}
|