@reltio/components 1.4.1637 → 1.4.1639
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/cjs/components/AttributeGroupIcon/AttributeGroupIcon.js +2 -3
- package/cjs/components/AttributeSelector/AttributeSelector.js +2 -3
- package/cjs/components/AttributesFiltersBuilder/AttributesFiltersBuilder.js +4 -5
- package/cjs/components/BasicTableView/ColumnFilter/FilterChip/FilterChip.d.ts +13 -19
- package/cjs/components/BasicTableView/ColumnFilter/FilterChip/FilterChip.js +6 -17
- package/cjs/components/BasicView/BasicView.d.ts +1 -1
- package/cjs/components/CollaborationItem/Comment/Comment.js +1 -3
- package/cjs/components/CollaborationItem/CommentTarget/CommentTarget.js +2 -4
- package/cjs/components/CollaborationItem/CommentTarget/styles.d.ts +1 -1
- package/cjs/components/CollaborationItem/RepliedComment/RepliedComment.js +1 -3
- package/cjs/components/CollaborationItem/SendMessageArea/SendMessageArea.js +1 -3
- package/cjs/components/ColoredSourceIcon/ColoredSourceIcon.js +1 -3
- package/cjs/components/ConnectionEditor/ConnectionEditor.js +3 -6
- package/cjs/components/DataTenantBadge/DataTenantBadge.js +6 -4
- package/cjs/components/DataTypeValue/DataTypeValue.js +4 -5
- package/cjs/components/EntityAvatar/EntityAvatar.js +4 -5
- package/cjs/components/EntityTypeBadge/EntityTypeBadge.js +4 -6
- package/cjs/components/EntityTypeIcon/EntityTypeIcon.js +2 -3
- package/cjs/components/EntityUriLink/EntityUriLink.js +4 -6
- package/cjs/components/ErrorPopup/ErrorPopup.d.ts +13 -8
- package/cjs/components/ErrorPopup/ErrorPopup.js +23 -18
- package/cjs/components/ErrorPopup/styles.d.ts +1 -1
- package/cjs/components/HierarchyNodeTitle/HierarchyNodeTitle.js +4 -6
- package/cjs/components/ImageAttributesGallery/ImageAttributesGallery.js +2 -6
- package/cjs/components/ImageDetailsView/ImageDetailsViewSidebar/ImageDetailsViewSidebar.d.ts +0 -5
- package/cjs/components/ImageDetailsView/ImageDetailsViewSidebar/ImageDetailsViewSidebar.js +6 -7
- package/cjs/components/ImageDetailsView/MetaInfo/MetaInfo.js +3 -4
- package/cjs/components/ImageDetailsView/MetaInfoList/MetaInfoItem/styles.d.ts +1 -1
- package/cjs/components/ImageDetailsView/MetaInfoList/MetaInfoList.js +3 -4
- package/cjs/components/ImageDetailsView/hooks/useEditMetaInfo.js +3 -10
- package/cjs/components/MatchRulesBlock/SimpleMatchRules/styles.d.ts +1 -1
- package/cjs/components/MatchRulesSelector/MatchRulesSelector.d.ts +1 -4
- package/cjs/components/MatchRulesSelector/MatchRulesSelector.js +2 -4
- package/cjs/components/ModeSwitcher/styles.d.ts +1 -1
- package/cjs/components/PivotingUriLink/PivotingUriLink.js +1 -3
- package/cjs/components/Popper/Popper.d.ts +1 -1
- package/cjs/components/PotentialMatchReviewCard/styles.d.ts +1 -1
- package/cjs/components/ProfileBand/ProfileBand.js +3 -4
- package/cjs/components/ProfileBandNavigation/ProfileBandNavigationWidget.d.ts +1 -1
- package/cjs/components/ProfileBandNavigation/hooks/useSearchNavigation.js +19 -54
- package/cjs/components/ProfileBandNavigation/hooks/useSearchNavigationVisibility.js +4 -8
- package/cjs/components/ProfilesList/ProfilesList.d.ts +2 -3
- package/cjs/components/ProfilesList/ProfilesList.js +3 -1
- package/cjs/components/RelationEditor/RelationEditor.js +46 -33
- package/cjs/components/RelevanceScoreBadge/RelevanceScoreBadge.js +3 -4
- package/cjs/components/SelectAttributesList/SelectAttributesList.js +2 -3
- package/cjs/components/SmallIconButton/SmallIconButton.d.ts +1 -1
- package/cjs/components/SmallIconButton/index.d.ts +1 -1
- package/cjs/components/SourceIcon/SourceIcon.js +2 -3
- package/cjs/components/SourceSystemsSelector/SourceSystemsSelector.js +2 -3
- package/cjs/components/StepNavigation/ProgressButton.d.ts +12 -0
- package/cjs/components/StepNavigation/ProgressButton.js +41 -0
- package/cjs/components/StepNavigation/StepNavigation.d.ts +13 -0
- package/cjs/components/StepNavigation/StepNavigation.js +62 -0
- package/cjs/components/StepNavigation/styles.d.ts +2 -0
- package/cjs/components/StepNavigation/styles.js +44 -0
- package/cjs/components/TenantLabel/TenantLabel.d.ts +6 -0
- package/cjs/components/TenantLabel/TenantLabel.js +22 -0
- package/cjs/components/TenantLabel/styles.d.ts +1 -0
- package/cjs/components/TenantLabel/styles.js +22 -0
- package/cjs/components/TenantsDropDownSelector/TenantsDropDownSelector.js +3 -4
- package/cjs/components/UploadImageDialog/TargetBox/styles.d.ts +1 -1
- package/cjs/components/UploadImageDialog/UploadImageDialog.js +4 -5
- package/cjs/components/UserSelector/UserSelector.js +3 -4
- package/cjs/components/activityLog/ActivityExportButton/ActivityExportButton.js +6 -7
- package/cjs/components/activityLog/ActivityFilterEditor/ActivityFilterEditor.js +2 -3
- package/cjs/components/activityLog/ActivityFilterEditor/EntityChangedSelectors.js +2 -3
- package/cjs/components/activityLog/ActivityFilterEditor/SourceSelector.js +3 -4
- package/cjs/components/activityLog/ActivityLogFilter/ActivityLogFilter.d.ts +1 -1
- package/cjs/components/activityLog/ActivityLogFilter/ActivityLogFilter.js +5 -3
- package/cjs/components/activityLog/activities/GroupActivity.js +2 -3
- package/cjs/components/activityLog/activities/RelationObject/styles.d.ts +1 -1
- package/cjs/components/activityLog/activities/SearchActivity.js +6 -7
- package/cjs/components/activityLog/activities/fields/DeltaField.js +7 -8
- package/cjs/components/activityLog/activities/fields/commonStyles.d.ts +1 -1
- package/cjs/components/activityLog/activities/records/EntityRecord.js +8 -9
- package/cjs/components/attributes/AttributesView/AttributesView.d.ts +2 -2
- package/cjs/components/attributes/AttributesView/AttributesView.js +8 -4
- package/cjs/components/attributes/DescriptionIcon/DescriptionIcon.d.ts +1 -1
- package/cjs/components/attributes/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
- package/cjs/components/attributes/ImageAttributesLine/ImageAttributesLine.js +8 -9
- package/cjs/components/attributes/OvIcon/OvIcon.d.ts +1 -1
- package/cjs/components/attributes/OvIcon/OvIcon.js +4 -6
- package/cjs/components/attributes/PivotingAttributes/PivotingTooltip.js +3 -5
- package/cjs/components/attributes/PivotingAttributes/PivotingTooltipContent.js +3 -4
- package/cjs/components/attributes/PivotingAttributes/styles.d.ts +1 -1
- package/cjs/components/attributes/editMode/AttributesFactory/AttributesFactory.js +1 -1
- package/cjs/components/attributes/editMode/AttributesPager/AttributeRenderer.d.ts +7 -2
- package/cjs/components/attributes/editMode/AttributesPager/AttributesPager.d.ts +2 -38
- package/cjs/components/attributes/editMode/AttributesPager/AttributesPager.js +10 -2
- package/cjs/components/attributes/editMode/AttributesPager/ImageLineRenderer.d.ts +1 -2
- package/cjs/components/attributes/editMode/AttributesPager/index.d.ts +2 -39
- package/cjs/components/attributes/editMode/AttributesPager/index.js +5 -44
- package/cjs/components/attributes/editMode/AttributesPager/styles.d.ts +1 -1
- package/cjs/components/attributes/editMode/AttributesPager/types.d.ts +21 -0
- package/cjs/components/attributes/editMode/AttributesView/AttributesView.d.ts +1 -1
- package/cjs/components/attributes/editMode/AttributesView/AttributesView.js +10 -12
- package/cjs/components/attributes/editMode/EntityCreator/EntityCreator.d.ts +9 -24
- package/cjs/components/attributes/editMode/EntityCreator/EntityCreator.js +7 -15
- package/cjs/components/attributes/editMode/EntitySelector/EntitySelector.js +1 -1
- package/cjs/components/attributes/editMode/EntitySelector/components/SingleValue.js +3 -6
- package/cjs/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
- package/cjs/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.js +8 -10
- package/cjs/components/attributes/editMode/MoreAttributesButton/useMoreAttributesItems.js +2 -3
- package/cjs/components/attributes/editMode/ReferenceAttribute/ReferenceAttribute.js +16 -15
- package/cjs/components/attributes/editMode/Roles/Roles.js +4 -5
- package/cjs/components/attributes/editMode/SimpleAttributeEditor/SimpleAttributeEditor.js +4 -9
- package/cjs/components/attributes/editMode/SimpleAttributeEditor/useAutopopulationContextValue.js +7 -30
- package/cjs/components/attributes/editMode/Tags/Tags.js +3 -4
- package/cjs/components/attributes/inline/ReferenceAttribute/ReferenceAttribute.js +3 -5
- package/cjs/components/attributes/inline/common/SourceItem.js +2 -4
- package/cjs/components/attributes/readMode/AttributesList/AttributesList.js +1 -1
- package/cjs/components/attributes/readMode/AttributesPager/AttributesPager.d.ts +1 -3
- package/cjs/components/attributes/readMode/AttributesPager/AttributesPager.js +7 -2
- package/cjs/components/attributes/readMode/AttributesPager/ImageLineRenderer.d.ts +1 -2
- package/cjs/components/attributes/readMode/AttributesPager/MultiLineRenderer.d.ts +1 -2
- package/cjs/components/attributes/readMode/AttributesPager/styles.d.ts +1 -1
- package/cjs/components/attributes/readMode/AttributesView/AttributesView.d.ts +2 -2
- package/cjs/components/attributes/readMode/AttributesView/AttributesView.js +3 -4
- package/cjs/components/attributes/readMode/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
- package/cjs/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.js +2 -4
- package/cjs/components/attributes/readMode/SpecialAttributes/Roles/Role.js +2 -6
- package/cjs/components/attributes/readMode/SpecialAttributes/Tags/Tag.js +2 -4
- package/cjs/components/attributes/types/attributesView.d.ts +2 -7
- package/cjs/components/crosswalks/AttributesTable/AddAttributesButton/AddAttributesButton.js +2 -3
- package/cjs/components/crosswalks/AttributesTable/AttributesTable.js +2 -3
- package/cjs/components/crosswalks/AttributesTable/cell-renderers/RuleTypeInfoButton.js +21 -17
- package/cjs/components/crosswalks/AttributesTable/cell-renderers/WinnerSourcesRenderer.js +1 -3
- package/cjs/components/crosswalks/CrosswalkAttributes/CrosswalkAttributes.js +9 -10
- package/cjs/components/crosswalks/CrosswalkDragLayer/CrosswalkDragPreview.js +3 -4
- package/cjs/components/crosswalks/CrosswalkRow/CrosswalkRow.js +11 -12
- package/cjs/components/crosswalks/DummyCrosswalkRow/DummyCrosswalkRow.js +3 -4
- package/cjs/components/editors/DataTypeValueEditor/useEditorContext.d.ts +3 -3
- package/cjs/components/editors/DataTypeValueEditor/useEditorContext.js +10 -36
- package/cjs/components/editors/DateRangeEditor/DateRangeEditor.d.ts +3 -3
- package/cjs/components/editors/TypeaheadEditor/TypeaheadEditor.js +1 -1
- package/cjs/components/history/HistoryGraph/HistoryCircle.d.ts +1 -1
- package/cjs/components/history/HistoryGraph/HistoryGraph.d.ts +1 -1
- package/cjs/components/history/HistoryMenuButton/HistoryMenuButton.js +5 -32
- package/cjs/components/history/HistoryTree/HistoryTree.js +9 -8
- package/cjs/components/history/HistoryTree/styles.d.ts +1 -1
- package/cjs/components/history/ProfileBandHistory/ProfileBandHistory.js +5 -31
- package/cjs/components/history/hooks/useHistoryDiff.js +8 -32
- package/cjs/components/history/hooks/useHistorySlice.js +4 -28
- package/cjs/components/index.d.ts +8 -6
- package/cjs/components/index.js +11 -6
- package/cjs/components/workflow/cards/GenericWorkflowTaskCard/styles.d.ts +1 -1
- package/cjs/components/workflow/cards/PotentialMatchTaskCard/PotentialMatchTaskCard.js +4 -5
- package/cjs/components/workflow/components/AttributesChanges/AttributesChanges.js +2 -3
- package/cjs/components/workflow/components/AttributesChanges/components/DiffRenderer/DiffRenderer.js +2 -3
- package/cjs/components/workflow/components/WorkflowComments/styles.d.ts +1 -1
- package/cjs/components/workflow/hooks/useWorkflowActions.js +6 -11
- package/cjs/components/workflow/hooks/useWorkflowAssignee.js +3 -8
- package/cjs/components/workflow/hooks/useWorkflowCheckPermission.js +24 -25
- package/cjs/components/workflow/hooks/useWorkflowComments.js +4 -8
- package/cjs/components/workflow/hooks/useWorkflowDefaultActionSuccessHandler.js +6 -30
- package/cjs/components/workflow/hooks/useWorkflowDefinitions.js +5 -9
- package/cjs/components/workflow/hooks/useWorkflowDueDate.js +4 -8
- package/cjs/components/workflow/hooks/useWorkflowPriority.js +4 -5
- package/cjs/components/workflow/hooks/useWorkflowProcessInstance.js +6 -10
- package/cjs/components/workflow/hooks/useWorkflowTasks.js +11 -15
- package/cjs/contexts/ActionsHookContext/index.d.ts +4 -1
- package/cjs/contexts/CollaborationContext/index.js +2 -2
- package/cjs/contexts/MdmModuleContext/context.d.ts +243 -0
- package/cjs/contexts/MdmModuleContext/context.js +7 -0
- package/cjs/contexts/MdmModuleContext/hooks.d.ts +139 -0
- package/cjs/contexts/MdmModuleContext/hooks.js +206 -0
- package/cjs/contexts/MdmModuleContext/index.d.ts +3 -0
- package/cjs/contexts/MdmModuleContext/index.js +70 -0
- package/cjs/contexts/MdmModuleContext/provider.d.ts +10 -0
- package/cjs/contexts/MdmModuleContext/provider.js +15 -0
- package/cjs/contexts/MdmModuleContext/selectors/dependentLookupEditorContext.d.ts +22 -0
- package/cjs/contexts/MdmModuleContext/selectors/dependentLookupEditorContext.js +132 -0
- package/cjs/contexts/MdmModuleContext/selectors/entity.d.ts +3 -0
- package/cjs/contexts/MdmModuleContext/selectors/entity.js +11 -0
- package/cjs/contexts/MdmModuleContext/selectors.d.ts +3 -0
- package/cjs/contexts/MdmModuleContext/selectors.js +11 -0
- package/cjs/contexts/index.d.ts +1 -0
- package/cjs/contexts/index.js +15 -0
- package/cjs/hooks/useAPI/useAPI.js +14 -40
- package/cjs/hooks/useCollaboration.js +5 -9
- package/cjs/hooks/useCommentsEntitiesMap.js +2 -6
- package/cjs/hooks/useConfigPermissions.js +3 -7
- package/cjs/hooks/useCustomScripts.js +13 -39
- package/cjs/hooks/useEditableConnection.js +2 -6
- package/cjs/hooks/useMarkAsNotMatchRequest.js +4 -8
- package/cjs/hooks/useMatchesLoader.js +5 -9
- package/cjs/hooks/useMergeAllRequest.js +16 -30
- package/cjs/hooks/useReadableSearchState.js +8 -32
- package/cjs/hooks/useRelationsLoader.js +9 -33
- package/cjs/hooks/useScrollToAttributeError/styles.d.ts +1 -1
- package/cjs/hooks/useUsers.js +4 -5
- package/cjs/icons/Tenant.d.ts +3 -0
- package/cjs/icons/Tenant.js +22 -0
- package/esm/components/AttributeGroupIcon/AttributeGroupIcon.js +2 -3
- package/esm/components/AttributeSelector/AttributeSelector.js +2 -3
- package/esm/components/AttributesFiltersBuilder/AttributesFiltersBuilder.js +5 -6
- package/esm/components/BasicTableView/ColumnFilter/FilterChip/FilterChip.d.ts +13 -19
- package/esm/components/BasicTableView/ColumnFilter/FilterChip/FilterChip.js +7 -18
- package/esm/components/BasicView/BasicView.d.ts +1 -1
- package/esm/components/CollaborationItem/Comment/Comment.js +2 -4
- package/esm/components/CollaborationItem/CommentTarget/CommentTarget.js +3 -5
- package/esm/components/CollaborationItem/CommentTarget/styles.d.ts +1 -1
- package/esm/components/CollaborationItem/RepliedComment/RepliedComment.js +2 -4
- package/esm/components/CollaborationItem/SendMessageArea/SendMessageArea.js +2 -4
- package/esm/components/ColoredSourceIcon/ColoredSourceIcon.js +2 -4
- package/esm/components/ConnectionEditor/ConnectionEditor.js +3 -6
- package/esm/components/DataTenantBadge/DataTenantBadge.js +6 -4
- package/esm/components/DataTypeValue/DataTypeValue.js +4 -5
- package/esm/components/EntityAvatar/EntityAvatar.js +4 -5
- package/esm/components/EntityTypeBadge/EntityTypeBadge.js +4 -6
- package/esm/components/EntityTypeIcon/EntityTypeIcon.js +2 -3
- package/esm/components/EntityUriLink/EntityUriLink.js +5 -7
- package/esm/components/ErrorPopup/ErrorPopup.d.ts +13 -8
- package/esm/components/ErrorPopup/ErrorPopup.js +23 -18
- package/esm/components/ErrorPopup/styles.d.ts +1 -1
- package/esm/components/HierarchyNodeTitle/HierarchyNodeTitle.js +5 -7
- package/esm/components/ImageAttributesGallery/ImageAttributesGallery.js +2 -3
- package/esm/components/ImageDetailsView/ImageDetailsViewSidebar/ImageDetailsViewSidebar.d.ts +0 -5
- package/esm/components/ImageDetailsView/ImageDetailsViewSidebar/ImageDetailsViewSidebar.js +6 -7
- package/esm/components/ImageDetailsView/MetaInfo/MetaInfo.js +3 -4
- package/esm/components/ImageDetailsView/MetaInfoList/MetaInfoItem/styles.d.ts +1 -1
- package/esm/components/ImageDetailsView/MetaInfoList/MetaInfoList.js +3 -4
- package/esm/components/ImageDetailsView/hooks/useEditMetaInfo.js +4 -11
- package/esm/components/MatchRulesBlock/SimpleMatchRules/styles.d.ts +1 -1
- package/esm/components/MatchRulesSelector/MatchRulesSelector.d.ts +1 -4
- package/esm/components/MatchRulesSelector/MatchRulesSelector.js +2 -4
- package/esm/components/ModeSwitcher/styles.d.ts +1 -1
- package/esm/components/PivotingUriLink/PivotingUriLink.js +2 -4
- package/esm/components/Popper/Popper.d.ts +1 -1
- package/esm/components/PotentialMatchReviewCard/styles.d.ts +1 -1
- package/esm/components/ProfileBand/ProfileBand.js +3 -4
- package/esm/components/ProfileBandNavigation/ProfileBandNavigationWidget.d.ts +1 -1
- package/esm/components/ProfileBandNavigation/hooks/useSearchNavigation.js +20 -32
- package/esm/components/ProfileBandNavigation/hooks/useSearchNavigationVisibility.js +4 -5
- package/esm/components/ProfilesList/ProfilesList.d.ts +2 -3
- package/esm/components/ProfilesList/ProfilesList.js +3 -1
- package/esm/components/RelationEditor/RelationEditor.js +49 -36
- package/esm/components/RelevanceScoreBadge/RelevanceScoreBadge.js +3 -4
- package/esm/components/SelectAttributesList/SelectAttributesList.js +2 -3
- package/esm/components/SmallIconButton/SmallIconButton.d.ts +1 -1
- package/esm/components/SmallIconButton/index.d.ts +1 -1
- package/esm/components/SourceIcon/SourceIcon.js +2 -3
- package/esm/components/SourceSystemsSelector/SourceSystemsSelector.js +2 -3
- package/esm/components/StepNavigation/ProgressButton.d.ts +12 -0
- package/esm/components/StepNavigation/ProgressButton.js +36 -0
- package/esm/components/StepNavigation/StepNavigation.d.ts +13 -0
- package/esm/components/StepNavigation/StepNavigation.js +57 -0
- package/esm/components/StepNavigation/styles.d.ts +2 -0
- package/esm/components/StepNavigation/styles.js +41 -0
- package/esm/components/TenantLabel/TenantLabel.d.ts +6 -0
- package/esm/components/TenantLabel/TenantLabel.js +17 -0
- package/esm/components/TenantLabel/styles.d.ts +1 -0
- package/esm/components/TenantLabel/styles.js +19 -0
- package/esm/components/TenantsDropDownSelector/TenantsDropDownSelector.js +3 -4
- package/esm/components/UploadImageDialog/TargetBox/styles.d.ts +1 -1
- package/esm/components/UploadImageDialog/UploadImageDialog.js +4 -5
- package/esm/components/UserSelector/UserSelector.js +3 -4
- package/esm/components/activityLog/ActivityExportButton/ActivityExportButton.js +6 -7
- package/esm/components/activityLog/ActivityFilterEditor/ActivityFilterEditor.js +2 -3
- package/esm/components/activityLog/ActivityFilterEditor/EntityChangedSelectors.js +2 -3
- package/esm/components/activityLog/ActivityFilterEditor/SourceSelector.js +3 -4
- package/esm/components/activityLog/ActivityLogFilter/ActivityLogFilter.d.ts +1 -1
- package/esm/components/activityLog/ActivityLogFilter/ActivityLogFilter.js +5 -3
- package/esm/components/activityLog/activities/GroupActivity.js +2 -3
- package/esm/components/activityLog/activities/RelationObject/styles.d.ts +1 -1
- package/esm/components/activityLog/activities/SearchActivity.js +6 -7
- package/esm/components/activityLog/activities/fields/DeltaField.js +7 -8
- package/esm/components/activityLog/activities/fields/commonStyles.d.ts +1 -1
- package/esm/components/activityLog/activities/records/EntityRecord.js +8 -9
- package/esm/components/attributes/AttributesView/AttributesView.d.ts +2 -2
- package/esm/components/attributes/AttributesView/AttributesView.js +10 -6
- package/esm/components/attributes/DescriptionIcon/DescriptionIcon.d.ts +1 -1
- package/esm/components/attributes/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
- package/esm/components/attributes/ImageAttributesLine/ImageAttributesLine.js +9 -10
- package/esm/components/attributes/OvIcon/OvIcon.d.ts +1 -1
- package/esm/components/attributes/OvIcon/OvIcon.js +5 -7
- package/esm/components/attributes/PivotingAttributes/PivotingTooltip.js +4 -6
- package/esm/components/attributes/PivotingAttributes/PivotingTooltipContent.js +3 -4
- package/esm/components/attributes/PivotingAttributes/styles.d.ts +1 -1
- package/esm/components/attributes/editMode/AttributesFactory/AttributesFactory.js +1 -1
- package/esm/components/attributes/editMode/AttributesPager/AttributeRenderer.d.ts +7 -2
- package/esm/components/attributes/editMode/AttributesPager/AttributesPager.d.ts +2 -38
- package/esm/components/attributes/editMode/AttributesPager/AttributesPager.js +12 -4
- package/esm/components/attributes/editMode/AttributesPager/ImageLineRenderer.d.ts +1 -2
- package/esm/components/attributes/editMode/AttributesPager/index.d.ts +2 -39
- package/esm/components/attributes/editMode/AttributesPager/index.js +2 -19
- package/esm/components/attributes/editMode/AttributesPager/styles.d.ts +1 -1
- package/esm/components/attributes/editMode/AttributesPager/types.d.ts +21 -0
- package/esm/components/attributes/editMode/AttributesView/AttributesView.d.ts +1 -1
- package/esm/components/attributes/editMode/AttributesView/AttributesView.js +11 -13
- package/esm/components/attributes/editMode/EntityCreator/EntityCreator.d.ts +9 -24
- package/esm/components/attributes/editMode/EntityCreator/EntityCreator.js +7 -15
- package/esm/components/attributes/editMode/EntitySelector/EntitySelector.js +1 -1
- package/esm/components/attributes/editMode/EntitySelector/components/SingleValue.js +4 -7
- package/esm/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
- package/esm/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.js +8 -10
- package/esm/components/attributes/editMode/MoreAttributesButton/useMoreAttributesItems.js +2 -3
- package/esm/components/attributes/editMode/ReferenceAttribute/ReferenceAttribute.js +18 -17
- package/esm/components/attributes/editMode/Roles/Roles.js +4 -5
- package/esm/components/attributes/editMode/SimpleAttributeEditor/SimpleAttributeEditor.js +5 -10
- package/esm/components/attributes/editMode/SimpleAttributeEditor/useAutopopulationContextValue.js +7 -7
- package/esm/components/attributes/editMode/Tags/Tags.js +3 -4
- package/esm/components/attributes/inline/ReferenceAttribute/ReferenceAttribute.js +4 -6
- package/esm/components/attributes/inline/common/SourceItem.js +3 -5
- package/esm/components/attributes/readMode/AttributesList/AttributesList.js +1 -1
- package/esm/components/attributes/readMode/AttributesPager/AttributesPager.d.ts +1 -3
- package/esm/components/attributes/readMode/AttributesPager/AttributesPager.js +7 -2
- package/esm/components/attributes/readMode/AttributesPager/ImageLineRenderer.d.ts +1 -2
- package/esm/components/attributes/readMode/AttributesPager/MultiLineRenderer.d.ts +1 -2
- package/esm/components/attributes/readMode/AttributesPager/styles.d.ts +1 -1
- package/esm/components/attributes/readMode/AttributesView/AttributesView.d.ts +2 -2
- package/esm/components/attributes/readMode/AttributesView/AttributesView.js +4 -5
- package/esm/components/attributes/readMode/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
- package/esm/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.js +4 -6
- package/esm/components/attributes/readMode/SpecialAttributes/Roles/Role.js +2 -3
- package/esm/components/attributes/readMode/SpecialAttributes/Tags/Tag.js +3 -5
- package/esm/components/attributes/types/attributesView.d.ts +2 -7
- package/esm/components/crosswalks/AttributesTable/AddAttributesButton/AddAttributesButton.js +2 -3
- package/esm/components/crosswalks/AttributesTable/AttributesTable.js +2 -3
- package/esm/components/crosswalks/AttributesTable/cell-renderers/RuleTypeInfoButton.js +21 -17
- package/esm/components/crosswalks/AttributesTable/cell-renderers/WinnerSourcesRenderer.js +2 -4
- package/esm/components/crosswalks/CrosswalkAttributes/CrosswalkAttributes.js +9 -10
- package/esm/components/crosswalks/CrosswalkDragLayer/CrosswalkDragPreview.js +3 -4
- package/esm/components/crosswalks/CrosswalkRow/CrosswalkRow.js +12 -13
- package/esm/components/crosswalks/DummyCrosswalkRow/DummyCrosswalkRow.js +3 -4
- package/esm/components/editors/DataTypeValueEditor/useEditorContext.d.ts +3 -3
- package/esm/components/editors/DataTypeValueEditor/useEditorContext.js +10 -13
- package/esm/components/editors/DateRangeEditor/DateRangeEditor.d.ts +3 -3
- package/esm/components/editors/TypeaheadEditor/TypeaheadEditor.js +1 -1
- package/esm/components/history/HistoryGraph/HistoryCircle.d.ts +1 -1
- package/esm/components/history/HistoryGraph/HistoryGraph.d.ts +1 -1
- package/esm/components/history/HistoryMenuButton/HistoryMenuButton.js +5 -9
- package/esm/components/history/HistoryTree/HistoryTree.js +9 -8
- package/esm/components/history/HistoryTree/styles.d.ts +1 -1
- package/esm/components/history/ProfileBandHistory/ProfileBandHistory.js +5 -8
- package/esm/components/history/hooks/useHistoryDiff.js +8 -9
- package/esm/components/history/hooks/useHistorySlice.js +4 -5
- package/esm/components/index.d.ts +8 -6
- package/esm/components/index.js +8 -6
- package/esm/components/workflow/cards/GenericWorkflowTaskCard/styles.d.ts +1 -1
- package/esm/components/workflow/cards/PotentialMatchTaskCard/PotentialMatchTaskCard.js +4 -5
- package/esm/components/workflow/components/AttributesChanges/AttributesChanges.js +2 -3
- package/esm/components/workflow/components/AttributesChanges/components/DiffRenderer/DiffRenderer.js +2 -3
- package/esm/components/workflow/components/WorkflowComments/styles.d.ts +1 -1
- package/esm/components/workflow/hooks/useWorkflowActions.js +5 -7
- package/esm/components/workflow/hooks/useWorkflowAssignee.js +4 -6
- package/esm/components/workflow/hooks/useWorkflowCheckPermission.js +24 -22
- package/esm/components/workflow/hooks/useWorkflowComments.js +4 -5
- package/esm/components/workflow/hooks/useWorkflowDefaultActionSuccessHandler.js +7 -8
- package/esm/components/workflow/hooks/useWorkflowDefinitions.js +5 -6
- package/esm/components/workflow/hooks/useWorkflowDueDate.js +4 -5
- package/esm/components/workflow/hooks/useWorkflowPriority.js +4 -5
- package/esm/components/workflow/hooks/useWorkflowProcessInstance.js +6 -7
- package/esm/components/workflow/hooks/useWorkflowTasks.js +11 -12
- package/esm/contexts/ActionsHookContext/index.d.ts +4 -1
- package/esm/contexts/CollaborationContext/index.js +1 -1
- package/esm/contexts/MdmModuleContext/context.d.ts +243 -0
- package/esm/contexts/MdmModuleContext/context.js +4 -0
- package/esm/contexts/MdmModuleContext/hooks.d.ts +139 -0
- package/esm/contexts/MdmModuleContext/hooks.js +139 -0
- package/esm/contexts/MdmModuleContext/index.d.ts +3 -0
- package/esm/contexts/MdmModuleContext/index.js +2 -0
- package/esm/contexts/MdmModuleContext/provider.d.ts +10 -0
- package/esm/contexts/MdmModuleContext/provider.js +8 -0
- package/esm/contexts/MdmModuleContext/selectors/dependentLookupEditorContext.d.ts +22 -0
- package/esm/contexts/MdmModuleContext/selectors/dependentLookupEditorContext.js +123 -0
- package/esm/contexts/MdmModuleContext/selectors/entity.d.ts +3 -0
- package/esm/contexts/MdmModuleContext/selectors/entity.js +6 -0
- package/esm/contexts/MdmModuleContext/selectors.d.ts +3 -0
- package/esm/contexts/MdmModuleContext/selectors.js +6 -0
- package/esm/contexts/index.d.ts +1 -0
- package/esm/contexts/index.js +1 -0
- package/esm/hooks/useAPI/useAPI.js +15 -18
- package/esm/hooks/useCollaboration.js +5 -6
- package/esm/hooks/useCommentsEntitiesMap.js +2 -3
- package/esm/hooks/useConfigPermissions.js +3 -4
- package/esm/hooks/useCustomScripts.js +14 -17
- package/esm/hooks/useEditableConnection.js +2 -3
- package/esm/hooks/useMarkAsNotMatchRequest.js +4 -5
- package/esm/hooks/useMatchesLoader.js +5 -6
- package/esm/hooks/useMergeAllRequest.js +16 -7
- package/esm/hooks/useReadableSearchState.js +8 -9
- package/esm/hooks/useRelationsLoader.js +9 -10
- package/esm/hooks/useScrollToAttributeError/styles.d.ts +1 -1
- package/esm/hooks/useUsers.js +4 -5
- package/esm/icons/Tenant.d.ts +3 -0
- package/esm/icons/Tenant.js +17 -0
- package/package.json +3 -4
- package/cjs/components/ProfileBandNavigation/helpers/index.d.ts +0 -7
- package/cjs/components/ProfileBandNavigation/helpers/index.js +0 -70
- package/cjs/components/ProfileBandNavigation/types/index.d.ts +0 -15
- package/cjs/components/ProfileBandNavigation/types/index.js +0 -2
- package/cjs/components/ProfilesList/index.d.ts +0 -27
- package/cjs/components/ProfilesList/index.js +0 -16
- package/cjs/components/RelationEditor/index.d.ts +0 -6
- package/cjs/components/RelationEditor/index.js +0 -50
- package/cjs/components/attributes/AttributesView/index.d.ts +0 -7
- package/cjs/components/attributes/AttributesView/index.js +0 -15
- package/cjs/components/attributes/editMode/AttributesView/index.d.ts +0 -23
- package/cjs/components/attributes/editMode/AttributesView/index.js +0 -14
- package/cjs/components/attributes/editMode/EntityCreator/index.d.ts +0 -25
- package/cjs/components/attributes/editMode/EntityCreator/index.js +0 -42
- package/cjs/components/attributes/editMode/ReferenceAttribute/index.d.ts +0 -4
- package/cjs/components/attributes/editMode/ReferenceAttribute/index.js +0 -48
- package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.d.ts +0 -2
- package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.js +0 -34
- package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.d.ts +0 -1
- package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.js +0 -19
- package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.d.ts +0 -1
- package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.js +0 -20
- package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.d.ts +0 -5
- package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.js +0 -79
- package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/types.d.ts +0 -11
- package/cjs/components/attributes/readMode/AttributesPager/index.d.ts +0 -28
- package/cjs/components/attributes/readMode/AttributesPager/index.js +0 -43
- package/cjs/components/attributes/readMode/AttributesView/index.d.ts +0 -23
- package/cjs/components/attributes/readMode/AttributesView/index.js +0 -14
- package/cjs/test-utils/store-utils.d.ts +0 -78
- package/cjs/test-utils/store-utils.js +0 -19
- package/esm/components/ProfileBandNavigation/helpers/index.d.ts +0 -7
- package/esm/components/ProfileBandNavigation/helpers/index.js +0 -66
- package/esm/components/ProfileBandNavigation/types/index.d.ts +0 -15
- package/esm/components/ProfileBandNavigation/types/index.js +0 -1
- package/esm/components/ProfilesList/index.d.ts +0 -27
- package/esm/components/ProfilesList/index.js +0 -10
- package/esm/components/RelationEditor/index.d.ts +0 -6
- package/esm/components/RelationEditor/index.js +0 -21
- package/esm/components/attributes/AttributesView/index.d.ts +0 -7
- package/esm/components/attributes/AttributesView/index.js +0 -9
- package/esm/components/attributes/editMode/AttributesView/index.d.ts +0 -23
- package/esm/components/attributes/editMode/AttributesView/index.js +0 -8
- package/esm/components/attributes/editMode/EntityCreator/index.d.ts +0 -25
- package/esm/components/attributes/editMode/EntityCreator/index.js +0 -13
- package/esm/components/attributes/editMode/ReferenceAttribute/index.d.ts +0 -4
- package/esm/components/attributes/editMode/ReferenceAttribute/index.js +0 -19
- package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.d.ts +0 -2
- package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.js +0 -27
- package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.d.ts +0 -1
- package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.js +0 -15
- package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.d.ts +0 -1
- package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.js +0 -13
- package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.d.ts +0 -5
- package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.js +0 -72
- package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/types.d.ts +0 -11
- package/esm/components/attributes/readMode/AttributesPager/index.d.ts +0 -28
- package/esm/components/attributes/readMode/AttributesPager/index.js +0 -14
- package/esm/components/attributes/readMode/AttributesView/index.d.ts +0 -23
- package/esm/components/attributes/readMode/AttributesView/index.js +0 -8
- package/esm/test-utils/store-utils.d.ts +0 -78
- package/esm/test-utils/store-utils.js +0 -12
- /package/cjs/components/attributes/editMode/{SimpleAttributeEditor/selectors → AttributesPager}/types.js +0 -0
- /package/esm/components/attributes/editMode/{SimpleAttributeEditor/selectors → AttributesPager}/types.js +0 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
+
};
|
|
21
|
+
import { defaultTo, isNil, map, path, pipe, prepend, reject, uniq, prop, equals } from 'ramda';
|
|
22
|
+
import { areOneHierarchyUris, filterRelatedParentValuesForDependentLookupValueUri, getAttributeValuePath, getBaseUri, getParentUri, isDependentLookupAttrType, getDependentLookupsStructureNode, getDependentLookupEditorState, getAllRelationsToAddAndEdit } from '@reltio/mdm-sdk';
|
|
23
|
+
import i18n from 'ui-i18n';
|
|
24
|
+
var DLEditorContextCache = {};
|
|
25
|
+
export var fromCache = function (valueUri, context) {
|
|
26
|
+
var cachedContext = DLEditorContextCache[valueUri];
|
|
27
|
+
if (equals(context, cachedContext)) {
|
|
28
|
+
return cachedContext;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
if (equals(cachedContext === null || cachedContext === void 0 ? void 0 : cachedContext.parents, context.parents)) {
|
|
32
|
+
context.parents = cachedContext.parents;
|
|
33
|
+
}
|
|
34
|
+
DLEditorContextCache[valueUri] = context;
|
|
35
|
+
return context;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var joinWords = function (words) {
|
|
39
|
+
return words.reduce(function (result, word, i) { return [result, word].join(i === words.length - 1 ? " ".concat(i18n.text('and'), " ") : ', '); });
|
|
40
|
+
};
|
|
41
|
+
export var buildMissedParentsMessage = function (missedAttributeTypes) {
|
|
42
|
+
if (!missedAttributeTypes.length)
|
|
43
|
+
return '';
|
|
44
|
+
return i18n.text('Please select value for ${labels} ${attributes}.', {
|
|
45
|
+
labels: joinWords(missedAttributeTypes.map(pipe(prop('label'), function (label) { return "'".concat(label, "'"); }))),
|
|
46
|
+
attributes: missedAttributeTypes.length === 1 ? i18n.text('attribute') : i18n.text('attributes')
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
var getTypesMapKey = function (parent) { return "".concat(parent.type, "_").concat(getParentUri(parent.uri)); };
|
|
50
|
+
var getParents = function (_a) {
|
|
51
|
+
var _b;
|
|
52
|
+
var dependentLookups = _a.dependentLookups, metadata = _a.metadata, modifiedEntities = _a.modifiedEntities, entityUri = _a.entityUri, relations = _a.relations, node = _a.node, valueUri = _a.valueUri;
|
|
53
|
+
var parentNodesValues = node.parents.flatMap(function (type) {
|
|
54
|
+
var parentNode = getDependentLookupsStructureNode(dependentLookups, type);
|
|
55
|
+
return parentNode.values.map(function (value) { return (__assign(__assign({}, value), { type: type, dependentLookupCode: parentNode.attrType.dependentLookupCode })); });
|
|
56
|
+
});
|
|
57
|
+
var connections = getAllRelationsToAddAndEdit(relations);
|
|
58
|
+
var ownParentNodesValues = filterRelatedParentValuesForDependentLookupValueUri({
|
|
59
|
+
parentValues: parentNodesValues,
|
|
60
|
+
valueUri: valueUri,
|
|
61
|
+
entityUri: entityUri,
|
|
62
|
+
modifiedEntities: modifiedEntities,
|
|
63
|
+
connections: connections
|
|
64
|
+
});
|
|
65
|
+
var possibleParentBaseTypeUris = pipe(getAttributeValuePath, defaultTo([]), map(pipe(path(['valueType', 'uri']), getBaseUri)), prepend((_b = modifiedEntities[entityUri]) === null || _b === void 0 ? void 0 : _b.type), reject(isNil), uniq)({ entityUri: entityUri, entitiesMap: modifiedEntities, connections: connections, metadata: metadata }, valueUri);
|
|
66
|
+
var neededParentsAttributeTypes = node.parents
|
|
67
|
+
.filter(function (typeUri) { return possibleParentBaseTypeUris.some(areOneHierarchyUris(typeUri)); })
|
|
68
|
+
.map(function (typeUri) {
|
|
69
|
+
var parentNode = getDependentLookupsStructureNode(dependentLookups, typeUri);
|
|
70
|
+
return parentNode.attrType;
|
|
71
|
+
});
|
|
72
|
+
var missedParentsAttributeTypes = neededParentsAttributeTypes.filter(function (attrType) { return !ownParentNodesValues.some(function (_a) {
|
|
73
|
+
var type = _a.type, value = _a.value;
|
|
74
|
+
return value && type === attrType.uri;
|
|
75
|
+
}); });
|
|
76
|
+
var parents = Object.values(ownParentNodesValues.reduce(function (typesMap, parent) {
|
|
77
|
+
var _a;
|
|
78
|
+
var _b;
|
|
79
|
+
var key = getTypesMapKey(parent);
|
|
80
|
+
return __assign(__assign({}, typesMap), (_a = {}, _a[key] = {
|
|
81
|
+
type: parent.dependentLookupCode,
|
|
82
|
+
codeValues: uniq(__spreadArray([parent.value], (((_b = typesMap[key]) === null || _b === void 0 ? void 0 : _b.codeValues) || []), true))
|
|
83
|
+
.filter(Boolean)
|
|
84
|
+
.sort()
|
|
85
|
+
}, _a));
|
|
86
|
+
}, {})).filter(function (item) { return !!item.codeValues.length; });
|
|
87
|
+
return { parents: parents, missedParentsAttributeTypes: missedParentsAttributeTypes };
|
|
88
|
+
};
|
|
89
|
+
export var getDependentLookupEditorContext = function (_a) {
|
|
90
|
+
var dependentLookups = _a.dependentLookups, metadata = _a.metadata, modifiedEntities = _a.modifiedEntities, entityUri = _a.entityUri, relations = _a.relations, attributeValue = _a.attributeValue, attributeType = _a.attributeType;
|
|
91
|
+
if (!isDependentLookupAttrType(attributeType)) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
var attributeTypeUri = attributeType.uri;
|
|
95
|
+
var node = getDependentLookupsStructureNode(dependentLookups, attributeTypeUri);
|
|
96
|
+
if (node) {
|
|
97
|
+
var valueUri = attributeValue.uri;
|
|
98
|
+
var _b = getParents({
|
|
99
|
+
dependentLookups: dependentLookups,
|
|
100
|
+
metadata: metadata,
|
|
101
|
+
modifiedEntities: modifiedEntities,
|
|
102
|
+
entityUri: entityUri,
|
|
103
|
+
relations: relations,
|
|
104
|
+
valueUri: valueUri,
|
|
105
|
+
node: node
|
|
106
|
+
}), parents = _b.parents, missedParentsAttributeTypes = _b.missedParentsAttributeTypes;
|
|
107
|
+
var _c = (getDependentLookupEditorState(dependentLookups, valueUri) || {}).isBlocked, isBlocked = _c === void 0 ? false : _c;
|
|
108
|
+
var missedParentsMessage = buildMissedParentsMessage(missedParentsAttributeTypes);
|
|
109
|
+
var isEmptyValue = !(attributeValue === null || attributeValue === void 0 ? void 0 : attributeValue.lookupCode) && !(attributeValue === null || attributeValue === void 0 ? void 0 : attributeValue.value);
|
|
110
|
+
var placeholder = (isEmptyValue && isBlocked && i18n.text('Populating values...')) ||
|
|
111
|
+
(isEmptyValue && missedParentsMessage) ||
|
|
112
|
+
'';
|
|
113
|
+
var context = {
|
|
114
|
+
parents: missedParentsMessage ? null : parents,
|
|
115
|
+
disabled: (!!missedParentsMessage && isEmptyValue) || isBlocked,
|
|
116
|
+
placeholder: placeholder
|
|
117
|
+
};
|
|
118
|
+
if (placeholder) {
|
|
119
|
+
context.value = null;
|
|
120
|
+
}
|
|
121
|
+
return fromCache(valueUri, context);
|
|
122
|
+
}
|
|
123
|
+
};
|
package/esm/contexts/index.d.ts
CHANGED
|
@@ -31,3 +31,4 @@ export { FeaturesContext } from './FeaturesContext';
|
|
|
31
31
|
export { DependentLookupAutopopulationContext } from './DependentLookupAutopopulationContext';
|
|
32
32
|
export { PageRequestsAbortingContext } from './PageRequestsAbortingContext';
|
|
33
33
|
export { ActionsHookProvider, useActionsHook } from './ActionsHookContext';
|
|
34
|
+
export * from './MdmModuleContext';
|
package/esm/contexts/index.js
CHANGED
|
@@ -31,3 +31,4 @@ export { FeaturesContext } from './FeaturesContext';
|
|
|
31
31
|
export { DependentLookupAutopopulationContext } from './DependentLookupAutopopulationContext';
|
|
32
32
|
export { PageRequestsAbortingContext } from './PageRequestsAbortingContext';
|
|
33
33
|
export { ActionsHookProvider, useActionsHook } from './ActionsHookContext';
|
|
34
|
+
export * from './MdmModuleContext';
|
|
@@ -10,13 +10,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { useCallback, useContext, useEffect, useRef, useState } from 'react';
|
|
13
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
14
|
-
import mdmModule, { ui } from '@reltio/mdm-module';
|
|
15
13
|
import { CustomAction, CustomScriptPlatform, initializeWebWorker, isEmptyValue } from '@reltio/mdm-sdk';
|
|
16
14
|
import { omit } from 'ramda';
|
|
17
15
|
import { useWorkflowCheckPermission } from '../../components/workflow';
|
|
18
16
|
import { useHtmlSanitizer } from '../useHtmlSanitizer';
|
|
19
|
-
import { InterceptHandlersContext, SandboxAPIContext, SnackbarContext } from '../../contexts';
|
|
17
|
+
import { InterceptHandlersContext, SandboxAPIContext, SnackbarContext, useMdmAction, useMdmApiPath, useMdmEntity, useMdmEntityUri, useMdmIsEditableMode, useMdmMetadata, useMdmReltioPath, useMdmSearchProviderData, useMdmServicesPath, useMdmTenant, useMdmUiPath, useMdmUser, useMdmWorkflowEnvironmentUrl, useMdmWorkflowPath } from '../../contexts';
|
|
20
18
|
import { processRequest } from './API';
|
|
21
19
|
import { getWorkerURL, isValidCustomScript, resetHtml, getProcessedTask, setUpRequestInterceptor, setUpResponseInterceptor } from './helpers';
|
|
22
20
|
export var useAPI = function (config) {
|
|
@@ -32,28 +30,27 @@ export var useAPI = function (config) {
|
|
|
32
30
|
var workerRef = useRef();
|
|
33
31
|
var requestListeners = useRef({});
|
|
34
32
|
var responseListeners = useRef({});
|
|
35
|
-
var dispatch = useDispatch();
|
|
36
33
|
var sanitizeHtml = useHtmlSanitizer();
|
|
37
|
-
var
|
|
38
|
-
var
|
|
34
|
+
var openSearch = useMdmAction('openSearch');
|
|
35
|
+
var uiPath = useMdmUiPath();
|
|
36
|
+
var tenant = useMdmTenant();
|
|
39
37
|
var workerUrl = getWorkerURL(uiPath, tenant);
|
|
40
38
|
var showSnackbarMessage = useContext(SnackbarContext);
|
|
41
39
|
var qxApi = useContext(SandboxAPIContext);
|
|
42
40
|
var interceptHandlers = useContext(InterceptHandlersContext);
|
|
43
41
|
var workflowCheckPermission = useWorkflowCheckPermission();
|
|
44
|
-
var metadata =
|
|
45
|
-
var entity =
|
|
46
|
-
var apiPath =
|
|
47
|
-
var servicesPath =
|
|
48
|
-
var reltioPath =
|
|
49
|
-
var workflowPath =
|
|
50
|
-
var user =
|
|
51
|
-
var entityUri =
|
|
52
|
-
var isEditableMode =
|
|
53
|
-
var environment =
|
|
54
|
-
var _j =
|
|
42
|
+
var metadata = useMdmMetadata() || {};
|
|
43
|
+
var entity = useMdmEntity() || {};
|
|
44
|
+
var apiPath = useMdmApiPath();
|
|
45
|
+
var servicesPath = useMdmServicesPath();
|
|
46
|
+
var reltioPath = useMdmReltioPath();
|
|
47
|
+
var workflowPath = useMdmWorkflowPath();
|
|
48
|
+
var user = useMdmUser();
|
|
49
|
+
var entityUri = useMdmEntityUri();
|
|
50
|
+
var isEditableMode = useMdmIsEditableMode();
|
|
51
|
+
var environment = useMdmWorkflowEnvironmentUrl();
|
|
52
|
+
var _j = useMdmSearchProviderData() || {}, typeSearch = _j.type, search = _j.data;
|
|
55
53
|
var searchQuery = typeSearch === 'search' ? search === null || search === void 0 ? void 0 : search.query : null;
|
|
56
|
-
var openSearch = function (search) { return dispatch(ui.actions.openSearch(search)); };
|
|
57
54
|
var innerText = '';
|
|
58
55
|
var popupText = '';
|
|
59
56
|
var process = function (_a) {
|
|
@@ -19,10 +19,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
19
19
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
20
|
};
|
|
21
21
|
import { useCallback, useEffect, useState } from 'react';
|
|
22
|
-
import { useSelector } from 'react-redux';
|
|
23
22
|
import { andThen, fromPairs, map, otherwise, pipe, props, uniqBy, prop, propEq, when, always, assocPath, dissocPath, path, pathOr, mergeRight } from 'ramda';
|
|
24
23
|
import { createComment as createCommentRequest, createReply as createReplyRequest, getComment as getCommentRequest, getCommentsCount as getCommentsCountRequest, updateComment as updateCommentRequest, updateReply as updateReplyRequest, deleteComment as deleteCommentRequest, deleteReply as deleteReplyRequest, getComments as getCommentsRequest, isTempUri } from '@reltio/mdm-sdk';
|
|
25
|
-
import
|
|
24
|
+
import { useMdmCollaborationPath, useMdmEntity, useMdmIsCollaborationEnabled, useMdmTenant } from '../contexts';
|
|
26
25
|
var filterReplies = function (replyId, replies) { return replies.filter(function (reply) { return reply.replyId !== replyId; }); };
|
|
27
26
|
var getUpdatedReplies = function (comment, reply) {
|
|
28
27
|
var changedReplyIndex = comment.replies.findIndex(function (_a) {
|
|
@@ -37,10 +36,10 @@ var defaultObjectIds = [];
|
|
|
37
36
|
var catchErrorInRequest = function (e) { return console.error('Collaboration error', e); };
|
|
38
37
|
export var useCollaboration = function (_a) {
|
|
39
38
|
var _b = _a.objectIds, objectIds = _b === void 0 ? defaultObjectIds : _b, objectTypes = _a.objectTypes, _c = _a.enabled, enabled = _c === void 0 ? true : _c;
|
|
40
|
-
var entity =
|
|
41
|
-
var tenant =
|
|
42
|
-
var collaborationPath =
|
|
43
|
-
var isCollaborationEnabled =
|
|
39
|
+
var entity = useMdmEntity();
|
|
40
|
+
var tenant = useMdmTenant();
|
|
41
|
+
var collaborationPath = useMdmCollaborationPath();
|
|
42
|
+
var isCollaborationEnabled = useMdmIsCollaborationEnabled() && enabled;
|
|
44
43
|
var _d = useState(null), pageToken = _d[0], setPageToken = _d[1];
|
|
45
44
|
var _e = useState([]), comments = _e[0], setComments = _e[1];
|
|
46
45
|
var _f = useState(null), commentsMap = _f[0], setCommentsMap = _f[1];
|
|
@@ -11,14 +11,13 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { useCallback, useEffect, useState } from 'react';
|
|
13
13
|
import { concat, difference, isEmpty, map, pipe, prop, reduce, reject, uniq } from 'ramda';
|
|
14
|
-
import { useSelector } from 'react-redux';
|
|
15
|
-
import mdm from '@reltio/mdm-module';
|
|
16
14
|
import { ActivityFilters, FilterOptions, getFilteredEntities, isEntityUri, getEntity } from '@reltio/mdm-sdk';
|
|
17
15
|
import { useSafePromise } from './useSafePromise';
|
|
16
|
+
import { useMdmEntityUriWithDataTenant } from '../contexts';
|
|
18
17
|
var SELECT_OPTION = 'uri,label,type';
|
|
19
18
|
export var useCommentsEntitiesMap = function (comments) {
|
|
20
19
|
var safePromise = useSafePromise();
|
|
21
|
-
var currentEntityUri =
|
|
20
|
+
var currentEntityUri = useMdmEntityUriWithDataTenant();
|
|
22
21
|
var _a = useState({}), entitiesMap = _a[0], setEntitiesMap = _a[1];
|
|
23
22
|
var getEntities = useCallback(function (entitiesUris) {
|
|
24
23
|
var requestFilters = [
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { useSelector } from 'react-redux';
|
|
2
|
-
import mdmModule from '@reltio/mdm-module';
|
|
3
|
-
import { checkConfigPermission, ConfigPermissions } from '@reltio/mdm-sdk';
|
|
4
1
|
import { useCallback } from 'react';
|
|
2
|
+
import { checkConfigPermission, ConfigPermissions } from '@reltio/mdm-sdk';
|
|
3
|
+
import { useMdmUserRoles } from '../contexts';
|
|
5
4
|
var emptyArray = [];
|
|
6
5
|
export var useConfigPermissions = function () {
|
|
7
|
-
var userRoles =
|
|
6
|
+
var userRoles = useMdmUserRoles() || emptyArray;
|
|
8
7
|
return {
|
|
9
8
|
canCreate: useCallback(checkConfigPermission(ConfigPermissions.CREATE, userRoles), [userRoles]),
|
|
10
9
|
canRead: useCallback(checkConfigPermission(ConfigPermissions.READ, userRoles), [userRoles]),
|
|
@@ -30,13 +30,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
30
30
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
31
31
|
};
|
|
32
32
|
import { useContext, useEffect, useRef } from 'react';
|
|
33
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
34
|
-
import mdmModule, { ui } from '@reltio/mdm-module';
|
|
35
33
|
import { CustomAction, initializeWebWorker, isEmptyValue } from '@reltio/mdm-sdk';
|
|
36
34
|
import { nanoid } from 'nanoid';
|
|
37
35
|
import { omit } from 'ramda';
|
|
38
36
|
import { useWorkflowCheckPermission } from '../components/workflow';
|
|
39
|
-
import { InterceptHandlersContext, SandboxAPIContext, SnackbarContext } from '../contexts';
|
|
37
|
+
import { InterceptHandlersContext, SandboxAPIContext, SnackbarContext, useMdmAction, useMdmApiPath, useMdmEntity, useMdmEntityUri, useMdmMetadata, useMdmReltioPath, useMdmSearchProviderData, useMdmServicesPath, useMdmTenant, useMdmUiPath, useMdmUser, useMdmWorkflowEnvironmentUrl, useMdmWorkflowPath } from '../contexts';
|
|
40
38
|
import { getWorkerURL, processRequest } from './useAPI';
|
|
41
39
|
import { isValidCustomScript, isURLtoProcess, getProcessedTask, getRequestFakeUrl, getResponseFakeUrl } from './useAPI/helpers';
|
|
42
40
|
var getCustomViewConfig = function (config) {
|
|
@@ -54,22 +52,21 @@ export var useCustomScripts = function (config) {
|
|
|
54
52
|
var showSnackbarMessage = useContext(SnackbarContext);
|
|
55
53
|
var _b = useContext(InterceptHandlersContext), addInternalRequestInterceptor = _b.addInternalRequestInterceptor, addInternalResponseInterceptor = _b.addInternalResponseInterceptor, removeInternalRequestInterceptor = _b.removeInternalRequestInterceptor, removeInternalResponseInterceptor = _b.removeInternalResponseInterceptor;
|
|
56
54
|
var qxApi = useContext(SandboxAPIContext);
|
|
57
|
-
var
|
|
58
|
-
var metadata = (_a =
|
|
59
|
-
var entity =
|
|
60
|
-
var uiPath =
|
|
61
|
-
var servicesPath =
|
|
62
|
-
var reltioPath =
|
|
63
|
-
var tenant =
|
|
55
|
+
var openSearch = useMdmAction('openSearch');
|
|
56
|
+
var metadata = (_a = useMdmMetadata()) !== null && _a !== void 0 ? _a : null;
|
|
57
|
+
var entity = useMdmEntity() || {};
|
|
58
|
+
var uiPath = useMdmUiPath();
|
|
59
|
+
var servicesPath = useMdmServicesPath();
|
|
60
|
+
var reltioPath = useMdmReltioPath();
|
|
61
|
+
var tenant = useMdmTenant();
|
|
64
62
|
var workerUrl = getWorkerURL(uiPath, tenant);
|
|
65
|
-
var apiPath =
|
|
66
|
-
var workflowPath =
|
|
67
|
-
var user =
|
|
68
|
-
var entityUri =
|
|
69
|
-
var environment =
|
|
63
|
+
var apiPath = useMdmApiPath();
|
|
64
|
+
var workflowPath = useMdmWorkflowPath();
|
|
65
|
+
var user = useMdmUser();
|
|
66
|
+
var entityUri = useMdmEntityUri();
|
|
67
|
+
var environment = useMdmWorkflowEnvironmentUrl();
|
|
70
68
|
var workflowCheckPermission = useWorkflowCheckPermission();
|
|
71
|
-
var _c =
|
|
72
|
-
var openSearch = function (search) { return dispatch(ui.actions.openSearch(search)); };
|
|
69
|
+
var _c = useMdmSearchProviderData() || {}, typeSearch = _c.type, search = _c.data;
|
|
73
70
|
var requestListeners = useRef({});
|
|
74
71
|
var responseListeners = useRef({});
|
|
75
72
|
var workers = useRef({});
|
|
@@ -12,11 +12,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { useCallback } from 'react';
|
|
13
13
|
import { isAvailableRelationBetweenEntities, Directions, getRelationType, removeEntityAttribute, addEntityAttributes, changeEntityAttribute } from '@reltio/mdm-sdk';
|
|
14
14
|
import { pipe } from 'ramda';
|
|
15
|
-
import {
|
|
16
|
-
import mdmModule from '@reltio/mdm-module';
|
|
15
|
+
import { useMdmMetadata } from '../contexts';
|
|
17
16
|
export var useEditableConnection = function (_a) {
|
|
18
17
|
var connection = _a.connection, onConnectionChange = _a.onConnectionChange, relatedEntity = _a.relatedEntity;
|
|
19
|
-
var metadata =
|
|
18
|
+
var metadata = useMdmMetadata();
|
|
20
19
|
var onRelationChange = useCallback(function (relation) { return onConnectionChange(__assign(__assign({}, connection), { relation: relation })); }, [connection, onConnectionChange]);
|
|
21
20
|
var handleAddAttributes = useCallback(pipe(addEntityAttributes(connection.relation), onRelationChange), [
|
|
22
21
|
connection.relation,
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { isDataTenantEntity, markDataTenantEntityAsNotMatch, markMixedEntitiesAsNotMatches } from '@reltio/mdm-sdk';
|
|
2
|
-
import { useSelector } from 'react-redux';
|
|
3
|
-
import mdmModule from '@reltio/mdm-module';
|
|
4
1
|
import { useCallback, useState } from 'react';
|
|
2
|
+
import { isDataTenantEntity, markDataTenantEntityAsNotMatch, markMixedEntitiesAsNotMatches } from '@reltio/mdm-sdk';
|
|
5
3
|
import { noop } from '../core';
|
|
6
4
|
import { useIsMountedRef } from './useIsMountedRef';
|
|
5
|
+
import { useMdmDtssPath, useMdmTenant } from '../contexts';
|
|
7
6
|
export var useMarkAsNotMatchRequest = function (_a) {
|
|
8
7
|
var entities = _a.entities, entity = _a.entity, onFinishRequest = _a.onFinishRequest, onStartRequest = _a.onStartRequest, onSuccess = _a.onSuccess, _b = _a.onError, onError = _b === void 0 ? noop : _b;
|
|
9
8
|
var isMountedRef = useIsMountedRef();
|
|
10
|
-
var tenant = useSelector(mdmModule.selectors.getTenant);
|
|
11
|
-
var dtssPath = useSelector(mdmModule.selectors.getDtssPath);
|
|
12
9
|
var _c = useState(false), isPending = _c[0], setIsPending = _c[1];
|
|
10
|
+
var tenant = useMdmTenant();
|
|
11
|
+
var dtssPath = useMdmDtssPath();
|
|
13
12
|
var sendMarkAsNotMatchRequest = useCallback(function () {
|
|
14
13
|
onStartRequest === null || onStartRequest === void 0 ? void 0 : onStartRequest();
|
|
15
14
|
setIsPending(true);
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
|
-
import { useSelector } from 'react-redux';
|
|
3
|
-
import mdmModule from '@reltio/mdm-module';
|
|
4
2
|
import { ActivityFilters, collectAllTransitiveEntitiesUris, getEntitiesMapForTransitiveMatches, getMatchesForDataTenantEntity, getMatchesFromDataTenants, getTransitiveMatches, isDataTenantEntity, isTempUri, withDtssPotentialItems, addGlobalFilterToQuery } from '@reltio/mdm-sdk';
|
|
5
3
|
import { usePagingSimulator } from './usePagingSimulator';
|
|
6
4
|
import { useSafePromise } from './useSafePromise';
|
|
5
|
+
import { useMdmDataTenants, useMdmDtssPath, useMdmGlobalSearchRequestOptions, useMdmTenant } from '../contexts';
|
|
7
6
|
export var useMatchesLoader = function (_a) {
|
|
8
7
|
var enabled = _a.enabled, entity = _a.entity, filter = _a.filter, rules = _a.rules, onFinishLoading = _a.onFinishLoading, onStartLoading = _a.onStartLoading, options = _a.options, page = _a.page, rowsPerPage = _a.rowsPerPage, sorting = _a.sorting, markMatchedValues = _a.markMatchedValues;
|
|
9
8
|
var _b = sorting || {}, order = _b.order, field = _b.field;
|
|
10
9
|
var _c = useState(0), total = _c[0], setTotal = _c[1];
|
|
11
10
|
var _d = useState([]), matches = _d[0], setMatches = _d[1];
|
|
12
11
|
var _e = useState({}), entitiesMap = _e[0], setEntitiesMap = _e[1];
|
|
13
|
-
var tenant =
|
|
14
|
-
var dtssPath =
|
|
15
|
-
var dataTenants =
|
|
16
|
-
var _f =
|
|
12
|
+
var tenant = useMdmTenant();
|
|
13
|
+
var dtssPath = useMdmDtssPath();
|
|
14
|
+
var dataTenants = useMdmDataTenants();
|
|
15
|
+
var _f = useMdmGlobalSearchRequestOptions() || {}, activityFilter = _f.activityFilter, globalFilter = _f.globalFilter;
|
|
17
16
|
var activeness = typeof options.showInactiveEntities === 'boolean'
|
|
18
17
|
? options.showInactiveEntities
|
|
19
18
|
? ActivityFilters.ALL
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { useCallback, useState } from 'react';
|
|
2
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
3
|
-
import mdmModule, { search } from '@reltio/mdm-module';
|
|
4
2
|
import { isDataTenantEntity, mergeCustomerTenantEntityWithMixedEntities, mergeDataTenantEntity } from '@reltio/mdm-sdk';
|
|
5
3
|
import { noop } from '../core';
|
|
6
4
|
import { useIsMountedRef } from './useIsMountedRef';
|
|
7
5
|
import { getWinnerLosersUrisFromMergeResponses } from './helpers/merge';
|
|
6
|
+
import { useMdmAction, useMdmDtssPath, useMdmTenant } from '../contexts';
|
|
8
7
|
export var useMergeAllRequest = function (_a) {
|
|
9
8
|
var entities = _a.entities, entity = _a.entity, onFinishRequest = _a.onFinishRequest, onStartRequest = _a.onStartRequest, onSuccess = _a.onSuccess, _b = _a.onError, onError = _b === void 0 ? noop : _b;
|
|
10
9
|
var isMountedRef = useIsMountedRef();
|
|
11
|
-
var tenant = useSelector(mdmModule.selectors.getTenant);
|
|
12
|
-
var dtssPath = useSelector(mdmModule.selectors.getDtssPath);
|
|
13
10
|
var _c = useState(false), isPending = _c[0], setIsPending = _c[1];
|
|
14
|
-
var
|
|
11
|
+
var updateSearchNavigationDataOnMerge = useMdmAction('updateSearchNavigationDataOnMerge');
|
|
12
|
+
var tenant = useMdmTenant();
|
|
13
|
+
var dtssPath = useMdmDtssPath();
|
|
15
14
|
var sendMergeAllRequest = useCallback(function () {
|
|
16
15
|
onStartRequest === null || onStartRequest === void 0 ? void 0 : onStartRequest();
|
|
17
16
|
setIsPending(true);
|
|
@@ -24,7 +23,7 @@ export var useMergeAllRequest = function (_a) {
|
|
|
24
23
|
var uris = getWinnerLosersUrisFromMergeResponses(entity, entities, responses);
|
|
25
24
|
if (uris) {
|
|
26
25
|
var winnerUri = uris.winnerUri, losersUris = uris.losersUris;
|
|
27
|
-
|
|
26
|
+
updateSearchNavigationDataOnMerge({ winnerUri: winnerUri, losersUris: losersUris });
|
|
28
27
|
}
|
|
29
28
|
})
|
|
30
29
|
.catch(onError)
|
|
@@ -32,6 +31,16 @@ export var useMergeAllRequest = function (_a) {
|
|
|
32
31
|
onFinishRequest === null || onFinishRequest === void 0 ? void 0 : onFinishRequest();
|
|
33
32
|
isMountedRef.current && setIsPending(false);
|
|
34
33
|
});
|
|
35
|
-
}, [
|
|
34
|
+
}, [
|
|
35
|
+
dtssPath,
|
|
36
|
+
entities,
|
|
37
|
+
entity,
|
|
38
|
+
onError,
|
|
39
|
+
onFinishRequest,
|
|
40
|
+
onStartRequest,
|
|
41
|
+
onSuccess,
|
|
42
|
+
tenant,
|
|
43
|
+
updateSearchNavigationDataOnMerge
|
|
44
|
+
]);
|
|
36
45
|
return { isPending: isPending, sendMergeAllRequest: sendMergeAllRequest };
|
|
37
46
|
};
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
3
|
-
import mdmModule, { profile } from '@reltio/mdm-module';
|
|
4
|
-
import { buildReadableQueryToString, getKeywordFromSearchState, getUnresolvedLookupsListFromSearchGroups, resolveLookupsList, getGroupsFromSearchState } from '@reltio/mdm-sdk';
|
|
5
2
|
import { andThen, chain, pipe } from 'ramda';
|
|
3
|
+
import { buildReadableQueryToString, getKeywordFromSearchState, getUnresolvedLookupsListFromSearchGroups, resolveLookupsList, getGroupsFromSearchState } from '@reltio/mdm-sdk';
|
|
4
|
+
import { useMdmAction, useMdmAttributePresentations, useMdmDataTenants, useMdmLookups, useMdmMetadata } from '../contexts';
|
|
6
5
|
export var useReadableSearchState = function (searchState) {
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
6
|
+
var lookupsListResolved = useMdmAction('lookupsListResolved');
|
|
7
|
+
var metadata = useMdmMetadata();
|
|
8
|
+
var dataTenants = useMdmDataTenants();
|
|
9
|
+
var attributePresentations = useMdmAttributePresentations();
|
|
10
|
+
var lookups = useMdmLookups();
|
|
11
11
|
var map = searchState.map;
|
|
12
12
|
var keyword = getKeywordFromSearchState(searchState);
|
|
13
13
|
var groups = getGroupsFromSearchState(metadata, dataTenants, true, searchState);
|
|
14
14
|
var unresolvedLookups = getUnresolvedLookupsListFromSearchGroups(groups, lookups);
|
|
15
|
-
var dispatch = useDispatch();
|
|
16
15
|
useEffect(function () {
|
|
17
16
|
if (unresolvedLookups.length > 0) {
|
|
18
17
|
pipe(chain(function (_a) {
|
|
19
18
|
var type = _a.type, codeValues = _a.codeValues;
|
|
20
19
|
return codeValues.map(function (codeValue) { return ({ type: type, codeValue: codeValue }); });
|
|
21
|
-
}), resolveLookupsList, andThen(
|
|
20
|
+
}), resolveLookupsList, andThen(lookupsListResolved))(unresolvedLookups);
|
|
22
21
|
}
|
|
23
22
|
}, [searchState]); // eslint-disable-line
|
|
24
23
|
return buildReadableQueryToString(metadata, attributePresentations, lookups, groups, keyword, map);
|
|
@@ -10,12 +10,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
13
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
14
13
|
import { cond, pipe, prop, T, evolve, filter as filterFn, when, identity, times, length, ifElse, always } from 'ramda';
|
|
15
|
-
import mdm, { profile } from '@reltio/mdm-module';
|
|
16
14
|
import { ActivityFilter, addGlobalFilterToQuery, getRelationsForDataTenantEntity, getRelationsForEntity, isAvailableEntityTypeUri, isAvailableRelationTypeUri, isDataTenantEntity, isObject, isTempUri, Mode, wrapInArrayIfNeeded } from '@reltio/mdm-sdk';
|
|
17
15
|
import { useSafePromise } from './useSafePromise';
|
|
18
16
|
import { usePrevious } from './usePrevious';
|
|
17
|
+
import { useMdmAction, useMdmDtssPath, useMdmGlobalSearchRequestOptions, useMdmMetadata, useMdmProfileLastLoadedTime, useMdmTenant } from '../contexts';
|
|
19
18
|
var buildSuggestedIds = when(identity, pipe(wrapInArrayIfNeeded, length, times(function (n) { return n + 1; })));
|
|
20
19
|
var isValidRequestConfig = function (config) {
|
|
21
20
|
var _a;
|
|
@@ -31,12 +30,12 @@ var isValidRequestConfig = function (config) {
|
|
|
31
30
|
export var useRelationsLoader = function (_a) {
|
|
32
31
|
var sorting = _a.sorting, filter = _a.filter, page = _a.page, rowsPerPage = _a.rowsPerPage, config = _a.config, entity = _a.entity, relationActivityFilter = _a.relationActivityFilter, mode = _a.mode, _b = _a.searchByOv, searchByOv = _b === void 0 ? false : _b;
|
|
33
32
|
var _c = useState(false), isLoading = _c[0], setIsLoading = _c[1];
|
|
34
|
-
var
|
|
35
|
-
var tenant =
|
|
36
|
-
var metadata =
|
|
37
|
-
var dtssPath =
|
|
38
|
-
var _d =
|
|
39
|
-
var lastLoadedTime =
|
|
33
|
+
var relationsLoaded = useMdmAction('relationsLoaded');
|
|
34
|
+
var tenant = useMdmTenant();
|
|
35
|
+
var metadata = useMdmMetadata();
|
|
36
|
+
var dtssPath = useMdmDtssPath();
|
|
37
|
+
var _d = useMdmGlobalSearchRequestOptions() || {}, activityFilter = _d.activityFilter, globalFilter = _d.globalFilter;
|
|
38
|
+
var lastLoadedTime = useMdmProfileLastLoadedTime();
|
|
40
39
|
var safePromise = useSafePromise();
|
|
41
40
|
var processContent = function (content) {
|
|
42
41
|
var getUri = when(isObject, prop('uri'));
|
|
@@ -94,7 +93,7 @@ export var useRelationsLoader = function (_a) {
|
|
|
94
93
|
throw Error(JSON.stringify(result));
|
|
95
94
|
}
|
|
96
95
|
var _a = result[0], connections = _a.connections, total = _a.total;
|
|
97
|
-
|
|
96
|
+
relationsLoaded({ id: config.id, connections: connections, total: total });
|
|
98
97
|
})
|
|
99
98
|
.catch(function (e) {
|
|
100
99
|
console.warn('Failed to load relations data', e);
|
|
@@ -108,7 +107,7 @@ export var useRelationsLoader = function (_a) {
|
|
|
108
107
|
activityFilter,
|
|
109
108
|
metadata,
|
|
110
109
|
config,
|
|
111
|
-
|
|
110
|
+
relationsLoaded,
|
|
112
111
|
dtssPath,
|
|
113
112
|
entity === null || entity === void 0 ? void 0 : entity.uri,
|
|
114
113
|
entity === null || entity === void 0 ? void 0 : entity.dataTenant,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"highlightError" | "@keyframes highlightAnimation" | "highlightWarning" | "simpleAttribute">;
|
package/esm/hooks/useUsers.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
-
import { useSelector } from 'react-redux';
|
|
3
|
-
import { getAllUsersForTenant } from '@reltio/mdm-sdk';
|
|
4
|
-
import mdm from '@reltio/mdm-module';
|
|
5
2
|
import memoizeOne from 'memoize-one';
|
|
3
|
+
import { getAllUsersForTenant } from '@reltio/mdm-sdk';
|
|
4
|
+
import { useMdmServicesPath, useMdmTenant } from '../contexts';
|
|
6
5
|
var getAllUsersForTenantMemoized = memoizeOne(function (tenant, servicesPath) { return getAllUsersForTenant({ tenant: tenant, servicesPath: servicesPath }); });
|
|
7
6
|
export var useUsers = function () {
|
|
8
7
|
var _a = useState([]), users = _a[0], setUsers = _a[1];
|
|
9
|
-
var tenant =
|
|
10
|
-
var servicesPath =
|
|
8
|
+
var tenant = useMdmTenant();
|
|
9
|
+
var servicesPath = useMdmServicesPath();
|
|
11
10
|
var onError = function (e) {
|
|
12
11
|
console.warn('Users error', e);
|
|
13
12
|
setUsers([]);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
var SvgTenant = function (props) {
|
|
14
|
+
return (React.createElement("svg", __assign({ width: 24, height: 24, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
15
|
+
React.createElement("path", { d: "M2 0h13v2H8v19h12V6h-9V4h11v19H2V0zm9 8h7v2h-7V8zm0 4h7v2h-7v-2zm0 4h7v2h-7v-2zM4 4v2h2V4H4zm0 8v2h2v-2H4zm0-4v2h2V8H4zm0 8v2h2v-2H4z", fill: "#000", stroke: "none", strokeWidth: 1, fillRule: "evenodd" })));
|
|
16
|
+
};
|
|
17
|
+
export default SvgTenant;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1639",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@date-io/moment": "^1.3.5",
|
|
9
|
+
"@fluentui/react-context-selector": "^9.1.26",
|
|
9
10
|
"@react-google-maps/api": "2.7.0",
|
|
10
|
-
"@reltio/mdm-
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.1637",
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1639",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"react-lifecycles-compat": "^3.0.4",
|
|
28
28
|
"react-mentions": "4.3.0",
|
|
29
29
|
"react-number-format": "^4.3.0",
|
|
30
|
-
"react-redux": "^7.2.3",
|
|
31
30
|
"react-resize-detector": "^4.2.0",
|
|
32
31
|
"react-router-dom": "^6.2.1",
|
|
33
32
|
"react-select": "^3.0.4",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SearchNavigationData } from '../types';
|
|
2
|
-
type Payload = {
|
|
3
|
-
winnerUri: string;
|
|
4
|
-
losersUris: string[];
|
|
5
|
-
};
|
|
6
|
-
export declare const applyMergeToSearchNavigationData: (searchNavigationData: SearchNavigationData, payload: Payload) => SearchNavigationData;
|
|
7
|
-
export {};
|