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