@reltio/components 1.4.1998 → 1.4.2000

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 (178) hide show
  1. package/cjs/UpSetChart/UpSetChart.d.ts +5 -8
  2. package/cjs/UpSetChart/UpSetChart.js +61 -5
  3. package/cjs/UpSetChart/UpSetChart.test.js +198 -0
  4. package/cjs/UpSetChart/components/IntersectionsChart/IntersectionsChart.d.ts +15 -0
  5. package/cjs/UpSetChart/components/IntersectionsChart/IntersectionsChart.js +66 -0
  6. package/cjs/UpSetChart/components/IntersectionsChart/index.d.ts +1 -0
  7. package/cjs/UpSetChart/components/IntersectionsChart/index.js +5 -0
  8. package/cjs/UpSetChart/components/IntersectionsChart/styles.d.ts +1 -0
  9. package/cjs/UpSetChart/components/IntersectionsChart/styles.js +32 -0
  10. package/cjs/UpSetChart/components/IntersectionsChartAxis/IntersectionsChartAxis.d.ts +10 -0
  11. package/cjs/UpSetChart/components/IntersectionsChartAxis/IntersectionsChartAxis.js +64 -0
  12. package/cjs/UpSetChart/components/IntersectionsChartAxis/index.d.ts +1 -0
  13. package/cjs/UpSetChart/components/IntersectionsChartAxis/index.js +5 -0
  14. package/cjs/UpSetChart/components/IntersectionsChartAxis/styles.d.ts +1 -0
  15. package/cjs/UpSetChart/components/IntersectionsChartAxis/styles.js +32 -0
  16. package/cjs/UpSetChart/components/IntersectionsMatrix/IntersectionsMatrix.d.ts +13 -0
  17. package/cjs/UpSetChart/components/IntersectionsMatrix/IntersectionsMatrix.js +56 -0
  18. package/cjs/UpSetChart/components/IntersectionsMatrix/index.d.ts +1 -0
  19. package/cjs/UpSetChart/components/IntersectionsMatrix/index.js +5 -0
  20. package/cjs/UpSetChart/components/IntersectionsMatrix/styles.d.ts +1 -0
  21. package/cjs/UpSetChart/components/IntersectionsMatrix/styles.js +27 -0
  22. package/cjs/UpSetChart/components/SetsChart/SetsChart.d.ts +15 -0
  23. package/cjs/UpSetChart/components/SetsChart/SetsChart.js +58 -0
  24. package/cjs/UpSetChart/components/SetsChart/index.d.ts +1 -0
  25. package/cjs/UpSetChart/components/SetsChart/index.js +5 -0
  26. package/cjs/UpSetChart/components/SetsChart/styles.d.ts +1 -0
  27. package/cjs/UpSetChart/components/SetsChart/styles.js +43 -0
  28. package/cjs/UpSetChart/components/SetsChartAxis/SetsChartAxis.d.ts +6 -0
  29. package/cjs/UpSetChart/components/SetsChartAxis/SetsChartAxis.js +20 -0
  30. package/cjs/UpSetChart/components/SetsChartAxis/index.d.ts +1 -0
  31. package/cjs/UpSetChart/components/SetsChartAxis/index.js +5 -0
  32. package/cjs/UpSetChart/components/SetsChartAxis/styles.d.ts +1 -0
  33. package/cjs/UpSetChart/components/SetsChartAxis/styles.js +17 -0
  34. package/cjs/UpSetChart/constants.d.ts +16 -3
  35. package/cjs/UpSetChart/constants.js +20 -4
  36. package/cjs/UpSetChart/gameOfThrones.test-data.d.ts +4 -0
  37. package/cjs/UpSetChart/gameOfThrones.test-data.js +26 -0
  38. package/cjs/UpSetChart/helpers.d.ts +20 -0
  39. package/cjs/UpSetChart/helpers.js +127 -0
  40. package/cjs/UpSetChart/styles.d.ts +4 -1
  41. package/cjs/UpSetChart/styles.js +11 -12
  42. package/cjs/UpSetChart/types.d.ts +16 -0
  43. package/cjs/UpSetChart/types.js +2 -0
  44. package/cjs/UpSetChart/useUpSetChartSizes.d.ts +20 -0
  45. package/cjs/UpSetChart/useUpSetChartSizes.js +34 -0
  46. package/cjs/features/crosswalks/AttributesTable/AttributesTable.test-data.d.ts +36 -0
  47. package/cjs/features/crosswalks/AttributesTable/AttributesTable.test-data.js +288 -0
  48. package/cjs/features/crosswalks/AttributesTable/AttributesTable.test.js +708 -370
  49. package/cjs/features/crosswalks/ColoredBlock/ColoredBlock.test.js +77 -15
  50. package/cjs/features/crosswalks/CopyableValueField/CopyableValueField.test.js +85 -15
  51. package/cjs/features/crosswalks/CrosswalkAttributes/CrosswalkAttributes.test.js +265 -193
  52. package/cjs/features/crosswalks/CrosswalkDateEditor/CrosswalkDateEditor.test.js +106 -12
  53. package/cjs/features/crosswalks/CrosswalkDragLayer/CrosswalkDragLayer.test.js +21 -9
  54. package/cjs/features/crosswalks/CrosswalkEditor/CrosswalkEditor.test.js +190 -90
  55. package/cjs/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +323 -225
  56. package/cjs/features/crosswalks/ShowDependentLink/ShowDependentLink.test.js +75 -12
  57. package/cjs/features/crosswalks/SourceCrosswalksRow/SourceCrosswalksRow.test.js +171 -138
  58. package/esm/UpSetChart/UpSetChart.d.ts +5 -8
  59. package/esm/UpSetChart/UpSetChart.js +38 -5
  60. package/esm/UpSetChart/UpSetChart.test.js +193 -0
  61. package/esm/UpSetChart/components/IntersectionsChart/IntersectionsChart.d.ts +15 -0
  62. package/esm/UpSetChart/components/IntersectionsChart/IntersectionsChart.js +39 -0
  63. package/esm/UpSetChart/components/IntersectionsChart/index.d.ts +1 -0
  64. package/esm/UpSetChart/components/IntersectionsChart/index.js +1 -0
  65. package/esm/UpSetChart/components/IntersectionsChart/styles.d.ts +1 -0
  66. package/esm/UpSetChart/components/IntersectionsChart/styles.js +29 -0
  67. package/esm/UpSetChart/components/IntersectionsChartAxis/IntersectionsChartAxis.d.ts +10 -0
  68. package/esm/UpSetChart/components/IntersectionsChartAxis/IntersectionsChartAxis.js +34 -0
  69. package/esm/UpSetChart/components/IntersectionsChartAxis/index.d.ts +1 -0
  70. package/esm/UpSetChart/components/IntersectionsChartAxis/index.js +1 -0
  71. package/esm/UpSetChart/components/IntersectionsChartAxis/styles.d.ts +1 -0
  72. package/esm/UpSetChart/components/IntersectionsChartAxis/styles.js +29 -0
  73. package/esm/UpSetChart/components/IntersectionsMatrix/IntersectionsMatrix.d.ts +13 -0
  74. package/esm/UpSetChart/components/IntersectionsMatrix/IntersectionsMatrix.js +26 -0
  75. package/esm/UpSetChart/components/IntersectionsMatrix/index.d.ts +1 -0
  76. package/esm/UpSetChart/components/IntersectionsMatrix/index.js +1 -0
  77. package/esm/UpSetChart/components/IntersectionsMatrix/styles.d.ts +1 -0
  78. package/esm/UpSetChart/components/IntersectionsMatrix/styles.js +24 -0
  79. package/esm/UpSetChart/components/SetsChart/SetsChart.d.ts +15 -0
  80. package/esm/UpSetChart/components/SetsChart/SetsChart.js +31 -0
  81. package/esm/UpSetChart/components/SetsChart/index.d.ts +1 -0
  82. package/esm/UpSetChart/components/SetsChart/index.js +1 -0
  83. package/esm/UpSetChart/components/SetsChart/styles.d.ts +1 -0
  84. package/esm/UpSetChart/components/SetsChart/styles.js +40 -0
  85. package/esm/UpSetChart/components/SetsChartAxis/SetsChartAxis.d.ts +6 -0
  86. package/esm/UpSetChart/components/SetsChartAxis/SetsChartAxis.js +13 -0
  87. package/esm/UpSetChart/components/SetsChartAxis/index.d.ts +1 -0
  88. package/esm/UpSetChart/components/SetsChartAxis/index.js +1 -0
  89. package/esm/UpSetChart/components/SetsChartAxis/styles.d.ts +1 -0
  90. package/esm/UpSetChart/components/SetsChartAxis/styles.js +14 -0
  91. package/esm/UpSetChart/constants.d.ts +16 -3
  92. package/esm/UpSetChart/constants.js +19 -3
  93. package/esm/UpSetChart/gameOfThrones.test-data.d.ts +4 -0
  94. package/esm/UpSetChart/gameOfThrones.test-data.js +23 -0
  95. package/esm/UpSetChart/helpers.d.ts +20 -0
  96. package/esm/UpSetChart/helpers.js +120 -0
  97. package/esm/UpSetChart/styles.d.ts +4 -1
  98. package/esm/UpSetChart/styles.js +11 -12
  99. package/esm/UpSetChart/types.d.ts +16 -0
  100. package/esm/UpSetChart/useUpSetChartSizes.d.ts +20 -0
  101. package/esm/UpSetChart/useUpSetChartSizes.js +30 -0
  102. package/esm/features/crosswalks/AttributesTable/AttributesTable.test-data.d.ts +36 -0
  103. package/esm/features/crosswalks/AttributesTable/AttributesTable.test-data.js +283 -0
  104. package/esm/features/crosswalks/AttributesTable/AttributesTable.test.js +711 -350
  105. package/esm/features/crosswalks/ColoredBlock/ColoredBlock.test.js +77 -15
  106. package/esm/features/crosswalks/CopyableValueField/CopyableValueField.test.js +85 -15
  107. package/esm/features/crosswalks/CrosswalkAttributes/CrosswalkAttributes.test.js +266 -194
  108. package/esm/features/crosswalks/CrosswalkDateEditor/CrosswalkDateEditor.test.js +106 -12
  109. package/esm/features/crosswalks/CrosswalkDragLayer/CrosswalkDragLayer.test.js +21 -9
  110. package/esm/features/crosswalks/CrosswalkEditor/CrosswalkEditor.test.js +190 -90
  111. package/esm/features/crosswalks/CrosswalkRow/CrosswalkRow.test.js +324 -226
  112. package/esm/features/crosswalks/ShowDependentLink/ShowDependentLink.test.js +75 -12
  113. package/esm/features/crosswalks/SourceCrosswalksRow/SourceCrosswalksRow.test.js +171 -138
  114. package/package.json +1 -1
  115. package/cjs/features/crosswalks/AttributesTable/IntegrationAttributesTable.test-data.d.ts +0 -3
  116. package/cjs/features/crosswalks/AttributesTable/IntegrationAttributesTable.test-data.js +0 -52
  117. package/cjs/features/crosswalks/AttributesTable/IntegrationAttributesTable.test.js +0 -323
  118. package/cjs/features/crosswalks/AttributesTable/components/AddAttributesButton/AddAttributesButton.test.js +0 -142
  119. package/cjs/features/crosswalks/AttributesTable/components/AttributeValuesRenderer/AttributeValuesRenderer.test.js +0 -146
  120. package/cjs/features/crosswalks/AttributesTable/components/AttributesHeadCellRenderer/AttributesHeadCellRenderer.test.d.ts +0 -1
  121. package/cjs/features/crosswalks/AttributesTable/components/AttributesHeadCellRenderer/AttributesHeadCellRenderer.test.js +0 -50
  122. package/cjs/features/crosswalks/AttributesTable/components/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.test.d.ts +0 -1
  123. package/cjs/features/crosswalks/AttributesTable/components/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.test.js +0 -58
  124. package/cjs/features/crosswalks/AttributesTable/components/CountRenderer/CountRenderer.test.d.ts +0 -1
  125. package/cjs/features/crosswalks/AttributesTable/components/CountRenderer/CountRenderer.test.js +0 -14
  126. package/cjs/features/crosswalks/AttributesTable/components/ImageAttributesRenderer/ImageAttributesRenderer.test.d.ts +0 -1
  127. package/cjs/features/crosswalks/AttributesTable/components/ImageAttributesRenderer/ImageAttributesRenderer.test.js +0 -110
  128. package/cjs/features/crosswalks/AttributesTable/components/NestedAttributesRenderer/NestedAttributesRenderer.test.d.ts +0 -1
  129. package/cjs/features/crosswalks/AttributesTable/components/NestedAttributesRenderer/NestedAttributesRenderer.test.js +0 -111
  130. package/cjs/features/crosswalks/AttributesTable/components/OvValuesRenderer/OvValuesRenderer.test.d.ts +0 -1
  131. package/cjs/features/crosswalks/AttributesTable/components/OvValuesRenderer/OvValuesRenderer.test.js +0 -67
  132. package/cjs/features/crosswalks/AttributesTable/components/ReferenceAttributesRenderer/ReferenceAttributesRenderer.test.d.ts +0 -1
  133. package/cjs/features/crosswalks/AttributesTable/components/ReferenceAttributesRenderer/ReferenceAttributesRenderer.test.js +0 -193
  134. package/cjs/features/crosswalks/AttributesTable/components/RuleTypeInfoButton/RuleTypeInfoButton.test.d.ts +0 -1
  135. package/cjs/features/crosswalks/AttributesTable/components/RuleTypeInfoButton/RuleTypeInfoButton.test.js +0 -22
  136. package/cjs/features/crosswalks/AttributesTable/components/RuleTypeRenderer/RuleTypeRenderer.test.d.ts +0 -1
  137. package/cjs/features/crosswalks/AttributesTable/components/RuleTypeRenderer/RuleTypeRenderer.test.js +0 -58
  138. package/cjs/features/crosswalks/AttributesTable/components/SimpleAttributesRenderer/SimpleAttributesRenderer.test.d.ts +0 -1
  139. package/cjs/features/crosswalks/AttributesTable/components/SimpleAttributesRenderer/SimpleAttributesRenderer.test.js +0 -69
  140. package/cjs/features/crosswalks/CrosswalkDateEditor/IntegrationCrosswalkDateEditor.test.d.ts +0 -1
  141. package/cjs/features/crosswalks/CrosswalkDateEditor/IntegrationCrosswalkDateEditor.test.js +0 -137
  142. package/cjs/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.test.d.ts +0 -1
  143. package/cjs/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.test.js +0 -56
  144. package/esm/features/crosswalks/AttributesTable/IntegrationAttributesTable.test-data.d.ts +0 -3
  145. package/esm/features/crosswalks/AttributesTable/IntegrationAttributesTable.test-data.js +0 -47
  146. package/esm/features/crosswalks/AttributesTable/IntegrationAttributesTable.test.d.ts +0 -1
  147. package/esm/features/crosswalks/AttributesTable/IntegrationAttributesTable.test.js +0 -318
  148. package/esm/features/crosswalks/AttributesTable/components/AddAttributesButton/AddAttributesButton.test.d.ts +0 -1
  149. package/esm/features/crosswalks/AttributesTable/components/AddAttributesButton/AddAttributesButton.test.js +0 -137
  150. package/esm/features/crosswalks/AttributesTable/components/AttributeValuesRenderer/AttributeValuesRenderer.test.d.ts +0 -1
  151. package/esm/features/crosswalks/AttributesTable/components/AttributeValuesRenderer/AttributeValuesRenderer.test.js +0 -141
  152. package/esm/features/crosswalks/AttributesTable/components/AttributesHeadCellRenderer/AttributesHeadCellRenderer.test.d.ts +0 -1
  153. package/esm/features/crosswalks/AttributesTable/components/AttributesHeadCellRenderer/AttributesHeadCellRenderer.test.js +0 -45
  154. package/esm/features/crosswalks/AttributesTable/components/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.test.d.ts +0 -1
  155. package/esm/features/crosswalks/AttributesTable/components/ConfirmEditIgnoredDialog/ConfirmEditIgnoredDialog.test.js +0 -53
  156. package/esm/features/crosswalks/AttributesTable/components/CountRenderer/CountRenderer.test.d.ts +0 -1
  157. package/esm/features/crosswalks/AttributesTable/components/CountRenderer/CountRenderer.test.js +0 -9
  158. package/esm/features/crosswalks/AttributesTable/components/ImageAttributesRenderer/ImageAttributesRenderer.test.d.ts +0 -1
  159. package/esm/features/crosswalks/AttributesTable/components/ImageAttributesRenderer/ImageAttributesRenderer.test.js +0 -105
  160. package/esm/features/crosswalks/AttributesTable/components/NestedAttributesRenderer/NestedAttributesRenderer.test.d.ts +0 -1
  161. package/esm/features/crosswalks/AttributesTable/components/NestedAttributesRenderer/NestedAttributesRenderer.test.js +0 -106
  162. package/esm/features/crosswalks/AttributesTable/components/OvValuesRenderer/OvValuesRenderer.test.d.ts +0 -1
  163. package/esm/features/crosswalks/AttributesTable/components/OvValuesRenderer/OvValuesRenderer.test.js +0 -62
  164. package/esm/features/crosswalks/AttributesTable/components/ReferenceAttributesRenderer/ReferenceAttributesRenderer.test.d.ts +0 -1
  165. package/esm/features/crosswalks/AttributesTable/components/ReferenceAttributesRenderer/ReferenceAttributesRenderer.test.js +0 -188
  166. package/esm/features/crosswalks/AttributesTable/components/RuleTypeInfoButton/RuleTypeInfoButton.test.d.ts +0 -1
  167. package/esm/features/crosswalks/AttributesTable/components/RuleTypeInfoButton/RuleTypeInfoButton.test.js +0 -17
  168. package/esm/features/crosswalks/AttributesTable/components/RuleTypeRenderer/RuleTypeRenderer.test.d.ts +0 -1
  169. package/esm/features/crosswalks/AttributesTable/components/RuleTypeRenderer/RuleTypeRenderer.test.js +0 -53
  170. package/esm/features/crosswalks/AttributesTable/components/SimpleAttributesRenderer/SimpleAttributesRenderer.test.d.ts +0 -1
  171. package/esm/features/crosswalks/AttributesTable/components/SimpleAttributesRenderer/SimpleAttributesRenderer.test.js +0 -64
  172. package/esm/features/crosswalks/CrosswalkDateEditor/IntegrationCrosswalkDateEditor.test.d.ts +0 -1
  173. package/esm/features/crosswalks/CrosswalkDateEditor/IntegrationCrosswalkDateEditor.test.js +0 -132
  174. package/esm/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.test.d.ts +0 -1
  175. package/esm/features/crosswalks/CrosswalkDragLayer/components/CrosswalkDragPreview/CrosswalkDragPreview.test.js +0 -28
  176. /package/cjs/{features/crosswalks/AttributesTable/IntegrationAttributesTable.test.d.ts → UpSetChart/UpSetChart.test.d.ts} +0 -0
  177. /package/{cjs/features/crosswalks/AttributesTable/components/AddAttributesButton/AddAttributesButton.test.d.ts → esm/UpSetChart/UpSetChart.test.d.ts} +0 -0
  178. /package/{cjs/features/crosswalks/AttributesTable/components/AttributeValuesRenderer/AttributeValuesRenderer.test.d.ts → esm/UpSetChart/types.js} +0 -0
@@ -1,58 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- var react_1 = __importDefault(require("react"));
18
- var enzyme_1 = require("enzyme");
19
- var DialogContentText_1 = __importDefault(require("@mui/material/DialogContentText"));
20
- var RadioGroup_1 = __importDefault(require("@mui/material/RadioGroup"));
21
- var Button_1 = __importDefault(require("@mui/material/Button"));
22
- var ConfirmEditIgnoredDialog_1 = require("./ConfirmEditIgnoredDialog");
23
- describe('ConfirmEditIgnoredDialog tests', function () {
24
- var props = {
25
- open: true,
26
- onClose: jest.fn(),
27
- onConfirmEditWithIgnore: jest.fn(),
28
- onConfirmEditWithoutIgnore: jest.fn()
29
- };
30
- it('should render correctly', function () {
31
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ConfirmEditIgnoredDialog_1.ConfirmEditIgnoredDialog, __assign({}, props)));
32
- expect(wrapper.find(DialogContentText_1.default).text()).toBe('You are attempting to change a value that is presently ignored.');
33
- expect(wrapper.find(RadioGroup_1.default).prop('value')).toBe(wrapper.find(RadioGroup_1.default).childAt(0).prop('value'));
34
- expect(wrapper.find(RadioGroup_1.default).childAt(0).prop('label')).toBe('Save without Ignore');
35
- expect(wrapper.find(RadioGroup_1.default).childAt(1).prop('label')).toBe('Save and apply Ignore to new value');
36
- expect(wrapper.find(Button_1.default).at(0).text()).toBe('Cancel');
37
- expect(wrapper.find(Button_1.default).at(1).text()).toBe('Ok');
38
- });
39
- it('should call props.onClose on Cancel button click', function () {
40
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ConfirmEditIgnoredDialog_1.ConfirmEditIgnoredDialog, __assign({}, props)));
41
- wrapper.find(Button_1.default).at(0).simulate('click');
42
- expect(props.onClose).toHaveBeenCalled();
43
- });
44
- it('should call props.onConfirmEditWithoutIgnore and props.onClose on Ok button click', function () {
45
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ConfirmEditIgnoredDialog_1.ConfirmEditIgnoredDialog, __assign({}, props)));
46
- wrapper.find(Button_1.default).at(1).simulate('click');
47
- expect(props.onClose).toHaveBeenCalled();
48
- expect(props.onConfirmEditWithoutIgnore).toHaveBeenCalled();
49
- });
50
- it('should call props.onConfirmEditWithIgnore and props.onClose on with ignore select and Ok button click', function () {
51
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ConfirmEditIgnoredDialog_1.ConfirmEditIgnoredDialog, __assign({}, props)));
52
- var value = wrapper.find(RadioGroup_1.default).childAt(1).prop('value');
53
- wrapper.find(RadioGroup_1.default).simulate('change', { target: { value: value } });
54
- wrapper.find(Button_1.default).at(1).simulate('click');
55
- expect(props.onClose).toHaveBeenCalled();
56
- expect(props.onConfirmEditWithIgnore).toHaveBeenCalled();
57
- });
58
- });
@@ -1,14 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var react_1 = __importDefault(require("react"));
7
- var enzyme_1 = require("enzyme");
8
- var CountRenderer_1 = require("./CountRenderer");
9
- describe('CountRenderer tests', function () {
10
- it('should render correctly', function () {
11
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(CountRenderer_1.CountRenderer, { value: 123 }));
12
- expect(wrapper.find('.root').text()).toBe('123');
13
- });
14
- });
@@ -1,110 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __rest = (this && this.__rest) || function (s, e) {
14
- var t = {};
15
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
- t[p] = s[p];
17
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
- t[p[i]] = s[p[i]];
21
- }
22
- return t;
23
- };
24
- var __importDefault = (this && this.__importDefault) || function (mod) {
25
- return (mod && mod.__esModule) ? mod : { "default": mod };
26
- };
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- var react_1 = __importDefault(require("react"));
29
- var enzyme_1 = require("enzyme");
30
- var InlineImageAttribute_1 = require("../../../../../InlineImageAttribute");
31
- var ImageAttributesRenderer_1 = require("./ImageAttributesRenderer");
32
- describe('ImageAttributesRenderer tests', function () {
33
- it('should render correctly', function () {
34
- var crosswalks = [
35
- {
36
- uri: 'entities/j8K1vc9/crosswalks/12jf9nL05',
37
- type: 'configuration/sources/Reltio',
38
- value: 'nQpZyQt',
39
- reltioLoadDate: '2021-06-11T08:24:31.726Z',
40
- createDate: '2018-11-19T12:14:00.735Z',
41
- updateDate: '2018-11-19T12:14:00.735Z',
42
- attributes: ['configuration/entityTypes/Employee/attributes/ImageGallery/attributes/UrlThumbnail']
43
- }
44
- ];
45
- var props = {
46
- attributeValues: [
47
- {
48
- type: 'configuration/entityTypes/Employee/attributes/ImageGallery',
49
- uri: 'entities/1Rd2I9Mt/attributes/ImageGallery/39V5GWJZv',
50
- value: {
51
- UrlThumbnail: [
52
- {
53
- type: 'configuration/entityTypes/Employee/attributes/ImageGallery/attributes/UrlThumbnail',
54
- ov: true,
55
- value: '/test123.jpg',
56
- uri: 'entities/1Rd2I9Mt/attributes/ImageGallery/39V5GWJZv/UrlThumbnail/5555'
57
- }
58
- ]
59
- },
60
- ov: true
61
- },
62
- {
63
- type: 'configuration/entityTypes/Employee/attributes/ImageGallery',
64
- uri: 'entities/1Rd2I9Mt/attributes/ImageGallery/123123',
65
- value: {
66
- UrlThumbnail: [
67
- {
68
- type: 'configuration/entityTypes/Employee/attributes/ImageGallery/attributes/UrlThumbnail',
69
- ov: true,
70
- value: '/test.jpg',
71
- uri: 'entities/1Rd2I9Mt/attributes/ImageGallery/123123/UrlThumbnail/66666'
72
- }
73
- ]
74
- },
75
- ov: true
76
- }
77
- ],
78
- attributeType: {
79
- attributes: [
80
- {
81
- name: 'UrlThumbnail',
82
- type: 'String',
83
- uri: 'configuration/entityTypes/Series/attributes/ImageGallery/attributes/UrlThumbnail'
84
- }
85
- ],
86
- name: 'ImageGallery',
87
- type: 'Image',
88
- uri: 'configuration/entityTypes/Employee/attributes/ImageGallery'
89
- },
90
- crosswalksMap: {
91
- 'entities/1Rd2I9Mt/attributes/ImageGallery/123123': [crosswalks[0]],
92
- 'entities/1Rd2I9Mt/attributes/ImageGallery/39V5GWJZv': [crosswalks[0]]
93
- },
94
- onPin: jest.fn(),
95
- onIgnore: jest.fn(),
96
- onEdit: jest.fn(),
97
- onAdd: jest.fn(),
98
- onDelete: jest.fn(),
99
- parentUri: 'entities/1Rd2I9Mt',
100
- emptyTempAttributeUris: []
101
- };
102
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ImageAttributesRenderer_1.ImageAttributesRenderer, __assign({}, props)));
103
- var values = wrapper.find(InlineImageAttribute_1.InlineImageAttribute);
104
- expect(values.length).toBe(2);
105
- var attributeValues = props.attributeValues, otherProps = __rest(props, ["attributeValues"]);
106
- values.forEach(function (value, index) {
107
- expect(value.props()).toEqual(__assign({ attributeValue: attributeValues[index] }, otherProps));
108
- });
109
- });
110
- });
@@ -1,111 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __rest = (this && this.__rest) || function (s, e) {
14
- var t = {};
15
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
- t[p] = s[p];
17
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
- t[p[i]] = s[p[i]];
21
- }
22
- return t;
23
- };
24
- var __importDefault = (this && this.__importDefault) || function (mod) {
25
- return (mod && mod.__esModule) ? mod : { "default": mod };
26
- };
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- var react_1 = __importDefault(require("react"));
29
- var enzyme_1 = require("enzyme");
30
- var InlineNestedAttribute_1 = require("../../../../../InlineNestedAttribute");
31
- var NestedAttributesRenderer_1 = require("./NestedAttributesRenderer");
32
- describe('NestedAttributesRenderer tests', function () {
33
- it('should render correctly', function () {
34
- var crosswalks = [
35
- {
36
- uri: 'entities/j8K1vc9/crosswalks/12jf9nL05',
37
- type: 'configuration/sources/Reltio',
38
- value: 'nQpZyQt',
39
- reltioLoadDate: '2021-06-11T08:24:31.726Z',
40
- createDate: '2018-11-19T12:14:00.735Z',
41
- updateDate: '2018-11-19T12:14:00.735Z',
42
- attributes: ['entities/1/attributes/Nested/1', 'entities/1/attributes/Nested/2/SubNested/1'],
43
- singleAttributeUpdateDates: {
44
- 'entities/1/attributes/Date/1': '2018-11-29T05:39:56.445Z'
45
- }
46
- }
47
- ];
48
- var props = {
49
- attributeValues: [
50
- {
51
- uri: 'entities/1/attributes/Nested/1',
52
- value: {
53
- SubNested: [
54
- {
55
- uri: 'entities/1/attributes/Nested/1/SubNested/1',
56
- type: 'String',
57
- value: '1'
58
- }
59
- ]
60
- },
61
- ov: true
62
- },
63
- {
64
- uri: 'entities/1/attributes/Nested/2',
65
- value: {
66
- SubNested: [
67
- {
68
- uri: 'entities/1/attributes/Nested/2/SubNested/1',
69
- type: 'String',
70
- value: '2'
71
- }
72
- ]
73
- },
74
- ov: true
75
- }
76
- ],
77
- attributeType: {
78
- uri: 'configuration/entityTypes/HCP/attributes/Nested',
79
- label: 'Nested',
80
- name: 'Nested',
81
- type: 'Nested',
82
- attributes: [
83
- {
84
- label: 'SubNested',
85
- name: 'SubNested',
86
- type: 'String',
87
- uri: 'configuration/entityTypes/HCP/attributes/Nested/attributes/SubNested'
88
- }
89
- ]
90
- },
91
- crosswalksMap: {
92
- 'entities/1/attributes/Nested/1': [crosswalks[0]],
93
- 'entities/1/attributes/Nested/2/SubNested/1': [crosswalks[0]]
94
- },
95
- onPin: jest.fn(),
96
- onIgnore: jest.fn(),
97
- onEdit: jest.fn(),
98
- onAdd: jest.fn(),
99
- onDelete: jest.fn(),
100
- parentUri: 'entities/1',
101
- emptyTempAttributeUris: []
102
- };
103
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(NestedAttributesRenderer_1.NestedAttributesRenderer, __assign({}, props)));
104
- var values = wrapper.find(InlineNestedAttribute_1.InlineNestedAttribute);
105
- expect(values.length).toBe(2);
106
- var attributeValues = props.attributeValues, otherProps = __rest(props, ["attributeValues"]);
107
- values.forEach(function (value, index) {
108
- expect(value.props()).toEqual(__assign({ attributeValue: attributeValues[index] }, otherProps));
109
- });
110
- });
111
- });
@@ -1,67 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var react_1 = __importDefault(require("react"));
7
- var enzyme_1 = require("enzyme");
8
- var AttributeTitle_1 = require("../../../../../AttributeTitle");
9
- var ReadOnlyAttributeValuesBlock_1 = require("../../../../../ReadOnlyAttributeValuesBlock");
10
- var OvValuesRenderer_1 = require("./OvValuesRenderer");
11
- describe('OvValuesRenderer tests', function () {
12
- it('should render correctly', function () {
13
- var value = {
14
- values: [
15
- {
16
- uri: 'entities/1/attributes/CountryCode/1',
17
- type: 'configuration/entityTypes/HCP/attributes/CountryCode',
18
- value: 'Italy',
19
- lookupCode: 'IT',
20
- ov: true
21
- }
22
- ],
23
- attributeType: {
24
- uri: 'configuration/entityTypes/HCP',
25
- label: 'HCP',
26
- name: 'HCP',
27
- type: 'String',
28
- attributes: [
29
- {
30
- label: 'Country Code',
31
- name: 'CountryCode',
32
- type: 'String',
33
- uri: 'configuration/entityTypes/HCP/attributes/CountryCode'
34
- }
35
- ]
36
- }
37
- };
38
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(OvValuesRenderer_1.OvValuesRenderer, { value: value }));
39
- expect(wrapper.find(AttributeTitle_1.AttributeTitle).prop('label')).toBe('HCP');
40
- var attributesBlock = wrapper.find(ReadOnlyAttributeValuesBlock_1.ReadOnlyAttributeValuesBlock);
41
- expect(attributesBlock.prop('values')).toEqual(value.values);
42
- expect(attributesBlock.prop('attributeType')).toEqual(value.attributeType);
43
- });
44
- it('should not render attributes if ovValues are missing', function () {
45
- var value = {
46
- attributeType: {
47
- uri: 'configuration/entityTypes/HCP',
48
- label: 'HCP',
49
- name: 'HCP',
50
- type: 'String',
51
- attributes: [
52
- {
53
- label: 'Country Code',
54
- name: 'CountryCode',
55
- type: 'String',
56
- uri: 'configuration/entityTypes/HCP/attributes/CountryCode'
57
- }
58
- ]
59
- }
60
- };
61
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(OvValuesRenderer_1.OvValuesRenderer, { value: value }));
62
- expect(wrapper.find(AttributeTitle_1.AttributeTitle).prop('label')).toBe('HCP');
63
- var attributesBlock = wrapper.find(ReadOnlyAttributeValuesBlock_1.ReadOnlyAttributeValuesBlock);
64
- expect(attributesBlock.prop('values')).toEqual(undefined);
65
- expect(attributesBlock.prop('attributeType')).toEqual(value.attributeType);
66
- });
67
- });
@@ -1,193 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __rest = (this && this.__rest) || function (s, e) {
14
- var t = {};
15
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
- t[p] = s[p];
17
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
- t[p[i]] = s[p[i]];
21
- }
22
- return t;
23
- };
24
- var __importDefault = (this && this.__importDefault) || function (mod) {
25
- return (mod && mod.__esModule) ? mod : { "default": mod };
26
- };
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- var react_1 = __importDefault(require("react"));
29
- var enzyme_1 = require("enzyme");
30
- var InlineReferenceAttribute_1 = require("../../../../../InlineReferenceAttribute");
31
- var ReferenceAttributesRenderer_1 = require("./ReferenceAttributesRenderer");
32
- describe('ReferenceAttributesRenderer tests', function () {
33
- it('should render correctly', function () {
34
- var crosswalks = [
35
- {
36
- uri: 'entities/1/crosswalks/uAGtqeB.3VKnDCtBz',
37
- type: 'configuration/sources/HMS',
38
- value: 'cww2',
39
- createDate: '2020-09-02T16:19:12.943Z',
40
- updateDate: '2020-09-02T16:19:12.943Z',
41
- attributeURIs: ['entities/1/attributes/Address/1/AddressLine/1', 'entities/1/attributes/Address/1']
42
- },
43
- {
44
- uri: 'entities/1/crosswalks/uAGtuuR.3VKnDDiL5',
45
- type: 'configuration/sources/HMS',
46
- value: 'cwf2',
47
- createDate: '2020-09-02T16:19:12.943Z',
48
- updateDate: '2020-09-02T16:19:12.943Z',
49
- attributeURIs: ['entities/1/attributes/Address/2/AddressLine1/1', 'entities/1/attributes/Address/2']
50
- }
51
- ];
52
- var props = {
53
- attributeValues: [
54
- {
55
- label: 'Granada Aveue Santa Clara 1',
56
- relationshipLabel: 'Office',
57
- value: {
58
- AddressLine1: [
59
- {
60
- type: 'configuration/entityTypes/Location/attributes/AddressLine1',
61
- ov: true,
62
- value: '3588 Granada Aveue',
63
- uri: 'entities/1/attributes/Address/1/AddressLine1/1'
64
- }
65
- ]
66
- },
67
- ov: true,
68
- uri: 'entities/1/attributes/Address/1',
69
- refEntity: {
70
- type: 'configuration/entityTypes/Location',
71
- crosswalks: [
72
- {
73
- uri: 'entities/1/crosswalks/1YWdmjzf.3VKnDCovj',
74
- type: 'configuration/sources/HMS',
75
- value: 'cww1',
76
- createDate: '2020-09-02T16:19:12.943Z',
77
- updateDate: '2020-09-02T16:19:12.943Z',
78
- attributeURIs: [
79
- 'entities/1/attributes/Address/1/AddressLine1/1',
80
- 'entities/1/attributes/Address/1'
81
- ]
82
- }
83
- ],
84
- objectURI: 'entities/1'
85
- },
86
- refRelation: {
87
- type: 'configuration/relationTypes/HasAddress',
88
- crosswalks: [
89
- {
90
- uri: 'entities/1/crosswalks/uAGtqeB.3VKnDCtBz',
91
- type: 'configuration/sources/HMS',
92
- value: 'cww2',
93
- createDate: '2020-09-02T16:19:12.943Z',
94
- updateDate: '2020-09-02T16:19:12.943Z',
95
- attributeURIs: [
96
- 'entities/1/attributes/Address/1/AddressLine/1',
97
- 'entities/1/attributes/Address/1'
98
- ]
99
- }
100
- ],
101
- startRefPinned: false,
102
- endRefPinned: false,
103
- startRefIgnored: false,
104
- endRefIgnored: false,
105
- objectURI: 'relations/1'
106
- }
107
- },
108
- {
109
- label: 'Granada Aveue Santa Clara 2',
110
- relationshipLabel: 'Office',
111
- value: {
112
- AddressLine1: [
113
- {
114
- type: 'configuration/entityTypes/Location/attributes/AddressLine1',
115
- ov: true,
116
- value: '3587 Granada Aveue',
117
- uri: 'entities/1/attributes/Address/2/AddressLine1/1'
118
- }
119
- ]
120
- },
121
- ov: true,
122
- uri: 'entities/1/attributes/Address/2',
123
- refEntity: {
124
- type: 'configuration/entityTypes/Location',
125
- crosswalks: [
126
- {
127
- uri: 'entities/1/crosswalks/1YWdmsWB.3VKnDDe4p',
128
- type: 'configuration/sources/HMS',
129
- value: 'cwf1',
130
- createDate: '2020-09-02T16:19:12.943Z',
131
- updateDate: '2020-09-02T16:19:12.943Z',
132
- attributeURIs: [
133
- 'entities/1/attributes/Address/2/AddressLine1/1',
134
- 'entities/1/attributes/Address/2'
135
- ]
136
- }
137
- ],
138
- objectURI: 'entities/1'
139
- },
140
- refRelation: {
141
- type: 'configuration/relationTypes/HasAddress',
142
- crosswalks: [
143
- {
144
- uri: 'entities/1/crosswalks/uAGtuuR.3VKnDDiL5',
145
- type: 'configuration/sources/HMS',
146
- value: 'cwf2',
147
- createDate: '2020-09-02T16:19:12.943Z',
148
- updateDate: '2020-09-02T16:19:12.943Z',
149
- attributeURIs: [
150
- 'entities/1/attributes/Address/2/AddressLine1/1',
151
- 'entities/1/attributes/Address/2'
152
- ]
153
- }
154
- ],
155
- startRefPinned: false,
156
- endRefPinned: false,
157
- startRefIgnored: false,
158
- endRefIgnored: false,
159
- objectURI: 'relations/2'
160
- }
161
- }
162
- ],
163
- attributeType: {
164
- label: 'Address',
165
- name: 'Address',
166
- type: 'Reference',
167
- uri: 'configuration/entityTypes/HCP/attributes/Address',
168
- referencedAttributeURIs: ['configuration/entityTypes/Location/attributes/AddressLine1'],
169
- relationshipTypeURI: 'configuration/relationTypes/HasAddress'
170
- },
171
- crosswalksMap: {
172
- 'entities/1/attributes/Address/1': [crosswalks[0]],
173
- 'entities/1/attributes/Address/1/AddressLine1/1': [crosswalks[0]],
174
- 'entities/1/attributes/Address/2': [crosswalks[1]],
175
- 'entities/1/attributes/Address/2/AddressLine1/1': [crosswalks[1]]
176
- },
177
- onPin: jest.fn(),
178
- onIgnore: jest.fn(),
179
- onEdit: jest.fn(),
180
- onAdd: jest.fn(),
181
- onDelete: jest.fn(),
182
- parentUri: 'entities/1',
183
- emptyTempAttributeUris: []
184
- };
185
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(ReferenceAttributesRenderer_1.ReferenceAttributesRenderer, __assign({}, props)));
186
- var values = wrapper.find(InlineReferenceAttribute_1.InlineReferenceAttribute);
187
- expect(values.length).toBe(2);
188
- var attributeValues = props.attributeValues, otherProps = __rest(props, ["attributeValues"]);
189
- values.forEach(function (value, index) {
190
- expect(value.props()).toEqual(__assign({ attributeValue: attributeValues[index] }, otherProps));
191
- });
192
- });
193
- });
@@ -1,22 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var react_1 = __importDefault(require("react"));
7
- var enzyme_1 = require("enzyme");
8
- var Info_1 = __importDefault(require("@mui/icons-material/Info"));
9
- var SmallIconButton_1 = require("../../../../../SmallIconButton");
10
- var RuleTypeInfoButton_1 = require("./RuleTypeInfoButton");
11
- describe('RuleTypeInfoButton tests', function () {
12
- it('should render correctly', function () {
13
- var info = {
14
- sourcesUriOrder: ['configuration/sources/CGD', 'configuration/sources/DNO']
15
- };
16
- var wrapper = (0, enzyme_1.shallow)(react_1.default.createElement(RuleTypeInfoButton_1.RuleTypeInfoButton, { info: info }));
17
- expect(wrapper.find(SmallIconButton_1.SmallIconButtonWithTooltip).props()).toMatchObject({
18
- icon: Info_1.default,
19
- tooltipTitle: 'View details'
20
- });
21
- });
22
- });