@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.
Files changed (453) hide show
  1. package/cjs/components/AttributeGroupIcon/AttributeGroupIcon.js +2 -3
  2. package/cjs/components/AttributeSelector/AttributeSelector.js +2 -3
  3. package/cjs/components/AttributesFiltersBuilder/AttributesFiltersBuilder.js +4 -5
  4. package/cjs/components/BasicTableView/ColumnFilter/FilterChip/FilterChip.d.ts +13 -19
  5. package/cjs/components/BasicTableView/ColumnFilter/FilterChip/FilterChip.js +6 -17
  6. package/cjs/components/BasicView/BasicView.d.ts +1 -1
  7. package/cjs/components/CollaborationItem/Comment/Comment.js +1 -3
  8. package/cjs/components/CollaborationItem/CommentTarget/CommentTarget.js +2 -4
  9. package/cjs/components/CollaborationItem/CommentTarget/styles.d.ts +1 -1
  10. package/cjs/components/CollaborationItem/RepliedComment/RepliedComment.js +1 -3
  11. package/cjs/components/CollaborationItem/SendMessageArea/SendMessageArea.js +1 -3
  12. package/cjs/components/ColoredSourceIcon/ColoredSourceIcon.js +1 -3
  13. package/cjs/components/ConnectionEditor/ConnectionEditor.js +3 -6
  14. package/cjs/components/DataTenantBadge/DataTenantBadge.js +6 -4
  15. package/cjs/components/DataTypeValue/DataTypeValue.js +4 -5
  16. package/cjs/components/EntityAvatar/EntityAvatar.js +4 -5
  17. package/cjs/components/EntityTypeBadge/EntityTypeBadge.js +4 -6
  18. package/cjs/components/EntityTypeIcon/EntityTypeIcon.js +2 -3
  19. package/cjs/components/EntityUriLink/EntityUriLink.js +4 -6
  20. package/cjs/components/ErrorPopup/ErrorPopup.d.ts +13 -8
  21. package/cjs/components/ErrorPopup/ErrorPopup.js +23 -18
  22. package/cjs/components/ErrorPopup/styles.d.ts +1 -1
  23. package/cjs/components/HierarchyNodeTitle/HierarchyNodeTitle.js +4 -6
  24. package/cjs/components/ImageAttributesGallery/ImageAttributesGallery.js +2 -6
  25. package/cjs/components/ImageDetailsView/ImageDetailsViewSidebar/ImageDetailsViewSidebar.d.ts +0 -5
  26. package/cjs/components/ImageDetailsView/ImageDetailsViewSidebar/ImageDetailsViewSidebar.js +6 -7
  27. package/cjs/components/ImageDetailsView/MetaInfo/MetaInfo.js +3 -4
  28. package/cjs/components/ImageDetailsView/MetaInfoList/MetaInfoItem/styles.d.ts +1 -1
  29. package/cjs/components/ImageDetailsView/MetaInfoList/MetaInfoList.js +3 -4
  30. package/cjs/components/ImageDetailsView/hooks/useEditMetaInfo.js +3 -10
  31. package/cjs/components/MatchRulesBlock/SimpleMatchRules/styles.d.ts +1 -1
  32. package/cjs/components/MatchRulesSelector/MatchRulesSelector.d.ts +1 -4
  33. package/cjs/components/MatchRulesSelector/MatchRulesSelector.js +2 -4
  34. package/cjs/components/ModeSwitcher/styles.d.ts +1 -1
  35. package/cjs/components/PivotingUriLink/PivotingUriLink.js +1 -3
  36. package/cjs/components/Popper/Popper.d.ts +1 -1
  37. package/cjs/components/PotentialMatchReviewCard/styles.d.ts +1 -1
  38. package/cjs/components/ProfileBand/ProfileBand.js +3 -4
  39. package/cjs/components/ProfileBandNavigation/ProfileBandNavigationWidget.d.ts +1 -1
  40. package/cjs/components/ProfileBandNavigation/hooks/useSearchNavigation.js +19 -54
  41. package/cjs/components/ProfileBandNavigation/hooks/useSearchNavigationVisibility.js +4 -8
  42. package/cjs/components/ProfilesList/ProfilesList.d.ts +2 -3
  43. package/cjs/components/ProfilesList/ProfilesList.js +3 -1
  44. package/cjs/components/RelationEditor/RelationEditor.js +46 -33
  45. package/cjs/components/RelevanceScoreBadge/RelevanceScoreBadge.js +3 -4
  46. package/cjs/components/SelectAttributesList/SelectAttributesList.js +2 -3
  47. package/cjs/components/SmallIconButton/SmallIconButton.d.ts +1 -1
  48. package/cjs/components/SmallIconButton/index.d.ts +1 -1
  49. package/cjs/components/SourceIcon/SourceIcon.js +2 -3
  50. package/cjs/components/SourceSystemsSelector/SourceSystemsSelector.js +2 -3
  51. package/cjs/components/StepNavigation/ProgressButton.d.ts +12 -0
  52. package/cjs/components/StepNavigation/ProgressButton.js +41 -0
  53. package/cjs/components/StepNavigation/StepNavigation.d.ts +13 -0
  54. package/cjs/components/StepNavigation/StepNavigation.js +62 -0
  55. package/cjs/components/StepNavigation/styles.d.ts +2 -0
  56. package/cjs/components/StepNavigation/styles.js +44 -0
  57. package/cjs/components/TenantLabel/TenantLabel.d.ts +6 -0
  58. package/cjs/components/TenantLabel/TenantLabel.js +22 -0
  59. package/cjs/components/TenantLabel/styles.d.ts +1 -0
  60. package/cjs/components/TenantLabel/styles.js +22 -0
  61. package/cjs/components/TenantsDropDownSelector/TenantsDropDownSelector.js +3 -4
  62. package/cjs/components/UploadImageDialog/TargetBox/styles.d.ts +1 -1
  63. package/cjs/components/UploadImageDialog/UploadImageDialog.js +4 -5
  64. package/cjs/components/UserSelector/UserSelector.js +3 -4
  65. package/cjs/components/activityLog/ActivityExportButton/ActivityExportButton.js +6 -7
  66. package/cjs/components/activityLog/ActivityFilterEditor/ActivityFilterEditor.js +2 -3
  67. package/cjs/components/activityLog/ActivityFilterEditor/EntityChangedSelectors.js +2 -3
  68. package/cjs/components/activityLog/ActivityFilterEditor/SourceSelector.js +3 -4
  69. package/cjs/components/activityLog/ActivityLogFilter/ActivityLogFilter.d.ts +1 -1
  70. package/cjs/components/activityLog/ActivityLogFilter/ActivityLogFilter.js +5 -3
  71. package/cjs/components/activityLog/activities/GroupActivity.js +2 -3
  72. package/cjs/components/activityLog/activities/RelationObject/styles.d.ts +1 -1
  73. package/cjs/components/activityLog/activities/SearchActivity.js +6 -7
  74. package/cjs/components/activityLog/activities/fields/DeltaField.js +7 -8
  75. package/cjs/components/activityLog/activities/fields/commonStyles.d.ts +1 -1
  76. package/cjs/components/activityLog/activities/records/EntityRecord.js +8 -9
  77. package/cjs/components/attributes/AttributesView/AttributesView.d.ts +2 -2
  78. package/cjs/components/attributes/AttributesView/AttributesView.js +8 -4
  79. package/cjs/components/attributes/DescriptionIcon/DescriptionIcon.d.ts +1 -1
  80. package/cjs/components/attributes/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
  81. package/cjs/components/attributes/ImageAttributesLine/ImageAttributesLine.js +8 -9
  82. package/cjs/components/attributes/OvIcon/OvIcon.d.ts +1 -1
  83. package/cjs/components/attributes/OvIcon/OvIcon.js +4 -6
  84. package/cjs/components/attributes/PivotingAttributes/PivotingTooltip.js +3 -5
  85. package/cjs/components/attributes/PivotingAttributes/PivotingTooltipContent.js +3 -4
  86. package/cjs/components/attributes/PivotingAttributes/styles.d.ts +1 -1
  87. package/cjs/components/attributes/editMode/AttributesFactory/AttributesFactory.js +1 -1
  88. package/cjs/components/attributes/editMode/AttributesPager/AttributeRenderer.d.ts +7 -2
  89. package/cjs/components/attributes/editMode/AttributesPager/AttributesPager.d.ts +2 -38
  90. package/cjs/components/attributes/editMode/AttributesPager/AttributesPager.js +10 -2
  91. package/cjs/components/attributes/editMode/AttributesPager/ImageLineRenderer.d.ts +1 -2
  92. package/cjs/components/attributes/editMode/AttributesPager/index.d.ts +2 -39
  93. package/cjs/components/attributes/editMode/AttributesPager/index.js +5 -44
  94. package/cjs/components/attributes/editMode/AttributesPager/styles.d.ts +1 -1
  95. package/cjs/components/attributes/editMode/AttributesPager/types.d.ts +21 -0
  96. package/cjs/components/attributes/editMode/AttributesView/AttributesView.d.ts +1 -1
  97. package/cjs/components/attributes/editMode/AttributesView/AttributesView.js +10 -12
  98. package/cjs/components/attributes/editMode/EntityCreator/EntityCreator.d.ts +9 -24
  99. package/cjs/components/attributes/editMode/EntityCreator/EntityCreator.js +7 -15
  100. package/cjs/components/attributes/editMode/EntitySelector/EntitySelector.js +1 -1
  101. package/cjs/components/attributes/editMode/EntitySelector/components/SingleValue.js +3 -6
  102. package/cjs/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
  103. package/cjs/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.js +8 -10
  104. package/cjs/components/attributes/editMode/MoreAttributesButton/useMoreAttributesItems.js +2 -3
  105. package/cjs/components/attributes/editMode/ReferenceAttribute/ReferenceAttribute.js +16 -15
  106. package/cjs/components/attributes/editMode/Roles/Roles.js +4 -5
  107. package/cjs/components/attributes/editMode/SimpleAttributeEditor/SimpleAttributeEditor.js +4 -9
  108. package/cjs/components/attributes/editMode/SimpleAttributeEditor/useAutopopulationContextValue.js +7 -30
  109. package/cjs/components/attributes/editMode/Tags/Tags.js +3 -4
  110. package/cjs/components/attributes/inline/ReferenceAttribute/ReferenceAttribute.js +3 -5
  111. package/cjs/components/attributes/inline/common/SourceItem.js +2 -4
  112. package/cjs/components/attributes/readMode/AttributesList/AttributesList.js +1 -1
  113. package/cjs/components/attributes/readMode/AttributesPager/AttributesPager.d.ts +1 -3
  114. package/cjs/components/attributes/readMode/AttributesPager/AttributesPager.js +7 -2
  115. package/cjs/components/attributes/readMode/AttributesPager/ImageLineRenderer.d.ts +1 -2
  116. package/cjs/components/attributes/readMode/AttributesPager/MultiLineRenderer.d.ts +1 -2
  117. package/cjs/components/attributes/readMode/AttributesPager/styles.d.ts +1 -1
  118. package/cjs/components/attributes/readMode/AttributesView/AttributesView.d.ts +2 -2
  119. package/cjs/components/attributes/readMode/AttributesView/AttributesView.js +3 -4
  120. package/cjs/components/attributes/readMode/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
  121. package/cjs/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.js +2 -4
  122. package/cjs/components/attributes/readMode/SpecialAttributes/Roles/Role.js +2 -6
  123. package/cjs/components/attributes/readMode/SpecialAttributes/Tags/Tag.js +2 -4
  124. package/cjs/components/attributes/types/attributesView.d.ts +2 -7
  125. package/cjs/components/crosswalks/AttributesTable/AddAttributesButton/AddAttributesButton.js +2 -3
  126. package/cjs/components/crosswalks/AttributesTable/AttributesTable.js +2 -3
  127. package/cjs/components/crosswalks/AttributesTable/cell-renderers/RuleTypeInfoButton.js +21 -17
  128. package/cjs/components/crosswalks/AttributesTable/cell-renderers/WinnerSourcesRenderer.js +1 -3
  129. package/cjs/components/crosswalks/CrosswalkAttributes/CrosswalkAttributes.js +9 -10
  130. package/cjs/components/crosswalks/CrosswalkDragLayer/CrosswalkDragPreview.js +3 -4
  131. package/cjs/components/crosswalks/CrosswalkRow/CrosswalkRow.js +11 -12
  132. package/cjs/components/crosswalks/DummyCrosswalkRow/DummyCrosswalkRow.js +3 -4
  133. package/cjs/components/editors/DataTypeValueEditor/useEditorContext.d.ts +3 -3
  134. package/cjs/components/editors/DataTypeValueEditor/useEditorContext.js +10 -36
  135. package/cjs/components/editors/DateRangeEditor/DateRangeEditor.d.ts +3 -3
  136. package/cjs/components/editors/TypeaheadEditor/TypeaheadEditor.js +1 -1
  137. package/cjs/components/history/HistoryGraph/HistoryCircle.d.ts +1 -1
  138. package/cjs/components/history/HistoryGraph/HistoryGraph.d.ts +1 -1
  139. package/cjs/components/history/HistoryMenuButton/HistoryMenuButton.js +5 -32
  140. package/cjs/components/history/HistoryTree/HistoryTree.js +9 -8
  141. package/cjs/components/history/HistoryTree/styles.d.ts +1 -1
  142. package/cjs/components/history/ProfileBandHistory/ProfileBandHistory.js +5 -31
  143. package/cjs/components/history/hooks/useHistoryDiff.js +8 -32
  144. package/cjs/components/history/hooks/useHistorySlice.js +4 -28
  145. package/cjs/components/index.d.ts +8 -6
  146. package/cjs/components/index.js +11 -6
  147. package/cjs/components/workflow/cards/GenericWorkflowTaskCard/styles.d.ts +1 -1
  148. package/cjs/components/workflow/cards/PotentialMatchTaskCard/PotentialMatchTaskCard.js +4 -5
  149. package/cjs/components/workflow/components/AttributesChanges/AttributesChanges.js +2 -3
  150. package/cjs/components/workflow/components/AttributesChanges/components/DiffRenderer/DiffRenderer.js +2 -3
  151. package/cjs/components/workflow/components/WorkflowComments/styles.d.ts +1 -1
  152. package/cjs/components/workflow/hooks/useWorkflowActions.js +6 -11
  153. package/cjs/components/workflow/hooks/useWorkflowAssignee.js +3 -8
  154. package/cjs/components/workflow/hooks/useWorkflowCheckPermission.js +24 -25
  155. package/cjs/components/workflow/hooks/useWorkflowComments.js +4 -8
  156. package/cjs/components/workflow/hooks/useWorkflowDefaultActionSuccessHandler.js +6 -30
  157. package/cjs/components/workflow/hooks/useWorkflowDefinitions.js +5 -9
  158. package/cjs/components/workflow/hooks/useWorkflowDueDate.js +4 -8
  159. package/cjs/components/workflow/hooks/useWorkflowPriority.js +4 -5
  160. package/cjs/components/workflow/hooks/useWorkflowProcessInstance.js +6 -10
  161. package/cjs/components/workflow/hooks/useWorkflowTasks.js +11 -15
  162. package/cjs/contexts/ActionsHookContext/index.d.ts +4 -1
  163. package/cjs/contexts/CollaborationContext/index.js +2 -2
  164. package/cjs/contexts/MdmModuleContext/context.d.ts +243 -0
  165. package/cjs/contexts/MdmModuleContext/context.js +7 -0
  166. package/cjs/contexts/MdmModuleContext/hooks.d.ts +139 -0
  167. package/cjs/contexts/MdmModuleContext/hooks.js +206 -0
  168. package/cjs/contexts/MdmModuleContext/index.d.ts +3 -0
  169. package/cjs/contexts/MdmModuleContext/index.js +70 -0
  170. package/cjs/contexts/MdmModuleContext/provider.d.ts +10 -0
  171. package/cjs/contexts/MdmModuleContext/provider.js +15 -0
  172. package/cjs/contexts/MdmModuleContext/selectors/dependentLookupEditorContext.d.ts +22 -0
  173. package/cjs/contexts/MdmModuleContext/selectors/dependentLookupEditorContext.js +132 -0
  174. package/cjs/contexts/MdmModuleContext/selectors/entity.d.ts +3 -0
  175. package/cjs/contexts/MdmModuleContext/selectors/entity.js +11 -0
  176. package/cjs/contexts/MdmModuleContext/selectors.d.ts +3 -0
  177. package/cjs/contexts/MdmModuleContext/selectors.js +11 -0
  178. package/cjs/contexts/index.d.ts +1 -0
  179. package/cjs/contexts/index.js +15 -0
  180. package/cjs/hooks/useAPI/useAPI.js +14 -40
  181. package/cjs/hooks/useCollaboration.js +5 -9
  182. package/cjs/hooks/useCommentsEntitiesMap.js +2 -6
  183. package/cjs/hooks/useConfigPermissions.js +3 -7
  184. package/cjs/hooks/useCustomScripts.js +13 -39
  185. package/cjs/hooks/useEditableConnection.js +2 -6
  186. package/cjs/hooks/useMarkAsNotMatchRequest.js +4 -8
  187. package/cjs/hooks/useMatchesLoader.js +5 -9
  188. package/cjs/hooks/useMergeAllRequest.js +16 -30
  189. package/cjs/hooks/useReadableSearchState.js +8 -32
  190. package/cjs/hooks/useRelationsLoader.js +9 -33
  191. package/cjs/hooks/useScrollToAttributeError/styles.d.ts +1 -1
  192. package/cjs/hooks/useUsers.js +4 -5
  193. package/cjs/icons/Tenant.d.ts +3 -0
  194. package/cjs/icons/Tenant.js +22 -0
  195. package/esm/components/AttributeGroupIcon/AttributeGroupIcon.js +2 -3
  196. package/esm/components/AttributeSelector/AttributeSelector.js +2 -3
  197. package/esm/components/AttributesFiltersBuilder/AttributesFiltersBuilder.js +5 -6
  198. package/esm/components/BasicTableView/ColumnFilter/FilterChip/FilterChip.d.ts +13 -19
  199. package/esm/components/BasicTableView/ColumnFilter/FilterChip/FilterChip.js +7 -18
  200. package/esm/components/BasicView/BasicView.d.ts +1 -1
  201. package/esm/components/CollaborationItem/Comment/Comment.js +2 -4
  202. package/esm/components/CollaborationItem/CommentTarget/CommentTarget.js +3 -5
  203. package/esm/components/CollaborationItem/CommentTarget/styles.d.ts +1 -1
  204. package/esm/components/CollaborationItem/RepliedComment/RepliedComment.js +2 -4
  205. package/esm/components/CollaborationItem/SendMessageArea/SendMessageArea.js +2 -4
  206. package/esm/components/ColoredSourceIcon/ColoredSourceIcon.js +2 -4
  207. package/esm/components/ConnectionEditor/ConnectionEditor.js +3 -6
  208. package/esm/components/DataTenantBadge/DataTenantBadge.js +6 -4
  209. package/esm/components/DataTypeValue/DataTypeValue.js +4 -5
  210. package/esm/components/EntityAvatar/EntityAvatar.js +4 -5
  211. package/esm/components/EntityTypeBadge/EntityTypeBadge.js +4 -6
  212. package/esm/components/EntityTypeIcon/EntityTypeIcon.js +2 -3
  213. package/esm/components/EntityUriLink/EntityUriLink.js +5 -7
  214. package/esm/components/ErrorPopup/ErrorPopup.d.ts +13 -8
  215. package/esm/components/ErrorPopup/ErrorPopup.js +23 -18
  216. package/esm/components/ErrorPopup/styles.d.ts +1 -1
  217. package/esm/components/HierarchyNodeTitle/HierarchyNodeTitle.js +5 -7
  218. package/esm/components/ImageAttributesGallery/ImageAttributesGallery.js +2 -3
  219. package/esm/components/ImageDetailsView/ImageDetailsViewSidebar/ImageDetailsViewSidebar.d.ts +0 -5
  220. package/esm/components/ImageDetailsView/ImageDetailsViewSidebar/ImageDetailsViewSidebar.js +6 -7
  221. package/esm/components/ImageDetailsView/MetaInfo/MetaInfo.js +3 -4
  222. package/esm/components/ImageDetailsView/MetaInfoList/MetaInfoItem/styles.d.ts +1 -1
  223. package/esm/components/ImageDetailsView/MetaInfoList/MetaInfoList.js +3 -4
  224. package/esm/components/ImageDetailsView/hooks/useEditMetaInfo.js +4 -11
  225. package/esm/components/MatchRulesBlock/SimpleMatchRules/styles.d.ts +1 -1
  226. package/esm/components/MatchRulesSelector/MatchRulesSelector.d.ts +1 -4
  227. package/esm/components/MatchRulesSelector/MatchRulesSelector.js +2 -4
  228. package/esm/components/ModeSwitcher/styles.d.ts +1 -1
  229. package/esm/components/PivotingUriLink/PivotingUriLink.js +2 -4
  230. package/esm/components/Popper/Popper.d.ts +1 -1
  231. package/esm/components/PotentialMatchReviewCard/styles.d.ts +1 -1
  232. package/esm/components/ProfileBand/ProfileBand.js +3 -4
  233. package/esm/components/ProfileBandNavigation/ProfileBandNavigationWidget.d.ts +1 -1
  234. package/esm/components/ProfileBandNavigation/hooks/useSearchNavigation.js +20 -32
  235. package/esm/components/ProfileBandNavigation/hooks/useSearchNavigationVisibility.js +4 -5
  236. package/esm/components/ProfilesList/ProfilesList.d.ts +2 -3
  237. package/esm/components/ProfilesList/ProfilesList.js +3 -1
  238. package/esm/components/RelationEditor/RelationEditor.js +49 -36
  239. package/esm/components/RelevanceScoreBadge/RelevanceScoreBadge.js +3 -4
  240. package/esm/components/SelectAttributesList/SelectAttributesList.js +2 -3
  241. package/esm/components/SmallIconButton/SmallIconButton.d.ts +1 -1
  242. package/esm/components/SmallIconButton/index.d.ts +1 -1
  243. package/esm/components/SourceIcon/SourceIcon.js +2 -3
  244. package/esm/components/SourceSystemsSelector/SourceSystemsSelector.js +2 -3
  245. package/esm/components/StepNavigation/ProgressButton.d.ts +12 -0
  246. package/esm/components/StepNavigation/ProgressButton.js +36 -0
  247. package/esm/components/StepNavigation/StepNavigation.d.ts +13 -0
  248. package/esm/components/StepNavigation/StepNavigation.js +57 -0
  249. package/esm/components/StepNavigation/styles.d.ts +2 -0
  250. package/esm/components/StepNavigation/styles.js +41 -0
  251. package/esm/components/TenantLabel/TenantLabel.d.ts +6 -0
  252. package/esm/components/TenantLabel/TenantLabel.js +17 -0
  253. package/esm/components/TenantLabel/styles.d.ts +1 -0
  254. package/esm/components/TenantLabel/styles.js +19 -0
  255. package/esm/components/TenantsDropDownSelector/TenantsDropDownSelector.js +3 -4
  256. package/esm/components/UploadImageDialog/TargetBox/styles.d.ts +1 -1
  257. package/esm/components/UploadImageDialog/UploadImageDialog.js +4 -5
  258. package/esm/components/UserSelector/UserSelector.js +3 -4
  259. package/esm/components/activityLog/ActivityExportButton/ActivityExportButton.js +6 -7
  260. package/esm/components/activityLog/ActivityFilterEditor/ActivityFilterEditor.js +2 -3
  261. package/esm/components/activityLog/ActivityFilterEditor/EntityChangedSelectors.js +2 -3
  262. package/esm/components/activityLog/ActivityFilterEditor/SourceSelector.js +3 -4
  263. package/esm/components/activityLog/ActivityLogFilter/ActivityLogFilter.d.ts +1 -1
  264. package/esm/components/activityLog/ActivityLogFilter/ActivityLogFilter.js +5 -3
  265. package/esm/components/activityLog/activities/GroupActivity.js +2 -3
  266. package/esm/components/activityLog/activities/RelationObject/styles.d.ts +1 -1
  267. package/esm/components/activityLog/activities/SearchActivity.js +6 -7
  268. package/esm/components/activityLog/activities/fields/DeltaField.js +7 -8
  269. package/esm/components/activityLog/activities/fields/commonStyles.d.ts +1 -1
  270. package/esm/components/activityLog/activities/records/EntityRecord.js +8 -9
  271. package/esm/components/attributes/AttributesView/AttributesView.d.ts +2 -2
  272. package/esm/components/attributes/AttributesView/AttributesView.js +10 -6
  273. package/esm/components/attributes/DescriptionIcon/DescriptionIcon.d.ts +1 -1
  274. package/esm/components/attributes/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
  275. package/esm/components/attributes/ImageAttributesLine/ImageAttributesLine.js +9 -10
  276. package/esm/components/attributes/OvIcon/OvIcon.d.ts +1 -1
  277. package/esm/components/attributes/OvIcon/OvIcon.js +5 -7
  278. package/esm/components/attributes/PivotingAttributes/PivotingTooltip.js +4 -6
  279. package/esm/components/attributes/PivotingAttributes/PivotingTooltipContent.js +3 -4
  280. package/esm/components/attributes/PivotingAttributes/styles.d.ts +1 -1
  281. package/esm/components/attributes/editMode/AttributesFactory/AttributesFactory.js +1 -1
  282. package/esm/components/attributes/editMode/AttributesPager/AttributeRenderer.d.ts +7 -2
  283. package/esm/components/attributes/editMode/AttributesPager/AttributesPager.d.ts +2 -38
  284. package/esm/components/attributes/editMode/AttributesPager/AttributesPager.js +12 -4
  285. package/esm/components/attributes/editMode/AttributesPager/ImageLineRenderer.d.ts +1 -2
  286. package/esm/components/attributes/editMode/AttributesPager/index.d.ts +2 -39
  287. package/esm/components/attributes/editMode/AttributesPager/index.js +2 -19
  288. package/esm/components/attributes/editMode/AttributesPager/styles.d.ts +1 -1
  289. package/esm/components/attributes/editMode/AttributesPager/types.d.ts +21 -0
  290. package/esm/components/attributes/editMode/AttributesView/AttributesView.d.ts +1 -1
  291. package/esm/components/attributes/editMode/AttributesView/AttributesView.js +11 -13
  292. package/esm/components/attributes/editMode/EntityCreator/EntityCreator.d.ts +9 -24
  293. package/esm/components/attributes/editMode/EntityCreator/EntityCreator.js +7 -15
  294. package/esm/components/attributes/editMode/EntitySelector/EntitySelector.js +1 -1
  295. package/esm/components/attributes/editMode/EntitySelector/components/SingleValue.js +4 -7
  296. package/esm/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
  297. package/esm/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.js +8 -10
  298. package/esm/components/attributes/editMode/MoreAttributesButton/useMoreAttributesItems.js +2 -3
  299. package/esm/components/attributes/editMode/ReferenceAttribute/ReferenceAttribute.js +18 -17
  300. package/esm/components/attributes/editMode/Roles/Roles.js +4 -5
  301. package/esm/components/attributes/editMode/SimpleAttributeEditor/SimpleAttributeEditor.js +5 -10
  302. package/esm/components/attributes/editMode/SimpleAttributeEditor/useAutopopulationContextValue.js +7 -7
  303. package/esm/components/attributes/editMode/Tags/Tags.js +3 -4
  304. package/esm/components/attributes/inline/ReferenceAttribute/ReferenceAttribute.js +4 -6
  305. package/esm/components/attributes/inline/common/SourceItem.js +3 -5
  306. package/esm/components/attributes/readMode/AttributesList/AttributesList.js +1 -1
  307. package/esm/components/attributes/readMode/AttributesPager/AttributesPager.d.ts +1 -3
  308. package/esm/components/attributes/readMode/AttributesPager/AttributesPager.js +7 -2
  309. package/esm/components/attributes/readMode/AttributesPager/ImageLineRenderer.d.ts +1 -2
  310. package/esm/components/attributes/readMode/AttributesPager/MultiLineRenderer.d.ts +1 -2
  311. package/esm/components/attributes/readMode/AttributesPager/styles.d.ts +1 -1
  312. package/esm/components/attributes/readMode/AttributesView/AttributesView.d.ts +2 -2
  313. package/esm/components/attributes/readMode/AttributesView/AttributesView.js +4 -5
  314. package/esm/components/attributes/readMode/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
  315. package/esm/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.js +4 -6
  316. package/esm/components/attributes/readMode/SpecialAttributes/Roles/Role.js +2 -3
  317. package/esm/components/attributes/readMode/SpecialAttributes/Tags/Tag.js +3 -5
  318. package/esm/components/attributes/types/attributesView.d.ts +2 -7
  319. package/esm/components/crosswalks/AttributesTable/AddAttributesButton/AddAttributesButton.js +2 -3
  320. package/esm/components/crosswalks/AttributesTable/AttributesTable.js +2 -3
  321. package/esm/components/crosswalks/AttributesTable/cell-renderers/RuleTypeInfoButton.js +21 -17
  322. package/esm/components/crosswalks/AttributesTable/cell-renderers/WinnerSourcesRenderer.js +2 -4
  323. package/esm/components/crosswalks/CrosswalkAttributes/CrosswalkAttributes.js +9 -10
  324. package/esm/components/crosswalks/CrosswalkDragLayer/CrosswalkDragPreview.js +3 -4
  325. package/esm/components/crosswalks/CrosswalkRow/CrosswalkRow.js +12 -13
  326. package/esm/components/crosswalks/DummyCrosswalkRow/DummyCrosswalkRow.js +3 -4
  327. package/esm/components/editors/DataTypeValueEditor/useEditorContext.d.ts +3 -3
  328. package/esm/components/editors/DataTypeValueEditor/useEditorContext.js +10 -13
  329. package/esm/components/editors/DateRangeEditor/DateRangeEditor.d.ts +3 -3
  330. package/esm/components/editors/TypeaheadEditor/TypeaheadEditor.js +1 -1
  331. package/esm/components/history/HistoryGraph/HistoryCircle.d.ts +1 -1
  332. package/esm/components/history/HistoryGraph/HistoryGraph.d.ts +1 -1
  333. package/esm/components/history/HistoryMenuButton/HistoryMenuButton.js +5 -9
  334. package/esm/components/history/HistoryTree/HistoryTree.js +9 -8
  335. package/esm/components/history/HistoryTree/styles.d.ts +1 -1
  336. package/esm/components/history/ProfileBandHistory/ProfileBandHistory.js +5 -8
  337. package/esm/components/history/hooks/useHistoryDiff.js +8 -9
  338. package/esm/components/history/hooks/useHistorySlice.js +4 -5
  339. package/esm/components/index.d.ts +8 -6
  340. package/esm/components/index.js +8 -6
  341. package/esm/components/workflow/cards/GenericWorkflowTaskCard/styles.d.ts +1 -1
  342. package/esm/components/workflow/cards/PotentialMatchTaskCard/PotentialMatchTaskCard.js +4 -5
  343. package/esm/components/workflow/components/AttributesChanges/AttributesChanges.js +2 -3
  344. package/esm/components/workflow/components/AttributesChanges/components/DiffRenderer/DiffRenderer.js +2 -3
  345. package/esm/components/workflow/components/WorkflowComments/styles.d.ts +1 -1
  346. package/esm/components/workflow/hooks/useWorkflowActions.js +5 -7
  347. package/esm/components/workflow/hooks/useWorkflowAssignee.js +4 -6
  348. package/esm/components/workflow/hooks/useWorkflowCheckPermission.js +24 -22
  349. package/esm/components/workflow/hooks/useWorkflowComments.js +4 -5
  350. package/esm/components/workflow/hooks/useWorkflowDefaultActionSuccessHandler.js +7 -8
  351. package/esm/components/workflow/hooks/useWorkflowDefinitions.js +5 -6
  352. package/esm/components/workflow/hooks/useWorkflowDueDate.js +4 -5
  353. package/esm/components/workflow/hooks/useWorkflowPriority.js +4 -5
  354. package/esm/components/workflow/hooks/useWorkflowProcessInstance.js +6 -7
  355. package/esm/components/workflow/hooks/useWorkflowTasks.js +11 -12
  356. package/esm/contexts/ActionsHookContext/index.d.ts +4 -1
  357. package/esm/contexts/CollaborationContext/index.js +1 -1
  358. package/esm/contexts/MdmModuleContext/context.d.ts +243 -0
  359. package/esm/contexts/MdmModuleContext/context.js +4 -0
  360. package/esm/contexts/MdmModuleContext/hooks.d.ts +139 -0
  361. package/esm/contexts/MdmModuleContext/hooks.js +139 -0
  362. package/esm/contexts/MdmModuleContext/index.d.ts +3 -0
  363. package/esm/contexts/MdmModuleContext/index.js +2 -0
  364. package/esm/contexts/MdmModuleContext/provider.d.ts +10 -0
  365. package/esm/contexts/MdmModuleContext/provider.js +8 -0
  366. package/esm/contexts/MdmModuleContext/selectors/dependentLookupEditorContext.d.ts +22 -0
  367. package/esm/contexts/MdmModuleContext/selectors/dependentLookupEditorContext.js +123 -0
  368. package/esm/contexts/MdmModuleContext/selectors/entity.d.ts +3 -0
  369. package/esm/contexts/MdmModuleContext/selectors/entity.js +6 -0
  370. package/esm/contexts/MdmModuleContext/selectors.d.ts +3 -0
  371. package/esm/contexts/MdmModuleContext/selectors.js +6 -0
  372. package/esm/contexts/index.d.ts +1 -0
  373. package/esm/contexts/index.js +1 -0
  374. package/esm/hooks/useAPI/useAPI.js +15 -18
  375. package/esm/hooks/useCollaboration.js +5 -6
  376. package/esm/hooks/useCommentsEntitiesMap.js +2 -3
  377. package/esm/hooks/useConfigPermissions.js +3 -4
  378. package/esm/hooks/useCustomScripts.js +14 -17
  379. package/esm/hooks/useEditableConnection.js +2 -3
  380. package/esm/hooks/useMarkAsNotMatchRequest.js +4 -5
  381. package/esm/hooks/useMatchesLoader.js +5 -6
  382. package/esm/hooks/useMergeAllRequest.js +16 -7
  383. package/esm/hooks/useReadableSearchState.js +8 -9
  384. package/esm/hooks/useRelationsLoader.js +9 -10
  385. package/esm/hooks/useScrollToAttributeError/styles.d.ts +1 -1
  386. package/esm/hooks/useUsers.js +4 -5
  387. package/esm/icons/Tenant.d.ts +3 -0
  388. package/esm/icons/Tenant.js +17 -0
  389. package/package.json +3 -4
  390. package/cjs/components/ProfileBandNavigation/helpers/index.d.ts +0 -7
  391. package/cjs/components/ProfileBandNavigation/helpers/index.js +0 -70
  392. package/cjs/components/ProfileBandNavigation/types/index.d.ts +0 -15
  393. package/cjs/components/ProfileBandNavigation/types/index.js +0 -2
  394. package/cjs/components/ProfilesList/index.d.ts +0 -27
  395. package/cjs/components/ProfilesList/index.js +0 -16
  396. package/cjs/components/RelationEditor/index.d.ts +0 -6
  397. package/cjs/components/RelationEditor/index.js +0 -50
  398. package/cjs/components/attributes/AttributesView/index.d.ts +0 -7
  399. package/cjs/components/attributes/AttributesView/index.js +0 -15
  400. package/cjs/components/attributes/editMode/AttributesView/index.d.ts +0 -23
  401. package/cjs/components/attributes/editMode/AttributesView/index.js +0 -14
  402. package/cjs/components/attributes/editMode/EntityCreator/index.d.ts +0 -25
  403. package/cjs/components/attributes/editMode/EntityCreator/index.js +0 -42
  404. package/cjs/components/attributes/editMode/ReferenceAttribute/index.d.ts +0 -4
  405. package/cjs/components/attributes/editMode/ReferenceAttribute/index.js +0 -48
  406. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.d.ts +0 -2
  407. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.js +0 -34
  408. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.d.ts +0 -1
  409. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.js +0 -19
  410. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.d.ts +0 -1
  411. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.js +0 -20
  412. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.d.ts +0 -5
  413. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.js +0 -79
  414. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/types.d.ts +0 -11
  415. package/cjs/components/attributes/readMode/AttributesPager/index.d.ts +0 -28
  416. package/cjs/components/attributes/readMode/AttributesPager/index.js +0 -43
  417. package/cjs/components/attributes/readMode/AttributesView/index.d.ts +0 -23
  418. package/cjs/components/attributes/readMode/AttributesView/index.js +0 -14
  419. package/cjs/test-utils/store-utils.d.ts +0 -78
  420. package/cjs/test-utils/store-utils.js +0 -19
  421. package/esm/components/ProfileBandNavigation/helpers/index.d.ts +0 -7
  422. package/esm/components/ProfileBandNavigation/helpers/index.js +0 -66
  423. package/esm/components/ProfileBandNavigation/types/index.d.ts +0 -15
  424. package/esm/components/ProfileBandNavigation/types/index.js +0 -1
  425. package/esm/components/ProfilesList/index.d.ts +0 -27
  426. package/esm/components/ProfilesList/index.js +0 -10
  427. package/esm/components/RelationEditor/index.d.ts +0 -6
  428. package/esm/components/RelationEditor/index.js +0 -21
  429. package/esm/components/attributes/AttributesView/index.d.ts +0 -7
  430. package/esm/components/attributes/AttributesView/index.js +0 -9
  431. package/esm/components/attributes/editMode/AttributesView/index.d.ts +0 -23
  432. package/esm/components/attributes/editMode/AttributesView/index.js +0 -8
  433. package/esm/components/attributes/editMode/EntityCreator/index.d.ts +0 -25
  434. package/esm/components/attributes/editMode/EntityCreator/index.js +0 -13
  435. package/esm/components/attributes/editMode/ReferenceAttribute/index.d.ts +0 -4
  436. package/esm/components/attributes/editMode/ReferenceAttribute/index.js +0 -19
  437. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.d.ts +0 -2
  438. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.js +0 -27
  439. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.d.ts +0 -1
  440. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.js +0 -15
  441. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.d.ts +0 -1
  442. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.js +0 -13
  443. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.d.ts +0 -5
  444. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.js +0 -72
  445. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/types.d.ts +0 -11
  446. package/esm/components/attributes/readMode/AttributesPager/index.d.ts +0 -28
  447. package/esm/components/attributes/readMode/AttributesPager/index.js +0 -14
  448. package/esm/components/attributes/readMode/AttributesView/index.d.ts +0 -23
  449. package/esm/components/attributes/readMode/AttributesView/index.js +0 -8
  450. package/esm/test-utils/store-utils.d.ts +0 -78
  451. package/esm/test-utils/store-utils.js +0 -12
  452. /package/cjs/components/attributes/editMode/{SimpleAttributeEditor/selectors → AttributesPager}/types.js +0 -0
  453. /package/esm/components/attributes/editMode/{SimpleAttributeEditor/selectors → AttributesPager}/types.js +0 -0
@@ -24,21 +24,29 @@ import React, { useMemo, useCallback, useRef } from 'react';
24
24
  import PropTypes from 'prop-types';
25
25
  import classnames from 'classnames';
26
26
  import { identity, pipe, isEmpty } from 'ramda';
27
- import { evaluateDeepEntityLabel, ReferenceAttributeType, referencedEntityAttributeTypesSelectionStrategy, getEntityType, getReferencedEntityFromAttrValue, getReferencedRelationFromAttrValue, getReferencedEntityUri, getReferencedEntityTypeUri, getReferencedEntityTypeUriFromAttrType, getReferencedRelationAttrTypesUris, findAttributeTypeByUri, getCreatableAttributeTypes, createTemporaryEntity, convertReferencedEntityForAttrValue, createReferencedRelationForAttrValue, addReferencedRelationCrosswalks, getReferencedEntityUriFromAttrValue, checkCanEditAttribute, checkMetadataForCreate, isReltioCrosswalk, getErrorMessage, EntityType, MetadataType, getErrorId, getReferencedEntityActiveError, isTempUri, getLabel, isAttributeTypeError } from '@reltio/mdm-sdk';
27
+ import { evaluateDeepEntityLabel, ReferenceAttributeType, referencedEntityAttributeTypesSelectionStrategy, getEntityType, getReferencedEntityFromAttrValue, getReferencedRelationFromAttrValue, getReferencedEntityUri, getReferencedEntityTypeUri, getReferencedEntityTypeUriFromAttrType, getReferencedRelationAttrTypesUris, findAttributeTypeByUri, getCreatableAttributeTypes, createTemporaryEntity, convertReferencedEntityForAttrValue, createReferencedRelationForAttrValue, addReferencedRelationCrosswalks, getReferencedEntityUriFromAttrValue, checkCanEditAttribute, checkMetadataForCreate, isReltioCrosswalk, getErrorMessage, getErrorId, getReferencedEntityActiveError, isTempUri, getLabel, isAttributeTypeError } from '@reltio/mdm-sdk';
28
28
  import ComplexAttribute from '../ComplexAttribute/ComplexAttribute';
29
29
  import EntitySelector from '../EntitySelector/EntitySelector';
30
30
  import { ErrorWrapper } from '../../../index';
31
31
  import { withContext } from '../../../../HOCs';
32
- import { isHighlightedErrorType, ScrollToElementContext } from '../../../../contexts';
32
+ import { isHighlightedErrorType, ScrollToElementContext, useMdmAction, useMdmGlobalSearchRequestOptions, useMdmMetadata, useMdmModifiedEntity } from '../../../../contexts';
33
33
  import { useScrollToAttributeError } from '../../../../hooks';
34
34
  import { useStyles } from './styles';
35
35
  var ReferenceAttribute = function (props) {
36
36
  var _a;
37
37
  var styles = useStyles();
38
- var modifiedEntity = props.modifiedEntity, metadata = props.metadata, globalSearchRequestOptions = props.globalSearchRequestOptions, onDeleteModifiedEntity = props.onDeleteModifiedEntity, onUpdateModifiedEntity = props.onUpdateModifiedEntity, onDeactivateError = props.onDeactivateError, highlightedError = props.highlightedError, ownProps = __rest(props, ["modifiedEntity", "metadata", "globalSearchRequestOptions", "onDeleteModifiedEntity", "onUpdateModifiedEntity", "onDeactivateError", "highlightedError"]);
38
+ var highlightedError = props.highlightedError, ownProps = __rest(props, ["highlightedError"]);
39
39
  var attributeValue = ownProps.attributeValue, attributeType = ownProps.attributeType, mode = ownProps.mode, crosswalks = ownProps.crosswalks, errors = ownProps.errors, onChangeAttribute = ownProps.onChangeAttribute;
40
40
  var initialAttributeValue = useRef(attributeValue);
41
41
  var _b = useScrollToAttributeError({ highlightedError: highlightedError, isSimple: true }), ref = _b.ref, errorClassName = _b.errorClassName;
42
+ var entityUri = getReferencedEntityUriFromAttrValue(attributeValue);
43
+ var entityDeleted = useMdmAction('entityDeleted');
44
+ var entityCreated = useMdmAction('entityCreated');
45
+ var errorDeactivated = useMdmAction('errorDeactivated');
46
+ var mdmModifiedEntity = useMdmModifiedEntity(entityUri);
47
+ var modifiedEntity = isTempUri(entityUri) ? mdmModifiedEntity : null;
48
+ var metadata = useMdmMetadata();
49
+ var globalSearchRequestOptions = useMdmGlobalSearchRequestOptions(['ovOnly']);
42
50
  var referencedEntity = getReferencedEntityFromAttrValue(attributeValue);
43
51
  var referencedRelation = getReferencedRelationFromAttrValue(attributeValue);
44
52
  var referencedEntityTypeUri = getReferencedEntityTypeUriFromAttrType(attributeType);
@@ -64,7 +72,7 @@ var ReferenceAttribute = function (props) {
64
72
  var newEntityAttrTypesSelectionStrategy = useCallback(function (entityType) { return referencedEntityAttributeTypesSelectionStrategy(attributeType, entityType); }, [attributeType]);
65
73
  var onChangeEntity = useCallback(function (entity) {
66
74
  if (modifiedEntity) {
67
- onDeleteModifiedEntity(modifiedEntity.uri);
75
+ entityDeleted(modifiedEntity.uri);
68
76
  }
69
77
  var initialAttrValue = initialAttributeValue.current;
70
78
  var isInitialEntity = !isEmpty(entity) && entity.uri === getReferencedEntityUriFromAttrValue(initialAttrValue);
@@ -73,15 +81,15 @@ var ReferenceAttribute = function (props) {
73
81
  : createReferencedRelationForAttrValue(attributeValue) });
74
82
  onChangeAttribute({ value: modifiedValue, attributeType: attributeType, uri: attributeValue.uri });
75
83
  if (referencedEntityMissedError) {
76
- onDeactivateError(getErrorId(referencedEntityMissedError));
84
+ errorDeactivated(getErrorId(referencedEntityMissedError));
77
85
  }
78
86
  }, [
79
87
  attributeValue,
80
88
  attributeType,
81
89
  modifiedEntity,
82
90
  onChangeAttribute,
83
- onDeleteModifiedEntity,
84
- onDeactivateError,
91
+ entityDeleted,
92
+ errorDeactivated,
85
93
  referencedEntityMissedError
86
94
  ]);
87
95
  var onCreateEntity = useCallback(function (entityTypeUri, initValue) {
@@ -94,15 +102,8 @@ var ReferenceAttribute = function (props) {
94
102
  mode: mode
95
103
  });
96
104
  onChangeEntity(newEntity);
97
- onUpdateModifiedEntity(newEntity);
98
- }, [
99
- newEntityAttrTypesSelectionStrategy,
100
- mode,
101
- referencedEntityType,
102
- metadata,
103
- onChangeEntity,
104
- onUpdateModifiedEntity
105
- ]);
105
+ entityCreated(newEntity);
106
+ }, [newEntityAttrTypesSelectionStrategy, mode, referencedEntityType, metadata, onChangeEntity, entityCreated]);
106
107
  var canChangeReferencedEntity = useMemo(function () {
107
108
  return checkCanEditAttribute({
108
109
  attributeType: attributeType,
@@ -120,7 +121,7 @@ var ReferenceAttribute = function (props) {
120
121
  _a[styles.dense] = errorMessage || (selectedEntity && isTempUri(selectedEntity.entityUri)),
121
122
  _a)), entity: selectedEntity || {}, entityTypesUris: entityTypesUris, max: 20, globalSearchRequestOptions: globalSearchRequestOptions, mode: mode, isDisabled: !canChangeReferencedEntity, onChange: onChangeEntity, onCreate: canCreateReferencedEntity ? onCreateEntity : undefined, metadata: metadata, attributeTypesSelectionStrategy: newEntityAttrTypesSelectionStrategy })))));
122
123
  };
123
- ReferenceAttribute.propTypes = __assign(__assign({}, ReferenceAttributeType), { modifiedEntity: EntityType, metadata: MetadataType, globalSearchRequestOptions: PropTypes.object, onDeleteModifiedEntity: PropTypes.func, onUpdateModifiedEntity: PropTypes.func, onDeactivateError: PropTypes.func, highlightedError: PropTypes.object });
124
+ ReferenceAttribute.propTypes = __assign(__assign({}, ReferenceAttributeType), { highlightedError: PropTypes.object });
124
125
  export default withContext(ScrollToElementContext, function (contextValue, _a) {
125
126
  var attributeValue = _a.attributeValue, attributeType = _a.attributeType;
126
127
  var _b = contextValue || {}, element = _b.element, type = _b.type;
@@ -1,19 +1,18 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { prop, propEq } from 'ramda';
3
- import { useSelector } from 'react-redux';
4
3
  import { EntityAttrTypes, getRolesForEntityType, getLastUriPart } from '@reltio/mdm-sdk';
5
- import mdmModule from '@reltio/mdm-module';
6
4
  import SimpleDropDownSelector from '../../../SimpleDropDownSelector/SimpleDropDownSelector';
7
5
  import { MultiValueChip } from '../../..';
8
6
  import { useStyles } from './styles';
9
7
  import SmallIconButton from '../../../SmallIconButton/SmallIconButton';
10
8
  import DeleteIcon from '@mui/icons-material/Delete';
9
+ import { useMdmEntity, useMdmMetadata } from '../../../../contexts';
11
10
  var components = { MultiValue: MultiValueChip };
12
11
  export var Roles = function (_a) {
13
12
  var values = _a.values, onChange = _a.onChange, onDelete = _a.onDelete;
14
13
  var styles = useStyles();
15
- var metadata = useSelector(mdmModule.selectors.getMetadata);
16
- var entity = useSelector(mdmModule.selectors.getEntity);
14
+ var metadata = useMdmMetadata();
15
+ var entity = useMdmEntity();
17
16
  var entityUri = entity.uri;
18
17
  var options = getRolesForEntityType(metadata, entity.type).map(function (role) { return ({
19
18
  value: role.uri,
@@ -40,5 +39,5 @@ export var Roles = function (_a) {
40
39
  }, [entityUri, onDelete]);
41
40
  return (React.createElement("div", { className: styles.container, "data-reltio-id": "reltio-attribute-value" },
42
41
  React.createElement(SimpleDropDownSelector, { label: '', height: 40, isMulti: true, options: options, value: formattedValues, onChange: handleChange, components: components, classes: styles, className: styles.roleContainer }),
43
- !!onDelete && (React.createElement(SmallIconButton, { className: styles.deleteButton, icon: DeleteIcon, onClick: handleDelete, size: "L" }))));
42
+ !!onDelete && (React.createElement(SmallIconButton, { "data-reltio-id": "reltio-roles-delete-button", className: styles.deleteButton, icon: DeleteIcon, onClick: handleDelete, size: "L" }))));
44
43
  };
@@ -22,7 +22,6 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import React, { useCallback, useContext, useEffect, useMemo } from 'react';
24
24
  import PropTypes from 'prop-types';
25
- import { useSelector } from 'react-redux';
26
25
  import classnames from 'classnames';
27
26
  import { has, pipe } from 'ramda';
28
27
  import AddIcon from '@mui/icons-material/Add';
@@ -36,9 +35,8 @@ import ErrorWrapper from '../../../ErrorWrapper/ErrorWrapper';
36
35
  import SmallIconButton from '../../../SmallIconButton/SmallIconButton';
37
36
  import { attributeValueToEditorValue, prepareChangeData } from './utils';
38
37
  import withAsyncMount from '../../../../HOCs/withAsyncMount/withAsyncMount';
39
- import { getDependentLookupEditorContext } from './selectors/getDependentLookupEditorContext';
40
38
  import { withContext } from '../../../../HOCs';
41
- import { isHighlightedErrorType, ScrollToElementContext, DependentLookupAutopopulationContext, ProfilePerspectiveViewContext } from '../../../../contexts';
39
+ import { isHighlightedErrorType, ScrollToElementContext, DependentLookupAutopopulationContext, ProfilePerspectiveViewContext, useMdmDependentLookupEditorContext } from '../../../../contexts';
42
40
  import { useScrollToAttributeError } from '../../../../hooks';
43
41
  import { useAutopopulationContextValue } from './useAutopopulationContextValue';
44
42
  import { useStyles } from './styles';
@@ -58,11 +56,7 @@ var SimpleAttributeEditor = function (_a) {
58
56
  var canDelete = checkCanDeleteAttribute({ attributeType: attributeType, attributeValue: attributeValue, mode: mode, isReltioCrosswalk: isReltioCrosswalk });
59
57
  var showToEdit = canEdit && isEditableMode;
60
58
  var errorMessage = getErrorMessage(ownError);
61
- var dependentLookupEditorContext = useSelector(function (state) {
62
- return isDependentLookupAttrType(attributeType)
63
- ? getDependentLookupEditorContext(state, attributeValue, attributeType === null || attributeType === void 0 ? void 0 : attributeType.uri)
64
- : null;
65
- });
59
+ var dependentLookupEditorContext = useMdmDependentLookupEditorContext(attributeValue, attributeType);
66
60
  var _e = useScrollToAttributeError({ highlightedError: highlightedError, isSimple: true }), ref = _e.ref, errorClassName = _e.errorClassName;
67
61
  useEffect(function () {
68
62
  // when editor is empty but has default lookup code, onChangeAttribute will be called by useLookupsResolver
@@ -128,9 +122,10 @@ SimpleAttributeEditor.propTypes = {
128
122
  highlightedError: PropTypes.object,
129
123
  isEmptyEditor: PropTypes.bool
130
124
  };
131
- export default withAsyncMount(withContext(ScrollToElementContext, function (contextValue, _a) {
125
+ var SimpleAttributeEditorWithScrollToElementContext = withContext(ScrollToElementContext, function (contextValue, _a) {
132
126
  var attributeValue = _a.attributeValue;
133
127
  var _b = contextValue || {}, element = _b.element, type = _b.type;
134
128
  var isHighlighted = isHighlightedErrorType(type) && (element === null || element === void 0 ? void 0 : element.uri) === attributeValue.uri;
135
129
  return { highlightedError: isHighlighted ? contextValue : null };
136
- }, SimpleAttributeEditor), AsyncMountPlaceholder);
130
+ }, SimpleAttributeEditor);
131
+ export default withAsyncMount(SimpleAttributeEditorWithScrollToElementContext, AsyncMountPlaceholder);
@@ -1,17 +1,17 @@
1
1
  import { useCallback, useMemo } from 'react';
2
2
  import { isAutopopulationEnabled } from '@reltio/mdm-sdk';
3
- import { useDispatch, useSelector } from 'react-redux';
4
- import mdmModule, { profile } from '@reltio/mdm-module';
3
+ import { useMdmAction, useMdmDependentLookupEditorState, useMdmLookupAutocomplete } from '../../../../contexts';
5
4
  export var useAutopopulationContextValue = function (_a) {
6
5
  var enabled = _a.enabled, attributeTypeUri = _a.attributeTypeUri, valueUri = _a.valueUri;
7
- var dispatch = useDispatch();
8
- var autocompleteConfig = useSelector(mdmModule.selectors.getLookupAutocomplete);
6
+ var dependentLookupsEditorTouched = useMdmAction('dependentLookupsEditorTouched');
7
+ var autocompleteConfig = useMdmLookupAutocomplete();
8
+ var dependentLookupEditorState = useMdmDependentLookupEditorState(valueUri);
9
9
  var autopopulationEnabled = enabled && isAutopopulationEnabled(autocompleteConfig, attributeTypeUri);
10
10
  var autopopulationId = autopopulationEnabled ? valueUri : null;
11
- var _b = (useSelector(function (state) { return autopopulationEnabled && mdmModule.selectors.getDependentLookupEditorState(state, valueUri); }) || {}).isTouched, isTouched = _b === void 0 ? false : _b;
11
+ var _b = ((autopopulationEnabled && dependentLookupEditorState) || {}).isTouched, isTouched = _b === void 0 ? false : _b;
12
12
  var onTouch = useCallback(function (valueUri) {
13
- dispatch(profile.dependentLookups.actions.dependentLookupsEditorTouched({ uri: valueUri, isTouched: true }));
14
- }, [dispatch]);
13
+ dependentLookupsEditorTouched({ uri: valueUri, isTouched: true });
14
+ }, [dependentLookupsEditorTouched]);
15
15
  var autopopulationContextValue = useMemo(function () {
16
16
  return autopopulationId
17
17
  ? {
@@ -1,10 +1,9 @@
1
1
  import React, { useCallback } from 'react';
2
- import { useSelector } from 'react-redux';
3
- import mdmModule from '@reltio/mdm-module';
4
2
  import { getFacets, EntityAttrTypes, buildFilterQueryString } from '@reltio/mdm-sdk';
5
3
  import DeleteIcon from '@mui/icons-material/Delete';
6
4
  import TypeaheadEditor from '../../../editors/TypeaheadEditor/TypeaheadEditor';
7
5
  import SmallIconButton from '../../../SmallIconButton/SmallIconButton';
6
+ import { useMdmEntityUri } from '../../../../contexts';
8
7
  import { useStyles } from './styles';
9
8
  var filtersWithSearch = function (searchQuery) { return [
10
9
  {
@@ -28,7 +27,7 @@ var getSuggestions = function (searchQuery) {
28
27
  var Tags = function (_a) {
29
28
  var className = _a.className, values = _a.values, onChange = _a.onChange, onDelete = _a.onDelete;
30
29
  var styles = useStyles();
31
- var entityUri = useSelector(mdmModule.selectors.getEntityUri);
30
+ var entityUri = useMdmEntityUri();
32
31
  var handleChange = useCallback(function (tags) {
33
32
  onChange({
34
33
  value: tags,
@@ -41,6 +40,6 @@ var Tags = function (_a) {
41
40
  }, [entityUri, onDelete]);
42
41
  return (React.createElement("div", { className: styles.container, "data-reltio-id": "reltio-attribute-value" },
43
42
  React.createElement(TypeaheadEditor, { fullWidth: true, multiple: true, variant: "filled", className: className, value: values || [], onChange: handleChange, getSuggestions: getSuggestions }),
44
- !!onDelete && (React.createElement(SmallIconButton, { className: styles.deleteButton, icon: DeleteIcon, onClick: handleDelete, size: "L" }))));
43
+ !!onDelete && (React.createElement(SmallIconButton, { "data-reltio-id": "reltio-tags-delete-button", className: styles.deleteButton, icon: DeleteIcon, onClick: handleDelete, size: "L" }))));
45
44
  };
46
45
  export default Tags;
@@ -21,21 +21,19 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import React, { useContext } from 'react';
24
- import { useSelector } from 'react-redux';
25
- import mdmModule from '@reltio/mdm-module';
24
+ import { isNil, map, pipe, reject } from 'ramda';
26
25
  import { findAttributeTypeByUri, getLabel, getReferencedEntityUriFromAttrValue, getReferencedRelationAttrTypesUris } from '@reltio/mdm-sdk';
27
26
  import ComplexAttribute from '../ComplexAttribute/ComplexAttribute';
28
- import { isNil, map, pipe, reject } from 'ramda';
29
27
  import { ComplexAttributeLabel } from '../common/ComplexAttributeLabel';
30
28
  import InternalLink from '../../../InternalLink/InternalLink';
31
- import { UrlGeneratorsContext } from '../../../../contexts';
29
+ import { UrlGeneratorsContext, useMdmMetadata, useMdmUiPath } from '../../../../contexts';
32
30
  import { useStyles } from './styles';
33
31
  var ReferenceAttribute = function (_a) {
34
32
  var attributeValue = _a.attributeValue, attributeType = _a.attributeType, other = __rest(_a, ["attributeValue", "attributeType"]);
35
33
  var styles = useStyles();
36
34
  var generateEntityUrl = useContext(UrlGeneratorsContext).generateEntityUrl;
37
- var metadata = useSelector(mdmModule.selectors.getMetadata);
38
- var uiPath = useSelector(mdmModule.selectors.getUIPath);
35
+ var metadata = useMdmMetadata();
36
+ var uiPath = useMdmUiPath();
39
37
  var entityLabel = (React.createElement(ComplexAttributeLabel, null,
40
38
  React.createElement(InternalLink, { href: generateEntityUrl({ uiPath: uiPath, uri: getReferencedEntityUriFromAttrValue(attributeValue) }) },
41
39
  getLabel(attributeValue.label),
@@ -1,19 +1,17 @@
1
1
  import React from 'react';
2
2
  import i18n from 'ui-i18n';
3
- import mdmModule from '@reltio/mdm-module';
3
+ import classnames from 'classnames';
4
4
  import { findSourceSystemByUri } from '@reltio/mdm-sdk';
5
- import { useSelector } from 'react-redux';
6
5
  import VisibilityIcon from '@mui/icons-material/Visibility';
7
6
  import SourceIcon from '../../../SourceIcon/SourceIcon';
8
- import classnames from 'classnames';
9
- import { useCrosswalkFocus } from '../../../../contexts';
7
+ import { useCrosswalkFocus, useMdmMetadata } from '../../../../contexts';
10
8
  import { SmallIconButtonWithTooltip } from '../../../SmallIconButton';
11
9
  import { useStyles } from './styles';
12
10
  var SourceItem = function (_a) {
13
11
  var crosswalk = _a.crosswalk, color = _a.color, className = _a.className, _b = _a.focusable, focusable = _b === void 0 ? false : _b;
14
12
  var _c = useCrosswalkFocus(crosswalk), toggleCrosswalkFocus = _c.toggleCrosswalkFocus, isFocused = _c.isFocused;
15
13
  var styles = useStyles({ color: color, isFocused: isFocused });
16
- var metadata = useSelector(mdmModule.selectors.getMetadata);
14
+ var metadata = useMdmMetadata();
17
15
  var label = findSourceSystemByUri(metadata, crosswalk.type).label;
18
16
  return (React.createElement("div", { className: classnames(styles.sourceItem, className) },
19
17
  React.createElement(SourceIcon, { className: styles.sourceIcon, sourceType: crosswalk.type }),
@@ -13,7 +13,7 @@ import React, { memo, useMemo, useState } from 'react';
13
13
  import { path } from 'ramda';
14
14
  import { getAttributesListForReadMode } from '@reltio/mdm-sdk';
15
15
  import BranchDecorator from '../../BranchDecorator/BranchDecorator';
16
- import AttributesPager from '../AttributesPager';
16
+ import AttributesPager from '../AttributesPager/AttributesPager';
17
17
  import ShowMore from '../../pagersCommon/ShowMore';
18
18
  import ShowLess from '../../pagersCommon/ShowLess';
19
19
  import { ALWAYS_VISIBLE_TYPE_URIS } from '../../../../constants';
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { AttributeType, NestedAttributeValue, Paging, ReferenceAttributeValue, SimpleAttributeValue, ImageAttributeValue, AttributeValue } from '@reltio/mdm-sdk';
3
- import { RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-module';
4
3
  type Props = {
5
4
  values: (SimpleAttributeValue | NestedAttributeValue | ReferenceAttributeValue | string | number | ImageAttributeValue | AttributeValue)[];
6
5
  attributeType: AttributeType;
@@ -8,10 +7,9 @@ type Props = {
8
7
  parentUri?: string;
9
8
  drawLines: boolean;
10
9
  max?: number;
11
- requestNextPageOfAttributeValues: (payload: RequestNextPageOfAttributeValuesPayload) => void;
12
10
  titleClassName?: string;
13
11
  contentClassName?: string;
14
12
  showNonOv?: boolean;
15
13
  };
16
- declare const _default: React.MemoExoticComponent<({ values, attributeType, drawLines, paging, parentUri, max, requestNextPageOfAttributeValues, titleClassName, contentClassName, showNonOv }: Props) => JSX.Element>;
14
+ declare const _default: React.MemoExoticComponent<({ values, attributeType, drawLines, paging, parentUri, max: maxProp, titleClassName, contentClassName, showNonOv }: Props) => JSX.Element>;
17
15
  export default _default;
@@ -2,12 +2,13 @@ import classnames from 'classnames';
2
2
  import React, { memo } from 'react';
3
3
  import { always, cond, has, ifElse, partition, prop, T } from 'ramda';
4
4
  import { isComplexAttribute, isImage, isSpecialAttribute, isOv } from '@reltio/mdm-sdk';
5
- import { useStyles } from './styles';
6
5
  import BranchDecorator from '../../BranchDecorator/BranchDecorator';
7
6
  import OneLineRenderer from './OneLineRenderer';
8
7
  import MultiLineRenderer from './MultiLineRenderer';
9
8
  import SpecialRenderer from './SpecialRenderer';
10
9
  import { ImageLineRenderer } from './ImageLineRenderer';
10
+ import { useMdmAction, useMdmDefaultMaxValues } from '../../../../contexts';
11
+ import { useStyles } from './styles';
11
12
  var RENDERER_TYPES = {
12
13
  oneLine: 'oneLine',
13
14
  multiLine: 'multiLine',
@@ -16,8 +17,12 @@ var RENDERER_TYPES = {
16
17
  };
17
18
  var AttributesPager = function (_a) {
18
19
  var _b, _c;
19
- var values = _a.values, attributeType = _a.attributeType, drawLines = _a.drawLines, _d = _a.paging, paging = _d === void 0 ? {} : _d, parentUri = _a.parentUri, _e = _a.max, max = _e === void 0 ? Infinity : _e, requestNextPageOfAttributeValues = _a.requestNextPageOfAttributeValues, titleClassName = _a.titleClassName, contentClassName = _a.contentClassName, showNonOv = _a.showNonOv;
20
+ var _d;
21
+ var values = _a.values, attributeType = _a.attributeType, drawLines = _a.drawLines, _e = _a.paging, paging = _e === void 0 ? {} : _e, parentUri = _a.parentUri, maxProp = _a.max, titleClassName = _a.titleClassName, contentClassName = _a.contentClassName, showNonOv = _a.showNonOv;
20
22
  var styles = useStyles();
23
+ var requestNextPageOfAttributeValues = useMdmAction('requestNextPageOfAttributeValues');
24
+ var defaultMaxValues = useMdmDefaultMaxValues();
25
+ var max = (_d = maxProp !== null && maxProp !== void 0 ? maxProp : defaultMaxValues) !== null && _d !== void 0 ? _d : Infinity;
21
26
  var partitionByOv = partition(isOv);
22
27
  if (!values || !values.length) {
23
28
  return null;
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { AttributeType, ImageAttributeValue, Paging } from '@reltio/mdm-sdk';
3
- import { RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-module';
2
+ import { AttributeType, ImageAttributeValue, Paging, RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-sdk';
4
3
  type Props = {
5
4
  attributeType: AttributeType;
6
5
  attributeValues: ImageAttributeValue[];
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-module';
3
- import { AttributeType, NestedAttributeValue, ReferenceAttributeValue, SimpleAttributeValue } from '@reltio/mdm-sdk';
2
+ import { AttributeType, NestedAttributeValue, ReferenceAttributeValue, SimpleAttributeValue, RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-sdk';
4
3
  type Props = {
5
4
  max: number;
6
5
  values: (SimpleAttributeValue | NestedAttributeValue | ReferenceAttributeValue)[];
@@ -1,3 +1,3 @@
1
1
  export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"paddingWrapper" | "paddingWrapperWithLines">;
2
2
  export declare const useOneLineStyles: (props?: any) => import("@mui/styles").ClassNameMap<"title" | "attribute" | "wrapper" | "collaborationWrapper" | "titleIcon" | "titleRow" | "ovIcon" | "descriptionIcon">;
3
- export declare const useMultiLineStyles: (props?: any) => import("@mui/styles").ClassNameMap<"title" | "attributes" | "attribute" | "wrapper" | "titleRow" | "ovIcon" | "descriptionIcon">;
3
+ export declare const useMultiLineStyles: (props?: any) => import("@mui/styles").ClassNameMap<"attributes" | "title" | "attribute" | "wrapper" | "titleRow" | "ovIcon" | "descriptionIcon">;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { AttributesViewProps } from '../../types';
3
- type Props = Omit<AttributesViewProps, 'mode'>;
4
- declare const AttributesView: ({ className, entity, metadata, caption, excludeUris, includeUris, attributesCount }: Props) => JSX.Element;
3
+ type Props = Omit<AttributesViewProps, 'mode' | 'pinnedAttributes'>;
4
+ declare const AttributesView: ({ className, entity, caption, excludeUris, includeUris, attributesCount }: Props) => JSX.Element;
5
5
  export default AttributesView;
@@ -1,12 +1,10 @@
1
1
  import React, { useMemo } from 'react';
2
- import { useSelector } from 'react-redux';
3
- import mdm from '@reltio/mdm-module';
4
2
  import { getAttributesListForReadMode, isEmptyValue } from '@reltio/mdm-sdk';
5
3
  import classnames from 'classnames';
6
4
  import i18n from 'ui-i18n';
7
5
  import Box from '@mui/material/Box';
8
6
  import Typography from '@mui/material/Typography';
9
- import { PivotingAttributeContext } from '../../../../contexts';
7
+ import { PivotingAttributeContext, useMdmMetadata, useMdmPivotingAttributes } from '../../../../contexts';
10
8
  import BasicView from '../../../BasicView/BasicView';
11
9
  import FacetViewHeader from '../../../FacetViewHeader/FacetViewHeader';
12
10
  import AttributesList from '../AttributesList';
@@ -14,9 +12,10 @@ import { getFilteredAttrTypes } from '../../helpers/attributesView';
14
12
  import { useStyles } from './styles';
15
13
  var AttributesView = function (_a) {
16
14
  var _b;
17
- var className = _a.className, _c = _a.entity, entity = _c === void 0 ? {} : _c, metadata = _a.metadata, _d = _a.caption, caption = _d === void 0 ? '' : _d, _e = _a.excludeUris, excludeUris = _e === void 0 ? [] : _e, _f = _a.includeUris, includeUris = _f === void 0 ? [] : _f, _g = _a.attributesCount, attributesCount = _g === void 0 ? 16 : _g;
15
+ var className = _a.className, _c = _a.entity, entity = _c === void 0 ? {} : _c, _d = _a.caption, caption = _d === void 0 ? '' : _d, _e = _a.excludeUris, excludeUris = _e === void 0 ? [] : _e, _f = _a.includeUris, includeUris = _f === void 0 ? [] : _f, _g = _a.attributesCount, attributesCount = _g === void 0 ? 16 : _g;
18
16
  var styles = useStyles();
19
- var pivotingAttributes = useSelector(mdm.selectors.getPivotingAttributes);
17
+ var metadata = useMdmMetadata();
18
+ var pivotingAttributes = useMdmPivotingAttributes();
20
19
  var filteredAttrTypes = useMemo(function () { return getFilteredAttrTypes(metadata, entity.type, includeUris, excludeUris); }, [excludeUris, includeUris, metadata, entity.type]);
21
20
  var attributesList = getAttributesListForReadMode(filteredAttrTypes, entity);
22
21
  var isShowAttributeList = attributesList.filter(function (_a) {
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { AttributeType, ImageAttributeValue, Paging } from '@reltio/mdm-sdk';
3
- import { RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-module';
2
+ import { AttributeType, ImageAttributeValue, Paging, RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-sdk';
4
3
  import { SIZES_TYPE } from '../../ImageAttributesLine/styles';
5
4
  type Props = {
6
5
  attributeValues: ImageAttributeValue[];
@@ -20,12 +20,10 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
- import React, { memo, useContext, useMemo } from 'react';
23
+ import React, { useContext, useMemo, memo } from 'react';
24
24
  import classnames from 'classnames';
25
25
  import { getAttributeTypeSubAttributes, getHistoryAppearanceByUri, getHistoryAttributeClassName, getLabel, getReferencedEntityUriFromAttrValue, isEmptyValue, isOv } from '@reltio/mdm-sdk';
26
- import mdmModule from '@reltio/mdm-module';
27
- import { useSelector } from 'react-redux';
28
- import { HistoryDiffContext, UrlGeneratorsContext } from '../../../../contexts';
26
+ import { HistoryDiffContext, UrlGeneratorsContext, useMdmMetadata, useMdmUiPath } from '../../../../contexts';
29
27
  import ComplexAttribute from '../ComplexAttribute/ComplexAttribute';
30
28
  import InternalLink from '../../../InternalLink/InternalLink';
31
29
  import SearchHighlighter from '../../../SearchHighlighter/SearchHighlighter';
@@ -33,10 +31,10 @@ import { useOvValueStyles } from '../helpers/commonStyles';
33
31
  import useStyles from './styles';
34
32
  var ReferenceAttribute = function (_a) {
35
33
  var attributeValue = _a.attributeValue, attributeType = _a.attributeType, otherProps = __rest(_a, ["attributeValue", "attributeType"]);
36
- var metadata = useSelector(mdmModule.selectors.getMetadata);
37
- var uiPath = useSelector(mdmModule.selectors.getUIPath);
38
34
  var styles = useStyles();
39
35
  var ovValueStyles = useOvValueStyles();
36
+ var metadata = useMdmMetadata();
37
+ var uiPath = useMdmUiPath();
40
38
  var refEntityURI = getReferencedEntityUriFromAttrValue(attributeValue);
41
39
  var attributeTypeList = useMemo(function () { return getAttributeTypeSubAttributes(metadata, attributeType); }, [attributeType, metadata]);
42
40
  var appearance = useContext(HistoryDiffContext).appearance;
@@ -1,14 +1,13 @@
1
1
  import React, { useContext } from 'react';
2
- import { useSelector } from 'react-redux';
3
- import mdmModule from '@reltio/mdm-module';
4
2
  import { getHistoryAppearanceBySpecialAttributeValue, getHistoryAttributeClassName, getRoleLabel } from '@reltio/mdm-sdk';
5
3
  import { HistoryDiffContext } from '../../../../../contexts/HistoryAppearanceContext';
4
+ import { useMdmMetadata } from '../../../../../contexts';
6
5
  import { useCommonStyles } from '../styles';
7
6
  var Role = function (_a) {
8
7
  var value = _a.value;
9
8
  var styles = useCommonStyles();
10
- var metadata = useSelector(mdmModule.selectors.getMetadata);
11
9
  var appearance = useContext(HistoryDiffContext).appearance;
10
+ var metadata = useMdmMetadata();
12
11
  var attributeAppearance = getHistoryAppearanceBySpecialAttributeValue('roles', value, appearance);
13
12
  var historyClassName = getHistoryAttributeClassName(attributeAppearance);
14
13
  return React.createElement("span", { className: styles[historyClassName] }, getRoleLabel(metadata, value));
@@ -1,18 +1,16 @@
1
1
  import React, { useContext } from 'react';
2
2
  import InternalLink from '../../../../InternalLink/InternalLink';
3
- import { useSelector } from 'react-redux';
4
- import mdmModule from '@reltio/mdm-module';
5
3
  import { getDataTenantEntityUri, getHistoryAppearanceBySpecialAttributeValue, getHistoryAttributeClassName } from '@reltio/mdm-sdk';
6
- import { EntityContext, HistoryDiffContext, UrlGeneratorsContext } from '../../../../../contexts';
4
+ import { EntityContext, HistoryDiffContext, UrlGeneratorsContext, useMdmEntity, useMdmUiPath } from '../../../../../contexts';
7
5
  import { useCommonStyles } from '../styles';
8
6
  var Tag = function (_a) {
9
7
  var value = _a.value;
10
8
  var styles = useCommonStyles();
11
- var uiPath = useSelector(mdmModule.selectors.getUIPath);
12
- var currentEntity = useSelector(mdmModule.selectors.getEntity);
13
9
  var ownEntity = useContext(EntityContext);
14
10
  var appearance = useContext(HistoryDiffContext).appearance;
15
11
  var generateTagUrl = useContext(UrlGeneratorsContext).generateTagUrl;
12
+ var currentEntity = useMdmEntity();
13
+ var uiPath = useMdmUiPath();
16
14
  var attributeAppearance = getHistoryAppearanceBySpecialAttributeValue('tags', value, appearance);
17
15
  var historyClassName = getHistoryAttributeClassName(attributeAppearance);
18
16
  var entity = ownEntity || currentEntity;
@@ -1,5 +1,5 @@
1
- import { Entity, Metadata, Mode, PinnedAttribute } from '@reltio/mdm-sdk';
2
- type OwnProps = {
1
+ import { Entity, Mode, PinnedAttribute } from '@reltio/mdm-sdk';
2
+ export type AttributesViewProps = {
3
3
  attributesCount?: number;
4
4
  caption?: string;
5
5
  className?: string;
@@ -9,8 +9,3 @@ type OwnProps = {
9
9
  pinnedAttributes?: PinnedAttribute[];
10
10
  mode?: Mode;
11
11
  };
12
- type StateProps = {
13
- metadata: Metadata;
14
- };
15
- type AttributesViewProps = OwnProps & StateProps;
16
- export type { OwnProps as AttributesViewOwnProps, StateProps as AttributesViewStateProps, AttributesViewProps };
@@ -8,18 +8,17 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
8
8
  return to.concat(ar || Array.prototype.slice.call(from));
9
9
  };
10
10
  import React from 'react';
11
- import { useSelector } from 'react-redux';
12
11
  import MoreAttributesButton from '../../../attributes/editMode/MoreAttributesButton/MoreAttributesButton';
13
12
  import { withTableContext } from '../../../BasicTableView';
14
13
  import i18n from 'ui-i18n';
15
14
  import { both, either, filter, pick, pipe, propEq, propOr, reject } from 'ramda';
16
15
  import { checkCanCreateAttribute, isImage, isNested, isReadableAttribute, isReference, ModeTypes } from '@reltio/mdm-sdk';
17
- import mdmModule from '@reltio/mdm-module';
16
+ import { useMdmMetadata } from '../../../../contexts';
18
17
  import { useStyles } from './styles';
19
18
  export var AddAttributesButton = function (_a) {
20
19
  var parentTypeUri = _a.parentTypeUri, parentUri = _a.parentUri, selectedAttributeTypes = _a.selectedAttributeTypes, onSelectAttributeTypes = _a.onSelectAttributeTypes, onAdd = _a.onAdd;
21
20
  var styles = useStyles();
22
- var metadata = useSelector(mdmModule.selectors.getMetadata);
21
+ var metadata = useMdmMetadata();
23
22
  var parentType = __spreadArray(__spreadArray([], metadata.entityTypes, true), (metadata.relationTypes || []), true).find(propEq('uri', parentTypeUri));
24
23
  var isNotSelected = function (attrType) { return !(selectedAttributeTypes === null || selectedAttributeTypes === void 0 ? void 0 : selectedAttributeTypes.find(propEq('uri', attrType.uri))); };
25
24
  var canCreate = function (attributeType) { return checkCanCreateAttribute({ attributeType: attributeType, mode: ModeTypes.EDITING }); };
@@ -10,10 +10,8 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import React, { memo, useCallback, useEffect, useMemo, useState } from 'react';
13
- import { useSelector } from 'react-redux';
14
13
  import classnames from 'classnames';
15
14
  import i18n from 'ui-i18n';
16
- import mdmModule from '@reltio/mdm-module';
17
15
  import { findAttributeTypeByUri, isReadableAttribute, makeAttrTypeUri } from '@reltio/mdm-sdk';
18
16
  import { BasicTable, ColumnsSettings, useDynamicRowCellHeight } from '../../BasicTableView';
19
17
  import BasicViewHeader from '../../BasicViewHeader/BasicViewHeader';
@@ -24,6 +22,7 @@ import LinearLoadIndicator from '../../LinearLoadIndicator/LinearLoadIndicator';
24
22
  import ConfirmDeleteDialog from '../../ConfirmDeleteDialog/ConfirmDeleteDialog';
25
23
  import ConfirmEditIgnoredDialog from './ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog';
26
24
  import { noop } from '../../../core';
25
+ import { useMdmMetadata } from '../../../contexts';
27
26
  import { useStyles } from './styles';
28
27
  var DEFAULT_ROW_HEIGHT = 68;
29
28
  var getIdFromRowValue = function (rowValue) { return rowValue.ovValues.attributeType.uri; };
@@ -34,6 +33,7 @@ var getRowCellKey = function (_a) {
34
33
  var AttributesTable = function (_a) {
35
34
  var entity = _a.entity, isLoading = _a.isLoading, crosswalksMap = _a.crosswalksMap, _b = _a.visibleColumns, visibleColumns = _b === void 0 ? DEFAULT_VISIBLE_COLUMNS : _b, onChangeVisibleColumns = _a.onChangeVisibleColumns, readOnly = _a.readOnly, _c = _a.onDelete, onDelete = _c === void 0 ? noop : _c, _d = _a.onPin, onPin = _d === void 0 ? noop : _d, _e = _a.onIgnore, onIgnore = _e === void 0 ? noop : _e, _f = _a.onEdit, onEdit = _f === void 0 ? noop : _f, _g = _a.onAdd, onAdd = _g === void 0 ? noop : _g, emptyTempAttributeUris = _a.emptyTempAttributeUris, selectedAttributeTypes = _a.selectedAttributeTypes, _h = _a.onSelectAttributeTypes, onSelectAttributeTypes = _h === void 0 ? noop : _h, additionalHeaderItems = _a.additionalHeaderItems, className = _a.className, activeSurvivorshipGroupUri = _a.activeSurvivorshipGroupUri;
36
35
  var styles = useStyles();
36
+ var metadata = useMdmMetadata();
37
37
  var visibleColumnsData = useMemo(function () {
38
38
  return pipe(filter(function (_a) {
39
39
  var id = _a.id;
@@ -41,7 +41,6 @@ var AttributesTable = function (_a) {
41
41
  }), getBasicTableColumnsData)(COLUMNS_DATA);
42
42
  }, [visibleColumns]);
43
43
  var _j = entity || {}, parentTypeUri = _j.type, parentUri = _j.uri, _k = _j.attributes, attributes = _k === void 0 ? {} : _k;
44
- var metadata = useSelector(mdmModule.selectors.getMetadata);
45
44
  useEffect(function () {
46
45
  if (entity && isNil(selectedAttributeTypes)) {
47
46
  var initialAttrTypes = pipe(keys, without(['paging']), map(makeAttrTypeUri(parentTypeUri)), map(function (attrTypeUri) { return findAttributeTypeByUri(metadata, attrTypeUri, parentTypeUri); }), filter(both(identity, isReadableAttribute)))(attributes);