@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
@@ -3,7 +3,7 @@ import { AttributeType, AttributeValue, Crosswalk, ParticipationStatus, Survivor
3
3
  import { AddInlineAttributeEvent, DeleteInlineAttributeEvent, EditInlineAttributeEvent, IgnoreInlineAttributeEvent, PinInlineAttributeEvent } from '../../../types/inlineAttributes';
4
4
  import { ColumnData, RenderRowCellProps } from '../../../types/basicTable';
5
5
  import { CrosswalksMap } from '../../../types';
6
- export type StrategyAdditionalFields = {
6
+ type StrategyAdditionalFields = {
7
7
  primaryAttributeUri?: string;
8
8
  comparisonAttributeUri?: string;
9
9
  sourcesUriOrder?: string[];
@@ -11,25 +11,32 @@ export type StrategyAdditionalFields = {
11
11
  export type AppliedSurvivorshipStrategy = {
12
12
  strategy: SurvivorStrategy;
13
13
  } & StrategyAdditionalFields;
14
- export type RuleTypeItem = {
15
- type: 'rule';
14
+ export declare enum RuleItemType {
15
+ Rule = "rule",
16
+ Status = "status"
17
+ }
18
+ type SurvivorshipRuleItem = {
19
+ type: RuleItemType.Rule;
16
20
  data: AppliedSurvivorshipStrategy;
17
- valueUri: string;
18
- } | {
19
- type: 'status';
21
+ };
22
+ type ParticipationStatusItem = {
23
+ type: RuleItemType.Status;
20
24
  data: ParticipationStatus;
21
- valueUri: string;
22
25
  };
26
+ export type RuleTypeItem = SurvivorshipRuleItem | ParticipationStatusItem;
27
+ export type AttributeValueLite = Pick<AttributeValue, 'uri' | 'value' | 'ovDetails'>;
23
28
  export type RuleTypeValues = {
24
- ruleTypes: RuleTypeItem[];
29
+ attributeType: AttributeType;
30
+ attributeValues: AttributeValueLite[];
31
+ getRuleTypeData: (attrType: AttributeType, attrValue?: AttributeValueLite) => RuleTypeItem;
25
32
  };
26
33
  export type OvValues = {
27
34
  attributeType: AttributeType;
28
- values: AttributeValue[];
35
+ values: AttributeValue[] | undefined;
29
36
  };
30
37
  export type AttributeValues = {
31
38
  attributeType: AttributeType;
32
- attributeValues: AttributeValue[];
39
+ attributeValues: AttributeValue[] | undefined;
33
40
  crosswalksMap: CrosswalksMap;
34
41
  };
35
42
  export type WinnerSources = {
@@ -1 +1,5 @@
1
- export {};
1
+ export var RuleItemType;
2
+ (function (RuleItemType) {
3
+ RuleItemType["Rule"] = "rule";
4
+ RuleItemType["Status"] = "status";
5
+ })(RuleItemType || (RuleItemType = {}));
package/index.d.ts CHANGED
@@ -223,7 +223,7 @@ export { ProfilePerspectiveViewContext } from './contexts/ProfilePerspectiveView
223
223
  export { IdContext } from './contexts/IdContext';
224
224
  export { EntitiesMapContext } from './contexts/EntitiesMapContext';
225
225
  export { CrosswalksDisplayProvider, useCrosswalkColor, useCrosswalkFocus, useCrosswalkHighlight, useHighlightedCrosswalks } from './contexts/CrosswalksDisplayContext';
226
- export { ExpandedAttributesProvider, useAttributeExpanded } from './contexts/ExpandedAttributesContext';
226
+ export { AutoExpandedAttributesProvider, useAttributeAutoExpanded } from './contexts/AutoExpandedAttributesContext';
227
227
  export { EntityMarkerContext } from './contexts/EntityMarkerContext';
228
228
  export { EntityLoadingIndicationProvider, useEntityLoadingIndication } from './contexts/EntityLoadingIndicationContext';
229
229
  export { WorkflowTasksContext } from './contexts/WorkflowTasksContext';
package/index.js CHANGED
@@ -225,7 +225,7 @@ export { ProfilePerspectiveViewContext } from './contexts/ProfilePerspectiveView
225
225
  export { IdContext } from './contexts/IdContext';
226
226
  export { EntitiesMapContext } from './contexts/EntitiesMapContext';
227
227
  export { CrosswalksDisplayProvider, useCrosswalkColor, useCrosswalkFocus, useCrosswalkHighlight, useHighlightedCrosswalks } from './contexts/CrosswalksDisplayContext';
228
- export { ExpandedAttributesProvider, useAttributeExpanded } from './contexts/ExpandedAttributesContext';
228
+ export { AutoExpandedAttributesProvider, useAttributeAutoExpanded } from './contexts/AutoExpandedAttributesContext';
229
229
  export { EntityMarkerContext } from './contexts/EntityMarkerContext';
230
230
  export { EntityLoadingIndicationProvider, useEntityLoadingIndication } from './contexts/EntityLoadingIndicationContext';
231
231
  export { WorkflowTasksContext } from './contexts/WorkflowTasksContext';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.2231",
3
+ "version": "1.4.2232",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./index.js",
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- type ProviderProps = {
3
- children: React.ReactNode;
4
- attributeUris: string[];
5
- };
6
- export declare const ExpandedAttributesProvider: ({ children, attributeUris }: ProviderProps) => React.JSX.Element;
7
- export declare const useAttributeExpanded: (attributeUri: string) => any;
8
- export {};
@@ -1,15 +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
- exports.ValueHeightConsumer = void 0;
7
- var react_1 = __importDefault(require("react"));
8
- var SyncedValueHeightsContext_1 = require("../../../contexts/SyncedValueHeightsContext");
9
- var ValueHeightConsumer = function (_a) {
10
- var uri = _a.uri, children = _a.children;
11
- var getHeight = (0, SyncedValueHeightsContext_1.useSyncedValueHeights)().getHeight;
12
- var height = getHeight(uri);
13
- return react_1.default.createElement("div", { style: height ? { minHeight: height } : undefined }, children);
14
- };
15
- exports.ValueHeightConsumer = ValueHeightConsumer;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- type ProviderProps = {
3
- children: React.ReactNode;
4
- attributeUris: string[];
5
- };
6
- export declare const ExpandedAttributesProvider: ({ children, attributeUris }: ProviderProps) => React.JSX.Element;
7
- export declare const useAttributeExpanded: (attributeUri: string) => any;
8
- export {};
@@ -1,11 +0,0 @@
1
- import React, { createContext, useContext } from 'react';
2
- import { areOneHierarchyUris } from '@reltio/mdm-sdk';
3
- var ExpandedAttributesContext = createContext(null);
4
- export var ExpandedAttributesProvider = function (_a) {
5
- var children = _a.children, attributeUris = _a.attributeUris;
6
- return React.createElement(ExpandedAttributesContext.Provider, { value: attributeUris }, children);
7
- };
8
- export var useAttributeExpanded = function (attributeUri) {
9
- var expandedAttributes = useContext(ExpandedAttributesContext) || [];
10
- return expandedAttributes.some(function (uri) { return areOneHierarchyUris(uri, attributeUri); });
11
- };
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { useSyncedValueHeights } from '../../../contexts/SyncedValueHeightsContext';
3
- export var ValueHeightConsumer = function (_a) {
4
- var uri = _a.uri, children = _a.children;
5
- var getHeight = useSyncedValueHeights().getHeight;
6
- var height = getHeight(uri);
7
- return React.createElement("div", { style: height ? { minHeight: height } : undefined }, children);
8
- };