@leav/ui 0.3.6-c939f2f → 0.3.6-cc1031e
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/attribute.d.ts +1 -0
- package/dist/__mocks__/common/attribute.js +9 -1
- package/dist/__mocks__/common/attribute.js.map +1 -1
- package/dist/__mocks__/common/form.d.ts +11 -5
- package/dist/__mocks__/common/form.js +18 -2
- package/dist/__mocks__/common/form.js.map +1 -1
- package/dist/__mocks__/common/record.d.ts +13 -2
- package/dist/__mocks__/common/record.js.map +1 -1
- package/dist/__mocks__/common/value.js +3 -1
- package/dist/__mocks__/common/value.js.map +1 -1
- package/dist/__mocks__/common/view.js +7 -5
- package/dist/__mocks__/common/view.js.map +1 -1
- package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js +1 -1
- package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js.map +1 -1
- package/dist/__mocks__/mockQuery/mockGetViewListQuery.js +2 -1
- package/dist/__mocks__/mockQuery/mockGetViewListQuery.js.map +1 -1
- package/dist/_gqlTypes/index.d.ts +462 -77
- package/dist/_gqlTypes/index.js +1274 -1055
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/libraries/getLibraryDetailExtendQuery.d.ts +3 -4
- package/dist/_queries/libraries/getLibraryDetailExtendQuery.js +2 -3
- package/dist/_queries/libraries/getLibraryDetailExtendQuery.js.map +1 -1
- package/dist/_queries/records/getRecordColumnsValues.d.ts +5 -3
- package/dist/_queries/records/getRecordColumnsValues.js +4 -1
- package/dist/_queries/records/getRecordColumnsValues.js.map +1 -1
- package/dist/_queries/records/getRecordsFromLibraryQuery.js +1 -0
- package/dist/_queries/records/getRecordsFromLibraryQuery.js.map +1 -1
- package/dist/_queries/records/recordFormAttributeFragment.js +2 -0
- package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
- package/dist/_queries/views/saveViewMutation.js +1 -1
- package/dist/_queries/views/viewDetailsFragment.js +14 -11
- package/dist/_queries/views/viewDetailsFragment.js.map +1 -1
- package/dist/_utils/index.js +5 -2
- package/dist/_utils/index.js.map +1 -1
- package/dist/_utils/interleaveElement.d.ts +1 -0
- package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js → _utils/interleaveElement.js} +2 -6
- package/dist/_utils/interleaveElement.js.map +1 -0
- package/dist/antdTheme/index.d.ts +0 -3
- package/dist/antdTheme/index.js +3 -42
- package/dist/antdTheme/index.js.map +1 -1
- package/dist/components/CreateDirectory/CreateDirectory.js +1 -1
- package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
- package/dist/components/EditApplication/EditApplication.js +2 -2
- package/dist/components/EditApplication/EditApplication.js.map +1 -1
- package/dist/components/EditApplication/_types.d.ts +2 -2
- package/dist/components/Explorer/DataView.d.ts +10 -1
- package/dist/components/Explorer/DataView.js +37 -36
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +9 -5
- package/dist/components/Explorer/Explorer.js +61 -17
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerTitle.d.ts +9 -0
- package/dist/components/Explorer/ExplorerTitle.js +47 -0
- package/dist/components/Explorer/ExplorerTitle.js.map +1 -0
- package/dist/components/Explorer/IdCard.d.ts +7 -0
- package/dist/components/Explorer/IdCard.js +15 -0
- package/dist/components/Explorer/IdCard.js.map +1 -0
- package/dist/components/Explorer/TableCell.d.ts +8 -0
- package/dist/components/Explorer/TableCell.js +144 -0
- package/dist/components/Explorer/TableCell.js.map +1 -0
- package/dist/components/Explorer/TableTagGroup.d.ts +7 -0
- package/dist/components/Explorer/TableTagGroup.js +30 -0
- package/dist/components/Explorer/TableTagGroup.js.map +1 -0
- package/dist/components/Explorer/_constants.d.ts +4 -0
- package/dist/components/Explorer/_constants.js +17 -0
- package/dist/components/Explorer/_constants.js.map +1 -0
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +31 -7
- package/dist/components/Explorer/_queries/useExplorerData.js +199 -19
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +63 -3
- package/dist/components/Explorer/conditionsHelper.d.ts +2 -0
- package/dist/components/Explorer/conditionsHelper.js +16 -0
- package/dist/components/Explorer/conditionsHelper.js.map +1 -0
- package/dist/components/Explorer/display-view-filters/ExplorerToolBar.d.ts +4 -0
- package/dist/components/Explorer/display-view-filters/ExplorerToolBar.js +47 -0
- package/dist/components/Explorer/display-view-filters/ExplorerToolBar.js.map +1 -0
- package/dist/components/Explorer/index.d.ts +1 -3
- package/dist/components/Explorer/index.js +1 -3
- package/dist/components/Explorer/index.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.d.ts +12 -0
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js +85 -0
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +5 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +12 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +11 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +61 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.d.ts +6 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +28 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.d.ts +6 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +56 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +12 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +78 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +9 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +33 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +22 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +66 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +71 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +10 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +75 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +19 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +28 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +11 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +100 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/index.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/index.js +11 -0
- package/dist/components/Explorer/manage-view-settings/index.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.d.ts +2 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.js +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.d.ts +7 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.js +2 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.js +2 -2
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +5 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +39 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.d.ts +4 -2
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +70 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +109 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.d.ts +10 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +32 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.d.ts +6 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js +11 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.d.ts +4 -0
- package/dist/components/{RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js → Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js} +3 -3
- package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +24 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +145 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +199 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
- package/dist/components/Explorer/{useCreateMainAction.d.ts → useCreateAction.d.ts} +5 -3
- package/dist/components/Explorer/useCreateAction.js +73 -0
- package/dist/components/Explorer/useCreateAction.js.map +1 -0
- package/dist/components/Explorer/useEditAction.js +9 -7
- package/dist/components/Explorer/useEditAction.js.map +1 -1
- package/dist/components/Explorer/usePagination.d.ts +7 -0
- package/dist/components/Explorer/usePagination.js +25 -0
- package/dist/components/Explorer/usePagination.js.map +1 -0
- package/dist/components/Explorer/usePrimaryActions.d.ts +12 -0
- package/dist/components/Explorer/usePrimaryActions.js +28 -0
- package/dist/components/Explorer/usePrimaryActions.js.map +1 -0
- package/dist/components/Explorer/useRemoveAction.d.ts +12 -0
- package/dist/components/Explorer/useRemoveAction.js +90 -0
- package/dist/components/Explorer/useRemoveAction.js.map +1 -0
- package/dist/components/Explorer/useSearchInput.d.ts +10 -0
- package/dist/components/Explorer/useSearchInput.js +31 -0
- package/dist/components/Explorer/useSearchInput.js.map +1 -0
- package/dist/components/Explorer/useTableScrollableHeight.d.ts +5 -0
- package/dist/components/Explorer/useTableScrollableHeight.js +15 -0
- package/dist/components/Explorer/useTableScrollableHeight.js.map +1 -0
- package/dist/components/Explorer/useViewSettingsReducer.d.ts +8 -0
- package/dist/components/Explorer/useViewSettingsReducer.js +126 -0
- package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -0
- package/dist/components/ExportModal/ExportModal.js +2 -2
- package/dist/components/ExportModal/ExportModal.js.map +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +5 -5
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.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/LibraryItemsListContent/LibraryItemsListContent.js +7 -11
- package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js +7 -2
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js.map +1 -1
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +7 -5
- package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +1 -1
- package/dist/components/LibraryItemsList/MenuView/MenuView.js +4 -9
- package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
- package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +2 -3
- package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +1 -1
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js +3 -3
- package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
- package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js +4 -9
- package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js.map +1 -1
- package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +7 -5
- package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +1 -1
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +25 -33
- package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +10 -18
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +16 -3
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +10 -21
- package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +5 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +44 -34
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.d.ts +3 -1
- package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js +8 -2
- package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +3 -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.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +2 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +2 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.d.ts +6 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +18 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.d.ts +4 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js +25 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +5 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +178 -186
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.d.ts +2 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +11 -30
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.d.ts +2 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +73 -45
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +35 -46
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +11 -76
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +32 -49
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +38 -54
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +51 -63
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +33 -53
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +17 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +67 -401
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.d.ts +4 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/{MonoValueSelect.js → DSListSelect.js} +48 -52
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +2 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +16 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js +2 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.d.ts +42 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +55 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +12 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +32 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +10 -4
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +2 -0
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +2 -2
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +4 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +36 -3
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.d.ts +4 -7
- package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js +6 -8
- package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.d.ts +9 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js +42 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.d.ts +6 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js +35 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.d.ts +2 -281
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +25 -56
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js +1 -13
- package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +4 -7
- package/dist/components/SelectTreeNode/SelectTreeNode.js +17 -135
- package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +16 -0
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +131 -0
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -0
- package/dist/components/SelectTreeNode/index.d.ts +1 -1
- package/dist/components/SelectTreeNode/index.js +1 -1
- package/dist/components/SelectTreeNode/index.js.map +1 -1
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.d.ts +4 -7
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js +10 -10
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +1 -1
- package/dist/components/SelectTreeNodeModal/index.d.ts +1 -2
- package/dist/components/SelectTreeNodeModal/index.js +1 -2
- package/dist/components/SelectTreeNodeModal/index.js.map +1 -1
- package/dist/components/UploadFiles/UploadFiles.js +1 -1
- 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/constants.d.ts +3 -0
- package/dist/constants.js +3 -0
- package/dist/constants.js.map +1 -1
- package/dist/hooks/useDebouncedValue/index.d.ts +1 -0
- package/dist/{components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler → hooks/useDebouncedValue}/index.js +1 -1
- package/dist/hooks/useDebouncedValue/index.js.map +1 -0
- package/dist/hooks/useExecuteSaveViewMutation/index.d.ts +1 -0
- package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer → hooks/useExecuteSaveViewMutation}/index.js +1 -2
- package/dist/hooks/useExecuteSaveViewMutation/index.js.map +1 -0
- package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.d.ts +6 -0
- package/dist/hooks/{useExecuteAddViewMutation/useExecuteAddViewMutation.js → useExecuteSaveViewMutation/useExecuteSaveViewMutation.js} +6 -6
- package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -0
- package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -0
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
- package/dist/locales/en/shared.json +71 -10
- package/dist/locales/fr/shared.json +71 -10
- package/dist/types/views.d.ts +4 -4
- package/package.json +7 -2
- package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +0 -2
- package/dist/components/Explorer/edit-settings/DisplayMode.js +0 -10
- package/dist/components/Explorer/edit-settings/DisplayMode.js.map +0 -1
- package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +0 -1
- package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.d.ts +0 -2
- package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SettingItem.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SettingsPanel.d.ts +0 -3
- package/dist/components/Explorer/edit-settings/SettingsPanel.js +0 -53
- package/dist/components/Explorer/edit-settings/SettingsPanel.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SidePanel.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useEditSettings.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useOpenSettings.d.ts +0 -1
- package/dist/components/Explorer/edit-settings/useOpenSettings.js +0 -19
- package/dist/components/Explorer/edit-settings/useOpenSettings.js.map +0 -1
- package/dist/components/Explorer/useCreateMainAction.js +0 -36
- package/dist/components/Explorer/useCreateMainAction.js.map +0 -1
- package/dist/components/Explorer/useDeactivateAction.d.ts +0 -12
- package/dist/components/Explorer/useDeactivateAction.js +0 -51
- package/dist/components/Explorer/useDeactivateAction.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +0 -138
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +0 -361
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +0 -7
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.d.ts +0 -8
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js +0 -23
- package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +0 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js +0 -19
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js +0 -32
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js +0 -51
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js +0 -26
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +0 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +0 -90
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.d.ts +0 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js +0 -45
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.d.ts +0 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +0 -141
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +0 -1
- package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.d.ts +0 -6
- package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.js.map +0 -1
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.js +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordSummary.js","sourceRoot":"","sources":["../../../../../src/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"RecordSummary.js","sourceRoot":"","sources":["../../../../../src/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,uBAAuB,EAAC,MAAM,mEAAmE,CAAC;AAE1G,OAAO,E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gBACd,KAAK,EAAE,CAAC,CAAC,wBAAwB,CAAC;gBAClC,QAAQ,EAAE,IAAI;aACjB;SACJ,GACH,CACL,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -2,15 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
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 { CloseOutlined } from '@ant-design/icons';
|
|
6
5
|
import { isTypeStandard, localizedTranslation } from '@leav/utils';
|
|
7
6
|
import { Collapse, Divider } from 'antd';
|
|
8
7
|
import styled from 'styled-components';
|
|
9
8
|
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
10
9
|
import useLang from '../../../../hooks/useLang';
|
|
11
10
|
import { AttributeType } from '../../../../_gqlTypes';
|
|
12
|
-
import { EditRecordReducerActionsTypes } from '../../editRecordReducer/editRecordReducer';
|
|
13
|
-
import { useEditRecordReducer } from '../../editRecordReducer/useEditRecordReducer';
|
|
14
11
|
import AttributeDetails from './AttributeDetails';
|
|
15
12
|
import TreeValuePath from './TreeValuePath';
|
|
16
13
|
import ValueInfo from './ValueInfo';
|
|
@@ -26,18 +23,9 @@ const AttributeDescription = styled.div `
|
|
|
26
23
|
color: rgba(0, 0, 0, 0.5);
|
|
27
24
|
padding: 0 1rem;
|
|
28
25
|
`;
|
|
29
|
-
const CloseButton = styled(CloseOutlined) `
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
position: absolute;
|
|
32
|
-
right: 1em;
|
|
33
|
-
top: 1em;
|
|
34
|
-
`;
|
|
35
|
-
const { Panel } = Collapse;
|
|
36
26
|
function ValueDetails({ attribute, value, onMetadataSubmit }) {
|
|
37
27
|
const { lang } = useLang();
|
|
38
28
|
const { t } = useSharedTranslation();
|
|
39
|
-
const { state, dispatch } = useEditRecordReducer();
|
|
40
|
-
const _handleClose = () => dispatch({ type: EditRecordReducerActionsTypes.SET_ACTIVE_VALUE, value: null });
|
|
41
29
|
const metadataFields = (attribute?.metadata_fields ?? []).filter(field => field.permissions.access_attribute);
|
|
42
30
|
const hasMetadata = metadataFields.length > 0 && value !== null;
|
|
43
31
|
const collapseItems = [];
|
|
@@ -57,7 +45,7 @@ function ValueDetails({ attribute, value, onMetadataSubmit }) {
|
|
|
57
45
|
children: (_jsx(TreeValuePath, { value: value, attribute: attribute }))
|
|
58
46
|
});
|
|
59
47
|
}
|
|
60
|
-
return (_jsxs(_Fragment, { children: [
|
|
48
|
+
return (_jsxs(_Fragment, { children: [_jsxs(AttributeTitle, { children: [t('record_edition.attribute.info_title'), ":", _jsx("span", { className: "attribute-label", children: localizedTranslation(attribute.label, lang) })] }), _jsx(AttributeDescription, { children: localizedTranslation(attribute.description, lang) }), _jsx(AttributeDetails, { attribute: attribute }), _jsx(Divider, { style: { margin: '.5em 0' } }), _jsx(ValueInfo, {}), _jsx(Collapse, { items: collapseItems, bordered: false, defaultActiveKey: ['value', 'metadata'], style: { background: 'none' }, destroyInactivePanel: true })] }));
|
|
61
49
|
}
|
|
62
50
|
export default ValueDetails;
|
|
63
51
|
//# sourceMappingURL=ValueDetails.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValueDetails.js","sourceRoot":"","sources":["../../../../../src/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"ValueDetails.js","sourceRoot":"","sources":["../../../../../src/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,cAAc,EAAE,oBAAoB,EAAC,MA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AC;YAC/C,QAAQ,EAAE,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,GAAI;SACtG,CAAC,CAAC;IACP,CAAC;IAED,IAAI,SAAS,CAAC,IAAI,KAAK,aAAa,CAAC,IAAI,IAAI,KAAK,EAAE,CAAC;QACjD,aAAa,CAAC,IAAI,CAAC;YACf,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,CAAC,CAAC,6BAA6B,CAAC;YACvC,QAAQ,EAAE,CACN,KAAC,aAAa,IACV,KAAK,EAAE,KAA4B,EACnC,SAAS,EAAE,SAAqD,GAClE,CACL;SACJ,CAAC,CAAC;IACP,CAAC;IAED,OAAO,CACH,8BACI,MAAC,cAAc,eACV,CAAC,CAAC,qCAAqC,CAAC,OACzC,eAAM,SAAS,EAAC,iBAAiB,YAAE,oBAAoB,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,GAAQ,IACzE,EACjB,KAAC,oBAAoB,cAAE,oBAAoB,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,GAAwB,EAChG,KAAC,gBAAgB,IAAC,SAAS,EAAE,SAAS,GAAI,EAC1C,KAAC,OAAO,IAAC,KAAK,EAAE,EAAC,MAAM,EAAE,QAAQ,EAAC,GAAI,EACtC,KAAC,SAAS,KAAG,EACb,KAAC,QAAQ,IACL,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,KAAK,EACf,gBAAgB,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,EACvC,KAAK,EAAE,EAAC,UAAU,EAAE,MAAM,EAAC,EAC3B,oBAAoB,SACtB,IACH,CACN,CAAC;AACN,CAAC;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
2
|
import { ITreeNodeWithRecord } from '../../types/trees';
|
|
3
3
|
interface ISelectTreeNodeProps {
|
|
4
|
-
|
|
5
|
-
id: string;
|
|
6
|
-
label?: SystemTranslation | null;
|
|
7
|
-
};
|
|
4
|
+
treeId: string;
|
|
8
5
|
selectedNode?: string;
|
|
9
6
|
onSelect: (node: ITreeNodeWithRecord, selected: boolean) => void;
|
|
10
7
|
onCheck?: (selection: ITreeNodeWithRecord[]) => void;
|
|
@@ -12,5 +9,5 @@ interface ISelectTreeNodeProps {
|
|
|
12
9
|
canSelectRoot?: boolean;
|
|
13
10
|
selectableLibraries?: string[];
|
|
14
11
|
}
|
|
15
|
-
declare
|
|
16
|
-
export
|
|
12
|
+
export declare const SelectTreeNode: FunctionComponent<ISelectTreeNodeProps>;
|
|
13
|
+
export {};
|
|
@@ -2,147 +2,29 @@ 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 { DownOutlined } from '@ant-design/icons';
|
|
6
5
|
import { localizedTranslation } from '@leav/utils';
|
|
7
|
-
import { Spin, Tree } from 'antd';
|
|
8
|
-
import { useEffect, useState } from 'react';
|
|
9
6
|
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { useTreeDataQueryQuery } from '../../_gqlTypes';
|
|
8
|
+
import { ErrorDisplay } from '../..';
|
|
12
9
|
import useLang from '../../hooks/useLang';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
id: e.id,
|
|
17
|
-
key: e.id,
|
|
18
|
-
isLeaf: !e.childrenCount,
|
|
19
|
-
children: []
|
|
20
|
-
}));
|
|
21
|
-
const _getTreeNodeByKey = (key, treeContent) => {
|
|
22
|
-
for (const node of treeContent) {
|
|
23
|
-
if (key === node.key) {
|
|
24
|
-
return node;
|
|
25
|
-
}
|
|
26
|
-
const n = _getTreeNodeByKey(key, node.children);
|
|
27
|
-
if (!!n) {
|
|
28
|
-
return n;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
function SelectTreeNode({ tree, onSelect, onCheck, selectedNode: initSelectedNode, multiple = false, canSelectRoot = false, selectableLibraries }) {
|
|
10
|
+
import { SelectTreeNodeContent } from './SelectTreeNodeContent';
|
|
11
|
+
import { Skeleton } from 'antd';
|
|
12
|
+
export const SelectTreeNode = ({ treeId, onSelect, onCheck, selectedNode, multiple = false, canSelectRoot = false, selectableLibraries }) => {
|
|
33
13
|
const { lang } = useLang();
|
|
34
14
|
const { t } = useSharedTranslation();
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
record: null,
|
|
38
|
-
id: tree.id,
|
|
39
|
-
key: tree.id,
|
|
40
|
-
isLeaf: false,
|
|
41
|
-
paginationOffset: 0,
|
|
42
|
-
children: []
|
|
43
|
-
};
|
|
44
|
-
// As we'll fetch children when a node is expanded, we store the whole tree content in a hash map
|
|
45
|
-
// to make update easier and more efficient
|
|
46
|
-
const [treeMap, setTreeMap] = useState({
|
|
47
|
-
[tree.id]: rootNode
|
|
15
|
+
const { loading, error, data } = useTreeDataQueryQuery({
|
|
16
|
+
variables: { treeId }
|
|
48
17
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
// Retrieve tree content
|
|
52
|
-
const [loadTreeContent, { error, called }] = useTreeNodeChildrenLazyQuery();
|
|
53
|
-
const _fetchTreeContent = async (key, offset = 0) => {
|
|
54
|
-
try {
|
|
55
|
-
const data = await loadTreeContent({
|
|
56
|
-
variables: {
|
|
57
|
-
treeId: tree.id,
|
|
58
|
-
node: key && key !== tree.id ? key : null,
|
|
59
|
-
pagination: {
|
|
60
|
-
limit: defaultPaginationPageSize,
|
|
61
|
-
offset
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
const formattedNodes = _constructTreeContent(data.data.treeNodeChildren.list);
|
|
66
|
-
const parentMapKey = key ?? tree.id;
|
|
67
|
-
const newTreeMap = { ...treeMap };
|
|
68
|
-
const totalCount = data.data.treeNodeChildren.totalCount;
|
|
69
|
-
const parentElement = newTreeMap[parentMapKey];
|
|
70
|
-
const showMoreKey = '__showMore' + parentMapKey + offset;
|
|
71
|
-
parentElement.children = parentElement.children.filter(child => !child.key.match(`__showMore${parentMapKey}`));
|
|
72
|
-
for (const node of formattedNodes) {
|
|
73
|
-
const nodeForTreeMap = { ...node, paginationOffset: 0 };
|
|
74
|
-
newTreeMap[nodeForTreeMap.key] = nodeForTreeMap;
|
|
75
|
-
parentElement.paginationOffset = offset;
|
|
76
|
-
parentElement.children.push(nodeForTreeMap);
|
|
77
|
-
}
|
|
78
|
-
if (totalCount > parentElement.paginationOffset + defaultPaginationPageSize) {
|
|
79
|
-
const showMoreElement = {
|
|
80
|
-
id: parentMapKey,
|
|
81
|
-
key: showMoreKey,
|
|
82
|
-
record: null,
|
|
83
|
-
title: t('tree-node-selection.show_more'),
|
|
84
|
-
isLeaf: false,
|
|
85
|
-
paginationOffset: 0,
|
|
86
|
-
isShowMore: true,
|
|
87
|
-
selectable: false,
|
|
88
|
-
children: []
|
|
89
|
-
};
|
|
90
|
-
parentElement.children.push(showMoreElement);
|
|
91
|
-
}
|
|
92
|
-
setTreeMap(newTreeMap);
|
|
93
|
-
setFetchError(null);
|
|
94
|
-
}
|
|
95
|
-
catch (err) {
|
|
96
|
-
setFetchError(err.message);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
useEffect(() => {
|
|
100
|
-
setSelectedNode(initSelectedNode);
|
|
101
|
-
}, [initSelectedNode]);
|
|
102
|
-
useEffect(() => {
|
|
103
|
-
// Load root
|
|
104
|
-
_fetchTreeContent();
|
|
105
|
-
}, []);
|
|
106
|
-
const _handleLoadData = async (nodeData) => {
|
|
107
|
-
const { id, isShowMore } = nodeData;
|
|
108
|
-
// Handle offset if we get here through the "show more" element
|
|
109
|
-
const currentNodeOffset = treeMap[id]?.paginationOffset ?? 0;
|
|
110
|
-
const paginationOffset = isShowMore
|
|
111
|
-
? (treeMap[id]?.paginationOffset ?? 0) + defaultPaginationPageSize
|
|
112
|
-
: currentNodeOffset;
|
|
113
|
-
if (id === tree.id && !isShowMore) {
|
|
114
|
-
// Root has already been loaded
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
await _fetchTreeContent(String(id), paginationOffset);
|
|
118
|
-
};
|
|
119
|
-
const _handleSelect = (_, e) => {
|
|
120
|
-
const node = treeMap[e.node.key];
|
|
121
|
-
const isRoot = node.id === tree.id;
|
|
122
|
-
if ((!canSelectRoot && isRoot) ||
|
|
123
|
-
(!isRoot &&
|
|
124
|
-
typeof selectableLibraries !== 'undefined' &&
|
|
125
|
-
selectableLibraries.indexOf(node.record.whoAmI.library.id) === -1)) {
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
if (node) {
|
|
129
|
-
onSelect(node, e.selected);
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
const _handleCheck = (selection) => {
|
|
133
|
-
const checkedKeys = typeof selection === 'object' ? selection.checked : selection;
|
|
134
|
-
const nodes = checkedKeys.map(key => treeMap[key]);
|
|
135
|
-
onCheck(nodes);
|
|
136
|
-
};
|
|
137
|
-
if (!called) {
|
|
138
|
-
return _jsx(Spin, {});
|
|
18
|
+
if (loading) {
|
|
19
|
+
return _jsx(Skeleton.Input, {}); //TODO: use DS when export of KitSkeleton is fixed
|
|
139
20
|
}
|
|
140
|
-
if (error
|
|
141
|
-
return _jsx(ErrorDisplay, { message: error
|
|
21
|
+
if (error) {
|
|
22
|
+
return _jsx(ErrorDisplay, { message: error.message });
|
|
142
23
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
24
|
+
if (!data?.trees.list[0]) {
|
|
25
|
+
return _jsx(ErrorDisplay, { message: t('error.unknown_tree', { treeId }) });
|
|
26
|
+
}
|
|
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, selectedNode: selectedNode, canSelectRoot: canSelectRoot, selectableLibraries: selectableLibraries }));
|
|
29
|
+
};
|
|
148
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,
|
|
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,YAAY,EAAC,MAAM,OAAO,CAAC;AACnC,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAE1C,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,QAAQ,EAAC,MAAM,MAAM,CAAC;AAY9B,MAAM,CAAC,MAAM,cAAc,GAA4C,CAAC,EACpE,MAAM,EACN,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,QAAQ,GAAG,KAAK,EAChB,aAAa,GAAG,KAAK,EACrB,mBAAmB,EACtB,EAAE,EAAE;IACD,MAAM,EAAC,IAAI,EAAC,GAAG,OAAO,EAAE,CAAC;IACzB,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAC,GAAG,qBAAqB,CAAC;QACjD,SAAS,EAAE,EAAC,MAAM,EAAC;KACtB,CAAC,CAAC;IAEH,IAAI,OAAO,EAAE,CAAC;QACV,OAAO,KAAC,QAAQ,CAAC,KAAK,KAAG,CAAC,CAAC,kDAAkD;IACjF,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACR,OAAO,KAAC,YAAY,IAAC,OAAO,EAAE,KAAK,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,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,GAC1C,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { ITreeNodeWithRecord } from '../../types/trees';
|
|
3
|
+
interface ISelectTreeNodeContentProps {
|
|
4
|
+
treeData: {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
};
|
|
8
|
+
selectedNode?: string;
|
|
9
|
+
onSelect: (node: ITreeNodeWithRecord, selected: boolean) => void;
|
|
10
|
+
onCheck?: (selection: ITreeNodeWithRecord[]) => void;
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
canSelectRoot?: boolean;
|
|
13
|
+
selectableLibraries?: string[];
|
|
14
|
+
}
|
|
15
|
+
export declare const SelectTreeNodeContent: FunctionComponent<ISelectTreeNodeContentProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { Spin } from 'antd';
|
|
6
|
+
import { useEffect, useState } from 'react';
|
|
7
|
+
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
8
|
+
import { useTreeNodeChildrenLazyQuery } from '../../_gqlTypes';
|
|
9
|
+
import { defaultPaginationPageSize, ErrorDisplay } from '../..';
|
|
10
|
+
import { KitTree } from 'aristid-ds';
|
|
11
|
+
const _isObjectSelection = (selection) => 'checked' in selection && 'halfChecked' in selection;
|
|
12
|
+
const _constructTreeContent = (data) => data.map(e => ({
|
|
13
|
+
record: e.record,
|
|
14
|
+
title: e.record.whoAmI.label || e.record.whoAmI.id,
|
|
15
|
+
id: e.id,
|
|
16
|
+
key: e.id,
|
|
17
|
+
isLeaf: !e.childrenCount,
|
|
18
|
+
children: []
|
|
19
|
+
}));
|
|
20
|
+
export const SelectTreeNodeContent = ({ treeData: tree, onSelect, onCheck, selectedNode: initSelectedNode, multiple = false, canSelectRoot = false, selectableLibraries }) => {
|
|
21
|
+
const { t } = useSharedTranslation();
|
|
22
|
+
const rootNode = {
|
|
23
|
+
title: tree.label,
|
|
24
|
+
record: null,
|
|
25
|
+
id: tree.id,
|
|
26
|
+
key: tree.id,
|
|
27
|
+
isLeaf: false,
|
|
28
|
+
paginationOffset: 0,
|
|
29
|
+
children: []
|
|
30
|
+
};
|
|
31
|
+
// As we'll fetch children when a node is expanded, we store the whole tree content in a hash map
|
|
32
|
+
// to make update easier and more efficient
|
|
33
|
+
const [treeMap, setTreeMap] = useState({
|
|
34
|
+
[tree.id]: rootNode
|
|
35
|
+
});
|
|
36
|
+
const [selectedNode, setSelectedNode] = useState(initSelectedNode);
|
|
37
|
+
const [fetchError, setFetchError] = useState();
|
|
38
|
+
const [loadTreeContent, { error, called }] = useTreeNodeChildrenLazyQuery();
|
|
39
|
+
const _fetchTreeContent = async (parentNodeKey, offset = 0) => {
|
|
40
|
+
try {
|
|
41
|
+
const data = await loadTreeContent({
|
|
42
|
+
variables: {
|
|
43
|
+
treeId: tree.id,
|
|
44
|
+
node: parentNodeKey && parentNodeKey !== tree.id ? parentNodeKey : null,
|
|
45
|
+
pagination: {
|
|
46
|
+
limit: defaultPaginationPageSize,
|
|
47
|
+
offset
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
const formattedNodes = _constructTreeContent(data.data.treeNodeChildren.list);
|
|
52
|
+
const parentMapKey = parentNodeKey ?? tree.id;
|
|
53
|
+
const newTreeMap = { ...treeMap };
|
|
54
|
+
const totalCount = data.data.treeNodeChildren.totalCount;
|
|
55
|
+
const parentElement = newTreeMap[parentMapKey];
|
|
56
|
+
const showMoreKey = '__showMore' + parentMapKey + offset;
|
|
57
|
+
parentElement.children = parentElement.children.filter(child => !child.key.match(`__showMore${parentMapKey}`));
|
|
58
|
+
for (const node of formattedNodes) {
|
|
59
|
+
const nodeForTreeMap = { ...node, paginationOffset: 0 };
|
|
60
|
+
newTreeMap[nodeForTreeMap.key] = nodeForTreeMap;
|
|
61
|
+
parentElement.paginationOffset = offset;
|
|
62
|
+
parentElement.children.push(nodeForTreeMap);
|
|
63
|
+
}
|
|
64
|
+
if (totalCount > parentElement.paginationOffset + defaultPaginationPageSize) {
|
|
65
|
+
const showMoreElement = {
|
|
66
|
+
id: parentMapKey,
|
|
67
|
+
key: showMoreKey,
|
|
68
|
+
record: null,
|
|
69
|
+
title: t('tree-node-selection.show_more'),
|
|
70
|
+
isLeaf: false,
|
|
71
|
+
paginationOffset: 0,
|
|
72
|
+
isShowMore: true,
|
|
73
|
+
selectable: false,
|
|
74
|
+
children: []
|
|
75
|
+
};
|
|
76
|
+
parentElement.children.push(showMoreElement);
|
|
77
|
+
}
|
|
78
|
+
setTreeMap(newTreeMap);
|
|
79
|
+
setFetchError(null);
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
setFetchError(err.message);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
setSelectedNode(initSelectedNode);
|
|
87
|
+
}, [initSelectedNode]);
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
// Load root
|
|
90
|
+
_fetchTreeContent();
|
|
91
|
+
}, []);
|
|
92
|
+
const _handleLoadData = async (nodeData) => {
|
|
93
|
+
const { id, isShowMore } = nodeData;
|
|
94
|
+
// Handle offset if we get here through the "show more" element
|
|
95
|
+
const currentNodeOffset = treeMap[id]?.paginationOffset ?? 0;
|
|
96
|
+
const paginationOffset = isShowMore
|
|
97
|
+
? (treeMap[id]?.paginationOffset ?? 0) + defaultPaginationPageSize
|
|
98
|
+
: currentNodeOffset;
|
|
99
|
+
if (id === tree.id && !isShowMore) {
|
|
100
|
+
// Root has already been loaded
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
await _fetchTreeContent(id, paginationOffset);
|
|
104
|
+
};
|
|
105
|
+
const _handleSelect = (_, e) => {
|
|
106
|
+
const node = treeMap[e.node.key];
|
|
107
|
+
const isRoot = node.id === tree.id;
|
|
108
|
+
if ((!canSelectRoot && isRoot) || (!isRoot && selectableLibraries?.includes(node.record.whoAmI.library.id))) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (node) {
|
|
112
|
+
onSelect(node, e.selected);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
const _handleCheck = selection => {
|
|
116
|
+
const checkedKeys = _isObjectSelection(selection) ? selection.checked : selection;
|
|
117
|
+
const nodes = checkedKeys.map(key => treeMap[key]);
|
|
118
|
+
onCheck(nodes);
|
|
119
|
+
};
|
|
120
|
+
if (!called) {
|
|
121
|
+
return _jsx(Spin, {});
|
|
122
|
+
}
|
|
123
|
+
if (error || fetchError) {
|
|
124
|
+
return _jsx(ErrorDisplay, { message: error?.message ?? fetchError });
|
|
125
|
+
}
|
|
126
|
+
const treeData = [treeMap[rootNode.key]];
|
|
127
|
+
return (_jsx(KitTree, { defaultExpandedKeys: [tree.id], multiple: multiple, selectable: true, selectedKeys: [selectedNode], onSelect: _handleSelect, onCheck: _handleCheck, treeData: treeData, loadData: _handleLoadData, checkStrictly: true, checkable: multiple, showLine: {
|
|
128
|
+
showLeafIcon: false
|
|
129
|
+
} }));
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=SelectTreeNodeContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectTreeNodeContent.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/SelectTreeNodeContent.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAE1B,OAAO,EAAyC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClF,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAwB,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAClF,OAAO,EAAC,yBAAyB,EAAE,YAAY,EAAC,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AAanC,MAAM,kBAAkB,GAAG,CAAC,SAA4B,EAAkD,EAAE,CACxG,SAAS,IAAI,SAAS,IAAI,aAAa,IAAI,SAAS,CAAC;AAEzD,MAAM,qBAAqB,GAAG,CAAC,IAA6B,EAAyB,EAAE,CACnF,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AI,UAAU,EAAE,CAAC;QACtB,OAAO,KAAC,YAAY,IAAC,OAAO,EAAE,KAAK,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,UAAU,EAAE,IAAI,EAChB,YAAY,EAAE,CAAC,YAAY,CAAC,EAC5B,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,eAAe,EACzB,aAAa,QACb,SAAS,EAAE,QAAQ,EACnB,QAAQ,EAAE;YACN,YAAY,EAAE,KAAK;SACtB,GACH,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SelectTreeNode } from './SelectTreeNode';
|
|
@@ -1,5 +1,5 @@
|
|
|
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
|
-
export {
|
|
4
|
+
export { SelectTreeNode } from './SelectTreeNode';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
2
|
import { ITreeNode } from '../../types/trees';
|
|
3
3
|
interface ISelectTreeNodeModalProps {
|
|
4
|
-
|
|
5
|
-
id: string;
|
|
6
|
-
label?: SystemTranslation | null;
|
|
7
|
-
};
|
|
4
|
+
treeId: string;
|
|
8
5
|
selectedNodeKey?: string;
|
|
9
|
-
|
|
6
|
+
isVisible: boolean;
|
|
10
7
|
onSubmit: (treeNode: ITreeNode) => void;
|
|
11
8
|
onClose: () => void;
|
|
12
9
|
canSelectRoot?: boolean;
|
|
13
10
|
}
|
|
14
|
-
export
|
|
11
|
+
export declare const SelectTreeNodeModal: FunctionComponent<ISelectTreeNodeModalProps>;
|
|
15
12
|
export {};
|
|
@@ -2,11 +2,11 @@ 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 { Button, Modal } from 'antd';
|
|
6
5
|
import { useState } from 'react';
|
|
7
6
|
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
8
7
|
import { SelectTreeNode } from '../SelectTreeNode';
|
|
9
|
-
|
|
8
|
+
import { KitButton, KitModal } from 'aristid-ds';
|
|
9
|
+
export const SelectTreeNodeModal = ({ treeId, selectedNodeKey, onSubmit, isVisible, onClose, canSelectRoot = false }) => {
|
|
10
10
|
const { t } = useSharedTranslation();
|
|
11
11
|
const [selectedNode, setSelectedNode] = useState({
|
|
12
12
|
id: selectedNodeKey,
|
|
@@ -14,19 +14,19 @@ export default function SelectTreeNodeModal({ tree, selectedNodeKey, onSubmit, v
|
|
|
14
14
|
title: '',
|
|
15
15
|
children: []
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const _handleCancel = () => {
|
|
18
18
|
onClose();
|
|
19
19
|
};
|
|
20
|
-
const
|
|
20
|
+
const _handleApply = () => {
|
|
21
21
|
onSubmit(selectedNode);
|
|
22
22
|
onClose();
|
|
23
23
|
};
|
|
24
|
-
const
|
|
24
|
+
const _onSelect = (node, selected) => {
|
|
25
25
|
setSelectedNode(!selected ? undefined : node);
|
|
26
26
|
};
|
|
27
|
-
return (_jsx(
|
|
28
|
-
_jsx(
|
|
29
|
-
_jsx(
|
|
30
|
-
], destroyOnClose: true, children: _jsx(SelectTreeNode, {
|
|
31
|
-
}
|
|
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
|
+
_jsx(KitButton, { onClick: _handleCancel, children: t('global.cancel') }, "cancel"),
|
|
29
|
+
_jsx(KitButton, { type: "primary", onClick: _handleApply, children: t('global.apply') }, "add")
|
|
30
|
+
], destroyOnClose: true, children: _jsx(SelectTreeNode, { treeId: treeId, onSelect: _onSelect, selectedNode: selectedNode?.key, canSelectRoot: canSelectRoot }) }));
|
|
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,
|
|
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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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,YAAY,EAAE,YAAY,EAAE,GAAG,EAC/B,aAAa,EAAE,aAAa,GAC9B,GACK,CACd,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default SelectTreeNodeModal;
|
|
1
|
+
export { SelectTreeNodeModal } from './SelectTreeNodeModal';
|
|
@@ -1,6 +1,5 @@
|
|
|
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
|
-
|
|
5
|
-
export default SelectTreeNodeModal;
|
|
4
|
+
export { SelectTreeNodeModal } from './SelectTreeNodeModal';
|
|
6
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNodeModal/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,mBAAmB,MAAM,uBAAuB,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNodeModal/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC"}
|
|
@@ -204,7 +204,7 @@ function UploadFiles({ defaultSelectedNode, libraryId, multiple = false, onCompl
|
|
|
204
204
|
content: (_jsx("div", { "data-testid": "select-tree-node", style: {
|
|
205
205
|
borderRadius: token.borderRadiusLG,
|
|
206
206
|
border: `1px dashed ${token.colorBorder}`
|
|
207
|
-
}, children: filesTreeId && directoriesLibraryId && (_jsx(SelectTreeNode, {
|
|
207
|
+
}, children: filesTreeId && directoriesLibraryId && (_jsx(SelectTreeNode, { treeId: filesTreeId, onSelect: onSelectPath, selectedNode: selectedNode?.id, canSelectRoot: true, selectableLibraries: [directoriesLibraryId] })) }))
|
|
208
208
|
},
|
|
209
209
|
{
|
|
210
210
|
title: t('upload.select_files_step_title'),
|