@reltio/components 1.4.1907 → 1.4.1909

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 (41) hide show
  1. package/cjs/MatchRulesTooltip/MatchRulesTooltip.js +11 -7
  2. package/cjs/MatchRulesTooltip/MatchRulesTooltip.test.js +20 -24
  3. package/cjs/MatchRulesTooltip/styles.d.ts +1 -1
  4. package/cjs/MatchRulesTooltip/styles.js +5 -1
  5. package/cjs/SimpleMatchRules/SimpleMatchRules.js +16 -13
  6. package/cjs/SimpleMatchRules/SimpleMatchRules.test.js +8 -35
  7. package/cjs/SimpleMatchRules/styles.d.ts +1 -1
  8. package/cjs/SimpleMatchRules/styles.js +8 -0
  9. package/cjs/SimpleMatchRulesBlock/SimpleMatchRulesBlock.js +3 -3
  10. package/cjs/SimpleMatchRulesBlock/SimpleMatchRulesBlock.test.js +1 -1
  11. package/cjs/contexts/MdmModuleContext/context.d.ts +3 -1
  12. package/cjs/contexts/MdmModuleContext/hooks.d.ts +2 -1
  13. package/cjs/icons/AIPowered.d.ts +5 -0
  14. package/cjs/icons/AIPowered.js +76 -0
  15. package/esm/MatchRulesTooltip/MatchRulesTooltip.js +11 -7
  16. package/esm/MatchRulesTooltip/MatchRulesTooltip.test.js +20 -24
  17. package/esm/MatchRulesTooltip/styles.d.ts +1 -1
  18. package/esm/MatchRulesTooltip/styles.js +5 -1
  19. package/esm/SimpleMatchRules/SimpleMatchRules.js +16 -13
  20. package/esm/SimpleMatchRules/SimpleMatchRules.test.js +8 -35
  21. package/esm/SimpleMatchRules/styles.d.ts +1 -1
  22. package/esm/SimpleMatchRules/styles.js +8 -0
  23. package/esm/SimpleMatchRulesBlock/SimpleMatchRulesBlock.js +3 -3
  24. package/esm/SimpleMatchRulesBlock/SimpleMatchRulesBlock.test.js +1 -1
  25. package/esm/contexts/MdmModuleContext/context.d.ts +3 -1
  26. package/esm/contexts/MdmModuleContext/hooks.d.ts +2 -1
  27. package/esm/icons/AIPowered.d.ts +5 -0
  28. package/esm/icons/AIPowered.js +71 -0
  29. package/package.json +2 -2
  30. package/cjs/MatchRulesTitle/MatchRulesTitle.d.ts +0 -5
  31. package/cjs/MatchRulesTitle/MatchRulesTitle.js +0 -13
  32. package/cjs/MatchRulesTitle/MatchRulesTitle.test.d.ts +0 -1
  33. package/cjs/MatchRulesTitle/MatchRulesTitle.test.js +0 -18
  34. package/cjs/MatchRulesTitle/index.d.ts +0 -1
  35. package/cjs/MatchRulesTitle/index.js +0 -5
  36. package/esm/MatchRulesTitle/MatchRulesTitle.d.ts +0 -5
  37. package/esm/MatchRulesTitle/MatchRulesTitle.js +0 -6
  38. package/esm/MatchRulesTitle/MatchRulesTitle.test.d.ts +0 -1
  39. package/esm/MatchRulesTitle/MatchRulesTitle.test.js +0 -13
  40. package/esm/MatchRulesTitle/index.d.ts +0 -1
  41. package/esm/MatchRulesTitle/index.js +0 -1
@@ -5,18 +5,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.MatchRulesTooltip = void 0;
7
7
  var react_1 = __importDefault(require("react"));
8
- var MatchRulesTitle_1 = require("../MatchRulesTitle");
9
8
  var NegativeRuleTooltipIcon_1 = __importDefault(require("../icons/NegativeRuleTooltipIcon"));
10
9
  var styles_1 = require("./styles");
10
+ var ui_i18n_1 = __importDefault(require("ui-i18n"));
11
11
  var MatchRulesTooltip = function (_a) {
12
12
  var _b = _a.isMlMatch, isMlMatch = _b === void 0 ? false : _b, matchRules = _a.matchRules;
13
13
  var styles = (0, styles_1.useStyles)();
14
+ var hasMatchRules = matchRules.length > 0;
15
+ var showTitle = !isMlMatch && hasMatchRules;
14
16
  return (react_1.default.createElement("div", { className: styles.container },
15
- react_1.default.createElement("div", { className: styles.title },
16
- react_1.default.createElement(MatchRulesTitle_1.MatchRulesTitle, { isMlMatch: isMlMatch }),
17
- ' '),
18
- react_1.default.createElement("div", { className: styles.body }, matchRules.map(function (match) { return (react_1.default.createElement("div", { key: match.uri },
19
- '- ',
20
- match.negativeRule && react_1.default.createElement(NegativeRuleTooltipIcon_1.default, { className: styles.negativeRuleIcon }), "".concat(match.label))); }))));
17
+ react_1.default.createElement("div", { className: showTitle ? styles.bodyWithMargin : styles.bodyWithoutMargin },
18
+ showTitle && react_1.default.createElement("div", { className: styles.title }, ui_i18n_1.default.text('Match rules')),
19
+ hasMatchRules
20
+ ? matchRules.map(function (match) { return (react_1.default.createElement("div", { key: match.uri },
21
+ '- ',
22
+ match.negativeRule && react_1.default.createElement(NegativeRuleTooltipIcon_1.default, { className: styles.negativeRuleIcon }),
23
+ match.label)); })
24
+ : null)));
21
25
  };
22
26
  exports.MatchRulesTooltip = MatchRulesTooltip;
@@ -4,41 +4,37 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var react_1 = __importDefault(require("react"));
7
- var enzyme_1 = require("enzyme");
8
- var MatchRulesTitle_1 = require("../MatchRulesTitle");
9
- var NegativeRuleTooltipIcon_1 = __importDefault(require("../icons/NegativeRuleTooltipIcon"));
7
+ var react_2 = require("@testing-library/react");
10
8
  var MatchRulesTooltip_1 = require("./MatchRulesTooltip");
11
9
  describe('MatchRulesTooltip test', function () {
12
- var getMatchRulesTitle = function (component) { return component.find(MatchRulesTitle_1.MatchRulesTitle); };
13
- var getBody = function (component) { return component.find('.body'); };
14
- it('should provide isMlMatch prop to MatchRulesTitle', function () {
15
- var component = (0, enzyme_1.shallow)(react_1.default.createElement(MatchRulesTooltip_1.MatchRulesTooltip, { isMlMatch: true, matchRules: [] }));
16
- expect(getMatchRulesTitle(component).prop('isMlMatch')).toBe(true);
17
- component.setProps({ isMlMatch: false });
18
- expect(getMatchRulesTitle(component).prop('isMlMatch')).toBe(false);
10
+ it('should render correct title depending on isMlMatch prop', function () {
11
+ var rerender = (0, react_2.render)(react_1.default.createElement(MatchRulesTooltip_1.MatchRulesTooltip, { isMlMatch: true, matchRules: [] })).rerender;
12
+ expect(react_2.screen.queryByText(/Match rules/i)).not.toBeInTheDocument();
13
+ rerender(react_1.default.createElement(MatchRulesTooltip_1.MatchRulesTooltip, { isMlMatch: false, matchRules: [{ uri: 'uri1', label: 'label1' }] }));
14
+ expect(react_2.screen.getByText(/Match rules/i)).toBeInTheDocument();
19
15
  });
20
16
  it('should render match rule correctly', function () {
21
17
  var matchRules = [
22
18
  { uri: 'uri1', label: 'label1' },
23
- { uri: 'uri1', label: 'label1' }
19
+ { uri: 'uri2', label: 'label2' }
24
20
  ];
25
- var component = (0, enzyme_1.shallow)(react_1.default.createElement(MatchRulesTooltip_1.MatchRulesTooltip, { matchRules: matchRules }));
26
- var body = getBody(component);
27
- expect(body.children()).toHaveLength(2);
28
- expect(body.childAt(0).text()).toContain(matchRules[0].label);
29
- expect(body.childAt(1).text()).toContain(matchRules[1].label);
21
+ (0, react_2.render)(react_1.default.createElement(MatchRulesTooltip_1.MatchRulesTooltip, { matchRules: matchRules }));
22
+ var ruleItems = react_2.screen.getAllByText(/^-\s+/);
23
+ expect(ruleItems).toHaveLength(2);
24
+ expect(ruleItems[0]).toHaveTextContent(matchRules[0].label);
25
+ expect(ruleItems[1]).toHaveTextContent(matchRules[1].label);
30
26
  });
31
27
  it('should render negative rule correctly', function () {
32
28
  var matchRules = [
33
29
  { uri: 'uri1', label: 'label1' },
34
- { uri: 'uri1', label: 'label1', negativeRule: {} }
30
+ { uri: 'uri2', label: 'label2', negativeRule: {} }
35
31
  ];
36
- var component = (0, enzyme_1.shallow)(react_1.default.createElement(MatchRulesTooltip_1.MatchRulesTooltip, { matchRules: matchRules }));
37
- var body = getBody(component);
38
- expect(body.children()).toHaveLength(2);
39
- expect(body.childAt(0).text()).toContain(matchRules[0].label);
40
- expect(body.childAt(0).find(NegativeRuleTooltipIcon_1.default)).toHaveLength(0);
41
- expect(body.childAt(1).text()).toContain(matchRules[1].label);
42
- expect(body.childAt(1).find(NegativeRuleTooltipIcon_1.default)).toHaveLength(1);
32
+ (0, react_2.render)(react_1.default.createElement(MatchRulesTooltip_1.MatchRulesTooltip, { matchRules: matchRules }));
33
+ var ruleItems = react_2.screen.getAllByText(/^-\s+/);
34
+ expect(ruleItems).toHaveLength(2);
35
+ expect(ruleItems[0]).toHaveTextContent(matchRules[0].label);
36
+ expect(ruleItems[0].querySelector('svg')).not.toBeInTheDocument();
37
+ expect(ruleItems[1]).toHaveTextContent(matchRules[1].label);
38
+ expect(ruleItems[1].querySelector('svg')).toBeInTheDocument();
43
39
  });
44
40
  });
@@ -1 +1 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"container" | "title" | "body" | "negativeRuleIcon">;
1
+ export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"container" | "title" | "bodyWithMargin" | "bodyWithoutMargin" | "negativeRuleIcon">;
@@ -7,10 +7,14 @@ exports.useStyles = (0, styles_1.makeStyles)({
7
7
  fontWeight: 500,
8
8
  marginBottom: '9px'
9
9
  },
10
- body: {
10
+ bodyWithMargin: {
11
11
  fontWeight: 'normal',
12
12
  marginLeft: '16px'
13
13
  },
14
+ bodyWithoutMargin: {
15
+ fontWeight: 'normal',
16
+ marginLeft: '0px'
17
+ },
14
18
  container: {
15
19
  padding: '8px',
16
20
  fontSize: '12px',
@@ -10,23 +10,26 @@ var classnames_1 = __importDefault(require("classnames"));
10
10
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
11
11
  var Tooltip_1 = __importDefault(require("@mui/material/Tooltip"));
12
12
  var NegativeRuleIcon_1 = __importDefault(require("../icons/NegativeRuleIcon"));
13
- var MatchRulesTitle_1 = require("../MatchRulesTitle");
14
13
  var styles_1 = require("./styles");
15
14
  var SimpleMatchRules = function (_a) {
16
15
  var isMlMatch = _a.isMlMatch, matchRules = _a.matchRules, className = _a.className, matchRuleSummaries = _a.matchRuleSummaries;
17
16
  var styles = (0, styles_1.useStyles)();
17
+ var hasMatchRules = matchRules.length > 0;
18
+ var showTitle = !isMlMatch && hasMatchRules;
18
19
  return (react_1.default.createElement("div", { "data-reltio-id": "simple-match-rules", className: (0, classnames_1.default)(styles.container, className) },
19
- react_1.default.createElement("div", { className: styles.title },
20
- react_1.default.createElement(MatchRulesTitle_1.MatchRulesTitle, { isMlMatch: isMlMatch })),
21
- react_1.default.createElement("div", { className: styles.labelsContainer }, matchRules.map(function (matchRule) {
22
- var matchRuleSummary = (0, mdm_sdk_1.getMatchRuleSummary)(matchRuleSummaries, matchRule.uri);
23
- var relevancePercentage = (0, mdm_sdk_1.formatRelevanceScore)(matchRuleSummary);
24
- return (react_1.default.createElement("div", { className: styles.matchRuleInfo, key: matchRule.uri, "data-reltio-id": "match-rule-info" },
25
- react_1.default.createElement("div", { className: styles.matchRuleLabel },
26
- '- ',
27
- matchRule.negativeRule && react_1.default.createElement(NegativeRuleIcon_1.default, { className: styles.negativeRuleIcon }), "".concat(matchRule.label)),
28
- relevancePercentage && (react_1.default.createElement(Tooltip_1.default, { title: ui_i18n_1.default.text('Relevance score') },
29
- react_1.default.createElement("div", { className: styles.relevanceScore }, relevancePercentage)))));
30
- }))));
20
+ react_1.default.createElement("div", { className: showTitle ? styles.bodyWithMargin : styles.bodyWithoutMargin },
21
+ showTitle && react_1.default.createElement("div", { className: styles.title }, ui_i18n_1.default.text('Match rules')),
22
+ react_1.default.createElement("div", { className: styles.labelsContainer }, hasMatchRules
23
+ ? matchRules.map(function (matchRule) {
24
+ var matchRuleSummary = (0, mdm_sdk_1.getMatchRuleSummary)(matchRuleSummaries, matchRule.uri);
25
+ var relevancePercentage = (0, mdm_sdk_1.formatRelevanceScore)(matchRuleSummary);
26
+ return (react_1.default.createElement("div", { className: styles.matchRuleInfo, key: matchRule.uri, "data-reltio-id": "match-rule-info" },
27
+ react_1.default.createElement("div", { className: styles.matchRuleLabel },
28
+ '- ',
29
+ matchRule.negativeRule && (react_1.default.createElement(NegativeRuleIcon_1.default, { className: styles.negativeRuleIcon })), "".concat(matchRule.label)),
30
+ relevancePercentage && (react_1.default.createElement(Tooltip_1.default, { title: ui_i18n_1.default.text('Relevance score') },
31
+ react_1.default.createElement("div", { className: styles.relevanceScore }, relevancePercentage)))));
32
+ })
33
+ : null))));
31
34
  };
32
35
  exports.SimpleMatchRules = SimpleMatchRules;
@@ -4,47 +4,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var react_1 = __importDefault(require("react"));
7
- var enzyme_1 = require("enzyme");
8
- var MatchRulesTitle_1 = require("../MatchRulesTitle");
9
- var NegativeRuleIcon_1 = __importDefault(require("../icons/NegativeRuleIcon"));
7
+ var react_2 = require("@testing-library/react");
10
8
  var SimpleMatchRules_1 = require("./SimpleMatchRules");
11
9
  describe('SimpleMatchRules tests', function () {
12
- var getMatchRulesTitle = function (component) { return component.find(MatchRulesTitle_1.MatchRulesTitle); };
13
- var getLabelContainer = function (component) { return component.find('.labelsContainer'); };
14
- var getContainer = function (component) { return component.find('.container'); };
15
- it('should provide isMlMatch prop to MatchRulesTitle', function () {
16
- var component = (0, enzyme_1.shallow)(react_1.default.createElement(SimpleMatchRules_1.SimpleMatchRules, { isMlMatch: true, matchRules: [] }));
17
- expect(getMatchRulesTitle(component).prop('isMlMatch')).toBe(true);
18
- component.setProps({ isMlMatch: false });
19
- expect(getMatchRulesTitle(component).prop('isMlMatch')).toBe(false);
20
- });
21
- it('should render match rule correctly', function () {
22
- var matchRules = [
23
- { uri: 'uri1', label: 'label1' },
24
- { uri: 'uri2', label: 'label2' }
25
- ];
26
- var component = (0, enzyme_1.shallow)(react_1.default.createElement(SimpleMatchRules_1.SimpleMatchRules, { matchRules: matchRules }));
27
- var labelContainer = getLabelContainer(component);
28
- expect(labelContainer.children()).toHaveLength(2);
29
- expect(labelContainer.childAt(0).text()).toContain(matchRules[0].label);
30
- expect(labelContainer.childAt(1).text()).toContain(matchRules[1].label);
31
- });
32
- it('should provide className prop to container', function () {
33
- var className = 'myClassName';
34
- var component = (0, enzyme_1.shallow)(react_1.default.createElement(SimpleMatchRules_1.SimpleMatchRules, { className: className, matchRules: [] }));
35
- expect(getContainer(component).prop('className')).toContain(className);
36
- });
37
10
  it('should render negative rule correctly', function () {
38
11
  var matchRules = [
39
12
  { uri: 'uri1', label: 'label1' },
40
13
  { uri: 'uri2', label: 'label2', negativeRule: {} }
41
14
  ];
42
- var component = (0, enzyme_1.shallow)(react_1.default.createElement(SimpleMatchRules_1.SimpleMatchRules, { matchRules: matchRules }));
43
- var labelContainer = getLabelContainer(component);
44
- expect(labelContainer.children()).toHaveLength(2);
45
- expect(labelContainer.childAt(0).text()).toContain(matchRules[0].label);
46
- expect(labelContainer.childAt(0).find(NegativeRuleIcon_1.default)).toHaveLength(0);
47
- expect(labelContainer.childAt(1).text()).toContain(matchRules[1].label);
48
- expect(labelContainer.childAt(1).find(NegativeRuleIcon_1.default)).toHaveLength(1);
15
+ (0, react_2.render)(react_1.default.createElement(SimpleMatchRules_1.SimpleMatchRules, { matchRules: matchRules }));
16
+ var ruleItems = react_2.screen.getAllByText(/^-\s+/);
17
+ expect(ruleItems).toHaveLength(2);
18
+ expect(ruleItems[0]).toHaveTextContent(matchRules[0].label);
19
+ expect(ruleItems[0].querySelector('svg')).not.toBeInTheDocument();
20
+ expect(ruleItems[1]).toHaveTextContent(matchRules[1].label);
21
+ expect(ruleItems[1].querySelector('svg')).toBeInTheDocument();
49
22
  });
50
23
  });
@@ -1 +1 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"container" | "title" | "relevanceScore" | "negativeRuleIcon" | "labelsContainer" | "matchRuleInfo" | "matchRuleLabel">;
1
+ export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"container" | "title" | "relevanceScore" | "bodyWithMargin" | "bodyWithoutMargin" | "negativeRuleIcon" | "labelsContainer" | "matchRuleInfo" | "matchRuleLabel">;
@@ -11,6 +11,14 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
11
11
  color: theme.palette.text.secondary,
12
12
  marginBottom: '7px'
13
13
  },
14
+ bodyWithMargin: {
15
+ fontWeight: 'normal',
16
+ marginLeft: '16px'
17
+ },
18
+ bodyWithoutMargin: {
19
+ fontWeight: 'normal',
20
+ marginLeft: '0px'
21
+ },
14
22
  labelsContainer: {
15
23
  color: theme.palette.text.primary,
16
24
  marginBottom: '8px'
@@ -33,7 +33,7 @@ var MatchRulesTooltip_1 = require("../MatchRulesTooltip");
33
33
  var SimpleMatchRules_1 = require("../SimpleMatchRules");
34
34
  var MatchRulesBadge_1 = require("../MatchRulesBadge");
35
35
  var withTooltip_1 = require("../HOCs/withTooltip");
36
- var MlMatch_1 = __importDefault(require("../icons/MlMatch"));
36
+ var AIPowered_1 = __importDefault(require("../icons/AIPowered"));
37
37
  var styles_1 = require("./styles");
38
38
  exports.MatchRuleBadgeWithTooltip = (0, withTooltip_1.withTooltip)(MatchRulesBadge_1.MatchRulesBadge);
39
39
  var SimpleMatchRulesBlock = function (_a) {
@@ -43,8 +43,8 @@ var SimpleMatchRulesBlock = function (_a) {
43
43
  var handleOnExpand = (0, react_1.useCallback)(function () { return setExpanded(function (expand) { return !expand; }); }, []);
44
44
  return (react_1.default.createElement("div", { className: styles.container, "data-reltio-id": "simple-match-rules-block" },
45
45
  react_1.default.createElement(exports.MatchRuleBadgeWithTooltip, { tooltipTitle: react_1.default.createElement(MatchRulesTooltip_1.MatchRulesTooltip, { matchRules: matchRules, isMlMatch: isMlMatch }), tooltipPlacement: "bottom-start", onExpand: handleOnExpand, expanded: expanded }, isMlMatch ? (react_1.default.createElement(react_1.default.Fragment, null,
46
- react_1.default.createElement(MlMatch_1.default, { className: styles.icon }),
47
- ui_i18n_1.default.text('Match IQ'))) : (ui_i18n_1.default.text('Rules'))),
46
+ react_1.default.createElement(AIPowered_1.default, { className: styles.icon }),
47
+ ui_i18n_1.default.text('AI-Powered'))) : (ui_i18n_1.default.text('Rules'))),
48
48
  expanded ? (react_1.default.createElement(SimpleMatchRules_1.SimpleMatchRules, { className: styles.rulesContainer, matchRules: matchRules, isMlMatch: isMlMatch, matchRuleSummaries: matchRuleSummaries })) : null));
49
49
  };
50
50
  exports.SimpleMatchRulesBlock = SimpleMatchRulesBlock;
@@ -36,7 +36,7 @@ describe('SimpleMatchRulesBlock test', function () {
36
36
  });
37
37
  it('should render correct MatchRuleBadgeWithTooltip for Ml match', function () {
38
38
  var component = (0, enzyme_1.shallow)(react_1.default.createElement(SimpleMatchRulesBlock_1.SimpleMatchRulesBlock, { isMlMatch: true, matchRules: matchRules }));
39
- expect(getMatchRuleBadgeWithTooltip(component).text()).toBe('<SvgMlMatch />Match IQ');
39
+ expect(getMatchRuleBadgeWithTooltip(component).text()).toBe('<AIPowered />AI-Powered');
40
40
  });
41
41
  it('should render correct MatchRuleBadgeWithTooltip for non Ml match', function () {
42
42
  var component = (0, enzyme_1.shallow)(react_1.default.createElement(SimpleMatchRulesBlock_1.SimpleMatchRulesBlock, { matchRules: matchRules }));
@@ -1,4 +1,4 @@
1
- import { Metadata, SearchState, AttributesPresentation, Entity, Mode, AttributeType, AttributeError, ImageAttributeValue, SortingStrategy, DependentLookupsConfig, PivotingValue, PivotingAttribute, DataTenant, HistoryDiff, ImageAttributeFieldsOrder, Connection, User, SearchNavigationData, SearchProviderData, Lookups, HistoryMode, HistorySlice, HistoryEvent, RequestNextPageOfAttributeValuesPayload, LookupsForTypeResolvedPayload, RelationsLoadedPayload, CompactRelationType, AddAttributesPayload, ModifyAttributePayload, RemoveAttributePayload, RelationsState, DependentLookupsState, ActivityFilter, SearchOptions, GlobalFilter, Layout, Profile } from '@reltio/mdm-sdk';
1
+ import { Metadata, SearchState, AttributesPresentation, Entity, Mode, AttributeType, AttributeError, ImageAttributeValue, SortingStrategy, DependentLookupsConfig, PivotingValue, PivotingAttribute, DataTenant, HistoryDiff, ImageAttributeFieldsOrder, Connection, User, SearchNavigationData, SearchProviderData, Lookups, HistoryMode, HistorySlice, HistoryEvent, RequestNextPageOfAttributeValuesPayload, LookupsForTypeResolvedPayload, RelationsLoadedPayload, CompactRelationType, AddAttributesPayload, ModifyAttributePayload, RemoveAttributePayload, RelationsState, DependentLookupsState, ActivityFilter, SearchOptions, GlobalFilter, Layout, Profile, Rating } from '@reltio/mdm-sdk';
2
2
  import { AnyAction } from '../../types';
3
3
  export type MdmModuleValuesContextProps = Partial<{
4
4
  autoCloseInterval: number;
@@ -117,6 +117,7 @@ export type MdmModuleActionsContextProps = Partial<{
117
117
  errorsSet: (payload: AttributeError[]) => void;
118
118
  addRelation: (id: string, connection: Connection) => void;
119
119
  editRelation: (id: string, connection: Connection) => void;
120
+ updateRelationRating: (id: string, connection: Connection, rating: Rating, user: string) => void;
120
121
  updateHiddenAttributes: (uri: string, hiddenAttributes: string[]) => void;
121
122
  resetHiddenAttributes: (uri: string) => void;
122
123
  updateControlAttributes: (controlAttributes: string[]) => void;
@@ -187,6 +188,7 @@ export declare const MdmModuleActionsContext: import("@fluentui/react-context-se
187
188
  errorsSet: (payload: AttributeError[]) => void;
188
189
  addRelation: (id: string, connection: Connection) => void;
189
190
  editRelation: (id: string, connection: Connection) => void;
191
+ updateRelationRating: (id: string, connection: Connection, rating: Rating, user: string) => void;
190
192
  updateHiddenAttributes: (uri: string, hiddenAttributes: string[]) => void;
191
193
  resetHiddenAttributes: (uri: string) => void;
192
194
  updateControlAttributes: (controlAttributes: string[]) => void;
@@ -71,7 +71,7 @@ export declare const useMdmDependentLookupEditorContext: (attributeValue: Simple
71
71
  };
72
72
  export declare const useMdmGlobalSearchRequestOptions: (omittingFields?: string[]) => import("@reltio/mdm-sdk").GlobalSearchRequestOptions;
73
73
  export declare const useMdmAuthoringItemsByEntityType: (entityTypeUri: string) => import("@reltio/mdm-sdk").AuthoringItem[];
74
- export declare const useMdmAction: <T extends "openSearch" | "openHistoryEvent" | "openConsoleApp" | "addAttributes" | "modifyAttribute" | "removeAttribute" | "entityDeleted" | "entityCreated" | "errorDeactivated" | "requestNextPageOfAttributeValues" | "openEntity" | "setDefaultProfilePicForModifiedEntity" | "setDefaultProfilePicForEntity" | "dependentLookupsEditorTouched" | "openPivotingPerspective" | "lookupsLoaded" | "lookupsForTypeResolved" | "errorSet" | "setHistoryMode" | "modeUpdated" | "modeUpdateRequested" | "setHistoryEvent" | "clearHistoryEvent" | "clearHistoryDiff" | "setHistoryDiff" | "setHistorySlice" | "updateSearchNavigationDataFields" | "openPerspective" | "entityDeletionFinished" | "loadEntity" | "updateSearchNavigationDataOnMerge" | "lookupsListResolved" | "relationsLoaded" | "setInitialInfo" | "setRelationType" | "closeRelationEditor" | "openRelationEditor" | "setRelationEntity" | "errorsSet" | "addRelation" | "editRelation" | "updateHiddenAttributes" | "resetHiddenAttributes" | "updateControlAttributes">(action: T) => Partial<{
74
+ export declare const useMdmAction: <T extends "openSearch" | "openHistoryEvent" | "openConsoleApp" | "addAttributes" | "modifyAttribute" | "removeAttribute" | "entityDeleted" | "entityCreated" | "errorDeactivated" | "requestNextPageOfAttributeValues" | "openEntity" | "setDefaultProfilePicForModifiedEntity" | "setDefaultProfilePicForEntity" | "dependentLookupsEditorTouched" | "openPivotingPerspective" | "lookupsLoaded" | "lookupsForTypeResolved" | "errorSet" | "setHistoryMode" | "modeUpdated" | "modeUpdateRequested" | "setHistoryEvent" | "clearHistoryEvent" | "clearHistoryDiff" | "setHistoryDiff" | "setHistorySlice" | "updateSearchNavigationDataFields" | "openPerspective" | "entityDeletionFinished" | "loadEntity" | "updateSearchNavigationDataOnMerge" | "lookupsListResolved" | "relationsLoaded" | "setInitialInfo" | "setRelationType" | "closeRelationEditor" | "openRelationEditor" | "setRelationEntity" | "errorsSet" | "addRelation" | "editRelation" | "updateRelationRating" | "updateHiddenAttributes" | "resetHiddenAttributes" | "updateControlAttributes">(action: T) => Partial<{
75
75
  openSearch: (payload: import("@reltio/mdm-sdk").SearchState) => void;
76
76
  openHistoryEvent: (payload: {
77
77
  entityUri: string;
@@ -132,6 +132,7 @@ export declare const useMdmAction: <T extends "openSearch" | "openHistoryEvent"
132
132
  errorsSet: (payload: import("@reltio/mdm-sdk").AttributeError[]) => void;
133
133
  addRelation: (id: string, connection: import("@reltio/mdm-sdk").Connection) => void;
134
134
  editRelation: (id: string, connection: import("@reltio/mdm-sdk").Connection) => void;
135
+ updateRelationRating: (id: string, connection: import("@reltio/mdm-sdk").Connection, rating: import("@reltio/mdm-sdk").Rating, user: string) => void;
135
136
  updateHiddenAttributes: (uri: string, hiddenAttributes: string[]) => void;
136
137
  resetHiddenAttributes: (uri: string) => void;
137
138
  updateControlAttributes: (controlAttributes: string[]) => void;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ interface AIPoweredProps extends React.SVGProps<SVGSVGElement> {
3
+ }
4
+ declare const AIPowered: React.FC<AIPoweredProps>;
5
+ export default AIPowered;
@@ -0,0 +1,76 @@
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 AIPowered = function (props) {
19
+ return (react_1.default.createElement("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
20
+ react_1.default.createElement("g", { clipPath: "url(#clip0_6347_29)" },
21
+ react_1.default.createElement("path", { d: "M11.5 2.57735C12.1188 2.22008 12.8812 2.22008 13.5 2.57735L19.7272 6.17265C20.346 6.52992 20.7272 7.19017 20.7272 7.9047V15.0953C20.7272 15.8098 20.346 16.4701 19.7272 16.8274L13.5 20.4226C12.8812 20.7799 12.1188 20.7799 11.5 20.4226L5.27276 16.8274C4.65396 16.4701 4.27276 15.8098 4.27276 15.0953V7.9047C4.27276 7.19017 4.65396 6.52992 5.27276 6.17265L11.5 2.57735Z", fill: "url(#paint0_linear_6347_29)" }),
22
+ react_1.default.createElement("path", { opacity: "0.5", d: "M11.5 4.57735C12.1188 4.22008 12.8812 4.22008 13.5 4.57735L17.9952 7.17265C18.614 7.52992 18.9952 8.19017 18.9952 8.9047V14.0953C18.9952 14.8098 18.614 15.4701 17.9952 15.8274L13.5 18.4226C12.8812 18.7799 12.1188 18.7799 11.5 18.4226L7.00481 15.8274C6.38601 15.4701 6.00481 14.8098 6.00481 14.0953V8.9047C6.00481 8.19017 6.38601 7.52992 7.00481 7.17265L11.5 4.57735Z", fill: "url(#paint1_linear_6347_29)" }),
23
+ react_1.default.createElement("path", { opacity: "0.5", d: "M11.5 7.57735C12.1188 7.22008 12.8812 7.22008 13.5 7.57735L15.3971 8.67265C16.0159 9.02992 16.3971 9.69017 16.3971 10.4047V12.5953C16.3971 13.3098 16.0159 13.9701 15.3971 14.3274L13.5 15.4226C12.8812 15.7799 12.1188 15.7799 11.5 15.4226L9.60289 14.3274C8.98408 13.9701 8.60289 13.3098 8.60289 12.5953V10.4047C8.60289 9.69017 8.98408 9.02992 9.60289 8.67265L11.5 7.57735Z", fill: "url(#paint2_linear_6347_29)" }),
24
+ react_1.default.createElement("g", { filter: "url(#filter0_f_6347_29)" },
25
+ react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.4698 2.27726C18.3093 1.84052 17.6916 1.84052 17.5311 2.27726L17.1356 3.3538C16.8319 4.18016 16.1807 4.83145 15.3543 5.13508L14.2778 5.53063C13.841 5.6911 13.841 6.3088 14.2778 6.46927L15.3543 6.86482C16.1807 7.16845 16.8319 7.81974 17.1356 8.6461L17.5311 9.72264C17.6916 10.1594 18.3093 10.1594 18.4698 9.72264L18.8653 8.6461C19.1689 7.81974 19.8202 7.16845 20.6466 6.86482L21.7231 6.46927C22.1599 6.3088 22.1599 5.6911 21.7231 5.53063L20.6466 5.13508C19.8202 4.83145 19.1689 4.18016 18.8653 3.3538L18.4698 2.27726ZM10.9698 5.27726C10.8093 4.84052 10.1916 4.84052 10.0311 5.27727L8.42641 9.64465C8.12278 10.471 7.4715 11.1223 6.64513 11.4259L2.27775 13.0306C1.84101 13.1911 1.84101 13.8088 2.27775 13.9693L6.64513 15.574C7.4715 15.8776 8.12278 16.5289 8.42641 17.3553L10.0311 21.7226C10.1916 22.1594 10.8093 22.1594 10.9698 21.7226L12.5745 17.3553C12.8781 16.5289 13.5294 15.8776 14.3557 15.574L18.7231 13.9693C19.1599 13.8088 19.1599 13.1911 18.7231 13.0306L14.3557 11.4259C13.5294 11.1223 12.8781 10.471 12.5745 9.64465L10.9698 5.27726Z", fill: "white" })),
26
+ react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.4698 2.27726C18.3093 1.84052 17.6916 1.84052 17.5311 2.27726L17.1356 3.3538C16.8319 4.18016 16.1807 4.83145 15.3543 5.13508L14.2778 5.53063C13.841 5.6911 13.841 6.3088 14.2778 6.46927L15.3543 6.86482C16.1807 7.16845 16.8319 7.81974 17.1356 8.6461L17.5311 9.72264C17.6916 10.1594 18.3093 10.1594 18.4698 9.72264L18.8653 8.6461C19.1689 7.81974 19.8202 7.16845 20.6466 6.86482L21.7231 6.46927C22.1599 6.3088 22.1599 5.6911 21.7231 5.53063L20.6466 5.13508C19.8202 4.83145 19.1689 4.18016 18.8653 3.3538L18.4698 2.27726ZM10.9698 5.27726C10.8093 4.84052 10.1916 4.84052 10.0311 5.27727L8.42641 9.64465C8.12278 10.471 7.4715 11.1223 6.64513 11.4259L2.27775 13.0306C1.84101 13.1911 1.84101 13.8088 2.27775 13.9693L6.64513 15.574C7.4715 15.8776 8.12278 16.5289 8.42641 17.3553L10.0311 21.7226C10.1916 22.1594 10.8093 22.1594 10.9698 21.7226L12.5745 17.3553C12.8781 16.5289 13.5294 15.8776 14.3557 15.574L18.7231 13.9693C19.1599 13.8088 19.1599 13.1911 18.7231 13.0306L14.3557 11.4259C13.5294 11.1223 12.8781 10.471 12.5745 9.64465L10.9698 5.27726Z", fill: "#FDDF1C" }),
27
+ react_1.default.createElement("path", { d: "M9.5 14.4999C8.7 13.2999 5 13.3333 3.5 13.5L5.5 14.4999L7.5 15.4998L8.5 16.4998L10.5 20.9998C10.5 19.3332 10.3 15.6999 9.5 14.4999Z", fill: "#FFF174" }),
28
+ react_1.default.createElement("path", { d: "M11.5 12.4999C12.3 13.6999 16 13.6664 17.5 13.4998L15.5 12.4999L13.5 11.4999L12.5 10.4999L10.5 5.99994C10.5 7.66658 10.7 11.2999 11.5 12.4999Z", fill: "#FFF174" }),
29
+ react_1.default.createElement("path", { d: "M9.28571 12.142C8.71429 13.0913 6.07143 13.0648 5 12.933L6.42857 12.142L7.85714 11.351L8.57143 10.5599L10 7C10 8.31845 9.85714 11.1927 9.28571 12.142Z", fill: "#FFF6A9" }),
30
+ react_1.default.createElement("path", { d: "M11.8571 15.001C12.5429 13.8935 15.7143 13.9244 17 14.0782L15.2857 15.001L13.5714 15.9239L12.7143 16.8468L11 21C11 19.4618 11.1714 16.1085 11.8571 15.001Z", fill: "#FFF6A9" }),
31
+ react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.0004 3.88493C17.5956 4.83678 16.8373 5.59511 15.8854 5.99995C16.8373 6.40479 17.5956 7.16312 18.0004 8.11497C18.4053 7.16312 19.1636 6.40479 20.1155 5.99995C19.1636 5.59511 18.4053 4.83678 18.0004 3.88493ZM17.5311 2.27726C17.6916 1.84052 18.3093 1.84052 18.4698 2.27726L18.8653 3.3538C19.1689 4.18016 19.8202 4.83145 20.6466 5.13508L21.7231 5.53063C22.1599 5.6911 22.1599 6.3088 21.7231 6.46927L20.6466 6.86482C19.8202 7.16845 19.1689 7.81974 18.8653 8.6461L18.4698 9.72264C18.3093 10.1594 17.6916 10.1594 17.5311 9.72264L17.1356 8.6461C16.8319 7.81974 16.1807 7.16845 15.3543 6.86482L14.2778 6.46927C13.841 6.3088 13.841 5.6911 14.2778 5.53063L15.3543 5.13508C16.1807 4.83145 16.8319 4.18016 17.1356 3.3538L17.5311 2.27726Z", fill: "url(#paint3_linear_6347_29)" }),
32
+ react_1.default.createElement("g", { filter: "url(#filter1_f_6347_29)" },
33
+ react_1.default.createElement("path", { d: "M17.5481 3.40715C17.5946 3.13582 17.9843 3.13582 18.0309 3.40715L18.2266 4.54831C18.3232 5.11115 18.7218 5.57509 19.2637 5.75524V5.75524C19.4991 5.8335 19.4991 6.1665 19.2637 6.24476L19.1579 6.27994C18.6665 6.44331 18.2712 6.81374 18.0764 7.29358L18.0411 7.38037C17.9494 7.60624 17.6296 7.60624 17.5378 7.38037V7.38037C17.3251 6.85645 16.8559 6.48029 16.2983 6.38651L15.3139 6.22097C15.0647 6.17905 15.0647 5.82095 15.3139 5.77903V5.77903C16.4409 5.58951 17.3249 4.70837 17.5181 3.58205L17.5481 3.40715Z", fill: "white" })),
34
+ react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.5004 6.89946L11.6358 9.98953C12.0407 11.0913 12.909 11.9597 14.0109 12.3646L17.1009 13.4999L14.0109 14.6353C12.909 15.0402 12.0407 15.9085 11.6358 17.0104L10.5004 20.1004L9.36506 17.0104C8.96022 15.9085 8.09184 15.0402 6.99002 14.6353L3.89995 13.4999L6.99002 12.3646C8.09184 11.9597 8.96022 11.0913 9.36506 9.98953L10.5004 6.89946ZM10.0311 5.27726C10.1916 4.84052 10.8093 4.84052 10.9698 5.27726L12.5745 9.64465C12.8781 10.471 13.5294 11.1223 14.3557 11.4259L18.7231 13.0306C19.1599 13.1911 19.1599 13.8088 18.7231 13.9693L14.3557 15.574C13.5294 15.8776 12.8781 16.5289 12.5745 17.3553L10.9698 21.7226C10.8093 22.1594 10.1916 22.1594 10.0311 21.7226L8.42641 17.3553C8.12278 16.5289 7.4715 15.8776 6.64513 15.574L2.27775 13.9693C1.84101 13.8088 1.84101 13.1911 2.27775 13.0306L6.64513 11.4259C7.4715 11.1223 8.12278 10.471 8.42641 9.64465L10.0311 5.27726Z", fill: "url(#paint4_linear_6347_29)" }),
35
+ react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.5009 6.89941L11.6363 9.98948C12.0411 11.0913 12.9095 11.9597 14.0113 12.3645L17.1014 13.4999L14.0113 14.6353C12.9095 15.0401 12.0411 15.9085 11.6363 17.0103L10.5009 20.1004L9.3655 17.0103C8.96066 15.9085 8.09228 15.0401 6.99046 14.6353L3.90039 13.4999L6.99046 12.3645C8.09228 11.9597 8.96066 11.0913 9.3655 9.98948L10.5009 6.89941Z", fill: "url(#paint5_linear_6347_29)" }),
36
+ react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.8482 11.9743L14.3557 11.4259C13.5294 11.1223 12.8781 10.471 12.5745 9.64465L10.9698 5.27726C10.8093 4.84052 10.1916 4.84052 10.0311 5.27726L8.42641 9.64465C8.12278 10.471 7.4715 11.1223 6.64513 11.4259L2.27775 13.0306C1.84101 13.1911 1.84101 13.8088 2.27775 13.9693L6.64513 15.574C7.16928 15.7666 7.62299 16.099 7.96223 16.5273L8.83524 16.0233C8.37471 15.3958 7.73584 14.9094 6.99002 14.6353L3.89995 13.4999L6.99002 12.3646C8.09184 11.9597 8.96022 11.0913 9.36506 9.98953L10.5004 6.89946L11.6358 9.98953C12.0407 11.0913 12.909 11.9597 14.0109 12.3646L14.7206 12.6253L15.8482 11.9743Z", fill: "#FFD884" }),
37
+ react_1.default.createElement("g", { filter: "url(#filter2_f_6347_29)" },
38
+ react_1.default.createElement("path", { d: "M9.75296 7.59175C9.79676 7.30954 10.2032 7.30954 10.247 7.59175L10.7042 10.5372C10.85 11.4767 11.4941 12.263 12.3865 12.5909V12.5909C12.7672 12.7308 12.7672 13.2692 12.3865 13.4091L12.2328 13.4656C11.413 13.7668 10.7668 14.413 10.4656 15.2328L10.4171 15.3648C10.2745 15.753 9.72552 15.753 9.58291 15.3648V15.3648C9.25844 14.4818 8.49257 13.8351 7.5676 13.6631L5.32233 13.2458C5.04991 13.1952 5.04991 12.8048 5.32233 12.7542L6.96934 12.4481C8.22153 12.2153 9.19027 11.2173 9.38561 9.95869L9.75296 7.59175Z", fill: "white" }))),
39
+ react_1.default.createElement("defs", null,
40
+ react_1.default.createElement("filter", { id: "filter0_f_6347_29", x: "0.950195", y: "0.949707", width: "22.1006", height: "22.1006", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
41
+ react_1.default.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
42
+ react_1.default.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
43
+ react_1.default.createElement("feGaussianBlur", { stdDeviation: "0.5", result: "effect1_foregroundBlur_6347_29" })),
44
+ react_1.default.createElement("filter", { id: "filter1_f_6347_29", x: "13.127", y: "1.20361", width: "8.31348", height: "8.34619", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
45
+ react_1.default.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
46
+ react_1.default.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
47
+ react_1.default.createElement("feGaussianBlur", { stdDeviation: "1", result: "effect1_foregroundBlur_6347_29" })),
48
+ react_1.default.createElement("filter", { id: "filter2_f_6347_29", x: "3.11816", y: "5.38013", width: "11.5537", height: "12.2759", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
49
+ react_1.default.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
50
+ react_1.default.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
51
+ react_1.default.createElement("feGaussianBlur", { stdDeviation: "1", result: "effect1_foregroundBlur_6347_29" })),
52
+ react_1.default.createElement("linearGradient", { id: "paint0_linear_6347_29", x1: "12", y1: "1.5", x2: "12", y2: "21.5", gradientUnits: "userSpaceOnUse" },
53
+ react_1.default.createElement("stop", { stopColor: "#82CCFF" }),
54
+ react_1.default.createElement("stop", { offset: "0.336134", stopColor: "#B0FBF4" }),
55
+ react_1.default.createElement("stop", { offset: "0.965", stopColor: "#FDE6FF" })),
56
+ react_1.default.createElement("linearGradient", { id: "paint1_linear_6347_29", x1: "12", y1: "3.5", x2: "12", y2: "19.5", gradientUnits: "userSpaceOnUse" },
57
+ react_1.default.createElement("stop", { stopColor: "#63BBFF" }),
58
+ react_1.default.createElement("stop", { offset: "0.49", stopColor: "#B1D9FF" }),
59
+ react_1.default.createElement("stop", { offset: "1", stopColor: "#F6C7FF" })),
60
+ react_1.default.createElement("linearGradient", { id: "paint2_linear_6347_29", x1: "12", y1: "6.5", x2: "12", y2: "16.5", gradientUnits: "userSpaceOnUse" },
61
+ react_1.default.createElement("stop", { stopColor: "#63BBFF" }),
62
+ react_1.default.createElement("stop", { offset: "0.49", stopColor: "#B1D9FF" }),
63
+ react_1.default.createElement("stop", { offset: "1", stopColor: "#F6C7FF" })),
64
+ react_1.default.createElement("linearGradient", { id: "paint3_linear_6347_29", x1: "12", y1: "1", x2: "12", y2: "23", gradientUnits: "userSpaceOnUse" },
65
+ react_1.default.createElement("stop", { stopColor: "#FFB830" }),
66
+ react_1.default.createElement("stop", { offset: "1", stopColor: "#EF9C01" })),
67
+ react_1.default.createElement("linearGradient", { id: "paint4_linear_6347_29", x1: "3.5", y1: "4", x2: "15.5", y2: "22", gradientUnits: "userSpaceOnUse" },
68
+ react_1.default.createElement("stop", { stopColor: "#FFCE66" }),
69
+ react_1.default.createElement("stop", { offset: "1", stopColor: "#EF9C01" })),
70
+ react_1.default.createElement("linearGradient", { id: "paint5_linear_6347_29", x1: "6.5", y1: "5", x2: "12", y2: "17", gradientUnits: "userSpaceOnUse" },
71
+ react_1.default.createElement("stop", { stopColor: "#FFFACE" }),
72
+ react_1.default.createElement("stop", { offset: "1", stopColor: "#FFFACE", stopOpacity: "0" })),
73
+ react_1.default.createElement("clipPath", { id: "clip0_6347_29" },
74
+ react_1.default.createElement("rect", { width: "24", height: "24", fill: "white" })))));
75
+ };
76
+ exports.default = AIPowered;
@@ -1,15 +1,19 @@
1
1
  import React from 'react';
2
- import { MatchRulesTitle } from '../MatchRulesTitle';
3
2
  import NegativeRuleTooltipIcon from '../icons/NegativeRuleTooltipIcon';
4
3
  import { useStyles } from './styles';
4
+ import i18n from 'ui-i18n';
5
5
  export var MatchRulesTooltip = function (_a) {
6
6
  var _b = _a.isMlMatch, isMlMatch = _b === void 0 ? false : _b, matchRules = _a.matchRules;
7
7
  var styles = useStyles();
8
+ var hasMatchRules = matchRules.length > 0;
9
+ var showTitle = !isMlMatch && hasMatchRules;
8
10
  return (React.createElement("div", { className: styles.container },
9
- React.createElement("div", { className: styles.title },
10
- React.createElement(MatchRulesTitle, { isMlMatch: isMlMatch }),
11
- ' '),
12
- React.createElement("div", { className: styles.body }, matchRules.map(function (match) { return (React.createElement("div", { key: match.uri },
13
- '- ',
14
- match.negativeRule && React.createElement(NegativeRuleTooltipIcon, { className: styles.negativeRuleIcon }), "".concat(match.label))); }))));
11
+ React.createElement("div", { className: showTitle ? styles.bodyWithMargin : styles.bodyWithoutMargin },
12
+ showTitle && React.createElement("div", { className: styles.title }, i18n.text('Match rules')),
13
+ hasMatchRules
14
+ ? matchRules.map(function (match) { return (React.createElement("div", { key: match.uri },
15
+ '- ',
16
+ match.negativeRule && React.createElement(NegativeRuleTooltipIcon, { className: styles.negativeRuleIcon }),
17
+ match.label)); })
18
+ : null)));
15
19
  };
@@ -1,39 +1,35 @@
1
1
  import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import { MatchRulesTitle } from '../MatchRulesTitle';
4
- import NegativeRuleTooltipIcon from '../icons/NegativeRuleTooltipIcon';
2
+ import { render, screen } from '@testing-library/react';
5
3
  import { MatchRulesTooltip } from './MatchRulesTooltip';
6
4
  describe('MatchRulesTooltip test', function () {
7
- var getMatchRulesTitle = function (component) { return component.find(MatchRulesTitle); };
8
- var getBody = function (component) { return component.find('.body'); };
9
- it('should provide isMlMatch prop to MatchRulesTitle', function () {
10
- var component = shallow(React.createElement(MatchRulesTooltip, { isMlMatch: true, matchRules: [] }));
11
- expect(getMatchRulesTitle(component).prop('isMlMatch')).toBe(true);
12
- component.setProps({ isMlMatch: false });
13
- expect(getMatchRulesTitle(component).prop('isMlMatch')).toBe(false);
5
+ it('should render correct title depending on isMlMatch prop', function () {
6
+ var rerender = render(React.createElement(MatchRulesTooltip, { isMlMatch: true, matchRules: [] })).rerender;
7
+ expect(screen.queryByText(/Match rules/i)).not.toBeInTheDocument();
8
+ rerender(React.createElement(MatchRulesTooltip, { isMlMatch: false, matchRules: [{ uri: 'uri1', label: 'label1' }] }));
9
+ expect(screen.getByText(/Match rules/i)).toBeInTheDocument();
14
10
  });
15
11
  it('should render match rule correctly', function () {
16
12
  var matchRules = [
17
13
  { uri: 'uri1', label: 'label1' },
18
- { uri: 'uri1', label: 'label1' }
14
+ { uri: 'uri2', label: 'label2' }
19
15
  ];
20
- var component = shallow(React.createElement(MatchRulesTooltip, { matchRules: matchRules }));
21
- var body = getBody(component);
22
- expect(body.children()).toHaveLength(2);
23
- expect(body.childAt(0).text()).toContain(matchRules[0].label);
24
- expect(body.childAt(1).text()).toContain(matchRules[1].label);
16
+ render(React.createElement(MatchRulesTooltip, { matchRules: matchRules }));
17
+ var ruleItems = screen.getAllByText(/^-\s+/);
18
+ expect(ruleItems).toHaveLength(2);
19
+ expect(ruleItems[0]).toHaveTextContent(matchRules[0].label);
20
+ expect(ruleItems[1]).toHaveTextContent(matchRules[1].label);
25
21
  });
26
22
  it('should render negative rule correctly', function () {
27
23
  var matchRules = [
28
24
  { uri: 'uri1', label: 'label1' },
29
- { uri: 'uri1', label: 'label1', negativeRule: {} }
25
+ { uri: 'uri2', label: 'label2', negativeRule: {} }
30
26
  ];
31
- var component = shallow(React.createElement(MatchRulesTooltip, { matchRules: matchRules }));
32
- var body = getBody(component);
33
- expect(body.children()).toHaveLength(2);
34
- expect(body.childAt(0).text()).toContain(matchRules[0].label);
35
- expect(body.childAt(0).find(NegativeRuleTooltipIcon)).toHaveLength(0);
36
- expect(body.childAt(1).text()).toContain(matchRules[1].label);
37
- expect(body.childAt(1).find(NegativeRuleTooltipIcon)).toHaveLength(1);
27
+ render(React.createElement(MatchRulesTooltip, { matchRules: matchRules }));
28
+ var ruleItems = screen.getAllByText(/^-\s+/);
29
+ expect(ruleItems).toHaveLength(2);
30
+ expect(ruleItems[0]).toHaveTextContent(matchRules[0].label);
31
+ expect(ruleItems[0].querySelector('svg')).not.toBeInTheDocument();
32
+ expect(ruleItems[1]).toHaveTextContent(matchRules[1].label);
33
+ expect(ruleItems[1].querySelector('svg')).toBeInTheDocument();
38
34
  });
39
35
  });
@@ -1 +1 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"container" | "title" | "body" | "negativeRuleIcon">;
1
+ export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"container" | "title" | "bodyWithMargin" | "bodyWithoutMargin" | "negativeRuleIcon">;
@@ -4,10 +4,14 @@ export var useStyles = makeStyles({
4
4
  fontWeight: 500,
5
5
  marginBottom: '9px'
6
6
  },
7
- body: {
7
+ bodyWithMargin: {
8
8
  fontWeight: 'normal',
9
9
  marginLeft: '16px'
10
10
  },
11
+ bodyWithoutMargin: {
12
+ fontWeight: 'normal',
13
+ marginLeft: '0px'
14
+ },
11
15
  container: {
12
16
  padding: '8px',
13
17
  fontSize: '12px',
@@ -4,22 +4,25 @@ import classnames from 'classnames';
4
4
  import { getMatchRuleSummary, formatRelevanceScore } from '@reltio/mdm-sdk';
5
5
  import Tooltip from '@mui/material/Tooltip';
6
6
  import NegativeRuleIcon from '../icons/NegativeRuleIcon';
7
- import { MatchRulesTitle } from '../MatchRulesTitle';
8
7
  import { useStyles } from './styles';
9
8
  export var SimpleMatchRules = function (_a) {
10
9
  var isMlMatch = _a.isMlMatch, matchRules = _a.matchRules, className = _a.className, matchRuleSummaries = _a.matchRuleSummaries;
11
10
  var styles = useStyles();
11
+ var hasMatchRules = matchRules.length > 0;
12
+ var showTitle = !isMlMatch && hasMatchRules;
12
13
  return (React.createElement("div", { "data-reltio-id": "simple-match-rules", className: classnames(styles.container, className) },
13
- React.createElement("div", { className: styles.title },
14
- React.createElement(MatchRulesTitle, { isMlMatch: isMlMatch })),
15
- React.createElement("div", { className: styles.labelsContainer }, matchRules.map(function (matchRule) {
16
- var matchRuleSummary = getMatchRuleSummary(matchRuleSummaries, matchRule.uri);
17
- var relevancePercentage = formatRelevanceScore(matchRuleSummary);
18
- return (React.createElement("div", { className: styles.matchRuleInfo, key: matchRule.uri, "data-reltio-id": "match-rule-info" },
19
- React.createElement("div", { className: styles.matchRuleLabel },
20
- '- ',
21
- matchRule.negativeRule && React.createElement(NegativeRuleIcon, { className: styles.negativeRuleIcon }), "".concat(matchRule.label)),
22
- relevancePercentage && (React.createElement(Tooltip, { title: i18n.text('Relevance score') },
23
- React.createElement("div", { className: styles.relevanceScore }, relevancePercentage)))));
24
- }))));
14
+ React.createElement("div", { className: showTitle ? styles.bodyWithMargin : styles.bodyWithoutMargin },
15
+ showTitle && React.createElement("div", { className: styles.title }, i18n.text('Match rules')),
16
+ React.createElement("div", { className: styles.labelsContainer }, hasMatchRules
17
+ ? matchRules.map(function (matchRule) {
18
+ var matchRuleSummary = getMatchRuleSummary(matchRuleSummaries, matchRule.uri);
19
+ var relevancePercentage = formatRelevanceScore(matchRuleSummary);
20
+ return (React.createElement("div", { className: styles.matchRuleInfo, key: matchRule.uri, "data-reltio-id": "match-rule-info" },
21
+ React.createElement("div", { className: styles.matchRuleLabel },
22
+ '- ',
23
+ matchRule.negativeRule && (React.createElement(NegativeRuleIcon, { className: styles.negativeRuleIcon })), "".concat(matchRule.label)),
24
+ relevancePercentage && (React.createElement(Tooltip, { title: i18n.text('Relevance score') },
25
+ React.createElement("div", { className: styles.relevanceScore }, relevancePercentage)))));
26
+ })
27
+ : null))));
25
28
  };
@@ -1,45 +1,18 @@
1
1
  import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import { MatchRulesTitle } from '../MatchRulesTitle';
4
- import NegativeRuleIcon from '../icons/NegativeRuleIcon';
2
+ import { render, screen } from '@testing-library/react';
5
3
  import { SimpleMatchRules } from './SimpleMatchRules';
6
4
  describe('SimpleMatchRules tests', function () {
7
- var getMatchRulesTitle = function (component) { return component.find(MatchRulesTitle); };
8
- var getLabelContainer = function (component) { return component.find('.labelsContainer'); };
9
- var getContainer = function (component) { return component.find('.container'); };
10
- it('should provide isMlMatch prop to MatchRulesTitle', function () {
11
- var component = shallow(React.createElement(SimpleMatchRules, { isMlMatch: true, matchRules: [] }));
12
- expect(getMatchRulesTitle(component).prop('isMlMatch')).toBe(true);
13
- component.setProps({ isMlMatch: false });
14
- expect(getMatchRulesTitle(component).prop('isMlMatch')).toBe(false);
15
- });
16
- it('should render match rule correctly', function () {
17
- var matchRules = [
18
- { uri: 'uri1', label: 'label1' },
19
- { uri: 'uri2', label: 'label2' }
20
- ];
21
- var component = shallow(React.createElement(SimpleMatchRules, { matchRules: matchRules }));
22
- var labelContainer = getLabelContainer(component);
23
- expect(labelContainer.children()).toHaveLength(2);
24
- expect(labelContainer.childAt(0).text()).toContain(matchRules[0].label);
25
- expect(labelContainer.childAt(1).text()).toContain(matchRules[1].label);
26
- });
27
- it('should provide className prop to container', function () {
28
- var className = 'myClassName';
29
- var component = shallow(React.createElement(SimpleMatchRules, { className: className, matchRules: [] }));
30
- expect(getContainer(component).prop('className')).toContain(className);
31
- });
32
5
  it('should render negative rule correctly', function () {
33
6
  var matchRules = [
34
7
  { uri: 'uri1', label: 'label1' },
35
8
  { uri: 'uri2', label: 'label2', negativeRule: {} }
36
9
  ];
37
- var component = shallow(React.createElement(SimpleMatchRules, { matchRules: matchRules }));
38
- var labelContainer = getLabelContainer(component);
39
- expect(labelContainer.children()).toHaveLength(2);
40
- expect(labelContainer.childAt(0).text()).toContain(matchRules[0].label);
41
- expect(labelContainer.childAt(0).find(NegativeRuleIcon)).toHaveLength(0);
42
- expect(labelContainer.childAt(1).text()).toContain(matchRules[1].label);
43
- expect(labelContainer.childAt(1).find(NegativeRuleIcon)).toHaveLength(1);
10
+ render(React.createElement(SimpleMatchRules, { matchRules: matchRules }));
11
+ var ruleItems = screen.getAllByText(/^-\s+/);
12
+ expect(ruleItems).toHaveLength(2);
13
+ expect(ruleItems[0]).toHaveTextContent(matchRules[0].label);
14
+ expect(ruleItems[0].querySelector('svg')).not.toBeInTheDocument();
15
+ expect(ruleItems[1]).toHaveTextContent(matchRules[1].label);
16
+ expect(ruleItems[1].querySelector('svg')).toBeInTheDocument();
44
17
  });
45
18
  });
@@ -1 +1 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"container" | "title" | "relevanceScore" | "negativeRuleIcon" | "labelsContainer" | "matchRuleInfo" | "matchRuleLabel">;
1
+ export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"container" | "title" | "relevanceScore" | "bodyWithMargin" | "bodyWithoutMargin" | "negativeRuleIcon" | "labelsContainer" | "matchRuleInfo" | "matchRuleLabel">;
@@ -8,6 +8,14 @@ export var useStyles = makeStyles(function (theme) { return ({
8
8
  color: theme.palette.text.secondary,
9
9
  marginBottom: '7px'
10
10
  },
11
+ bodyWithMargin: {
12
+ fontWeight: 'normal',
13
+ marginLeft: '16px'
14
+ },
15
+ bodyWithoutMargin: {
16
+ fontWeight: 'normal',
17
+ marginLeft: '0px'
18
+ },
11
19
  labelsContainer: {
12
20
  color: theme.palette.text.primary,
13
21
  marginBottom: '8px'
@@ -4,7 +4,7 @@ import { MatchRulesTooltip } from '../MatchRulesTooltip';
4
4
  import { SimpleMatchRules } from '../SimpleMatchRules';
5
5
  import { MatchRulesBadge } from '../MatchRulesBadge';
6
6
  import { withTooltip } from '../HOCs/withTooltip';
7
- import MLMatchIcon from '../icons/MlMatch';
7
+ import AIPowered from '../icons/AIPowered';
8
8
  import { useStyles } from './styles';
9
9
  export var MatchRuleBadgeWithTooltip = withTooltip(MatchRulesBadge);
10
10
  export var SimpleMatchRulesBlock = function (_a) {
@@ -14,7 +14,7 @@ export var SimpleMatchRulesBlock = function (_a) {
14
14
  var handleOnExpand = useCallback(function () { return setExpanded(function (expand) { return !expand; }); }, []);
15
15
  return (React.createElement("div", { className: styles.container, "data-reltio-id": "simple-match-rules-block" },
16
16
  React.createElement(MatchRuleBadgeWithTooltip, { tooltipTitle: React.createElement(MatchRulesTooltip, { matchRules: matchRules, isMlMatch: isMlMatch }), tooltipPlacement: "bottom-start", onExpand: handleOnExpand, expanded: expanded }, isMlMatch ? (React.createElement(React.Fragment, null,
17
- React.createElement(MLMatchIcon, { className: styles.icon }),
18
- i18n.text('Match IQ'))) : (i18n.text('Rules'))),
17
+ React.createElement(AIPowered, { className: styles.icon }),
18
+ i18n.text('AI-Powered'))) : (i18n.text('Rules'))),
19
19
  expanded ? (React.createElement(SimpleMatchRules, { className: styles.rulesContainer, matchRules: matchRules, isMlMatch: isMlMatch, matchRuleSummaries: matchRuleSummaries })) : null));
20
20
  };
@@ -31,7 +31,7 @@ describe('SimpleMatchRulesBlock test', function () {
31
31
  });
32
32
  it('should render correct MatchRuleBadgeWithTooltip for Ml match', function () {
33
33
  var component = shallow(React.createElement(SimpleMatchRulesBlock, { isMlMatch: true, matchRules: matchRules }));
34
- expect(getMatchRuleBadgeWithTooltip(component).text()).toBe('<SvgMlMatch />Match IQ');
34
+ expect(getMatchRuleBadgeWithTooltip(component).text()).toBe('<AIPowered />AI-Powered');
35
35
  });
36
36
  it('should render correct MatchRuleBadgeWithTooltip for non Ml match', function () {
37
37
  var component = shallow(React.createElement(SimpleMatchRulesBlock, { matchRules: matchRules }));
@@ -1,4 +1,4 @@
1
- import { Metadata, SearchState, AttributesPresentation, Entity, Mode, AttributeType, AttributeError, ImageAttributeValue, SortingStrategy, DependentLookupsConfig, PivotingValue, PivotingAttribute, DataTenant, HistoryDiff, ImageAttributeFieldsOrder, Connection, User, SearchNavigationData, SearchProviderData, Lookups, HistoryMode, HistorySlice, HistoryEvent, RequestNextPageOfAttributeValuesPayload, LookupsForTypeResolvedPayload, RelationsLoadedPayload, CompactRelationType, AddAttributesPayload, ModifyAttributePayload, RemoveAttributePayload, RelationsState, DependentLookupsState, ActivityFilter, SearchOptions, GlobalFilter, Layout, Profile } from '@reltio/mdm-sdk';
1
+ import { Metadata, SearchState, AttributesPresentation, Entity, Mode, AttributeType, AttributeError, ImageAttributeValue, SortingStrategy, DependentLookupsConfig, PivotingValue, PivotingAttribute, DataTenant, HistoryDiff, ImageAttributeFieldsOrder, Connection, User, SearchNavigationData, SearchProviderData, Lookups, HistoryMode, HistorySlice, HistoryEvent, RequestNextPageOfAttributeValuesPayload, LookupsForTypeResolvedPayload, RelationsLoadedPayload, CompactRelationType, AddAttributesPayload, ModifyAttributePayload, RemoveAttributePayload, RelationsState, DependentLookupsState, ActivityFilter, SearchOptions, GlobalFilter, Layout, Profile, Rating } from '@reltio/mdm-sdk';
2
2
  import { AnyAction } from '../../types';
3
3
  export type MdmModuleValuesContextProps = Partial<{
4
4
  autoCloseInterval: number;
@@ -117,6 +117,7 @@ export type MdmModuleActionsContextProps = Partial<{
117
117
  errorsSet: (payload: AttributeError[]) => void;
118
118
  addRelation: (id: string, connection: Connection) => void;
119
119
  editRelation: (id: string, connection: Connection) => void;
120
+ updateRelationRating: (id: string, connection: Connection, rating: Rating, user: string) => void;
120
121
  updateHiddenAttributes: (uri: string, hiddenAttributes: string[]) => void;
121
122
  resetHiddenAttributes: (uri: string) => void;
122
123
  updateControlAttributes: (controlAttributes: string[]) => void;
@@ -187,6 +188,7 @@ export declare const MdmModuleActionsContext: import("@fluentui/react-context-se
187
188
  errorsSet: (payload: AttributeError[]) => void;
188
189
  addRelation: (id: string, connection: Connection) => void;
189
190
  editRelation: (id: string, connection: Connection) => void;
191
+ updateRelationRating: (id: string, connection: Connection, rating: Rating, user: string) => void;
190
192
  updateHiddenAttributes: (uri: string, hiddenAttributes: string[]) => void;
191
193
  resetHiddenAttributes: (uri: string) => void;
192
194
  updateControlAttributes: (controlAttributes: string[]) => void;
@@ -71,7 +71,7 @@ export declare const useMdmDependentLookupEditorContext: (attributeValue: Simple
71
71
  };
72
72
  export declare const useMdmGlobalSearchRequestOptions: (omittingFields?: string[]) => import("@reltio/mdm-sdk").GlobalSearchRequestOptions;
73
73
  export declare const useMdmAuthoringItemsByEntityType: (entityTypeUri: string) => import("@reltio/mdm-sdk").AuthoringItem[];
74
- export declare const useMdmAction: <T extends "openSearch" | "openHistoryEvent" | "openConsoleApp" | "addAttributes" | "modifyAttribute" | "removeAttribute" | "entityDeleted" | "entityCreated" | "errorDeactivated" | "requestNextPageOfAttributeValues" | "openEntity" | "setDefaultProfilePicForModifiedEntity" | "setDefaultProfilePicForEntity" | "dependentLookupsEditorTouched" | "openPivotingPerspective" | "lookupsLoaded" | "lookupsForTypeResolved" | "errorSet" | "setHistoryMode" | "modeUpdated" | "modeUpdateRequested" | "setHistoryEvent" | "clearHistoryEvent" | "clearHistoryDiff" | "setHistoryDiff" | "setHistorySlice" | "updateSearchNavigationDataFields" | "openPerspective" | "entityDeletionFinished" | "loadEntity" | "updateSearchNavigationDataOnMerge" | "lookupsListResolved" | "relationsLoaded" | "setInitialInfo" | "setRelationType" | "closeRelationEditor" | "openRelationEditor" | "setRelationEntity" | "errorsSet" | "addRelation" | "editRelation" | "updateHiddenAttributes" | "resetHiddenAttributes" | "updateControlAttributes">(action: T) => Partial<{
74
+ export declare const useMdmAction: <T extends "openSearch" | "openHistoryEvent" | "openConsoleApp" | "addAttributes" | "modifyAttribute" | "removeAttribute" | "entityDeleted" | "entityCreated" | "errorDeactivated" | "requestNextPageOfAttributeValues" | "openEntity" | "setDefaultProfilePicForModifiedEntity" | "setDefaultProfilePicForEntity" | "dependentLookupsEditorTouched" | "openPivotingPerspective" | "lookupsLoaded" | "lookupsForTypeResolved" | "errorSet" | "setHistoryMode" | "modeUpdated" | "modeUpdateRequested" | "setHistoryEvent" | "clearHistoryEvent" | "clearHistoryDiff" | "setHistoryDiff" | "setHistorySlice" | "updateSearchNavigationDataFields" | "openPerspective" | "entityDeletionFinished" | "loadEntity" | "updateSearchNavigationDataOnMerge" | "lookupsListResolved" | "relationsLoaded" | "setInitialInfo" | "setRelationType" | "closeRelationEditor" | "openRelationEditor" | "setRelationEntity" | "errorsSet" | "addRelation" | "editRelation" | "updateRelationRating" | "updateHiddenAttributes" | "resetHiddenAttributes" | "updateControlAttributes">(action: T) => Partial<{
75
75
  openSearch: (payload: import("@reltio/mdm-sdk").SearchState) => void;
76
76
  openHistoryEvent: (payload: {
77
77
  entityUri: string;
@@ -132,6 +132,7 @@ export declare const useMdmAction: <T extends "openSearch" | "openHistoryEvent"
132
132
  errorsSet: (payload: import("@reltio/mdm-sdk").AttributeError[]) => void;
133
133
  addRelation: (id: string, connection: import("@reltio/mdm-sdk").Connection) => void;
134
134
  editRelation: (id: string, connection: import("@reltio/mdm-sdk").Connection) => void;
135
+ updateRelationRating: (id: string, connection: import("@reltio/mdm-sdk").Connection, rating: import("@reltio/mdm-sdk").Rating, user: string) => void;
135
136
  updateHiddenAttributes: (uri: string, hiddenAttributes: string[]) => void;
136
137
  resetHiddenAttributes: (uri: string) => void;
137
138
  updateControlAttributes: (controlAttributes: string[]) => void;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ interface AIPoweredProps extends React.SVGProps<SVGSVGElement> {
3
+ }
4
+ declare const AIPowered: React.FC<AIPoweredProps>;
5
+ export default AIPowered;
@@ -0,0 +1,71 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import React from 'react';
13
+ var AIPowered = function (props) {
14
+ return (React.createElement("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
15
+ React.createElement("g", { clipPath: "url(#clip0_6347_29)" },
16
+ React.createElement("path", { d: "M11.5 2.57735C12.1188 2.22008 12.8812 2.22008 13.5 2.57735L19.7272 6.17265C20.346 6.52992 20.7272 7.19017 20.7272 7.9047V15.0953C20.7272 15.8098 20.346 16.4701 19.7272 16.8274L13.5 20.4226C12.8812 20.7799 12.1188 20.7799 11.5 20.4226L5.27276 16.8274C4.65396 16.4701 4.27276 15.8098 4.27276 15.0953V7.9047C4.27276 7.19017 4.65396 6.52992 5.27276 6.17265L11.5 2.57735Z", fill: "url(#paint0_linear_6347_29)" }),
17
+ React.createElement("path", { opacity: "0.5", d: "M11.5 4.57735C12.1188 4.22008 12.8812 4.22008 13.5 4.57735L17.9952 7.17265C18.614 7.52992 18.9952 8.19017 18.9952 8.9047V14.0953C18.9952 14.8098 18.614 15.4701 17.9952 15.8274L13.5 18.4226C12.8812 18.7799 12.1188 18.7799 11.5 18.4226L7.00481 15.8274C6.38601 15.4701 6.00481 14.8098 6.00481 14.0953V8.9047C6.00481 8.19017 6.38601 7.52992 7.00481 7.17265L11.5 4.57735Z", fill: "url(#paint1_linear_6347_29)" }),
18
+ React.createElement("path", { opacity: "0.5", d: "M11.5 7.57735C12.1188 7.22008 12.8812 7.22008 13.5 7.57735L15.3971 8.67265C16.0159 9.02992 16.3971 9.69017 16.3971 10.4047V12.5953C16.3971 13.3098 16.0159 13.9701 15.3971 14.3274L13.5 15.4226C12.8812 15.7799 12.1188 15.7799 11.5 15.4226L9.60289 14.3274C8.98408 13.9701 8.60289 13.3098 8.60289 12.5953V10.4047C8.60289 9.69017 8.98408 9.02992 9.60289 8.67265L11.5 7.57735Z", fill: "url(#paint2_linear_6347_29)" }),
19
+ React.createElement("g", { filter: "url(#filter0_f_6347_29)" },
20
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.4698 2.27726C18.3093 1.84052 17.6916 1.84052 17.5311 2.27726L17.1356 3.3538C16.8319 4.18016 16.1807 4.83145 15.3543 5.13508L14.2778 5.53063C13.841 5.6911 13.841 6.3088 14.2778 6.46927L15.3543 6.86482C16.1807 7.16845 16.8319 7.81974 17.1356 8.6461L17.5311 9.72264C17.6916 10.1594 18.3093 10.1594 18.4698 9.72264L18.8653 8.6461C19.1689 7.81974 19.8202 7.16845 20.6466 6.86482L21.7231 6.46927C22.1599 6.3088 22.1599 5.6911 21.7231 5.53063L20.6466 5.13508C19.8202 4.83145 19.1689 4.18016 18.8653 3.3538L18.4698 2.27726ZM10.9698 5.27726C10.8093 4.84052 10.1916 4.84052 10.0311 5.27727L8.42641 9.64465C8.12278 10.471 7.4715 11.1223 6.64513 11.4259L2.27775 13.0306C1.84101 13.1911 1.84101 13.8088 2.27775 13.9693L6.64513 15.574C7.4715 15.8776 8.12278 16.5289 8.42641 17.3553L10.0311 21.7226C10.1916 22.1594 10.8093 22.1594 10.9698 21.7226L12.5745 17.3553C12.8781 16.5289 13.5294 15.8776 14.3557 15.574L18.7231 13.9693C19.1599 13.8088 19.1599 13.1911 18.7231 13.0306L14.3557 11.4259C13.5294 11.1223 12.8781 10.471 12.5745 9.64465L10.9698 5.27726Z", fill: "white" })),
21
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.4698 2.27726C18.3093 1.84052 17.6916 1.84052 17.5311 2.27726L17.1356 3.3538C16.8319 4.18016 16.1807 4.83145 15.3543 5.13508L14.2778 5.53063C13.841 5.6911 13.841 6.3088 14.2778 6.46927L15.3543 6.86482C16.1807 7.16845 16.8319 7.81974 17.1356 8.6461L17.5311 9.72264C17.6916 10.1594 18.3093 10.1594 18.4698 9.72264L18.8653 8.6461C19.1689 7.81974 19.8202 7.16845 20.6466 6.86482L21.7231 6.46927C22.1599 6.3088 22.1599 5.6911 21.7231 5.53063L20.6466 5.13508C19.8202 4.83145 19.1689 4.18016 18.8653 3.3538L18.4698 2.27726ZM10.9698 5.27726C10.8093 4.84052 10.1916 4.84052 10.0311 5.27727L8.42641 9.64465C8.12278 10.471 7.4715 11.1223 6.64513 11.4259L2.27775 13.0306C1.84101 13.1911 1.84101 13.8088 2.27775 13.9693L6.64513 15.574C7.4715 15.8776 8.12278 16.5289 8.42641 17.3553L10.0311 21.7226C10.1916 22.1594 10.8093 22.1594 10.9698 21.7226L12.5745 17.3553C12.8781 16.5289 13.5294 15.8776 14.3557 15.574L18.7231 13.9693C19.1599 13.8088 19.1599 13.1911 18.7231 13.0306L14.3557 11.4259C13.5294 11.1223 12.8781 10.471 12.5745 9.64465L10.9698 5.27726Z", fill: "#FDDF1C" }),
22
+ React.createElement("path", { d: "M9.5 14.4999C8.7 13.2999 5 13.3333 3.5 13.5L5.5 14.4999L7.5 15.4998L8.5 16.4998L10.5 20.9998C10.5 19.3332 10.3 15.6999 9.5 14.4999Z", fill: "#FFF174" }),
23
+ React.createElement("path", { d: "M11.5 12.4999C12.3 13.6999 16 13.6664 17.5 13.4998L15.5 12.4999L13.5 11.4999L12.5 10.4999L10.5 5.99994C10.5 7.66658 10.7 11.2999 11.5 12.4999Z", fill: "#FFF174" }),
24
+ React.createElement("path", { d: "M9.28571 12.142C8.71429 13.0913 6.07143 13.0648 5 12.933L6.42857 12.142L7.85714 11.351L8.57143 10.5599L10 7C10 8.31845 9.85714 11.1927 9.28571 12.142Z", fill: "#FFF6A9" }),
25
+ React.createElement("path", { d: "M11.8571 15.001C12.5429 13.8935 15.7143 13.9244 17 14.0782L15.2857 15.001L13.5714 15.9239L12.7143 16.8468L11 21C11 19.4618 11.1714 16.1085 11.8571 15.001Z", fill: "#FFF6A9" }),
26
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.0004 3.88493C17.5956 4.83678 16.8373 5.59511 15.8854 5.99995C16.8373 6.40479 17.5956 7.16312 18.0004 8.11497C18.4053 7.16312 19.1636 6.40479 20.1155 5.99995C19.1636 5.59511 18.4053 4.83678 18.0004 3.88493ZM17.5311 2.27726C17.6916 1.84052 18.3093 1.84052 18.4698 2.27726L18.8653 3.3538C19.1689 4.18016 19.8202 4.83145 20.6466 5.13508L21.7231 5.53063C22.1599 5.6911 22.1599 6.3088 21.7231 6.46927L20.6466 6.86482C19.8202 7.16845 19.1689 7.81974 18.8653 8.6461L18.4698 9.72264C18.3093 10.1594 17.6916 10.1594 17.5311 9.72264L17.1356 8.6461C16.8319 7.81974 16.1807 7.16845 15.3543 6.86482L14.2778 6.46927C13.841 6.3088 13.841 5.6911 14.2778 5.53063L15.3543 5.13508C16.1807 4.83145 16.8319 4.18016 17.1356 3.3538L17.5311 2.27726Z", fill: "url(#paint3_linear_6347_29)" }),
27
+ React.createElement("g", { filter: "url(#filter1_f_6347_29)" },
28
+ React.createElement("path", { d: "M17.5481 3.40715C17.5946 3.13582 17.9843 3.13582 18.0309 3.40715L18.2266 4.54831C18.3232 5.11115 18.7218 5.57509 19.2637 5.75524V5.75524C19.4991 5.8335 19.4991 6.1665 19.2637 6.24476L19.1579 6.27994C18.6665 6.44331 18.2712 6.81374 18.0764 7.29358L18.0411 7.38037C17.9494 7.60624 17.6296 7.60624 17.5378 7.38037V7.38037C17.3251 6.85645 16.8559 6.48029 16.2983 6.38651L15.3139 6.22097C15.0647 6.17905 15.0647 5.82095 15.3139 5.77903V5.77903C16.4409 5.58951 17.3249 4.70837 17.5181 3.58205L17.5481 3.40715Z", fill: "white" })),
29
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.5004 6.89946L11.6358 9.98953C12.0407 11.0913 12.909 11.9597 14.0109 12.3646L17.1009 13.4999L14.0109 14.6353C12.909 15.0402 12.0407 15.9085 11.6358 17.0104L10.5004 20.1004L9.36506 17.0104C8.96022 15.9085 8.09184 15.0402 6.99002 14.6353L3.89995 13.4999L6.99002 12.3646C8.09184 11.9597 8.96022 11.0913 9.36506 9.98953L10.5004 6.89946ZM10.0311 5.27726C10.1916 4.84052 10.8093 4.84052 10.9698 5.27726L12.5745 9.64465C12.8781 10.471 13.5294 11.1223 14.3557 11.4259L18.7231 13.0306C19.1599 13.1911 19.1599 13.8088 18.7231 13.9693L14.3557 15.574C13.5294 15.8776 12.8781 16.5289 12.5745 17.3553L10.9698 21.7226C10.8093 22.1594 10.1916 22.1594 10.0311 21.7226L8.42641 17.3553C8.12278 16.5289 7.4715 15.8776 6.64513 15.574L2.27775 13.9693C1.84101 13.8088 1.84101 13.1911 2.27775 13.0306L6.64513 11.4259C7.4715 11.1223 8.12278 10.471 8.42641 9.64465L10.0311 5.27726Z", fill: "url(#paint4_linear_6347_29)" }),
30
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.5009 6.89941L11.6363 9.98948C12.0411 11.0913 12.9095 11.9597 14.0113 12.3645L17.1014 13.4999L14.0113 14.6353C12.9095 15.0401 12.0411 15.9085 11.6363 17.0103L10.5009 20.1004L9.3655 17.0103C8.96066 15.9085 8.09228 15.0401 6.99046 14.6353L3.90039 13.4999L6.99046 12.3645C8.09228 11.9597 8.96066 11.0913 9.3655 9.98948L10.5009 6.89941Z", fill: "url(#paint5_linear_6347_29)" }),
31
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.8482 11.9743L14.3557 11.4259C13.5294 11.1223 12.8781 10.471 12.5745 9.64465L10.9698 5.27726C10.8093 4.84052 10.1916 4.84052 10.0311 5.27726L8.42641 9.64465C8.12278 10.471 7.4715 11.1223 6.64513 11.4259L2.27775 13.0306C1.84101 13.1911 1.84101 13.8088 2.27775 13.9693L6.64513 15.574C7.16928 15.7666 7.62299 16.099 7.96223 16.5273L8.83524 16.0233C8.37471 15.3958 7.73584 14.9094 6.99002 14.6353L3.89995 13.4999L6.99002 12.3646C8.09184 11.9597 8.96022 11.0913 9.36506 9.98953L10.5004 6.89946L11.6358 9.98953C12.0407 11.0913 12.909 11.9597 14.0109 12.3646L14.7206 12.6253L15.8482 11.9743Z", fill: "#FFD884" }),
32
+ React.createElement("g", { filter: "url(#filter2_f_6347_29)" },
33
+ React.createElement("path", { d: "M9.75296 7.59175C9.79676 7.30954 10.2032 7.30954 10.247 7.59175L10.7042 10.5372C10.85 11.4767 11.4941 12.263 12.3865 12.5909V12.5909C12.7672 12.7308 12.7672 13.2692 12.3865 13.4091L12.2328 13.4656C11.413 13.7668 10.7668 14.413 10.4656 15.2328L10.4171 15.3648C10.2745 15.753 9.72552 15.753 9.58291 15.3648V15.3648C9.25844 14.4818 8.49257 13.8351 7.5676 13.6631L5.32233 13.2458C5.04991 13.1952 5.04991 12.8048 5.32233 12.7542L6.96934 12.4481C8.22153 12.2153 9.19027 11.2173 9.38561 9.95869L9.75296 7.59175Z", fill: "white" }))),
34
+ React.createElement("defs", null,
35
+ React.createElement("filter", { id: "filter0_f_6347_29", x: "0.950195", y: "0.949707", width: "22.1006", height: "22.1006", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
36
+ React.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
37
+ React.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
38
+ React.createElement("feGaussianBlur", { stdDeviation: "0.5", result: "effect1_foregroundBlur_6347_29" })),
39
+ React.createElement("filter", { id: "filter1_f_6347_29", x: "13.127", y: "1.20361", width: "8.31348", height: "8.34619", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
40
+ React.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
41
+ React.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
42
+ React.createElement("feGaussianBlur", { stdDeviation: "1", result: "effect1_foregroundBlur_6347_29" })),
43
+ React.createElement("filter", { id: "filter2_f_6347_29", x: "3.11816", y: "5.38013", width: "11.5537", height: "12.2759", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
44
+ React.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
45
+ React.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
46
+ React.createElement("feGaussianBlur", { stdDeviation: "1", result: "effect1_foregroundBlur_6347_29" })),
47
+ React.createElement("linearGradient", { id: "paint0_linear_6347_29", x1: "12", y1: "1.5", x2: "12", y2: "21.5", gradientUnits: "userSpaceOnUse" },
48
+ React.createElement("stop", { stopColor: "#82CCFF" }),
49
+ React.createElement("stop", { offset: "0.336134", stopColor: "#B0FBF4" }),
50
+ React.createElement("stop", { offset: "0.965", stopColor: "#FDE6FF" })),
51
+ React.createElement("linearGradient", { id: "paint1_linear_6347_29", x1: "12", y1: "3.5", x2: "12", y2: "19.5", gradientUnits: "userSpaceOnUse" },
52
+ React.createElement("stop", { stopColor: "#63BBFF" }),
53
+ React.createElement("stop", { offset: "0.49", stopColor: "#B1D9FF" }),
54
+ React.createElement("stop", { offset: "1", stopColor: "#F6C7FF" })),
55
+ React.createElement("linearGradient", { id: "paint2_linear_6347_29", x1: "12", y1: "6.5", x2: "12", y2: "16.5", gradientUnits: "userSpaceOnUse" },
56
+ React.createElement("stop", { stopColor: "#63BBFF" }),
57
+ React.createElement("stop", { offset: "0.49", stopColor: "#B1D9FF" }),
58
+ React.createElement("stop", { offset: "1", stopColor: "#F6C7FF" })),
59
+ React.createElement("linearGradient", { id: "paint3_linear_6347_29", x1: "12", y1: "1", x2: "12", y2: "23", gradientUnits: "userSpaceOnUse" },
60
+ React.createElement("stop", { stopColor: "#FFB830" }),
61
+ React.createElement("stop", { offset: "1", stopColor: "#EF9C01" })),
62
+ React.createElement("linearGradient", { id: "paint4_linear_6347_29", x1: "3.5", y1: "4", x2: "15.5", y2: "22", gradientUnits: "userSpaceOnUse" },
63
+ React.createElement("stop", { stopColor: "#FFCE66" }),
64
+ React.createElement("stop", { offset: "1", stopColor: "#EF9C01" })),
65
+ React.createElement("linearGradient", { id: "paint5_linear_6347_29", x1: "6.5", y1: "5", x2: "12", y2: "17", gradientUnits: "userSpaceOnUse" },
66
+ React.createElement("stop", { stopColor: "#FFFACE" }),
67
+ React.createElement("stop", { offset: "1", stopColor: "#FFFACE", stopOpacity: "0" })),
68
+ React.createElement("clipPath", { id: "clip0_6347_29" },
69
+ React.createElement("rect", { width: "24", height: "24", fill: "white" })))));
70
+ };
71
+ export default AIPowered;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.1907",
3
+ "version": "1.4.1909",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
@@ -8,7 +8,7 @@
8
8
  "@fluentui/react-context-selector": "^9.1.26",
9
9
  "@react-google-maps/api": "2.7.0",
10
10
  "@react-sigma/core": "3.4.0",
11
- "@reltio/mdm-sdk": "^1.4.1836",
11
+ "@reltio/mdm-sdk": "^1.4.1838",
12
12
  "classnames": "^2.2.5",
13
13
  "d3-cloud": "^1.2.5",
14
14
  "d3-geo": "^2.0.1",
@@ -1,5 +0,0 @@
1
- type Props = {
2
- isMlMatch?: boolean;
3
- };
4
- export declare const MatchRulesTitle: ({ isMlMatch }: Props) => JSX.Element;
5
- export {};
@@ -1,13 +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.MatchRulesTitle = void 0;
7
- var react_1 = __importDefault(require("react"));
8
- var ui_i18n_1 = __importDefault(require("ui-i18n"));
9
- var MatchRulesTitle = function (_a) {
10
- var _b = _a.isMlMatch, isMlMatch = _b === void 0 ? false : _b;
11
- return react_1.default.createElement(react_1.default.Fragment, null, isMlMatch ? ui_i18n_1.default.text('Match IQ') : ui_i18n_1.default.text('Match rules'));
12
- };
13
- exports.MatchRulesTitle = MatchRulesTitle;
@@ -1 +0,0 @@
1
- export {};
@@ -1,18 +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 react_2 = require("@testing-library/react");
8
- var MatchRulesTitle_1 = require("./MatchRulesTitle");
9
- describe('MatchRulesTitle test', function () {
10
- it('should return correct title for match rules', function () {
11
- (0, react_2.render)(react_1.default.createElement(MatchRulesTitle_1.MatchRulesTitle, null));
12
- expect(react_2.screen.getByText('Match rules')).toBeInTheDocument();
13
- });
14
- it('should return correct title for match IQ', function () {
15
- (0, react_2.render)(react_1.default.createElement(MatchRulesTitle_1.MatchRulesTitle, { isMlMatch: true }));
16
- expect(react_2.screen.getByText('Match IQ')).toBeInTheDocument();
17
- });
18
- });
@@ -1 +0,0 @@
1
- export { MatchRulesTitle } from './MatchRulesTitle';
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MatchRulesTitle = void 0;
4
- var MatchRulesTitle_1 = require("./MatchRulesTitle");
5
- Object.defineProperty(exports, "MatchRulesTitle", { enumerable: true, get: function () { return MatchRulesTitle_1.MatchRulesTitle; } });
@@ -1,5 +0,0 @@
1
- type Props = {
2
- isMlMatch?: boolean;
3
- };
4
- export declare const MatchRulesTitle: ({ isMlMatch }: Props) => JSX.Element;
5
- export {};
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import i18n from 'ui-i18n';
3
- export var MatchRulesTitle = function (_a) {
4
- var _b = _a.isMlMatch, isMlMatch = _b === void 0 ? false : _b;
5
- return React.createElement(React.Fragment, null, isMlMatch ? i18n.text('Match IQ') : i18n.text('Match rules'));
6
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { render, screen } from '@testing-library/react';
3
- import { MatchRulesTitle } from './MatchRulesTitle';
4
- describe('MatchRulesTitle test', function () {
5
- it('should return correct title for match rules', function () {
6
- render(React.createElement(MatchRulesTitle, null));
7
- expect(screen.getByText('Match rules')).toBeInTheDocument();
8
- });
9
- it('should return correct title for match IQ', function () {
10
- render(React.createElement(MatchRulesTitle, { isMlMatch: true }));
11
- expect(screen.getByText('Match IQ')).toBeInTheDocument();
12
- });
13
- });
@@ -1 +0,0 @@
1
- export { MatchRulesTitle } from './MatchRulesTitle';
@@ -1 +0,0 @@
1
- export { MatchRulesTitle } from './MatchRulesTitle';