@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
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.useMatchesLoader = void 0;
|
|
7
4
|
var react_1 = require("react");
|
|
8
|
-
var react_redux_1 = require("react-redux");
|
|
9
|
-
var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
|
|
10
5
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
11
6
|
var usePagingSimulator_1 = require("./usePagingSimulator");
|
|
12
7
|
var useSafePromise_1 = require("./useSafePromise");
|
|
8
|
+
var contexts_1 = require("../contexts");
|
|
13
9
|
var useMatchesLoader = function (_a) {
|
|
14
10
|
var enabled = _a.enabled, entity = _a.entity, filter = _a.filter, rules = _a.rules, onFinishLoading = _a.onFinishLoading, onStartLoading = _a.onStartLoading, options = _a.options, page = _a.page, rowsPerPage = _a.rowsPerPage, sorting = _a.sorting, markMatchedValues = _a.markMatchedValues;
|
|
15
11
|
var _b = sorting || {}, order = _b.order, field = _b.field;
|
|
16
12
|
var _c = (0, react_1.useState)(0), total = _c[0], setTotal = _c[1];
|
|
17
13
|
var _d = (0, react_1.useState)([]), matches = _d[0], setMatches = _d[1];
|
|
18
14
|
var _e = (0, react_1.useState)({}), entitiesMap = _e[0], setEntitiesMap = _e[1];
|
|
19
|
-
var tenant = (0,
|
|
20
|
-
var dtssPath = (0,
|
|
21
|
-
var dataTenants = (0,
|
|
22
|
-
var _f = (0,
|
|
15
|
+
var tenant = (0, contexts_1.useMdmTenant)();
|
|
16
|
+
var dtssPath = (0, contexts_1.useMdmDtssPath)();
|
|
17
|
+
var dataTenants = (0, contexts_1.useMdmDataTenants)();
|
|
18
|
+
var _f = (0, contexts_1.useMdmGlobalSearchRequestOptions)() || {}, activityFilter = _f.activityFilter, globalFilter = _f.globalFilter;
|
|
23
19
|
var activeness = typeof options.showInactiveEntities === 'boolean'
|
|
24
20
|
? options.showInactiveEntities
|
|
25
21
|
? mdm_sdk_1.ActivityFilters.ALL
|
|
@@ -1,43 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.useMergeAllRequest = void 0;
|
|
27
4
|
var react_1 = require("react");
|
|
28
|
-
var react_redux_1 = require("react-redux");
|
|
29
|
-
var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
|
|
30
5
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
31
6
|
var core_1 = require("../core");
|
|
32
7
|
var useIsMountedRef_1 = require("./useIsMountedRef");
|
|
33
8
|
var merge_1 = require("./helpers/merge");
|
|
9
|
+
var contexts_1 = require("../contexts");
|
|
34
10
|
var useMergeAllRequest = function (_a) {
|
|
35
11
|
var entities = _a.entities, entity = _a.entity, onFinishRequest = _a.onFinishRequest, onStartRequest = _a.onStartRequest, onSuccess = _a.onSuccess, _b = _a.onError, onError = _b === void 0 ? core_1.noop : _b;
|
|
36
12
|
var isMountedRef = (0, useIsMountedRef_1.useIsMountedRef)();
|
|
37
|
-
var tenant = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getTenant);
|
|
38
|
-
var dtssPath = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getDtssPath);
|
|
39
13
|
var _c = (0, react_1.useState)(false), isPending = _c[0], setIsPending = _c[1];
|
|
40
|
-
var
|
|
14
|
+
var updateSearchNavigationDataOnMerge = (0, contexts_1.useMdmAction)('updateSearchNavigationDataOnMerge');
|
|
15
|
+
var tenant = (0, contexts_1.useMdmTenant)();
|
|
16
|
+
var dtssPath = (0, contexts_1.useMdmDtssPath)();
|
|
41
17
|
var sendMergeAllRequest = (0, react_1.useCallback)(function () {
|
|
42
18
|
onStartRequest === null || onStartRequest === void 0 ? void 0 : onStartRequest();
|
|
43
19
|
setIsPending(true);
|
|
@@ -50,7 +26,7 @@ var useMergeAllRequest = function (_a) {
|
|
|
50
26
|
var uris = (0, merge_1.getWinnerLosersUrisFromMergeResponses)(entity, entities, responses);
|
|
51
27
|
if (uris) {
|
|
52
28
|
var winnerUri = uris.winnerUri, losersUris = uris.losersUris;
|
|
53
|
-
|
|
29
|
+
updateSearchNavigationDataOnMerge({ winnerUri: winnerUri, losersUris: losersUris });
|
|
54
30
|
}
|
|
55
31
|
})
|
|
56
32
|
.catch(onError)
|
|
@@ -58,7 +34,17 @@ var useMergeAllRequest = function (_a) {
|
|
|
58
34
|
onFinishRequest === null || onFinishRequest === void 0 ? void 0 : onFinishRequest();
|
|
59
35
|
isMountedRef.current && setIsPending(false);
|
|
60
36
|
});
|
|
61
|
-
}, [
|
|
37
|
+
}, [
|
|
38
|
+
dtssPath,
|
|
39
|
+
entities,
|
|
40
|
+
entity,
|
|
41
|
+
onError,
|
|
42
|
+
onFinishRequest,
|
|
43
|
+
onStartRequest,
|
|
44
|
+
onSuccess,
|
|
45
|
+
tenant,
|
|
46
|
+
updateSearchNavigationDataOnMerge
|
|
47
|
+
]);
|
|
62
48
|
return { isPending: isPending, sendMergeAllRequest: sendMergeAllRequest };
|
|
63
49
|
};
|
|
64
50
|
exports.useMergeAllRequest = useMergeAllRequest;
|
|
@@ -1,50 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.useReadableSearchState = void 0;
|
|
27
4
|
var react_1 = require("react");
|
|
28
|
-
var react_redux_1 = require("react-redux");
|
|
29
|
-
var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
|
|
30
|
-
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
31
5
|
var ramda_1 = require("ramda");
|
|
6
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
7
|
+
var contexts_1 = require("../contexts");
|
|
32
8
|
var useReadableSearchState = function (searchState) {
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
9
|
+
var lookupsListResolved = (0, contexts_1.useMdmAction)('lookupsListResolved');
|
|
10
|
+
var metadata = (0, contexts_1.useMdmMetadata)();
|
|
11
|
+
var dataTenants = (0, contexts_1.useMdmDataTenants)();
|
|
12
|
+
var attributePresentations = (0, contexts_1.useMdmAttributePresentations)();
|
|
13
|
+
var lookups = (0, contexts_1.useMdmLookups)();
|
|
37
14
|
var map = searchState.map;
|
|
38
15
|
var keyword = (0, mdm_sdk_1.getKeywordFromSearchState)(searchState);
|
|
39
16
|
var groups = (0, mdm_sdk_1.getGroupsFromSearchState)(metadata, dataTenants, true, searchState);
|
|
40
17
|
var unresolvedLookups = (0, mdm_sdk_1.getUnresolvedLookupsListFromSearchGroups)(groups, lookups);
|
|
41
|
-
var dispatch = (0, react_redux_1.useDispatch)();
|
|
42
18
|
(0, react_1.useEffect)(function () {
|
|
43
19
|
if (unresolvedLookups.length > 0) {
|
|
44
20
|
(0, ramda_1.pipe)((0, ramda_1.chain)(function (_a) {
|
|
45
21
|
var type = _a.type, codeValues = _a.codeValues;
|
|
46
22
|
return codeValues.map(function (codeValue) { return ({ type: type, codeValue: codeValue }); });
|
|
47
|
-
}), mdm_sdk_1.resolveLookupsList, (0, ramda_1.andThen)(
|
|
23
|
+
}), mdm_sdk_1.resolveLookupsList, (0, ramda_1.andThen)(lookupsListResolved))(unresolvedLookups);
|
|
48
24
|
}
|
|
49
25
|
}, [searchState]); // eslint-disable-line
|
|
50
26
|
return (0, mdm_sdk_1.buildReadableQueryToString)(metadata, attributePresentations, lookups, groups, keyword, map);
|
|
@@ -10,38 +10,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
14
|
exports.useRelationsLoader = void 0;
|
|
38
15
|
var react_1 = require("react");
|
|
39
|
-
var react_redux_1 = require("react-redux");
|
|
40
16
|
var ramda_1 = require("ramda");
|
|
41
|
-
var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
|
|
42
17
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
43
18
|
var useSafePromise_1 = require("./useSafePromise");
|
|
44
19
|
var usePrevious_1 = require("./usePrevious");
|
|
20
|
+
var contexts_1 = require("../contexts");
|
|
45
21
|
var buildSuggestedIds = (0, ramda_1.when)(ramda_1.identity, (0, ramda_1.pipe)(mdm_sdk_1.wrapInArrayIfNeeded, ramda_1.length, (0, ramda_1.times)(function (n) { return n + 1; })));
|
|
46
22
|
var isValidRequestConfig = function (config) {
|
|
47
23
|
var _a;
|
|
@@ -57,12 +33,12 @@ var isValidRequestConfig = function (config) {
|
|
|
57
33
|
var useRelationsLoader = function (_a) {
|
|
58
34
|
var sorting = _a.sorting, filter = _a.filter, page = _a.page, rowsPerPage = _a.rowsPerPage, config = _a.config, entity = _a.entity, relationActivityFilter = _a.relationActivityFilter, mode = _a.mode, _b = _a.searchByOv, searchByOv = _b === void 0 ? false : _b;
|
|
59
35
|
var _c = (0, react_1.useState)(false), isLoading = _c[0], setIsLoading = _c[1];
|
|
60
|
-
var
|
|
61
|
-
var tenant = (0,
|
|
62
|
-
var metadata = (0,
|
|
63
|
-
var dtssPath = (0,
|
|
64
|
-
var _d = (0,
|
|
65
|
-
var lastLoadedTime = (0,
|
|
36
|
+
var relationsLoaded = (0, contexts_1.useMdmAction)('relationsLoaded');
|
|
37
|
+
var tenant = (0, contexts_1.useMdmTenant)();
|
|
38
|
+
var metadata = (0, contexts_1.useMdmMetadata)();
|
|
39
|
+
var dtssPath = (0, contexts_1.useMdmDtssPath)();
|
|
40
|
+
var _d = (0, contexts_1.useMdmGlobalSearchRequestOptions)() || {}, activityFilter = _d.activityFilter, globalFilter = _d.globalFilter;
|
|
41
|
+
var lastLoadedTime = (0, contexts_1.useMdmProfileLastLoadedTime)();
|
|
66
42
|
var safePromise = (0, useSafePromise_1.useSafePromise)();
|
|
67
43
|
var processContent = function (content) {
|
|
68
44
|
var getUri = (0, ramda_1.when)(mdm_sdk_1.isObject, (0, ramda_1.prop)('uri'));
|
|
@@ -120,7 +96,7 @@ var useRelationsLoader = function (_a) {
|
|
|
120
96
|
throw Error(JSON.stringify(result));
|
|
121
97
|
}
|
|
122
98
|
var _a = result[0], connections = _a.connections, total = _a.total;
|
|
123
|
-
|
|
99
|
+
relationsLoaded({ id: config.id, connections: connections, total: total });
|
|
124
100
|
})
|
|
125
101
|
.catch(function (e) {
|
|
126
102
|
console.warn('Failed to load relations data', e);
|
|
@@ -134,7 +110,7 @@ var useRelationsLoader = function (_a) {
|
|
|
134
110
|
activityFilter,
|
|
135
111
|
metadata,
|
|
136
112
|
config,
|
|
137
|
-
|
|
113
|
+
relationsLoaded,
|
|
138
114
|
dtssPath,
|
|
139
115
|
entity === null || entity === void 0 ? void 0 : entity.uri,
|
|
140
116
|
entity === null || entity === void 0 ? void 0 : entity.dataTenant,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"highlightError" | "@keyframes highlightAnimation" | "highlightWarning" | "simpleAttribute">;
|
package/cjs/hooks/useUsers.js
CHANGED
|
@@ -5,15 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useUsers = void 0;
|
|
7
7
|
var react_1 = require("react");
|
|
8
|
-
var react_redux_1 = require("react-redux");
|
|
9
|
-
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
10
|
-
var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
|
|
11
8
|
var memoize_one_1 = __importDefault(require("memoize-one"));
|
|
9
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
10
|
+
var contexts_1 = require("../contexts");
|
|
12
11
|
var getAllUsersForTenantMemoized = (0, memoize_one_1.default)(function (tenant, servicesPath) { return (0, mdm_sdk_1.getAllUsersForTenant)({ tenant: tenant, servicesPath: servicesPath }); });
|
|
13
12
|
var useUsers = function () {
|
|
14
13
|
var _a = (0, react_1.useState)([]), users = _a[0], setUsers = _a[1];
|
|
15
|
-
var tenant = (0,
|
|
16
|
-
var servicesPath = (0,
|
|
14
|
+
var tenant = (0, contexts_1.useMdmTenant)();
|
|
15
|
+
var servicesPath = (0, contexts_1.useMdmServicesPath)();
|
|
17
16
|
var onError = function (e) {
|
|
18
17
|
console.warn('Users error', e);
|
|
19
18
|
setUsers([]);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var react_1 = __importDefault(require("react"));
|
|
18
|
+
var SvgTenant = function (props) {
|
|
19
|
+
return (react_1.default.createElement("svg", __assign({ width: 24, height: 24, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
20
|
+
react_1.default.createElement("path", { d: "M2 0h13v2H8v19h12V6h-9V4h11v19H2V0zm9 8h7v2h-7V8zm0 4h7v2h-7v-2zm0 4h7v2h-7v-2zM4 4v2h2V4H4zm0 8v2h2v-2H4zm0-4v2h2V8H4zm0 8v2h2v-2H4z", fill: "#000", stroke: "none", strokeWidth: 1, fillRule: "evenodd" })));
|
|
21
|
+
};
|
|
22
|
+
exports.default = SvgTenant;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useSelector } from 'react-redux';
|
|
3
|
-
import mdm from '@reltio/mdm-module';
|
|
4
2
|
import { getAbsoluteImageUrl, getEntityTypeGraphIcon } from '@reltio/mdm-sdk';
|
|
5
3
|
import AvatarWithFallback from '../AvatarWithFallback/AvatarWithFallback';
|
|
4
|
+
import { useMdmAbsoluteImagePath } from '../../contexts';
|
|
6
5
|
import { useStyles } from './styles';
|
|
7
6
|
var AttributeGroupIcon = function (_a) {
|
|
8
7
|
var group = _a.group, metadata = _a.metadata;
|
|
9
8
|
var styles = useStyles();
|
|
10
|
-
var absoluteImagePath =
|
|
9
|
+
var absoluteImagePath = useMdmAbsoluteImagePath();
|
|
11
10
|
var entityTypeGraphIcon = getEntityTypeGraphIcon(metadata, { type: group.id });
|
|
12
11
|
var absoluteImageUrl = getAbsoluteImageUrl(absoluteImagePath, entityTypeGraphIcon);
|
|
13
12
|
return React.createElement(AvatarWithFallback, { className: styles.icon, icon: absoluteImageUrl, avatarText: group.title[0] });
|
|
@@ -24,19 +24,18 @@ import React, { useCallback, useMemo } from 'react';
|
|
|
24
24
|
import i18n from 'ui-i18n';
|
|
25
25
|
import classnames from 'classnames';
|
|
26
26
|
import { pipe, defaultTo } from 'ramda';
|
|
27
|
-
import { useSelector } from 'react-redux';
|
|
28
|
-
import mdmModule from '@reltio/mdm-module';
|
|
29
27
|
import { getAttributeTypeSubAttributes } from '@reltio/mdm-sdk';
|
|
30
28
|
import Typography from '@mui/material/Typography';
|
|
31
29
|
import MultiSelect from '../ReactSelect/MultiSelect';
|
|
32
30
|
import MultiValue from '../ReactSelect/commonComponents/MultiValue';
|
|
33
31
|
import DropdownIndicatorWithIconButton from '../commonReactSelectComponents/DropdownIndicatorWithIconButton';
|
|
34
32
|
import AttributeListItem from '../AttributeListItem/AttributeListItem';
|
|
33
|
+
import { useMdmMetadata } from '../../contexts';
|
|
35
34
|
import { customStyles, useStyles } from './styles';
|
|
36
35
|
var AttributeSelector = function (_a) {
|
|
37
36
|
var entityType = _a.entityType, selectedAttributes = _a.selectedAttributes, className = _a.className, onChange = _a.onChange, title = _a.title, disableUnderline = _a.disableUnderline, _b = _a.menuPlacement, menuPlacement = _b === void 0 ? 'bottom' : _b;
|
|
38
|
-
var metadata = useSelector(mdmModule.selectors.getMetadata);
|
|
39
37
|
var styles = useStyles();
|
|
38
|
+
var metadata = useMdmMetadata();
|
|
40
39
|
var prepareItems = useCallback(function (data, level, prevLabel) {
|
|
41
40
|
if (level === void 0) { level = 0; }
|
|
42
41
|
if (prevLabel === void 0) { prevLabel = ''; }
|
|
@@ -7,10 +7,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7
7
|
}
|
|
8
8
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
9
|
};
|
|
10
|
-
import React, { useCallback, useRef, useMemo,
|
|
11
|
-
import { useSelector } from 'react-redux';
|
|
10
|
+
import React, { useCallback, useRef, useMemo, useEffect, memo } from 'react';
|
|
12
11
|
import { always, evolve } from 'ramda';
|
|
13
|
-
import mdmModule from '@reltio/mdm-module';
|
|
14
12
|
import { getEntityType } from '@reltio/mdm-sdk';
|
|
15
13
|
import { getAttributeSelectorItems, getRowsDataFromFilters, getEntityTypeFromAttrTypes } from './helpers';
|
|
16
14
|
import FilterSelector from './components/FilterSelector/FilterSelector';
|
|
@@ -18,20 +16,21 @@ import RowActions from './components/RowActions/RowActions';
|
|
|
18
16
|
import QueryBuilderRowsGroup from '../QueryBuilderRowsGroup/QueryBuilderRowsGroup';
|
|
19
17
|
import AttributeSelector from './components/AttributeSelector/AttributeSelector';
|
|
20
18
|
import ValuesEditor from './components/ValuesEditor/ValuesEditor';
|
|
19
|
+
import { useMdmMetadata } from '../../contexts';
|
|
21
20
|
import { useStyles } from './styles';
|
|
22
21
|
var EMPTY_FILTER = { fieldName: null, filter: null, values: [] };
|
|
23
22
|
var Stub = function () { return null; };
|
|
24
23
|
var AttributesFiltersBuilder = function (_a) {
|
|
25
24
|
var attributeTypes = _a.attributeTypes, filters = _a.filters, onChange = _a.onChange, _b = _a.components, components = _b === void 0 ? {} : _b;
|
|
26
25
|
var CustomValuesEditor = components.ValuesEditor, CustomFilterSelector = components.FilterSelector;
|
|
27
|
-
var metadata = useSelector(mdmModule.selectors.getMetadata);
|
|
28
|
-
var entityType = getEntityType(metadata, getEntityTypeFromAttrTypes(attributeTypes));
|
|
29
26
|
var _c = useStyles(), attrSelector = _c.attrSelector, filterSelector = _c.filterSelector, actionContainer = _c.actionContainer;
|
|
30
27
|
var actualFilters = useRef(filters);
|
|
31
|
-
actualFilters.current = filters;
|
|
32
28
|
var attributeFilterRef = useRef(null);
|
|
33
29
|
var lastAttributesCountRef = useRef(null);
|
|
34
30
|
var attributesCountRef = useRef(null);
|
|
31
|
+
var metadata = useMdmMetadata();
|
|
32
|
+
var entityType = getEntityType(metadata, getEntityTypeFromAttrTypes(attributeTypes));
|
|
33
|
+
actualFilters.current = filters;
|
|
35
34
|
var rowClasses = useMemo(function () { return ({
|
|
36
35
|
attributeSelectorContainer: attrSelector,
|
|
37
36
|
filterSelectorContainer: filterSelector,
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DataTypeDefinition, PrimitiveValue, SimpleAttributeValue } from '@reltio/mdm-sdk';
|
|
3
|
+
type FilterValue = SimpleAttributeValue | PrimitiveValue;
|
|
4
|
+
type Props = {
|
|
5
|
+
filterOption: {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
};
|
|
9
|
+
filterValue: FilterValue | FilterValue[];
|
|
10
|
+
onDelete: () => void;
|
|
11
|
+
dataTypeDefinition: DataTypeDefinition;
|
|
12
|
+
};
|
|
13
|
+
declare const FilterChip: ({ filterOption, filterValue, onDelete, dataTypeDefinition }: Props) => JSX.Element;
|
|
1
14
|
export default FilterChip;
|
|
2
|
-
declare function FilterChip({ filterOption, filterValue, onDelete, dataTypeDefinition }: {
|
|
3
|
-
filterOption: any;
|
|
4
|
-
filterValue: any;
|
|
5
|
-
onDelete: any;
|
|
6
|
-
dataTypeDefinition: any;
|
|
7
|
-
}): JSX.Element;
|
|
8
|
-
declare namespace FilterChip {
|
|
9
|
-
namespace propTypes {
|
|
10
|
-
export { FilterValueType as filterValue };
|
|
11
|
-
export const filterOption: PropTypes.Requireable<PropTypes.InferProps<{
|
|
12
|
-
value: PropTypes.Requireable<string>;
|
|
13
|
-
label: PropTypes.Requireable<string>;
|
|
14
|
-
}>>;
|
|
15
|
-
export const onDelete: PropTypes.Requireable<(...args: any[]) => any>;
|
|
16
|
-
export const dataTypeDefinition: PropTypes.Requireable<object>;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
import { FilterValueType } from '@reltio/mdm-sdk';
|
|
20
|
-
import PropTypes from 'prop-types';
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import Chip from '@mui/material/Chip';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import React from 'react';
|
|
4
|
-
import
|
|
5
|
-
import { checkIfOptionHasValues, FilterValueType, formatDataTypeValue, getFilterValueLabel, mapFilterValue } from '@reltio/mdm-sdk';
|
|
6
|
-
import { useSelector } from 'react-redux';
|
|
7
|
-
import { useStyles } from './styles';
|
|
3
|
+
import { checkIfOptionHasValues, formatDataTypeValue, getFilterValueLabel, mapFilterValue } from '@reltio/mdm-sdk';
|
|
8
4
|
import ExpandedValueTooltip from '../../../ExpandedValueTooltip/ExpandedValueTooltip';
|
|
5
|
+
import { useMdmAttributePresentations, useMdmDateMask, useMdmDateTimeMask } from '../../../../contexts';
|
|
6
|
+
import { useStyles } from './styles';
|
|
9
7
|
var FilterChip = function (_a) {
|
|
10
8
|
var filterOption = _a.filterOption, filterValue = _a.filterValue, onDelete = _a.onDelete, dataTypeDefinition = _a.dataTypeDefinition;
|
|
9
|
+
var styles = useStyles();
|
|
10
|
+
var attributePresentations = useMdmAttributePresentations();
|
|
11
|
+
var dateMask = useMdmDateMask();
|
|
12
|
+
var dateTimeMask = useMdmDateTimeMask();
|
|
11
13
|
var canFilterAcceptValues = checkIfOptionHasValues(filterOption.value);
|
|
12
14
|
var optionLabel = filterOption.label + (canFilterAcceptValues ? ': ' : '');
|
|
13
|
-
var styles = useStyles();
|
|
14
|
-
var attributePresentations = useSelector(mdm.selectors.getAttributePresentations);
|
|
15
|
-
var dateMask = useSelector(mdm.selectors.getDateMask);
|
|
16
|
-
var dateTimeMask = useSelector(mdm.selectors.getDateTimeMask);
|
|
17
15
|
var formatValue = formatDataTypeValue({ attributePresentations: attributePresentations, dataTypeDefinition: dataTypeDefinition, dateMask: dateMask, dateTimeMask: dateTimeMask });
|
|
18
16
|
var convertedValue = mapFilterValue(formatValue, filterValue);
|
|
19
17
|
var filterLabel = canFilterAcceptValues ? getFilterValueLabel(filterOption.value, convertedValue) : '';
|
|
@@ -25,13 +23,4 @@ var FilterChip = function (_a) {
|
|
|
25
23
|
label: styles['filter-chip__label']
|
|
26
24
|
}, onDelete: onDelete }));
|
|
27
25
|
};
|
|
28
|
-
FilterChip.propTypes = {
|
|
29
|
-
filterValue: FilterValueType,
|
|
30
|
-
filterOption: PropTypes.shape({
|
|
31
|
-
value: PropTypes.string,
|
|
32
|
-
label: PropTypes.string
|
|
33
|
-
}),
|
|
34
|
-
onDelete: PropTypes.func,
|
|
35
|
-
dataTypeDefinition: PropTypes.object
|
|
36
|
-
};
|
|
37
26
|
export default FilterChip;
|
|
@@ -8,5 +8,5 @@ declare const BasicView: React.ForwardRefExoticComponent<Pick<{
|
|
|
8
8
|
variant?: import("@mui/types").OverridableStringUnion<"elevation" | "outlined", import("@mui/material/Paper").PaperPropsVariantOverrides>;
|
|
9
9
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
10
10
|
ref?: React.Ref<HTMLDivElement>;
|
|
11
|
-
}, "children" | "square" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "elevation" | "variant">, "
|
|
11
|
+
}, "children" | "square" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "elevation" | "variant">, "id" | "hidden" | "title" | "key" | "children" | "defaultValue" | "prefix" | "results" | "slot" | "color" | "translate" | "square" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "lang" | "role" | "tabIndex" | "elevation" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "variant"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
export default BasicView;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import React, { useMemo, useContext, useRef, useCallback } from 'react';
|
|
2
|
-
import { useSelector } from 'react-redux';
|
|
3
2
|
import i18n from 'ui-i18n';
|
|
4
3
|
import Link from '@mui/material/Link';
|
|
5
4
|
import Box from '@mui/material/Box';
|
|
6
5
|
import Typography from '@mui/material/Typography';
|
|
7
6
|
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
|
8
|
-
import mdm from '@reltio/mdm-module';
|
|
9
7
|
import DropDownMenuButton from '../../DropDownMenuButton/DropDownMenuButton';
|
|
10
8
|
import { SmallIconButtonWithTooltip } from '../../SmallIconButton';
|
|
11
9
|
import { CommentTarget } from '../CommentTarget/CommentTarget';
|
|
12
10
|
import { CommentContent } from '../CommentContent/CommentContent';
|
|
13
11
|
import { Avatar } from '../Avatar/Avatar';
|
|
14
|
-
import { CollaborationContext } from '../../../contexts';
|
|
12
|
+
import { CollaborationContext, useMdmUsername } from '../../../contexts';
|
|
15
13
|
import { useAutoFocus } from '../../../hooks';
|
|
16
14
|
import { createEditedCommentUri, formatDate } from '../utils';
|
|
17
15
|
import { SendMessageArea } from '../SendMessageArea/SendMessageArea';
|
|
@@ -20,7 +18,7 @@ export var Comment = function (_a) {
|
|
|
20
18
|
var onReply = _a.onReply, className = _a.className, uri = _a.uri, comment = _a.comment, relatedObjectUris = _a.relatedObjectUris, objectType = _a.objectType;
|
|
21
19
|
var styles = useStyles();
|
|
22
20
|
var inputRef = useRef();
|
|
23
|
-
var username =
|
|
21
|
+
var username = useMdmUsername();
|
|
24
22
|
var commentId = comment.commentId, createdBy = comment.createdBy, createdTime = comment.createdTime, status = comment.status;
|
|
25
23
|
var isResolved = status === 'resolved';
|
|
26
24
|
var canChangeComment = createdBy === username;
|
|
@@ -10,25 +10,23 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import React, { useContext } from 'react';
|
|
13
|
-
import { useSelector } from 'react-redux';
|
|
14
13
|
import i18n from 'ui-i18n';
|
|
15
14
|
import classnames from 'classnames';
|
|
16
15
|
import { startsWith } from 'ramda';
|
|
17
|
-
import mdm from '@reltio/mdm-module';
|
|
18
16
|
import { CollaborationObjectTypes } from '@reltio/mdm-sdk';
|
|
19
17
|
import { findAttributeTypeByUri, getLabel, getEntityUriForLink, getEntityId, getAttributeTypeUriByValueUri } from '@reltio/mdm-sdk';
|
|
20
18
|
import Typography from '@mui/material/Typography';
|
|
21
19
|
import Box from '@mui/material/Box';
|
|
22
|
-
import { EntitiesMapContext } from '../../../contexts';
|
|
20
|
+
import { EntitiesMapContext, useMdmEntity, useMdmMetadata } from '../../../contexts';
|
|
23
21
|
import EntityUriLink from '../../EntityUriLink/EntityUriLink';
|
|
24
22
|
import { getRelatedEntityUri } from '../utils';
|
|
25
23
|
import { useStyles } from './styles';
|
|
26
24
|
export var CommentTarget = function (_a) {
|
|
27
25
|
var comment = _a.comment, className = _a.className;
|
|
28
26
|
var styles = useStyles();
|
|
29
|
-
var entity = useSelector(mdm.selectors.getEntity);
|
|
30
|
-
var metadata = useSelector(mdm.selectors.getMetadata);
|
|
31
27
|
var entitiesMap = useContext(EntitiesMapContext);
|
|
28
|
+
var metadata = useMdmMetadata();
|
|
29
|
+
var entity = useMdmEntity();
|
|
32
30
|
var getContent = function () {
|
|
33
31
|
var _a;
|
|
34
32
|
switch (comment.objectType) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"label" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"label" | "link" | "title">;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import React, { useRef, useContext, useMemo, useCallback } from 'react';
|
|
2
|
-
import { useSelector } from 'react-redux';
|
|
3
2
|
import i18n from 'ui-i18n';
|
|
4
3
|
import classnames from 'classnames';
|
|
5
|
-
import mdm from '@reltio/mdm-module';
|
|
6
4
|
import Box from '@mui/material/Box';
|
|
7
5
|
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
|
8
6
|
import Typography from '@mui/material/Typography';
|
|
9
7
|
import { Avatar } from '../Avatar/Avatar';
|
|
10
8
|
import { CommentContent } from '../CommentContent/CommentContent';
|
|
11
9
|
import { createEditedReplyUri, formatDate } from '../utils';
|
|
12
|
-
import { CollaborationContext } from '../../../contexts';
|
|
10
|
+
import { CollaborationContext, useMdmUsername } from '../../../contexts';
|
|
13
11
|
import { useAutoFocus } from '../../../hooks';
|
|
14
12
|
import DropDownMenuButton from '../../DropDownMenuButton/DropDownMenuButton';
|
|
15
13
|
import { SmallIconButtonWithTooltip } from '../../SmallIconButton';
|
|
@@ -18,8 +16,8 @@ import { useStyles } from './styles';
|
|
|
18
16
|
export var RepliedComment = function (_a) {
|
|
19
17
|
var className = _a.className, reply = _a.reply, uri = _a.uri, comment = _a.comment, popperRef = _a.popperRef;
|
|
20
18
|
var inputRef = useRef();
|
|
19
|
+
var username = useMdmUsername();
|
|
21
20
|
var createdBy = reply.createdBy, action = reply.action, createdTime = reply.createdTime;
|
|
22
|
-
var username = useSelector(mdm.selectors.getUserName);
|
|
23
21
|
var canChangeReply = createdBy === username && comment.status !== 'resolved';
|
|
24
22
|
var _b = useContext(CollaborationContext), deleteReply = _b.deleteReply, updateCommentState = _b.updateCommentState, getCommentState = _b.getCommentState;
|
|
25
23
|
var commentUri = createEditedReplyUri(comment, reply);
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import React, { useState, useContext, useEffect } from 'react';
|
|
2
2
|
import i18n from 'ui-i18n';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import { useSelector } from 'react-redux';
|
|
5
4
|
import { always, cond, T } from 'ramda';
|
|
6
|
-
import mdm from '@reltio/mdm-module';
|
|
7
5
|
import Box from '@mui/material/Box';
|
|
8
6
|
import Button from '@mui/material/Button';
|
|
9
7
|
import { TextFieldWithMentions } from '../TextFieldWithMentions/TextFieldWithMentions';
|
|
10
8
|
import { Avatar } from '../Avatar/Avatar';
|
|
11
|
-
import { CollaborationContext } from '../../../contexts';
|
|
9
|
+
import { CollaborationContext, useMdmUsername } from '../../../contexts';
|
|
12
10
|
import { createCommentUri, transformPlainTextValueToValueWithMentions } from '../utils';
|
|
13
11
|
import { useStyles } from './styles';
|
|
14
12
|
var getPlaceholder = function (status) {
|
|
@@ -45,8 +43,8 @@ export var SendMessageArea = function (_a) {
|
|
|
45
43
|
var isEditing = isEditingComment || isEditingReply;
|
|
46
44
|
var styles = useStyles({ isEditing: isEditing });
|
|
47
45
|
var _b = useState(false), focused = _b[0], setFocused = _b[1];
|
|
48
|
-
var username = useSelector(mdm.selectors.getUserName);
|
|
49
46
|
var _c = useContext(CollaborationContext), createReply = _c.createReply, createComment = _c.createComment, sending = _c.sending, editComment = _c.editComment, editReply = _c.editReply, getCommentState = _c.getCommentState, updateCommentState = _c.updateCommentState, clearCommentState = _c.clearCommentState;
|
|
47
|
+
var username = useMdmUsername();
|
|
50
48
|
var commentUri = createCommentUri({ comment: comment, reply: reply, isEditingComment: isEditingComment, isEditingReply: isEditingReply });
|
|
51
49
|
var defaultCommentState = getDefaultCommentState({ comment: comment, reply: reply, isEditingComment: isEditingComment, isEditingReply: isEditingReply });
|
|
52
50
|
var _d = getCommentState(uri, commentUri), _e = _d.value, value = _e === void 0 ? defaultCommentState.value : _e, _f = _d.plainTextValue, plainTextValue = _f === void 0 ? defaultCommentState.plainTextValue : _f, _g = _d.mentions, mentions = _g === void 0 ? defaultCommentState.mentions : _g;
|