@reltio/components 1.4.1638 → 1.4.1640

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 (431) 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/TenantLabel/TenantLabel.js +3 -4
  52. package/cjs/components/TenantsDropDownSelector/TenantsDropDownSelector.js +3 -4
  53. package/cjs/components/UploadImageDialog/TargetBox/styles.d.ts +1 -1
  54. package/cjs/components/UploadImageDialog/UploadImageDialog.js +4 -5
  55. package/cjs/components/UserSelector/UserSelector.js +3 -4
  56. package/cjs/components/activityLog/ActivityExportButton/ActivityExportButton.js +6 -7
  57. package/cjs/components/activityLog/ActivityFilterEditor/ActivityFilterEditor.js +2 -3
  58. package/cjs/components/activityLog/ActivityFilterEditor/EntityChangedSelectors.js +2 -3
  59. package/cjs/components/activityLog/ActivityFilterEditor/SourceSelector.js +3 -4
  60. package/cjs/components/activityLog/ActivityLogFilter/ActivityLogFilter.d.ts +1 -1
  61. package/cjs/components/activityLog/ActivityLogFilter/ActivityLogFilter.js +5 -3
  62. package/cjs/components/activityLog/activities/GroupActivity.js +2 -3
  63. package/cjs/components/activityLog/activities/RelationObject/styles.d.ts +1 -1
  64. package/cjs/components/activityLog/activities/SearchActivity.js +6 -7
  65. package/cjs/components/activityLog/activities/fields/DeltaField.js +7 -8
  66. package/cjs/components/activityLog/activities/fields/commonStyles.d.ts +1 -1
  67. package/cjs/components/activityLog/activities/records/EntityRecord.js +8 -9
  68. package/cjs/components/attributes/AttributesView/AttributesView.d.ts +2 -2
  69. package/cjs/components/attributes/AttributesView/AttributesView.js +8 -4
  70. package/cjs/components/attributes/DescriptionIcon/DescriptionIcon.d.ts +1 -1
  71. package/cjs/components/attributes/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
  72. package/cjs/components/attributes/ImageAttributesLine/ImageAttributesLine.js +8 -9
  73. package/cjs/components/attributes/OvIcon/OvIcon.d.ts +1 -1
  74. package/cjs/components/attributes/OvIcon/OvIcon.js +4 -6
  75. package/cjs/components/attributes/PivotingAttributes/PivotingTooltip.js +3 -5
  76. package/cjs/components/attributes/PivotingAttributes/PivotingTooltipContent.js +3 -4
  77. package/cjs/components/attributes/PivotingAttributes/styles.d.ts +1 -1
  78. package/cjs/components/attributes/editMode/AttributesFactory/AttributesFactory.js +1 -1
  79. package/cjs/components/attributes/editMode/AttributesPager/AttributeRenderer.d.ts +7 -2
  80. package/cjs/components/attributes/editMode/AttributesPager/AttributesPager.d.ts +2 -38
  81. package/cjs/components/attributes/editMode/AttributesPager/AttributesPager.js +10 -2
  82. package/cjs/components/attributes/editMode/AttributesPager/ImageLineRenderer.d.ts +1 -2
  83. package/cjs/components/attributes/editMode/AttributesPager/index.d.ts +2 -39
  84. package/cjs/components/attributes/editMode/AttributesPager/index.js +5 -44
  85. package/cjs/components/attributes/editMode/AttributesPager/styles.d.ts +1 -1
  86. package/cjs/components/attributes/editMode/AttributesPager/types.d.ts +21 -0
  87. package/cjs/components/attributes/editMode/AttributesView/AttributesView.d.ts +1 -1
  88. package/cjs/components/attributes/editMode/AttributesView/AttributesView.js +10 -12
  89. package/cjs/components/attributes/editMode/EntityCreator/EntityCreator.d.ts +9 -24
  90. package/cjs/components/attributes/editMode/EntityCreator/EntityCreator.js +7 -15
  91. package/cjs/components/attributes/editMode/EntitySelector/EntitySelector.js +1 -1
  92. package/cjs/components/attributes/editMode/EntitySelector/components/SingleValue.js +3 -6
  93. package/cjs/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
  94. package/cjs/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.js +8 -10
  95. package/cjs/components/attributes/editMode/MoreAttributesButton/useMoreAttributesItems.js +2 -3
  96. package/cjs/components/attributes/editMode/ReferenceAttribute/ReferenceAttribute.js +16 -15
  97. package/cjs/components/attributes/editMode/Roles/Roles.js +4 -5
  98. package/cjs/components/attributes/editMode/SimpleAttributeEditor/SimpleAttributeEditor.js +4 -9
  99. package/cjs/components/attributes/editMode/SimpleAttributeEditor/useAutopopulationContextValue.js +7 -30
  100. package/cjs/components/attributes/editMode/Tags/Tags.js +3 -4
  101. package/cjs/components/attributes/inline/ReferenceAttribute/ReferenceAttribute.js +3 -5
  102. package/cjs/components/attributes/inline/common/SourceItem.js +2 -4
  103. package/cjs/components/attributes/readMode/AttributesList/AttributesList.js +1 -1
  104. package/cjs/components/attributes/readMode/AttributesPager/AttributesPager.d.ts +1 -3
  105. package/cjs/components/attributes/readMode/AttributesPager/AttributesPager.js +7 -2
  106. package/cjs/components/attributes/readMode/AttributesPager/ImageLineRenderer.d.ts +1 -2
  107. package/cjs/components/attributes/readMode/AttributesPager/MultiLineRenderer.d.ts +1 -2
  108. package/cjs/components/attributes/readMode/AttributesPager/styles.d.ts +1 -1
  109. package/cjs/components/attributes/readMode/AttributesView/AttributesView.d.ts +2 -2
  110. package/cjs/components/attributes/readMode/AttributesView/AttributesView.js +3 -4
  111. package/cjs/components/attributes/readMode/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
  112. package/cjs/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.js +2 -4
  113. package/cjs/components/attributes/readMode/SpecialAttributes/Roles/Role.js +2 -6
  114. package/cjs/components/attributes/readMode/SpecialAttributes/Tags/Tag.js +2 -4
  115. package/cjs/components/attributes/types/attributesView.d.ts +2 -7
  116. package/cjs/components/crosswalks/AttributesTable/AddAttributesButton/AddAttributesButton.js +2 -3
  117. package/cjs/components/crosswalks/AttributesTable/AttributesTable.js +2 -3
  118. package/cjs/components/crosswalks/AttributesTable/cell-renderers/RuleTypeInfoButton.js +21 -17
  119. package/cjs/components/crosswalks/AttributesTable/cell-renderers/WinnerSourcesRenderer.js +1 -3
  120. package/cjs/components/crosswalks/CrosswalkAttributes/CrosswalkAttributes.js +9 -10
  121. package/cjs/components/crosswalks/CrosswalkDragLayer/CrosswalkDragPreview.js +3 -4
  122. package/cjs/components/crosswalks/CrosswalkRow/CrosswalkRow.js +11 -12
  123. package/cjs/components/crosswalks/DummyCrosswalkRow/DummyCrosswalkRow.js +3 -4
  124. package/cjs/components/editors/DataTypeValueEditor/useEditorContext.d.ts +3 -3
  125. package/cjs/components/editors/DataTypeValueEditor/useEditorContext.js +10 -36
  126. package/cjs/components/editors/DateRangeEditor/DateRangeEditor.d.ts +3 -3
  127. package/cjs/components/editors/TypeaheadEditor/TypeaheadEditor.js +1 -1
  128. package/cjs/components/history/HistoryGraph/HistoryCircle.d.ts +1 -1
  129. package/cjs/components/history/HistoryGraph/HistoryGraph.d.ts +1 -1
  130. package/cjs/components/history/HistoryMenuButton/HistoryMenuButton.js +5 -32
  131. package/cjs/components/history/HistoryTree/HistoryTree.js +9 -8
  132. package/cjs/components/history/HistoryTree/styles.d.ts +1 -1
  133. package/cjs/components/history/ProfileBandHistory/ProfileBandHistory.js +5 -31
  134. package/cjs/components/history/hooks/useHistoryDiff.js +8 -32
  135. package/cjs/components/history/hooks/useHistorySlice.js +4 -28
  136. package/cjs/components/index.d.ts +6 -6
  137. package/cjs/components/index.js +6 -6
  138. package/cjs/components/workflow/cards/GenericWorkflowTaskCard/styles.d.ts +1 -1
  139. package/cjs/components/workflow/cards/PotentialMatchTaskCard/PotentialMatchTaskCard.js +4 -5
  140. package/cjs/components/workflow/components/AttributesChanges/AttributesChanges.js +2 -3
  141. package/cjs/components/workflow/components/AttributesChanges/components/DiffRenderer/DiffRenderer.js +2 -3
  142. package/cjs/components/workflow/components/WorkflowComments/styles.d.ts +1 -1
  143. package/cjs/components/workflow/hooks/useWorkflowActions.js +6 -11
  144. package/cjs/components/workflow/hooks/useWorkflowAssignee.js +3 -8
  145. package/cjs/components/workflow/hooks/useWorkflowCheckPermission.js +24 -25
  146. package/cjs/components/workflow/hooks/useWorkflowComments.js +4 -8
  147. package/cjs/components/workflow/hooks/useWorkflowDefaultActionSuccessHandler.js +6 -30
  148. package/cjs/components/workflow/hooks/useWorkflowDefinitions.js +5 -9
  149. package/cjs/components/workflow/hooks/useWorkflowDueDate.js +4 -8
  150. package/cjs/components/workflow/hooks/useWorkflowPriority.js +4 -5
  151. package/cjs/components/workflow/hooks/useWorkflowProcessInstance.js +6 -10
  152. package/cjs/components/workflow/hooks/useWorkflowTasks.js +11 -15
  153. package/cjs/contexts/ActionsHookContext/index.d.ts +4 -1
  154. package/cjs/contexts/CollaborationContext/index.js +2 -2
  155. package/cjs/contexts/MdmModuleContext/context.d.ts +243 -0
  156. package/cjs/contexts/MdmModuleContext/context.js +7 -0
  157. package/cjs/contexts/MdmModuleContext/hooks.d.ts +139 -0
  158. package/cjs/contexts/MdmModuleContext/hooks.js +206 -0
  159. package/cjs/contexts/MdmModuleContext/index.d.ts +3 -0
  160. package/cjs/contexts/MdmModuleContext/index.js +70 -0
  161. package/cjs/contexts/MdmModuleContext/provider.d.ts +10 -0
  162. package/cjs/contexts/MdmModuleContext/provider.js +15 -0
  163. package/cjs/contexts/MdmModuleContext/selectors/dependentLookupEditorContext.d.ts +22 -0
  164. package/cjs/contexts/MdmModuleContext/selectors/dependentLookupEditorContext.js +132 -0
  165. package/cjs/contexts/MdmModuleContext/selectors/entity.d.ts +3 -0
  166. package/cjs/contexts/MdmModuleContext/selectors/entity.js +11 -0
  167. package/cjs/contexts/MdmModuleContext/selectors.d.ts +3 -0
  168. package/cjs/contexts/MdmModuleContext/selectors.js +11 -0
  169. package/cjs/contexts/index.d.ts +1 -0
  170. package/cjs/contexts/index.js +15 -0
  171. package/cjs/hooks/useAPI/useAPI.js +14 -40
  172. package/cjs/hooks/useCollaboration.js +5 -9
  173. package/cjs/hooks/useCommentsEntitiesMap.js +2 -6
  174. package/cjs/hooks/useConfigPermissions.js +3 -7
  175. package/cjs/hooks/useCustomScripts.js +13 -39
  176. package/cjs/hooks/useEditableConnection.js +2 -6
  177. package/cjs/hooks/useMarkAsNotMatchRequest.js +4 -8
  178. package/cjs/hooks/useMatchesLoader.js +5 -9
  179. package/cjs/hooks/useMergeAllRequest.js +16 -30
  180. package/cjs/hooks/useReadableSearchState.js +8 -32
  181. package/cjs/hooks/useRelationsLoader.js +9 -33
  182. package/cjs/hooks/useScrollToAttributeError/styles.d.ts +1 -1
  183. package/cjs/hooks/useUsers.js +4 -5
  184. package/esm/components/AttributeGroupIcon/AttributeGroupIcon.js +2 -3
  185. package/esm/components/AttributeSelector/AttributeSelector.js +2 -3
  186. package/esm/components/AttributesFiltersBuilder/AttributesFiltersBuilder.js +5 -6
  187. package/esm/components/BasicTableView/ColumnFilter/FilterChip/FilterChip.d.ts +13 -19
  188. package/esm/components/BasicTableView/ColumnFilter/FilterChip/FilterChip.js +7 -18
  189. package/esm/components/BasicView/BasicView.d.ts +1 -1
  190. package/esm/components/CollaborationItem/Comment/Comment.js +2 -4
  191. package/esm/components/CollaborationItem/CommentTarget/CommentTarget.js +3 -5
  192. package/esm/components/CollaborationItem/CommentTarget/styles.d.ts +1 -1
  193. package/esm/components/CollaborationItem/RepliedComment/RepliedComment.js +2 -4
  194. package/esm/components/CollaborationItem/SendMessageArea/SendMessageArea.js +2 -4
  195. package/esm/components/ColoredSourceIcon/ColoredSourceIcon.js +2 -4
  196. package/esm/components/ConnectionEditor/ConnectionEditor.js +3 -6
  197. package/esm/components/DataTenantBadge/DataTenantBadge.js +6 -4
  198. package/esm/components/DataTypeValue/DataTypeValue.js +4 -5
  199. package/esm/components/EntityAvatar/EntityAvatar.js +4 -5
  200. package/esm/components/EntityTypeBadge/EntityTypeBadge.js +4 -6
  201. package/esm/components/EntityTypeIcon/EntityTypeIcon.js +2 -3
  202. package/esm/components/EntityUriLink/EntityUriLink.js +5 -7
  203. package/esm/components/ErrorPopup/ErrorPopup.d.ts +13 -8
  204. package/esm/components/ErrorPopup/ErrorPopup.js +23 -18
  205. package/esm/components/ErrorPopup/styles.d.ts +1 -1
  206. package/esm/components/HierarchyNodeTitle/HierarchyNodeTitle.js +5 -7
  207. package/esm/components/ImageAttributesGallery/ImageAttributesGallery.js +2 -3
  208. package/esm/components/ImageDetailsView/ImageDetailsViewSidebar/ImageDetailsViewSidebar.d.ts +0 -5
  209. package/esm/components/ImageDetailsView/ImageDetailsViewSidebar/ImageDetailsViewSidebar.js +6 -7
  210. package/esm/components/ImageDetailsView/MetaInfo/MetaInfo.js +3 -4
  211. package/esm/components/ImageDetailsView/MetaInfoList/MetaInfoItem/styles.d.ts +1 -1
  212. package/esm/components/ImageDetailsView/MetaInfoList/MetaInfoList.js +3 -4
  213. package/esm/components/ImageDetailsView/hooks/useEditMetaInfo.js +4 -11
  214. package/esm/components/MatchRulesBlock/SimpleMatchRules/styles.d.ts +1 -1
  215. package/esm/components/MatchRulesSelector/MatchRulesSelector.d.ts +1 -4
  216. package/esm/components/MatchRulesSelector/MatchRulesSelector.js +2 -4
  217. package/esm/components/ModeSwitcher/styles.d.ts +1 -1
  218. package/esm/components/PivotingUriLink/PivotingUriLink.js +2 -4
  219. package/esm/components/Popper/Popper.d.ts +1 -1
  220. package/esm/components/PotentialMatchReviewCard/styles.d.ts +1 -1
  221. package/esm/components/ProfileBand/ProfileBand.js +3 -4
  222. package/esm/components/ProfileBandNavigation/ProfileBandNavigationWidget.d.ts +1 -1
  223. package/esm/components/ProfileBandNavigation/hooks/useSearchNavigation.js +20 -32
  224. package/esm/components/ProfileBandNavigation/hooks/useSearchNavigationVisibility.js +4 -5
  225. package/esm/components/ProfilesList/ProfilesList.d.ts +2 -3
  226. package/esm/components/ProfilesList/ProfilesList.js +3 -1
  227. package/esm/components/RelationEditor/RelationEditor.js +49 -36
  228. package/esm/components/RelevanceScoreBadge/RelevanceScoreBadge.js +3 -4
  229. package/esm/components/SelectAttributesList/SelectAttributesList.js +2 -3
  230. package/esm/components/SmallIconButton/SmallIconButton.d.ts +1 -1
  231. package/esm/components/SmallIconButton/index.d.ts +1 -1
  232. package/esm/components/SourceIcon/SourceIcon.js +2 -3
  233. package/esm/components/SourceSystemsSelector/SourceSystemsSelector.js +2 -3
  234. package/esm/components/TenantLabel/TenantLabel.js +3 -4
  235. package/esm/components/TenantsDropDownSelector/TenantsDropDownSelector.js +3 -4
  236. package/esm/components/UploadImageDialog/TargetBox/styles.d.ts +1 -1
  237. package/esm/components/UploadImageDialog/UploadImageDialog.js +4 -5
  238. package/esm/components/UserSelector/UserSelector.js +3 -4
  239. package/esm/components/activityLog/ActivityExportButton/ActivityExportButton.js +6 -7
  240. package/esm/components/activityLog/ActivityFilterEditor/ActivityFilterEditor.js +2 -3
  241. package/esm/components/activityLog/ActivityFilterEditor/EntityChangedSelectors.js +2 -3
  242. package/esm/components/activityLog/ActivityFilterEditor/SourceSelector.js +3 -4
  243. package/esm/components/activityLog/ActivityLogFilter/ActivityLogFilter.d.ts +1 -1
  244. package/esm/components/activityLog/ActivityLogFilter/ActivityLogFilter.js +5 -3
  245. package/esm/components/activityLog/activities/GroupActivity.js +2 -3
  246. package/esm/components/activityLog/activities/RelationObject/styles.d.ts +1 -1
  247. package/esm/components/activityLog/activities/SearchActivity.js +6 -7
  248. package/esm/components/activityLog/activities/fields/DeltaField.js +7 -8
  249. package/esm/components/activityLog/activities/fields/commonStyles.d.ts +1 -1
  250. package/esm/components/activityLog/activities/records/EntityRecord.js +8 -9
  251. package/esm/components/attributes/AttributesView/AttributesView.d.ts +2 -2
  252. package/esm/components/attributes/AttributesView/AttributesView.js +10 -6
  253. package/esm/components/attributes/DescriptionIcon/DescriptionIcon.d.ts +1 -1
  254. package/esm/components/attributes/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
  255. package/esm/components/attributes/ImageAttributesLine/ImageAttributesLine.js +9 -10
  256. package/esm/components/attributes/OvIcon/OvIcon.d.ts +1 -1
  257. package/esm/components/attributes/OvIcon/OvIcon.js +5 -7
  258. package/esm/components/attributes/PivotingAttributes/PivotingTooltip.js +4 -6
  259. package/esm/components/attributes/PivotingAttributes/PivotingTooltipContent.js +3 -4
  260. package/esm/components/attributes/PivotingAttributes/styles.d.ts +1 -1
  261. package/esm/components/attributes/editMode/AttributesFactory/AttributesFactory.js +1 -1
  262. package/esm/components/attributes/editMode/AttributesPager/AttributeRenderer.d.ts +7 -2
  263. package/esm/components/attributes/editMode/AttributesPager/AttributesPager.d.ts +2 -38
  264. package/esm/components/attributes/editMode/AttributesPager/AttributesPager.js +12 -4
  265. package/esm/components/attributes/editMode/AttributesPager/ImageLineRenderer.d.ts +1 -2
  266. package/esm/components/attributes/editMode/AttributesPager/index.d.ts +2 -39
  267. package/esm/components/attributes/editMode/AttributesPager/index.js +2 -19
  268. package/esm/components/attributes/editMode/AttributesPager/styles.d.ts +1 -1
  269. package/esm/components/attributes/editMode/AttributesPager/types.d.ts +21 -0
  270. package/esm/components/attributes/editMode/AttributesView/AttributesView.d.ts +1 -1
  271. package/esm/components/attributes/editMode/AttributesView/AttributesView.js +11 -13
  272. package/esm/components/attributes/editMode/EntityCreator/EntityCreator.d.ts +9 -24
  273. package/esm/components/attributes/editMode/EntityCreator/EntityCreator.js +7 -15
  274. package/esm/components/attributes/editMode/EntitySelector/EntitySelector.js +1 -1
  275. package/esm/components/attributes/editMode/EntitySelector/components/SingleValue.js +4 -7
  276. package/esm/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
  277. package/esm/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.js +8 -10
  278. package/esm/components/attributes/editMode/MoreAttributesButton/useMoreAttributesItems.js +2 -3
  279. package/esm/components/attributes/editMode/ReferenceAttribute/ReferenceAttribute.js +18 -17
  280. package/esm/components/attributes/editMode/Roles/Roles.js +4 -5
  281. package/esm/components/attributes/editMode/SimpleAttributeEditor/SimpleAttributeEditor.js +5 -10
  282. package/esm/components/attributes/editMode/SimpleAttributeEditor/useAutopopulationContextValue.js +7 -7
  283. package/esm/components/attributes/editMode/Tags/Tags.js +3 -4
  284. package/esm/components/attributes/inline/ReferenceAttribute/ReferenceAttribute.js +4 -6
  285. package/esm/components/attributes/inline/common/SourceItem.js +3 -5
  286. package/esm/components/attributes/readMode/AttributesList/AttributesList.js +1 -1
  287. package/esm/components/attributes/readMode/AttributesPager/AttributesPager.d.ts +1 -3
  288. package/esm/components/attributes/readMode/AttributesPager/AttributesPager.js +7 -2
  289. package/esm/components/attributes/readMode/AttributesPager/ImageLineRenderer.d.ts +1 -2
  290. package/esm/components/attributes/readMode/AttributesPager/MultiLineRenderer.d.ts +1 -2
  291. package/esm/components/attributes/readMode/AttributesPager/styles.d.ts +1 -1
  292. package/esm/components/attributes/readMode/AttributesView/AttributesView.d.ts +2 -2
  293. package/esm/components/attributes/readMode/AttributesView/AttributesView.js +4 -5
  294. package/esm/components/attributes/readMode/ImageAttributesLine/ImageAttributesLine.d.ts +1 -2
  295. package/esm/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.js +4 -6
  296. package/esm/components/attributes/readMode/SpecialAttributes/Roles/Role.js +2 -3
  297. package/esm/components/attributes/readMode/SpecialAttributes/Tags/Tag.js +3 -5
  298. package/esm/components/attributes/types/attributesView.d.ts +2 -7
  299. package/esm/components/crosswalks/AttributesTable/AddAttributesButton/AddAttributesButton.js +2 -3
  300. package/esm/components/crosswalks/AttributesTable/AttributesTable.js +2 -3
  301. package/esm/components/crosswalks/AttributesTable/cell-renderers/RuleTypeInfoButton.js +21 -17
  302. package/esm/components/crosswalks/AttributesTable/cell-renderers/WinnerSourcesRenderer.js +2 -4
  303. package/esm/components/crosswalks/CrosswalkAttributes/CrosswalkAttributes.js +9 -10
  304. package/esm/components/crosswalks/CrosswalkDragLayer/CrosswalkDragPreview.js +3 -4
  305. package/esm/components/crosswalks/CrosswalkRow/CrosswalkRow.js +12 -13
  306. package/esm/components/crosswalks/DummyCrosswalkRow/DummyCrosswalkRow.js +3 -4
  307. package/esm/components/editors/DataTypeValueEditor/useEditorContext.d.ts +3 -3
  308. package/esm/components/editors/DataTypeValueEditor/useEditorContext.js +10 -13
  309. package/esm/components/editors/DateRangeEditor/DateRangeEditor.d.ts +3 -3
  310. package/esm/components/editors/TypeaheadEditor/TypeaheadEditor.js +1 -1
  311. package/esm/components/history/HistoryGraph/HistoryCircle.d.ts +1 -1
  312. package/esm/components/history/HistoryGraph/HistoryGraph.d.ts +1 -1
  313. package/esm/components/history/HistoryMenuButton/HistoryMenuButton.js +5 -9
  314. package/esm/components/history/HistoryTree/HistoryTree.js +9 -8
  315. package/esm/components/history/HistoryTree/styles.d.ts +1 -1
  316. package/esm/components/history/ProfileBandHistory/ProfileBandHistory.js +5 -8
  317. package/esm/components/history/hooks/useHistoryDiff.js +8 -9
  318. package/esm/components/history/hooks/useHistorySlice.js +4 -5
  319. package/esm/components/index.d.ts +6 -6
  320. package/esm/components/index.js +6 -6
  321. package/esm/components/workflow/cards/GenericWorkflowTaskCard/styles.d.ts +1 -1
  322. package/esm/components/workflow/cards/PotentialMatchTaskCard/PotentialMatchTaskCard.js +4 -5
  323. package/esm/components/workflow/components/AttributesChanges/AttributesChanges.js +2 -3
  324. package/esm/components/workflow/components/AttributesChanges/components/DiffRenderer/DiffRenderer.js +2 -3
  325. package/esm/components/workflow/components/WorkflowComments/styles.d.ts +1 -1
  326. package/esm/components/workflow/hooks/useWorkflowActions.js +5 -7
  327. package/esm/components/workflow/hooks/useWorkflowAssignee.js +4 -6
  328. package/esm/components/workflow/hooks/useWorkflowCheckPermission.js +24 -22
  329. package/esm/components/workflow/hooks/useWorkflowComments.js +4 -5
  330. package/esm/components/workflow/hooks/useWorkflowDefaultActionSuccessHandler.js +7 -8
  331. package/esm/components/workflow/hooks/useWorkflowDefinitions.js +5 -6
  332. package/esm/components/workflow/hooks/useWorkflowDueDate.js +4 -5
  333. package/esm/components/workflow/hooks/useWorkflowPriority.js +4 -5
  334. package/esm/components/workflow/hooks/useWorkflowProcessInstance.js +6 -7
  335. package/esm/components/workflow/hooks/useWorkflowTasks.js +11 -12
  336. package/esm/contexts/ActionsHookContext/index.d.ts +4 -1
  337. package/esm/contexts/CollaborationContext/index.js +1 -1
  338. package/esm/contexts/MdmModuleContext/context.d.ts +243 -0
  339. package/esm/contexts/MdmModuleContext/context.js +4 -0
  340. package/esm/contexts/MdmModuleContext/hooks.d.ts +139 -0
  341. package/esm/contexts/MdmModuleContext/hooks.js +139 -0
  342. package/esm/contexts/MdmModuleContext/index.d.ts +3 -0
  343. package/esm/contexts/MdmModuleContext/index.js +2 -0
  344. package/esm/contexts/MdmModuleContext/provider.d.ts +10 -0
  345. package/esm/contexts/MdmModuleContext/provider.js +8 -0
  346. package/esm/contexts/MdmModuleContext/selectors/dependentLookupEditorContext.d.ts +22 -0
  347. package/esm/contexts/MdmModuleContext/selectors/dependentLookupEditorContext.js +123 -0
  348. package/esm/contexts/MdmModuleContext/selectors/entity.d.ts +3 -0
  349. package/esm/contexts/MdmModuleContext/selectors/entity.js +6 -0
  350. package/esm/contexts/MdmModuleContext/selectors.d.ts +3 -0
  351. package/esm/contexts/MdmModuleContext/selectors.js +6 -0
  352. package/esm/contexts/index.d.ts +1 -0
  353. package/esm/contexts/index.js +1 -0
  354. package/esm/hooks/useAPI/useAPI.js +15 -18
  355. package/esm/hooks/useCollaboration.js +5 -6
  356. package/esm/hooks/useCommentsEntitiesMap.js +2 -3
  357. package/esm/hooks/useConfigPermissions.js +3 -4
  358. package/esm/hooks/useCustomScripts.js +14 -17
  359. package/esm/hooks/useEditableConnection.js +2 -3
  360. package/esm/hooks/useMarkAsNotMatchRequest.js +4 -5
  361. package/esm/hooks/useMatchesLoader.js +5 -6
  362. package/esm/hooks/useMergeAllRequest.js +16 -7
  363. package/esm/hooks/useReadableSearchState.js +8 -9
  364. package/esm/hooks/useRelationsLoader.js +9 -10
  365. package/esm/hooks/useScrollToAttributeError/styles.d.ts +1 -1
  366. package/esm/hooks/useUsers.js +4 -5
  367. package/package.json +3 -4
  368. package/cjs/components/ProfileBandNavigation/helpers/index.d.ts +0 -7
  369. package/cjs/components/ProfileBandNavigation/helpers/index.js +0 -70
  370. package/cjs/components/ProfileBandNavigation/types/index.d.ts +0 -15
  371. package/cjs/components/ProfileBandNavigation/types/index.js +0 -2
  372. package/cjs/components/ProfilesList/index.d.ts +0 -27
  373. package/cjs/components/ProfilesList/index.js +0 -16
  374. package/cjs/components/RelationEditor/index.d.ts +0 -6
  375. package/cjs/components/RelationEditor/index.js +0 -50
  376. package/cjs/components/attributes/AttributesView/index.d.ts +0 -7
  377. package/cjs/components/attributes/AttributesView/index.js +0 -15
  378. package/cjs/components/attributes/editMode/AttributesView/index.d.ts +0 -23
  379. package/cjs/components/attributes/editMode/AttributesView/index.js +0 -14
  380. package/cjs/components/attributes/editMode/EntityCreator/index.d.ts +0 -25
  381. package/cjs/components/attributes/editMode/EntityCreator/index.js +0 -42
  382. package/cjs/components/attributes/editMode/ReferenceAttribute/index.d.ts +0 -4
  383. package/cjs/components/attributes/editMode/ReferenceAttribute/index.js +0 -48
  384. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.d.ts +0 -2
  385. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.js +0 -34
  386. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.d.ts +0 -1
  387. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.js +0 -19
  388. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.d.ts +0 -1
  389. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.js +0 -20
  390. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.d.ts +0 -5
  391. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.js +0 -79
  392. package/cjs/components/attributes/editMode/SimpleAttributeEditor/selectors/types.d.ts +0 -11
  393. package/cjs/components/attributes/readMode/AttributesPager/index.d.ts +0 -28
  394. package/cjs/components/attributes/readMode/AttributesPager/index.js +0 -43
  395. package/cjs/components/attributes/readMode/AttributesView/index.d.ts +0 -23
  396. package/cjs/components/attributes/readMode/AttributesView/index.js +0 -14
  397. package/cjs/test-utils/store-utils.d.ts +0 -78
  398. package/cjs/test-utils/store-utils.js +0 -19
  399. package/esm/components/ProfileBandNavigation/helpers/index.d.ts +0 -7
  400. package/esm/components/ProfileBandNavigation/helpers/index.js +0 -66
  401. package/esm/components/ProfileBandNavigation/types/index.d.ts +0 -15
  402. package/esm/components/ProfileBandNavigation/types/index.js +0 -1
  403. package/esm/components/ProfilesList/index.d.ts +0 -27
  404. package/esm/components/ProfilesList/index.js +0 -10
  405. package/esm/components/RelationEditor/index.d.ts +0 -6
  406. package/esm/components/RelationEditor/index.js +0 -21
  407. package/esm/components/attributes/AttributesView/index.d.ts +0 -7
  408. package/esm/components/attributes/AttributesView/index.js +0 -9
  409. package/esm/components/attributes/editMode/AttributesView/index.d.ts +0 -23
  410. package/esm/components/attributes/editMode/AttributesView/index.js +0 -8
  411. package/esm/components/attributes/editMode/EntityCreator/index.d.ts +0 -25
  412. package/esm/components/attributes/editMode/EntityCreator/index.js +0 -13
  413. package/esm/components/attributes/editMode/ReferenceAttribute/index.d.ts +0 -4
  414. package/esm/components/attributes/editMode/ReferenceAttribute/index.js +0 -19
  415. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.d.ts +0 -2
  416. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.js +0 -27
  417. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.d.ts +0 -1
  418. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.js +0 -15
  419. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.d.ts +0 -1
  420. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.js +0 -13
  421. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.d.ts +0 -5
  422. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.js +0 -72
  423. package/esm/components/attributes/editMode/SimpleAttributeEditor/selectors/types.d.ts +0 -11
  424. package/esm/components/attributes/readMode/AttributesPager/index.d.ts +0 -28
  425. package/esm/components/attributes/readMode/AttributesPager/index.js +0 -14
  426. package/esm/components/attributes/readMode/AttributesView/index.d.ts +0 -23
  427. package/esm/components/attributes/readMode/AttributesView/index.js +0 -8
  428. package/esm/test-utils/store-utils.d.ts +0 -78
  429. package/esm/test-utils/store-utils.js +0 -12
  430. /package/cjs/components/attributes/editMode/{SimpleAttributeEditor/selectors → AttributesPager}/types.js +0 -0
  431. /package/esm/components/attributes/editMode/{SimpleAttributeEditor/selectors → AttributesPager}/types.js +0 -0
@@ -27,25 +27,24 @@ 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
- var mdm_module_1 = require("@reltio/mdm-module");
32
- var ActivityTitle_1 = __importDefault(require("./ActivityTitle/ActivityTitle"));
33
30
  var ramda_1 = require("ramda");
31
+ var ui_i18n_1 = __importDefault(require("ui-i18n"));
32
+ var ActivityTitle_1 = __importDefault(require("./ActivityTitle/ActivityTitle"));
34
33
  var core_1 = require("../../../core");
35
34
  var hooks_1 = require("../../../hooks");
36
- var ui_i18n_1 = __importDefault(require("ui-i18n"));
35
+ var contexts_1 = require("../../../contexts");
37
36
  var styles_1 = require("./styles");
38
37
  var SearchActivity = function (_a) {
39
38
  var data = _a.data, type = _a.type;
40
39
  var styles = (0, styles_1.useStyles)();
41
- var dispatch = (0, react_redux_1.useDispatch)();
40
+ var openSearch = (0, contexts_1.useMdmAction)('openSearch');
42
41
  var searchState = (0, react_1.useMemo)(function () {
43
42
  var searchData = (0, core_1.parseJSON)(data.description);
44
43
  return searchData.version === '2.0' ? searchData.activity.uiState : searchData;
45
44
  }, [data.description]);
46
- var openSearch = (0, ramda_1.pipe)((0, ramda_1.always)(searchState), mdm_module_1.ui.actions.openSearch, dispatch);
45
+ var handleOpenSearch = (0, ramda_1.pipe)((0, ramda_1.always)(searchState), openSearch);
47
46
  var searchString = (0, hooks_1.useReadableSearchState)(searchState);
48
47
  return (react_1.default.createElement(ActivityTitle_1.default, { type: type },
49
- react_1.default.createElement("span", { className: styles.link, onClick: openSearch }, searchString || ui_i18n_1.default.text('all profiles'))));
48
+ react_1.default.createElement("span", { className: styles.link, onClick: handleOpenSearch }, searchString || ui_i18n_1.default.text('all profiles'))));
50
49
  };
51
50
  exports.default = SearchActivity;
@@ -3,24 +3,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ var react_1 = __importDefault(require("react"));
7
+ var classnames_1 = __importDefault(require("classnames"));
8
+ var types_1 = require("../../types");
6
9
  var Chip_1 = __importDefault(require("@mui/material/Chip"));
7
10
  var ArrowForward_1 = __importDefault(require("@mui/icons-material/ArrowForward"));
8
- var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
9
11
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
10
- var classnames_1 = __importDefault(require("classnames"));
11
- var react_1 = __importDefault(require("react"));
12
- var react_redux_1 = require("react-redux");
13
- var types_1 = require("../../types");
14
12
  var activities_1 = require("../../utils/activities");
15
- var styles_1 = require("./styles");
13
+ var contexts_1 = require("../../../../contexts");
16
14
  var commonStyles_1 = require("./commonStyles");
15
+ var styles_1 = require("./styles");
17
16
  var DeltaField = function (_a) {
18
17
  var _b, _c;
19
18
  var delta = _a.delta;
20
19
  var styles = (0, styles_1.useStyles)();
21
20
  var commonStyles = (0, commonStyles_1.useCommonStyles)();
22
- var metadata = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getMetadata);
23
- var attributePresentations = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getAttributePresentations);
21
+ var metadata = (0, contexts_1.useMdmMetadata)();
22
+ var attributePresentations = (0, contexts_1.useMdmAttributePresentations)();
24
23
  var attribute = (0, mdm_sdk_1.findAttributeTypeByUri)(metadata, delta.attributeType);
25
24
  var newValue = (_b = delta.newValue) === null || _b === void 0 ? void 0 : _b.value;
26
25
  var oldValue = (_c = delta.oldValue) === null || _c === void 0 ? void 0 : _c.value;
@@ -1 +1 @@
1
- export declare const useCommonStyles: (props?: any) => import("@mui/styles").ClassNameMap<"fieldName" | "link" | "field">;
1
+ export declare const useCommonStyles: (props?: any) => import("@mui/styles").ClassNameMap<"link" | "fieldName" | "field">;
@@ -3,26 +3,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- var Typography_1 = __importDefault(require("@mui/material/Typography"));
7
- var Restore_1 = __importDefault(require("@mui/icons-material/Restore"));
8
- var mdm_module_1 = require("@reltio/mdm-module");
9
- var mdm_sdk_1 = require("@reltio/mdm-sdk");
10
6
  var react_1 = __importDefault(require("react"));
11
- var react_redux_1 = require("react-redux");
12
7
  var ui_i18n_1 = __importDefault(require("ui-i18n"));
13
8
  var ramda_1 = require("ramda");
9
+ var mdm_sdk_1 = require("@reltio/mdm-sdk");
10
+ var Typography_1 = __importDefault(require("@mui/material/Typography"));
11
+ var Restore_1 = __importDefault(require("@mui/icons-material/Restore"));
14
12
  var types_1 = require("../../types");
15
13
  var EntityObject_1 = __importDefault(require("../EntityObject/EntityObject"));
16
14
  var RecordUpdates_1 = __importDefault(require("./RecordUpdates"));
15
+ var contexts_1 = require("../../../../contexts");
17
16
  var styles_1 = require("./styles");
18
17
  var EntityRecord = function (_a) {
19
18
  var _b;
20
19
  var item = _a.item;
21
20
  var styles = (0, styles_1.useStyles)();
22
- var dispatch = (0, react_redux_1.useDispatch)();
21
+ var openHistoryEvent = (0, contexts_1.useMdmAction)('openHistoryEvent');
23
22
  var deltaArray = (_b = item.deltaCollection) === null || _b === void 0 ? void 0 : _b.delta;
24
23
  var isEntityChanged = (0, ramda_1.path)(['data', 'type'])(item) === types_1.ActivityTypes.ENTITY_CHANGED;
25
- var openHistoryEvent = function () {
24
+ var handleOpenHistoryEvent = function () {
26
25
  (0, mdm_sdk_1.getEntityPreviousChange)(item.objectUri, item.timestamp)
27
26
  .then(function (previousTimestamp) {
28
27
  if (previousTimestamp !== -1) {
@@ -30,7 +29,7 @@ var EntityRecord = function (_a) {
30
29
  aStamp: item.timestamp,
31
30
  bStamp: previousTimestamp
32
31
  };
33
- dispatch(mdm_module_1.ui.actions.openHistoryEvent({ entityUri: item.objectUri, historyEvent: historyEvent }));
32
+ openHistoryEvent({ entityUri: item.objectUri, historyEvent: historyEvent });
34
33
  }
35
34
  })
36
35
  .catch(function (err) { return console.error(err); });
@@ -39,7 +38,7 @@ var EntityRecord = function (_a) {
39
38
  react_1.default.createElement(Typography_1.default, { className: styles.label },
40
39
  !deltaArray && react_1.default.createElement("span", { className: styles.description }, ui_i18n_1.default.text('Profile changed')),
41
40
  react_1.default.createElement(EntityObject_1.default, { item: item })),
42
- isEntityChanged && react_1.default.createElement(Restore_1.default, { className: styles.restoreIcon, onClick: openHistoryEvent }),
41
+ isEntityChanged && (react_1.default.createElement(Restore_1.default, { "data-reltio-id": "reltio-entity-record-restore-icon", className: styles.restoreIcon, onClick: handleOpenHistoryEvent })),
43
42
  react_1.default.createElement(RecordUpdates_1.default, { updates: deltaArray, recordId: item.id })));
44
43
  };
45
44
  exports.default = EntityRecord;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { AttributesViewOwnProps } from '../types';
3
- declare const AttributesView: ({ mode, attributesCount, pinnedAttributes, entity, ...restProps }: AttributesViewOwnProps) => JSX.Element;
2
+ import { AttributesViewProps } from '../types';
3
+ declare const AttributesView: ({ attributesCount, pinnedAttributes, ...restProps }: AttributesViewProps) => JSX.Element;
4
4
  export default AttributesView;
@@ -27,11 +27,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
28
  var react_1 = __importDefault(require("react"));
29
29
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
30
- var AttributesView_1 = __importDefault(require("../readMode/AttributesView"));
31
- var AttributesView_2 = __importDefault(require("../editMode/AttributesView"));
30
+ var AttributesView_1 = __importDefault(require("../readMode/AttributesView/AttributesView"));
31
+ var AttributesView_2 = __importDefault(require("../editMode/AttributesView/AttributesView"));
32
32
  var contexts_1 = require("../../../contexts");
33
33
  var AttributesView = function (_a) {
34
- var _b = _a.mode, mode = _b === void 0 ? mdm_sdk_1.Mode.Viewing : _b, attributesCount = _a.attributesCount, pinnedAttributes = _a.pinnedAttributes, entity = _a.entity, restProps = __rest(_a, ["mode", "attributesCount", "pinnedAttributes", "entity"]);
35
- return (react_1.default.createElement(contexts_1.EntityContext.Provider, { value: entity }, (0, mdm_sdk_1.isViewMode)(mode) ? (react_1.default.createElement(AttributesView_1.default, __assign({ attributesCount: attributesCount, entity: entity }, restProps))) : (react_1.default.createElement(AttributesView_2.default, __assign({ mode: mode, pinnedAttributes: pinnedAttributes, entity: entity }, restProps)))));
34
+ var attributesCount = _a.attributesCount, pinnedAttributes = _a.pinnedAttributes, restProps = __rest(_a, ["attributesCount", "pinnedAttributes"]);
35
+ var mdmEntity = (0, contexts_1.useMdmEntityWithDiff)();
36
+ var mdmMode = (0, contexts_1.useMdmMode)();
37
+ var entity = restProps.entity || mdmEntity;
38
+ var mode = restProps.mode || mdmMode;
39
+ return (react_1.default.createElement(contexts_1.EntityContext.Provider, { value: entity }, (0, mdm_sdk_1.isViewMode)(mode) ? (react_1.default.createElement(AttributesView_1.default, __assign({}, restProps, { attributesCount: attributesCount, entity: entity }))) : (react_1.default.createElement(AttributesView_2.default, __assign({}, restProps, { mode: mode, pinnedAttributes: pinnedAttributes, entity: entity })))));
36
40
  };
37
41
  exports.default = AttributesView;
@@ -25,7 +25,7 @@ export declare const ChipWithTooltip: React.ForwardRefExoticComponent<import("pr
25
25
  variant?: import("@mui/types").OverridableStringUnion<"filled" | "outlined", import("@mui/material/Chip").ChipPropsVariantOverrides>;
26
26
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
27
27
  ref?: React.Ref<HTMLDivElement>;
28
- }, "label" | "icon" | "children" | "size" | "color" | "disabled" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "tabIndex" | "variant" | "deleteIcon" | "avatar" | "clickable" | "onDelete" | "skipFocusWhenDisabled">>;
28
+ }, "label" | "icon" | "children" | "size" | "color" | "disabled" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "tabIndex" | "variant" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled">>;
29
29
  type Props = {
30
30
  className?: string;
31
31
  description?: string;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-module';
3
- import { AttributeType, ImageAttributeValue, Paging, AttributeItem } from '@reltio/mdm-sdk';
2
+ import { AttributeType, ImageAttributeValue, Paging, AttributeItem, RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-sdk';
4
3
  import { SIZES_TYPE } from './styles';
5
4
  export type ImageRenderProps = {
6
5
  onDownload?: (url: string[]) => void;
@@ -38,10 +38,8 @@ 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 react_resize_detector_1 = __importDefault(require("react-resize-detector"));
43
42
  var Typography_1 = __importDefault(require("@mui/material/Typography"));
44
- var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
45
43
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
46
44
  var contexts_1 = require("../../../contexts");
47
45
  var ImageAttributesGallery_1 = __importDefault(require("../../ImageAttributesGallery/ImageAttributesGallery"));
@@ -50,9 +48,6 @@ var constants_1 = require("./constants");
50
48
  var styles_1 = require("./styles");
51
49
  var ImageAttributesLine = function (_a) {
52
50
  var attributeType = _a.attributeType, _b = _a.attributeValues, attributeValues = _b === void 0 ? [] : _b, renderImage = _a.renderImage, _c = _a.overlay, overlay = _c === void 0 ? false : _c, _d = _a.countFixedItems, countFixedItems = _d === void 0 ? 0 : _d, children = _a.children, onUpload = _a.onUpload, onDeleteAttribute = _a.onDeleteAttribute, _e = _a.imageSize, imageSize = _e === void 0 ? constants_1.DEFAULT_IMAGE_SIZE : _e, paging = _a.paging, parentUri = _a.parentUri, showNonOv = _a.showNonOv, requestNextPageOfAttributeValues = _a.requestNextPageOfAttributeValues;
53
- var entity = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getEntity) || {};
54
- var isViewMode = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getIsViewMode);
55
- var dispatch = (0, react_redux_1.useDispatch)();
56
51
  var styles = (0, styles_1.useStyles)(imageSize);
57
52
  (0, react_1.useEffect)(function () {
58
53
  if (paging && requestNextPageOfAttributeValues) {
@@ -74,6 +69,10 @@ var ImageAttributesLine = function (_a) {
74
69
  var isBlockImageGalleryDialog = (0, react_1.useContext)(contexts_1.BlockImageGalleryDialogContext);
75
70
  var _h = (0, react_1.useState)(false), isOpenDialog = _h[0], setIsOpenDialog = _h[1];
76
71
  var _j = (0, react_1.useState)(), currentAttributeValueUri = _j[0], setCurrentAttributeValueUri = _j[1];
72
+ var setDefaultProfilePicForEntity = (0, contexts_1.useMdmAction)('setDefaultProfilePicForEntity');
73
+ var setDefaultProfilePicForModifiedEntity = (0, contexts_1.useMdmAction)('setDefaultProfilePicForModifiedEntity');
74
+ var entity = (0, contexts_1.useMdmEntity)() || {};
75
+ var isViewMode = (0, contexts_1.useMdmIsViewMode)();
77
76
  var adjustMaxItemsToScreenWidth = (0, react_1.useCallback)(function (width) {
78
77
  var imageMargin = imageSize.imageMargin, imageWidth = imageSize.imageWidth;
79
78
  var maxItemsPerScreen = Math.floor((width + imageMargin) / (imageWidth + imageMargin)) - countFixedItems;
@@ -112,17 +111,17 @@ var ImageAttributesLine = function (_a) {
112
111
  (0, mdm_sdk_1.insertDefaultImageByAttrUri)(entity.uri, attributeValue.uri).then(function (_a) {
113
112
  var status = _a.status;
114
113
  if (status === 'success') {
115
- dispatch(mdm_module_1.profile.entity.actions.setDefaultProfilePic(attributeValue));
114
+ setDefaultProfilePicForEntity(attributeValue);
116
115
  }
117
116
  });
118
117
  }
119
118
  else {
120
- dispatch(mdm_module_1.profile.modifiedEntities.actions.setDefaultProfilePic({
119
+ setDefaultProfilePicForModifiedEntity({
121
120
  entityUri: entity.uri,
122
121
  value: attributeValue
123
- }));
122
+ });
124
123
  }
125
- }, [isViewMode, entity.uri, dispatch]);
124
+ }, [isViewMode, entity.uri, setDefaultProfilePicForEntity, setDefaultProfilePicForModifiedEntity]);
126
125
  var renderImageProps = __assign({ onOpenImageGalleryDialog: handleOpenImageGalleryDialog }, (overlay && {
127
126
  onDownload: handleDownload,
128
127
  onShareLink: handleShareLink,
@@ -26,7 +26,7 @@ export declare const ChipWithTooltip: React.ForwardRefExoticComponent<import("pr
26
26
  variant?: import("@mui/types").OverridableStringUnion<"filled" | "outlined", import("@mui/material/Chip").ChipPropsVariantOverrides>;
27
27
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
28
28
  ref?: React.Ref<HTMLDivElement>;
29
- }, "label" | "icon" | "children" | "size" | "color" | "disabled" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "tabIndex" | "variant" | "deleteIcon" | "avatar" | "clickable" | "onDelete" | "skipFocusWhenDisabled">>;
29
+ }, "label" | "icon" | "children" | "size" | "color" | "disabled" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "tabIndex" | "variant" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "skipFocusWhenDisabled">>;
30
30
  type ComplexWithLabel = NestedAttributeValue | ReferenceAttributeValue;
31
31
  type Props = {
32
32
  className?: string;
@@ -29,10 +29,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ChipWithTooltip = void 0;
30
30
  var react_1 = __importStar(require("react"));
31
31
  var classnames_1 = __importDefault(require("classnames"));
32
- var react_redux_1 = require("react-redux");
33
- var Chip_1 = __importDefault(require("@mui/material/Chip"));
34
32
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
35
- var mdm_module_1 = require("@reltio/mdm-module");
33
+ var Chip_1 = __importDefault(require("@mui/material/Chip"));
36
34
  var DataTypeValue_1 = __importDefault(require("../../DataTypeValue/DataTypeValue"));
37
35
  var HOCs_1 = require("../../../HOCs");
38
36
  var contexts_1 = require("../../../contexts");
@@ -42,12 +40,12 @@ exports.ChipWithTooltip = (0, HOCs_1.withTooltip)(Chip_1.default);
42
40
  var OvIcon = function (_a) {
43
41
  var className = _a.className, attributeType = _a.attributeType, _b = _a.nonOvValues, nonOvValues = _b === void 0 ? [] : _b, nonOvTotal = _a.nonOvTotal;
44
42
  var styles = (0, styles_1.useStyles)();
45
- var dispatch = (0, react_redux_1.useDispatch)();
43
+ var openEntity = (0, contexts_1.useMdmAction)('openEntity');
46
44
  var entity = (0, react_1.useContext)(contexts_1.EntityContext);
47
45
  var entityUri = (0, heplers_1.getEntityUri)(entity, nonOvValues);
48
46
  var onClick = (0, react_1.useCallback)(function () {
49
- dispatch(mdm_module_1.ui.actions.openEntity({ uri: entityUri, viewId: null, screen: 'sources' }));
50
- }, [dispatch, entityUri]);
47
+ openEntity({ uri: entityUri, viewId: null, screen: 'sources' });
48
+ }, [openEntity, entityUri]);
51
49
  if (!nonOvTotal) {
52
50
  return null;
53
51
  }
@@ -28,9 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.PivotingTooltip = void 0;
30
30
  var react_1 = __importStar(require("react"));
31
- var react_redux_1 = require("react-redux");
32
31
  var Tooltip_1 = __importDefault(require("@mui/material/Tooltip"));
33
- var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
34
32
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
35
33
  var ramda_1 = require("ramda");
36
34
  var contexts_1 = require("../../../contexts");
@@ -43,10 +41,10 @@ var PivotingTooltip = function (_a) {
43
41
  var value = _a.value, attributeType = _a.attributeType, children = _a.children, className = _a.className;
44
42
  var styles = (0, styles_1.usePivotingTooltipStyles)();
45
43
  var contentStyles = (0, styles_1.useStyles)();
46
- var dispatch = (0, react_redux_1.useDispatch)();
47
44
  var pivotingAttributesList = (0, react_1.useContext)(contexts_1.PivotingAttributeContext) || [];
45
+ var openPivotingPerspective = (0, contexts_1.useMdmAction)('openPivotingPerspective');
46
+ var metadata = (0, contexts_1.useMdmMetadata)() || {};
48
47
  var isNestedAttribute = (0, mdm_sdk_1.isNested)(attributeType);
49
- var metadata = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getMetadata) || {};
50
48
  var pivotingValue = isNestedAttribute
51
49
  ? (0, helpers_1.generatePivotingValue)(attributeType, value.value, pivotingAttributesList, metadata)
52
50
  : (0, helpers_1.preparePivotingAttributeValue)(value.lookupCode || value.value, attributeType);
@@ -67,7 +65,7 @@ var PivotingTooltip = function (_a) {
67
65
  };
68
66
  var generatedValue = isPivotingAttribute ? convertPivotingValue() : undefined;
69
67
  var handleSeeAllClick = function () {
70
- dispatch(mdm_module_1.ui.actions.openPivotingPerspective({ value: generatedValue, attributeType: attributeType }));
68
+ openPivotingPerspective({ value: generatedValue, attributeType: attributeType });
71
69
  };
72
70
  return isPivotingAttribute ? (react_1.default.createElement(Tooltip_1.default, { arrow: true, placement: "right-start", classes: styles, disableInteractive: false, title: react_1.default.createElement(PivotingTooltipContent_1.PivotingTooltipContent, { value: pivotingValue, generatedValue: generatedValue, attributeType: attributeType, config: pivotingAttribute.popup, onSeeAllClick: handleSeeAllClick }) },
73
71
  react_1.default.createElement("span", { className: className },
@@ -39,24 +39,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
40
  exports.PivotingTooltipContent = void 0;
41
41
  var react_1 = __importStar(require("react"));
42
- var react_redux_1 = require("react-redux");
43
42
  var ui_i18n_1 = __importDefault(require("ui-i18n"));
44
- var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
45
43
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
46
44
  var EntityAvatar_1 = __importDefault(require("../../EntityAvatar/EntityAvatar"));
47
45
  var EntityUriLink_1 = __importDefault(require("../../EntityUriLink/EntityUriLink"));
48
46
  var PivotingUriLink_1 = __importDefault(require("../../PivotingUriLink/PivotingUriLink"));
49
47
  var hooks_1 = require("../../../hooks");
48
+ var contexts_1 = require("../../../contexts");
50
49
  var styles_1 = require("./styles");
51
50
  var MAX_ENTITIES_PIVOTING_TOOLTIP = 6;
52
51
  var PivotingTooltipContent = function (_a) {
53
52
  var value = _a.value, attributeType = _a.attributeType, _b = _a.config, config = _b === void 0 ? {} : _b, generatedValue = _a.generatedValue, onSeeAllClick = _a.onSeeAllClick;
54
53
  var _c = (0, react_1.useState)([]), entities = _c[0], setEntities = _c[1];
55
54
  var _d = (0, react_1.useState)(0), total = _d[0], setTotal = _d[1];
56
- var entity = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getEntity) || {};
57
55
  var safePromise = (0, hooks_1.useSafePromise)();
58
56
  var styles = (0, styles_1.useStyles)();
59
- var globalSearchRequestOptions = (0, react_redux_1.useSelector)(mdm_module_1.default.selectors.getGlobalSearchRequestOptions) || {};
57
+ var entity = (0, contexts_1.useMdmEntity)() || {};
58
+ var globalSearchRequestOptions = (0, contexts_1.useMdmGlobalSearchRequestOptions)() || {};
60
59
  var entityType = config.entityType || entity.type;
61
60
  var shouldShowSeeAllButton = total > MAX_ENTITIES_PIVOTING_TOOLTIP;
62
61
  (0, react_1.useEffect)(function () {
@@ -1,2 +1,2 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"content" | "title" | "icon" | "entityLabel" | "body" | "entityTypeLabel" | "footer" | "header" | "container" | "divider" | "headerCount" | "profileIcon" | "entityContainer" | "seeAllButton">;
1
+ export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"content" | "icon" | "entityLabel" | "title" | "body" | "entityTypeLabel" | "footer" | "header" | "container" | "divider" | "headerCount" | "profileIcon" | "entityContainer" | "seeAllButton">;
2
2
  export declare const usePivotingTooltipStyles: (props?: any) => import("@mui/styles").ClassNameMap<"tooltip" | "arrow">;
@@ -29,7 +29,7 @@ var react_1 = __importDefault(require("react"));
29
29
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
30
30
  var SimpleAttributeEditor_1 = __importDefault(require("../SimpleAttributeEditor/SimpleAttributeEditor"));
31
31
  var NestedAttribute_1 = __importDefault(require("../NestedAttribute/NestedAttribute"));
32
- var ReferenceAttribute_1 = __importDefault(require("../ReferenceAttribute"));
32
+ var ReferenceAttribute_1 = __importDefault(require("../ReferenceAttribute/ReferenceAttribute"));
33
33
  var EditModeAttributesFactory = /** @class */ (function () {
34
34
  function EditModeAttributesFactory() {
35
35
  }
@@ -1,9 +1,14 @@
1
1
  import React from 'react';
2
- import { AttributeValue, NestedAttributeValue, ReferenceAttributeValue, SimpleAttributeValue } from '@reltio/mdm-sdk';
3
- import { AttributePagerProps } from './index';
2
+ import { AttributeValue, NestedAttributeValue, ReferenceAttributeValue, SimpleAttributeValue, AttributeError, RequestNextPageOfAttributeValuesPayload } from '@reltio/mdm-sdk';
3
+ import { AttributePagerProps } from './types';
4
4
  type Props = Omit<AttributePagerProps, 'values'> & {
5
5
  values?: (SimpleAttributeValue | NestedAttributeValue | ReferenceAttributeValue)[];
6
6
  nonVisibleValues: AttributeValue[];
7
+ errorMessage?: string;
8
+ errors?: AttributeError[];
9
+ max?: number;
10
+ onDeactivateError?: (id: string) => void;
11
+ requestNextPageOfAttributeValues?: (payload: RequestNextPageOfAttributeValuesPayload) => void;
7
12
  };
8
13
  declare const _default: React.MemoExoticComponent<{
9
14
  ({ max, values, attributeType, parentUri, mode, drawLines, showEmptyEditors, errorMessage, errors, paging, crosswalks, showNonOv, nonVisibleValues, highlightedError, highlightedAttribute, onAddAttributes, onDeleteAttribute, onChangeAttribute, onDeactivateError, additionalControlsRenderer, requestNextPageOfAttributeValues }: Props): JSX.Element;
@@ -1,40 +1,4 @@
1
1
  import React from 'react';
2
- import { AttributeError, AttributeType, Mode, NestedAttributeValue, ReferenceAttributeValue, SimpleAttributeValue } from '@reltio/mdm-sdk';
3
- declare const _default: React.ComponentType<{
4
- errorMessage: string;
5
- errors: AttributeError[];
6
- max: number;
7
- } & {
8
- onDeactivateError: (id: string) => void;
9
- requestNextPageOfAttributeValues: (payload: import("@reltio/mdm-module").RequestNextPageOfAttributeValuesPayload) => void;
10
- } & {
11
- values: (string | number | SimpleAttributeValue | NestedAttributeValue | ReferenceAttributeValue | import("@reltio/mdm-sdk").ImageAttributeValue)[];
12
- attributeType: AttributeType;
13
- paging?: import("@reltio/mdm-sdk").Paging;
14
- mode?: Mode;
15
- crosswalks?: import("@reltio/mdm-sdk").Crosswalk[];
16
- parentUri: string;
17
- drawLines: boolean;
18
- max?: number;
19
- showEmptyEditors: boolean;
20
- showNonOv?: boolean;
21
- onAddAttributes: (params: import("@reltio/mdm-sdk").AttributeItem[]) => void;
22
- onDeleteAttribute: (param: import("@reltio/mdm-sdk").AttributeItem) => void;
23
- onChangeAttribute: (param: import("@reltio/mdm-sdk").AttributeItem) => void;
24
- additionalControlsRenderer?: (props: any) => JSX.Element;
25
- highlightedError?: {
26
- element: unknown;
27
- type: import("../../../../contexts").ScrollType;
28
- highlightError?: (element: unknown) => void;
29
- highlightAttribute?: (element: unknown) => void;
30
- scrollIntoRef: (ref: React.MutableRefObject<HTMLDivElement>) => void;
31
- };
32
- highlightedAttribute?: {
33
- element: unknown;
34
- type: import("../../../../contexts").ScrollType;
35
- highlightError?: (element: unknown) => void;
36
- highlightAttribute?: (element: unknown) => void;
37
- scrollIntoRef: (ref: React.MutableRefObject<HTMLDivElement>) => void;
38
- };
39
- }>;
2
+ import { AttributePagerProps } from './types';
3
+ declare const _default: React.ComponentType<AttributePagerProps>;
40
4
  export default _default;
@@ -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;