@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
@@ -30,14 +30,22 @@ var RENDERER_TYPES;
30
30
  RENDERER_TYPES["default"] = "default";
31
31
  })(RENDERER_TYPES || (RENDERER_TYPES = {}));
32
32
  var AttributesPager = function (_a) {
33
- var values = _a.values, attributeType = _a.attributeType, _b = _a.mode, mode = _b === void 0 ? mdm_sdk_1.Mode.Viewing : _b, crosswalks = _a.crosswalks, drawLines = _a.drawLines, _c = _a.paging, paging = _c === void 0 ? {} : _c, parentUri = _a.parentUri, errors = _a.errors, errorMessage = _a.errorMessage, _d = _a.max, max = _d === void 0 ? Infinity : _d, showEmptyEditors = _a.showEmptyEditors, showNonOv = _a.showNonOv, highlightedError = _a.highlightedError, highlightedAttribute = _a.highlightedAttribute, onAddAttributes = _a.onAddAttributes, onDeleteAttribute = _a.onDeleteAttribute, onChangeAttribute = _a.onChangeAttribute, onDeactivateError = _a.onDeactivateError, additionalControlsRenderer = _a.additionalControlsRenderer, requestNextPageOfAttributeValues = _a.requestNextPageOfAttributeValues;
33
+ var _b;
34
+ var values = _a.values, attributeType = _a.attributeType, _c = _a.mode, mode = _c === void 0 ? mdm_sdk_1.Mode.Viewing : _c, crosswalks = _a.crosswalks, drawLines = _a.drawLines, _d = _a.paging, paging = _d === void 0 ? {} : _d, parentUri = _a.parentUri, maxProp = _a.max, showEmptyEditors = _a.showEmptyEditors, showNonOv = _a.showNonOv, highlightedError = _a.highlightedError, highlightedAttribute = _a.highlightedAttribute, onAddAttributes = _a.onAddAttributes, onDeleteAttribute = _a.onDeleteAttribute, onChangeAttribute = _a.onChangeAttribute, additionalControlsRenderer = _a.additionalControlsRenderer;
35
+ var onDeactivateError = (0, contexts_1.useMdmAction)('errorDeactivated');
36
+ var requestNextPageOfAttributeValues = (0, contexts_1.useMdmAction)('requestNextPageOfAttributeValues');
37
+ var activeErrors = (0, contexts_1.useMdmActiveErrorsForAttributesPager)(parentUri, attributeType);
38
+ var profileErrors = (0, contexts_1.useMdmProfileErrors)();
39
+ var defaultMaxValues = (0, contexts_1.useMdmDefaultMaxValues)();
40
+ var errorMessage = (0, mdm_sdk_1.getAttributePagerActiveTypeErrorMessage)(parentUri, attributeType, profileErrors);
41
+ var max = (_b = maxProp !== null && maxProp !== void 0 ? maxProp : defaultMaxValues) !== null && _b !== void 0 ? _b : Infinity;
34
42
  var partitionByOv = (0, ramda_1.partition)(mdm_sdk_1.isOv);
35
43
  var _e = partitionByOv(values), ovValues = _e[0], nonOvValues = _e[1];
36
44
  var visibleValues = showNonOv ? values : ovValues;
37
45
  var nonVisibleValues = showNonOv ? [] : nonOvValues;
38
46
  var commonProps = {
39
47
  errorMessage: errorMessage,
40
- errors: errors,
48
+ errors: activeErrors,
41
49
  mode: mode,
42
50
  parentUri: parentUri,
43
51
  onAddAttributes: onAddAttributes,
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { AttributeItem, AttributeType, ImageAttributeValue, Paging } from '@reltio/mdm-sdk';
3
- import { RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-module';
2
+ import { AttributeItem, AttributeType, ImageAttributeValue, Paging, RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-sdk';
4
3
  import { ScrollToElementContext } from '../../../../contexts';
5
4
  type Props = {
6
5
  attributeType: AttributeType;
@@ -1,39 +1,2 @@
1
- import React from 'react';
2
- import { RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-module';
3
- import { AttributeError, AttributeType, Crosswalk, ImageAttributeValue, Mode, NestedAttributeValue, Paging, ReferenceAttributeValue, SimpleAttributeValue, AttributeItem } from '@reltio/mdm-sdk';
4
- import AttributesPager from './AttributesPager';
5
- import CardinalityMessage from './CardinalityMessage';
6
- import { ScrollToElementContext } from '../../../../contexts';
7
- type StateProps = {
8
- errorMessage: string;
9
- errors: AttributeError[];
10
- max: number;
11
- };
12
- type DispatchProps = {
13
- onDeactivateError: (id: string) => void;
14
- requestNextPageOfAttributeValues: (payload: RequestNextPageOfAttributeValuesPayload) => void;
15
- };
16
- type OwnProps = {
17
- values: (SimpleAttributeValue | NestedAttributeValue | ReferenceAttributeValue | ImageAttributeValue | string | number)[];
18
- attributeType: AttributeType;
19
- paging?: Paging;
20
- mode?: Mode;
21
- crosswalks?: Crosswalk[];
22
- parentUri: string;
23
- drawLines: boolean;
24
- max?: number;
25
- showEmptyEditors: boolean;
26
- showNonOv?: boolean;
27
- onAddAttributes: (params: AttributeItem[]) => void;
28
- onDeleteAttribute: (param: AttributeItem) => void;
29
- onChangeAttribute: (param: AttributeItem) => void;
30
- additionalControlsRenderer?: (props: any) => JSX.Element;
31
- highlightedError?: React.ContextType<typeof ScrollToElementContext>;
32
- highlightedAttribute?: React.ContextType<typeof ScrollToElementContext>;
33
- };
34
- export type AttributePagerProps = StateProps & DispatchProps & OwnProps;
35
- export { AttributesPager, CardinalityMessage };
36
- declare const _default: import("react-redux").ConnectedComponent<React.ComponentType<StateProps & DispatchProps & OwnProps>, (import("react-redux").Omit<React.ClassAttributes<React.Component<StateProps & DispatchProps & OwnProps, any, any>> & StateProps & DispatchProps & OwnProps, "max" | "errorMessage" | "errors" | "requestNextPageOfAttributeValues" | "onDeactivateError"> | import("react-redux").Omit<StateProps & DispatchProps & OwnProps & {
37
- children?: React.ReactNode;
38
- }, "max" | "errorMessage" | "errors" | "requestNextPageOfAttributeValues" | "onDeactivateError">) & OwnProps>;
39
- export default _default;
1
+ export { default as CardinalityMessage } from './CardinalityMessage';
2
+ export { default } from './AttributesPager';
@@ -1,49 +1,10 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.CardinalityMessage = exports.AttributesPager = void 0;
30
- var react_redux_1 = require("react-redux");
31
- var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
32
- var mdm_sdk_1 = require("@reltio/mdm-sdk");
33
- var AttributesPager_1 = __importDefault(require("./AttributesPager"));
34
- exports.AttributesPager = AttributesPager_1.default;
35
- var CardinalityMessage_1 = __importDefault(require("./CardinalityMessage"));
36
- exports.CardinalityMessage = CardinalityMessage_1.default;
37
- var mapStateToProps = function (state, _a) {
38
- var parentUri = _a.parentUri, attributeType = _a.attributeType, max = _a.max;
39
- return ({
40
- errors: mdm_module_1.default.selectors.getActiveErrorsForAttributesPager(state, parentUri, attributeType),
41
- errorMessage: (0, mdm_sdk_1.getAttributePagerActiveTypeErrorMessage)(parentUri, attributeType, mdm_module_1.default.selectors.getProfileErrors(state)),
42
- max: max || mdm_module_1.default.selectors.getDefaultMaxValues(state)
43
- });
44
- };
45
- var mapDispatchToProps = {
46
- requestNextPageOfAttributeValues: mdm_module_1.profile.actions.requestNextPageOfAttributeValues,
47
- onDeactivateError: mdm_module_1.profile.errors.actions.errorDeactivated
48
- };
49
- exports.default = (0, react_redux_1.connect)(mapStateToProps, mapDispatchToProps)(AttributesPager_1.default);
6
+ exports.default = exports.CardinalityMessage = void 0;
7
+ var CardinalityMessage_1 = require("./CardinalityMessage");
8
+ Object.defineProperty(exports, "CardinalityMessage", { enumerable: true, get: function () { return __importDefault(CardinalityMessage_1).default; } });
9
+ var AttributesPager_1 = require("./AttributesPager");
10
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(AttributesPager_1).default; } });
@@ -1 +1 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"title" | "link" | "description" | "caption" | "wrapper" | "ovIcon" | "svg-icon__root" | "attributesWrapper" | "typeError" | "titleWrapper">;
1
+ export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"link" | "description" | "caption" | "title" | "wrapper" | "ovIcon" | "svg-icon__root" | "attributesWrapper" | "typeError" | "titleWrapper">;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { AttributeType, Crosswalk, ImageAttributeValue, Mode, NestedAttributeValue, Paging, ReferenceAttributeValue, SimpleAttributeValue, AttributeItem } from '@reltio/mdm-sdk';
3
+ import { ScrollToElementContext } from '../../../../contexts';
4
+ export type AttributePagerProps = {
5
+ values: (SimpleAttributeValue | NestedAttributeValue | ReferenceAttributeValue | ImageAttributeValue | string | number)[];
6
+ attributeType: AttributeType;
7
+ paging?: Paging;
8
+ mode?: Mode;
9
+ crosswalks?: Crosswalk[];
10
+ parentUri: string;
11
+ drawLines: boolean;
12
+ max?: number;
13
+ showEmptyEditors: boolean;
14
+ showNonOv?: boolean;
15
+ onAddAttributes: (params: AttributeItem[]) => void;
16
+ onDeleteAttribute: (param: AttributeItem) => void;
17
+ onChangeAttribute: (param: AttributeItem) => void;
18
+ additionalControlsRenderer?: (props: any) => JSX.Element;
19
+ highlightedError?: React.ContextType<typeof ScrollToElementContext>;
20
+ highlightedAttribute?: React.ContextType<typeof ScrollToElementContext>;
21
+ };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { AttributesViewProps } from '../../types';
3
3
  type Props = Omit<AttributesViewProps, 'attributesCount'>;
4
- declare const AttributesView: ({ className, entity, mode, metadata, caption, excludeUris, includeUris, pinnedAttributes }: Props) => JSX.Element;
4
+ declare const AttributesView: ({ className, mode, entity, caption, excludeUris, includeUris, pinnedAttributes }: Props) => JSX.Element;
5
5
  export default AttributesView;
@@ -38,10 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
38
  };
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
40
  var react_1 = __importStar(require("react"));
41
- var react_redux_1 = require("react-redux");
42
41
  var classnames_1 = __importDefault(require("classnames"));
43
- var ramda_1 = require("ramda");
44
- var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
45
42
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
46
43
  var Box_1 = __importDefault(require("@mui/material/Box"));
47
44
  var BasicView_1 = __importDefault(require("../../../BasicView/BasicView"));
@@ -53,19 +50,20 @@ var PinnedAttributesContext_1 = require("../contexts/PinnedAttributesContext");
53
50
  var styles_1 = require("./styles");
54
51
  var AttributesView = function (_a) {
55
52
  var _b;
56
- var className = _a.className, _c = _a.entity, entity = _c === void 0 ? {} : _c, mode = _a.mode, metadata = _a.metadata, _d = _a.caption, caption = _d === void 0 ? '' : _d, _e = _a.excludeUris, excludeUris = _e === void 0 ? [] : _e, _f = _a.includeUris, includeUris = _f === void 0 ? [] : _f, pinnedAttributes = _a.pinnedAttributes;
53
+ var className = _a.className, mode = _a.mode, entity = _a.entity, _c = _a.caption, caption = _c === void 0 ? '' : _c, _d = _a.excludeUris, excludeUris = _d === void 0 ? [] : _d, _e = _a.includeUris, includeUris = _e === void 0 ? [] : _e, pinnedAttributes = _a.pinnedAttributes;
57
54
  var styles = (0, styles_1.useStyles)();
58
- var dispatch = (0, react_redux_1.useDispatch)();
59
55
  var viewId = (0, react_1.useContext)(contexts_1.ViewIdContext);
60
- var userRoles = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getUserRoles);
56
+ var addAttributes = (0, contexts_1.useMdmAction)('addAttributes');
57
+ var modifyAttribute = (0, contexts_1.useMdmAction)('modifyAttribute');
58
+ var removeAttribute = (0, contexts_1.useMdmAction)('removeAttribute');
59
+ var metadata = (0, contexts_1.useMdmMetadata)();
60
+ var userRoles = (0, contexts_1.useMdmUserRoles)();
61
+ var modifiedEntity = (0, contexts_1.useMdmModifiedEntity)(entity.uri) || {};
61
62
  var pinnedAttributeUris = (0, react_1.useMemo)(function () { return (0, mdm_sdk_1.getPinnedAttributesForUser)(pinnedAttributes, userRoles); }, [pinnedAttributes, userRoles]);
62
- var modifiedEntity = (0, react_redux_1.useSelector)(function (state) { return mdm_module_1.default.selectors.getModifiedEntity(state, entity.uri) || {}; });
63
63
  var filteredAttrTypes = (0, react_1.useMemo)(function () { return (0, attributesView_1.getFilteredAttrTypes)(metadata, modifiedEntity.type, includeUris, excludeUris); }, [excludeUris, includeUris, metadata, modifiedEntity.type]);
64
- var onAddAttributes = (0, react_1.useCallback)(function (params) {
65
- return (0, ramda_1.pipe)(mdm_module_1.profile.actions.addAttributes, dispatch)(params.map(function (param) { return (__assign(__assign({}, param), { viewId: viewId })); }));
66
- }, [viewId, dispatch]);
67
- var onChangeAttribute = (0, react_1.useCallback)(function (params) { return (0, ramda_1.pipe)(mdm_module_1.profile.actions.modifyAttribute, dispatch)(__assign(__assign({}, params), { viewId: viewId })); }, [viewId, dispatch]);
68
- var onDeleteAttribute = (0, react_1.useCallback)(function (params) { return (0, ramda_1.pipe)(mdm_module_1.profile.actions.removeAttribute, dispatch)(__assign(__assign({}, params), { viewId: viewId })); }, [viewId, dispatch]);
64
+ var onAddAttributes = (0, react_1.useCallback)(function (params) { return addAttributes(params.map(function (param) { return (__assign(__assign({}, param), { viewId: viewId })); })); }, [viewId, addAttributes]);
65
+ var onChangeAttribute = (0, react_1.useCallback)(function (params) { return modifyAttribute(__assign(__assign({}, params), { viewId: viewId })); }, [viewId, modifyAttribute]);
66
+ var onDeleteAttribute = (0, react_1.useCallback)(function (params) { return removeAttribute(__assign(__assign({}, params), { viewId: viewId })); }, [viewId, removeAttribute]);
69
67
  return (react_1.default.createElement(BasicView_1.default, { className: className },
70
68
  caption && react_1.default.createElement(FacetViewHeader_1.default, { className: styles.header, title: caption }),
71
69
  react_1.default.createElement(Box_1.default, { className: (0, classnames_1.default)(styles.attributesContainer, (_b = {}, _b[styles.noCaption] = !caption, _b)) },
@@ -1,25 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { AttributeType, Mode, TEntityType } from '@reltio/mdm-sdk';
3
+ type Props = {
4
+ entityUri: string;
5
+ entityType: TEntityType;
6
+ mode: Mode;
7
+ attributeTypesSelectionStrategy?: (entityType: TEntityType) => AttributeType[];
8
+ };
9
+ declare const EntityCreator: ({ entityUri, entityType, mode, attributeTypesSelectionStrategy }: Props) => JSX.Element;
1
10
  export default EntityCreator;
2
- declare function EntityCreator({ entity, entityType, attributeTypesSelectionStrategy, mode, onAddAttributes, onDeleteAttribute, onChangeAttribute }: {
3
- entity: any;
4
- entityType: any;
5
- attributeTypesSelectionStrategy?: (entityType: any) => any;
6
- mode: any;
7
- onAddAttributes: any;
8
- onDeleteAttribute: any;
9
- onChangeAttribute: any;
10
- }): JSX.Element;
11
- declare namespace EntityCreator {
12
- namespace propTypes {
13
- export const entityUri: PropTypes.Requireable<string>;
14
- export const parentUri: PropTypes.Requireable<string>;
15
- export const entity: PropTypes.Requireable<object>;
16
- export const entityType: PropTypes.Requireable<object>;
17
- export const attributeTypesSelectionStrategy: PropTypes.Requireable<(...args: any[]) => any>;
18
- export { ModeType as mode };
19
- export const onAddAttributes: PropTypes.Requireable<(...args: any[]) => any>;
20
- export const onDeleteAttribute: PropTypes.Requireable<(...args: any[]) => any>;
21
- export const onChangeAttribute: PropTypes.Requireable<(...args: any[]) => any>;
22
- }
23
- }
24
- import PropTypes from 'prop-types';
25
- import { ModeType } from '@reltio/mdm-sdk';
@@ -27,24 +27,16 @@ 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 prop_types_1 = __importDefault(require("prop-types"));
31
30
  var AttributesList_1 = __importDefault(require("../AttributesList"));
32
- var mdm_sdk_1 = require("@reltio/mdm-sdk");
31
+ var contexts_1 = require("../../../../contexts");
33
32
  var defaultAttributeTypesSelectionStrategy = function (entityType) { return entityType && entityType.attributes; };
34
33
  var EntityCreator = function (_a) {
35
- var entity = _a.entity, entityType = _a.entityType, _b = _a.attributeTypesSelectionStrategy, attributeTypesSelectionStrategy = _b === void 0 ? defaultAttributeTypesSelectionStrategy : _b, mode = _a.mode, onAddAttributes = _a.onAddAttributes, onDeleteAttribute = _a.onDeleteAttribute, onChangeAttribute = _a.onChangeAttribute;
34
+ var entityUri = _a.entityUri, entityType = _a.entityType, mode = _a.mode, _b = _a.attributeTypesSelectionStrategy, attributeTypesSelectionStrategy = _b === void 0 ? defaultAttributeTypesSelectionStrategy : _b;
35
+ var addAttributes = (0, contexts_1.useMdmAction)('addAttributes');
36
+ var removeAttribute = (0, contexts_1.useMdmAction)('removeAttribute');
37
+ var modifyAttribute = (0, contexts_1.useMdmAction)('modifyAttribute');
38
+ var entity = (0, contexts_1.useMdmModifiedEntity)(entityUri);
36
39
  var attributeTypes = (0, react_1.useMemo)(function () { return attributeTypesSelectionStrategy(entityType); }, [attributeTypesSelectionStrategy, entityType]);
37
- return entity ? (react_1.default.createElement(AttributesList_1.default, { key: entity.uri, attrTypes: attributeTypes, entity: entity, showEmptyEditors: true, drawLines: true, parentUri: entity.uri, mode: mode, crosswalks: entity.crosswalks, onAddAttributes: onAddAttributes, onChangeAttribute: onChangeAttribute, onDeleteAttribute: onDeleteAttribute })) : null;
38
- };
39
- EntityCreator.propTypes = {
40
- entityUri: prop_types_1.default.string,
41
- parentUri: prop_types_1.default.string,
42
- entity: prop_types_1.default.object,
43
- entityType: prop_types_1.default.object,
44
- attributeTypesSelectionStrategy: prop_types_1.default.func,
45
- mode: mdm_sdk_1.ModeType,
46
- onAddAttributes: prop_types_1.default.func,
47
- onDeleteAttribute: prop_types_1.default.func,
48
- onChangeAttribute: prop_types_1.default.func
40
+ return entity ? (react_1.default.createElement(AttributesList_1.default, { key: entity.uri, attrTypes: attributeTypes, entity: entity, showEmptyEditors: true, drawLines: true, parentUri: entity.uri, mode: mode, crosswalks: entity.crosswalks, onAddAttributes: addAttributes, onChangeAttribute: modifyAttribute, onDeleteAttribute: removeAttribute })) : null;
49
41
  };
50
42
  exports.default = EntityCreator;
@@ -57,7 +57,7 @@ var DropDownSelector_1 = __importDefault(require("../../../DropDownSelector/Drop
57
57
  var EntityOption_1 = __importDefault(require("./components/EntityOption"));
58
58
  var SingleValue_1 = __importDefault(require("./components/SingleValue"));
59
59
  var ClearIndicator_1 = __importDefault(require("./components/ClearIndicator"));
60
- var EntityCreator_1 = __importDefault(require("../EntityCreator"));
60
+ var EntityCreator_1 = __importDefault(require("../EntityCreator/EntityCreator"));
61
61
  var core_1 = require("../../../../core");
62
62
  var Group_1 = __importDefault(require("./components/Group"));
63
63
  var styles_1 = require("./styles");
@@ -38,12 +38,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
38
  };
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
40
  var react_1 = __importStar(require("react"));
41
- var ramda_1 = require("ramda");
42
41
  var prop_types_1 = __importDefault(require("prop-types"));
43
42
  var classnames_1 = __importDefault(require("classnames"));
44
- var react_redux_1 = require("react-redux");
45
43
  var ui_i18n_1 = __importDefault(require("ui-i18n"));
46
- var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
47
44
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
48
45
  var Typography_1 = __importDefault(require("@mui/material/Typography"));
49
46
  var contexts_1 = require("../../../../../contexts");
@@ -51,14 +48,14 @@ var styles_1 = require("./styles");
51
48
  var SingleValue = function (props) {
52
49
  var _a = props.selectProps, currentEntityType = _a.currentEntityType, menuIsOpen = _a.menuIsOpen, disableLinkClick = _a.disableLinkClick, children = props.children, data = props.data;
53
50
  var styles = (0, styles_1.useSingleValueStyles)();
54
- var dispatch = (0, react_redux_1.useDispatch)();
51
+ var openEntity = (0, contexts_1.useMdmAction)('openEntity');
52
+ var uiPath = (0, contexts_1.useMdmUiPath)();
55
53
  var viewId = (0, react_1.useContext)(contexts_1.ViewIdContext);
56
54
  var generateEntityUrl = (0, react_1.useContext)(contexts_1.UrlGeneratorsContext).generateEntityUrl;
57
- var uiPath = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getUIPath);
58
55
  var handleOnMouseDown = function (event) {
59
56
  event.stopPropagation();
60
57
  if (!disableLinkClick) {
61
- (0, ramda_1.pipe)((0, ramda_1.always)({ uri: data.entityUri, viewId: viewId }), mdm_module_1.ui.actions.openEntity, dispatch)();
58
+ openEntity({ uri: data.entityUri, viewId: viewId });
62
59
  }
63
60
  };
64
61
  var valueProps = (0, mdm_sdk_1.isTempUri)(data.entityUri)
@@ -1,6 +1,5 @@
1
1
  /// <reference types="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 '../../ImageAttributesLine/styles';
5
4
  type Props = {
6
5
  attributeType: AttributeType;
@@ -27,9 +27,7 @@ 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 CloudUpload_1 = __importDefault(require("@mui/icons-material/CloudUpload"));
32
- var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
33
31
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
34
32
  var Image_1 = __importDefault(require("../../../Image/Image"));
35
33
  var ImageActionsOverlay_1 = __importDefault(require("../../../Image/ImageActionsOverlay/ImageActionsOverlay"));
@@ -37,16 +35,16 @@ var SmallIconButton_1 = require("../../../SmallIconButton");
37
35
  var UploadImageDialog_1 = require("../../../UploadImageDialog/UploadImageDialog");
38
36
  var ImageAttributesLine_1 = __importDefault(require("../../ImageAttributesLine"));
39
37
  var constants_1 = require("../../ImageAttributesLine/constants");
38
+ var contexts_1 = require("../../../../contexts");
40
39
  var styles_1 = require("./styles");
40
+ var defaultEntity = {};
41
41
  var ImageAttributesLine = function (_a) {
42
42
  var _b = _a.attributeType, attributeType = _b === void 0 ? {} : _b, _c = _a.attributeValues, attributeValues = _c === void 0 ? [] : _c, onDeleteAttribute = _a.onDeleteAttribute, onChangeAttribute = _a.onChangeAttribute, requestNextPageOfAttributeValues = _a.requestNextPageOfAttributeValues, parentUri = _a.parentUri, paging = _a.paging, showNonOv = _a.showNonOv, _d = _a.imageSize, imageSize = _d === void 0 ? constants_1.DEFAULT_IMAGE_SIZE : _d;
43
43
  var styles = (0, styles_1.useStyles)(imageSize);
44
- var entity = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getEntity) || {};
45
- var defaultProfilePic = (0, react_redux_1.useSelector)(function (state) {
46
- return mdm_module_1.default.selectors.getModifiedEntityDefaultProfilePic(state, entity.uri);
47
- });
48
- var dispatch = (0, react_redux_1.useDispatch)();
49
44
  var _e = (0, react_1.useState)(false), isVisibleUploadDialog = _e[0], setIsVisibleUploadDialog = _e[1];
45
+ var setDefaultProfilePic = (0, contexts_1.useMdmAction)('setDefaultProfilePicForModifiedEntity');
46
+ var entity = (0, contexts_1.useMdmEntity)() || defaultEntity;
47
+ var defaultProfilePic = (0, contexts_1.useMdmModifiedEntityDefaultProfilePic)(entity.uri);
50
48
  var toggleVisibilityUploadDialog = (0, react_1.useCallback)(function () {
51
49
  setIsVisibleUploadDialog(function (visible) { return !visible; });
52
50
  }, []);
@@ -79,12 +77,12 @@ var ImageAttributesLine = function (_a) {
79
77
  onDeleteAttribute(param);
80
78
  if (defaultProfilePic === param.uri) {
81
79
  var newDefaultPic = ((_a = attributeValues[0]) === null || _a === void 0 ? void 0 : _a.uri) === param.uri ? attributeValues[1] : attributeValues[0];
82
- dispatch(mdm_module_1.profile.modifiedEntities.actions.setDefaultProfilePic({
80
+ setDefaultProfilePic({
83
81
  entityUri: entity.uri,
84
82
  value: newDefaultPic || {}
85
- }));
83
+ });
86
84
  }
87
- }, [onDeleteAttribute, entity, defaultProfilePic, attributeValues]);
85
+ }, [onDeleteAttribute, entity, defaultProfilePic, attributeValues, setDefaultProfilePic]);
88
86
  var renderImageActionsOverlay = function (methods, attribute) {
89
87
  var onOpenImageGalleryDialog = methods.onOpenImageGalleryDialog, onDownload = methods.onDownload, onShareLink = methods.onShareLink, onSetAsDefault = methods.onSetAsDefault;
90
88
  var imageUrl = (0, mdm_sdk_1.getImageAttributeOvUrl)(attribute);
@@ -9,8 +9,7 @@ var ui_i18n_1 = __importDefault(require("ui-i18n"));
9
9
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
10
10
  var helpers_1 = require("../../../VirtualGroupedList/helpers");
11
11
  var helpers_2 = require("./helpers");
12
- var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
13
- var react_redux_1 = require("react-redux");
12
+ var contexts_1 = require("../../../../contexts");
14
13
  var GROUP_NAMES;
15
14
  (function (GROUP_NAMES) {
16
15
  GROUP_NAMES["parent"] = "parent";
@@ -18,8 +17,8 @@ var GROUP_NAMES;
18
17
  })(GROUP_NAMES || (GROUP_NAMES = {}));
19
18
  var useMoreAttributesItems = function (_a) {
20
19
  var data = _a.data, parent = _a.parent, filter = _a.filter;
20
+ var strategy = (0, contexts_1.useMdmAttributesSortingStrategy)();
21
21
  var hasGroups = Boolean(parent);
22
- var strategy = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getAttributesSortingStrategy);
23
22
  var sortingFn = (0, react_1.useMemo)(function () {
24
23
  switch (strategy) {
25
24
  case mdm_sdk_1.SortingStrategy.ASC_BY_NAME:
@@ -63,10 +63,18 @@ var styles_1 = require("./styles");
63
63
  var ReferenceAttribute = function (props) {
64
64
  var _a;
65
65
  var styles = (0, styles_1.useStyles)();
66
- var modifiedEntity = props.modifiedEntity, metadata = props.metadata, globalSearchRequestOptions = props.globalSearchRequestOptions, onDeleteModifiedEntity = props.onDeleteModifiedEntity, onUpdateModifiedEntity = props.onUpdateModifiedEntity, onDeactivateError = props.onDeactivateError, highlightedError = props.highlightedError, ownProps = __rest(props, ["modifiedEntity", "metadata", "globalSearchRequestOptions", "onDeleteModifiedEntity", "onUpdateModifiedEntity", "onDeactivateError", "highlightedError"]);
66
+ var highlightedError = props.highlightedError, ownProps = __rest(props, ["highlightedError"]);
67
67
  var attributeValue = ownProps.attributeValue, attributeType = ownProps.attributeType, mode = ownProps.mode, crosswalks = ownProps.crosswalks, errors = ownProps.errors, onChangeAttribute = ownProps.onChangeAttribute;
68
68
  var initialAttributeValue = (0, react_1.useRef)(attributeValue);
69
69
  var _b = (0, hooks_1.useScrollToAttributeError)({ highlightedError: highlightedError, isSimple: true }), ref = _b.ref, errorClassName = _b.errorClassName;
70
+ var entityUri = (0, mdm_sdk_1.getReferencedEntityUriFromAttrValue)(attributeValue);
71
+ var entityDeleted = (0, contexts_1.useMdmAction)('entityDeleted');
72
+ var entityCreated = (0, contexts_1.useMdmAction)('entityCreated');
73
+ var errorDeactivated = (0, contexts_1.useMdmAction)('errorDeactivated');
74
+ var mdmModifiedEntity = (0, contexts_1.useMdmModifiedEntity)(entityUri);
75
+ var modifiedEntity = (0, mdm_sdk_1.isTempUri)(entityUri) ? mdmModifiedEntity : null;
76
+ var metadata = (0, contexts_1.useMdmMetadata)();
77
+ var globalSearchRequestOptions = (0, contexts_1.useMdmGlobalSearchRequestOptions)(['ovOnly']);
70
78
  var referencedEntity = (0, mdm_sdk_1.getReferencedEntityFromAttrValue)(attributeValue);
71
79
  var referencedRelation = (0, mdm_sdk_1.getReferencedRelationFromAttrValue)(attributeValue);
72
80
  var referencedEntityTypeUri = (0, mdm_sdk_1.getReferencedEntityTypeUriFromAttrType)(attributeType);
@@ -92,7 +100,7 @@ var ReferenceAttribute = function (props) {
92
100
  var newEntityAttrTypesSelectionStrategy = (0, react_1.useCallback)(function (entityType) { return (0, mdm_sdk_1.referencedEntityAttributeTypesSelectionStrategy)(attributeType, entityType); }, [attributeType]);
93
101
  var onChangeEntity = (0, react_1.useCallback)(function (entity) {
94
102
  if (modifiedEntity) {
95
- onDeleteModifiedEntity(modifiedEntity.uri);
103
+ entityDeleted(modifiedEntity.uri);
96
104
  }
97
105
  var initialAttrValue = initialAttributeValue.current;
98
106
  var isInitialEntity = !(0, ramda_1.isEmpty)(entity) && entity.uri === (0, mdm_sdk_1.getReferencedEntityUriFromAttrValue)(initialAttrValue);
@@ -101,15 +109,15 @@ var ReferenceAttribute = function (props) {
101
109
  : (0, mdm_sdk_1.createReferencedRelationForAttrValue)(attributeValue) });
102
110
  onChangeAttribute({ value: modifiedValue, attributeType: attributeType, uri: attributeValue.uri });
103
111
  if (referencedEntityMissedError) {
104
- onDeactivateError((0, mdm_sdk_1.getErrorId)(referencedEntityMissedError));
112
+ errorDeactivated((0, mdm_sdk_1.getErrorId)(referencedEntityMissedError));
105
113
  }
106
114
  }, [
107
115
  attributeValue,
108
116
  attributeType,
109
117
  modifiedEntity,
110
118
  onChangeAttribute,
111
- onDeleteModifiedEntity,
112
- onDeactivateError,
119
+ entityDeleted,
120
+ errorDeactivated,
113
121
  referencedEntityMissedError
114
122
  ]);
115
123
  var onCreateEntity = (0, react_1.useCallback)(function (entityTypeUri, initValue) {
@@ -122,15 +130,8 @@ var ReferenceAttribute = function (props) {
122
130
  mode: mode
123
131
  });
124
132
  onChangeEntity(newEntity);
125
- onUpdateModifiedEntity(newEntity);
126
- }, [
127
- newEntityAttrTypesSelectionStrategy,
128
- mode,
129
- referencedEntityType,
130
- metadata,
131
- onChangeEntity,
132
- onUpdateModifiedEntity
133
- ]);
133
+ entityCreated(newEntity);
134
+ }, [newEntityAttrTypesSelectionStrategy, mode, referencedEntityType, metadata, onChangeEntity, entityCreated]);
134
135
  var canChangeReferencedEntity = (0, react_1.useMemo)(function () {
135
136
  return (0, mdm_sdk_1.checkCanEditAttribute)({
136
137
  attributeType: attributeType,
@@ -148,7 +149,7 @@ var ReferenceAttribute = function (props) {
148
149
  _a[styles.dense] = errorMessage || (selectedEntity && (0, mdm_sdk_1.isTempUri)(selectedEntity.entityUri)),
149
150
  _a)), entity: selectedEntity || {}, entityTypesUris: entityTypesUris, max: 20, globalSearchRequestOptions: globalSearchRequestOptions, mode: mode, isDisabled: !canChangeReferencedEntity, onChange: onChangeEntity, onCreate: canCreateReferencedEntity ? onCreateEntity : undefined, metadata: metadata, attributeTypesSelectionStrategy: newEntityAttrTypesSelectionStrategy })))));
150
151
  };
151
- ReferenceAttribute.propTypes = __assign(__assign({}, mdm_sdk_1.ReferenceAttributeType), { modifiedEntity: mdm_sdk_1.EntityType, metadata: mdm_sdk_1.MetadataType, globalSearchRequestOptions: prop_types_1.default.object, onDeleteModifiedEntity: prop_types_1.default.func, onUpdateModifiedEntity: prop_types_1.default.func, onDeactivateError: prop_types_1.default.func, highlightedError: prop_types_1.default.object });
152
+ ReferenceAttribute.propTypes = __assign(__assign({}, mdm_sdk_1.ReferenceAttributeType), { highlightedError: prop_types_1.default.object });
152
153
  exports.default = (0, HOCs_1.withContext)(contexts_1.ScrollToElementContext, function (contextValue, _a) {
153
154
  var attributeValue = _a.attributeValue, attributeType = _a.attributeType;
154
155
  var _b = contextValue || {}, element = _b.element, type = _b.type;
@@ -29,20 +29,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.Roles = void 0;
30
30
  var react_1 = __importStar(require("react"));
31
31
  var ramda_1 = require("ramda");
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 SimpleDropDownSelector_1 = __importDefault(require("../../../SimpleDropDownSelector/SimpleDropDownSelector"));
36
34
  var __1 = require("../../..");
37
35
  var styles_1 = require("./styles");
38
36
  var SmallIconButton_1 = __importDefault(require("../../../SmallIconButton/SmallIconButton"));
39
37
  var Delete_1 = __importDefault(require("@mui/icons-material/Delete"));
38
+ var contexts_1 = require("../../../../contexts");
40
39
  var components = { MultiValue: __1.MultiValueChip };
41
40
  var Roles = function (_a) {
42
41
  var values = _a.values, onChange = _a.onChange, onDelete = _a.onDelete;
43
42
  var styles = (0, styles_1.useStyles)();
44
- var metadata = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getMetadata);
45
- var entity = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getEntity);
43
+ var metadata = (0, contexts_1.useMdmMetadata)();
44
+ var entity = (0, contexts_1.useMdmEntity)();
46
45
  var entityUri = entity.uri;
47
46
  var options = (0, mdm_sdk_1.getRolesForEntityType)(metadata, entity.type).map(function (role) { return ({
48
47
  value: role.uri,
@@ -69,6 +68,6 @@ var Roles = function (_a) {
69
68
  }, [entityUri, onDelete]);
70
69
  return (react_1.default.createElement("div", { className: styles.container, "data-reltio-id": "reltio-attribute-value" },
71
70
  react_1.default.createElement(SimpleDropDownSelector_1.default, { label: '', height: 40, isMulti: true, options: options, value: formattedValues, onChange: handleChange, components: components, classes: styles, className: styles.roleContainer }),
72
- !!onDelete && (react_1.default.createElement(SmallIconButton_1.default, { className: styles.deleteButton, icon: Delete_1.default, onClick: handleDelete, size: "L" }))));
71
+ !!onDelete && (react_1.default.createElement(SmallIconButton_1.default, { "data-reltio-id": "reltio-roles-delete-button", className: styles.deleteButton, icon: Delete_1.default, onClick: handleDelete, size: "L" }))));
73
72
  };
74
73
  exports.Roles = Roles;
@@ -50,7 +50,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
50
50
  Object.defineProperty(exports, "__esModule", { value: true });
51
51
  var react_1 = __importStar(require("react"));
52
52
  var prop_types_1 = __importDefault(require("prop-types"));
53
- var react_redux_1 = require("react-redux");
54
53
  var classnames_1 = __importDefault(require("classnames"));
55
54
  var ramda_1 = require("ramda");
56
55
  var Add_1 = __importDefault(require("@mui/icons-material/Add"));
@@ -64,7 +63,6 @@ var ErrorWrapper_1 = __importDefault(require("../../../ErrorWrapper/ErrorWrapper
64
63
  var SmallIconButton_1 = __importDefault(require("../../../SmallIconButton/SmallIconButton"));
65
64
  var utils_1 = require("./utils");
66
65
  var withAsyncMount_1 = __importDefault(require("../../../../HOCs/withAsyncMount/withAsyncMount"));
67
- var getDependentLookupEditorContext_1 = require("./selectors/getDependentLookupEditorContext");
68
66
  var HOCs_1 = require("../../../../HOCs");
69
67
  var contexts_1 = require("../../../../contexts");
70
68
  var hooks_1 = require("../../../../hooks");
@@ -86,11 +84,7 @@ var SimpleAttributeEditor = function (_a) {
86
84
  var canDelete = (0, mdm_sdk_1.checkCanDeleteAttribute)({ attributeType: attributeType, attributeValue: attributeValue, mode: mode, isReltioCrosswalk: isReltioCrosswalk });
87
85
  var showToEdit = canEdit && isEditableMode;
88
86
  var errorMessage = (0, mdm_sdk_1.getErrorMessage)(ownError);
89
- var dependentLookupEditorContext = (0, react_redux_1.useSelector)(function (state) {
90
- return (0, mdm_sdk_1.isDependentLookupAttrType)(attributeType)
91
- ? (0, getDependentLookupEditorContext_1.getDependentLookupEditorContext)(state, attributeValue, attributeType === null || attributeType === void 0 ? void 0 : attributeType.uri)
92
- : null;
93
- });
87
+ var dependentLookupEditorContext = (0, contexts_1.useMdmDependentLookupEditorContext)(attributeValue, attributeType);
94
88
  var _e = (0, hooks_1.useScrollToAttributeError)({ highlightedError: highlightedError, isSimple: true }), ref = _e.ref, errorClassName = _e.errorClassName;
95
89
  (0, react_1.useEffect)(function () {
96
90
  // when editor is empty but has default lookup code, onChangeAttribute will be called by useLookupsResolver
@@ -156,9 +150,10 @@ SimpleAttributeEditor.propTypes = {
156
150
  highlightedError: prop_types_1.default.object,
157
151
  isEmptyEditor: prop_types_1.default.bool
158
152
  };
159
- exports.default = (0, withAsyncMount_1.default)((0, HOCs_1.withContext)(contexts_1.ScrollToElementContext, function (contextValue, _a) {
153
+ var SimpleAttributeEditorWithScrollToElementContext = (0, HOCs_1.withContext)(contexts_1.ScrollToElementContext, function (contextValue, _a) {
160
154
  var attributeValue = _a.attributeValue;
161
155
  var _b = contextValue || {}, element = _b.element, type = _b.type;
162
156
  var isHighlighted = (0, contexts_1.isHighlightedErrorType)(type) && (element === null || element === void 0 ? void 0 : element.uri) === attributeValue.uri;
163
157
  return { highlightedError: isHighlighted ? contextValue : null };
164
- }, SimpleAttributeEditor), AsyncMountPlaceholder);
158
+ }, SimpleAttributeEditor);
159
+ exports.default = (0, withAsyncMount_1.default)(SimpleAttributeEditorWithScrollToElementContext, AsyncMountPlaceholder);
@@ -1,43 +1,20 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.useAutopopulationContextValue = void 0;
27
4
  var react_1 = require("react");
28
5
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
29
- var react_redux_1 = require("react-redux");
30
- var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
6
+ var contexts_1 = require("../../../../contexts");
31
7
  var useAutopopulationContextValue = function (_a) {
32
8
  var enabled = _a.enabled, attributeTypeUri = _a.attributeTypeUri, valueUri = _a.valueUri;
33
- var dispatch = (0, react_redux_1.useDispatch)();
34
- var autocompleteConfig = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getLookupAutocomplete);
9
+ var dependentLookupsEditorTouched = (0, contexts_1.useMdmAction)('dependentLookupsEditorTouched');
10
+ var autocompleteConfig = (0, contexts_1.useMdmLookupAutocomplete)();
11
+ var dependentLookupEditorState = (0, contexts_1.useMdmDependentLookupEditorState)(valueUri);
35
12
  var autopopulationEnabled = enabled && (0, mdm_sdk_1.isAutopopulationEnabled)(autocompleteConfig, attributeTypeUri);
36
13
  var autopopulationId = autopopulationEnabled ? valueUri : null;
37
- var _b = ((0, react_redux_1.useSelector)(function (state) { return autopopulationEnabled && mdm_module_1.default.selectors.getDependentLookupEditorState(state, valueUri); }) || {}).isTouched, isTouched = _b === void 0 ? false : _b;
14
+ var _b = ((autopopulationEnabled && dependentLookupEditorState) || {}).isTouched, isTouched = _b === void 0 ? false : _b;
38
15
  var onTouch = (0, react_1.useCallback)(function (valueUri) {
39
- dispatch(mdm_module_1.profile.dependentLookups.actions.dependentLookupsEditorTouched({ uri: valueUri, isTouched: true }));
40
- }, [dispatch]);
16
+ dependentLookupsEditorTouched({ uri: valueUri, isTouched: true });
17
+ }, [dependentLookupsEditorTouched]);
41
18
  var autopopulationContextValue = (0, react_1.useMemo)(function () {
42
19
  return autopopulationId
43
20
  ? {