@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
@@ -46,7 +46,6 @@ var Button_1 = __importDefault(require("@mui/material/Button"));
46
46
  var Divider_1 = __importDefault(require("@mui/material/Divider"));
47
47
  var Typography_1 = __importDefault(require("@mui/material/Typography"));
48
48
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
49
- var mdm_module_1 = require("@reltio/mdm-module");
50
49
  var ConnectionRelationTypeSelector_1 = __importDefault(require("../ConnectionRelationTypeSelector/ConnectionRelationTypeSelector"));
51
50
  var ErrorWrapper_1 = __importDefault(require("../ErrorWrapper/ErrorWrapper"));
52
51
  var EntitySelector_1 = __importDefault(require("../attributes/editMode/EntitySelector/EntitySelector"));
@@ -60,11 +59,35 @@ var areRelatedEntitiesChanged = function (initial, actual) {
60
59
  };
61
60
  var RelationEditor = function (_a) {
62
61
  var _b;
63
- var connection = _a.connection, modifiedEntity = _a.modifiedEntity, initialConnection = _a.initialConnection, initialModifiedEntity = _a.initialModifiedEntity, allModifiedEntities = _a.allModifiedEntities, dispatch = _a.dispatch, config = _a.config, mode = _a.mode, metadata = _a.metadata, globalSearchRequestOptions = _a.globalSearchRequestOptions, error = _a.error, highlightedError = _a.highlightedError;
64
- //NOSONAR
65
- var _c = connection.relation, relationUri = _c.relationUri, relationType = _c.relationType, direction = _c.direction;
66
- var isNew = connection.isNew;
62
+ var connection = _a.connection, config = _a.config, mode = _a.mode, metadata = _a.metadata, highlightedError = _a.highlightedError;
67
63
  var styles = (0, styles_1.useStyles)();
64
+ var _c = connection.relation, relationType = _c.relationType, direction = _c.direction;
65
+ var isNew = connection.isNew;
66
+ var entityUri = (0, mdm_sdk_1.getEntityUriFromConnection)(connection);
67
+ var relationUri = (0, mdm_sdk_1.getRelationUriFromConnection)(connection);
68
+ var isTempEntity = (0, mdm_sdk_1.isTempUri)(entityUri);
69
+ var mdmSetInitialInfo = (0, contexts_1.useMdmAction)('setInitialInfo');
70
+ var setRelationType = (0, contexts_1.useMdmAction)('setRelationType');
71
+ var closeRelationEditor = (0, contexts_1.useMdmAction)('closeRelationEditor');
72
+ var entityCreated = (0, contexts_1.useMdmAction)('entityCreated');
73
+ var entityDeleted = (0, contexts_1.useMdmAction)('entityDeleted');
74
+ var setRelationEntity = (0, contexts_1.useMdmAction)('setRelationEntity');
75
+ var errorDeactivated = (0, contexts_1.useMdmAction)('errorDeactivated');
76
+ var errorsSet = (0, contexts_1.useMdmAction)('errorsSet');
77
+ var addAttributes = (0, contexts_1.useMdmAction)('addAttributes');
78
+ var modifyAttribute = (0, contexts_1.useMdmAction)('modifyAttribute');
79
+ var removeAttribute = (0, contexts_1.useMdmAction)('removeAttribute');
80
+ var addRelation = (0, contexts_1.useMdmAction)('addRelation');
81
+ var editRelation = (0, contexts_1.useMdmAction)('editRelation');
82
+ var initialConnection = (0, contexts_1.useMdmInitialConnection)(config.id, relationUri);
83
+ var initialModifiedEntity = (0, contexts_1.useMdmInitialConnectionTempEntity)(config.id, relationUri);
84
+ var mdmModifiedEntity = (0, contexts_1.useMdmModifiedEntity)(entityUri);
85
+ var mdmAllModifiedEntities = (0, contexts_1.useMdmModifiedEntities)();
86
+ var globalSearchRequestOptions = (0, contexts_1.useMdmGlobalSearchRequestOptions)(['ovOnly']);
87
+ var profileErrors = (0, contexts_1.useMdmProfileErrors)();
88
+ var error = (0, mdm_sdk_1.getRelationEditorActiveError)(connection, profileErrors);
89
+ var modifiedEntity = isTempEntity ? mdmModifiedEntity : null;
90
+ var allModifiedEntities = isTempEntity ? mdmAllModifiedEntities : null;
68
91
  var _d = (0, hooks_1.useScrollToAttributeError)({ highlightedError: highlightedError, isSimple: true }), ref = _d.ref, errorClassName = _d.errorClassName;
69
92
  var _e = (0, react_1.useMemo)(function () {
70
93
  return (0, mdm_sdk_1.getInOutRelations)({
@@ -76,12 +99,12 @@ var RelationEditor = function (_a) {
76
99
  });
77
100
  }, [config, direction, relationType, mode, metadata, connection.parentEntityUri]), _f = _e.inRelations, inRelationTypes = _f === void 0 ? [] : _f, _g = _e.outRelations, outRelationTypes = _g === void 0 ? [] : _g;
78
101
  var firstLevelRelationAttrTypes = (0, react_1.useMemo)(function () { return (0, mdm_sdk_1.getRelationAttributesList)(metadata, relationType); }, [relationType, metadata]);
79
- var attributeListEntity = (0, react_1.useMemo)(function () { return (__assign({ attributes: __assign({}, mdm_module_1.profile.relations.selectors.getRelationAttributesFromConnection(connection)) }, (0, mdm_sdk_1.getActivenessAttributes)(connection.relation))); }, [connection]);
102
+ var attributeListEntity = (0, react_1.useMemo)(function () { return (__assign({ attributes: __assign({}, (0, mdm_sdk_1.getRelationAttributesFromConnection)(connection)) }, (0, mdm_sdk_1.getActivenessAttributes)(connection.relation))); }, [connection]);
80
103
  var relatedTempEntities = (0, react_1.useMemo)(function () { return (0, mdm_sdk_1.findRelatedTemporaryEntities)(allModifiedEntities, modifiedEntity); }, [allModifiedEntities, modifiedEntity]);
81
104
  var relatedTempEntitiesUrisHistory = (0, react_1.useRef)([]);
82
105
  var setInitialInfo = (0, react_1.useCallback)(function (entity, connection) {
83
- dispatch(mdm_module_1.profile.relations.actions.setInitialInfo(config.id, relationUri, entity, connection));
84
- }, [dispatch]);
106
+ mdmSetInitialInfo(config.id, relationUri, entity, connection);
107
+ }, [mdmSetInitialInfo]);
85
108
  (0, react_1.useEffect)(function () {
86
109
  if (!initialConnection) {
87
110
  setInitialInfo(modifiedEntity, connection);
@@ -98,9 +121,9 @@ var RelationEditor = function (_a) {
98
121
  (!(0, ramda_1.equals)(initialConnectionChangeablePart, connectionChangeablePart) ||
99
122
  !(0, ramda_1.equals)(initialModifiedEntity, modifiedEntity) ||
100
123
  areRelatedEntitiesChanged(initialRelatedTempEntities.current, relatedTempEntities));
101
- var applyAction = isNew ? mdm_module_1.profile.relations.actions.addRelation : mdm_module_1.profile.relations.actions.editRelation;
102
- var onRelationTypeChange = (0, react_1.useCallback)((0, ramda_1.pipe)(mdm_module_1.profile.relations.actions.setRelationType(config.id, relationUri), dispatch), [config, relationUri, dispatch]);
103
- var handleClose = (0, react_1.useCallback)(function () { return (0, ramda_1.pipe)(mdm_module_1.profile.relations.actions.closeRelationEditor, dispatch)(config.id, relationUri); }, [config, relationUri, dispatch]);
124
+ var applyAction = (0, react_1.useMemo)(function () { return (0, ramda_1.curry)(isNew ? addRelation : editRelation); }, [isNew, addRelation, editRelation]);
125
+ var onRelationTypeChange = (0, react_1.useCallback)(function (relationType) { return setRelationType(config.id, relationUri, relationType); }, [config, relationUri, setRelationType]);
126
+ var handleClose = (0, react_1.useCallback)(function () { return closeRelationEditor(config.id, relationUri); }, [config, relationUri, closeRelationEditor]);
104
127
  var updateModifiedEntityLabel = (0, react_1.useCallback)(function (connection) {
105
128
  if (modifiedEntity) {
106
129
  var entityType = (0, mdm_sdk_1.getEntityType)(metadata, modifiedEntity.type);
@@ -108,24 +131,24 @@ var RelationEditor = function (_a) {
108
131
  }
109
132
  return connection;
110
133
  }, [modifiedEntity, metadata]);
111
- var setModifiedEntity = (0, react_1.useCallback)(function (entity) { return dispatch(mdm_module_1.profile.modifiedEntities.actions.entityCreated(entity)); }, [dispatch]);
112
- var deleteModifiedEntity = (0, react_1.useCallback)(function (entityUri) { return dispatch(mdm_module_1.profile.modifiedEntities.actions.entityDeleted(entityUri)); }, [dispatch]);
134
+ var setModifiedEntity = (0, react_1.useCallback)(function (entity) { return entityCreated(entity); }, [entityCreated]);
135
+ var deleteModifiedEntity = (0, react_1.useCallback)(function (entityUri) { return entityDeleted(entityUri); }, [entityDeleted]);
113
136
  var onChangeEntity = (0, react_1.useCallback)(function (entity) {
114
137
  if (modifiedEntity) {
115
138
  deleteModifiedEntity(modifiedEntity.uri);
116
139
  }
117
- dispatch(mdm_module_1.profile.relations.actions.setRelationEntity(config.id, relationUri, entity));
140
+ setRelationEntity(config.id, relationUri, entity);
118
141
  if (error) {
119
- dispatch(mdm_module_1.profile.errors.actions.errorDeactivated((0, mdm_sdk_1.getErrorId)(error)));
142
+ errorDeactivated((0, mdm_sdk_1.getErrorId)(error));
120
143
  }
121
- }, [config.id, relationUri, dispatch, modifiedEntity, deleteModifiedEntity, error]);
144
+ }, [config.id, relationUri, setRelationEntity, errorDeactivated, modifiedEntity, deleteModifiedEntity, error]);
122
145
  var validate = (0, react_1.useCallback)(function () {
123
146
  var errors = (0, mdm_sdk_1.validateConnection)(metadata, allModifiedEntities, connection);
124
- dispatch(mdm_module_1.profile.errors.actions.errorsSet(errors));
147
+ errorsSet(errors);
125
148
  return errors.length === 0;
126
- }, [connection, metadata, allModifiedEntities, dispatch]);
127
- var resetErrors = (0, react_1.useCallback)(function () { return dispatch(mdm_module_1.profile.errors.actions.errorsSet([])); }, [dispatch]);
128
- var onApply = (0, react_1.useCallback)((0, ramda_1.pipe)((0, ramda_1.always)(connection), (0, ramda_1.when)(validate, (0, ramda_1.pipe)(mdm_sdk_1.omitMarks, updateModifiedEntityLabel, (0, ramda_1.omit)(['initial']), applyAction(config.id), dispatch, (0, ramda_1.always)((0, ramda_1.differenceWith)(ramda_1.equals, relatedTempEntitiesUrisHistory.current, relatedTempEntities.map((0, ramda_1.prop)('uri')))), (0, ramda_1.forEach)(deleteModifiedEntity), handleClose))), [connection, config, dispatch, updateModifiedEntityLabel, validate, relatedTempEntities]);
149
+ }, [connection, metadata, allModifiedEntities, errorsSet]);
150
+ var resetErrors = (0, react_1.useCallback)(function () { return errorsSet([]); }, [errorsSet]);
151
+ var onApply = (0, react_1.useCallback)((0, ramda_1.pipe)((0, ramda_1.always)(connection), (0, ramda_1.when)(validate, (0, ramda_1.pipe)(mdm_sdk_1.omitMarks, updateModifiedEntityLabel, (0, ramda_1.omit)(['initial']), applyAction(config.id), (0, ramda_1.always)((0, ramda_1.differenceWith)(ramda_1.equals, relatedTempEntitiesUrisHistory.current, relatedTempEntities.map((0, ramda_1.prop)('uri')))), (0, ramda_1.forEach)(deleteModifiedEntity), handleClose))), [connection, config, updateModifiedEntityLabel, validate, relatedTempEntities]);
129
152
  var onCancel = (0, react_1.useCallback)(function () {
130
153
  if (modifiedEntity !== initialModifiedEntity) {
131
154
  if (initialModifiedEntity) {
@@ -145,11 +168,9 @@ var RelationEditor = function (_a) {
145
168
  resetErrors();
146
169
  handleClose();
147
170
  }, [handleClose, setModifiedEntity, deleteModifiedEntity, resetErrors, modifiedEntity, initialModifiedEntity]);
148
- var onAddAttributes = (0, react_1.useCallback)(function (params) {
149
- return (0, ramda_1.pipe)(mdm_module_1.profile.actions.addAttributes, dispatch)(params.map(function (param) { return (__assign(__assign({}, param), { viewId: config.id })); }));
150
- }, [config.id, dispatch]);
151
- var onChangeAttribute = (0, react_1.useCallback)(function (params) { return (0, ramda_1.pipe)(mdm_module_1.profile.actions.modifyAttribute, dispatch)(__assign(__assign({}, params), { viewId: config.id })); }, [config.id, dispatch]);
152
- var onDeleteAttribute = (0, react_1.useCallback)(function (params) { return (0, ramda_1.pipe)(mdm_module_1.profile.actions.removeAttribute, dispatch)(__assign(__assign({}, params), { viewId: config.id })); }, [config.id, dispatch]);
171
+ var onAddAttributes = (0, react_1.useCallback)(function (params) { return addAttributes(params.map(function (param) { return (__assign(__assign({}, param), { viewId: config.id })); })); }, [config.id, addAttributes]);
172
+ var onChangeAttribute = (0, react_1.useCallback)(function (params) { return modifyAttribute(__assign(__assign({}, params), { viewId: config.id })); }, [config.id, modifyAttribute]);
173
+ var onDeleteAttribute = (0, react_1.useCallback)(function (params) { return removeAttribute(__assign(__assign({}, params), { viewId: config.id })); }, [config.id, removeAttribute]);
153
174
  var onCreateEntity = (0, react_1.useCallback)(function (entityTypeUri, initValue) {
154
175
  var entityType = (0, mdm_sdk_1.getEntityType)(metadata, entityTypeUri);
155
176
  var newEntityAttrTypes = (0, ramda_1.pipe)(mdm_sdk_1.relationEditorAttributeTypesSelectionStrategy, (0, mdm_sdk_1.getCreatableAttributeTypes)(mode))(entityType);
@@ -190,17 +211,9 @@ var RelationEditor = function (_a) {
190
211
  };
191
212
  RelationEditor.propTypes = {
192
213
  connection: mdm_sdk_1.ConnectionType,
193
- modifiedEntity: mdm_sdk_1.EntityType,
194
- initialConnection: mdm_sdk_1.ConnectionType,
195
- initialModifiedEntity: mdm_sdk_1.EntityType,
196
- allModifiedEntities: prop_types_1.default.object,
197
- dispatch: prop_types_1.default.func,
198
214
  config: mdm_sdk_1.RelationsConfigType,
199
215
  mode: prop_types_1.default.string,
200
216
  metadata: mdm_sdk_1.MetadataType,
201
- globalSearchRequestOptions: prop_types_1.default.object,
202
- error: mdm_sdk_1.AttributeErrorType,
203
- parentEntityUri: prop_types_1.default.string,
204
217
  highlightedError: prop_types_1.default.object
205
218
  };
206
219
  exports.default = (0, HOCs_1.withContext)(contexts_1.ScrollToElementContext, function (contextValue, _a) {
@@ -6,17 +6,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.RelevanceScoreBadge = void 0;
7
7
  var react_1 = __importDefault(require("react"));
8
8
  var classnames_1 = __importDefault(require("classnames"));
9
- var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
10
9
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
11
- var react_redux_1 = require("react-redux");
12
10
  var Tooltip_1 = __importDefault(require("@mui/material/Tooltip"));
13
11
  var ui_i18n_1 = __importDefault(require("ui-i18n"));
12
+ var contexts_1 = require("../../contexts");
14
13
  var styles_1 = require("./styles");
15
14
  var RelevanceScoreBadge = function (_a) {
16
15
  var className = _a.className, matchRuleSummaries = _a.matchRuleSummaries;
17
16
  var styles = (0, styles_1.useStyles)();
18
- var metadata = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getMetadata);
19
- var entity = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getEntity);
17
+ var metadata = (0, contexts_1.useMdmMetadata)();
18
+ var entity = (0, contexts_1.useMdmEntity)();
20
19
  var matchRuleSummaryWithBestScore = matchRuleSummaries === null || matchRuleSummaries === void 0 ? void 0 : matchRuleSummaries.filter(mdm_sdk_1.checkMatchRuleSummaryRelevance).sort(function (a, b) { return b.relevance - a.relevance; })[0];
21
20
  if (!matchRuleSummaryWithBestScore) {
22
21
  return null;
@@ -49,21 +49,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
49
49
  };
50
50
  Object.defineProperty(exports, "__esModule", { value: true });
51
51
  var react_1 = __importStar(require("react"));
52
- var react_redux_1 = require("react-redux");
53
52
  var ListItem_1 = __importDefault(require("@mui/material/ListItem"));
54
- var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
55
53
  var AttributeListItem_1 = __importDefault(require("../AttributeListItem/AttributeListItem"));
56
54
  var VirtualGroupedList_1 = __importDefault(require("../VirtualGroupedList/VirtualGroupedList"));
57
55
  var Highlighter_1 = __importDefault(require("../Highlighter/Highlighter"));
58
56
  var AttributeGroupIcon_1 = __importDefault(require("../AttributeGroupIcon/AttributeGroupIcon"));
59
57
  var helpers_1 = require("../BasicAttributeSelector/helpers");
58
+ var contexts_1 = require("../../contexts");
60
59
  var styles_1 = require("./styles");
61
60
  var ITEM_HEIGHT = 28;
62
61
  var ITEM_GROUP_TITLE_HEIGHT = 40;
63
62
  var SelectAttributesList = function (_a) {
64
63
  var selectedAttributes = _a.selectedAttributes, onItemClick = _a.onItemClick, focusIndex = _a.focusIndex, hideCheckBox = _a.hideCheckBox, otherProps = __rest(_a, ["selectedAttributes", "onItemClick", "focusIndex", "hideCheckBox"]);
65
64
  var styles = (0, styles_1.useStyles)();
66
- var metadata = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getMetadata);
65
+ var metadata = (0, contexts_1.useMdmMetadata)();
67
66
  var getItemSize = function (i, item) { return (item.items ? ITEM_GROUP_TITLE_HEIGHT : ITEM_HEIGHT); };
68
67
  var renderGroupTitle = function (style, item) { return (react_1.default.createElement(ListItem_1.default, { component: 'div', className: styles.subHeader, style: style, key: "group-".concat(item.item.id) },
69
68
  item.item.needGroupIcon && react_1.default.createElement(AttributeGroupIcon_1.default, { group: item.item, metadata: metadata }),
@@ -5,5 +5,5 @@ declare const _default: React.JSXElementConstructor<Omit<Pick<Omit<IconButtonPro
5
5
  iconClassName?: string;
6
6
  icon?: React.ElementType<any>;
7
7
  size?: "M" | "L" | "XXS" | "XS" | "S" | "MPlus" | "XL";
8
- }, "value" | "type" | "title" | "id" | "name" | "hidden" | "icon" | "key" | "children" | "defaultValue" | "size" | "prefix" | "action" | "results" | "form" | "slot" | "style" | "color" | "translate" | "disabled" | "className" | "classes" | "sx" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "iconClassName"> & React.RefAttributes<HTMLButtonElement>, "classes"> & import("@mui/styles/withStyles").StyledComponentProps<"disabled" | "rootAll" | "rootXXS" | "iconXXS" | "rootXS" | "iconXS" | "rootS" | "iconS" | "rootM" | "rootMPlus" | "rootL" | "rootXL"> & object>;
8
+ }, "value" | "id" | "type" | "name" | "hidden" | "icon" | "title" | "key" | "children" | "defaultValue" | "size" | "prefix" | "action" | "results" | "form" | "slot" | "style" | "color" | "translate" | "disabled" | "className" | "classes" | "sx" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "iconClassName"> & React.RefAttributes<HTMLButtonElement>, "classes"> & import("@mui/styles/withStyles").StyledComponentProps<"disabled" | "rootAll" | "rootXXS" | "iconXXS" | "rootXS" | "iconXS" | "rootS" | "iconS" | "rootM" | "rootMPlus" | "rootL" | "rootXL"> & object>;
9
9
  export default _default;
@@ -13,5 +13,5 @@ declare const SmallIconButtonWithTooltip: import("react").ForwardRefExoticCompon
13
13
  iconClassName?: string;
14
14
  icon?: import("react").ElementType<any>;
15
15
  size?: "M" | "L" | "XXS" | "XS" | "S" | "MPlus" | "XL";
16
- }, "value" | "type" | "title" | "id" | "name" | "hidden" | "icon" | "key" | "children" | "defaultValue" | "size" | "prefix" | "action" | "results" | "form" | "slot" | "style" | "color" | "translate" | "disabled" | "className" | "classes" | "sx" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "iconClassName"> & import("react").RefAttributes<HTMLButtonElement>, "classes"> & import("@mui/styles").StyledComponentProps<"disabled" | "rootAll" | "rootXXS" | "iconXXS" | "rootXS" | "iconXS" | "rootS" | "iconS" | "rootM" | "rootMPlus" | "rootL" | "rootXL"> & object>;
16
+ }, "value" | "id" | "type" | "name" | "hidden" | "icon" | "title" | "key" | "children" | "defaultValue" | "size" | "prefix" | "action" | "results" | "form" | "slot" | "style" | "color" | "translate" | "disabled" | "className" | "classes" | "sx" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "iconClassName"> & import("react").RefAttributes<HTMLButtonElement>, "classes"> & import("@mui/styles").StyledComponentProps<"disabled" | "rootAll" | "rootXXS" | "iconXXS" | "rootXS" | "iconXS" | "rootS" | "iconS" | "rootM" | "rootMPlus" | "rootL" | "rootXL"> & object>;
17
17
  export { SmallIconButton, SmallIconButtonWithTooltip };
@@ -4,14 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var react_1 = __importDefault(require("react"));
7
- var react_redux_1 = require("react-redux");
8
- var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
9
7
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
10
8
  var AvatarWithFallback_1 = __importDefault(require("../AvatarWithFallback/AvatarWithFallback"));
9
+ var contexts_1 = require("../../contexts");
11
10
  var SOURCE_URL = 'https://s3.amazonaws.com/reltio.images/api';
12
11
  var SourceIcon = function (_a) {
13
12
  var sourceType = _a.sourceType, className = _a.className, classes = _a.classes;
14
- var metadata = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getMetadata);
13
+ var metadata = (0, contexts_1.useMdmMetadata)();
15
14
  var _b = (0, mdm_sdk_1.findSourceSystemByUri)(metadata, sourceType) || {}, uri = _b.uri, icon = _b.icon;
16
15
  var avatarText = uri ? (0, mdm_sdk_1.getSourceSystemLabel)(metadata, uri)[0] : '';
17
16
  var sourceIcon = icon ? (0, mdm_sdk_1.getAbsoluteImageUrl)(SOURCE_URL, icon) : null;
@@ -27,14 +27,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  var react_1 = __importStar(require("react"));
30
- var react_redux_1 = require("react-redux");
31
30
  var ramda_1 = require("ramda");
32
- var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
33
31
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
34
32
  var MultiValueSelector_1 = __importDefault(require("../MultiValueSelector/MultiValueSelector"));
33
+ var contexts_1 = require("../../contexts");
35
34
  var SourceSystemsSelector = function (_a) {
36
35
  var values = _a.values, onChange = _a.onChange, TextFieldProps = _a.TextFieldProps, fullWidth = _a.fullWidth;
37
- var metadata = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getMetadata);
36
+ var metadata = (0, contexts_1.useMdmMetadata)();
38
37
  var options = (0, react_1.useMemo)(function () {
39
38
  return (0, ramda_1.pipe)((0, ramda_1.sortBy)(function (option) { return option.label; }), (0, ramda_1.map)(function (_a) {
40
39
  var label = _a.label, uri = _a.uri;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ isInProgress: boolean;
4
+ disabled: boolean;
5
+ onClick: () => void;
6
+ circularColor?: 'primary' | 'secondary' | 'inherit';
7
+ children: React.ReactNode;
8
+ className?: string;
9
+ [key: string]: any;
10
+ };
11
+ declare const ProgressButton: ({ isInProgress, disabled, circularColor, className, children, onClick, ...otherButtonProps }: Props) => JSX.Element;
12
+ export default ProgressButton;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ var __importDefault = (this && this.__importDefault) || function (mod) {
25
+ return (mod && mod.__esModule) ? mod : { "default": mod };
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ var react_1 = __importDefault(require("react"));
29
+ var classnames_1 = __importDefault(require("classnames"));
30
+ var Button_1 = __importDefault(require("@mui/material/Button"));
31
+ var CircularProgress_1 = __importDefault(require("@mui/material/CircularProgress"));
32
+ var styles_1 = require("./styles");
33
+ var ProgressButton = function (_a) {
34
+ var isInProgress = _a.isInProgress, disabled = _a.disabled, _b = _a.circularColor, circularColor = _b === void 0 ? 'primary' : _b, className = _a.className, children = _a.children, onClick = _a.onClick, otherButtonProps = __rest(_a, ["isInProgress", "disabled", "circularColor", "className", "children", "onClick"]);
35
+ var styles = (0, styles_1.useStyles)();
36
+ return (react_1.default.createElement(Button_1.default, __assign({}, otherButtonProps, { className: (0, classnames_1.default)(styles.progressButtonWrapper, className), onClick: onClick, disabled: disabled || isInProgress }),
37
+ children,
38
+ isInProgress && (react_1.default.createElement("div", { className: styles.progress, "data-reltio-id": "reltio-circular-load-indicator" },
39
+ react_1.default.createElement(CircularProgress_1.default, { size: 24, color: circularColor })))));
40
+ };
41
+ exports.default = ProgressButton;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ activeStep: number;
4
+ steps: Array<{
5
+ label: string;
6
+ enabled?: boolean;
7
+ }>;
8
+ isPending?: boolean;
9
+ onConfirm?: () => void;
10
+ onChangeStep: (step: number) => void;
11
+ };
12
+ declare const StepNavigation: ({ activeStep, steps, isPending, onConfirm, onChangeStep }: Props) => JSX.Element;
13
+ export default StepNavigation;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var react_1 = __importDefault(require("react"));
7
+ var ui_i18n_1 = __importDefault(require("ui-i18n"));
8
+ var ramda_1 = require("ramda");
9
+ var Stepper_1 = __importDefault(require("@mui/material/Stepper"));
10
+ var Step_1 = __importDefault(require("@mui/material/Step"));
11
+ var StepButton_1 = __importDefault(require("@mui/material/StepButton"));
12
+ var Button_1 = __importDefault(require("@mui/material/Button"));
13
+ var ProgressButton_1 = __importDefault(require("./ProgressButton"));
14
+ var styles_1 = require("./styles");
15
+ var StepNavigation = function (_a) {
16
+ var activeStep = _a.activeStep, steps = _a.steps, _b = _a.isPending, isPending = _b === void 0 ? false : _b, onConfirm = _a.onConfirm, onChangeStep = _a.onChangeStep;
17
+ var styles = (0, styles_1.useStyles)();
18
+ var isLastStep = activeStep === steps.length - 1;
19
+ var setActiveStep = function (step) {
20
+ if (step !== activeStep) {
21
+ onChangeStep(step);
22
+ }
23
+ };
24
+ var isEnabled = (0, ramda_1.propOr)(true, 'enabled');
25
+ var onBack = function (currentStep) {
26
+ if (currentStep > 0) {
27
+ var prevStep = currentStep - 1;
28
+ if (isEnabled(steps[prevStep])) {
29
+ setActiveStep(prevStep);
30
+ }
31
+ else {
32
+ onBack(prevStep);
33
+ }
34
+ }
35
+ };
36
+ var onNext = function (currentStep) {
37
+ if (currentStep < steps.length - 1) {
38
+ var nextStep = currentStep + 1;
39
+ if (isEnabled(steps[nextStep])) {
40
+ setActiveStep(nextStep);
41
+ }
42
+ else {
43
+ onNext(nextStep);
44
+ }
45
+ }
46
+ };
47
+ var showConfirm = isLastStep && !!onConfirm;
48
+ var isNextButtonEnabled = showConfirm || (0, ramda_1.any)(isEnabled, (0, ramda_1.drop)(activeStep + 1, steps));
49
+ return (react_1.default.createElement("div", { className: styles.container },
50
+ react_1.default.createElement("div", { className: styles.placeholder }),
51
+ react_1.default.createElement(Stepper_1.default, { nonLinear: true, activeStep: activeStep, className: styles.stepper }, steps.map(function (_a, index) {
52
+ var label = _a.label, _b = _a.enabled, enabled = _b === void 0 ? true : _b;
53
+ var disabledStep = !enabled || isPending;
54
+ var completedStep = !disabledStep && index < activeStep;
55
+ return (react_1.default.createElement(Step_1.default, { key: label, completed: completedStep, disabled: disabledStep },
56
+ react_1.default.createElement(StepButton_1.default, { className: styles.stepButton, onClick: function () { return setActiveStep(index); }, "data-reltio-id": "reltio-search-bulk-update-".concat(index) }, label)));
57
+ })),
58
+ react_1.default.createElement("div", { className: styles.buttons },
59
+ activeStep > 0 && (react_1.default.createElement(Button_1.default, { variant: "outlined", className: styles.backButton, onClick: function () { return onBack(activeStep); }, disabled: isPending, "data-reltio-id": "reltio-search-bulk-update-back" }, ui_i18n_1.default.text('Back'))),
60
+ react_1.default.createElement(ProgressButton_1.default, { 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 ? ui_i18n_1.default.text('Confirm') : ui_i18n_1.default.text('Continue')))));
61
+ };
62
+ exports.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,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useStyles = void 0;
4
+ var styles_1 = require("@mui/styles");
5
+ var useStyles = (0, styles_1.makeStyles)(function () { return ({
6
+ container: {
7
+ display: 'flex',
8
+ alignItems: 'center',
9
+ justifyContent: 'space-between',
10
+ width: '100%'
11
+ },
12
+ placeholder: {
13
+ flex: 1
14
+ },
15
+ stepper: {
16
+ padding: '0 24px',
17
+ flex: 2
18
+ },
19
+ stepButton: {
20
+ margin: '-20px -16px',
21
+ padding: '20px 16px',
22
+ '& svg text': {
23
+ textAnchor: 'middle'
24
+ }
25
+ },
26
+ buttons: {
27
+ flex: 1,
28
+ display: 'flex',
29
+ justifyContent: 'flex-end'
30
+ },
31
+ backButton: {
32
+ marginRight: '8px',
33
+ border: '1px solid rgba(0, 0, 0, 0.23)'
34
+ },
35
+ progressButtonWrapper: {
36
+ position: 'relative'
37
+ },
38
+ progress: {
39
+ position: 'absolute',
40
+ left: 'calc(50% - 12px)',
41
+ top: 'calc(50% - 12px)'
42
+ }
43
+ }); });
44
+ exports.useStyles = 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,22 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var react_1 = __importDefault(require("react"));
7
+ var Typography_1 = __importDefault(require("@mui/material/Typography"));
8
+ var classnames_1 = __importDefault(require("classnames"));
9
+ var Tenant_1 = __importDefault(require("../../icons/Tenant"));
10
+ var styles_1 = require("./styles");
11
+ var contexts_1 = require("../../contexts");
12
+ var TenantLabel = function (_a) {
13
+ var className = _a.className;
14
+ var styles = (0, styles_1.useStyles)();
15
+ var customerTenantLabel = (0, contexts_1.useMdmTenantName)();
16
+ var environmentName = (0, contexts_1.useMdmEnvironment)();
17
+ var tenantLabelWithEnv = "".concat(customerTenantLabel).concat(environmentName ? ' - ' + environmentName.toUpperCase() : '');
18
+ return (react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.labelWrapper, className) },
19
+ react_1.default.createElement(Tenant_1.default, { className: styles.tenantIcon, "data-reltio-id": "reltio-tenant-icon" }),
20
+ react_1.default.createElement(Typography_1.default, { className: styles.tenantLabel }, tenantLabelWithEnv)));
21
+ };
22
+ exports.default = TenantLabel;
@@ -0,0 +1 @@
1
+ export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"labelWrapper" | "tenantIcon" | "tenantLabel">;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useStyles = void 0;
4
+ var styles_1 = require("@mui/styles");
5
+ exports.useStyles = (0, styles_1.makeStyles)(function () { return ({
6
+ labelWrapper: {
7
+ height: '24px',
8
+ display: 'inline-flex',
9
+ alignItems: 'center'
10
+ },
11
+ tenantIcon: {
12
+ height: '24px',
13
+ width: '24px',
14
+ marginRight: '4px',
15
+ opacity: 0.38
16
+ },
17
+ tenantLabel: {
18
+ lineHeight: '15px',
19
+ fontSize: '13px',
20
+ color: 'rgba(0,0,0,0.38)'
21
+ }
22
+ }); });
@@ -28,19 +28,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.TenantsDropDownSelector = void 0;
30
30
  var react_1 = __importStar(require("react"));
31
- var react_redux_1 = require("react-redux");
32
31
  var ramda_1 = require("ramda");
33
32
  var ArrowDropDown_1 = __importDefault(require("@mui/icons-material/ArrowDropDown"));
34
- var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
35
33
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
36
34
  var index_1 = require("../index");
37
35
  var TenantMenuItem_1 = __importDefault(require("./TenantMenuItem/TenantMenuItem"));
36
+ var contexts_1 = require("../../contexts");
38
37
  var styles_1 = require("./styles");
39
38
  var TenantsDropDownSelector = function (_a) {
40
39
  var entityTypeUri = _a.entityTypeUri, onChangeTenant = _a.onChangeTenant, selectedTenant = _a.selectedTenant;
41
40
  var styles = (0, styles_1.useStyles)();
42
- var dataTenants = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getDataTenants);
43
- var customerTenant = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getTenantObject);
41
+ var dataTenants = (0, contexts_1.useMdmDataTenants)();
42
+ var customerTenant = (0, contexts_1.useMdmTenantObject)();
44
43
  var menuItems = (0, react_1.useMemo)(function () {
45
44
  return (0, ramda_1.pipe)((0, ramda_1.defaultTo)([]), (0, ramda_1.filter)((0, mdm_sdk_1.isAvailableTenantForEntityType)(entityTypeUri)), (0, ramda_1.map)(function (dataTenant) { return ({
46
45
  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">;
@@ -29,9 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.UploadImageDialog = void 0;
30
30
  var react_1 = __importStar(require("react"));
31
31
  var ui_i18n_1 = __importDefault(require("ui-i18n"));
32
- var react_redux_1 = require("react-redux");
33
32
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
34
- var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
35
33
  var Box_1 = __importDefault(require("@mui/material/Box"));
36
34
  var Dialog_1 = __importDefault(require("@mui/material/Dialog"));
37
35
  var Typography_1 = __importDefault(require("@mui/material/Typography"));
@@ -43,14 +41,15 @@ var ErrorSnackbar_1 = require("./ErrorSnackbar/ErrorSnackbar");
43
41
  var constants_1 = require("./constants");
44
42
  var styles_1 = require("./styles");
45
43
  var DragAndDrop_1 = require("../DragAndDrop/DragAndDrop");
44
+ var contexts_1 = require("../../contexts");
46
45
  var UploadImageDialog = function (_a) {
47
46
  var open = _a.open, onClose = _a.onClose, onUpload = _a.onUpload;
48
47
  var styles = (0, styles_1.useStyles)();
49
- var imageServicePath = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getImageServicePath);
50
- var environment = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getEnvironment);
51
- var tenant = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getTenant);
52
48
  var _b = (0, react_1.useState)(false), loading = _b[0], setLoading = _b[1];
53
49
  var _c = (0, react_1.useState)(null), error = _c[0], setError = _c[1];
50
+ var imageServicePath = (0, contexts_1.useMdmImageServicePath)();
51
+ var environment = (0, contexts_1.useMdmEnvironment)();
52
+ var tenant = (0, contexts_1.useMdmTenant)();
54
53
  var uploadImage = function (image) {
55
54
  setLoading(true);
56
55
  (0, mdm_sdk_1.uploadImage)({ image: image, imageServicePath: imageServicePath, environment: environment, tenant: tenant })