@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
|
@@ -26,7 +26,7 @@ export declare const ChipWithTooltip: React.ForwardRefExoticComponent<import("pr
|
|
|
26
26
|
variant?: import("@mui/types").OverridableStringUnion<"filled" | "outlined", import("@mui/material/Chip").ChipPropsVariantOverrides>;
|
|
27
27
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
28
28
|
ref?: React.Ref<HTMLDivElement>;
|
|
29
|
-
}, "label" | "icon" | "children" | "size" | "color" | "disabled" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "tabIndex" | "variant" | "
|
|
29
|
+
}, "label" | "icon" | "children" | "size" | "color" | "disabled" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "tabIndex" | "variant" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled">>;
|
|
30
30
|
type ComplexWithLabel = NestedAttributeValue | ReferenceAttributeValue;
|
|
31
31
|
type Props = {
|
|
32
32
|
className?: string;
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import React, { useCallback, useContext } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import { useDispatch } from 'react-redux';
|
|
4
|
-
import Chip from '@mui/material/Chip';
|
|
5
3
|
import { getAttrDataTypeDefinition, getAttributeValue, isComplexAttribute, getLabel } from '@reltio/mdm-sdk';
|
|
6
|
-
import
|
|
4
|
+
import Chip from '@mui/material/Chip';
|
|
7
5
|
import DataTypeValue from '../../DataTypeValue/DataTypeValue';
|
|
8
6
|
import { withTooltip } from '../../../HOCs';
|
|
9
|
-
import { EntityContext } from '../../../contexts';
|
|
7
|
+
import { EntityContext, useMdmAction } from '../../../contexts';
|
|
10
8
|
import { getEntityUri } from './heplers';
|
|
11
9
|
import { useStyles } from './styles';
|
|
12
10
|
export var ChipWithTooltip = withTooltip(Chip);
|
|
13
11
|
var OvIcon = function (_a) {
|
|
14
12
|
var className = _a.className, attributeType = _a.attributeType, _b = _a.nonOvValues, nonOvValues = _b === void 0 ? [] : _b, nonOvTotal = _a.nonOvTotal;
|
|
15
13
|
var styles = useStyles();
|
|
16
|
-
var
|
|
14
|
+
var openEntity = useMdmAction('openEntity');
|
|
17
15
|
var entity = useContext(EntityContext);
|
|
18
16
|
var entityUri = getEntityUri(entity, nonOvValues);
|
|
19
17
|
var onClick = useCallback(function () {
|
|
20
|
-
|
|
21
|
-
}, [
|
|
18
|
+
openEntity({ uri: entityUri, viewId: null, screen: 'sources' });
|
|
19
|
+
}, [openEntity, entityUri]);
|
|
22
20
|
if (!nonOvTotal) {
|
|
23
21
|
return null;
|
|
24
22
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
3
2
|
import Tooltip from '@mui/material/Tooltip';
|
|
4
|
-
import mdm, { ui as mdmModuleUi } from '@reltio/mdm-module';
|
|
5
3
|
import { isNested } from '@reltio/mdm-sdk';
|
|
6
4
|
import { isNil } from 'ramda';
|
|
7
|
-
import { PivotingAttributeContext } from '../../../contexts';
|
|
5
|
+
import { PivotingAttributeContext, useMdmAction, useMdmMetadata } from '../../../contexts';
|
|
8
6
|
import { convertNestedAttributePivotingValue, convertSimpleAttributePivotingValue, generatePivotingValue, preparePivotingAttributeValue } from './helpers';
|
|
9
7
|
import PivotingIcon from '../../../icons/PivotingIcon';
|
|
10
8
|
import { PivotingTooltipContent } from './PivotingTooltipContent';
|
|
@@ -14,10 +12,10 @@ export var PivotingTooltip = function (_a) {
|
|
|
14
12
|
var value = _a.value, attributeType = _a.attributeType, children = _a.children, className = _a.className;
|
|
15
13
|
var styles = usePivotingTooltipStyles();
|
|
16
14
|
var contentStyles = useStyles();
|
|
17
|
-
var dispatch = useDispatch();
|
|
18
15
|
var pivotingAttributesList = useContext(PivotingAttributeContext) || [];
|
|
16
|
+
var openPivotingPerspective = useMdmAction('openPivotingPerspective');
|
|
17
|
+
var metadata = useMdmMetadata() || {};
|
|
19
18
|
var isNestedAttribute = isNested(attributeType);
|
|
20
|
-
var metadata = useSelector(mdm.selectors.getMetadata) || {};
|
|
21
19
|
var pivotingValue = isNestedAttribute
|
|
22
20
|
? generatePivotingValue(attributeType, value.value, pivotingAttributesList, metadata)
|
|
23
21
|
: preparePivotingAttributeValue(value.lookupCode || value.value, attributeType);
|
|
@@ -38,7 +36,7 @@ export var PivotingTooltip = function (_a) {
|
|
|
38
36
|
};
|
|
39
37
|
var generatedValue = isPivotingAttribute ? convertPivotingValue() : undefined;
|
|
40
38
|
var handleSeeAllClick = function () {
|
|
41
|
-
|
|
39
|
+
openPivotingPerspective({ value: generatedValue, attributeType: attributeType });
|
|
42
40
|
};
|
|
43
41
|
return isPivotingAttribute ? (React.createElement(Tooltip, { arrow: true, placement: "right-start", classes: styles, disableInteractive: false, title: React.createElement(PivotingTooltipContent, { value: pivotingValue, generatedValue: generatedValue, attributeType: attributeType, config: pivotingAttribute.popup, onSeeAllClick: handleSeeAllClick }) },
|
|
44
42
|
React.createElement("span", { className: className },
|
|
@@ -10,24 +10,23 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import React, { useEffect, useState } from 'react';
|
|
13
|
-
import { useSelector } from 'react-redux';
|
|
14
13
|
import i18n from 'ui-i18n';
|
|
15
|
-
import mdm from '@reltio/mdm-module';
|
|
16
14
|
import { getEntityUriForLink, getFilteredEntities, getLabel, getTotals, convertPivotingValueToSearchFilters } from '@reltio/mdm-sdk';
|
|
17
15
|
import EntityAvatar from '../../EntityAvatar/EntityAvatar';
|
|
18
16
|
import EntityUriLink from '../../EntityUriLink/EntityUriLink';
|
|
19
17
|
import PivotingUriLink from '../../PivotingUriLink/PivotingUriLink';
|
|
20
18
|
import { useSafePromise } from '../../../hooks';
|
|
19
|
+
import { useMdmEntity, useMdmGlobalSearchRequestOptions } from '../../../contexts';
|
|
21
20
|
import { useStyles } from './styles';
|
|
22
21
|
var MAX_ENTITIES_PIVOTING_TOOLTIP = 6;
|
|
23
22
|
export var PivotingTooltipContent = function (_a) {
|
|
24
23
|
var value = _a.value, attributeType = _a.attributeType, _b = _a.config, config = _b === void 0 ? {} : _b, generatedValue = _a.generatedValue, onSeeAllClick = _a.onSeeAllClick;
|
|
25
24
|
var _c = useState([]), entities = _c[0], setEntities = _c[1];
|
|
26
25
|
var _d = useState(0), total = _d[0], setTotal = _d[1];
|
|
27
|
-
var entity = useSelector(mdm.selectors.getEntity) || {};
|
|
28
26
|
var safePromise = useSafePromise();
|
|
29
27
|
var styles = useStyles();
|
|
30
|
-
var
|
|
28
|
+
var entity = useMdmEntity() || {};
|
|
29
|
+
var globalSearchRequestOptions = useMdmGlobalSearchRequestOptions() || {};
|
|
31
30
|
var entityType = config.entityType || entity.type;
|
|
32
31
|
var shouldShowSeeAllButton = total > MAX_ENTITIES_PIVOTING_TOOLTIP;
|
|
33
32
|
useEffect(function () {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"content" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"content" | "icon" | "entityLabel" | "title" | "body" | "entityTypeLabel" | "footer" | "header" | "container" | "divider" | "headerCount" | "profileIcon" | "entityContainer" | "seeAllButton">;
|
|
2
2
|
export declare const usePivotingTooltipStyles: (props?: any) => import("@mui/styles").ClassNameMap<"tooltip" | "arrow">;
|
|
@@ -24,7 +24,7 @@ import React from 'react';
|
|
|
24
24
|
import { DataTypes, isReltioCrosswalk } from '@reltio/mdm-sdk';
|
|
25
25
|
import SimpleAttributeEditor from '../SimpleAttributeEditor/SimpleAttributeEditor';
|
|
26
26
|
import NestedAttribute from '../NestedAttribute/NestedAttribute';
|
|
27
|
-
import ReferenceAttribute from '../ReferenceAttribute';
|
|
27
|
+
import ReferenceAttribute from '../ReferenceAttribute/ReferenceAttribute';
|
|
28
28
|
var EditModeAttributesFactory = /** @class */ (function () {
|
|
29
29
|
function EditModeAttributesFactory() {
|
|
30
30
|
}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AttributeValue, NestedAttributeValue, ReferenceAttributeValue, SimpleAttributeValue } from '@reltio/mdm-sdk';
|
|
3
|
-
import { AttributePagerProps } from './
|
|
2
|
+
import { AttributeValue, NestedAttributeValue, ReferenceAttributeValue, SimpleAttributeValue, AttributeError, RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-sdk';
|
|
3
|
+
import { AttributePagerProps } from './types';
|
|
4
4
|
type Props = Omit<AttributePagerProps, 'values'> & {
|
|
5
5
|
values?: (SimpleAttributeValue | NestedAttributeValue | ReferenceAttributeValue)[];
|
|
6
6
|
nonVisibleValues: AttributeValue[];
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
errors?: AttributeError[];
|
|
9
|
+
max?: number;
|
|
10
|
+
onDeactivateError?: (id: string) => void;
|
|
11
|
+
requestNextPageOfAttributeValues?: (payload: RequestNextPageOfAttributeValuesPayload) => void;
|
|
7
12
|
};
|
|
8
13
|
declare const _default: React.MemoExoticComponent<{
|
|
9
14
|
({ max, values, attributeType, parentUri, mode, drawLines, showEmptyEditors, errorMessage, errors, paging, crosswalks, showNonOv, nonVisibleValues, highlightedError, highlightedAttribute, onAddAttributes, onDeleteAttribute, onChangeAttribute, onDeactivateError, additionalControlsRenderer, requestNextPageOfAttributeValues }: Props): JSX.Element;
|
|
@@ -1,40 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
declare const _default: React.ComponentType<
|
|
4
|
-
errorMessage: string;
|
|
5
|
-
errors: AttributeError[];
|
|
6
|
-
max: number;
|
|
7
|
-
} & {
|
|
8
|
-
onDeactivateError: (id: string) => void;
|
|
9
|
-
requestNextPageOfAttributeValues: (payload: import("@reltio/mdm-module").RequestNextPageOfAttributeValuesPayload) => void;
|
|
10
|
-
} & {
|
|
11
|
-
values: (string | number | SimpleAttributeValue | NestedAttributeValue | ReferenceAttributeValue | import("@reltio/mdm-sdk").ImageAttributeValue)[];
|
|
12
|
-
attributeType: AttributeType;
|
|
13
|
-
paging?: import("@reltio/mdm-sdk").Paging;
|
|
14
|
-
mode?: Mode;
|
|
15
|
-
crosswalks?: import("@reltio/mdm-sdk").Crosswalk[];
|
|
16
|
-
parentUri: string;
|
|
17
|
-
drawLines: boolean;
|
|
18
|
-
max?: number;
|
|
19
|
-
showEmptyEditors: boolean;
|
|
20
|
-
showNonOv?: boolean;
|
|
21
|
-
onAddAttributes: (params: import("@reltio/mdm-sdk").AttributeItem[]) => void;
|
|
22
|
-
onDeleteAttribute: (param: import("@reltio/mdm-sdk").AttributeItem) => void;
|
|
23
|
-
onChangeAttribute: (param: import("@reltio/mdm-sdk").AttributeItem) => void;
|
|
24
|
-
additionalControlsRenderer?: (props: any) => JSX.Element;
|
|
25
|
-
highlightedError?: {
|
|
26
|
-
element: unknown;
|
|
27
|
-
type: import("../../../../contexts").ScrollType;
|
|
28
|
-
highlightError?: (element: unknown) => void;
|
|
29
|
-
highlightAttribute?: (element: unknown) => void;
|
|
30
|
-
scrollIntoRef: (ref: React.MutableRefObject<HTMLDivElement>) => void;
|
|
31
|
-
};
|
|
32
|
-
highlightedAttribute?: {
|
|
33
|
-
element: unknown;
|
|
34
|
-
type: import("../../../../contexts").ScrollType;
|
|
35
|
-
highlightError?: (element: unknown) => void;
|
|
36
|
-
highlightAttribute?: (element: unknown) => void;
|
|
37
|
-
scrollIntoRef: (ref: React.MutableRefObject<HTMLDivElement>) => void;
|
|
38
|
-
};
|
|
39
|
-
}>;
|
|
2
|
+
import { AttributePagerProps } from './types';
|
|
3
|
+
declare const _default: React.ComponentType<AttributePagerProps>;
|
|
40
4
|
export default _default;
|
|
@@ -10,14 +10,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import { isAttributeTypeError, isImage, isOv, isSpecialAttribute, Mode } from '@reltio/mdm-sdk';
|
|
13
|
+
import { getAttributePagerActiveTypeErrorMessage, isAttributeTypeError, isImage, isOv, isSpecialAttribute, Mode } from '@reltio/mdm-sdk';
|
|
14
14
|
import { always, cond, T, partition } from 'ramda';
|
|
15
15
|
import BranchDecorator from '../../BranchDecorator/BranchDecorator';
|
|
16
16
|
import AttributeRenderer from './AttributeRenderer';
|
|
17
17
|
import SpecialRenderer from './SpecialRenderer';
|
|
18
18
|
import { ImageLineRenderer } from './ImageLineRenderer';
|
|
19
19
|
import { withContext } from '../../../../HOCs';
|
|
20
|
-
import { isHighlightedAttributeType, isHighlightedErrorType, ScrollToElementContext } from '../../../../contexts';
|
|
20
|
+
import { isHighlightedAttributeType, isHighlightedErrorType, ScrollToElementContext, useMdmAction, useMdmActiveErrorsForAttributesPager, useMdmDefaultMaxValues, useMdmProfileErrors } from '../../../../contexts';
|
|
21
21
|
var RENDERER_TYPES;
|
|
22
22
|
(function (RENDERER_TYPES) {
|
|
23
23
|
RENDERER_TYPES["imageLine"] = "imageLine";
|
|
@@ -25,14 +25,22 @@ var RENDERER_TYPES;
|
|
|
25
25
|
RENDERER_TYPES["default"] = "default";
|
|
26
26
|
})(RENDERER_TYPES || (RENDERER_TYPES = {}));
|
|
27
27
|
var AttributesPager = function (_a) {
|
|
28
|
-
var
|
|
28
|
+
var _b;
|
|
29
|
+
var values = _a.values, attributeType = _a.attributeType, _c = _a.mode, mode = _c === void 0 ? Mode.Viewing : _c, crosswalks = _a.crosswalks, drawLines = _a.drawLines, _d = _a.paging, paging = _d === void 0 ? {} : _d, parentUri = _a.parentUri, maxProp = _a.max, showEmptyEditors = _a.showEmptyEditors, showNonOv = _a.showNonOv, highlightedError = _a.highlightedError, highlightedAttribute = _a.highlightedAttribute, onAddAttributes = _a.onAddAttributes, onDeleteAttribute = _a.onDeleteAttribute, onChangeAttribute = _a.onChangeAttribute, additionalControlsRenderer = _a.additionalControlsRenderer;
|
|
30
|
+
var onDeactivateError = useMdmAction('errorDeactivated');
|
|
31
|
+
var requestNextPageOfAttributeValues = useMdmAction('requestNextPageOfAttributeValues');
|
|
32
|
+
var activeErrors = useMdmActiveErrorsForAttributesPager(parentUri, attributeType);
|
|
33
|
+
var profileErrors = useMdmProfileErrors();
|
|
34
|
+
var defaultMaxValues = useMdmDefaultMaxValues();
|
|
35
|
+
var errorMessage = getAttributePagerActiveTypeErrorMessage(parentUri, attributeType, profileErrors);
|
|
36
|
+
var max = (_b = maxProp !== null && maxProp !== void 0 ? maxProp : defaultMaxValues) !== null && _b !== void 0 ? _b : Infinity;
|
|
29
37
|
var partitionByOv = partition(isOv);
|
|
30
38
|
var _e = partitionByOv(values), ovValues = _e[0], nonOvValues = _e[1];
|
|
31
39
|
var visibleValues = showNonOv ? values : ovValues;
|
|
32
40
|
var nonVisibleValues = showNonOv ? [] : nonOvValues;
|
|
33
41
|
var commonProps = {
|
|
34
42
|
errorMessage: errorMessage,
|
|
35
|
-
errors:
|
|
43
|
+
errors: activeErrors,
|
|
36
44
|
mode: mode,
|
|
37
45
|
parentUri: parentUri,
|
|
38
46
|
onAddAttributes: onAddAttributes,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { AttributeItem, AttributeType, ImageAttributeValue, Paging } from '@reltio/mdm-sdk';
|
|
3
|
-
import { RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-module';
|
|
2
|
+
import { AttributeItem, AttributeType, ImageAttributeValue, Paging, RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-sdk';
|
|
4
3
|
import { ScrollToElementContext } from '../../../../contexts';
|
|
5
4
|
type Props = {
|
|
6
5
|
attributeType: AttributeType;
|
|
@@ -1,39 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { AttributeError, AttributeType, Crosswalk, ImageAttributeValue, Mode, NestedAttributeValue, Paging, ReferenceAttributeValue, SimpleAttributeValue, AttributeItem } from '@reltio/mdm-sdk';
|
|
4
|
-
import AttributesPager from './AttributesPager';
|
|
5
|
-
import CardinalityMessage from './CardinalityMessage';
|
|
6
|
-
import { ScrollToElementContext } from '../../../../contexts';
|
|
7
|
-
type StateProps = {
|
|
8
|
-
errorMessage: string;
|
|
9
|
-
errors: AttributeError[];
|
|
10
|
-
max: number;
|
|
11
|
-
};
|
|
12
|
-
type DispatchProps = {
|
|
13
|
-
onDeactivateError: (id: string) => void;
|
|
14
|
-
requestNextPageOfAttributeValues: (payload: RequestNextPageOfAttributeValuesPayload) => void;
|
|
15
|
-
};
|
|
16
|
-
type OwnProps = {
|
|
17
|
-
values: (SimpleAttributeValue | NestedAttributeValue | ReferenceAttributeValue | ImageAttributeValue | string | number)[];
|
|
18
|
-
attributeType: AttributeType;
|
|
19
|
-
paging?: Paging;
|
|
20
|
-
mode?: Mode;
|
|
21
|
-
crosswalks?: Crosswalk[];
|
|
22
|
-
parentUri: string;
|
|
23
|
-
drawLines: boolean;
|
|
24
|
-
max?: number;
|
|
25
|
-
showEmptyEditors: boolean;
|
|
26
|
-
showNonOv?: boolean;
|
|
27
|
-
onAddAttributes: (params: AttributeItem[]) => void;
|
|
28
|
-
onDeleteAttribute: (param: AttributeItem) => void;
|
|
29
|
-
onChangeAttribute: (param: AttributeItem) => void;
|
|
30
|
-
additionalControlsRenderer?: (props: any) => JSX.Element;
|
|
31
|
-
highlightedError?: React.ContextType<typeof ScrollToElementContext>;
|
|
32
|
-
highlightedAttribute?: React.ContextType<typeof ScrollToElementContext>;
|
|
33
|
-
};
|
|
34
|
-
export type AttributePagerProps = StateProps & DispatchProps & OwnProps;
|
|
35
|
-
export { AttributesPager, CardinalityMessage };
|
|
36
|
-
declare const _default: import("react-redux").ConnectedComponent<React.ComponentType<StateProps & DispatchProps & OwnProps>, (import("react-redux").Omit<React.ClassAttributes<React.Component<StateProps & DispatchProps & OwnProps, any, any>> & StateProps & DispatchProps & OwnProps, "max" | "errorMessage" | "errors" | "requestNextPageOfAttributeValues" | "onDeactivateError"> | import("react-redux").Omit<StateProps & DispatchProps & OwnProps & {
|
|
37
|
-
children?: React.ReactNode;
|
|
38
|
-
}, "max" | "errorMessage" | "errors" | "requestNextPageOfAttributeValues" | "onDeactivateError">) & OwnProps>;
|
|
39
|
-
export default _default;
|
|
1
|
+
export { default as CardinalityMessage } from './CardinalityMessage';
|
|
2
|
+
export { default } from './AttributesPager';
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { getAttributePagerActiveTypeErrorMessage } from '@reltio/mdm-sdk';
|
|
4
|
-
import AttributesPager from './AttributesPager';
|
|
5
|
-
import CardinalityMessage from './CardinalityMessage';
|
|
6
|
-
var mapStateToProps = function (state, _a) {
|
|
7
|
-
var parentUri = _a.parentUri, attributeType = _a.attributeType, max = _a.max;
|
|
8
|
-
return ({
|
|
9
|
-
errors: mdmModule.selectors.getActiveErrorsForAttributesPager(state, parentUri, attributeType),
|
|
10
|
-
errorMessage: getAttributePagerActiveTypeErrorMessage(parentUri, attributeType, mdmModule.selectors.getProfileErrors(state)),
|
|
11
|
-
max: max || mdmModule.selectors.getDefaultMaxValues(state)
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
var mapDispatchToProps = {
|
|
15
|
-
requestNextPageOfAttributeValues: profile.actions.requestNextPageOfAttributeValues,
|
|
16
|
-
onDeactivateError: profile.errors.actions.errorDeactivated
|
|
17
|
-
};
|
|
18
|
-
export { AttributesPager, CardinalityMessage };
|
|
19
|
-
export default connect(mapStateToProps, mapDispatchToProps)(AttributesPager);
|
|
1
|
+
export { default as CardinalityMessage } from './CardinalityMessage';
|
|
2
|
+
export { default } from './AttributesPager';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"link" | "description" | "caption" | "title" | "wrapper" | "ovIcon" | "svg-icon__root" | "attributesWrapper" | "typeError" | "titleWrapper">;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AttributeType, Crosswalk, ImageAttributeValue, Mode, NestedAttributeValue, Paging, ReferenceAttributeValue, SimpleAttributeValue, AttributeItem } from '@reltio/mdm-sdk';
|
|
3
|
+
import { ScrollToElementContext } from '../../../../contexts';
|
|
4
|
+
export type AttributePagerProps = {
|
|
5
|
+
values: (SimpleAttributeValue | NestedAttributeValue | ReferenceAttributeValue | ImageAttributeValue | string | number)[];
|
|
6
|
+
attributeType: AttributeType;
|
|
7
|
+
paging?: Paging;
|
|
8
|
+
mode?: Mode;
|
|
9
|
+
crosswalks?: Crosswalk[];
|
|
10
|
+
parentUri: string;
|
|
11
|
+
drawLines: boolean;
|
|
12
|
+
max?: number;
|
|
13
|
+
showEmptyEditors: boolean;
|
|
14
|
+
showNonOv?: boolean;
|
|
15
|
+
onAddAttributes: (params: AttributeItem[]) => void;
|
|
16
|
+
onDeleteAttribute: (param: AttributeItem) => void;
|
|
17
|
+
onChangeAttribute: (param: AttributeItem) => void;
|
|
18
|
+
additionalControlsRenderer?: (props: any) => JSX.Element;
|
|
19
|
+
highlightedError?: React.ContextType<typeof ScrollToElementContext>;
|
|
20
|
+
highlightedAttribute?: React.ContextType<typeof ScrollToElementContext>;
|
|
21
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AttributesViewProps } from '../../types';
|
|
3
3
|
type Props = Omit<AttributesViewProps, 'attributesCount'>;
|
|
4
|
-
declare const AttributesView: ({ className,
|
|
4
|
+
declare const AttributesView: ({ className, mode, entity, caption, excludeUris, includeUris, pinnedAttributes }: Props) => JSX.Element;
|
|
5
5
|
export default AttributesView;
|
|
@@ -10,34 +10,32 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import React, { useCallback, useContext, useMemo } from 'react';
|
|
13
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
14
13
|
import classnames from 'classnames';
|
|
15
|
-
import { pipe } from 'ramda';
|
|
16
|
-
import mdmModule, { profile } from '@reltio/mdm-module';
|
|
17
14
|
import { isTempUri, getPinnedAttributesForUser } from '@reltio/mdm-sdk';
|
|
18
15
|
import Box from '@mui/material/Box';
|
|
19
16
|
import BasicView from '../../../BasicView/BasicView';
|
|
20
17
|
import FacetViewHeader from '../../../FacetViewHeader/FacetViewHeader';
|
|
21
18
|
import AttributesList from '../AttributesList';
|
|
22
|
-
import { ViewIdContext } from '../../../../contexts';
|
|
19
|
+
import { ViewIdContext, useMdmAction, useMdmMetadata, useMdmModifiedEntity, useMdmUserRoles } from '../../../../contexts';
|
|
23
20
|
import { getFilteredAttrTypes } from '../../helpers/attributesView';
|
|
24
21
|
import { PinnedAttributesContext } from '../contexts/PinnedAttributesContext';
|
|
25
22
|
import { useStyles } from './styles';
|
|
26
23
|
var AttributesView = function (_a) {
|
|
27
24
|
var _b;
|
|
28
|
-
var className = _a.className,
|
|
25
|
+
var className = _a.className, mode = _a.mode, entity = _a.entity, _c = _a.caption, caption = _c === void 0 ? '' : _c, _d = _a.excludeUris, excludeUris = _d === void 0 ? [] : _d, _e = _a.includeUris, includeUris = _e === void 0 ? [] : _e, pinnedAttributes = _a.pinnedAttributes;
|
|
29
26
|
var styles = useStyles();
|
|
30
|
-
var dispatch = useDispatch();
|
|
31
27
|
var viewId = useContext(ViewIdContext);
|
|
32
|
-
var
|
|
28
|
+
var addAttributes = useMdmAction('addAttributes');
|
|
29
|
+
var modifyAttribute = useMdmAction('modifyAttribute');
|
|
30
|
+
var removeAttribute = useMdmAction('removeAttribute');
|
|
31
|
+
var metadata = useMdmMetadata();
|
|
32
|
+
var userRoles = useMdmUserRoles();
|
|
33
|
+
var modifiedEntity = useMdmModifiedEntity(entity.uri) || {};
|
|
33
34
|
var pinnedAttributeUris = useMemo(function () { return getPinnedAttributesForUser(pinnedAttributes, userRoles); }, [pinnedAttributes, userRoles]);
|
|
34
|
-
var modifiedEntity = useSelector(function (state) { return mdmModule.selectors.getModifiedEntity(state, entity.uri) || {}; });
|
|
35
35
|
var filteredAttrTypes = useMemo(function () { return getFilteredAttrTypes(metadata, modifiedEntity.type, includeUris, excludeUris); }, [excludeUris, includeUris, metadata, modifiedEntity.type]);
|
|
36
|
-
var onAddAttributes = useCallback(function (params) {
|
|
37
|
-
|
|
38
|
-
}, [viewId,
|
|
39
|
-
var onChangeAttribute = useCallback(function (params) { return pipe(profile.actions.modifyAttribute, dispatch)(__assign(__assign({}, params), { viewId: viewId })); }, [viewId, dispatch]);
|
|
40
|
-
var onDeleteAttribute = useCallback(function (params) { return pipe(profile.actions.removeAttribute, dispatch)(__assign(__assign({}, params), { viewId: viewId })); }, [viewId, dispatch]);
|
|
36
|
+
var onAddAttributes = useCallback(function (params) { return addAttributes(params.map(function (param) { return (__assign(__assign({}, param), { viewId: viewId })); })); }, [viewId, addAttributes]);
|
|
37
|
+
var onChangeAttribute = useCallback(function (params) { return modifyAttribute(__assign(__assign({}, params), { viewId: viewId })); }, [viewId, modifyAttribute]);
|
|
38
|
+
var onDeleteAttribute = useCallback(function (params) { return removeAttribute(__assign(__assign({}, params), { viewId: viewId })); }, [viewId, removeAttribute]);
|
|
41
39
|
return (React.createElement(BasicView, { className: className },
|
|
42
40
|
caption && React.createElement(FacetViewHeader, { className: styles.header, title: caption }),
|
|
43
41
|
React.createElement(Box, { className: classnames(styles.attributesContainer, (_b = {}, _b[styles.noCaption] = !caption, _b)) },
|
|
@@ -1,25 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AttributeType, Mode, TEntityType } from '@reltio/mdm-sdk';
|
|
3
|
+
type Props = {
|
|
4
|
+
entityUri: string;
|
|
5
|
+
entityType: TEntityType;
|
|
6
|
+
mode: Mode;
|
|
7
|
+
attributeTypesSelectionStrategy?: (entityType: TEntityType) => AttributeType[];
|
|
8
|
+
};
|
|
9
|
+
declare const EntityCreator: ({ entityUri, entityType, mode, attributeTypesSelectionStrategy }: Props) => JSX.Element;
|
|
1
10
|
export default EntityCreator;
|
|
2
|
-
declare function EntityCreator({ entity, entityType, attributeTypesSelectionStrategy, mode, onAddAttributes, onDeleteAttribute, onChangeAttribute }: {
|
|
3
|
-
entity: any;
|
|
4
|
-
entityType: any;
|
|
5
|
-
attributeTypesSelectionStrategy?: (entityType: any) => any;
|
|
6
|
-
mode: any;
|
|
7
|
-
onAddAttributes: any;
|
|
8
|
-
onDeleteAttribute: any;
|
|
9
|
-
onChangeAttribute: any;
|
|
10
|
-
}): JSX.Element;
|
|
11
|
-
declare namespace EntityCreator {
|
|
12
|
-
namespace propTypes {
|
|
13
|
-
export const entityUri: PropTypes.Requireable<string>;
|
|
14
|
-
export const parentUri: PropTypes.Requireable<string>;
|
|
15
|
-
export const entity: PropTypes.Requireable<object>;
|
|
16
|
-
export const entityType: PropTypes.Requireable<object>;
|
|
17
|
-
export const attributeTypesSelectionStrategy: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
-
export { ModeType as mode };
|
|
19
|
-
export const onAddAttributes: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
-
export const onDeleteAttribute: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
-
export const onChangeAttribute: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
import PropTypes from 'prop-types';
|
|
25
|
-
import { ModeType } from '@reltio/mdm-sdk';
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import AttributesList from '../AttributesList';
|
|
4
|
-
import {
|
|
3
|
+
import { useMdmAction, useMdmModifiedEntity } from '../../../../contexts';
|
|
5
4
|
var defaultAttributeTypesSelectionStrategy = function (entityType) { return entityType && entityType.attributes; };
|
|
6
5
|
var EntityCreator = function (_a) {
|
|
7
|
-
var
|
|
6
|
+
var entityUri = _a.entityUri, entityType = _a.entityType, mode = _a.mode, _b = _a.attributeTypesSelectionStrategy, attributeTypesSelectionStrategy = _b === void 0 ? defaultAttributeTypesSelectionStrategy : _b;
|
|
7
|
+
var addAttributes = useMdmAction('addAttributes');
|
|
8
|
+
var removeAttribute = useMdmAction('removeAttribute');
|
|
9
|
+
var modifyAttribute = useMdmAction('modifyAttribute');
|
|
10
|
+
var entity = useMdmModifiedEntity(entityUri);
|
|
8
11
|
var attributeTypes = useMemo(function () { return attributeTypesSelectionStrategy(entityType); }, [attributeTypesSelectionStrategy, entityType]);
|
|
9
|
-
return entity ? (React.createElement(AttributesList, { key: entity.uri, attrTypes: attributeTypes, entity: entity, showEmptyEditors: true, drawLines: true, parentUri: entity.uri, mode: mode, crosswalks: entity.crosswalks, onAddAttributes:
|
|
10
|
-
};
|
|
11
|
-
EntityCreator.propTypes = {
|
|
12
|
-
entityUri: PropTypes.string,
|
|
13
|
-
parentUri: PropTypes.string,
|
|
14
|
-
entity: PropTypes.object,
|
|
15
|
-
entityType: PropTypes.object,
|
|
16
|
-
attributeTypesSelectionStrategy: PropTypes.func,
|
|
17
|
-
mode: ModeType,
|
|
18
|
-
onAddAttributes: PropTypes.func,
|
|
19
|
-
onDeleteAttribute: PropTypes.func,
|
|
20
|
-
onChangeAttribute: PropTypes.func
|
|
12
|
+
return entity ? (React.createElement(AttributesList, { key: entity.uri, attrTypes: attributeTypes, entity: entity, showEmptyEditors: true, drawLines: true, parentUri: entity.uri, mode: mode, crosswalks: entity.crosswalks, onAddAttributes: addAttributes, onChangeAttribute: modifyAttribute, onDeleteAttribute: removeAttribute })) : null;
|
|
21
13
|
};
|
|
22
14
|
export default EntityCreator;
|
|
@@ -29,7 +29,7 @@ import DropDownSelector from '../../../DropDownSelector/DropDownSelector';
|
|
|
29
29
|
import EntityOption from './components/EntityOption';
|
|
30
30
|
import SingleValue from './components/SingleValue';
|
|
31
31
|
import ClearIndicator from './components/ClearIndicator';
|
|
32
|
-
import EntityCreator from '../EntityCreator';
|
|
32
|
+
import EntityCreator from '../EntityCreator/EntityCreator';
|
|
33
33
|
import { EmptyStub } from '../../../../core';
|
|
34
34
|
import Group from './components/Group';
|
|
35
35
|
import { useStyles } from './styles';
|
|
@@ -10,27 +10,24 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import React, { useContext } from 'react';
|
|
13
|
-
import { always, pipe } from 'ramda';
|
|
14
13
|
import PropTypes from 'prop-types';
|
|
15
14
|
import classnames from 'classnames';
|
|
16
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
17
15
|
import i18n from 'ui-i18n';
|
|
18
|
-
import mdmModule, { ui } from '@reltio/mdm-module';
|
|
19
16
|
import { getLabel, isTempUri } from '@reltio/mdm-sdk';
|
|
20
17
|
import Typography from '@mui/material/Typography';
|
|
21
|
-
import { UrlGeneratorsContext,
|
|
18
|
+
import { ViewIdContext, UrlGeneratorsContext, useMdmUiPath, useMdmAction } from '../../../../../contexts';
|
|
22
19
|
import { useSingleValueStyles } from './styles';
|
|
23
20
|
var SingleValue = function (props) {
|
|
24
21
|
var _a = props.selectProps, currentEntityType = _a.currentEntityType, menuIsOpen = _a.menuIsOpen, disableLinkClick = _a.disableLinkClick, children = props.children, data = props.data;
|
|
25
22
|
var styles = useSingleValueStyles();
|
|
26
|
-
var
|
|
23
|
+
var openEntity = useMdmAction('openEntity');
|
|
24
|
+
var uiPath = useMdmUiPath();
|
|
27
25
|
var viewId = useContext(ViewIdContext);
|
|
28
26
|
var generateEntityUrl = useContext(UrlGeneratorsContext).generateEntityUrl;
|
|
29
|
-
var uiPath = useSelector(mdmModule.selectors.getUIPath);
|
|
30
27
|
var handleOnMouseDown = function (event) {
|
|
31
28
|
event.stopPropagation();
|
|
32
29
|
if (!disableLinkClick) {
|
|
33
|
-
|
|
30
|
+
openEntity({ uri: data.entityUri, viewId: viewId });
|
|
34
31
|
}
|
|
35
32
|
};
|
|
36
33
|
var valueProps = isTempUri(data.entityUri)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-
|
|
3
|
-
import { AttributeType, ImageAttributeValue, Paging, AttributeItem } from '@reltio/mdm-sdk';
|
|
2
|
+
import { AttributeType, ImageAttributeValue, Paging, AttributeItem, RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-sdk';
|
|
4
3
|
import { SIZES_TYPE } from '../../ImageAttributesLine/styles';
|
|
5
4
|
type Props = {
|
|
6
5
|
attributeType: AttributeType;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useState } from 'react';
|
|
2
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
3
2
|
import CloudUploadIcon from '@mui/icons-material/CloudUpload';
|
|
4
|
-
import mdmModule, { profile } from '@reltio/mdm-module';
|
|
5
3
|
import { generateUri, getImageAttributeOvThumbnailUrl, getImageAttributeOvUrl } from '@reltio/mdm-sdk';
|
|
6
4
|
import Image from '../../../Image/Image';
|
|
7
5
|
import ImageActionsOverlay from '../../../Image/ImageActionsOverlay/ImageActionsOverlay';
|
|
@@ -9,16 +7,16 @@ import { SmallIconButton } from '../../../SmallIconButton';
|
|
|
9
7
|
import { UploadImageDialog } from '../../../UploadImageDialog/UploadImageDialog';
|
|
10
8
|
import ImageAttributesLineCommon from '../../ImageAttributesLine';
|
|
11
9
|
import { DEFAULT_IMAGE_SIZE } from '../../ImageAttributesLine/constants';
|
|
10
|
+
import { useMdmAction, useMdmEntity, useMdmModifiedEntityDefaultProfilePic } from '../../../../contexts';
|
|
12
11
|
import { useStyles } from './styles';
|
|
12
|
+
var defaultEntity = {};
|
|
13
13
|
var ImageAttributesLine = function (_a) {
|
|
14
14
|
var _b = _a.attributeType, attributeType = _b === void 0 ? {} : _b, _c = _a.attributeValues, attributeValues = _c === void 0 ? [] : _c, onDeleteAttribute = _a.onDeleteAttribute, onChangeAttribute = _a.onChangeAttribute, requestNextPageOfAttributeValues = _a.requestNextPageOfAttributeValues, parentUri = _a.parentUri, paging = _a.paging, showNonOv = _a.showNonOv, _d = _a.imageSize, imageSize = _d === void 0 ? DEFAULT_IMAGE_SIZE : _d;
|
|
15
15
|
var styles = useStyles(imageSize);
|
|
16
|
-
var entity = useSelector(mdmModule.selectors.getEntity) || {};
|
|
17
|
-
var defaultProfilePic = useSelector(function (state) {
|
|
18
|
-
return mdmModule.selectors.getModifiedEntityDefaultProfilePic(state, entity.uri);
|
|
19
|
-
});
|
|
20
|
-
var dispatch = useDispatch();
|
|
21
16
|
var _e = useState(false), isVisibleUploadDialog = _e[0], setIsVisibleUploadDialog = _e[1];
|
|
17
|
+
var setDefaultProfilePic = useMdmAction('setDefaultProfilePicForModifiedEntity');
|
|
18
|
+
var entity = useMdmEntity() || defaultEntity;
|
|
19
|
+
var defaultProfilePic = useMdmModifiedEntityDefaultProfilePic(entity.uri);
|
|
22
20
|
var toggleVisibilityUploadDialog = useCallback(function () {
|
|
23
21
|
setIsVisibleUploadDialog(function (visible) { return !visible; });
|
|
24
22
|
}, []);
|
|
@@ -51,12 +49,12 @@ var ImageAttributesLine = function (_a) {
|
|
|
51
49
|
onDeleteAttribute(param);
|
|
52
50
|
if (defaultProfilePic === param.uri) {
|
|
53
51
|
var newDefaultPic = ((_a = attributeValues[0]) === null || _a === void 0 ? void 0 : _a.uri) === param.uri ? attributeValues[1] : attributeValues[0];
|
|
54
|
-
|
|
52
|
+
setDefaultProfilePic({
|
|
55
53
|
entityUri: entity.uri,
|
|
56
54
|
value: newDefaultPic || {}
|
|
57
|
-
})
|
|
55
|
+
});
|
|
58
56
|
}
|
|
59
|
-
}, [onDeleteAttribute, entity, defaultProfilePic, attributeValues]);
|
|
57
|
+
}, [onDeleteAttribute, entity, defaultProfilePic, attributeValues, setDefaultProfilePic]);
|
|
60
58
|
var renderImageActionsOverlay = function (methods, attribute) {
|
|
61
59
|
var onOpenImageGalleryDialog = methods.onOpenImageGalleryDialog, onDownload = methods.onDownload, onShareLink = methods.onShareLink, onSetAsDefault = methods.onSetAsDefault;
|
|
62
60
|
var imageUrl = getImageAttributeOvUrl(attribute);
|
|
@@ -3,8 +3,7 @@ import i18n from 'ui-i18n';
|
|
|
3
3
|
import { SortingStrategy } from '@reltio/mdm-sdk';
|
|
4
4
|
import { flattenGroupedItemsData } from '../../../VirtualGroupedList/helpers';
|
|
5
5
|
import { preparedGroupedItems } from './helpers';
|
|
6
|
-
import
|
|
7
|
-
import { useSelector } from 'react-redux';
|
|
6
|
+
import { useMdmAttributesSortingStrategy } from '../../../../contexts';
|
|
8
7
|
var GROUP_NAMES;
|
|
9
8
|
(function (GROUP_NAMES) {
|
|
10
9
|
GROUP_NAMES["parent"] = "parent";
|
|
@@ -12,8 +11,8 @@ var GROUP_NAMES;
|
|
|
12
11
|
})(GROUP_NAMES || (GROUP_NAMES = {}));
|
|
13
12
|
export var useMoreAttributesItems = function (_a) {
|
|
14
13
|
var data = _a.data, parent = _a.parent, filter = _a.filter;
|
|
14
|
+
var strategy = useMdmAttributesSortingStrategy();
|
|
15
15
|
var hasGroups = Boolean(parent);
|
|
16
|
-
var strategy = useSelector(mdmModule.selectors.getAttributesSortingStrategy);
|
|
17
16
|
var sortingFn = useMemo(function () {
|
|
18
17
|
switch (strategy) {
|
|
19
18
|
case SortingStrategy.ASC_BY_NAME:
|