@leav/ui 0.4.0-fd9dcf3f → 1.0.0-6e54bb6d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_gqlTypes/index.d.ts +450 -211
- package/dist/_gqlTypes/index.js +246 -76
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/attributes/attributeDetailsFragment.js +1 -0
- package/dist/_queries/attributes/attributeDetailsFragment.js.map +1 -1
- package/dist/_utils/attributeType.d.ts +2 -1
- package/dist/_utils/attributeType.js +2 -1
- package/dist/_utils/attributeType.js.map +1 -1
- package/dist/components/Explorer/DataView.js +3 -3
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +1 -1
- package/dist/components/Explorer/Explorer.js +13 -4
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerToolbar.js +11 -2
- package/dist/components/Explorer/ExplorerToolbar.js.map +1 -1
- package/dist/components/Explorer/TableCell.js +25 -9
- package/dist/components/Explorer/TableCell.js.map +1 -1
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.d.ts +1 -1
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.js +99 -31
- package/dist/components/Explorer/_queries/prepareFiltersForRequest.js.map +1 -1
- package/dist/components/Explorer/_queries/useExplorerData.js +32 -27
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +74 -8
- package/dist/components/Explorer/_types.js +5 -0
- package/dist/components/Explorer/_types.js.map +1 -1
- package/dist/components/Explorer/actions-item/useReplaceItemAction.d.ts +2 -1
- package/dist/components/Explorer/actions-item/useReplaceItemAction.js +2 -2
- package/dist/components/Explorer/actions-item/useReplaceItemAction.js.map +1 -1
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.d.ts +3 -1
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +9 -19
- package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -1
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.d.ts +6 -3
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +5 -19
- package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js.map +1 -1
- package/dist/components/Explorer/link-item/LinkModal.d.ts +3 -0
- package/dist/components/Explorer/link-item/LinkModal.js +44 -4
- package/dist/components/Explorer/link-item/LinkModal.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +4 -4
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.d.ts +9 -3
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js +78 -13
- package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +21 -8
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +2 -2
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js +9 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueListDropDown.d.ts +9 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueListDropDown.js +131 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueListDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TreeAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TreeAttributeDropDown.js +69 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TreeAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.d.ts +6 -1
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +43 -4
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js +29 -8
- package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +2 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +3 -2
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +57 -14
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
- package/dist/components/Explorer/useLoadView.d.ts +1 -1
- package/dist/components/Explorer/useLoadView.js +32 -38
- package/dist/components/Explorer/useLoadView.js.map +1 -1
- package/dist/components/Explorer/useSearchInput.js +2 -0
- package/dist/components/Explorer/useSearchInput.js.map +1 -1
- package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js +1 -12
- package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +33 -214
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.d.ts +3 -3
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +15 -22
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +6 -16
- package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.d.ts +5 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.js +28 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useTabManagement.d.ts +11 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useTabManagement.js +35 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useTabManagement.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/FormDivider/FormDivider.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.js +6 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +6 -33
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.d.ts +3 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.js +9 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record-in-edition/useLinkRecords.d.ts → link-record/useExplorerLinkRecords.d.ts} +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record-in-edition/useLinkRecords.js → link-record/useExplorerLinkRecords.js} +3 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useExplorerLinkRecords.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record-in-edition/useLinkRecordsInEdition.d.ts → link-record/useLinkRecords.d.ts} +5 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js +76 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +26 -21
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +10 -23
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/{useDisplayTreeNode.d.ts → TreeNodeList.d.ts} +3 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.js +5 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.d.ts +1 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js +12 -16
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js +51 -63
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.d.ts +1 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.js +6 -10
- package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +45 -7
- package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +46 -8
- package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +2 -1
- package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.d.ts +3 -0
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +7 -1
- package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -1
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.d.ts +2 -5
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +1 -1
- package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js.map +1 -1
- package/dist/components/RecordEdition/index.d.ts +1 -1
- package/dist/components/RecordEdition/index.js +1 -1
- package/dist/components/RecordEdition/index.js.map +1 -1
- package/dist/components/RecordHistory/RecordHistory.d.ts +8 -0
- package/dist/components/RecordHistory/RecordHistory.js +33 -0
- package/dist/components/RecordHistory/RecordHistory.js.map +1 -0
- package/dist/components/RecordHistory/RecordHistoryLogEntry.d.ts +8 -0
- package/dist/components/RecordHistory/RecordHistoryLogEntry.js +53 -0
- package/dist/components/RecordHistory/RecordHistoryLogEntry.js.map +1 -0
- package/dist/components/RecordHistory/_types.d.ts +8 -0
- package/dist/components/RecordHistory/_types.js +2 -0
- package/dist/components/RecordHistory/_types.js.map +1 -0
- package/dist/components/RecordHistory/hooks/useFetchRecordHistory.d.ts +14 -0
- package/dist/components/RecordHistory/hooks/useFetchRecordHistory.js +25 -0
- package/dist/components/RecordHistory/hooks/useFetchRecordHistory.js.map +1 -0
- package/dist/components/RecordHistory/index.d.ts +1 -0
- package/dist/components/{LinkSelect → RecordHistory}/index.js +1 -2
- package/dist/components/RecordHistory/index.js.map +1 -0
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.d.ts +2 -0
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js +6 -4
- package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +5 -3
- package/dist/components/SelectTreeNode/SelectTreeNode.js +2 -3
- package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +3 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +68 -55
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
- package/dist/components/SelectTreeNode/_types.d.ts +18 -0
- package/dist/components/SelectTreeNode/_types.js +2 -0
- package/dist/components/SelectTreeNode/_types.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -1
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js +2 -2
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
- package/dist/hooks/useIFrameMessenger/types.d.ts +2 -0
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.d.ts +3 -3
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js +5 -1
- package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js.map +1 -1
- package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.d.ts +6 -3
- package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.js +1 -3
- package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.js.map +1 -1
- package/dist/locales/en/shared.json +14 -1
- package/dist/locales/fr/shared.json +13 -0
- package/package.json +17 -4
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +0 -10
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +0 -75
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +0 -1
- package/dist/components/LinkSelect/LinkSelect.d.ts +0 -15
- package/dist/components/LinkSelect/LinkSelect.js +0 -88
- package/dist/components/LinkSelect/LinkSelect.js.map +0 -1
- package/dist/components/LinkSelect/index.d.ts +0 -2
- package/dist/components/LinkSelect/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecord/creationErrorContext.d.ts +0 -6
- package/dist/components/RecordEdition/EditRecord/creationErrorContext.js +0 -7
- package/dist/components/RecordEdition/EditRecord/creationErrorContext.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.d.ts +0 -5
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js +0 -28
- package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.d.ts +0 -121
- package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js +0 -31
- package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useEditRecord.d.ts +0 -5
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useEditRecord.js +0 -39
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useEditRecord.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useUnselectRecord.d.ts +0 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useUnselectRecord.js +0 -23
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useUnselectRecord.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-mass/useUnselectAllRecords.d.ts +0 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-mass/useUnselectAllRecords.js +0 -23
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-mass/useUnselectAllRecords.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useCreateRecord.d.ts +0 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useCreateRecord.js +0 -26
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useCreateRecord.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useRecordSelector.d.ts +0 -12
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useRecordSelector.js +0 -24
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useRecordSelector.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecords.d.ts +0 -19
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecords.js +0 -103
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecords.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecordsInCreation.d.ts +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecordsInCreation.js +0 -104
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecordsInCreation.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecords.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecordsInEdition.js +0 -311
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecordsInEdition.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/LinkActionsButtons.d.ts +0 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/LinkActionsButtons.js +0 -15
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/LinkActionsButtons.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.d.ts +0 -4
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.js +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/ValuesList.d.ts +0 -16
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/ValuesList.js +0 -35
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/ValuesList.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/index.js +0 -6
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/useDisplayTreeNode.js +0 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/useDisplayTreeNode.js.map +0 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { KitSpace, KitTypography } from 'aristid-ds';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { RecordHistoryLogEntry } from './RecordHistoryLogEntry';
|
|
5
|
+
import { useFetchRecordHistory } from './hooks/useFetchRecordHistory';
|
|
6
|
+
import { ErrorDisplay } from '../ErrorDisplay';
|
|
7
|
+
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
8
|
+
import { Loading } from '../Loading';
|
|
9
|
+
const StyledDivContentWrapper = styled.div `
|
|
10
|
+
margin-top: calc(var(--general-spacing-s) * 1px);
|
|
11
|
+
`;
|
|
12
|
+
export const RecordHistory = ({ record, attributeId }) => {
|
|
13
|
+
const { t } = useSharedTranslation();
|
|
14
|
+
const { loading, inError, logs } = useFetchRecordHistory({
|
|
15
|
+
record: {
|
|
16
|
+
id: record.id,
|
|
17
|
+
libraryId: record.library.id
|
|
18
|
+
},
|
|
19
|
+
attributeId
|
|
20
|
+
});
|
|
21
|
+
if (loading) {
|
|
22
|
+
return _jsx(Loading, {});
|
|
23
|
+
}
|
|
24
|
+
if (inError) {
|
|
25
|
+
return _jsx(ErrorDisplay, { message: t('record_history.error_fetching') });
|
|
26
|
+
}
|
|
27
|
+
if (logs.length === 0) {
|
|
28
|
+
return (_jsx(StyledDivContentWrapper, { children: _jsx(KitTypography.Text, { children: t('record_history.empty_history') }) }));
|
|
29
|
+
}
|
|
30
|
+
return (_jsx(StyledDivContentWrapper, { children: _jsx(KitSpace, { size: "s", direction: "vertical", children: logs.map((logEntry, index) => (_jsx(RecordHistoryLogEntry, { index: index, logEntry: logEntry }, index))) }) }));
|
|
31
|
+
};
|
|
32
|
+
export default RecordHistory;
|
|
33
|
+
//# sourceMappingURL=RecordHistory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordHistory.js","sourceRoot":"","sources":["../../../src/components/RecordHistory/RecordHistory.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAEnD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,qBAAqB,EAAC,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AAOnC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA;;CAEzC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAA2C,CAAC,EAAC,MAAM,EAAE,WAAW,EAAC,EAAE,EAAE;IAC3F,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,GAAG,qBAAqB,CAAC;QACnD,MAAM,EAAE;YACJ,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;SAC/B;QACD,WAAW;KACd,CAAC,CAAC;IAEH,IAAI,OAAO,EAAE,CAAC;QACV,OAAO,KAAC,OAAO,KAAG,CAAC;IACvB,CAAC;IAED,IAAI,OAAO,EAAE,CAAC;QACV,OAAO,KAAC,YAAY,IAAC,OAAO,EAAE,CAAC,CAAC,+BAA+B,CAAC,GAAI,CAAC;IACzE,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO,CACH,KAAC,uBAAuB,cACpB,KAAC,aAAa,CAAC,IAAI,cAAE,CAAC,CAAC,8BAA8B,CAAC,GAAsB,GACtD,CAC7B,CAAC;IACN,CAAC;IAED,OAAO,CACH,KAAC,uBAAuB,cACpB,KAAC,QAAQ,IAAC,IAAI,EAAC,GAAG,EAAC,SAAS,EAAC,UAAU,YAClC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,CAC3B,KAAC,qBAAqB,IAAa,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,IAAvC,KAAK,CAAsC,CAC1E,CAAC,GACK,GACW,CAC7B,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { LogEntry } from './_types';
|
|
3
|
+
interface IRecordHistoryLogEntryProps {
|
|
4
|
+
index: number;
|
|
5
|
+
logEntry: LogEntry;
|
|
6
|
+
}
|
|
7
|
+
export declare const RecordHistoryLogEntry: FunctionComponent<IRecordHistoryLogEntryProps>;
|
|
8
|
+
export default RecordHistoryLogEntry;
|
|
@@ -0,0 +1,53 @@
|
|
|
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 { localizedTranslation } from '@leav/utils';
|
|
6
|
+
import { AttributeFormat, LogAction } from '../../_gqlTypes';
|
|
7
|
+
import { useLang } from '../../hooks';
|
|
8
|
+
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
9
|
+
import { KitSpace, KitTypography } from 'aristid-ds';
|
|
10
|
+
import dayjs from 'dayjs';
|
|
11
|
+
export const RecordHistoryLogEntry = ({ index, logEntry }) => {
|
|
12
|
+
const { t } = useSharedTranslation();
|
|
13
|
+
const { lang } = useLang();
|
|
14
|
+
const { action, time, user, topic, before, after } = logEntry;
|
|
15
|
+
const attribute = topic?.attribute;
|
|
16
|
+
const hasValue = (value) => value != null && 'asString' in value && value.asString != null;
|
|
17
|
+
const hasBefore = hasValue(before);
|
|
18
|
+
const hasAfter = hasValue(after);
|
|
19
|
+
const getUserString = () => {
|
|
20
|
+
const email = user?.properties[0]?.values[0]?.payload;
|
|
21
|
+
return email ? (_jsx("a", { href: `mailto:${email}`, style: { textDecoration: 'underline' }, children: email })) : (user?.id || t('record_history.unknown_user'));
|
|
22
|
+
};
|
|
23
|
+
const getDateString = () => dayjs.unix(time).format('DD/MM/YYYY HH:mm:ss'); // Maybe use https://day.js.org/docs/en/display/format#localized-formats if needed
|
|
24
|
+
const getActionString = () => {
|
|
25
|
+
if (attribute?.multiple_values) {
|
|
26
|
+
if (!hasBefore && hasAfter) {
|
|
27
|
+
return t('record_history.action.value_add');
|
|
28
|
+
}
|
|
29
|
+
if (hasBefore && !hasAfter) {
|
|
30
|
+
return t('record_history.action.value_delete');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return t('record_history.action.value_modify');
|
|
34
|
+
};
|
|
35
|
+
const getAttributeLabel = () => localizedTranslation(attribute?.label, lang) || attribute?.id || t('record_history.unknown_attribute');
|
|
36
|
+
const formatValue = (logData) => {
|
|
37
|
+
if (attribute?.format === AttributeFormat.rich_text) {
|
|
38
|
+
return (_jsx(KitTypography.AdvancedParagraph, { size: "fontSize7", ellipsis: { rows: 4, expandable: true }, children: logData.asString }));
|
|
39
|
+
}
|
|
40
|
+
return _jsx(KitTypography.Text, { size: "fontSize7", children: logData.asString });
|
|
41
|
+
};
|
|
42
|
+
const formatValueChange = () => {
|
|
43
|
+
const noValue = _jsx(KitTypography.Text, { size: "fontSize7", children: t('record_history.no_value') });
|
|
44
|
+
return (_jsxs(KitSpace, { size: "xxs", direction: "horizontal", wrap: true, children: [hasBefore ? formatValue(before) : noValue, _jsx(KitTypography.Text, { size: "fontSize7", children: " \u2192 " }), hasAfter ? formatValue(after) : noValue] }));
|
|
45
|
+
};
|
|
46
|
+
switch (action) {
|
|
47
|
+
case LogAction.VALUE_SAVE:
|
|
48
|
+
case LogAction.VALUE_DELETE:
|
|
49
|
+
return (_jsxs(KitSpace, { size: "none", direction: "vertical", children: [_jsxs(KitTypography.Text, { size: "fontSize7", children: [getUserString(), " ", getActionString(), " ", _jsx("strong", { children: getAttributeLabel() })] }), _jsx(KitTypography.Text, { size: "fontSize7", children: getDateString() }), formatValueChange()] }, index));
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
export default RecordHistoryLogEntry;
|
|
53
|
+
//# sourceMappingURL=RecordHistoryLogEntry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordHistoryLogEntry.js","sourceRoot":"","sources":["../../../src/components/RecordHistory/RecordHistoryLogEntry.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,eAAe,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AACzD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,CAAC,MAAM,qBAAqB,GAAmD,CAAC,EAAC,KAAK,EAAE,QAAQ,EAAC,EAAE,EAAE;IACvG,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,IAAI,EAAC,GAAG,OAAO,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,UAAU,CAAC;QAC1B,KAAK,SAAS,CAAC,YAAY;YACvB,OAAO,CACH,MAAC,QAAQ,IAAa,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,UAAU,aAClD,MAAC,aAAa,CAAC,IAAI,IAAC,IAAI,EAAC,WAAW,aAC/B,aAAa,EAAE,OAAG,eAAe,EAAE,OAAE,2BAAS,iBAAiB,EAAE,GAAU,IAC3D,EACrB,KAAC,aAAa,CAAC,IAAI,IAAC,IAAI,EAAC,WAAW,YAAE,aAAa,EAAE,GAAsB,EAC1E,iBAAiB,EAAE,KALT,KAAK,CAMT,CACd,CAAC;IACV,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GetRecordHistoryQuery, RecordHistoryLogAttributeFragment } from '../../_gqlTypes';
|
|
2
|
+
export type LogEntry = GetRecordHistoryQuery['logs'][number];
|
|
3
|
+
export type LogEntryValue = Extract<LogEntry, {
|
|
4
|
+
before?: any;
|
|
5
|
+
after?: any;
|
|
6
|
+
}>;
|
|
7
|
+
export type LogEntryAttribute = RecordHistoryLogAttributeFragment;
|
|
8
|
+
export type LogEntryData = LogEntryValue['before'] | LogEntryValue['after'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../src/components/RecordHistory/_types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LogEntry } from '../_types';
|
|
2
|
+
export interface IUseFetchRecordHistoryHook {
|
|
3
|
+
loading: boolean;
|
|
4
|
+
inError: boolean;
|
|
5
|
+
logs: LogEntry[];
|
|
6
|
+
}
|
|
7
|
+
export interface IUseFetchRecordHistoryProps {
|
|
8
|
+
record: {
|
|
9
|
+
id: string;
|
|
10
|
+
libraryId: string;
|
|
11
|
+
};
|
|
12
|
+
attributeId?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const useFetchRecordHistory: ({ record, attributeId }: IUseFetchRecordHistoryProps) => IUseFetchRecordHistoryHook;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { LogAction, useGetRecordHistoryQuery } from '../../../_gqlTypes';
|
|
5
|
+
const RECORD_HISTORY_LOGS_LIMIT = 50;
|
|
6
|
+
export const useFetchRecordHistory = ({ record, attributeId }) => {
|
|
7
|
+
const { loading, error, data: history } = useGetRecordHistoryQuery({
|
|
8
|
+
fetchPolicy: 'network-only',
|
|
9
|
+
variables: {
|
|
10
|
+
record: {
|
|
11
|
+
id: record.id,
|
|
12
|
+
libraryId: record.libraryId
|
|
13
|
+
},
|
|
14
|
+
attributeId,
|
|
15
|
+
actions: [LogAction.VALUE_SAVE, LogAction.VALUE_DELETE],
|
|
16
|
+
pagination: { limit: RECORD_HISTORY_LOGS_LIMIT, offset: 0 }
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
return {
|
|
20
|
+
loading,
|
|
21
|
+
inError: !!error,
|
|
22
|
+
logs: history?.logs || []
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=useFetchRecordHistory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchRecordHistory.js","sourceRoot":"","sources":["../../../../src/components/RecordHistory/hooks/useFetchRecordHistory.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAE,wBAAwB,EAAC,MAAM,eAAe,CAAC;AAclE,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAErC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAClC,MAAM,EACN,WAAW,EACe,EAA8B,EAAE;IAC1D,MAAM,EAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAC,GAAG,wBAAwB,CAAC;QAC7D,WAAW,EAAE,cAAc;QAC3B,SAAS,EAAE;YACP,MAAM,EAAE;gBACJ,EAAE,EAAE,MAAM,CAAC,EAAE;gBACb,SAAS,EAAE,MAAM,CAAC,SAAS;aAC9B;YACD,WAAW;YACX,OAAO,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,YAAY,CAAC;YACvD,UAAU,EAAE,EAAC,KAAK,EAAE,yBAAyB,EAAE,MAAM,EAAE,CAAC,EAAC;SAC5D;KACJ,CAAC,CAAC;IACH,OAAO;QACH,OAAO;QACP,OAAO,EAAE,CAAC,CAAC,KAAK;QAChB,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE;KAC5B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RecordHistory } from './RecordHistory';
|
|
@@ -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 LinkSelect;
|
|
4
|
+
export { RecordHistory } from './RecordHistory';
|
|
6
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/RecordHistory/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC"}
|
|
@@ -6,6 +6,8 @@ interface ISelectRecordForLinkModalProps {
|
|
|
6
6
|
open: boolean;
|
|
7
7
|
childLibraryId: string;
|
|
8
8
|
replacementMode: boolean;
|
|
9
|
+
valuesList?: string[];
|
|
10
|
+
allowFreeEntry: boolean;
|
|
9
11
|
joinLibraryContext?: JoinLibraryContextFragment;
|
|
10
12
|
selectionMode: ComponentProps<typeof Explorer>['selectionMode'];
|
|
11
13
|
hideSelectAllAction: ComponentProps<typeof Explorer>['hideSelectAllAction'];
|
|
@@ -47,7 +47,7 @@ const ModalMainStyledDiv = styled.div `
|
|
|
47
47
|
height: 100%;
|
|
48
48
|
position: relative;
|
|
49
49
|
`;
|
|
50
|
-
export const SelectRecordForLinkModal = ({ className, open, childLibraryId, replacementMode, selectionMode, joinLibraryContext, hideSelectAllAction, onSelectionCompleted, onClose }) => {
|
|
50
|
+
export const SelectRecordForLinkModal = ({ className, open, childLibraryId, replacementMode, valuesList, allowFreeEntry, selectionMode, joinLibraryContext, hideSelectAllAction, onSelectionCompleted, onClose }) => {
|
|
51
51
|
const { t } = useSharedTranslation();
|
|
52
52
|
const explorerContainerRef = useRef(null);
|
|
53
53
|
const _handleClose = () => {
|
|
@@ -62,8 +62,10 @@ export const SelectRecordForLinkModal = ({ className, open, childLibraryId, repl
|
|
|
62
62
|
});
|
|
63
63
|
return (_jsx(StyledModal, { className: className, open: open, onCancel: _handleClose, destroyOnClose: true, closable: false, cancelText: t('global.cancel'), width: "90vw", centered: true, footer: _footer, children: _jsx(ModalMainStyledDiv, { ref: explorerContainerRef, children: _jsx(Explorer.EditSettingsContextProvider, { panelElement: () => explorerContainerRef.current ?? document.body, children: _jsx(Explorer, { entrypoint: {
|
|
64
64
|
type: 'library',
|
|
65
|
-
libraryId: childLibraryId
|
|
66
|
-
|
|
65
|
+
libraryId: childLibraryId,
|
|
66
|
+
valuesList,
|
|
67
|
+
allowFreeEntry
|
|
68
|
+
}, showCreateOnNoResultOnly: true, selectionMode: selectionMode, hideSelectAllAction: hideSelectAllAction, massActions: [
|
|
67
69
|
{
|
|
68
70
|
label: replacementMode
|
|
69
71
|
? t('explorer.massAction.replace-link')
|
|
@@ -78,6 +80,6 @@ export const SelectRecordForLinkModal = ({ className, open, childLibraryId, repl
|
|
|
78
80
|
});
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
|
-
], primaryActions: [], defaultActionsForItem: [], defaultMassActions: [], itemActions: [], defaultPrimaryActions: [], joinLibraryContext: joinLibraryContext, showSearch: true }) }) }) }));
|
|
83
|
+
], primaryActions: [], defaultActionsForItem: [], defaultMassActions: [], itemActions: [], defaultPrimaryActions: ['create'], joinLibraryContext: joinLibraryContext, showSearch: true, ignoreViewByDefault: true }) }) }) }));
|
|
82
84
|
};
|
|
83
85
|
//# sourceMappingURL=SelectRecordForLinkModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectRecordForLinkModal.js","sourceRoot":"","sources":["../../../src/components/SelectRecordForLinkModal/SelectRecordForLinkModal.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoC,MAAM,EAAC,MAAM,OAAO,CAAC;AAChE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC3E,+BAA+B;AAC/B,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAwD,gCAAgC,EAAC,MAAM,eAAe,CAAC;AACtH,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAEjD,MAAM,aAAa,GAAG,IAAK,CAAC;AAE5B,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;;;qBAGf,aAAa;;;;;;;;;;;;;;;;;;;CAmBjC,CAAC;AAEF,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAKtC,CAAC;AAEF,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIpC,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectRecordForLinkModal.js","sourceRoot":"","sources":["../../../src/components/SelectRecordForLinkModal/SelectRecordForLinkModal.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoC,MAAM,EAAC,MAAM,OAAO,CAAC;AAChE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC3E,+BAA+B;AAC/B,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAwD,gCAAgC,EAAC,MAAM,eAAe,CAAC;AACtH,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAEjD,MAAM,aAAa,GAAG,IAAK,CAAC;AAE5B,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;;;qBAGf,aAAa;;;;;;;;;;;;;;;;;;;CAmBjC,CAAC;AAEF,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAKtC,CAAC;AAEF,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIpC,CAAC;AAgBF,MAAM,CAAC,MAAM,wBAAwB,GAAsD,CAAC,EACxF,SAAS,EACT,IAAI,EACJ,cAAc,EACd,eAAe,EACf,UAAU,EACV,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,OAAO,EACV,EAA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AAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE;wBACT;4BACI,KAAK,EAAE,eAAe;gCAClB,CAAC,CAAC,CAAC,CAAC,kCAAkC,CAAC;gCACvC,CAAC,CAAC,CAAC,CAAC,8BAA8B,CAAC;4BACvC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,KAAC,aAAa,KAAG,CAAC,CAAC,CAAC,KAAC,MAAM,KAAG;4BACtD,QAAQ,EAAE,KAAK,EAAC,mBAAmB,EAAC,EAAE;gCAClC,MAAM,uBAAuB,CAAC;oCAC1B,SAAS,EAAE;wCACP,SAAS,EAAE,cAAc;wCACzB,OAAO,EAAE,mBAAmB;qCAC/B;iCACJ,CAAC,CAAC;4BACP,CAAC;yBACJ;qBACJ,EACD,cAAc,EAAE,EAAE,EAClB,qBAAqB,EAAE,EAAE,EACzB,kBAAkB,EAAE,EAAE,EACtB,WAAW,EAAE,EAAE,EACf,qBAAqB,EAAE,CAAC,QAAQ,CAAC,EACjC,kBAAkB,EAAE,kBAAkB,EACtC,UAAU,QACV,mBAAmB,SACrB,GAEiC,GACtB,GACX,CACjB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -4,14 +4,16 @@ import { ITreeNodeWithRecord } from '../../types/trees';
|
|
|
4
4
|
interface ISelectTreeNodeProps {
|
|
5
5
|
treeId: string;
|
|
6
6
|
childrenAsRecordValuePermissionFilter?: ChildrenAsRecordValuePermissionFilterInput;
|
|
7
|
-
selectedNodes?: string[];
|
|
8
|
-
disabledNodes?: string[];
|
|
9
7
|
onSelect: (node: ITreeNodeWithRecord, selected: boolean) => void;
|
|
10
8
|
onCheck?: (selection: ITreeNodeWithRecord[]) => void;
|
|
9
|
+
selectedNodes?: string[];
|
|
10
|
+
disabledNodes?: string[];
|
|
11
|
+
selectableLibraries?: string[];
|
|
11
12
|
multiple?: boolean;
|
|
13
|
+
checkStrictly?: boolean;
|
|
12
14
|
checkable?: boolean;
|
|
13
15
|
canSelectRoot?: boolean;
|
|
14
|
-
|
|
16
|
+
loadRecursively?: boolean;
|
|
15
17
|
}
|
|
16
18
|
export declare const SelectTreeNode: FunctionComponent<ISelectTreeNodeProps>;
|
|
17
19
|
export {};
|
|
@@ -9,7 +9,7 @@ import { ErrorDisplay } from '../..';
|
|
|
9
9
|
import useLang from '../../hooks/useLang';
|
|
10
10
|
import { SelectTreeNodeContent } from './SelectTreeNodeContent';
|
|
11
11
|
import { SelectTreeNodeContentSkeleton } from './SelectTreeNodeContentSkeleton';
|
|
12
|
-
export const SelectTreeNode = ({ treeId, childrenAsRecordValuePermissionFilter, onSelect, onCheck, selectedNodes, disabledNodes, multiple = false, checkable = false, canSelectRoot = false,
|
|
12
|
+
export const SelectTreeNode = ({ treeId, childrenAsRecordValuePermissionFilter, onSelect, onCheck, selectedNodes, disabledNodes, selectableLibraries, multiple = false, checkStrictly = true, checkable = false, canSelectRoot = false, loadRecursively = false }) => {
|
|
13
13
|
const { lang } = useLang();
|
|
14
14
|
const { t } = useSharedTranslation();
|
|
15
15
|
const { loading, error, data } = useTreeDataQueryQuery({
|
|
@@ -24,7 +24,6 @@ export const SelectTreeNode = ({ treeId, childrenAsRecordValuePermissionFilter,
|
|
|
24
24
|
if (!data?.trees.list[0]) {
|
|
25
25
|
return _jsx(ErrorDisplay, { message: t('error.unknown_tree', { treeId }) });
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
return (_jsx(SelectTreeNodeContent, { treeData: { id: treeId, label }, childrenAsRecordValuePermissionFilter: childrenAsRecordValuePermissionFilter, onCheck: onCheck, onSelect: onSelect, multiple: multiple, checkable: checkable, selectedNodes: selectedNodes, disabledNodes: disabledNodes, canSelectRoot: canSelectRoot, selectableLibraries: selectableLibraries }));
|
|
27
|
+
return (_jsx(SelectTreeNodeContent, { treeData: { id: treeId, label: localizedTranslation(data.trees.list[0].label, lang) || treeId }, childrenAsRecordValuePermissionFilter: childrenAsRecordValuePermissionFilter, onCheck: onCheck, onSelect: onSelect, multiple: multiple, checkable: checkable, checkStrictly: checkStrictly, selectedNodes: selectedNodes, disabledNodes: disabledNodes, canSelectRoot: canSelectRoot, selectableLibraries: selectableLibraries, loadRecursively: loadRecursively }));
|
|
29
28
|
};
|
|
30
29
|
//# sourceMappingURL=SelectTreeNode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectTreeNode.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/SelectTreeNode.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAA6C,qBAAqB,EAAC,MAAM,eAAe,CAAC;AAChG,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AACnC,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAE1C,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,6BAA6B,EAAC,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectTreeNode.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/SelectTreeNode.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAA6C,qBAAqB,EAAC,MAAM,eAAe,CAAC;AAChG,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AACnC,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAE1C,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,6BAA6B,EAAC,MAAM,iCAAiC,CAAC;AAiB9E,MAAM,CAAC,MAAM,cAAc,GAA4C,CAAC,EACpE,MAAM,E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,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,eAAe,EAAE,eAAe,GAClC,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
+
import { ITreeNodeWithRecord } from '../../types';
|
|
2
3
|
import { ChildrenAsRecordValuePermissionFilterInput } from '../../_gqlTypes';
|
|
3
|
-
import { ITreeNodeWithRecord } from '../../types/trees';
|
|
4
4
|
interface ISelectTreeNodeContentProps {
|
|
5
5
|
treeData: {
|
|
6
6
|
id: string;
|
|
@@ -13,8 +13,10 @@ interface ISelectTreeNodeContentProps {
|
|
|
13
13
|
onCheck?: (selection: ITreeNodeWithRecord[]) => void;
|
|
14
14
|
multiple?: boolean;
|
|
15
15
|
checkable?: boolean;
|
|
16
|
+
checkStrictly?: boolean;
|
|
16
17
|
canSelectRoot?: boolean;
|
|
17
18
|
selectableLibraries?: string[];
|
|
19
|
+
loadRecursively?: boolean;
|
|
18
20
|
}
|
|
19
21
|
export declare const SelectTreeNodeContent: FunctionComponent<ISelectTreeNodeContentProps>;
|
|
20
22
|
export {};
|
|
@@ -2,30 +2,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
3
|
// This file is released under LGPL V3
|
|
4
4
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { useEffect, useRef, useState } from 'react';
|
|
6
|
+
import { KitTree } from 'aristid-ds';
|
|
5
7
|
import { Spin } from 'antd';
|
|
6
|
-
import { useEffect, useState } from 'react';
|
|
7
|
-
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
8
8
|
import { useTreeNodeChildrenLazyQuery } from '../../_gqlTypes';
|
|
9
9
|
import { defaultPaginationPageSize, ErrorDisplay } from '../..';
|
|
10
|
-
import { KitTree } from 'aristid-ds';
|
|
11
10
|
import { TreeNodeTitle } from './TreeNodeTitle';
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
record: e.record,
|
|
15
|
-
title: e.record.whoAmI.label || e.record.whoAmI.id,
|
|
16
|
-
id: e.id,
|
|
17
|
-
key: e.id,
|
|
18
|
-
isLeaf: !e.childrenCount,
|
|
19
|
-
children: []
|
|
20
|
-
}));
|
|
21
|
-
export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePermissionFilter, onSelect, onCheck, selectedNodes: initSelectedNodes, disabledNodes, multiple = false, checkable = false, canSelectRoot = false, selectableLibraries }) => {
|
|
22
|
-
const { t } = useSharedTranslation();
|
|
11
|
+
import { _isObjectSelection } from './_types';
|
|
12
|
+
export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePermissionFilter, onSelect, onCheck, selectedNodes, disabledNodes, multiple = false, checkable = false, checkStrictly = true, canSelectRoot = false, selectableLibraries, loadRecursively = false }) => {
|
|
23
13
|
const rootNode = {
|
|
24
14
|
title: tree.label,
|
|
25
15
|
record: null,
|
|
26
16
|
id: tree.id,
|
|
27
17
|
key: tree.id,
|
|
28
18
|
isLeaf: false,
|
|
19
|
+
parents: [],
|
|
29
20
|
paginationOffset: 0,
|
|
30
21
|
children: []
|
|
31
22
|
};
|
|
@@ -34,12 +25,16 @@ export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePer
|
|
|
34
25
|
const [treeMap, setTreeMap] = useState({
|
|
35
26
|
[tree.id]: rootNode
|
|
36
27
|
});
|
|
37
|
-
const [selectedNodes, setSelectedNodes] = useState(initSelectedNodes);
|
|
38
28
|
const [fetchError, setFetchError] = useState();
|
|
39
29
|
const [loadTreeContent, { error, called }] = useTreeNodeChildrenLazyQuery();
|
|
40
|
-
const
|
|
30
|
+
const isFetching = useRef(false);
|
|
31
|
+
const _fetchTreeContent = async (parentNodeKey, offset = 0, currentTreeMap = { ...treeMap }) => {
|
|
41
32
|
try {
|
|
42
|
-
|
|
33
|
+
if (isFetching.current) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
isFetching.current = true;
|
|
37
|
+
const { data: { treeNodeChildren } } = await loadTreeContent({
|
|
43
38
|
variables: {
|
|
44
39
|
treeId: tree.id,
|
|
45
40
|
node: parentNodeKey && parentNodeKey !== tree.id ? parentNodeKey : null,
|
|
@@ -50,51 +45,56 @@ export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePer
|
|
|
50
45
|
childrenAsRecordValuePermissionFilter
|
|
51
46
|
}
|
|
52
47
|
});
|
|
53
|
-
const formattedNodes = _constructTreeContent(data.data.treeNodeChildren.list);
|
|
54
48
|
const parentMapKey = parentNodeKey ?? tree.id;
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
|
|
49
|
+
const parentElement = currentTreeMap[parentMapKey];
|
|
50
|
+
const parentPath = parentElement?.parents ?? [];
|
|
51
|
+
const currentParents = [...parentPath, parentMapKey];
|
|
52
|
+
const formattedNodes = treeNodeChildren.list.map(e => ({
|
|
53
|
+
record: e.record,
|
|
54
|
+
title: e.record.whoAmI.label || e.record.whoAmI.id,
|
|
55
|
+
id: e.id,
|
|
56
|
+
key: e.id,
|
|
57
|
+
isLeaf: !e.childrenCount,
|
|
58
|
+
children: [],
|
|
59
|
+
parents: currentParents,
|
|
60
|
+
paginationOffset: 0,
|
|
61
|
+
disabled: disabledNodes?.includes(e.id)
|
|
62
|
+
}));
|
|
63
|
+
parentElement.children = [
|
|
64
|
+
...parentElement.children.filter(child => !child.key.startsWith(`__showMore${parentMapKey}`)),
|
|
65
|
+
...formattedNodes
|
|
66
|
+
];
|
|
60
67
|
for (const node of formattedNodes) {
|
|
61
|
-
|
|
62
|
-
...node,
|
|
63
|
-
paginationOffset: 0,
|
|
64
|
-
disabled: disabledNodes?.includes(node.id)
|
|
65
|
-
};
|
|
66
|
-
newTreeMap[nodeForTreeMap.key] = nodeForTreeMap;
|
|
67
|
-
parentElement.paginationOffset = offset;
|
|
68
|
-
parentElement.children.push(nodeForTreeMap);
|
|
68
|
+
currentTreeMap[node.key] = node;
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
key: showMoreKey,
|
|
74
|
-
record: null,
|
|
75
|
-
title: t('tree-node-selection.show_more'),
|
|
76
|
-
isLeaf: false,
|
|
77
|
-
paginationOffset: 0,
|
|
78
|
-
isShowMore: true,
|
|
79
|
-
selectable: false,
|
|
80
|
-
children: []
|
|
81
|
-
};
|
|
82
|
-
parentElement.children.push(showMoreElement);
|
|
70
|
+
const newOffset = offset + defaultPaginationPageSize;
|
|
71
|
+
if (treeNodeChildren.totalCount > newOffset) {
|
|
72
|
+
await _fetchTreeContent(parentNodeKey, newOffset, currentTreeMap);
|
|
83
73
|
}
|
|
84
|
-
|
|
85
|
-
|
|
74
|
+
if (loadRecursively) {
|
|
75
|
+
for (const node of formattedNodes) {
|
|
76
|
+
if (!node.isLeaf) {
|
|
77
|
+
await _fetchTreeContent(node.key, 0, currentTreeMap);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
setTreeMap(currentTreeMap);
|
|
82
|
+
setFetchError(undefined);
|
|
86
83
|
}
|
|
87
84
|
catch (err) {
|
|
88
85
|
setFetchError(err.message);
|
|
89
86
|
}
|
|
87
|
+
finally {
|
|
88
|
+
isFetching.current = false;
|
|
89
|
+
}
|
|
90
90
|
};
|
|
91
91
|
useEffect(() => {
|
|
92
|
-
|
|
93
|
-
}, [initSelectedNodes]);
|
|
94
|
-
useEffect(() => {
|
|
95
|
-
// Load root
|
|
96
|
-
_fetchTreeContent();
|
|
92
|
+
_fetchTreeContent(undefined, 0);
|
|
97
93
|
}, []);
|
|
94
|
+
/**
|
|
95
|
+
* In strict mode, loadData handler is called twice
|
|
96
|
+
* https://github.com/ant-design/ant-design/issues/54497
|
|
97
|
+
*/
|
|
98
98
|
const _handleLoadData = async (nodeData) => {
|
|
99
99
|
const { id, isShowMore } = nodeData;
|
|
100
100
|
// Handle offset if we get here through the "show more" element
|
|
@@ -115,8 +115,22 @@ export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePer
|
|
|
115
115
|
(!isRoot && selectableLibraries && !selectableLibraries.includes(node.record.whoAmI.library.id))) {
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
|
+
const getAllDescendants = (nodeId) => treeMap[nodeId].children.reduce((acc, child) => [...acc, child.id, ...getAllDescendants(child.id)], []);
|
|
118
119
|
if (node) {
|
|
119
|
-
|
|
120
|
+
if (checkable) {
|
|
121
|
+
const isDeselecting = selectedNodes.includes(node.id);
|
|
122
|
+
if (isDeselecting) {
|
|
123
|
+
const nodeToDeselect = [node.id, ...node.parents, ...getAllDescendants(node.id)];
|
|
124
|
+
const selectionToKeep = selectedNodes.filter(selectedNode => !nodeToDeselect.includes(selectedNode));
|
|
125
|
+
_handleCheck(selectionToKeep, null);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
_handleCheck([...selectedNodes, node.id], null);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
onSelect(node, e.selected);
|
|
133
|
+
}
|
|
120
134
|
}
|
|
121
135
|
};
|
|
122
136
|
const _handleCheck = selection => {
|
|
@@ -130,10 +144,9 @@ export const SelectTreeNodeContent = ({ treeData: tree, childrenAsRecordValuePer
|
|
|
130
144
|
if (error || fetchError) {
|
|
131
145
|
return _jsx(ErrorDisplay, { message: error?.message ?? fetchError });
|
|
132
146
|
}
|
|
133
|
-
|
|
134
|
-
return (_jsx(KitTree, { defaultExpandedKeys: [tree.id], multiple: multiple, selectedKeys: selectedNodes, checkedKeys: selectedNodes, titleRender: node => {
|
|
147
|
+
return (_jsx(KitTree, { checkStrictly: checkStrictly, treeData: [treeMap[rootNode.key]], loadData: loadRecursively ? undefined : _handleLoadData, multiple: multiple, checkable: checkable, defaultExpandedKeys: selectedNodes?.length > 0 ? [...selectedNodes, tree.id] : [tree.id], selectedKeys: selectedNodes, checkedKeys: selectedNodes, titleRender: node => {
|
|
135
148
|
const dataNode = node;
|
|
136
149
|
return (_jsx(TreeNodeTitle, { title: dataNode.title, checkable: checkable, isSelected: selectedNodes?.includes(dataNode.id), isDisabled: disabledNodes?.includes(dataNode.id) }));
|
|
137
|
-
}, onSelect: _handleSelect, onCheck: _handleCheck
|
|
150
|
+
}, onSelect: _handleSelect, onCheck: _handleCheck }));
|
|
138
151
|
};
|
|
139
152
|
//# sourceMappingURL=SelectTreeNodeContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectTreeNodeContent.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/SelectTreeNodeContent.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,
|
|
1
|
+
{"version":3,"file":"SelectTreeNodeContent.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/SelectTreeNodeContent.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACrF,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAG1B,OAAO,EAA6C,4BAA4B,EAAC,MAAM,eAAe,CAAC;AACvG,OAAO,EAAC,yBAAyB,EAAE,YAAY,EAAC,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,kBAAkB,EAA4B,MAAM,UAAU,CAAC;AAiBvE,MAAM,CAAC,MAAM,qBAAqB,GAAmD,CAAC,EAClF,QAAQ,EAAE,IAAI,EACd,qCAAqC,EACrC,QAAQ,EACR,OAAO,EACP,aAAa,EACb,aAAa,EACb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aAAa,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,aAAa,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EACxF,YAAY,EAAE,aAAa,EAC3B,WAAW,EAAE,aAAa,EAC1B,WAAW,EAAE,IAAI,CAAC,EAAE;YAChB,MAAM,QAAQ,GAAG,IAAuB,CAAC;YAEzC,OAAO,CACH,KAAC,aAAa,IACV,KAAK,EAAE,QAAQ,CAAC,KAAK,EACrB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,aAAa,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,EAChD,UAAU,EAAE,aAAa,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,GAClD,CACL,CAAC;QACN,CAAC,EACD,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,YAAY,GACvB,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentProps, Key } from 'react';
|
|
2
|
+
import { KitTree } from 'aristid-ds';
|
|
3
|
+
import { ITreeNodeWithRecord } from '../../types';
|
|
4
|
+
export interface ITreeMapElement extends ITreeNodeWithRecord {
|
|
5
|
+
isLeaf?: boolean;
|
|
6
|
+
paginationOffset: number;
|
|
7
|
+
children: ITreeMapElement[];
|
|
8
|
+
parents?: string[];
|
|
9
|
+
isShowMore?: boolean;
|
|
10
|
+
selectable?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ITreeMap {
|
|
14
|
+
[nodeId: string]: ITreeMapElement;
|
|
15
|
+
}
|
|
16
|
+
type OnCheckFirstParam = Parameters<ComponentProps<typeof KitTree>['onCheck']>[0];
|
|
17
|
+
export declare const _isObjectSelection: (selection: OnCheckFirstParam) => selection is Exclude<OnCheckFirstParam, Key[]>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/_types.ts"],"names":[],"mappings":"AAuBA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAA4B,EAAkD,EAAE,CAC/G,SAAS,IAAI,SAAS,IAAI,aAAa,IAAI,SAAS,CAAC"}
|
|
@@ -26,6 +26,7 @@ export * from './List';
|
|
|
26
26
|
export * from './Loading';
|
|
27
27
|
export * from './RecordCard';
|
|
28
28
|
export * from './RecordEdition';
|
|
29
|
+
export * from './RecordHistory';
|
|
29
30
|
export * from './RecordPreviewWithModal';
|
|
30
31
|
export * from './SearchModal';
|
|
31
32
|
export * from './SelectTreeNode';
|
package/dist/components/index.js
CHANGED
|
@@ -29,6 +29,7 @@ export * from './List';
|
|
|
29
29
|
export * from './Loading';
|
|
30
30
|
export * from './RecordCard';
|
|
31
31
|
export * from './RecordEdition';
|
|
32
|
+
export * from './RecordHistory';
|
|
32
33
|
export * from './RecordPreviewWithModal';
|
|
33
34
|
export * from './SearchModal';
|
|
34
35
|
export * from './SelectTreeNode';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC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c,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kCAAkC,CAAC;AACjD,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC"}
|
|
@@ -43,7 +43,7 @@ export type RecordFormElementAttribute = RecordFormElement['attribute'];
|
|
|
43
43
|
export interface IUseGetRecordFormHook {
|
|
44
44
|
loading: boolean;
|
|
45
45
|
error: ApolloError;
|
|
46
|
-
recordForm: IRecordForm;
|
|
46
|
+
recordForm: IRecordForm | null;
|
|
47
47
|
refetch: RecordFormQueryResult['refetch'];
|
|
48
48
|
}
|
|
49
49
|
declare const useGetRecordForm: ({ libraryId, recordId, formId, version }: {
|