@leav/ui 0.4.0-80a4e22 → 0.4.0-8949ab51
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/README.md +1 -0
- 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 +1702 -298
- package/dist/_gqlTypes/index.js +483 -42
- 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 +13 -0
- package/dist/_queries/records/getRecordFormQuery.js.map +1 -1
- package/dist/_queries/trees/treeNodeChildrenQuery.js +12 -2
- package/dist/_queries/trees/treeNodeChildrenQuery.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/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 +32 -12
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +10 -6
- package/dist/components/Explorer/Explorer.js +39 -13
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerToolbar.d.ts +2 -1
- package/dist/components/Explorer/ExplorerToolbar.js +15 -5
- package/dist/components/Explorer/ExplorerToolbar.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/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.d.ts +1 -0
- package/dist/components/Explorer/_queries/useExplorerData.js +45 -30
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +81 -10
- package/dist/components/Explorer/_types.js +5 -0
- 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 +6 -4
- 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 +22 -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/useDeactivateMassAction.d.ts +2 -1
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js +12 -3
- package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js.map +1 -1
- 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 +6 -1
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +26 -21
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -1
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.d.ts +7 -1
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +7 -5
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js.map +1 -1
- package/dist/components/Explorer/link-item/LinkModal.d.ts +5 -0
- package/dist/components/Explorer/link-item/LinkModal.js +55 -5
- 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/list-saved-views/SavedViews.js +32 -42
- package/dist/components/Explorer/list-saved-views/SavedViews.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/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 +13 -3
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js +81 -12
- 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/open-view-settings/EditSettingsContext.d.ts +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +2 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +1 -1
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/LabelViewFormModal.js +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/LabelViewFormModal.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/save-view/useCreateNewView.js +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.d.ts +5 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.js +47 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.d.ts +5 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.js +48 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +5 -3
- 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 +11 -3
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +87 -14
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.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.d.ts +1 -1
- package/dist/components/Explorer/useLoadView.js +31 -35
- 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 +4 -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/FiltersDropdown/FiltersDropdown.js +1 -12
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +3 -3
- 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/RecordEdition/EditRecord/EditRecord.d.ts +4 -5
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +84 -239
- 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/StandardField/StandardFieldValue/ValuesList → 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 +25 -23
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +6 -11
- 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/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.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.js +40 -12
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.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 +76 -92
- 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/useExplorerLinkRecords.d.ts +22 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useExplorerLinkRecords.js +85 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useExplorerLinkRecords.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.d.ts +24 -0
- 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/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/StandardField/StandardField.js +47 -55
- 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/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.d.ts +3 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +64 -217
- 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 +11 -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/TreeNodeList.d.ts +11 -0
- 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 +27 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js +43 -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 +25 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js +132 -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 +15 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.js +72 -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 +71 -53
- 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 +30 -10
- 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 +30 -7
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +66 -6
- 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 +3 -0
- package/dist/components/RecordEdition/index.js +3 -0
- package/dist/components/RecordEdition/index.js.map +1 -1
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.d.ts +6 -1
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js +12 -8
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +8 -2
- package/dist/components/SelectTreeNode/SelectTreeNode.js +4 -5
- package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +8 -2
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +73 -51
- 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/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/{SelectTreeNodeModal/SelectTreeNodeModal.d.ts → SelectTreeNodeModalOld/SelectTreeNodeModalOld.d.ts} +1 -1
- package/dist/components/{SelectTreeNodeModal/SelectTreeNodeModal.js → SelectTreeNodeModalOld/SelectTreeNodeModalOld.js} +5 -3
- package/dist/components/SelectTreeNodeModalOld/SelectTreeNodeModalOld.js.map +1 -0
- package/dist/components/SelectTreeNodeModalOld/index.d.ts +1 -0
- package/dist/components/{RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd → SelectTreeNodeModalOld}/index.js +1 -2
- package/dist/components/SelectTreeNodeModalOld/index.js.map +1 -0
- 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/components/ValuesVersionConfigurator/VersionTree/VersionTree.js +2 -2
- package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js.map +1 -1
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.js +1 -2
- package/dist/components/index.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 +3 -0
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useAppLang/useAppLang.js.map +1 -1
- package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -1
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js +3 -3
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/messageHandlers.d.ts +15 -0
- package/dist/hooks/useIFrameMessenger/messageHandlers.js +121 -0
- package/dist/hooks/useIFrameMessenger/messageHandlers.js.map +1 -0
- package/dist/hooks/useIFrameMessenger/schema.d.ts +21 -0
- package/dist/hooks/useIFrameMessenger/schema.js +76 -0
- package/dist/hooks/useIFrameMessenger/schema.js.map +1 -0
- package/dist/hooks/useIFrameMessenger/types.d.ts +120 -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 +19 -0
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js +108 -0
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js.map +1 -0
- package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.d.ts +7 -0
- package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.js +13 -0
- package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.js.map +1 -0
- package/dist/hooks/useIFrameMessengerClient/iFrameMessengerClientContext.d.ts +13 -0
- package/dist/{components/RecordEdition/EditRecord/creationErrorContext.js → hooks/useIFrameMessengerClient/iFrameMessengerClientContext.js} +2 -3
- package/dist/hooks/useIFrameMessengerClient/iFrameMessengerClientContext.js.map +1 -0
- package/dist/hooks/useIFrameMessengerClient/useIFrameMessengerClient.d.ts +13 -0
- package/dist/hooks/useIFrameMessengerClient/useIFrameMessengerClient.js +13 -0
- package/dist/hooks/useIFrameMessengerClient/useIFrameMessengerClient.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 +34 -13
- package/dist/locales/fr/shared.json +33 -12
- package/dist/types/attributes.d.ts +2 -1
- package/dist/types/trees.d.ts +1 -0
- package/package.json +24 -9
- 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/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/RecordEdition/EditRecord/creationErrorContext.d.ts +0 -6
- 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/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/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.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 +0 -6
- 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/SelectTreeNodeModal/SelectTreeNodeModal.js.map +0 -1
- package/dist/components/SelectTreeNodeModal/index.d.ts +0 -1
- package/dist/components/SelectTreeNodeModal/index.js +0 -5
- package/dist/components/SelectTreeNodeModal/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,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { KitButton, KitSpace } from 'aristid-ds';
|
|
6
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
7
|
+
import { faRotateRight, faLayerGroup } from '@fortawesome/free-solid-svg-icons';
|
|
8
|
+
import { createPortal } from 'react-dom';
|
|
9
|
+
import { useEffect, useState } from 'react';
|
|
10
|
+
import { EDIT_RECORD_MODAL_HEADER_CONTAINER_BUTTONS } from '../constants';
|
|
11
|
+
import { ToggleSidebarButton } from './SidebarButton';
|
|
12
|
+
import { EditRecordReducerActionsTypes, EditRecordSidebarContentTypeMap } from '../editRecordReducer/editRecordReducer';
|
|
13
|
+
import { useEditRecordReducer } from '../editRecordReducer/useEditRecordReducer';
|
|
14
|
+
const EditRecordButtons = () => {
|
|
15
|
+
const [buttonsContainer, setButtonsContainer] = useState();
|
|
16
|
+
const { state, dispatch } = useEditRecordReducer();
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
const element = document.getElementById(EDIT_RECORD_MODAL_HEADER_CONTAINER_BUTTONS);
|
|
19
|
+
if (element) {
|
|
20
|
+
setButtonsContainer(element);
|
|
21
|
+
}
|
|
22
|
+
}, []);
|
|
23
|
+
if (!buttonsContainer) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
const handleRefreshClick = () => {
|
|
27
|
+
dispatch({
|
|
28
|
+
type: EditRecordReducerActionsTypes.REQUEST_REFRESH
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
const handleValuesVersionClick = () => {
|
|
32
|
+
dispatch({
|
|
33
|
+
type: EditRecordReducerActionsTypes.SET_SIDEBAR_CONTENT,
|
|
34
|
+
content: state.sidebarContent === EditRecordSidebarContentTypeMap.VALUES_VERSIONS
|
|
35
|
+
? EditRecordSidebarContentTypeMap.SUMMARY
|
|
36
|
+
: EditRecordSidebarContentTypeMap.VALUES_VERSIONS
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
const buttons = (_jsxs(KitSpace, { size: "xxs", children: [_jsx(KitButton, { type: "tertiary", icon: _jsx(FontAwesomeIcon, { icon: faLayerGroup }), onClick: handleValuesVersionClick }), _jsx(KitButton, { type: "tertiary", icon: _jsx(FontAwesomeIcon, { icon: faRotateRight }), onClick: handleRefreshClick }), _jsx(ToggleSidebarButton, {})] }));
|
|
40
|
+
return createPortal(buttons, buttonsContainer);
|
|
41
|
+
};
|
|
42
|
+
export default EditRecordButtons;
|
|
43
|
+
//# sourceMappingURL=EditRecordButtons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditRecordButtons.js","sourceRoot":"","sources":["../../../../src/components/RecordEdition/EditRecordButtons/EditRecordButtons.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,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;gBACzC,CAAC,CAAC,+BAA+B,CAAC,eAAe;SAC5D,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,MAAM,OAAO,GAAG,CACZ,MAAC,QAAQ,IAAC,IAAI,EAAC,KAAK,aAChB,KAAC,SAAS,IACN,IAAI,EAAC,UAAU,EACf,IAAI,EAAE,KAAC,eAAe,IAAC,IAAI,EAAE,YAAY,GAAI,EAC7C,OAAO,EAAE,wBAAwB,GACnC,EACF,KAAC,SAAS,IAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAE,KAAC,eAAe,IAAC,IAAI,EAAE,aAAa,GAAI,EAAE,OAAO,EAAE,kBAAkB,GAAI,EAC1G,KAAC,mBAAmB,KAAG,IAChB,CACd,CAAC;IAEF,OAAO,YAAY,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACnD,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { KitButton, KitTooltip } from 'aristid-ds';
|
|
3
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
4
|
+
import { faAngleLeft, faAngleRight } from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
import { useEditRecordReducer } from '../editRecordReducer/useEditRecordReducer';
|
|
6
|
+
import { EditRecordReducerActionsTypes } from '../editRecordReducer/editRecordReducer';
|
|
7
|
+
import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
|
|
8
|
+
import { EDIT_RECORD_SIDEBAR_TOGGLE_BUTON_ID } from '../constants';
|
|
9
|
+
export const ToggleSidebarButton = () => {
|
|
10
|
+
const { t } = useSharedTranslation();
|
|
11
|
+
const { state, dispatch } = useEditRecordReducer();
|
|
12
|
+
const isOpen = state.isOpenSidebar ?? false;
|
|
13
|
+
const toggleSidebar = () => {
|
|
14
|
+
dispatch({
|
|
15
|
+
type: EditRecordReducerActionsTypes.SET_SIDEBAR_IS_OPEN,
|
|
16
|
+
isOpen: !isOpen
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const buttonLabel = isOpen ? t('record_edition.close_sidebar') : t('record_edition.open_sidebar');
|
|
20
|
+
if (!state.enableSidebar) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return (_jsx(KitTooltip, { title: buttonLabel, mouseEnterDelay: 1, children: _jsx(KitButton, { id: EDIT_RECORD_SIDEBAR_TOGGLE_BUTON_ID, type: "tertiary", icon: _jsx(FontAwesomeIcon, { icon: isOpen ? faAngleRight : faAngleLeft }), onClick: toggleSidebar, "aria-label": buttonLabel }) }));
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=SidebarButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarButton.js","sourceRoot":"","sources":["../../../../src/components/RecordEdition/EditRecordButtons/SidebarButton.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,YAAY,CAAC;AACjD,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,WAAW,EAAE,YAAY,EAAC,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAC,oBAAoB,EAAC,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAC,6BAA6B,EAAC,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,mCAAmC,EAAC,MAAM,cAAc,CAAC;AAEjE,MAAM,CAAC,MAAM,mBAAmB,GAAsB,GAAG,EAAE;IACvD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,KAAK,EAAE,QAAQ,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACjD,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC;IAE5C,MAAM,aAAa,GAAG,GAAG,EAAE;QACvB,QAAQ,CAAC;YACL,IAAI,EAAE,6BAA6B,CAAC,mBAAmB;YACvD,MAAM,EAAE,CAAC,MAAM;SAClB,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC;IAElG,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,KAAC,UAAU,IAAC,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC,YAC9C,KAAC,SAAS,IACN,EAAE,EAAE,mCAAmC,EACvC,IAAI,EAAC,UAAU,EACf,IAAI,EAAE,KAAC,eAAe,IAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,GAAI,EACpE,OAAO,EAAE,aAAa,gBACV,WAAW,GACzB,GACO,CAChB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
2
2
|
// This file is released under LGPL V3
|
|
3
3
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
|
-
import
|
|
5
|
-
export default
|
|
4
|
+
import EditRecordButtons from './EditRecordButtons';
|
|
5
|
+
export default EditRecordButtons;
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/RecordEdition/EditRecordButtons/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
+
import { FormInstance } from 'antd';
|
|
2
3
|
import { IRecordIdentityWhoAmI } from '../../../types/records';
|
|
3
4
|
import { RecordFormAttributeStandardAttributeFragment } from '../../../_gqlTypes';
|
|
4
5
|
import { DeleteMultipleValuesFunc, DeleteValueFunc, SubmitValueFunc } from './_types';
|
|
5
|
-
import { FormInstance } from 'antd';
|
|
6
6
|
interface IEditRecordContentProps {
|
|
7
7
|
antdForm: FormInstance;
|
|
8
8
|
formId?: string;
|
|
9
|
+
isFormCreationMode: boolean;
|
|
10
|
+
formElementId?: string;
|
|
9
11
|
record: IRecordIdentityWhoAmI | null;
|
|
10
12
|
library: string;
|
|
11
13
|
onRecordSubmit: (attributes: RecordFormAttributeStandardAttributeFragment[]) => void;
|
|
@@ -2,8 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
3
|
// This file is released under LGPL V3
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useEffect } from 'react';
|
|
6
|
+
import { FORM_ROOT_CONTAINER_ID, FormUIElementTypes } from '@leav/utils';
|
|
7
|
+
import { Form } from 'antd';
|
|
8
|
+
import styled from 'styled-components';
|
|
7
9
|
import { ErrorDisplay } from '../../../components';
|
|
8
10
|
import useGetRecordForm from '../../../hooks/useGetRecordForm';
|
|
9
11
|
import { useGetRecordUpdatesSubscription } from '../../../hooks/useGetRecordUpdatesSubscription';
|
|
@@ -15,20 +17,14 @@ import { useEditRecordReducer } from '../editRecordReducer/useEditRecordReducer'
|
|
|
15
17
|
import extractFormElements from './helpers/extractFormElements';
|
|
16
18
|
import { RecordEditionContext } from './hooks/useRecordEditionContext';
|
|
17
19
|
import { formComponents } from './uiElements';
|
|
18
|
-
import { Form } from 'antd';
|
|
19
20
|
import { EDIT_OR_CREATE_RECORD_FORM_ID } from './formConstants';
|
|
20
21
|
import { getAntdFormInitialValues } from '../../../components/RecordEdition/EditRecordContent/antdUtils';
|
|
21
22
|
import { useGetRecordValuesQuery } from '../../../hooks/useGetRecordValuesQuery/useGetRecordValuesQuery';
|
|
22
23
|
import EditRecordSkeleton from '../EditRecordSkeleton';
|
|
23
|
-
import styled from 'styled-components';
|
|
24
24
|
const WrappedForm = styled(Form) `
|
|
25
25
|
height: 100%;
|
|
26
26
|
`;
|
|
27
|
-
const EditRecordContent = ({ antdForm, formId, record, library, onRecordSubmit, onValueSubmit, onValueDelete, onDeleteMultipleValues, readonly }) => {
|
|
28
|
-
let formIdToLoad = formId;
|
|
29
|
-
if (!formId) {
|
|
30
|
-
formIdToLoad = record ? 'edition' : 'creation';
|
|
31
|
-
}
|
|
27
|
+
const EditRecordContent = ({ antdForm, formId, isFormCreationMode, formElementId, record, library, onRecordSubmit, onValueSubmit, onValueDelete, onDeleteMultipleValues, readonly }) => {
|
|
32
28
|
const { t } = useSharedTranslation();
|
|
33
29
|
const { state, dispatch } = useEditRecordReducer();
|
|
34
30
|
useRecordsConsultationHistory(record?.library?.id ?? null, record?.id ?? null);
|
|
@@ -45,18 +41,26 @@ const EditRecordContent = ({ antdForm, formId, record, library, onRecordSubmit,
|
|
|
45
41
|
const { loading, error, recordForm, refetch } = useGetRecordForm({
|
|
46
42
|
libraryId: library,
|
|
47
43
|
recordId: record?.id,
|
|
48
|
-
formId
|
|
44
|
+
formId,
|
|
49
45
|
version: state.valuesVersion
|
|
50
46
|
});
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (!loading && recordForm) {
|
|
49
|
+
dispatch({
|
|
50
|
+
type: EditRecordReducerActionsTypes.INITIALIZE_SIDEBAR,
|
|
51
|
+
enabled: recordForm.sidePanel.enable,
|
|
52
|
+
isOpenByDefault: recordForm.sidePanel.isOpenByDefault
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}, [recordForm, loading]);
|
|
51
56
|
const { data: computeFieldsData, error: computeFieldsError, refetch: refetchComputeFields } = useGetRecordValuesQuery(library, recordForm
|
|
52
57
|
? recordForm.elements.filter(element => element.attribute?.compute).map(element => element.attribute.id)
|
|
53
58
|
: [], [record?.id], true);
|
|
54
|
-
// Generate a hash of recordForm to detect changes
|
|
55
|
-
const recordFormHash = useMemo(() => simpleStringHash(JSON.stringify(recordForm)), [recordForm]);
|
|
56
59
|
useEffect(() => {
|
|
57
60
|
if (state.refreshRequested) {
|
|
58
|
-
refetch()
|
|
59
|
-
|
|
61
|
+
refetch().then(() => {
|
|
62
|
+
dispatch({ type: EditRecordReducerActionsTypes.REFRESH_DONE });
|
|
63
|
+
});
|
|
60
64
|
}
|
|
61
65
|
}, [state.refreshRequested]);
|
|
62
66
|
if (loading && !recordForm) {
|
|
@@ -66,8 +70,11 @@ const EditRecordContent = ({ antdForm, formId, record, library, onRecordSubmit,
|
|
|
66
70
|
const message = Object.values(error.graphQLErrors[0]?.extensions?.exception?.fields ?? {}).join('\n') ?? error?.message;
|
|
67
71
|
return _jsx(ErrorDisplay, { message: message ?? t('record_edition.no_form_error') });
|
|
68
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* If a dependency attribute has changed, we need to refresh the form.
|
|
75
|
+
* @param changedAttribute - string
|
|
76
|
+
*/
|
|
69
77
|
const _checkDependencyChange = (changedAttribute) => {
|
|
70
|
-
// If a dependency attribute has changed, we need to refresh the form
|
|
71
78
|
if (recordForm.dependencyAttributes.map(depAttribute => depAttribute.id).includes(changedAttribute)) {
|
|
72
79
|
dispatch({ type: EditRecordReducerActionsTypes.REQUEST_REFRESH });
|
|
73
80
|
}
|
|
@@ -75,10 +82,7 @@ const EditRecordContent = ({ antdForm, formId, record, library, onRecordSubmit,
|
|
|
75
82
|
const _handleValueSubmit = async (element, value) => {
|
|
76
83
|
const submitRes = await onValueSubmit(element, value);
|
|
77
84
|
_checkDependencyChange(element[0].attribute.id);
|
|
78
|
-
|
|
79
|
-
if (isEditing) {
|
|
80
|
-
refetchComputeFields([record.id]);
|
|
81
|
-
}
|
|
85
|
+
await refetchComputeFields([record.id]);
|
|
82
86
|
return submitRes;
|
|
83
87
|
};
|
|
84
88
|
const _handleValueDelete = async (value, attribute) => {
|
|
@@ -100,13 +104,11 @@ const EditRecordContent = ({ antdForm, formId, record, library, onRecordSubmit,
|
|
|
100
104
|
const antdFormInitialValues = getAntdFormInitialValues(recordForm);
|
|
101
105
|
const recordComputedValues = computeFieldsData && record ? computeFieldsData[record.id] : null;
|
|
102
106
|
const elementsByContainer = extractFormElements(recordForm, recordComputedValues, computeFieldsError);
|
|
103
|
-
return (_jsx(WrappedForm, { id: EDIT_OR_CREATE_RECORD_FORM_ID, form: antdForm, initialValues: antdFormInitialValues, onFinish: () => onRecordSubmit(recordForm.elements.map(element => element.attribute)), children: _jsx(RecordEditionContext.Provider, { value: {
|
|
107
|
+
return (_jsx(WrappedForm, { id: formElementId ?? EDIT_OR_CREATE_RECORD_FORM_ID, form: antdForm, initialValues: antdFormInitialValues, onFinish: () => onRecordSubmit(recordForm.elements.filter(element => element.attribute?.id).map(element => element.attribute)), children: _jsx(RecordEditionContext.Provider, { value: {
|
|
104
108
|
elements: elementsByContainer,
|
|
105
109
|
readOnly: readonly,
|
|
106
110
|
record
|
|
107
|
-
}, children: _jsx(rootElement.uiElement
|
|
108
|
-
// Use a hash of record form as a key to force a full re-render when the form changes
|
|
109
|
-
, { antdForm: antdForm, element: rootElement, computedValues: recordComputedValues, readonly: readonly, onValueSubmit: _handleValueSubmit, onValueDelete: _handleValueDelete, onDeleteMultipleValues: onDeleteMultipleValues }, recordFormHash) }) }));
|
|
111
|
+
}, children: _jsx(rootElement.uiElement, { isFormCreationMode: isFormCreationMode, antdForm: antdForm, element: rootElement, computedValues: recordComputedValues, readonly: readonly, onValueSubmit: _handleValueSubmit, onValueDelete: _handleValueDelete, onDeleteMultipleValues: onDeleteMultipleValues }) }) }));
|
|
110
112
|
};
|
|
111
113
|
export default EditRecordContent;
|
|
112
114
|
//# sourceMappingURL=EditRecordContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditRecordContent.js","sourceRoot":"","sources":["../../../../src/components/RecordEdition/EditRecordContent/EditRecordContent.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,sBAAsB,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"EditRecordContent.js","sourceRoot":"","sources":["../../../../src/components/RecordEdition/EditRecordContent/EditRecordContent.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAiC,SAAS,EAAU,MAAM,OAAO,CAAC;AACzE,OAAO,EAAC,sBAAsB,EAAE,kBAAkB,EAAmB,MAAM,aAAa,CAAC;AACzF,OAAO,EAAC,IAAI,EAAe,MAAM,MAAM,CAAC;AACxC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAC,+BAA+B,EAAC,MAAM,2CAA2C,CAAC;AAC1F,OAAO,6BAA6B,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,gBAAgB,EAA+C,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAC,6BAA6B,EAAC,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAC,oBAAoB,EAAC,MAAM,2CAA2C,CAAC;AAC/E,OAAO,mBAAmB,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAC,6BAA6B,EAAC,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAA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Ac,EAAE,oBAAoB,EACpC,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,kBAAkB,EACjC,aAAa,EAAE,kBAAkB,EACjC,sBAAsB,EAAE,sBAAsB,GAChD,GAC0B,GACtB,CACjB,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
1
2
|
import { AnyPrimitive, FormFieldTypes, FormUIElementTypes, IRequiredFieldsSettings, IKeyValue, Override } from '@leav/utils';
|
|
2
3
|
import { RecordFormElementsValue } from '../../../hooks/useGetRecordForm';
|
|
3
4
|
import { IRecordIdentity, IRecordIdentityWhoAmI } from '../../../types/records';
|
|
4
5
|
import { ITreeNodeWithRecord } from '../../../types/trees';
|
|
5
6
|
import { IValueVersion } from '../../../types/values';
|
|
6
|
-
import { RecordFormAttributeFragment, SaveValueBatchMutation, CreateRecordMutation,
|
|
7
|
+
import { RecordFormAttributeFragment, SaveValueBatchMutation, CreateRecordMutation, RecordFormElementFragment, RecordIdentityFragment, ValueDetailsFragment, ValueInput } from '../../../_gqlTypes';
|
|
7
8
|
import { RecordProperty } from '../../../_queries/records/getRecordPropertiesQuery';
|
|
8
|
-
import { RecordFormElementFragment } from '../../../_gqlTypes';
|
|
9
9
|
import { FormInstance } from 'antd/lib/form/Form';
|
|
10
10
|
import { GetRecordColumnsValuesRecord } from '../../../_queries/records/getRecordColumnsValues';
|
|
11
11
|
export interface IValueToSubmit {
|
|
@@ -55,7 +55,7 @@ export interface ISubmittedValueTree extends ISubmittedValueBase {
|
|
|
55
55
|
export type SubmittedValue = ISubmittedValueStandard | ISubmittedValueLink | ISubmittedValueTree;
|
|
56
56
|
export type SubmitValueFunc = (values: SubmittedValue[], version: IValueVersion) => Promise<ISubmitMultipleResult>;
|
|
57
57
|
export type DeleteValueFunc = (value: ValueInput | null, attribute: string) => Promise<IDeleteValueResult>;
|
|
58
|
-
export type
|
|
58
|
+
export type CreateEmptyRecordFunc = (library: string) => Promise<ICreateRecordResult>;
|
|
59
59
|
export type DeleteMultipleValuesFunc = (attribute: string, values: RecordProperty[], version: IValueVersion) => Promise<ISubmitMultipleResult>;
|
|
60
60
|
export type MetadataSubmitValueFunc = (value: RecordProperty, attribute: RecordFormAttributeFragment, metadata: IKeyValue<AnyPrimitive>) => Promise<ISubmitMultipleResult>;
|
|
61
61
|
export interface ISubmittedValueBase {
|
|
@@ -70,23 +70,18 @@ export interface IFormElementProps<SettingsType, RecordFormElements = RecordForm
|
|
|
70
70
|
onValueDelete?: DeleteValueFunc;
|
|
71
71
|
onDeleteMultipleValues?: DeleteMultipleValuesFunc;
|
|
72
72
|
metadataEdit?: boolean;
|
|
73
|
+
isFormCreationMode?: boolean;
|
|
73
74
|
}
|
|
74
75
|
export type FormElement<SettingsType, RecordFormElements = RecordFormElementsValue> = Override<RecordFormElementFragment, {
|
|
75
76
|
settings: SettingsType;
|
|
76
77
|
uiElementType: FormUIElementTypes | FormFieldTypes;
|
|
77
78
|
values: RecordFormElements[];
|
|
78
79
|
}> & {
|
|
79
|
-
uiElement:
|
|
80
|
+
uiElement: FunctionComponent<IFormElementProps<unknown> & {
|
|
80
81
|
antdForm?: FormInstance;
|
|
81
82
|
computedValues?: GetRecordColumnsValuesRecord;
|
|
82
|
-
}) => JSX.Element;
|
|
83
|
-
};
|
|
84
|
-
export interface IDependencyValues {
|
|
85
|
-
[attributeId: string]: Array<{
|
|
86
|
-
id: string;
|
|
87
|
-
library: string;
|
|
88
83
|
}>;
|
|
89
|
-
}
|
|
84
|
+
};
|
|
90
85
|
export type StandardValueTypes = AnyPrimitive;
|
|
91
86
|
export declare enum VersionFieldScope {
|
|
92
87
|
INHERITED = "INHERITED",// inherited values
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../../src/components/RecordEdition/EditRecordContent/_types.ts"],"names":[],"mappings":"AAoCA,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,oCAAmB,CAAA;IACnB,gCAAe,CAAA;IACf,oCAAmB,CAAA;AACvB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;
|
|
1
|
+
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../../src/components/RecordEdition/EditRecordContent/_types.ts"],"names":[],"mappings":"AAoCA,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,oCAAmB,CAAA;IACnB,gCAAe,CAAA;IACf,oCAAmB,CAAA;AACvB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAoGD,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IACzB,4CAAuB,CAAA;IACvB,wCAAmB,CAAA,CAAC,oEAAoE;AAC5F,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B"}
|
|
@@ -2,4 +2,5 @@
|
|
|
2
2
|
// This file is released under LGPL V3
|
|
3
3
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
4
|
export const EDIT_OR_CREATE_RECORD_FORM_ID = 'EDIT_OR_CREATE_RECORD_FORM_ID';
|
|
5
|
+
export const INPUT_MAX_HEIGHT = '322px';
|
|
5
6
|
//# sourceMappingURL=formConstants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formConstants.js","sourceRoot":"","sources":["../../../../src/components/RecordEdition/EditRecordContent/formConstants.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,MAAM,CAAC,MAAM,6BAA6B,GAAG,+BAA+B,CAAC"}
|
|
1
|
+
{"version":3,"file":"formConstants.js","sourceRoot":"","sources":["../../../../src/components/RecordEdition/EditRecordContent/formConstants.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,MAAM,CAAC,MAAM,6BAA6B,GAAG,+BAA+B,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
import { useCreateEmptyRecordMutation } from '../../../../_gqlTypes';
|
|
5
|
+
import { APICallStatus } from '../_types';
|
|
6
|
+
export default function useExecuteCreateEmptyRecordMutation() {
|
|
7
|
+
const [executeCreateEmptyRecord] = useCreateEmptyRecordMutation();
|
|
8
|
+
return {
|
|
9
|
+
createEmptyRecord: async (libraryId) => {
|
|
10
|
+
const creationResult = await executeCreateEmptyRecord({
|
|
11
|
+
variables: { library: libraryId }
|
|
12
|
+
});
|
|
13
|
+
if (creationResult.data.createEmptyRecord.valuesErrors?.length > 0) {
|
|
14
|
+
return {
|
|
15
|
+
status: APICallStatus.ERROR,
|
|
16
|
+
errors: creationResult.data.createEmptyRecord.valuesErrors
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return {
|
|
21
|
+
status: APICallStatus.SUCCESS,
|
|
22
|
+
record: creationResult.data.createEmptyRecord.record.whoAmI
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=useCreateEmptyRecordMutation.js.map
|
package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCreateEmptyRecordMutation.js","sourceRoot":"","sources":["../../../../../src/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,aAAa,EAAwB,MAAM,WAAW,CAAC;AAM/D,MAAM,CAAC,OAAO,UAAU,mCAAmC;IACvD,MAAM,CAAC,wBAAwB,CAAC,GAAG,4BAA4B,EAAE,CAAC;IAElE,OAAO;QACH,iBAAiB,EAAE,KAAK,EAAC,SAAS,EAAC,EAAE;YACjC,MAAM,cAAc,GAAG,MAAM,wBAAwB,CAAC;gBAClD,SAAS,EAAE,EAAC,OAAO,EAAE,SAAS,EAAC;aAClC,CAAC,CAAC;YACH,IAAI,cAAc,CAAC,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC;gBACjE,OAAO;oBACH,MAAM,EAAE,aAAa,CAAC,KAAK;oBAC3B,MAAM,EAAE,cAAc,CAAC,IAAI,CAAC,iBAAiB,CAAC,YAAY;iBAC7D,CAAC;YACN,CAAC;iBAAM,CAAC;gBACJ,OAAO;oBACH,MAAM,EAAE,aAAa,CAAC,OAAO;oBAC7B,MAAM,EAAE,cAAc,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM;iBAC9D,CAAC;YACN,CAAC;QACL,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RecordFormElement } from '../../../../hooks/useGetRecordForm';
|
|
2
|
+
/**
|
|
3
|
+
* Hook to manage tab visibility and tab click events in the EditRecordContent component
|
|
4
|
+
* @returns Object containing the visible tab ID and a handler for tab click events
|
|
5
|
+
* @param elements
|
|
6
|
+
*/
|
|
7
|
+
export declare const useTabManagement: (elements: RecordFormElement[]) => {
|
|
8
|
+
tabIdVisible: string;
|
|
9
|
+
handleTabClick: (tabIdClicked: string) => void;
|
|
10
|
+
};
|
|
11
|
+
export default useTabManagement;
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
import { useState, useEffect } from 'react';
|
|
5
|
+
/**
|
|
6
|
+
* Hook to manage tab visibility and tab click events in the EditRecordContent component
|
|
7
|
+
* @returns Object containing the visible tab ID and a handler for tab click events
|
|
8
|
+
* @param elements
|
|
9
|
+
*/
|
|
10
|
+
export const useTabManagement = (elements) => {
|
|
11
|
+
// State to track the currently visible tab ID
|
|
12
|
+
const [tabIdVisible, setTabIdVisible] = useState(undefined);
|
|
13
|
+
// Initialize the visible tab ID when the record form is loaded
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
// When we load the record form, get the ID of the first tab
|
|
16
|
+
const firstTabId = elements?.find(e => e.uiElementType === 'tabs')?.settings?.find(s => s.key === 'tabs')
|
|
17
|
+
?.value[0]?.id;
|
|
18
|
+
if (firstTabId) {
|
|
19
|
+
setTabIdVisible(firstTabId);
|
|
20
|
+
}
|
|
21
|
+
}, [elements]);
|
|
22
|
+
/**
|
|
23
|
+
* Handler for tab click events
|
|
24
|
+
* @param tabIdClicked The ID of the tab that was clicked
|
|
25
|
+
*/
|
|
26
|
+
const handleTabClick = (tabIdClicked) => {
|
|
27
|
+
setTabIdVisible(tabIdClicked);
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
tabIdVisible,
|
|
31
|
+
handleTabClick
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export default useTabManagement;
|
|
35
|
+
//# sourceMappingURL=useTabManagement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTabManagement.js","sourceRoot":"","sources":["../../../../../src/components/RecordEdition/EditRecordContent/hooks/useTabManagement.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAG1C;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAA6B,EAAE,EAAE;IAC9D,8CAA8C;IAC9C,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAqB,SAAS,CAAC,CAAC;IAEhF,+DAA+D;IAC/D,SAAS,CAAC,GAAG,EAAE;QACX,4DAA4D;QAC5D,MAAM,UAAU,GAAG,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,KAAK,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,MAAM,CAAC;YACrG,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAEnB,IAAI,UAAU,EAAE,CAAC;YACb,eAAe,CAAC,UAAU,CAAC,CAAC;QAChC,CAAC;IACL,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf;;;OAGG;IACH,MAAM,cAAc,GAAG,CAAC,YAAoB,EAAE,EAAE;QAC5C,eAAe,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC,CAAC;IAEF,OAAO;QACH,YAAY;QACZ,cAAc;KACjB,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormInstance } from 'antd';
|
|
2
2
|
import { IFormElementProps } from '../../_types';
|
|
3
3
|
import { GetRecordColumnsValuesRecord } from '../../../../../_queries/records/getRecordColumnsValues';
|
|
4
|
-
declare function Container({ element, computedValues, antdForm, readonly, onValueSubmit, onValueDelete, onDeleteMultipleValues }: IFormElementProps<{}> & {
|
|
4
|
+
declare function Container({ element, isFormCreationMode, computedValues, antdForm, readonly, onValueSubmit, onValueDelete, onDeleteMultipleValues }: IFormElementProps<{}> & {
|
|
5
5
|
antdForm?: FormInstance;
|
|
6
6
|
computedValues: GetRecordColumnsValuesRecord;
|
|
7
7
|
}): JSX.Element;
|
|
@@ -4,11 +4,11 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
5
|
import { Col, Row } from 'antd';
|
|
6
6
|
import { useRecordEditionContext } from '../../hooks/useRecordEditionContext';
|
|
7
|
-
function Container({ element, computedValues, antdForm, readonly, onValueSubmit, onValueDelete, onDeleteMultipleValues }) {
|
|
7
|
+
function Container({ element, isFormCreationMode, computedValues, antdForm, readonly, onValueSubmit, onValueDelete, onDeleteMultipleValues }) {
|
|
8
8
|
const { elements: formElements } = useRecordEditionContext();
|
|
9
9
|
const children = formElements[element.id] ?? [];
|
|
10
10
|
const isAlone = children.length < 2;
|
|
11
|
-
return (_jsx(_Fragment, { children: children.map(el => (_jsx(Row, { "data-testid": "container-child-element", style: isAlone && { height: '100%' }, children: _jsx(Col, { span: 24, children: el.uiElement && (_jsx(el.uiElement, { element: el, computedValues: computedValues, readonly: readonly, antdForm: antdForm, onValueSubmit: onValueSubmit, onValueDelete: onValueDelete, onDeleteMultipleValues: onDeleteMultipleValues })) }) }, el.id))) }));
|
|
11
|
+
return (_jsx(_Fragment, { children: children.map(el => (_jsx(Row, { "data-testid": "container-child-element", style: isAlone && { height: '100%' }, children: _jsx(Col, { span: 24, children: el.uiElement && (_jsx(el.uiElement, { element: el, computedValues: computedValues, readonly: readonly, antdForm: antdForm, onValueSubmit: onValueSubmit, onValueDelete: onValueDelete, onDeleteMultipleValues: onDeleteMultipleValues, isFormCreationMode: isFormCreationMode })) }) }, el.id))) }));
|
|
12
12
|
}
|
|
13
13
|
export default Container;
|
|
14
14
|
//# sourceMappingURL=Container.js.map
|
package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/Container/Container.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,GAAG,EAAgB,GAAG,EAAC,MAAM,MAAM,CAAC;AAC5C,OAAO,EAAC,uBAAuB,EAAC,MAAM,qCAAqC,CAAC;AAI5E,SAAS,SAAS,CAAC,EACf,OAAO,EACP,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,aAAa,EACb,sBAAsB,EACwE;IAC9F,MAAM,EAAC,QAAQ,EAAE,YAAY,EAAC,GAAG,uBAAuB,EAAE,CAAC;IAC3D,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/Container/Container.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,GAAG,EAAgB,GAAG,EAAC,MAAM,MAAM,CAAC;AAC5C,OAAO,EAAC,uBAAuB,EAAC,MAAM,qCAAqC,CAAC;AAI5E,SAAS,SAAS,CAAC,EACf,OAAO,EACP,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,aAAa,EACb,sBAAsB,EACwE;IAC9F,MAAM,EAAC,QAAQ,EAAE,YAAY,EAAC,GAAG,uBAAuB,EAAE,CAAC;IAC3D,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;IAChD,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IAEpC,OAAO,CACH,4BACK,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAChB,KAAC,GAAG,mBAAa,yBAAyB,EAAa,KAAK,EAAE,OAAO,IAAI,EAAC,MAAM,EAAE,MAAM,EAAC,YACrF,KAAC,GAAG,IAAC,IAAI,EAAE,EAAE,YACR,EAAE,CAAC,SAAS,IAAI,CACb,KAAC,EAAE,CAAC,SAAS,IACT,OAAO,EAAE,EAAE,EACX,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,sBAAsB,EAAE,sBAAsB,EAC9C,kBAAkB,EAAE,kBAAkB,GACxC,CACL,GACC,IAdsC,EAAE,CAAC,EAAE,CAe/C,CACT,CAAC,GACH,CACN,CAAC;AACN,CAAC;AAED,eAAe,SAAS,CAAC"}
|
package/dist/components/RecordEdition/EditRecordContent/uiElements/FormDivider/FormDivider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormDivider.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/FormDivider/FormDivider.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,OAAO,EAAC,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"FormDivider.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/FormDivider/FormDivider.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,OAAO,EAAC,MAAM,MAAM,CAAC;AAG7B,SAAS,WAAW,CAAC,EAAC,OAAO,EAA0C;IACnE,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,IAAI,IAAI,CAAC;IAC7C,OAAO,KAAC,OAAO,cAAE,KAAK,GAAW,CAAC;AACtC,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
1
2
|
import { IFormTabsSettings } from '@leav/utils';
|
|
2
3
|
import { IFormElementProps } from '../../_types';
|
|
3
|
-
declare
|
|
4
|
+
declare const FormTabs: FunctionComponent<IFormElementProps<IFormTabsSettings>>;
|
|
4
5
|
export default FormTabs;
|
|
@@ -1,7 +1,4 @@
|
|
|
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
2
|
import { FormUIElementTypes, localizedTranslation, TabsDirection } from '@leav/utils';
|
|
6
3
|
import { Tabs } from 'antd';
|
|
7
4
|
import styled from 'styled-components';
|
|
@@ -23,12 +20,12 @@ const StyledTabs = styled(Tabs) `
|
|
|
23
20
|
height: 100%;
|
|
24
21
|
}
|
|
25
22
|
`;
|
|
26
|
-
|
|
23
|
+
const FormTabs = ({ element, ...elementProps }) => {
|
|
27
24
|
const { lang } = useLang();
|
|
28
25
|
const tabPosition = element.settings.direction === TabsDirection.VERTICAL ? 'left' : 'top';
|
|
29
|
-
const tabItems = element.settings.tabs.map(
|
|
26
|
+
const tabItems = element.settings.tabs.map(({ id, label }) => {
|
|
30
27
|
const tabContainer = {
|
|
31
|
-
id: `${element.id}/${
|
|
28
|
+
id: `${element.id}/${id}`,
|
|
32
29
|
containerId: element.id,
|
|
33
30
|
settings: {},
|
|
34
31
|
attribute: null,
|
|
@@ -39,12 +36,12 @@ function FormTabs({ element, ...elementProps }) {
|
|
|
39
36
|
values: null
|
|
40
37
|
};
|
|
41
38
|
return {
|
|
42
|
-
label: localizedTranslation(
|
|
43
|
-
key:
|
|
39
|
+
label: localizedTranslation(label, lang),
|
|
40
|
+
key: id,
|
|
44
41
|
children: _jsx(tabContainer.uiElement, { ...elementProps, element: tabContainer })
|
|
45
42
|
};
|
|
46
43
|
});
|
|
47
44
|
return _jsx(StyledTabs, { tabPosition: tabPosition, "data-testid": "form-tabs", items: tabItems });
|
|
48
|
-
}
|
|
45
|
+
};
|
|
49
46
|
export default FormTabs;
|
|
50
47
|
//# sourceMappingURL=FormTabs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormTabs.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"FormTabs.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,kBAAkB,EAAqB,oBAAoB,EAAE,aAAa,EAAC,MAAM,aAAa,CAAC;AACvG,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AACxC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAC,cAAc,EAAC,MAAM,IAAI,CAAC;AAGlC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;;4BAGH,SAAS,CAAC,gBAAgB;;;;;;;;;;CAUrD,CAAC;AAEF,MAAM,QAAQ,GAA4D,CAAC,EAAC,OAAO,EAAE,GAAG,YAAY,EAAC,EAAE,EAAE;IACrG,MAAM,EAAC,IAAI,EAAC,GAAG,OAAO,EAAE,CAAC;IACzB,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,SAAS,KAAK,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;IAE3F,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAC,EAAE,EAAE,KAAK,EAAC,EAAE,EAAE;QACvD,MAAM,YAAY,GAAoB;YAClC,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE;YACzB,WAAW,EAAE,OAAO,CAAC,EAAE;YACvB,QAAQ,EAAE,EAAE;YACZ,SAAS,EAAE,IAAI;YACf,IAAI,EAAE,gBAAgB,CAAC,MAAM;YAC7B,SAAS,EAAE,cAAc,CAAC,kBAAkB,CAAC,gBAAgB,CAAC;YAC9D,aAAa,EAAE,kBAAkB,CAAC,gBAAgB;YAClD,UAAU,EAAE,IAAI;YAChB,MAAM,EAAE,IAAI;SACf,CAAC;QAEF,OAAO;YACH,KAAK,EAAE,oBAAoB,CAAC,KAAK,EAAE,IAAI,CAAC;YACxC,GAAG,EAAE,EAAE;YACP,QAAQ,EAAE,KAAC,YAAY,CAAC,SAAS,OAAK,YAAY,EAAE,OAAO,EAAE,YAAY,GAAI;SAChF,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,OAAO,KAAC,UAAU,IAAC,WAAW,EAAE,WAAW,iBAAc,WAAW,EAAC,KAAK,EAAE,QAAQ,GAAI,CAAC;AAC7F,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IFormFrameSettings } from '@leav/utils';
|
|
2
2
|
import { IFormElementProps } from '../../_types';
|
|
3
|
-
declare function Frame({ element }: IFormElementProps<IFormFrameSettings>): JSX.Element;
|
|
3
|
+
declare function Frame({ element, onValueSubmit }: IFormElementProps<IFormFrameSettings>): JSX.Element;
|
|
4
4
|
export default Frame;
|
|
@@ -1,25 +1,53 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect } from 'react';
|
|
2
|
+
import { useEffect, useRef, useState } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { useRecordEditionContext } from '../../hooks/useRecordEditionContext';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const Wrapper = styled.iframe `
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: ${props => props.height || '100%'};
|
|
8
|
+
min-height: ${props => props.height || '500px'};
|
|
9
|
+
border: none;
|
|
10
|
+
`;
|
|
11
|
+
function Frame({ element, onValueSubmit }) {
|
|
12
|
+
const { record } = useRecordEditionContext();
|
|
13
|
+
const iFrameRef = useRef(null);
|
|
14
|
+
const [iframeLoaded, setIframeLoaded] = useState(false);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
const iframe = iFrameRef.current;
|
|
17
|
+
if (iframe) {
|
|
18
|
+
const handleLoad = () => {
|
|
19
|
+
setIframeLoaded(true);
|
|
20
|
+
};
|
|
21
|
+
iframe.addEventListener('load', handleLoad);
|
|
22
|
+
return () => {
|
|
23
|
+
iframe.removeEventListener('load', handleLoad);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}, [iFrameRef]);
|
|
7
27
|
useEffect(() => {
|
|
8
28
|
const handler = event => {
|
|
9
|
-
|
|
10
|
-
|
|
29
|
+
switch (event.data.type) {
|
|
30
|
+
case 'submitValue':
|
|
31
|
+
onValueSubmit(event.data.values, event.data.version);
|
|
32
|
+
break;
|
|
33
|
+
default:
|
|
34
|
+
//console.log('unknown message type');
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
11
37
|
};
|
|
12
38
|
window.addEventListener('message', handler);
|
|
13
39
|
// clean up
|
|
14
40
|
return () => window.removeEventListener('message', handler);
|
|
15
41
|
}, []);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
const iframe = iFrameRef.current;
|
|
44
|
+
if (iframe && iframeLoaded) {
|
|
45
|
+
iframe.contentWindow?.postMessage({
|
|
46
|
+
currentRecord: record
|
|
47
|
+
}, element.settings.url);
|
|
48
|
+
}
|
|
49
|
+
}, [record, iframeLoaded]);
|
|
50
|
+
return _jsx(Wrapper, { ref: iFrameRef, height: element.settings.height, src: element.settings.url });
|
|
23
51
|
}
|
|
24
52
|
export default Frame;
|
|
25
53
|
//# sourceMappingURL=Frame.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Frame.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.tsx"],"names":[],"mappings":";AAKA,
|
|
1
|
+
{"version":3,"file":"Frame.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,uBAAuB,EAAC,MAAM,qCAAqC,CAAC;AAE5E,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAA;;cAEf,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,MAAM;kBAC3B,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,OAAO;;CAEjD,CAAC;AAEF,SAAS,KAAK,CAAC,EAAC,OAAO,EAAE,aAAa,EAAwC;IAC1E,MAAM,EAAC,MAAM,EAAC,GAAG,uBAAuB,EAAE,CAAC;IAC3C,MAAM,SAAS,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAClD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC;QACjC,IAAI,MAAM,EAAE,CAAC;YACT,MAAM,UAAU,GAAG,GAAG,EAAE;gBACpB,eAAe,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC,CAAC;YAEF,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;YAE5C,OAAO,GAAG,EAAE;gBACR,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;YACnD,CAAC,CAAC;QACN,CAAC;IACL,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAChB,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,OAAO,GAAG,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