@reltio/components 1.4.2231 → 1.4.2232

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 (120) hide show
  1. package/InlineComplexAttribute/InlineComplexAttribute.js +2 -2
  2. package/InlineComplexAttribute/InlineComplexAttribute.test.js +7 -7
  3. package/ReadOnlyAttributesList/ReadOnlyAttributesList.d.ts +5 -2
  4. package/ReadOnlyAttributesList/ReadOnlyAttributesList.js +2 -2
  5. package/ReadOnlyAttributesPager/ReadOnlyAttributesPager.d.ts +5 -2
  6. package/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +3 -3
  7. package/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.d.ts +5 -2
  8. package/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.js +15 -11
  9. package/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.d.ts +5 -2
  10. package/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.js +13 -11
  11. package/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.d.ts +5 -2
  12. package/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.js +24 -12
  13. package/SimpleAttribute/SimpleAttribute.js +3 -2
  14. package/SyncedValueHeight/ValueHeightConsumer.js +12 -0
  15. package/{features/crosswalks/AttributesTable/components/SyncedValueHeight → SyncedValueHeight}/ValueHeightReporter.js +12 -6
  16. package/cjs/InlineComplexAttribute/InlineComplexAttribute.js +2 -2
  17. package/cjs/InlineComplexAttribute/InlineComplexAttribute.test.js +7 -7
  18. package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.d.ts +5 -2
  19. package/cjs/ReadOnlyAttributesList/ReadOnlyAttributesList.js +2 -2
  20. package/cjs/ReadOnlyAttributesPager/ReadOnlyAttributesPager.d.ts +5 -2
  21. package/cjs/ReadOnlyAttributesPager/ReadOnlyAttributesPager.js +3 -3
  22. package/cjs/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.d.ts +5 -2
  23. package/cjs/ReadOnlyAttributesPager/components/MultiLineRenderer/MultiLineRenderer.js +15 -11
  24. package/cjs/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.d.ts +5 -2
  25. package/cjs/ReadOnlyAttributesPager/components/OneLineRenderer/OneLineRenderer.js +13 -11
  26. package/cjs/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.d.ts +5 -2
  27. package/cjs/ReadOnlyComplexAttribute/ReadOnlyComplexAttribute.js +23 -11
  28. package/cjs/SimpleAttribute/SimpleAttribute.js +3 -2
  29. package/cjs/SyncedValueHeight/ValueHeightConsumer.js +39 -0
  30. package/cjs/{features/crosswalks/AttributesTable/components/SyncedValueHeight → SyncedValueHeight}/ValueHeightReporter.js +11 -5
  31. package/cjs/contexts/AutoExpandedAttributesContext/index.d.ts +8 -0
  32. package/cjs/contexts/{ExpandedAttributesContext → AutoExpandedAttributesContext}/index.js +8 -8
  33. package/cjs/contexts/{ExpandedAttributesContext/useAttributeExpanded.test.js → AutoExpandedAttributesContext/useAttributeAutoExpanded.test.js} +3 -3
  34. package/cjs/contexts/SyncedExpandedAttributesContext/index.d.ts +12 -0
  35. package/cjs/contexts/SyncedExpandedAttributesContext/index.js +56 -0
  36. package/{features/crosswalks/contexts/SyncedValueHeightsContext.d.ts → cjs/contexts/SyncedValueHeightsContext/index.d.ts} +2 -2
  37. package/cjs/{features/crosswalks/contexts/SyncedValueHeightsContext.js → contexts/SyncedValueHeightsContext/index.js} +10 -15
  38. package/cjs/features/crosswalks/AttributesTable/AttributesTable.js +5 -3
  39. package/cjs/features/crosswalks/AttributesTable/AttributesTable.test-data.d.ts +1 -1
  40. package/cjs/features/crosswalks/AttributesTable/AttributesTable.test-data.js +93 -34
  41. package/cjs/features/crosswalks/AttributesTable/AttributesTable.test.js +290 -56
  42. package/cjs/features/crosswalks/AttributesTable/components/AttributeRule/AttributeRule.d.ts +11 -0
  43. package/cjs/features/crosswalks/AttributesTable/components/AttributeRule/AttributeRule.js +32 -0
  44. package/cjs/features/crosswalks/AttributesTable/components/AttributeRule/AttributeRule.module.css.js +9 -0
  45. package/cjs/features/crosswalks/AttributesTable/components/AttributeRule/index.d.ts +1 -0
  46. package/cjs/features/crosswalks/AttributesTable/components/AttributeRule/index.js +5 -0
  47. package/cjs/features/crosswalks/AttributesTable/components/ComplexRule/ComplexRule.d.ts +10 -0
  48. package/cjs/features/crosswalks/AttributesTable/components/ComplexRule/ComplexRule.js +60 -0
  49. package/cjs/features/crosswalks/AttributesTable/components/ComplexRule/ComplexRule.module.css.js +9 -0
  50. package/cjs/features/crosswalks/AttributesTable/components/ComplexRule/index.d.ts +1 -0
  51. package/cjs/features/crosswalks/AttributesTable/components/ComplexRule/index.js +5 -0
  52. package/cjs/features/crosswalks/AttributesTable/components/OvValuesRenderer/OvValuesRenderer.js +1 -1
  53. package/cjs/features/crosswalks/AttributesTable/components/RuleTypeRenderer/RuleTypeRenderer.d.ts +1 -1
  54. package/cjs/features/crosswalks/AttributesTable/components/RuleTypeRenderer/RuleTypeRenderer.js +5 -64
  55. package/cjs/features/crosswalks/AttributesTable/components/RuleTypeRenderer/RuleTypeRenderer.module.css.js +2 -2
  56. package/cjs/features/crosswalks/AttributesTable/components/SimpleRule/SimpleRule.d.ts +10 -0
  57. package/cjs/features/crosswalks/AttributesTable/components/SimpleRule/SimpleRule.js +94 -0
  58. package/cjs/features/crosswalks/AttributesTable/components/SimpleRule/SimpleRule.module.css.js +9 -0
  59. package/cjs/features/crosswalks/AttributesTable/components/SimpleRule/index.d.ts +1 -0
  60. package/cjs/features/crosswalks/AttributesTable/components/SimpleRule/index.js +5 -0
  61. package/cjs/features/crosswalks/AttributesTable/helpers.d.ts +1 -2
  62. package/cjs/features/crosswalks/AttributesTable/helpers.js +82 -56
  63. package/cjs/features/crosswalks/AttributesTable/helpers.test.js +539 -360
  64. package/cjs/features/crosswalks/AttributesTable/types.d.ts +17 -10
  65. package/cjs/features/crosswalks/AttributesTable/types.js +6 -0
  66. package/cjs/index.d.ts +1 -1
  67. package/cjs/index.js +4 -4
  68. package/contexts/AutoExpandedAttributesContext/index.d.ts +8 -0
  69. package/contexts/AutoExpandedAttributesContext/index.js +11 -0
  70. package/contexts/{ExpandedAttributesContext/useAttributeExpanded.test.js → AutoExpandedAttributesContext/useAttributeAutoExpanded.test.js} +4 -4
  71. package/contexts/SyncedExpandedAttributesContext/index.d.ts +12 -0
  72. package/contexts/SyncedExpandedAttributesContext/index.js +28 -0
  73. package/{cjs/features/crosswalks/contexts/SyncedValueHeightsContext.d.ts → contexts/SyncedValueHeightsContext/index.d.ts} +2 -2
  74. package/{features/crosswalks/contexts/SyncedValueHeightsContext.js → contexts/SyncedValueHeightsContext/index.js} +9 -13
  75. package/features/crosswalks/AttributesTable/AttributesTable.js +5 -3
  76. package/features/crosswalks/AttributesTable/AttributesTable.test-data.d.ts +1 -1
  77. package/features/crosswalks/AttributesTable/AttributesTable.test-data.js +91 -32
  78. package/features/crosswalks/AttributesTable/AttributesTable.test.js +291 -57
  79. package/features/crosswalks/AttributesTable/components/AttributeRule/AttributeRule.d.ts +11 -0
  80. package/features/crosswalks/AttributesTable/components/AttributeRule/AttributeRule.js +25 -0
  81. package/features/crosswalks/AttributesTable/components/AttributeRule/AttributeRule.module.css.js +9 -0
  82. package/features/crosswalks/AttributesTable/components/AttributeRule/index.d.ts +1 -0
  83. package/features/crosswalks/AttributesTable/components/AttributeRule/index.js +1 -0
  84. package/features/crosswalks/AttributesTable/components/ComplexRule/ComplexRule.d.ts +10 -0
  85. package/features/crosswalks/AttributesTable/components/ComplexRule/ComplexRule.js +30 -0
  86. package/features/crosswalks/AttributesTable/components/ComplexRule/ComplexRule.module.css.js +9 -0
  87. package/features/crosswalks/AttributesTable/components/ComplexRule/index.d.ts +1 -0
  88. package/features/crosswalks/AttributesTable/components/ComplexRule/index.js +1 -0
  89. package/features/crosswalks/AttributesTable/components/OvValuesRenderer/OvValuesRenderer.js +1 -1
  90. package/features/crosswalks/AttributesTable/components/RuleTypeRenderer/RuleTypeRenderer.d.ts +1 -1
  91. package/features/crosswalks/AttributesTable/components/RuleTypeRenderer/RuleTypeRenderer.js +6 -65
  92. package/features/crosswalks/AttributesTable/components/RuleTypeRenderer/RuleTypeRenderer.module.css.js +2 -2
  93. package/features/crosswalks/AttributesTable/components/SimpleRule/SimpleRule.d.ts +10 -0
  94. package/features/crosswalks/AttributesTable/components/SimpleRule/SimpleRule.js +64 -0
  95. package/features/crosswalks/AttributesTable/components/SimpleRule/SimpleRule.module.css.js +9 -0
  96. package/features/crosswalks/AttributesTable/components/SimpleRule/index.d.ts +1 -0
  97. package/features/crosswalks/AttributesTable/components/SimpleRule/index.js +1 -0
  98. package/features/crosswalks/AttributesTable/helpers.d.ts +1 -2
  99. package/features/crosswalks/AttributesTable/helpers.js +82 -55
  100. package/features/crosswalks/AttributesTable/helpers.test.js +540 -361
  101. package/features/crosswalks/AttributesTable/types.d.ts +17 -10
  102. package/features/crosswalks/AttributesTable/types.js +5 -1
  103. package/index.d.ts +1 -1
  104. package/index.js +1 -1
  105. package/package.json +1 -1
  106. package/cjs/contexts/ExpandedAttributesContext/index.d.ts +0 -8
  107. package/cjs/features/crosswalks/AttributesTable/components/SyncedValueHeight/ValueHeightConsumer.js +0 -15
  108. package/contexts/ExpandedAttributesContext/index.d.ts +0 -8
  109. package/contexts/ExpandedAttributesContext/index.js +0 -11
  110. package/features/crosswalks/AttributesTable/components/SyncedValueHeight/ValueHeightConsumer.js +0 -8
  111. /package/{cjs/features/crosswalks/AttributesTable/components/SyncedValueHeight → SyncedValueHeight}/ValueHeightConsumer.d.ts +0 -0
  112. /package/{cjs/features/crosswalks/AttributesTable/components/SyncedValueHeight → SyncedValueHeight}/ValueHeightReporter.d.ts +0 -0
  113. /package/{cjs/features/crosswalks/AttributesTable/components/SyncedValueHeight → SyncedValueHeight}/index.d.ts +0 -0
  114. /package/{features/crosswalks/AttributesTable/components/SyncedValueHeight → SyncedValueHeight}/index.js +0 -0
  115. /package/{features/crosswalks/AttributesTable/components → cjs}/SyncedValueHeight/ValueHeightConsumer.d.ts +0 -0
  116. /package/{features/crosswalks/AttributesTable/components → cjs}/SyncedValueHeight/ValueHeightReporter.d.ts +0 -0
  117. /package/{features/crosswalks/AttributesTable/components → cjs}/SyncedValueHeight/index.d.ts +0 -0
  118. /package/cjs/{features/crosswalks/AttributesTable/components/SyncedValueHeight → SyncedValueHeight}/index.js +0 -0
  119. /package/cjs/contexts/{ExpandedAttributesContext/useAttributeExpanded.test.d.ts → AutoExpandedAttributesContext/useAttributeAutoExpanded.test.d.ts} +0 -0
  120. /package/contexts/{ExpandedAttributesContext/useAttributeExpanded.test.d.ts → AutoExpandedAttributesContext/useAttributeAutoExpanded.test.d.ts} +0 -0
@@ -0,0 +1,60 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ComplexRule = void 0;
30
+ var react_1 = __importStar(require("react"));
31
+ var mdm_sdk_1 = require("@reltio/mdm-sdk");
32
+ var ArrowExpandButton_1 = require("../../../../../ArrowExpandButton");
33
+ var BranchDecorator_1 = require("../../../../../BranchDecorator");
34
+ var SyncedExpandedAttributesContext_1 = require("../../../../../contexts/SyncedExpandedAttributesContext");
35
+ var MdmModuleContext_1 = require("../../../../../contexts/MdmModuleContext");
36
+ var SimpleRule_1 = require("../SimpleRule");
37
+ var AttributeRule_1 = require("../AttributeRule");
38
+ var ComplexRule_module_css_1 = __importDefault(require("./ComplexRule.module.css"));
39
+ var ComplexRule = function (_a) {
40
+ var attributeType = _a.attributeType, attributeValue = _a.attributeValue, getRuleTypeData = _a.getRuleTypeData;
41
+ var metadata = (0, MdmModuleContext_1.useMdmMetadata)();
42
+ var expandedContext = (0, SyncedExpandedAttributesContext_1.useSyncedExpandedAttributes)();
43
+ var attributeUri = attributeValue.uri;
44
+ var expanded = expandedContext ? expandedContext.isExpanded(attributeUri) : false;
45
+ var toggle = (0, react_1.useCallback)(function () {
46
+ if (expandedContext && attributeUri) {
47
+ expandedContext.toggle(attributeUri);
48
+ }
49
+ }, [expandedContext, attributeUri]);
50
+ var subAttributes = (0, mdm_sdk_1.getAttributeTypeSubAttributes)(metadata, attributeType);
51
+ var entity = { attributes: attributeValue.value };
52
+ var attributesList = (0, mdm_sdk_1.getAttributesListForReadMode)(subAttributes, entity, false, []);
53
+ return (react_1.default.createElement("div", null,
54
+ react_1.default.createElement("div", { className: ComplexRule_module_css_1.default.expandableRule },
55
+ react_1.default.createElement(ArrowExpandButton_1.ArrowExpandButton, { expanded: expanded, onClick: toggle }),
56
+ react_1.default.createElement(SimpleRule_1.SimpleRule, { attributeValue: attributeValue, attributeType: attributeType, getRuleTypeData: getRuleTypeData })),
57
+ expanded && (react_1.default.createElement("div", null, attributesList.map(function (item) { return (react_1.default.createElement(BranchDecorator_1.BranchDecorator, { key: item.attrType.uri, enabled: true, className: ComplexRule_module_css_1.default.rulePaddingWrapper },
58
+ react_1.default.createElement(AttributeRule_1.AttributeRule, { attributeType: item.attrType, values: item.values, getRuleTypeData: getRuleTypeData, parentUri: attributeUri }))); })))));
59
+ };
60
+ exports.ComplexRule = ComplexRule;
@@ -0,0 +1,9 @@
1
+ const styles = {"expandableRule":"ComplexRule-expandableRule--p9mC6","rulePaddingWrapper":"ComplexRule-rulePaddingWrapper--fBmSa"};
2
+ if (typeof document !== 'undefined') {
3
+ const head = document.head || document.getElementsByTagName('head')[0]
4
+ const style = document.createElement('style');
5
+ style.type = 'text/css'
6
+ style.innerHTML = `.ComplexRule-expandableRule--p9mC6{align-items:center;display:flex;min-height:18px}.ComplexRule-rulePaddingWrapper--fBmSa{padding-bottom:1px}.ComplexRule-rulePaddingWrapper--fBmSa:last-child{padding-bottom:2px}`;
7
+ head.appendChild(style);
8
+ }
9
+ module.exports = styles;
@@ -0,0 +1 @@
1
+ export { ComplexRule } from './ComplexRule';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ComplexRule = void 0;
4
+ var ComplexRule_1 = require("./ComplexRule");
5
+ Object.defineProperty(exports, "ComplexRule", { enumerable: true, get: function () { return ComplexRule_1.ComplexRule; } });
@@ -24,7 +24,7 @@ var EntityContext_1 = require("../../../../../contexts/EntityContext");
24
24
  var MdmModuleContext_1 = require("../../../../../contexts/MdmModuleContext");
25
25
  var FallbackIndicator_1 = require("../FallbackIndicator");
26
26
  var styles_1 = require("../../styles");
27
- var SyncedValueHeight_1 = require("../SyncedValueHeight");
27
+ var SyncedValueHeight_1 = require("../../../../../SyncedValueHeight");
28
28
  var styles_2 = require("./styles");
29
29
  var OvValuesRenderer = function (_a) {
30
30
  var _b = _a.value, values = _b.values, attributeType = _b.attributeType, someRowIsDragging = _a.someRowIsDragging, draggableProps = _a.draggableProps;
@@ -3,5 +3,5 @@ import { RuleTypeValues } from '../../types';
3
3
  type Props = {
4
4
  value: RuleTypeValues;
5
5
  };
6
- export declare const RuleTypeRenderer: ({ value: { ruleTypes } }: Props) => React.JSX.Element;
6
+ export declare const RuleTypeRenderer: ({ value: { attributeType, attributeValues, getRuleTypeData } }: Props) => React.JSX.Element;
7
7
  export {};
@@ -2,78 +2,19 @@
2
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
- var _a;
6
5
  Object.defineProperty(exports, "__esModule", { value: true });
7
6
  exports.RuleTypeRenderer = void 0;
8
7
  var react_1 = __importDefault(require("react"));
9
- var ui_i18n_1 = __importDefault(require("ui-i18n"));
10
8
  var classnames_1 = __importDefault(require("classnames"));
11
- var Info_1 = __importDefault(require("@mui/icons-material/Info"));
12
9
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
13
- var withTooltip_1 = require("../../../../../HOCs/withTooltip");
14
- var RuleTypeInfoButton_1 = require("../RuleTypeInfoButton");
15
10
  var styles_1 = require("../../styles");
16
- var SyncedValueHeight_1 = require("../SyncedValueHeight");
11
+ var SyncedValueHeight_1 = require("../../../../../SyncedValueHeight");
12
+ var SimpleRule_1 = require("../SimpleRule");
13
+ var ComplexRule_1 = require("../ComplexRule");
17
14
  var RuleTypeRenderer_module_css_1 = __importDefault(require("./RuleTypeRenderer.module.css"));
18
- var InfoIconWithTooltip = (0, withTooltip_1.withTooltip)(Info_1.default);
19
- var PARTICIPATION_STATUS_MAP = (_a = {},
20
- Object.defineProperty(_a, mdm_sdk_1.ParticipationStatus.Pinned, {
21
- get: function () {
22
- return ui_i18n_1.default.text("Value survives because 'pin' flag is set. Survivorship not evaluated");
23
- },
24
- enumerable: false,
25
- configurable: true
26
- }),
27
- Object.defineProperty(_a, mdm_sdk_1.ParticipationStatus.Ignored, {
28
- get: function () {
29
- return ui_i18n_1.default.text("Value did not participate in survivorship evaluation because 'ignore' flag is set");
30
- },
31
- enumerable: false,
32
- configurable: true
33
- }),
34
- Object.defineProperty(_a, mdm_sdk_1.ParticipationStatus.EndDatedCrosswalk, {
35
- get: function () {
36
- return ui_i18n_1.default.text("Value did not participate in survivorship evaluation because it's crosswalk is end-dated");
37
- },
38
- enumerable: false,
39
- configurable: true
40
- }),
41
- Object.defineProperty(_a, mdm_sdk_1.ParticipationStatus.NotParticipating, {
42
- get: function () {
43
- return ui_i18n_1.default.text('Value did not participate in survivorship evaluation because another value was pinned or the source was ignored');
44
- },
45
- enumerable: false,
46
- configurable: true
47
- }),
48
- _a);
49
15
  var RuleTypeRenderer = function (_a) {
50
- var ruleTypes = _a.value.ruleTypes;
16
+ var _b = _a.value, attributeType = _b.attributeType, attributeValues = _b.attributeValues, getRuleTypeData = _b.getRuleTypeData;
51
17
  var commonStyles = (0, styles_1.useCommonStyles)();
52
- var renderStrategy = function (data) {
53
- var strategy = data.strategy, primaryAttributeUri = data.primaryAttributeUri, comparisonAttributeUri = data.comparisonAttributeUri, sourcesUriOrder = data.sourcesUriOrder;
54
- if (!strategy)
55
- return null;
56
- var showInfoIcon = sourcesUriOrder || primaryAttributeUri || comparisonAttributeUri;
57
- return (react_1.default.createElement("div", { className: RuleTypeRenderer_module_css_1.default.strategyItem },
58
- react_1.default.createElement("div", { className: RuleTypeRenderer_module_css_1.default.label }, strategy.label),
59
- showInfoIcon && (react_1.default.createElement(RuleTypeInfoButton_1.RuleTypeInfoButton, { info: {
60
- sourcesUriOrder: sourcesUriOrder,
61
- primaryAttributeUri: primaryAttributeUri,
62
- comparisonAttributeUri: comparisonAttributeUri
63
- } }))));
64
- };
65
- var renderStatus = function (participationStatus) {
66
- var description = PARTICIPATION_STATUS_MAP[participationStatus];
67
- return (react_1.default.createElement("div", { className: RuleTypeRenderer_module_css_1.default.statusItem },
68
- ui_i18n_1.default.text('N/A'),
69
- description && react_1.default.createElement(InfoIconWithTooltip, { className: RuleTypeRenderer_module_css_1.default.infoIcon, tooltipTitle: description })));
70
- };
71
- var renderRuleType = function (item) {
72
- if (item.type === 'status') {
73
- return renderStatus(item.data);
74
- }
75
- return renderStrategy(item.data);
76
- };
77
- return (react_1.default.createElement("div", { className: (0, classnames_1.default)(RuleTypeRenderer_module_css_1.default.list, commonStyles.basicCell) }, ruleTypes.map(function (item) { return (react_1.default.createElement(SyncedValueHeight_1.ValueHeightConsumer, { key: item.valueUri, uri: item.valueUri }, renderRuleType(item))); })));
18
+ return (react_1.default.createElement("div", { className: (0, classnames_1.default)(RuleTypeRenderer_module_css_1.default.list, commonStyles.basicCell) }, attributeValues.length === 0 ? (react_1.default.createElement(SimpleRule_1.SimpleRule, { attributeType: attributeType, getRuleTypeData: getRuleTypeData })) : (attributeValues.map(function (attributeValue) { return (react_1.default.createElement(SyncedValueHeight_1.ValueHeightConsumer, { key: attributeValue.uri, uri: attributeValue.uri }, (0, mdm_sdk_1.isComplexAttribute)(attributeType) ? (react_1.default.createElement(ComplexRule_1.ComplexRule, { attributeType: attributeType, attributeValue: attributeValue, getRuleTypeData: getRuleTypeData })) : (react_1.default.createElement(SimpleRule_1.SimpleRule, { attributeType: attributeType, attributeValue: attributeValue, getRuleTypeData: getRuleTypeData })))); }))));
78
19
  };
79
20
  exports.RuleTypeRenderer = RuleTypeRenderer;
@@ -1,9 +1,9 @@
1
- const styles = {"list":"RuleTypeRenderer-list--IejtI","label":"RuleTypeRenderer-label--9oONL","strategyItem":"RuleTypeRenderer-strategyItem--yfhkv","statusItem":"RuleTypeRenderer-statusItem--R23Qz","infoIcon":"RuleTypeRenderer-infoIcon--LVMk6"};
1
+ const styles = {"list":"RuleTypeRenderer-list--IejtI"};
2
2
  if (typeof document !== 'undefined') {
3
3
  const head = document.head || document.getElementsByTagName('head')[0]
4
4
  const style = document.createElement('style');
5
5
  style.type = 'text/css'
6
- style.innerHTML = `.RuleTypeRenderer-list--IejtI:before{content:"";display:block;height:20px}.RuleTypeRenderer-list--IejtI>div+div{margin-top:4px}.RuleTypeRenderer-label--9oONL{margin-right:5px}.RuleTypeRenderer-statusItem--R23Qz,.RuleTypeRenderer-strategyItem--yfhkv{align-items:center;display:flex}.RuleTypeRenderer-infoIcon--LVMk6{color:var(--mui-palette-text-secondary);height:16px;margin-left:4px;width:16px}`;
6
+ style.innerHTML = `.RuleTypeRenderer-list--IejtI{font-size:13px;line-height:16px}.RuleTypeRenderer-list--IejtI:before{content:"";display:block;height:20px}.RuleTypeRenderer-list--IejtI>div+div{margin-top:4px}`;
7
7
  head.appendChild(style);
8
8
  }
9
9
  module.exports = styles;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { AttributeType } from '@reltio/mdm-sdk';
3
+ import { AttributeValueLite, RuleTypeValues } from '../../types';
4
+ type Props = {
5
+ attributeType: AttributeType;
6
+ attributeValue?: AttributeValueLite;
7
+ getRuleTypeData: RuleTypeValues['getRuleTypeData'];
8
+ };
9
+ export declare const SimpleRule: ({ attributeType, attributeValue, getRuleTypeData }: Props) => React.JSX.Element;
10
+ export {};
@@ -0,0 +1,94 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ var _a;
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.SimpleRule = void 0;
31
+ var react_1 = __importStar(require("react"));
32
+ var ui_i18n_1 = __importDefault(require("ui-i18n"));
33
+ var Info_1 = __importDefault(require("@mui/icons-material/Info"));
34
+ var mdm_sdk_1 = require("@reltio/mdm-sdk");
35
+ var withTooltip_1 = require("../../../../../HOCs/withTooltip");
36
+ var types_1 = require("../../types");
37
+ var RuleTypeInfoButton_1 = require("../RuleTypeInfoButton");
38
+ var SimpleRule_module_css_1 = __importDefault(require("./SimpleRule.module.css"));
39
+ var InfoIconWithTooltip = (0, withTooltip_1.withTooltip)(Info_1.default);
40
+ var PARTICIPATION_STATUS_MAP = (_a = {},
41
+ Object.defineProperty(_a, mdm_sdk_1.ParticipationStatus.Pinned, {
42
+ get: function () {
43
+ return ui_i18n_1.default.text("Value survives because 'pin' flag is set. Survivorship not evaluated");
44
+ },
45
+ enumerable: false,
46
+ configurable: true
47
+ }),
48
+ Object.defineProperty(_a, mdm_sdk_1.ParticipationStatus.Ignored, {
49
+ get: function () {
50
+ return ui_i18n_1.default.text("Value did not participate in survivorship evaluation because 'ignore' flag is set");
51
+ },
52
+ enumerable: false,
53
+ configurable: true
54
+ }),
55
+ Object.defineProperty(_a, mdm_sdk_1.ParticipationStatus.EndDatedCrosswalk, {
56
+ get: function () {
57
+ return ui_i18n_1.default.text('Value did not participate in survivorship evaluation because its crosswalk is end-dated');
58
+ },
59
+ enumerable: false,
60
+ configurable: true
61
+ }),
62
+ Object.defineProperty(_a, mdm_sdk_1.ParticipationStatus.NotParticipating, {
63
+ get: function () {
64
+ return ui_i18n_1.default.text('Value did not participate in survivorship evaluation because another value was pinned or the source was ignored');
65
+ },
66
+ enumerable: false,
67
+ configurable: true
68
+ }),
69
+ _a);
70
+ var SimpleRule = function (_a) {
71
+ var attributeType = _a.attributeType, attributeValue = _a.attributeValue, getRuleTypeData = _a.getRuleTypeData;
72
+ var renderStrategy = (0, react_1.useCallback)(function (data) {
73
+ var strategy = data.strategy, primaryAttributeUri = data.primaryAttributeUri, comparisonAttributeUri = data.comparisonAttributeUri, sourcesUriOrder = data.sourcesUriOrder;
74
+ if (!strategy)
75
+ return null;
76
+ var showInfoIcon = sourcesUriOrder || primaryAttributeUri || comparisonAttributeUri;
77
+ return (react_1.default.createElement("div", { className: SimpleRule_module_css_1.default.strategyItem },
78
+ react_1.default.createElement("div", { className: SimpleRule_module_css_1.default.label }, strategy.label),
79
+ showInfoIcon && (react_1.default.createElement(RuleTypeInfoButton_1.RuleTypeInfoButton, { info: {
80
+ sourcesUriOrder: sourcesUriOrder,
81
+ primaryAttributeUri: primaryAttributeUri,
82
+ comparisonAttributeUri: comparisonAttributeUri
83
+ } }))));
84
+ }, []);
85
+ var renderStatus = (0, react_1.useCallback)(function (participationStatus) {
86
+ var description = PARTICIPATION_STATUS_MAP[participationStatus];
87
+ return (react_1.default.createElement("div", { className: SimpleRule_module_css_1.default.statusItem },
88
+ ui_i18n_1.default.text('N/A'),
89
+ description && react_1.default.createElement(InfoIconWithTooltip, { className: SimpleRule_module_css_1.default.infoIcon, tooltipTitle: description })));
90
+ }, []);
91
+ var _b = getRuleTypeData(attributeType, attributeValue), type = _b.type, data = _b.data;
92
+ return type === types_1.RuleItemType.Status ? renderStatus(data) : renderStrategy(data);
93
+ };
94
+ exports.SimpleRule = SimpleRule;
@@ -0,0 +1,9 @@
1
+ const styles = {"label":"SimpleRule-label--UMv66","strategyItem":"SimpleRule-strategyItem--3WO1E","statusItem":"SimpleRule-statusItem--tkZgO","infoIcon":"SimpleRule-infoIcon--zFQFu"};
2
+ if (typeof document !== 'undefined') {
3
+ const head = document.head || document.getElementsByTagName('head')[0]
4
+ const style = document.createElement('style');
5
+ style.type = 'text/css'
6
+ style.innerHTML = `.SimpleRule-label--UMv66{margin-right:5px;white-space:nowrap}.SimpleRule-statusItem--tkZgO,.SimpleRule-strategyItem--3WO1E{align-items:center;display:flex}.SimpleRule-infoIcon--zFQFu{color:var(--mui-palette-text-secondary);height:16px;margin-left:4px;width:16px}`;
7
+ head.appendChild(style);
8
+ }
9
+ module.exports = styles;
@@ -0,0 +1 @@
1
+ export { SimpleRule } from './SimpleRule';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SimpleRule = void 0;
4
+ var SimpleRule_1 = require("./SimpleRule");
5
+ Object.defineProperty(exports, "SimpleRule", { enumerable: true, get: function () { return SimpleRule_1.SimpleRule; } });
@@ -1,7 +1,7 @@
1
1
  import { AppliedSurvivorshipRule, AttributeType, AttributeValue, Crosswalk, Metadata, OvDetails, RecordAttributesType } from '@reltio/mdm-sdk';
2
2
  import { CrosswalksMap } from '../../../types';
3
3
  import { CrosswalksByOwnerTypeMap } from '../types';
4
- import { AttributesTableRowValue, RuleTypeValues } from './types';
4
+ import { AttributesTableRowValue } from './types';
5
5
  export declare const COLUMNS_DATA: ({
6
6
  id: string;
7
7
  readonly label: string;
@@ -31,7 +31,6 @@ export declare const DEFAULT_VISIBLE_COLUMNS: string[];
31
31
  export declare const countAttributeValues: (type: string, values: AttributeValue[], crosswalksMap: CrosswalksMap) => number;
32
32
  export declare const collectRuleNames: (rule: AppliedSurvivorshipRule | undefined) => string[];
33
33
  export declare const getFallbackLabels: (metadata: Metadata, ovDetails: OvDetails) => string[];
34
- export declare const getRuleTypeValues: (metadata: Metadata, attributeType: AttributeType, parentTypeUri: string, attributeValues: AttributeValue[], activeSurvivorshipGroupUri?: string) => RuleTypeValues;
35
34
  export declare const getWinnerCrosswalks: (attributeValues: AttributeValue[], crosswalksMap: CrosswalksMap) => Crosswalk[];
36
35
  export declare const getBasicTableColumnsData: any;
37
36
  export declare const getBasicTableRowsData: (metadata: Metadata, parentTypeUri: string, attrTypes: AttributeType[], columns: string[], crosswalksMap: CrosswalksByOwnerTypeMap, attributes: RecordAttributesType, activeSurvivorshipGroupUri?: string) => AttributesTableRowValue[];
@@ -1,15 +1,4 @@
1
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
2
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
3
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
4
  if (ar || !(i in from)) {
@@ -23,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
23
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
13
  };
25
14
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getBasicTableRowsData = exports.getBasicTableColumnsData = exports.getWinnerCrosswalks = exports.getRuleTypeValues = exports.getFallbackLabels = exports.collectRuleNames = exports.countAttributeValues = exports.DEFAULT_VISIBLE_COLUMNS = exports.COLUMNS_DATA = void 0;
15
+ exports.getBasicTableRowsData = exports.getBasicTableColumnsData = exports.getWinnerCrosswalks = exports.getFallbackLabels = exports.collectRuleNames = exports.countAttributeValues = exports.DEFAULT_VISIBLE_COLUMNS = exports.COLUMNS_DATA = void 0;
27
16
  var ui_i18n_1 = __importDefault(require("ui-i18n"));
28
17
  var ramda_1 = require("ramda");
29
18
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
@@ -35,6 +24,7 @@ var OvValuesRenderer_1 = require("./components/OvValuesRenderer");
35
24
  var CountRenderer_1 = require("./components/CountRenderer");
36
25
  var RuleTypeRenderer_1 = require("./components/RuleTypeRenderer");
37
26
  var WinnerSourcesRenderer_1 = require("./components/WinnerSourcesRenderer");
27
+ var types_1 = require("./types");
38
28
  exports.COLUMNS_DATA = [
39
29
  {
40
30
  id: 'ovValues',
@@ -151,7 +141,8 @@ var getFallbackLabels = function (metadata, ovDetails) {
151
141
  return rules.map(function (uri) { var _a; return ((_a = (0, mdm_sdk_1.getSurvivorshipStrategy)(metadata, uri)) === null || _a === void 0 ? void 0 : _a.label) || uri; });
152
142
  };
153
143
  exports.getFallbackLabels = getFallbackLabels;
154
- var getStrategyAdditionalFields = function (metadata, strategy, mapping, attributeType, currentSurvivorshipGroup) {
144
+ var createRuleTypeData = function (_a) {
145
+ var metadata = _a.metadata, strategy = _a.strategy, mapping = _a.mapping, attributeType = _a.attributeType, currentSurvivorshipGroup = _a.currentSurvivorshipGroup;
155
146
  var fixUri = fixReferencedAttributeUri(attributeType);
156
147
  var primaryAttributeUri = isOtherAttributeWinnerRule(strategy) ? fixUri(mapping === null || mapping === void 0 ? void 0 : mapping.primaryAttributeUri) : undefined;
157
148
  var comparisonAttributeUri = (0, mdm_sdk_1.isComplexAttribute)(attributeType) && isMinMaxValueRule(strategy)
@@ -161,62 +152,91 @@ var getStrategyAdditionalFields = function (metadata, strategy, mapping, attribu
161
152
  ? (0, ramda_1.uniq)(__spreadArray(__spreadArray(__spreadArray([], ((mapping === null || mapping === void 0 ? void 0 : mapping.sourcesUriOrder) || []), true), ((currentSurvivorshipGroup === null || currentSurvivorshipGroup === void 0 ? void 0 : currentSurvivorshipGroup.sourcesUriOrder) || []), true), getSourcesUriOrderFromMetadata(metadata), true))
162
153
  : undefined;
163
154
  return {
164
- primaryAttributeUri: primaryAttributeUri,
165
- comparisonAttributeUri: comparisonAttributeUri,
166
- sourcesUriOrder: sourcesUriOrder
155
+ type: types_1.RuleItemType.Rule,
156
+ data: {
157
+ strategy: strategy,
158
+ primaryAttributeUri: primaryAttributeUri,
159
+ comparisonAttributeUri: comparisonAttributeUri,
160
+ sourcesUriOrder: sourcesUriOrder
161
+ }
167
162
  };
168
163
  };
169
- var getAppliedSurvivorshipRules = function (metadata, mapping, attributeType, attributeValues, currentSurvivorshipGroup) {
170
- if ((0, mdm_sdk_1.isComplexAttribute)(attributeType) || !attributeValues) {
171
- return [];
164
+ var mapAttributeToRuleType = function (_a) {
165
+ var metadata = _a.metadata, attributeType = _a.attributeType, attributeValue = _a.attributeValue, mapping = _a.mapping, currentSurvivorshipGroup = _a.currentSurvivorshipGroup;
166
+ var ovDetails = attributeValue.ovDetails;
167
+ if (!ovDetails) {
168
+ return null;
172
169
  }
173
- return (0, ramda_1.pipe)((0, ramda_1.filter)(isOvValue), (0, ramda_1.map)(function (value) {
174
- var ovDetails = value.ovDetails;
175
- if (!ovDetails || !ovDetails.appliedSurvivorshipRules) {
176
- return null;
177
- }
178
- if (ovDetails.participationStatus === mdm_sdk_1.ParticipationStatus.Strategy) {
179
- return { type: 'rule', data: ovDetails.appliedSurvivorshipRules, valueUri: value.uri };
180
- }
181
- return { type: 'status', data: ovDetails.participationStatus, valueUri: value.uri };
182
- }), (0, ramda_1.reject)(ramda_1.isNil), (0, ramda_1.map)(function (ruleOrStatus) {
183
- if (ruleOrStatus.type === 'status') {
184
- return ruleOrStatus;
185
- }
186
- var appliedRules = (0, exports.collectRuleNames)(ruleOrStatus.data);
170
+ if (ovDetails.participationStatus === mdm_sdk_1.ParticipationStatus.Strategy) {
171
+ var appliedRules = (0, exports.collectRuleNames)(ovDetails.appliedSurvivorshipRules);
187
172
  var lastRule = (0, mdm_sdk_1.getSurvivorshipStrategy)(metadata, (0, ramda_1.last)(appliedRules));
188
173
  return lastRule
189
- ? {
190
- type: 'rule',
191
- valueUri: ruleOrStatus.valueUri,
192
- data: __assign({ strategy: lastRule }, getStrategyAdditionalFields(metadata, lastRule, mapping, attributeType, currentSurvivorshipGroup))
193
- }
174
+ ? createRuleTypeData({
175
+ metadata: metadata,
176
+ strategy: lastRule,
177
+ mapping: mapping,
178
+ attributeType: attributeType,
179
+ currentSurvivorshipGroup: currentSurvivorshipGroup
180
+ })
194
181
  : null;
195
- }), (0, ramda_1.reject)(ramda_1.isNil))(attributeValues);
182
+ }
183
+ return {
184
+ type: types_1.RuleItemType.Status,
185
+ data: ovDetails.participationStatus
186
+ };
187
+ };
188
+ var getOvAttributeValues = function (attributeValues) {
189
+ if (!attributeValues) {
190
+ return [];
191
+ }
192
+ return (0, ramda_1.pipe)((0, ramda_1.filter)(isOvValue), (0, ramda_1.filter)((0, ramda_1.has)('ovDetails')), (0, ramda_1.map)((0, ramda_1.pick)(['uri', 'value', 'ovDetails'])))(attributeValues);
196
193
  };
197
- var getRuleTypeValues = function (metadata, attributeType, parentTypeUri, attributeValues, activeSurvivorshipGroupUri) {
198
- var _a, _b, _c, _d;
194
+ var getRuleTypeValues = function (_a) {
195
+ var _b, _c;
196
+ var metadata = _a.metadata, attributeType = _a.attributeType, parentTypeUri = _a.parentTypeUri, attributeValues = _a.attributeValues, activeSurvivorshipGroupUri = _a.activeSurvivorshipGroupUri;
199
197
  var parentType = __spreadArray(__spreadArray([], metadata.entityTypes, true), (metadata.relationTypes || []), true).find((0, ramda_1.propEq)('uri', parentTypeUri));
200
- var survivorshipGroups = (_a = parentType === null || parentType === void 0 ? void 0 : parentType.survivorshipGroups) !== null && _a !== void 0 ? _a : [];
198
+ var survivorshipGroups = (_b = parentType === null || parentType === void 0 ? void 0 : parentType.survivorshipGroups) !== null && _b !== void 0 ? _b : [];
201
199
  var currentSurvivorshipGroup = (activeSurvivorshipGroupUri && survivorshipGroups.find((0, ramda_1.propEq)('uri', activeSurvivorshipGroupUri))) ||
202
200
  survivorshipGroups.find((0, ramda_1.propEq)('default', true));
203
- var mapping = (_b = currentSurvivorshipGroup === null || currentSurvivorshipGroup === void 0 ? void 0 : currentSurvivorshipGroup.mapping) === null || _b === void 0 ? void 0 : _b.find((0, ramda_1.propEq)('attribute', attributeType.uri));
204
- var defaultRuleType = (0, mdm_sdk_1.getSurvivorshipStrategy)(metadata, mapping === null || mapping === void 0 ? void 0 : mapping.survivorshipStrategy) || (0, mdm_sdk_1.getDefaultSurvivorshipStrategy)(metadata);
205
- var appliedSurvivorshipRules = getAppliedSurvivorshipRules(metadata, mapping, attributeType, attributeValues, currentSurvivorshipGroup);
206
- if (appliedSurvivorshipRules.length > 0) {
207
- return { ruleTypes: appliedSurvivorshipRules };
201
+ var mapping = (_c = currentSurvivorshipGroup === null || currentSurvivorshipGroup === void 0 ? void 0 : currentSurvivorshipGroup.mapping) === null || _c === void 0 ? void 0 : _c.find((0, ramda_1.propEq)('attribute', attributeType.uri));
202
+ var defaultSurvivorshipStrategy = (0, mdm_sdk_1.getSurvivorshipStrategy)(metadata, mapping === null || mapping === void 0 ? void 0 : mapping.survivorshipStrategy) || (0, mdm_sdk_1.getDefaultSurvivorshipStrategy)(metadata);
203
+ var defaultRuleType = createRuleTypeData({
204
+ metadata: metadata,
205
+ strategy: defaultSurvivorshipStrategy,
206
+ mapping: mapping,
207
+ attributeType: attributeType,
208
+ currentSurvivorshipGroup: currentSurvivorshipGroup
209
+ });
210
+ var ovAttributeValues = getOvAttributeValues(attributeValues);
211
+ var getRuleTypeData = function (attrType, attrValue) {
212
+ var _a, _b;
213
+ if (!(attrValue === null || attrValue === void 0 ? void 0 : attrValue.ovDetails)) {
214
+ return defaultRuleType;
215
+ }
216
+ var mappingForAttr = attrType.uri === attributeType.uri
217
+ ? mapping
218
+ : (_a = currentSurvivorshipGroup === null || currentSurvivorshipGroup === void 0 ? void 0 : currentSurvivorshipGroup.mapping) === null || _a === void 0 ? void 0 : _a.find((0, ramda_1.propEq)('attribute', attrType.uri));
219
+ return ((_b = mapAttributeToRuleType({
220
+ metadata: metadata,
221
+ attributeType: attrType,
222
+ attributeValue: attrValue,
223
+ mapping: mappingForAttr,
224
+ currentSurvivorshipGroup: currentSurvivorshipGroup
225
+ })) !== null && _b !== void 0 ? _b : defaultRuleType);
226
+ };
227
+ if (ovAttributeValues.length > 0) {
228
+ return {
229
+ attributeType: attributeType,
230
+ attributeValues: ovAttributeValues,
231
+ getRuleTypeData: getRuleTypeData
232
+ };
208
233
  }
209
234
  return {
210
- ruleTypes: [
211
- {
212
- type: 'rule',
213
- valueUri: (_d = (_c = attributeValues === null || attributeValues === void 0 ? void 0 : attributeValues[0]) === null || _c === void 0 ? void 0 : _c.uri) !== null && _d !== void 0 ? _d : '',
214
- data: __assign({ strategy: defaultRuleType }, getStrategyAdditionalFields(metadata, defaultRuleType, mapping, attributeType, currentSurvivorshipGroup))
215
- }
216
- ]
235
+ attributeType: attributeType,
236
+ attributeValues: [],
237
+ getRuleTypeData: getRuleTypeData
217
238
  };
218
239
  };
219
- exports.getRuleTypeValues = getRuleTypeValues;
220
240
  var getWinnerCrosswalks = function (attributeValues, crosswalksMap) {
221
241
  if (attributeValues === void 0) { attributeValues = []; }
222
242
  return (0, ramda_1.pipe)((0, ramda_1.filter)(isOvValue), (0, ramda_1.chain)(function (value) {
@@ -260,7 +280,13 @@ var getRowValueForColumn = function (columnId, metadata, parentTypeUri, attribut
260
280
  case 'count':
261
281
  return (0, exports.countAttributeValues)(attributeType.type, attributeValues, crosswalksMap);
262
282
  case 'ruleType':
263
- return (0, exports.getRuleTypeValues)(metadata, attributeType, parentTypeUri, attributeValues, activeSurvivorshipGroupUri);
283
+ return getRuleTypeValues({
284
+ metadata: metadata,
285
+ attributeType: attributeType,
286
+ parentTypeUri: parentTypeUri,
287
+ attributeValues: attributeValues,
288
+ activeSurvivorshipGroupUri: activeSurvivorshipGroupUri
289
+ });
264
290
  case 'winnerSources':
265
291
  return { crosswalks: (0, exports.getWinnerCrosswalks)(attributeValues, crosswalksMap) };
266
292
  default: