@reltio/potential-matches 1.4.1586-mui5 → 1.4.1586-mui5-2

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 (245) hide show
  1. package/package.json +21 -38
  2. package/index.ts +0 -1
  3. package/public/package.json +0 -22
  4. package/scripts/build/index.js +0 -21
  5. package/src/PotentialMatchesView/PotentialMatchesView.tsx +0 -106
  6. package/src/PotentialMatchesView/__tests__/PotentialMatchesView.test.tsx +0 -175
  7. package/src/PotentialMatchesView/components/Actions/CreateRelationButton.tsx +0 -48
  8. package/src/PotentialMatchesView/components/Actions/DcrReviewButton.tsx +0 -45
  9. package/src/PotentialMatchesView/components/Actions/MergeButton.tsx +0 -46
  10. package/src/PotentialMatchesView/components/Actions/NotMatchButton.tsx +0 -45
  11. package/src/PotentialMatchesView/components/Actions/ReinstateMatchButton.tsx +0 -47
  12. package/src/PotentialMatchesView/components/Actions/SetAMatchButton.tsx +0 -42
  13. package/src/PotentialMatchesView/components/Actions/__tests__/CreateRelationButton.test.tsx +0 -58
  14. package/src/PotentialMatchesView/components/Actions/__tests__/DcrReviewButton.test.tsx +0 -163
  15. package/src/PotentialMatchesView/components/Actions/__tests__/MergeButton.test.tsx +0 -134
  16. package/src/PotentialMatchesView/components/Actions/__tests__/NotMatchButton.test.tsx +0 -126
  17. package/src/PotentialMatchesView/components/Actions/__tests__/ReinstateMatchButton.test.tsx +0 -163
  18. package/src/PotentialMatchesView/components/Actions/__tests__/SetAMatchButton.test.tsx +0 -105
  19. package/src/PotentialMatchesView/components/Actions/icons/addRelationship.svg +0 -14
  20. package/src/PotentialMatchesView/components/Actions/icons/comparisonViewIcon.svg +0 -14
  21. package/src/PotentialMatchesView/components/Actions/icons/dcrReview.svg +0 -14
  22. package/src/PotentialMatchesView/components/Actions/icons/merge.svg +0 -13
  23. package/src/PotentialMatchesView/components/Actions/icons/notMatch.svg +0 -14
  24. package/src/PotentialMatchesView/components/Actions/icons/setAsMatch.svg +0 -5
  25. package/src/PotentialMatchesView/components/Actions/index.ts +0 -10
  26. package/src/PotentialMatchesView/components/ActionsPanel/ActionsPanel.tsx +0 -71
  27. package/src/PotentialMatchesView/components/ActionsPanel/MenuItemRenderer.tsx +0 -16
  28. package/src/PotentialMatchesView/components/ActionsPanel/__tests__/ActionPanel.test.tsx +0 -99
  29. package/src/PotentialMatchesView/components/ActionsPanel/__tests__/MenuItemRenderer.spec.tsx +0 -29
  30. package/src/PotentialMatchesView/components/AddRelationDialog/AddRelationDialog.tsx +0 -203
  31. package/src/PotentialMatchesView/components/AddRelationDialog/__tests__/AddRelationDialog.test.tsx +0 -465
  32. package/src/PotentialMatchesView/components/AddRelationDialog/styles.ts +0 -31
  33. package/src/PotentialMatchesView/components/ChangeModeConfirmation/ChangeModeConfirmation.tsx +0 -38
  34. package/src/PotentialMatchesView/components/ChangeModeConfirmation/TableIcon.svg +0 -9
  35. package/src/PotentialMatchesView/components/ChangeModeConfirmation/__tests__/ChangeModeConfirmation.test.tsx +0 -85
  36. package/src/PotentialMatchesView/components/ChangeModeConfirmation/index.ts +0 -1
  37. package/src/PotentialMatchesView/components/ChangeModeConfirmation/styles.ts +0 -13
  38. package/src/PotentialMatchesView/components/ComparisonTable/AddRowPopups/AddRowPopups.tsx +0 -93
  39. package/src/PotentialMatchesView/components/ComparisonTable/AddRowPopups/ConfigRowPopup.tsx +0 -48
  40. package/src/PotentialMatchesView/components/ComparisonTable/AddRowPopups/__tests__/AddRowPopups.specs.tsx +0 -167
  41. package/src/PotentialMatchesView/components/ComparisonTable/AddRowPopups/__tests__/ConfigRowPopup.spec.tsx +0 -59
  42. package/src/PotentialMatchesView/components/ComparisonTable/AddRowPopups/helpers.ts +0 -17
  43. package/src/PotentialMatchesView/components/ComparisonTable/AddRowPopups/index.ts +0 -1
  44. package/src/PotentialMatchesView/components/ComparisonTable/ComparisonTable.tsx +0 -236
  45. package/src/PotentialMatchesView/components/ComparisonTable/ExpandedContext.ts +0 -13
  46. package/src/PotentialMatchesView/components/ComparisonTable/HoveredEntityContext.ts +0 -11
  47. package/src/PotentialMatchesView/components/ComparisonTable/WorkflowTasksAvailabilityContext.ts +0 -7
  48. package/src/PotentialMatchesView/components/ComparisonTable/__tests__/ComparisonTable.test.tsx +0 -987
  49. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/AttributesRenderer.tsx +0 -40
  50. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/ComplexAttributesHeadRenderer.tsx +0 -28
  51. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/CrosswalksRenderer/CrosswalksRenderer.tsx +0 -60
  52. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/CrosswalksRenderer/LabelRenderer.tsx +0 -31
  53. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/CrosswalksRenderer/__tests__/CrosswalksRenderer.spec.tsx +0 -91
  54. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/CrosswalksRenderer/__tests__/LabelRenderer.spec.tsx +0 -58
  55. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/CrosswalksRenderer/styles.ts +0 -18
  56. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/EntityCard/EntityCard.tsx +0 -72
  57. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/EntityCard/__tests__/EntityCard.spec.tsx +0 -133
  58. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/EntityCard/styles.ts +0 -51
  59. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/HeadCellRenderer/HeadCellRenderer.tsx +0 -32
  60. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/HeadCellRenderer/__tests__/HeadCellRenderer.test.tsx +0 -50
  61. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/HeadCellRenderer/index.ts +0 -1
  62. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/HeadCellRenderer/styles.ts +0 -22
  63. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/MatchMethod/MatchMethod.tsx +0 -14
  64. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/MatchMethod/__tests__/MatchMethod.spec.tsx +0 -65
  65. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/MatchedValuesCounter/MatchedValuesCounter.tsx +0 -24
  66. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/MatchedValuesCounter/__tests__/MatchedValuesCounter.spec.tsx +0 -71
  67. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/MatchedValuesCounter/styles.ts +0 -18
  68. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/WorkflowCardRenderer/WorkflowCardRenderer.tsx +0 -18
  69. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/WorkflowCardRenderer/__tests__/WorkflowCardRenderer.spec.tsx +0 -15
  70. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/__tests__/AttributesRenderer.spec.tsx +0 -66
  71. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/__tests__/ComplexAttributesHeadRenderer.spec.tsx +0 -79
  72. package/src/PotentialMatchesView/components/ComparisonTable/cell-renderers/styles.ts +0 -37
  73. package/src/PotentialMatchesView/components/ComparisonTable/helpers/__tests__/tableHelper.spec.ts +0 -416
  74. package/src/PotentialMatchesView/components/ComparisonTable/helpers/attributesHelpers.ts +0 -12
  75. package/src/PotentialMatchesView/components/ComparisonTable/helpers/tableHelpers.ts +0 -256
  76. package/src/PotentialMatchesView/components/ComparisonTable/index.ts +0 -1
  77. package/src/PotentialMatchesView/components/ComparisonTable/styles.ts +0 -101
  78. package/src/PotentialMatchesView/components/ComparisonTable/withExpanded.tsx +0 -22
  79. package/src/PotentialMatchesView/components/ComparisonView/ComparisonView.tsx +0 -56
  80. package/src/PotentialMatchesView/components/ComparisonView/__tests__/ComparisonView.specs.tsx +0 -34
  81. package/src/PotentialMatchesView/components/ComparisonView/index.ts +0 -1
  82. package/src/PotentialMatchesView/components/ComparisonView/styles.ts +0 -11
  83. package/src/PotentialMatchesView/components/ComparisonViewModeSwitcher/ComparisonViewModeSwitcher.tsx +0 -67
  84. package/src/PotentialMatchesView/components/ComparisonViewModeSwitcher/__tests__/ComparisonViewModeSwitcher.spec.tsx +0 -93
  85. package/src/PotentialMatchesView/components/ComparisonViewModeSwitcher/styles.ts +0 -12
  86. package/src/PotentialMatchesView/components/Content/Content.tsx +0 -63
  87. package/src/PotentialMatchesView/components/Content/__tests__/Content.test.tsx +0 -120
  88. package/src/PotentialMatchesView/components/Content/index.ts +0 -1
  89. package/src/PotentialMatchesView/components/FindMatchesView/FindMatchesView.tsx +0 -220
  90. package/src/PotentialMatchesView/components/FindMatchesView/RightSideSearch/RightSideSearch.tsx +0 -58
  91. package/src/PotentialMatchesView/components/FindMatchesView/RightSideSearch/__tests__/RightSideSearch.test.tsx +0 -82
  92. package/src/PotentialMatchesView/components/FindMatchesView/RightSideSearch/styles.ts +0 -16
  93. package/src/PotentialMatchesView/components/FindMatchesView/__tests__/FindMatchesView.test.tsx +0 -846
  94. package/src/PotentialMatchesView/components/FindMatchesView/index.ts +0 -1
  95. package/src/PotentialMatchesView/components/FindMatchesView/styles.ts +0 -10
  96. package/src/PotentialMatchesView/components/ItemRenderer/ItemRenderer.tsx +0 -139
  97. package/src/PotentialMatchesView/components/ItemRenderer/__tests__/ItemRenderer.test.tsx +0 -143
  98. package/src/PotentialMatchesView/components/ItemRenderer/index.ts +0 -1
  99. package/src/PotentialMatchesView/components/ItemRenderer/styles.ts +0 -132
  100. package/src/PotentialMatchesView/components/MatchControls/MatchControls.tsx +0 -124
  101. package/src/PotentialMatchesView/components/MatchControls/__tests__/MatchControls.spec.tsx +0 -372
  102. package/src/PotentialMatchesView/components/MatchItems/MatchItems.tsx +0 -55
  103. package/src/PotentialMatchesView/components/MatchItems/__tests__/MatchItems.test.tsx +0 -119
  104. package/src/PotentialMatchesView/components/MatchItems/index.ts +0 -1
  105. package/src/PotentialMatchesView/components/MatchItems/styles.ts +0 -12
  106. package/src/PotentialMatchesView/components/MatchReviewTable/MatchReviewTable.tsx +0 -169
  107. package/src/PotentialMatchesView/components/MatchReviewTable/__tests__/MatchReviewTable.test.tsx +0 -747
  108. package/src/PotentialMatchesView/components/MatchReviewTable/helpers/helpers.ts +0 -12
  109. package/src/PotentialMatchesView/components/MatchReviewTable/styles.ts +0 -8
  110. package/src/PotentialMatchesView/components/MatchesTable/EntityRowCollapseContext.tsx +0 -7
  111. package/src/PotentialMatchesView/components/MatchesTable/MatchesTable.tsx +0 -347
  112. package/src/PotentialMatchesView/components/MatchesTable/__tests__/IntegrationMatchesTable.test.tsx +0 -191
  113. package/src/PotentialMatchesView/components/MatchesTable/__tests__/MatchesTable.test.tsx +0 -410
  114. package/src/PotentialMatchesView/components/MatchesTable/__tests__/data/metadata.data.ts +0 -26
  115. package/src/PotentialMatchesView/components/MatchesTable/__tests__/data/store.data.ts +0 -13
  116. package/src/PotentialMatchesView/components/MatchesTable/__tests__/dataHelpers.test.ts +0 -280
  117. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/BlobRenderer.tsx +0 -20
  118. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/CommonRowCellRenderer.tsx +0 -52
  119. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/DefaultCellValueRenderer.tsx +0 -26
  120. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/EntityProfileRenderer.tsx +0 -101
  121. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/HeadCellRenderer.tsx +0 -19
  122. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/ImageRenderer.tsx +0 -22
  123. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/MatchRulesRenderer.tsx +0 -35
  124. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/ProfileHeadCellRenderer.tsx +0 -22
  125. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/ReferenceRenderer.tsx +0 -35
  126. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/RelevanceScoreRenderer.tsx +0 -22
  127. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/RowCellRenderer.tsx +0 -74
  128. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/SourcesRenderer.tsx +0 -67
  129. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/__tests__/BlobRenderer.test.tsx +0 -20
  130. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/__tests__/DefaultCellValueRenderer.test.tsx +0 -33
  131. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/__tests__/EntityProfileRenderer.test.js +0 -103
  132. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/__tests__/ImageRenderer.test.js +0 -21
  133. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/__tests__/MatchRulesRenderer.test.js +0 -18
  134. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/__tests__/ProfileHeadCellRenderer.test.js +0 -21
  135. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/__tests__/ReferenceRenderer.test.js +0 -68
  136. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/__tests__/RowCellRenderer.test.tsx +0 -241
  137. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/__tests__/SourcesRenderer.test.tsx +0 -193
  138. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/__tests__/data/metadata.data.ts +0 -32
  139. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/__tests__/data/store.data.ts +0 -19
  140. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/components/RowCellChipWithTooltip.tsx +0 -78
  141. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/components/SourceChipWithTooltip.tsx +0 -56
  142. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/components/styles.ts +0 -17
  143. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/styles.ts +0 -214
  144. package/src/PotentialMatchesView/components/MatchesTable/cell-renderers/withEntityCellValue.tsx +0 -50
  145. package/src/PotentialMatchesView/components/MatchesTable/dataHelpers.ts +0 -167
  146. package/src/PotentialMatchesView/components/MatchesTable/styles.ts +0 -70
  147. package/src/PotentialMatchesView/components/MatchesView/MatchesView.tsx +0 -233
  148. package/src/PotentialMatchesView/components/MatchesView/__tests__/MatchesView.test.tsx +0 -957
  149. package/src/PotentialMatchesView/components/MatchesView/index.ts +0 -1
  150. package/src/PotentialMatchesView/components/MatchesView/styles.ts +0 -10
  151. package/src/PotentialMatchesView/components/NotMatchView/NotMatchView.tsx +0 -193
  152. package/src/PotentialMatchesView/components/NotMatchView/__tests__/NotMatchView.test.tsx +0 -618
  153. package/src/PotentialMatchesView/components/NotMatchView/index.ts +0 -1
  154. package/src/PotentialMatchesView/components/NotMatchView/styles.ts +0 -10
  155. package/src/PotentialMatchesView/components/PotentialMatchesLoadIndicator/PotentialMatchesLoadIndicator.tsx +0 -10
  156. package/src/PotentialMatchesView/components/RightSidePanel/.DS_Store +0 -0
  157. package/src/PotentialMatchesView/components/RightSidePanel/FilterSelector/FilterSelector.tsx +0 -18
  158. package/src/PotentialMatchesView/components/RightSidePanel/FilterSelector/__tests__/FilterSelector.test.tsx +0 -51
  159. package/src/PotentialMatchesView/components/RightSidePanel/MatchesAttributesFiltersButton/MatchesAttributesFiltersButton.tsx +0 -57
  160. package/src/PotentialMatchesView/components/RightSidePanel/MatchesAttributesFiltersButton/__tests__/MatchesAttributesFiltersButton.test.tsx +0 -129
  161. package/src/PotentialMatchesView/components/RightSidePanel/MatchesAttributesFiltersButton/styles.ts +0 -13
  162. package/src/PotentialMatchesView/components/RightSidePanel/RightSidePanel.tsx +0 -52
  163. package/src/PotentialMatchesView/components/RightSidePanel/ValuesEditor/ValuesEditor.tsx +0 -59
  164. package/src/PotentialMatchesView/components/RightSidePanel/ValuesEditor/__tests__/ValuesEditor.test.tsx +0 -134
  165. package/src/PotentialMatchesView/components/RightSidePanel/ValuesEditor/styles.ts +0 -11
  166. package/src/PotentialMatchesView/components/RightSidePanel/__tests__/.DS_Store +0 -0
  167. package/src/PotentialMatchesView/components/RightSidePanel/__tests__/IntegrationRightSidePanel.test.tsx +0 -137
  168. package/src/PotentialMatchesView/components/RightSidePanel/__tests__/RightSidePanel.test.tsx +0 -62
  169. package/src/PotentialMatchesView/components/RightSidePanel/icons/find-matches-icon.svg +0 -5
  170. package/src/PotentialMatchesView/components/RightSidePanel/icons/not-a-match-icon.svg +0 -3
  171. package/src/PotentialMatchesView/components/RightSidePanel/icons/potential-matches-icon.svg +0 -4
  172. package/src/PotentialMatchesView/components/RightSidePanel/styles.ts +0 -12
  173. package/src/PotentialMatchesView/components/RightSidePanelHeader/RightSidePanelHeader.tsx +0 -87
  174. package/src/PotentialMatchesView/components/RightSidePanelHeader/__tests__/RightSidePanelHeader.test.tsx +0 -111
  175. package/src/PotentialMatchesView/components/RightSidePanelHeader/index.ts +0 -1
  176. package/src/PotentialMatchesView/components/RightSidePanelHeader/styles.ts +0 -29
  177. package/src/PotentialMatchesView/components/SortingFieldSelector/SortingFieldSelector.tsx +0 -66
  178. package/src/PotentialMatchesView/components/SortingFieldSelector/__tests__/SortingFieldSelector.test.tsx +0 -92
  179. package/src/PotentialMatchesView/components/SortingFieldSelector/index.ts +0 -1
  180. package/src/PotentialMatchesView/components/SortingFieldSelector/styles.ts +0 -10
  181. package/src/PotentialMatchesView/components/TableHeader/TableHeader.tsx +0 -143
  182. package/src/PotentialMatchesView/components/TableHeader/__tests__/TableHeader.test.tsx +0 -427
  183. package/src/PotentialMatchesView/components/TableHeader/styles.ts +0 -36
  184. package/src/PotentialMatchesView/components/WorkflowCard/WorkflowCard.tsx +0 -68
  185. package/src/PotentialMatchesView/components/WorkflowCard/__tests__/WorkflowCard.spec.tsx +0 -131
  186. package/src/PotentialMatchesView/components/WorkflowCard/__tests__/data/store.data.ts +0 -26
  187. package/src/PotentialMatchesView/components/WorkflowCard/__tests__/data/tasks.data.ts +0 -20
  188. package/src/PotentialMatchesView/components/WorkflowCard/index.ts +0 -1
  189. package/src/PotentialMatchesView/components/WorkflowCard/styles.ts +0 -15
  190. package/src/PotentialMatchesView/components/cell-renderers/RelevanceScoreRenderer/RelevanceScoreRenderer.tsx +0 -16
  191. package/src/PotentialMatchesView/components/cell-renderers/RelevanceScoreRenderer/styles.ts +0 -7
  192. package/src/PotentialMatchesView/components/cell-renderers/SourcesRenderer/SourcesRenderer.tsx +0 -27
  193. package/src/PotentialMatchesView/components/cell-renderers/SourcesRenderer/__tests__/SourcesRenderer.spec.tsx +0 -58
  194. package/src/PotentialMatchesView/components/cell-renderers/SourcesRenderer/styles.ts +0 -13
  195. package/src/PotentialMatchesView/constants/defaultOptions.ts +0 -3
  196. package/src/PotentialMatchesView/constants/defaultRows.ts +0 -71
  197. package/src/PotentialMatchesView/constants/views.ts +0 -12
  198. package/src/PotentialMatchesView/constants/workflow.ts +0 -1
  199. package/src/PotentialMatchesView/contexts/ColumnHandlerContext/index.ts +0 -6
  200. package/src/PotentialMatchesView/contexts/ColumnsDataContext/index.ts +0 -9
  201. package/src/PotentialMatchesView/contexts/ReloadDataContext/__tests__/ReloadDataContext.spec.tsx +0 -37
  202. package/src/PotentialMatchesView/contexts/ReloadDataContext/index.tsx +0 -47
  203. package/src/PotentialMatchesView/contexts/RightSideHeaderContext/index.ts +0 -12
  204. package/src/PotentialMatchesView/contexts/ViewStateContext/__tests__/ViewStateContext.spec.tsx +0 -383
  205. package/src/PotentialMatchesView/contexts/ViewStateContext/index.tsx +0 -175
  206. package/src/PotentialMatchesView/helpers/__tests__/attributesHelpers.test.ts +0 -135
  207. package/src/PotentialMatchesView/helpers/__tests__/relationsHelpers.test.ts +0 -68
  208. package/src/PotentialMatchesView/helpers/__tests__/sortHelpers.test.ts +0 -54
  209. package/src/PotentialMatchesView/helpers/attributesHelpers.ts +0 -112
  210. package/src/PotentialMatchesView/helpers/relationsHelpers.ts +0 -65
  211. package/src/PotentialMatchesView/helpers/sortHelpers.ts +0 -88
  212. package/src/PotentialMatchesView/hooks/__tests__/useAddRelationDialog.spec.tsx +0 -106
  213. package/src/PotentialMatchesView/hooks/__tests__/useEntityColor.test.tsx +0 -45
  214. package/src/PotentialMatchesView/hooks/__tests__/useFirstPotentialMathces.test.tsx +0 -127
  215. package/src/PotentialMatchesView/hooks/helpers/stateReducer.ts +0 -24
  216. package/src/PotentialMatchesView/hooks/useAddRelationDialog.tsx +0 -51
  217. package/src/PotentialMatchesView/hooks/useEntityColor.tsx +0 -9
  218. package/src/PotentialMatchesView/hooks/useFindEntities.ts +0 -107
  219. package/src/PotentialMatchesView/hooks/useFirstPotentialMatches.ts +0 -42
  220. package/src/PotentialMatchesView/hooks/useMatches.ts +0 -47
  221. package/src/PotentialMatchesView/hooks/useMatchesColumnData.tsx +0 -39
  222. package/src/PotentialMatchesView/hooks/useMatchesReducer.ts +0 -20
  223. package/src/PotentialMatchesView/hooks/useNotMatches.ts +0 -95
  224. package/src/PotentialMatchesView/hooks/usePotentialMatchesRightSidePanelElements.tsx +0 -189
  225. package/src/PotentialMatchesView/hooks/useReinstateMatch.ts +0 -44
  226. package/src/PotentialMatchesView/hooks/useRequestDCRReview.tsx +0 -52
  227. package/src/PotentialMatchesView/hooks/useSetAMatch.ts +0 -31
  228. package/src/PotentialMatchesView/hooks/useSortOptions.ts +0 -26
  229. package/src/PotentialMatchesView/hooks/useSpinnerAndReloadData.ts +0 -17
  230. package/src/PotentialMatchesView/hooks/useWorkflowTasks.ts +0 -75
  231. package/src/PotentialMatchesView/hooks/useWorkflowTasksAvailability.ts +0 -21
  232. package/src/PotentialMatchesView/styles.ts +0 -34
  233. package/src/PotentialMatchesView/types/potentialMatchesTypes.ts +0 -100
  234. package/src/PotentialMatchesView/utils/errors.ts +0 -28
  235. package/src/__tests__/IntegrationPotentialMatchesPerspective.test.tsx +0 -265
  236. package/src/__tests__/PotentialMatchesView.test.tsx +0 -86
  237. package/src/__tests__/data/entity.data.ts +0 -17
  238. package/src/__tests__/data/metadata.data.ts +0 -55
  239. package/src/__tests__/data/store.data.ts +0 -38
  240. package/src/__tests__/data/transitiveMatches.data.ts +0 -93
  241. package/src/index.tsx +0 -56
  242. package/tsconfig.json +0 -4
  243. package/webpack.config.js +0 -10
  244. /package/{public/bundle.js → bundle.js} +0 -0
  245. /package/{public/bundle.js.LICENSE.txt → bundle.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,39 +1,22 @@
1
1
  {
2
- "name": "@reltio/potential-matches",
3
- "version": "1.4.1586-mui5",
4
- "description": "",
5
- "main": "index.ts",
6
- "author": "",
7
- "license": "SEE LICENSE IN LICENSE FILE",
8
- "scripts": {
9
- "build": "cross-env NODE_ENV=production webpack && node ./scripts/build",
10
- "postinstall": "cross-env NODE_ENV=production webpack",
11
- "prepublishOnly": "npm run build",
12
- "watch": "webpack -w",
13
- "dev": "webpack serve",
14
- "test": "tsc && jest --config=../../jest.config.js",
15
- "test:ci": "tsc && jest --config=../../jest.config.js --maxWorkers=50%",
16
- "i18n": "ui-i18n bundle --src=./src/**/*.js --out=./baseline.json",
17
- "analyze": "cross-env NODE_ENV=production webpack --analyze"
18
- },
19
- "publishConfig": {
20
- "access": "public"
21
- },
22
- "dependencies": {
23
- "@date-io/moment": "^1.3.5",
24
- "@reltio/mdm-module": "^1.4.1586-mui5",
25
- "@reltio/mdm-sdk": "^1.4.1586-mui5",
26
- "classnames": "^2.2.5",
27
- "memoize-one": "^5.1.0",
28
- "prop-types": "^15.6.2",
29
- "ramda": "^0.28.0",
30
- "react-redux": "^7.2.3",
31
- "react-resize-detector": "^4.2.0",
32
- "redux": "^4.1.2",
33
- "ui-i18n": "bitbucket:reltio-ondemand/ui-i18n#v1.4.0"
34
- },
35
- "devDependencies": {
36
- "@reltio/components": "^1.4.1586-mui5"
37
- },
38
- "gitHead": "746e04a2ebbd1e190caf6e7b504eede0fd54d100"
39
- }
2
+ "name": "@reltio/potential-matches",
3
+ "version": "1.4.1586-mui5-2",
4
+ "license": "SEE LICENSE IN LICENSE FILE",
5
+ "main": "bundle.js",
6
+ "dependencies": {
7
+ "@date-io/moment": "^1.3.5",
8
+ "@reltio/mdm-module": "^1.4.1586-mui5-2",
9
+ "@reltio/mdm-sdk": "^1.4.1586-mui5-2",
10
+ "classnames": "^2.2.5",
11
+ "memoize-one": "^5.1.0",
12
+ "prop-types": "^15.6.2",
13
+ "ramda": "^0.28.0",
14
+ "react-redux": "^7.2.3",
15
+ "react-resize-detector": "^4.2.0",
16
+ "redux": "^4.1.2",
17
+ "ui-i18n": "bitbucket:reltio-ondemand/ui-i18n#v1.4.0"
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ }
22
+ }
package/index.ts DELETED
@@ -1 +0,0 @@
1
- export {default as PotentialMatchesView} from './src/index';
@@ -1,22 +0,0 @@
1
- {
2
- "name": "@reltio/potential-matches",
3
- "version": "1.4.1586-mui5",
4
- "license": "SEE LICENSE IN LICENSE FILE",
5
- "main": "bundle.js",
6
- "dependencies": {
7
- "@date-io/moment": "^1.3.5",
8
- "@reltio/mdm-module": "^1.4.1586-mui5",
9
- "@reltio/mdm-sdk": "^1.4.1586-mui5",
10
- "classnames": "^2.2.5",
11
- "memoize-one": "^5.1.0",
12
- "prop-types": "^15.6.2",
13
- "ramda": "^0.28.0",
14
- "react-redux": "^7.2.3",
15
- "react-resize-detector": "^4.2.0",
16
- "redux": "^4.1.2",
17
- "ui-i18n": "bitbucket:reltio-ondemand/ui-i18n#v1.4.0"
18
- },
19
- "publishConfig": {
20
- "access": "public"
21
- }
22
- }
@@ -1,21 +0,0 @@
1
- const path = require('path');
2
- const fs = require('fs');
3
-
4
- const outputDir = path.resolve(process.cwd(), 'public');
5
-
6
- const generatePackageJson = () => {
7
- const packageJson = require('../../package.json');
8
- const result = {
9
- name: packageJson.name,
10
- version: packageJson.version,
11
- license: 'SEE LICENSE IN LICENSE FILE',
12
- main: 'bundle.js',
13
- dependencies: packageJson.dependencies,
14
- peerDependencies: packageJson.peerDependencies,
15
- publishConfig: packageJson.publishConfig
16
- };
17
- const source = JSON.stringify(result, null, 2);
18
- fs.writeFileSync(path.join(outputDir, 'package.json'), source);
19
- };
20
-
21
- generatePackageJson();
@@ -1,106 +0,0 @@
1
- import React, {useCallback, useEffect, useRef} from 'react';
2
- import {useSelector} from 'react-redux';
3
- import mdm from '@reltio/mdm-module';
4
- import {equals, pluck} from 'ramda';
5
- import {
6
- useSnackbar,
7
- SnackbarContext,
8
- useSavedStateForEntityType,
9
- ScreenProfileBand,
10
- ProfileResizablePanes,
11
- RightPanelTab
12
- } from '@reltio/components';
13
- import {Entity, PotentialMatchesPerspectiveConfig, SearchFilter, SortingField} from '@reltio/mdm-sdk';
14
- import {RightSidePanel} from './components/RightSidePanel/RightSidePanel';
15
- import {MatchReviewTable} from './components/MatchReviewTable/MatchReviewTable';
16
- import {ViewStateProvider} from './contexts/ViewStateContext';
17
- import {ReloadDataProvider} from './contexts/ReloadDataContext';
18
- import {MatchesOptions, PotentialMatchesSavedState} from './types/potentialMatchesTypes';
19
- import {ChangeModeConfirmation} from './components/ChangeModeConfirmation';
20
- import {useStyles} from './styles';
21
- import {usePotentialMatchesRightSidePanelElements} from './hooks/usePotentialMatchesRightSidePanelElements';
22
- import PotentialMatchesLoadIndicator from './components/PotentialMatchesLoadIndicator/PotentialMatchesLoadIndicator';
23
-
24
- const perspectiveId = 'potentialMatches';
25
-
26
- export type PMRightPanelTabs = Array<
27
- RightPanelTab & {
28
- filters: SearchFilter[];
29
- options?: MatchesOptions;
30
- sorting: SortingField;
31
- onSorting: (value: SortingField) => void;
32
- }
33
- >;
34
-
35
- type Props = {
36
- config: PotentialMatchesPerspectiveConfig;
37
- saveState: (state: Record<string, PotentialMatchesSavedState>) => void;
38
- getSavedState: () => Promise<Record<string, PotentialMatchesSavedState>>;
39
- };
40
-
41
- export const PotentialMatchesView = ({config, getSavedState, saveState}: Props) => {
42
- const styles = useStyles();
43
- const entity: Entity = useSelector(mdm.selectors.getEntity);
44
- const {SnackbarRenderer, showSnackbarMessage} = useSnackbar();
45
- const lastSavedState = useRef<PotentialMatchesSavedState>();
46
-
47
- const {isLoaded, savedState, updateSavedState} = useSavedStateForEntityType<PotentialMatchesSavedState>({
48
- getSavedState,
49
- saveState,
50
- entityTypeUri: entity.type
51
- });
52
-
53
- const {tabs} = usePotentialMatchesRightSidePanelElements();
54
-
55
- useEffect(() => {
56
- if (!isLoaded) return;
57
- lastSavedState.current = savedState || {};
58
- }, [isLoaded, savedState]); // eslint-disable-line
59
-
60
- const onUpdateSavedState = useCallback(
61
- (stateToSave = {}) => {
62
- if (!lastSavedState.current) return;
63
- const newSavedState = {...lastSavedState.current, ...stateToSave};
64
- if (!equals(newSavedState, lastSavedState.current)) {
65
- updateSavedState(newSavedState);
66
- lastSavedState.current = newSavedState;
67
- }
68
- },
69
- [updateSavedState]
70
- );
71
-
72
- return (
73
- <ViewStateProvider>
74
- <ReloadDataProvider>
75
- <SnackbarContext.Provider value={showSnackbarMessage}>
76
- <div className={styles.perspectiveView}>
77
- <PotentialMatchesLoadIndicator />
78
- {entity?.uri && (
79
- <>
80
- <div className={styles.potentialMatchesContainer}>
81
- <ProfileResizablePanes
82
- buttonsProps={pluck('buttonProps', tabs)}
83
- perspectiveId={perspectiveId}
84
- >
85
- <div className={styles.potentialMatchesWrapper}>
86
- <ScreenProfileBand entity={entity} />
87
- <MatchReviewTable
88
- config={config}
89
- isLoaded={isLoaded}
90
- savedState={savedState}
91
- onUpdateSavedState={onUpdateSavedState}
92
- />
93
- </div>
94
- <RightSidePanel tabs={tabs} config={config} />
95
- </ProfileResizablePanes>
96
- </div>
97
- <SnackbarRenderer />
98
- <ChangeModeConfirmation />
99
- </>
100
- )}
101
- </div>
102
- </SnackbarContext.Provider>
103
- </ReloadDataProvider>
104
- </ViewStateProvider>
105
- );
106
- };
@@ -1,175 +0,0 @@
1
- import React from 'react';
2
- import {shallow} from 'enzyme';
3
- import * as reactRedux from 'react-redux';
4
- import * as components from '@reltio/components';
5
- import {ScreenProfileBand} from '@reltio/components';
6
- import {Entity} from '@reltio/mdm-sdk';
7
- import {PotentialMatchesView} from '../PotentialMatchesView';
8
- import {RightSidePanel} from '../components/RightSidePanel/RightSidePanel';
9
- import {MatchReviewTable} from '../components/MatchReviewTable/MatchReviewTable';
10
- import {ChangeModeConfirmation} from '../components/ChangeModeConfirmation';
11
- import {ViewStateProvider} from '../contexts/ViewStateContext';
12
-
13
- const SnackbarComponent = () => <div />;
14
-
15
- jest.mock('../components/MatchReviewTable/MatchReviewTable', () => ({
16
- MatchReviewTable: () => null
17
- }));
18
- jest.mock('../components/RightSidePanel/RightSidePanel', () => ({
19
- RightSidePanel: () => null
20
- }));
21
-
22
- jest.mock('@reltio/components', () => ({
23
- ...(jest.requireActual('@reltio/components') as Record<string, unknown>),
24
- useSnackbar: jest.fn().mockReturnValue({
25
- SnackbarRenderer: SnackbarComponent,
26
- showSnackbarMessage: jest.fn()
27
- }),
28
- useSavedStateForEntityType: jest.fn(),
29
- ScreenProfileBand: jest.fn(() => null)
30
- }));
31
-
32
- type CreateStoreProps = {
33
- entity?: Entity;
34
- };
35
- const createStore = ({entity}: CreateStoreProps = {}) => {
36
- const defaultEntity = {
37
- uri: 'entities/uri1',
38
- type: 'configuration/entityTypes/HCO'
39
- };
40
-
41
- return {
42
- tenant: {
43
- id: 't1'
44
- },
45
- metadata: {
46
- t1: {
47
- entityTypes: []
48
- }
49
- },
50
- profile: {entity: entity || defaultEntity}
51
- };
52
- };
53
-
54
- const config = {
55
- point: 'com.reltio.plugins.ui.view',
56
- id: 'com.reltio.plugins.sameas.SameAsView',
57
- class: 'com.reltio.plugins.sameas.SameAsView',
58
- 'react-class': 'com.reltio.plugins.react.ReactPotentialMatchesView',
59
- newView: true,
60
- caption: 'Same As Entities'
61
- };
62
-
63
- const getSavedState = jest.fn();
64
- const saveState = jest.fn();
65
-
66
- describe('NewPMView tests', () => {
67
- let store;
68
- const updateSavedState = jest.fn();
69
- const isLoaded = true;
70
- const savedState = {
71
- showSidePanel: true
72
- };
73
-
74
- const setUp = (customStore?, customConfig?) => {
75
- store = customStore || createStore();
76
- const conf = customConfig || config;
77
- return shallow(<PotentialMatchesView config={conf} getSavedState={getSavedState} saveState={saveState} />);
78
- };
79
-
80
- beforeAll(() => {
81
- jest.spyOn(reactRedux, 'useSelector').mockImplementation((selector) => selector(store));
82
- jest.spyOn(components, 'useSavedStateForEntityType').mockReturnValue({
83
- isLoaded,
84
- savedState,
85
- updateSavedState
86
- });
87
- });
88
-
89
- afterEach(() => {
90
- jest.clearAllMocks();
91
- });
92
-
93
- it('should not render main components if entity uri is not defined in store', () => {
94
- const component = setUp(createStore({entity: {} as Entity}));
95
- expect(component.find(ScreenProfileBand)).toHaveLength(0);
96
- expect(component.find(RightSidePanel)).toHaveLength(0);
97
- expect(component.find(MatchReviewTable)).toHaveLength(0);
98
- });
99
-
100
- it('should render main components if entity uri is defined in store', () => {
101
- const component = setUp();
102
- expect(component.find(ScreenProfileBand)).toHaveLength(1);
103
- expect(component.find(RightSidePanel)).toHaveLength(1);
104
- expect(component.find(MatchReviewTable)).toHaveLength(1);
105
- expect(component.find(SnackbarComponent)).toHaveLength(1);
106
- expect(component.find(RightSidePanel).props()).toMatchObject({
107
- config,
108
- tabs: [
109
- {
110
- buttonProps: {
111
- icon: {},
112
- id: 0,
113
- tooltipTitle: 'Potential Matches'
114
- },
115
- filters: [],
116
- headerProps: {
117
- mainTitle: 'Potential Matches'
118
- },
119
- onSorting: {},
120
- options: {
121
- showTransitiveMatches: false
122
- },
123
- sorting: {
124
- field: 'score',
125
- order: 'desc'
126
- }
127
- },
128
- {
129
- buttonProps: {
130
- icon: {},
131
- id: 1,
132
- tooltipTitle: 'Find Matches'
133
- },
134
- filters: [],
135
- headerProps: {
136
- mainTitle: 'Find Matches'
137
- },
138
- onSorting: {},
139
- sorting: {
140
- field: 'label',
141
- order: 'asc'
142
- }
143
- },
144
- {
145
- buttonProps: {
146
- icon: {},
147
- id: 2,
148
- tooltipTitle: 'Not a Match'
149
- },
150
- filters: [],
151
- headerProps: {
152
- mainTitle: 'Not a Match'
153
- },
154
- onSorting: {},
155
- sorting: {
156
- field: 'label',
157
- order: 'asc'
158
- }
159
- }
160
- ]
161
- });
162
- expect(component.find(MatchReviewTable).props()).toMatchObject({
163
- config,
164
- isLoaded,
165
- savedState
166
- });
167
- });
168
-
169
- it('should render ChangeModeConfirmation', () => {
170
- const customConfig = {...config};
171
- const component = setUp(createStore(), customConfig);
172
- expect(component.find(ChangeModeConfirmation)).toHaveLength(1);
173
- expect(component.find(ViewStateProvider)).toHaveLength(1);
174
- });
175
- });
@@ -1,48 +0,0 @@
1
- import React, {forwardRef} from 'react';
2
- import i18n from 'ui-i18n';
3
- import {ActionButton, ActionButtonMode, noop} from '@reltio/components';
4
- import {Entity} from '@reltio/mdm-sdk';
5
- import AddRelationIcon from './icons/addRelationship.svg';
6
- import {MatchesActionsPermissions} from '../../types/potentialMatchesTypes';
7
-
8
- type Props = {
9
- className?: string;
10
- mainEntity?: Entity;
11
- currentEntity?: Entity;
12
- mode?: ActionButtonMode;
13
- permission?: MatchesActionsPermissions;
14
- onMenuClose?: () => void;
15
- onClick?: (val: Pick<Props, 'mainEntity' | 'currentEntity' | 'matchRules' | 'permission'>) => void;
16
- matchRules?: string[];
17
- };
18
-
19
- export const CreateRelationButton = forwardRef<HTMLLIElement, Props>(
20
- (
21
- {
22
- className,
23
- mainEntity,
24
- currentEntity,
25
- matchRules,
26
- mode = ActionButtonMode.iconButton,
27
- onClick = noop,
28
- permission,
29
- onMenuClose = noop
30
- }: Props,
31
- ref
32
- ) => {
33
- const handleClick = () => onClick({mainEntity, currentEntity, matchRules, permission});
34
- return (
35
- <ActionButton
36
- className={className}
37
- mode={mode}
38
- label={i18n.text('Add relationship')}
39
- icon={AddRelationIcon}
40
- onClick={handleClick}
41
- onMenuClose={onMenuClose}
42
- ref={ref}
43
- />
44
- );
45
- }
46
- );
47
-
48
- CreateRelationButton.displayName = 'CreateRelationButton';
@@ -1,45 +0,0 @@
1
- import React, {forwardRef, useContext} from 'react';
2
- import {useSelector} from 'react-redux';
3
- import i18n from 'ui-i18n';
4
- import {ActionButton, ActionButtonMode, SnackbarContext, noop} from '@reltio/components';
5
- import mdmModule from '@reltio/mdm-module';
6
- import {Entity, isEmptyValue} from '@reltio/mdm-sdk';
7
- import {useRequestDCRReview} from '../../hooks/useRequestDCRReview';
8
- import DcrReviewIcon from './icons/dcrReview.svg';
9
-
10
- type Props = {
11
- className?: string;
12
- entity: Entity;
13
- entities: Entity[];
14
- mode?: ActionButtonMode;
15
- onMenuClose?: () => void;
16
- };
17
-
18
- export const DCRReviewButton = forwardRef<HTMLLIElement, Props>(
19
- ({className, entities, entity, mode = ActionButtonMode.iconButton, onMenuClose = noop}: Props, ref) => {
20
- const showSnackbarMessage = useContext(SnackbarContext);
21
- const [operationIsInProgress, startPMReview] = useRequestDCRReview({
22
- entity,
23
- entities,
24
- showSnackbarMessage
25
- });
26
- const canStartProcessInstanceSearchQuery = useSelector(mdmModule.selectors.getCanUserStartProcessFromQuery);
27
- const workflowPath = useSelector(mdmModule.selectors.getWorkflowPath);
28
-
29
- return canStartProcessInstanceSearchQuery && !isEmptyValue(workflowPath) ? (
30
- <ActionButton
31
- className={className}
32
- disabled={operationIsInProgress}
33
- mode={mode}
34
- label={operationIsInProgress ? '' : i18n.text('Potential match request')}
35
- icon={DcrReviewIcon}
36
- onClick={startPMReview}
37
- onMenuClose={onMenuClose}
38
- data-reltio-id="reltio-potential-matches-dcr-review-button"
39
- ref={ref}
40
- />
41
- ) : null;
42
- }
43
- );
44
-
45
- DCRReviewButton.displayName = 'DCRReviewButton';
@@ -1,46 +0,0 @@
1
- import React, {forwardRef} from 'react';
2
- import {ActionButtonMode, MergeButton as MergeButtonComponent, noop} from '@reltio/components';
3
- import {Entity} from '@reltio/mdm-sdk';
4
- import {showApiError} from '../../utils/errors';
5
- import {useViewStateActions} from '../../contexts/ViewStateContext';
6
- import {useSpinnerAndReloadData} from '../../hooks/useSpinnerAndReloadData';
7
-
8
- type Props = {
9
- mode?: ActionButtonMode;
10
- entity: Entity;
11
- entities: Entity[];
12
- size?: string;
13
- className?: string;
14
- onMenuClose?: () => void;
15
- };
16
-
17
- export const MergeButton = forwardRef<HTMLLIElement, Props>(
18
- ({className, entities, entity, mode = ActionButtonMode.iconButton, size, onMenuClose = noop}: Props, ref) => {
19
- const {isGlobalSpinnerActive, onFinishRequest, onStartRequest} = useSpinnerAndReloadData();
20
- const {deselectByEntities} = useViewStateActions();
21
-
22
- const onSuccess = () => {
23
- deselectByEntities(entities);
24
- };
25
-
26
- return (
27
- <MergeButtonComponent
28
- className={className}
29
- disabled={isGlobalSpinnerActive}
30
- entities={entities}
31
- entity={entity}
32
- mode={mode}
33
- {...(size ? {size} : {})}
34
- onMenuClose={onMenuClose}
35
- onStartRequest={onStartRequest}
36
- onFinishRequest={onFinishRequest}
37
- onSuccess={onSuccess}
38
- onError={showApiError}
39
- data-reltio-id="reltio-potential-matches-merge-button"
40
- ref={ref}
41
- />
42
- );
43
- }
44
- );
45
-
46
- MergeButton.displayName = 'mergeButton';
@@ -1,45 +0,0 @@
1
- import React, {forwardRef} from 'react';
2
- import {ActionButtonMode, noop, NotMatchButton as NotMatchButtonComponent} from '@reltio/components';
3
- import {Entity} from '@reltio/mdm-sdk';
4
- import {showApiError} from '../../utils/errors';
5
- import {useViewStateActions} from '../../contexts/ViewStateContext';
6
- import {useSpinnerAndReloadData} from '../../hooks/useSpinnerAndReloadData';
7
-
8
- type Props = {
9
- mode?: ActionButtonMode;
10
- entity: Entity;
11
- entities: Entity[];
12
- size?: string;
13
- className?: string;
14
- onMenuClose?: () => void;
15
- };
16
-
17
- export const NotMatchButton = forwardRef<HTMLLIElement, Props>(
18
- ({className, entities, entity, mode = ActionButtonMode.iconButton, size, onMenuClose = noop}: Props, ref) => {
19
- const {isGlobalSpinnerActive, onFinishRequest, onStartRequest} = useSpinnerAndReloadData();
20
- const {deselectByEntities} = useViewStateActions();
21
-
22
- const onSuccess = () => {
23
- deselectByEntities(entities);
24
- };
25
- return (
26
- <NotMatchButtonComponent
27
- className={className}
28
- disabled={isGlobalSpinnerActive}
29
- entities={entities}
30
- entity={entity}
31
- mode={mode}
32
- {...(size ? {size} : {})}
33
- onMenuClose={onMenuClose}
34
- onStartRequest={onStartRequest}
35
- onFinishRequest={onFinishRequest}
36
- onSuccess={onSuccess}
37
- onError={showApiError}
38
- data-reltio-id="reltio-potential-matches-not-match-button"
39
- ref={ref}
40
- />
41
- );
42
- }
43
- );
44
-
45
- NotMatchButton.displayName = 'NotMatchButton';
@@ -1,47 +0,0 @@
1
- import React, {forwardRef, useContext} from 'react';
2
-
3
- import i18n from 'ui-i18n';
4
- import {ActionButton, ActionButtonMode, noop, SnackbarContext} from '@reltio/components';
5
- import {Entity} from '@reltio/mdm-sdk';
6
- import {useReinstateMatch} from '../../hooks/useReinstateMatch';
7
- import SetAsMatchIcon from './icons/setAsMatch.svg';
8
- import {useViewStateActions} from '../../contexts/ViewStateContext';
9
-
10
- type Props = {
11
- mode?: ActionButtonMode;
12
- entity: Entity;
13
- entities: Entity[];
14
- className?: string;
15
- onMenuClose?: () => void;
16
- };
17
-
18
- export const ReinstateMatchButton = forwardRef<HTMLLIElement, Props>(
19
- ({entity, entities, className, mode = ActionButtonMode.iconButton, onMenuClose = noop}: Props, ref) => {
20
- const showSnackbarMessage = useContext(SnackbarContext);
21
- const {deselectByEntities} = useViewStateActions();
22
- const onSuccess = () => {
23
- deselectByEntities(entities);
24
- };
25
- const [reinstateIsInProgress, onReinstateMatch] = useReinstateMatch({
26
- entity,
27
- entities,
28
- showSnackbarMessage,
29
- onSuccess
30
- });
31
-
32
- return (
33
- <ActionButton
34
- className={className}
35
- disabled={reinstateIsInProgress}
36
- mode={mode}
37
- label={i18n.text('Save as potential match')}
38
- icon={SetAsMatchIcon}
39
- onClick={onReinstateMatch}
40
- onMenuClose={onMenuClose}
41
- ref={ref}
42
- />
43
- );
44
- }
45
- );
46
-
47
- ReinstateMatchButton.displayName = 'ReinstateMatchButton';
@@ -1,42 +0,0 @@
1
- import React, {forwardRef} from 'react';
2
- import {ActionButton, ActionButtonMode, noop} from '@reltio/components';
3
- import {Entity} from '@reltio/mdm-sdk';
4
- import i18n from 'ui-i18n';
5
- import {useSetAMatch} from '../../hooks/useSetAMatch';
6
- import SetAsMatchIcon from './icons/setAsMatch.svg';
7
- import {useViewStateActions} from '../../contexts/ViewStateContext';
8
-
9
- type Props = {
10
- mode?: ActionButtonMode;
11
- entity: Entity;
12
- entities: Entity[];
13
- className?: string;
14
- onMenuClose?: () => void;
15
- };
16
-
17
- export const SetAMatchButton = forwardRef<HTMLLIElement, Props>(
18
- ({entity, entities, className, mode = ActionButtonMode.iconButton, onMenuClose = noop}: Props, ref) => {
19
- const {deselectByEntities} = useViewStateActions();
20
-
21
- const onSuccess = () => {
22
- deselectByEntities(entities);
23
- };
24
-
25
- const [markingIsInProgress, setAMatch] = useSetAMatch({entity, entities, onSuccess});
26
-
27
- return (
28
- <ActionButton
29
- className={className}
30
- disabled={markingIsInProgress}
31
- mode={mode}
32
- label={i18n.text('Save on potential matches')}
33
- icon={SetAsMatchIcon}
34
- onClick={setAMatch}
35
- onMenuClose={onMenuClose}
36
- ref={ref}
37
- />
38
- );
39
- }
40
- );
41
-
42
- SetAMatchButton.displayName = 'SetAMatchButton';