@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,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import i18n from 'ui-i18n';
|
|
3
|
+
import { any, drop, propOr } from 'ramda';
|
|
4
|
+
import Stepper from '@mui/material/Stepper';
|
|
5
|
+
import Step from '@mui/material/Step';
|
|
6
|
+
import StepButton from '@mui/material/StepButton';
|
|
7
|
+
import Button from '@mui/material/Button';
|
|
8
|
+
import ProgressButton from './ProgressButton';
|
|
9
|
+
import { useStyles } from './styles';
|
|
10
|
+
var StepNavigation = function (_a) {
|
|
11
|
+
var activeStep = _a.activeStep, steps = _a.steps, _b = _a.isPending, isPending = _b === void 0 ? false : _b, onConfirm = _a.onConfirm, onChangeStep = _a.onChangeStep;
|
|
12
|
+
var styles = useStyles();
|
|
13
|
+
var isLastStep = activeStep === steps.length - 1;
|
|
14
|
+
var setActiveStep = function (step) {
|
|
15
|
+
if (step !== activeStep) {
|
|
16
|
+
onChangeStep(step);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var isEnabled = propOr(true, 'enabled');
|
|
20
|
+
var onBack = function (currentStep) {
|
|
21
|
+
if (currentStep > 0) {
|
|
22
|
+
var prevStep = currentStep - 1;
|
|
23
|
+
if (isEnabled(steps[prevStep])) {
|
|
24
|
+
setActiveStep(prevStep);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
onBack(prevStep);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var onNext = function (currentStep) {
|
|
32
|
+
if (currentStep < steps.length - 1) {
|
|
33
|
+
var nextStep = currentStep + 1;
|
|
34
|
+
if (isEnabled(steps[nextStep])) {
|
|
35
|
+
setActiveStep(nextStep);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
onNext(nextStep);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var showConfirm = isLastStep && !!onConfirm;
|
|
43
|
+
var isNextButtonEnabled = showConfirm || any(isEnabled, drop(activeStep + 1, steps));
|
|
44
|
+
return (React.createElement("div", { className: styles.container },
|
|
45
|
+
React.createElement("div", { className: styles.placeholder }),
|
|
46
|
+
React.createElement(Stepper, { nonLinear: true, activeStep: activeStep, className: styles.stepper }, steps.map(function (_a, index) {
|
|
47
|
+
var label = _a.label, _b = _a.enabled, enabled = _b === void 0 ? true : _b;
|
|
48
|
+
var disabledStep = !enabled || isPending;
|
|
49
|
+
var completedStep = !disabledStep && index < activeStep;
|
|
50
|
+
return (React.createElement(Step, { key: label, completed: completedStep, disabled: disabledStep },
|
|
51
|
+
React.createElement(StepButton, { className: styles.stepButton, onClick: function () { return setActiveStep(index); }, "data-reltio-id": "reltio-search-bulk-update-".concat(index) }, label)));
|
|
52
|
+
})),
|
|
53
|
+
React.createElement("div", { className: styles.buttons },
|
|
54
|
+
activeStep > 0 && (React.createElement(Button, { variant: "outlined", className: styles.backButton, onClick: function () { return onBack(activeStep); }, disabled: isPending, "data-reltio-id": "reltio-search-bulk-update-back" }, i18n.text('Back'))),
|
|
55
|
+
React.createElement(ProgressButton, { variant: "contained", color: "primary", disabled: !isNextButtonEnabled, isInProgress: isPending, onClick: isLastStep ? onConfirm : function () { return onNext(activeStep); }, "data-reltio-id": "reltio-search-bulk-update-".concat(isLastStep ? 'confirm' : 'continue') }, showConfirm ? i18n.text('Confirm') : i18n.text('Continue')))));
|
|
56
|
+
};
|
|
57
|
+
export default StepNavigation;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { makeStyles } from '@mui/styles';
|
|
2
|
+
var useStyles = makeStyles(function () { return ({
|
|
3
|
+
container: {
|
|
4
|
+
display: 'flex',
|
|
5
|
+
alignItems: 'center',
|
|
6
|
+
justifyContent: 'space-between',
|
|
7
|
+
width: '100%'
|
|
8
|
+
},
|
|
9
|
+
placeholder: {
|
|
10
|
+
flex: 1
|
|
11
|
+
},
|
|
12
|
+
stepper: {
|
|
13
|
+
padding: '0 24px',
|
|
14
|
+
flex: 2
|
|
15
|
+
},
|
|
16
|
+
stepButton: {
|
|
17
|
+
margin: '-20px -16px',
|
|
18
|
+
padding: '20px 16px',
|
|
19
|
+
'& svg text': {
|
|
20
|
+
textAnchor: 'middle'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
buttons: {
|
|
24
|
+
flex: 1,
|
|
25
|
+
display: 'flex',
|
|
26
|
+
justifyContent: 'flex-end'
|
|
27
|
+
},
|
|
28
|
+
backButton: {
|
|
29
|
+
marginRight: '8px',
|
|
30
|
+
border: '1px solid rgba(0, 0, 0, 0.23)'
|
|
31
|
+
},
|
|
32
|
+
progressButtonWrapper: {
|
|
33
|
+
position: 'relative'
|
|
34
|
+
},
|
|
35
|
+
progress: {
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
left: 'calc(50% - 12px)',
|
|
38
|
+
top: 'calc(50% - 12px)'
|
|
39
|
+
}
|
|
40
|
+
}); });
|
|
41
|
+
export { useStyles };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Typography from '@mui/material/Typography';
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import TenantIcon from '../../icons/Tenant';
|
|
5
|
+
import { useStyles } from './styles';
|
|
6
|
+
import { useMdmEnvironment, useMdmTenantName } from '../../contexts';
|
|
7
|
+
var TenantLabel = function (_a) {
|
|
8
|
+
var className = _a.className;
|
|
9
|
+
var styles = useStyles();
|
|
10
|
+
var customerTenantLabel = useMdmTenantName();
|
|
11
|
+
var environmentName = useMdmEnvironment();
|
|
12
|
+
var tenantLabelWithEnv = "".concat(customerTenantLabel).concat(environmentName ? ' - ' + environmentName.toUpperCase() : '');
|
|
13
|
+
return (React.createElement("div", { className: classnames(styles.labelWrapper, className) },
|
|
14
|
+
React.createElement(TenantIcon, { className: styles.tenantIcon, "data-reltio-id": "reltio-tenant-icon" }),
|
|
15
|
+
React.createElement(Typography, { className: styles.tenantLabel }, tenantLabelWithEnv)));
|
|
16
|
+
};
|
|
17
|
+
export default TenantLabel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"labelWrapper" | "tenantIcon" | "tenantLabel">;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { makeStyles } from '@mui/styles';
|
|
2
|
+
export var useStyles = makeStyles(function () { return ({
|
|
3
|
+
labelWrapper: {
|
|
4
|
+
height: '24px',
|
|
5
|
+
display: 'inline-flex',
|
|
6
|
+
alignItems: 'center'
|
|
7
|
+
},
|
|
8
|
+
tenantIcon: {
|
|
9
|
+
height: '24px',
|
|
10
|
+
width: '24px',
|
|
11
|
+
marginRight: '4px',
|
|
12
|
+
opacity: 0.38
|
|
13
|
+
},
|
|
14
|
+
tenantLabel: {
|
|
15
|
+
lineHeight: '15px',
|
|
16
|
+
fontSize: '13px',
|
|
17
|
+
color: 'rgba(0,0,0,0.38)'
|
|
18
|
+
}
|
|
19
|
+
}); });
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import { useSelector } from 'react-redux';
|
|
3
2
|
import { defaultTo, filter, map, pipe, prepend } from 'ramda';
|
|
4
3
|
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
|
|
5
|
-
import mdmModule from '@reltio/mdm-module';
|
|
6
4
|
import { isAvailableTenantForEntityType, isEmptyValue } from '@reltio/mdm-sdk';
|
|
7
5
|
import { DropDownMenuButton, TenantIcon } from '../index';
|
|
8
6
|
import TenantMenuItem from './TenantMenuItem/TenantMenuItem';
|
|
7
|
+
import { useMdmDataTenants, useMdmTenantObject } from '../../contexts';
|
|
9
8
|
import { useStyles } from './styles';
|
|
10
9
|
export var TenantsDropDownSelector = function (_a) {
|
|
11
10
|
var entityTypeUri = _a.entityTypeUri, onChangeTenant = _a.onChangeTenant, selectedTenant = _a.selectedTenant;
|
|
12
11
|
var styles = useStyles();
|
|
13
|
-
var dataTenants =
|
|
14
|
-
var customerTenant =
|
|
12
|
+
var dataTenants = useMdmDataTenants();
|
|
13
|
+
var customerTenant = useMdmTenantObject();
|
|
15
14
|
var menuItems = useMemo(function () {
|
|
16
15
|
return pipe(defaultTo([]), filter(isAvailableTenantForEntityType(entityTypeUri)), map(function (dataTenant) { return ({
|
|
17
16
|
tenant: 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<"description" | "icon" | "title" | "root" | "isActive">;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import i18n from 'ui-i18n';
|
|
3
|
-
import { useSelector } from 'react-redux';
|
|
4
3
|
import { uploadImage as uploadImageRequest, getRequestErrorMessage } from '@reltio/mdm-sdk';
|
|
5
|
-
import mdm from '@reltio/mdm-module';
|
|
6
4
|
import Box from '@mui/material/Box';
|
|
7
5
|
import Dialog from '@mui/material/Dialog';
|
|
8
6
|
import Typography from '@mui/material/Typography';
|
|
@@ -14,14 +12,15 @@ import { ErrorSnackbar } from './ErrorSnackbar/ErrorSnackbar';
|
|
|
14
12
|
import { IMAGE_TYPES, MAX_IMAGE_SIZE } from './constants';
|
|
15
13
|
import { useStyles } from './styles';
|
|
16
14
|
import { DragAndDrop } from '../DragAndDrop/DragAndDrop';
|
|
15
|
+
import { useMdmEnvironment, useMdmImageServicePath, useMdmTenant } from '../../contexts';
|
|
17
16
|
export var UploadImageDialog = function (_a) {
|
|
18
17
|
var open = _a.open, onClose = _a.onClose, onUpload = _a.onUpload;
|
|
19
18
|
var styles = useStyles();
|
|
20
|
-
var imageServicePath = useSelector(mdm.selectors.getImageServicePath);
|
|
21
|
-
var environment = useSelector(mdm.selectors.getEnvironment);
|
|
22
|
-
var tenant = useSelector(mdm.selectors.getTenant);
|
|
23
19
|
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
|
24
20
|
var _c = useState(null), error = _c[0], setError = _c[1];
|
|
21
|
+
var imageServicePath = useMdmImageServicePath();
|
|
22
|
+
var environment = useMdmEnvironment();
|
|
23
|
+
var tenant = useMdmTenant();
|
|
25
24
|
var uploadImage = function (image) {
|
|
26
25
|
setLoading(true);
|
|
27
26
|
uploadImageRequest({ image: image, imageServicePath: imageServicePath, environment: environment, tenant: tenant })
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
|
-
import { useSelector } from 'react-redux';
|
|
3
2
|
import i18n from 'ui-i18n';
|
|
4
3
|
import { defaultTo, pipe, pluck } from 'ramda';
|
|
5
4
|
import classnames from 'classnames';
|
|
@@ -7,18 +6,18 @@ import Typography from '@mui/material/Typography';
|
|
|
7
6
|
import MultiSelect from '../ReactSelect/MultiSelect';
|
|
8
7
|
import DropdownIndicatorWithIconButton from '../commonReactSelectComponents/DropdownIndicatorWithIconButton';
|
|
9
8
|
import { getAllUsersForTenant, utils } from '@reltio/mdm-sdk';
|
|
10
|
-
import
|
|
9
|
+
import { useMdmServicesPath, useMdmTenant } from '../../contexts';
|
|
11
10
|
import { customStyles, useStyles } from './styles';
|
|
12
11
|
var UserSelector = function (_a) {
|
|
13
12
|
var selectedUsers = _a.selectedUsers, onChange = _a.onChange, className = _a.className, disableUnderline = _a.disableUnderline;
|
|
14
13
|
var styles = useStyles();
|
|
14
|
+
var tenant = useMdmTenant();
|
|
15
|
+
var servicesPath = useMdmServicesPath();
|
|
15
16
|
var valueToOption = function (value) { return ({ value: value, label: value }); };
|
|
16
17
|
var prepareValues = function (values) { return values.map(valueToOption); };
|
|
17
18
|
var filterUsers = function (inputValue) { return function (users) {
|
|
18
19
|
return inputValue ? users.filter(function (username) { return utils.strings.search(username, inputValue); }) : users;
|
|
19
20
|
}; };
|
|
20
|
-
var tenant = useSelector(mdmModule.selectors.getTenant);
|
|
21
|
-
var servicesPath = useSelector(mdmModule.selectors.getServicesPath);
|
|
22
21
|
var cachedRequest = useRef();
|
|
23
22
|
var getOptions = function (inputValue) {
|
|
24
23
|
if (!cachedRequest.current) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useMemo, useState, useCallback } from 'react';
|
|
2
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
3
2
|
import i18n from 'ui-i18n';
|
|
4
3
|
import Button from '@mui/material/Button';
|
|
5
4
|
import Portal from '@mui/material/Portal';
|
|
@@ -8,17 +7,17 @@ import GetAppIcon from '@mui/icons-material/GetApp';
|
|
|
8
7
|
import { SmallIconButtonWithTooltip } from '../../SmallIconButton';
|
|
9
8
|
import ErrorPopup from '../../ErrorPopup/ErrorPopup';
|
|
10
9
|
import DropDownMenuButton from '../../DropDownMenuButton/DropDownMenuButton';
|
|
11
|
-
import mdmModule, { ui } from '@reltio/mdm-module';
|
|
12
10
|
import { exportActivities, getRequestErrorMessage } from '@reltio/mdm-sdk';
|
|
13
11
|
import { buildActivitiesFilterString } from '../utils/filters';
|
|
12
|
+
import { useMdmAction, useMdmExportPath, useMdmTenant } from '../../../contexts';
|
|
14
13
|
import { useStyles } from './styles';
|
|
15
14
|
var ActivityExportButton = function (_a) {
|
|
16
15
|
var filters = _a.filters, _b = _a.exportTypes, exportTypes = _b === void 0 ? [] : _b;
|
|
17
16
|
var styles = useStyles();
|
|
18
|
-
var
|
|
17
|
+
var openConsoleApp = useMdmAction('openConsoleApp');
|
|
18
|
+
var exportPath = useMdmExportPath();
|
|
19
|
+
var tenant = useMdmTenant();
|
|
19
20
|
var _c = useState(false), showSnackbar = _c[0], setShowSnackbar = _c[1];
|
|
20
|
-
var exportPath = useSelector(mdmModule.selectors.getExportPath);
|
|
21
|
-
var tenant = useSelector(mdmModule.selectors.getTenant);
|
|
22
21
|
var handleClickExport = useCallback(function (type) {
|
|
23
22
|
var options = {
|
|
24
23
|
filter: buildActivitiesFilterString(filters),
|
|
@@ -36,8 +35,8 @@ var ActivityExportButton = function (_a) {
|
|
|
36
35
|
});
|
|
37
36
|
};
|
|
38
37
|
var handleOpenAppClick = useCallback(function () {
|
|
39
|
-
|
|
40
|
-
}, [
|
|
38
|
+
openConsoleApp('Export');
|
|
39
|
+
}, [openConsoleApp]);
|
|
41
40
|
var menuItems = useMemo(function () {
|
|
42
41
|
return exportTypes.map(function (type) { return ({
|
|
43
42
|
text: type.toUpperCase(),
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { curry, pipe, assoc, when, mergeLeft, always } from 'ramda';
|
|
3
|
-
import { useSelector } from 'react-redux';
|
|
4
|
-
import mdmModule from '@reltio/mdm-module';
|
|
5
3
|
import i18n from 'ui-i18n';
|
|
6
4
|
import Button from '@mui/material/Button';
|
|
7
5
|
import Popover from '@mui/material/Popover';
|
|
@@ -16,12 +14,13 @@ import UserSelector from '../../UserSelector/UserSelector';
|
|
|
16
14
|
import DateRangeSelector from './DateRangeSelector';
|
|
17
15
|
import EntityChangedSelectors from './EntityChangedSelectors';
|
|
18
16
|
import { useDidUpdateEffect } from '../../../hooks';
|
|
17
|
+
import { useMdmMetadata } from '../../../contexts';
|
|
19
18
|
import { useStyles } from './styles';
|
|
20
19
|
var ActivityFilterEditor = function (_a) {
|
|
21
20
|
var value = _a.value, open = _a.open, entityType = _a.entityType, anchorEl = _a.anchorEl, onApply = _a.onApply, onCancel = _a.onCancel, onClear = _a.onClear;
|
|
22
21
|
var styles = useStyles();
|
|
23
|
-
var metadata = useSelector(mdmModule.selectors.getMetadata);
|
|
24
22
|
var _b = useState(value), currentFilter = _b[0], setCurrentFilter = _b[1];
|
|
23
|
+
var metadata = useMdmMetadata();
|
|
25
24
|
var clearCurrentFilter = function () { return setCurrentFilter(null); };
|
|
26
25
|
var handlePropChange = curry(function (propName, value) {
|
|
27
26
|
setCurrentFilter(pipe(when(always(propName === 'entityTypes'), assoc('attributes', [])), when(always(propName === 'activities'), mergeLeft({ attributes: [], entityTypes: [], sources: [] })), assoc(propName, value)));
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { map, prop } from 'ramda';
|
|
3
|
-
import { useSelector } from 'react-redux';
|
|
4
|
-
import mdmModule from '@reltio/mdm-module';
|
|
5
3
|
import { findClosestCommonAncestor, getEntityType } from '@reltio/mdm-sdk';
|
|
6
4
|
import AttributeSelector from '../../AttributeSelector/AttributeSelector';
|
|
7
5
|
import EntityTypesSelector from './EntityTypesSelector';
|
|
8
6
|
import SourceSelector from './SourceSelector';
|
|
7
|
+
import { useMdmMetadata } from '../../../contexts';
|
|
9
8
|
import { useStyles } from './styles';
|
|
10
9
|
var EntityChangedSelectors = function (_a) {
|
|
11
10
|
var filter = _a.filter, entityType = _a.entityType, onPropChange = _a.onPropChange;
|
|
12
11
|
var styles = useStyles();
|
|
13
|
-
var metadata = useSelector(mdmModule.selectors.getMetadata);
|
|
14
12
|
var _b = filter || {}, _c = _b.attributes, attributes = _c === void 0 ? [] : _c, _d = _b.sources, sources = _d === void 0 ? [] : _d, _e = _b.entityTypes, entityTypes = _e === void 0 ? [] : _e;
|
|
13
|
+
var metadata = useMdmMetadata();
|
|
15
14
|
var closestEntityTypeAncestor = findClosestCommonAncestor(metadata, map(prop('uri'), entityTypes));
|
|
16
15
|
var attributesEntityType = entityType || getEntityType(metadata, closestEntityTypeAncestor);
|
|
17
16
|
return (React.createElement("div", { className: styles.selectorsGroup },
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import i18n from 'ui-i18n';
|
|
3
|
+
import classnames from 'classnames';
|
|
3
4
|
import { defaultTo, pipe, sortBy, prop } from 'ramda';
|
|
4
5
|
import Typography from '@mui/material/Typography';
|
|
5
6
|
import MultiSelect from '../../ReactSelect/MultiSelect';
|
|
6
|
-
import { useSelector } from 'react-redux';
|
|
7
|
-
import classnames from 'classnames';
|
|
8
|
-
import mdmModule from '@reltio/mdm-module';
|
|
9
7
|
import DropdownIndicatorWithIconButton from '../../commonReactSelectComponents/DropdownIndicatorWithIconButton';
|
|
8
|
+
import { useMdmMetadata } from '../../../contexts';
|
|
10
9
|
import { customStyles, useStyles } from './styles';
|
|
11
10
|
var SourceSelector = function (_a) {
|
|
12
11
|
var selectedSources = _a.selectedSources, onChange = _a.onChange;
|
|
13
12
|
var styles = useStyles();
|
|
14
|
-
var metadata =
|
|
13
|
+
var metadata = useMdmMetadata();
|
|
15
14
|
var options = sortBy(function (option) { return option.label; })(metadata.sources);
|
|
16
15
|
return (React.createElement("div", { className: styles.selectorWrapper, "data-reltio-id": "source-selector" },
|
|
17
16
|
React.createElement(Typography, { className: classnames(styles.filterSubtitle, styles.labels), variant: 'subtitle1' }, i18n.text('Source')),
|
|
@@ -11,19 +11,21 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import i18n from 'ui-i18n';
|
|
14
|
-
import {
|
|
15
|
-
import mdmModule from '@reltio/mdm-module';
|
|
14
|
+
import { canUserMakeActivitiesExport } from '@reltio/mdm-sdk';
|
|
16
15
|
import Tooltip from '@mui/material/Tooltip';
|
|
17
16
|
import Typography from '@mui/material/Typography';
|
|
18
17
|
import ActivityExportButton from '../ActivityExportButton/ActivityExportButton';
|
|
19
18
|
import ActivityFilterButton from '../ActivityFilterButton/ActivityFilterButton';
|
|
20
19
|
import { getFilterLabel } from './helpers';
|
|
20
|
+
import { useMdmTenant, useMdmUser } from '../../../contexts';
|
|
21
21
|
import { useStyles } from './styles';
|
|
22
22
|
var ActivityLogFilter = function (_a) {
|
|
23
23
|
var value = _a.value, entityType = _a.entityType, entityUri = _a.entityUri, onChange = _a.onChange, exportTypes = _a.exportTypes;
|
|
24
24
|
var styles = useStyles();
|
|
25
|
+
var user = useMdmUser();
|
|
26
|
+
var tenant = useMdmTenant();
|
|
27
|
+
var canExport = canUserMakeActivitiesExport(user, tenant);
|
|
25
28
|
var filterLabel = getFilterLabel(value);
|
|
26
|
-
var canExport = useSelector(mdmModule.selectors.getCanUserMakeActivitiesExport);
|
|
27
29
|
return (React.createElement("div", { className: styles.header },
|
|
28
30
|
React.createElement(Typography, { variant: "body2", className: styles.label }, i18n.text('Filter:')),
|
|
29
31
|
React.createElement(Tooltip, { title: filterLabel },
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useSelector } from 'react-redux';
|
|
3
|
-
import mdmModule from '@reltio/mdm-module';
|
|
4
2
|
import ActivityTitle from './ActivityTitle/ActivityTitle';
|
|
5
3
|
import { getGroupLabelByTypeUri, getLabel } from '@reltio/mdm-sdk';
|
|
4
|
+
import { useMdmMetadata } from '../../../contexts';
|
|
6
5
|
import { useStyles } from './styles';
|
|
7
6
|
var GroupActivity = function (_a) {
|
|
8
7
|
var _b, _c;
|
|
9
8
|
var data = _a.data, type = _a.type;
|
|
10
9
|
var styles = useStyles();
|
|
11
|
-
var metadata =
|
|
10
|
+
var metadata = useMdmMetadata();
|
|
12
11
|
var label = getGroupLabelByTypeUri(metadata, (_c = (_b = data.items) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.objectType);
|
|
13
12
|
return (React.createElement(ActivityTitle, { type: type },
|
|
14
13
|
React.createElement("span", { className: styles.objectLabel }, getLabel(label))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"link" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"link" | "relationship" | "delimiter">;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import { useDispatch } from 'react-redux';
|
|
3
|
-
import { ui } from '@reltio/mdm-module';
|
|
4
|
-
import ActivityTitle from './ActivityTitle/ActivityTitle';
|
|
5
2
|
import { always, pipe } from 'ramda';
|
|
3
|
+
import i18n from 'ui-i18n';
|
|
4
|
+
import ActivityTitle from './ActivityTitle/ActivityTitle';
|
|
6
5
|
import { parseJSON } from '../../../core';
|
|
7
6
|
import { useReadableSearchState } from '../../../hooks';
|
|
8
|
-
import
|
|
7
|
+
import { useMdmAction } from '../../../contexts';
|
|
9
8
|
import { useStyles } from './styles';
|
|
10
9
|
var SearchActivity = function (_a) {
|
|
11
10
|
var data = _a.data, type = _a.type;
|
|
12
11
|
var styles = useStyles();
|
|
13
|
-
var
|
|
12
|
+
var openSearch = useMdmAction('openSearch');
|
|
14
13
|
var searchState = useMemo(function () {
|
|
15
14
|
var searchData = parseJSON(data.description);
|
|
16
15
|
return searchData.version === '2.0' ? searchData.activity.uiState : searchData;
|
|
17
16
|
}, [data.description]);
|
|
18
|
-
var
|
|
17
|
+
var handleOpenSearch = pipe(always(searchState), openSearch);
|
|
19
18
|
var searchString = useReadableSearchState(searchState);
|
|
20
19
|
return (React.createElement(ActivityTitle, { type: type },
|
|
21
|
-
React.createElement("span", { className: styles.link, onClick:
|
|
20
|
+
React.createElement("span", { className: styles.link, onClick: handleOpenSearch }, searchString || i18n.text('all profiles'))));
|
|
22
21
|
};
|
|
23
22
|
export default SearchActivity;
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { DeltaTypes } from '../../types';
|
|
1
4
|
import Chip from '@mui/material/Chip';
|
|
2
5
|
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
|
|
3
|
-
import mdmModule from '@reltio/mdm-module';
|
|
4
6
|
import { findAttributeTypeByUri } from '@reltio/mdm-sdk';
|
|
5
|
-
import classnames from 'classnames';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import { useSelector } from 'react-redux';
|
|
8
|
-
import { DeltaTypes } from '../../types';
|
|
9
7
|
import { stringifyDeltaValue } from '../../utils/activities';
|
|
10
|
-
import {
|
|
8
|
+
import { useMdmMetadata, useMdmAttributePresentations } from '../../../../contexts';
|
|
11
9
|
import { useCommonStyles } from './commonStyles';
|
|
10
|
+
import { useStyles } from './styles';
|
|
12
11
|
var DeltaField = function (_a) {
|
|
13
12
|
var _b, _c;
|
|
14
13
|
var delta = _a.delta;
|
|
15
14
|
var styles = useStyles();
|
|
16
15
|
var commonStyles = useCommonStyles();
|
|
17
|
-
var metadata =
|
|
18
|
-
var attributePresentations =
|
|
16
|
+
var metadata = useMdmMetadata();
|
|
17
|
+
var attributePresentations = useMdmAttributePresentations();
|
|
19
18
|
var attribute = findAttributeTypeByUri(metadata, delta.attributeType);
|
|
20
19
|
var newValue = (_b = delta.newValue) === null || _b === void 0 ? void 0 : _b.value;
|
|
21
20
|
var oldValue = (_c = delta.oldValue) === null || _c === void 0 ? void 0 : _c.value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useCommonStyles: (props?: any) => import("@mui/styles").ClassNameMap<"
|
|
1
|
+
export declare const useCommonStyles: (props?: any) => import("@mui/styles").ClassNameMap<"link" | "fieldName" | "field">;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import Typography from '@mui/material/Typography';
|
|
2
|
-
import RestoreIcon from '@mui/icons-material/Restore';
|
|
3
|
-
import { ui } from '@reltio/mdm-module';
|
|
4
|
-
import { getEntityPreviousChange } from '@reltio/mdm-sdk';
|
|
5
1
|
import React from 'react';
|
|
6
|
-
import { useDispatch } from 'react-redux';
|
|
7
2
|
import i18n from 'ui-i18n';
|
|
8
3
|
import { path } from 'ramda';
|
|
4
|
+
import { getEntityPreviousChange } from '@reltio/mdm-sdk';
|
|
5
|
+
import Typography from '@mui/material/Typography';
|
|
6
|
+
import RestoreIcon from '@mui/icons-material/Restore';
|
|
9
7
|
import { ActivityTypes } from '../../types';
|
|
10
8
|
import EntityObject from '../EntityObject/EntityObject';
|
|
11
9
|
import RecordUpdates from './RecordUpdates';
|
|
10
|
+
import { useMdmAction } from '../../../../contexts';
|
|
12
11
|
import { useStyles } from './styles';
|
|
13
12
|
var EntityRecord = function (_a) {
|
|
14
13
|
var _b;
|
|
15
14
|
var item = _a.item;
|
|
16
15
|
var styles = useStyles();
|
|
17
|
-
var
|
|
16
|
+
var openHistoryEvent = useMdmAction('openHistoryEvent');
|
|
18
17
|
var deltaArray = (_b = item.deltaCollection) === null || _b === void 0 ? void 0 : _b.delta;
|
|
19
18
|
var isEntityChanged = path(['data', 'type'])(item) === ActivityTypes.ENTITY_CHANGED;
|
|
20
|
-
var
|
|
19
|
+
var handleOpenHistoryEvent = function () {
|
|
21
20
|
getEntityPreviousChange(item.objectUri, item.timestamp)
|
|
22
21
|
.then(function (previousTimestamp) {
|
|
23
22
|
if (previousTimestamp !== -1) {
|
|
@@ -25,7 +24,7 @@ var EntityRecord = function (_a) {
|
|
|
25
24
|
aStamp: item.timestamp,
|
|
26
25
|
bStamp: previousTimestamp
|
|
27
26
|
};
|
|
28
|
-
|
|
27
|
+
openHistoryEvent({ entityUri: item.objectUri, historyEvent: historyEvent });
|
|
29
28
|
}
|
|
30
29
|
})
|
|
31
30
|
.catch(function (err) { return console.error(err); });
|
|
@@ -34,7 +33,7 @@ var EntityRecord = function (_a) {
|
|
|
34
33
|
React.createElement(Typography, { className: styles.label },
|
|
35
34
|
!deltaArray && React.createElement("span", { className: styles.description }, i18n.text('Profile changed')),
|
|
36
35
|
React.createElement(EntityObject, { item: item })),
|
|
37
|
-
isEntityChanged && React.createElement(RestoreIcon, { className: styles.restoreIcon, onClick:
|
|
36
|
+
isEntityChanged && (React.createElement(RestoreIcon, { "data-reltio-id": "reltio-entity-record-restore-icon", className: styles.restoreIcon, onClick: handleOpenHistoryEvent })),
|
|
38
37
|
React.createElement(RecordUpdates, { updates: deltaArray, recordId: item.id })));
|
|
39
38
|
};
|
|
40
39
|
export default EntityRecord;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
declare const AttributesView: ({
|
|
2
|
+
import { AttributesViewProps } from '../types';
|
|
3
|
+
declare const AttributesView: ({ attributesCount, pinnedAttributes, ...restProps }: AttributesViewProps) => JSX.Element;
|
|
4
4
|
export default AttributesView;
|
|
@@ -21,12 +21,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import React from 'react';
|
|
24
|
-
import { isViewMode
|
|
25
|
-
import ReadModeAttributesView from '../readMode/AttributesView';
|
|
26
|
-
import EditModeAttributesView from '../editMode/AttributesView';
|
|
27
|
-
import { EntityContext } from '../../../contexts';
|
|
24
|
+
import { isViewMode } from '@reltio/mdm-sdk';
|
|
25
|
+
import ReadModeAttributesView from '../readMode/AttributesView/AttributesView';
|
|
26
|
+
import EditModeAttributesView from '../editMode/AttributesView/AttributesView';
|
|
27
|
+
import { useMdmEntityWithDiff, useMdmMode, EntityContext } from '../../../contexts';
|
|
28
28
|
var AttributesView = function (_a) {
|
|
29
|
-
var
|
|
30
|
-
|
|
29
|
+
var attributesCount = _a.attributesCount, pinnedAttributes = _a.pinnedAttributes, restProps = __rest(_a, ["attributesCount", "pinnedAttributes"]);
|
|
30
|
+
var mdmEntity = useMdmEntityWithDiff();
|
|
31
|
+
var mdmMode = useMdmMode();
|
|
32
|
+
var entity = restProps.entity || mdmEntity;
|
|
33
|
+
var mode = restProps.mode || mdmMode;
|
|
34
|
+
return (React.createElement(EntityContext.Provider, { value: entity }, isViewMode(mode) ? (React.createElement(ReadModeAttributesView, __assign({}, restProps, { attributesCount: attributesCount, entity: entity }))) : (React.createElement(EditModeAttributesView, __assign({}, restProps, { mode: mode, pinnedAttributes: pinnedAttributes, entity: entity })))));
|
|
31
35
|
};
|
|
32
36
|
export default AttributesView;
|
|
@@ -25,7 +25,7 @@ export declare const ChipWithTooltip: React.ForwardRefExoticComponent<import("pr
|
|
|
25
25
|
variant?: import("@mui/types").OverridableStringUnion<"filled" | "outlined", import("@mui/material/Chip").ChipPropsVariantOverrides>;
|
|
26
26
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
27
27
|
ref?: React.Ref<HTMLDivElement>;
|
|
28
|
-
}, "label" | "icon" | "children" | "size" | "color" | "disabled" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "tabIndex" | "variant" | "
|
|
28
|
+
}, "label" | "icon" | "children" | "size" | "color" | "disabled" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "tabIndex" | "variant" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled">>;
|
|
29
29
|
type Props = {
|
|
30
30
|
className?: string;
|
|
31
31
|
description?: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from '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 './styles';
|
|
5
4
|
export type ImageRenderProps = {
|
|
6
5
|
onDownload?: (url: string[]) => void;
|
|
@@ -10,21 +10,16 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
|
|
13
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
14
13
|
import ReactResizeDetector from 'react-resize-detector';
|
|
15
14
|
import Typography from '@mui/material/Typography';
|
|
16
|
-
import mdm, { profile } from '@reltio/mdm-module';
|
|
17
15
|
import { insertDefaultImageByAttrUri } from '@reltio/mdm-sdk';
|
|
18
|
-
import { BlockImageGalleryDialogContext } from '../../../contexts';
|
|
16
|
+
import { BlockImageGalleryDialogContext, useMdmAction, useMdmEntity, useMdmIsViewMode } from '../../../contexts';
|
|
19
17
|
import ImageAttributesGallery from '../../ImageAttributesGallery/ImageAttributesGallery';
|
|
20
18
|
import { downloadImagesByURLs } from '../helpers/imageAttributes';
|
|
21
19
|
import { DEFAULT_IMAGE_SIZE, IMAGE_MIN_VISIBLE_WIDTH } from './constants';
|
|
22
20
|
import { useStyles } from './styles';
|
|
23
21
|
var ImageAttributesLine = function (_a) {
|
|
24
22
|
var attributeType = _a.attributeType, _b = _a.attributeValues, attributeValues = _b === void 0 ? [] : _b, renderImage = _a.renderImage, _c = _a.overlay, overlay = _c === void 0 ? false : _c, _d = _a.countFixedItems, countFixedItems = _d === void 0 ? 0 : _d, children = _a.children, onUpload = _a.onUpload, onDeleteAttribute = _a.onDeleteAttribute, _e = _a.imageSize, imageSize = _e === void 0 ? DEFAULT_IMAGE_SIZE : _e, paging = _a.paging, parentUri = _a.parentUri, showNonOv = _a.showNonOv, requestNextPageOfAttributeValues = _a.requestNextPageOfAttributeValues;
|
|
25
|
-
var entity = useSelector(mdm.selectors.getEntity) || {};
|
|
26
|
-
var isViewMode = useSelector(mdm.selectors.getIsViewMode);
|
|
27
|
-
var dispatch = useDispatch();
|
|
28
23
|
var styles = useStyles(imageSize);
|
|
29
24
|
useEffect(function () {
|
|
30
25
|
if (paging && requestNextPageOfAttributeValues) {
|
|
@@ -46,6 +41,10 @@ var ImageAttributesLine = function (_a) {
|
|
|
46
41
|
var isBlockImageGalleryDialog = useContext(BlockImageGalleryDialogContext);
|
|
47
42
|
var _h = useState(false), isOpenDialog = _h[0], setIsOpenDialog = _h[1];
|
|
48
43
|
var _j = useState(), currentAttributeValueUri = _j[0], setCurrentAttributeValueUri = _j[1];
|
|
44
|
+
var setDefaultProfilePicForEntity = useMdmAction('setDefaultProfilePicForEntity');
|
|
45
|
+
var setDefaultProfilePicForModifiedEntity = useMdmAction('setDefaultProfilePicForModifiedEntity');
|
|
46
|
+
var entity = useMdmEntity() || {};
|
|
47
|
+
var isViewMode = useMdmIsViewMode();
|
|
49
48
|
var adjustMaxItemsToScreenWidth = useCallback(function (width) {
|
|
50
49
|
var imageMargin = imageSize.imageMargin, imageWidth = imageSize.imageWidth;
|
|
51
50
|
var maxItemsPerScreen = Math.floor((width + imageMargin) / (imageWidth + imageMargin)) - countFixedItems;
|
|
@@ -84,17 +83,17 @@ var ImageAttributesLine = function (_a) {
|
|
|
84
83
|
insertDefaultImageByAttrUri(entity.uri, attributeValue.uri).then(function (_a) {
|
|
85
84
|
var status = _a.status;
|
|
86
85
|
if (status === 'success') {
|
|
87
|
-
|
|
86
|
+
setDefaultProfilePicForEntity(attributeValue);
|
|
88
87
|
}
|
|
89
88
|
});
|
|
90
89
|
}
|
|
91
90
|
else {
|
|
92
|
-
|
|
91
|
+
setDefaultProfilePicForModifiedEntity({
|
|
93
92
|
entityUri: entity.uri,
|
|
94
93
|
value: attributeValue
|
|
95
|
-
})
|
|
94
|
+
});
|
|
96
95
|
}
|
|
97
|
-
}, [isViewMode, entity.uri,
|
|
96
|
+
}, [isViewMode, entity.uri, setDefaultProfilePicForEntity, setDefaultProfilePicForModifiedEntity]);
|
|
98
97
|
var renderImageProps = __assign({ onOpenImageGalleryDialog: handleOpenImageGalleryDialog }, (overlay && {
|
|
99
98
|
onDownload: handleDownload,
|
|
100
99
|
onShareLink: handleShareLink,
|