@reltio/components 1.4.1208 → 1.4.1209
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.
- package/cjs/components/MatchRulesBlock/MatchRulesBlock.js +2 -3
- package/cjs/components/MatchRulesBlock/SimpleMatchRulesBuilder/SimpleMatchRulesBuilder.js +3 -3
- package/cjs/components/MatchRulesBlock/types/index.d.ts +0 -2
- package/cjs/components/MatchRulesBlock/types/index.js +0 -2
- package/esm/components/MatchRulesBlock/MatchRulesBlock.js +2 -3
- package/esm/components/MatchRulesBlock/SimpleMatchRulesBuilder/SimpleMatchRulesBuilder.js +3 -3
- package/esm/components/MatchRulesBlock/types/index.d.ts +0 -2
- package/esm/components/MatchRulesBlock/types/index.js +0 -2
- package/package.json +3 -3
|
@@ -22,11 +22,10 @@ var MatchRulesBlock = function (_a) {
|
|
|
22
22
|
return uri !== mdm_sdk_1.NOT_MATCH;
|
|
23
23
|
});
|
|
24
24
|
var hasNotMatch = rules.length !== matchRules.length;
|
|
25
|
-
var showTransitive = isTransitive && variant !== types_1.MatchRuleVariant.ml;
|
|
26
25
|
var showSimple = !isTransitive && !hasNotMatch;
|
|
27
|
-
var showNotMatch = hasNotMatch &&
|
|
26
|
+
var showNotMatch = hasNotMatch && variant !== types_1.MatchRuleVariant.excludeNotMatch;
|
|
28
27
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
29
|
-
|
|
28
|
+
isTransitive ? (react_1.default.createElement(TransitiveMatchBlock_1.default, { transitiveMatchRules: mdm_sdk_1.getTransitiveMatchRules(metadata, match, entitiesMap) })) : null,
|
|
30
29
|
showSimple ? (react_1.default.createElement(SimpleMatchRulesBuilder_1.default, { variant: variant, matchRules: matchRules, Component: SimpleMatchRulesBlock_1.default })) : null,
|
|
31
30
|
showNotMatch ? react_1.default.createElement(NotMatchRule_1.default, null) : null));
|
|
32
31
|
};
|
|
@@ -33,9 +33,9 @@ var types_1 = require("../types");
|
|
|
33
33
|
var SimpleMatchRulesBuilder = function (_a) {
|
|
34
34
|
var matchRules = _a.matchRules, Component = _a.Component, _b = _a.variant, variant = _b === void 0 ? types_1.MatchRuleVariant.all : _b, otherProps = __rest(_a, ["matchRules", "Component", "variant"]);
|
|
35
35
|
var _c = mdm_sdk_1.partitionByMlMatch(matchRules), MlMatchRules = _c[0], otherMatchRules = _c[1];
|
|
36
|
-
var all = types_1.MatchRuleVariant.all, simple = types_1.MatchRuleVariant.simple,
|
|
37
|
-
var showSimple = [all, simple,
|
|
38
|
-
var showML = [all,
|
|
36
|
+
var all = types_1.MatchRuleVariant.all, simple = types_1.MatchRuleVariant.simple, excludeNotMatch = types_1.MatchRuleVariant.excludeNotMatch;
|
|
37
|
+
var showSimple = [all, simple, excludeNotMatch].includes(variant) && !ramda_1.isEmpty(otherMatchRules);
|
|
38
|
+
var showML = [all, excludeNotMatch].includes(variant) && !ramda_1.isEmpty(MlMatchRules);
|
|
39
39
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
40
40
|
showSimple ? react_1.default.createElement(Component, __assign({ matchRules: otherMatchRules }, otherProps)) : null,
|
|
41
41
|
showML ? react_1.default.createElement(Component, __assign({ isMlMatch: true, matchRules: MlMatchRules }, otherProps)) : null));
|
|
@@ -5,9 +5,7 @@ declare type MatchRule = {
|
|
|
5
5
|
export declare type MatchRules = MatchRule[];
|
|
6
6
|
export declare enum MatchRuleVariant {
|
|
7
7
|
all = "all",
|
|
8
|
-
ml = "ml",
|
|
9
8
|
simple = "simple",
|
|
10
|
-
excludeML = "excludeML",
|
|
11
9
|
excludeNotMatch = "excludeNotMatch"
|
|
12
10
|
}
|
|
13
11
|
export declare type TransitiveMatchRules = Array<{
|
|
@@ -4,8 +4,6 @@ exports.MatchRuleVariant = void 0;
|
|
|
4
4
|
var MatchRuleVariant;
|
|
5
5
|
(function (MatchRuleVariant) {
|
|
6
6
|
MatchRuleVariant["all"] = "all";
|
|
7
|
-
MatchRuleVariant["ml"] = "ml";
|
|
8
7
|
MatchRuleVariant["simple"] = "simple";
|
|
9
|
-
MatchRuleVariant["excludeML"] = "excludeML";
|
|
10
8
|
MatchRuleVariant["excludeNotMatch"] = "excludeNotMatch";
|
|
11
9
|
})(MatchRuleVariant = exports.MatchRuleVariant || (exports.MatchRuleVariant = {}));
|
|
@@ -17,11 +17,10 @@ var MatchRulesBlock = function (_a) {
|
|
|
17
17
|
return uri !== NOT_MATCH;
|
|
18
18
|
});
|
|
19
19
|
var hasNotMatch = rules.length !== matchRules.length;
|
|
20
|
-
var showTransitive = isTransitive && variant !== MatchRuleVariant.ml;
|
|
21
20
|
var showSimple = !isTransitive && !hasNotMatch;
|
|
22
|
-
var showNotMatch = hasNotMatch &&
|
|
21
|
+
var showNotMatch = hasNotMatch && variant !== MatchRuleVariant.excludeNotMatch;
|
|
23
22
|
return (React.createElement(React.Fragment, null,
|
|
24
|
-
|
|
23
|
+
isTransitive ? (React.createElement(TransitiveMatchBlock, { transitiveMatchRules: getTransitiveMatchRules(metadata, match, entitiesMap) })) : null,
|
|
25
24
|
showSimple ? (React.createElement(SimpleMatchRulesBuilder, { variant: variant, matchRules: matchRules, Component: SimpleMatchRulesBlock })) : null,
|
|
26
25
|
showNotMatch ? React.createElement(NotMatchRule, null) : null));
|
|
27
26
|
};
|
|
@@ -28,9 +28,9 @@ import { MatchRuleVariant } from '../types';
|
|
|
28
28
|
var SimpleMatchRulesBuilder = function (_a) {
|
|
29
29
|
var matchRules = _a.matchRules, Component = _a.Component, _b = _a.variant, variant = _b === void 0 ? MatchRuleVariant.all : _b, otherProps = __rest(_a, ["matchRules", "Component", "variant"]);
|
|
30
30
|
var _c = partitionByMlMatch(matchRules), MlMatchRules = _c[0], otherMatchRules = _c[1];
|
|
31
|
-
var all = MatchRuleVariant.all, simple = MatchRuleVariant.simple,
|
|
32
|
-
var showSimple = [all, simple,
|
|
33
|
-
var showML = [all,
|
|
31
|
+
var all = MatchRuleVariant.all, simple = MatchRuleVariant.simple, excludeNotMatch = MatchRuleVariant.excludeNotMatch;
|
|
32
|
+
var showSimple = [all, simple, excludeNotMatch].includes(variant) && !isEmpty(otherMatchRules);
|
|
33
|
+
var showML = [all, excludeNotMatch].includes(variant) && !isEmpty(MlMatchRules);
|
|
34
34
|
return (React.createElement(React.Fragment, null,
|
|
35
35
|
showSimple ? React.createElement(Component, __assign({ matchRules: otherMatchRules }, otherProps)) : null,
|
|
36
36
|
showML ? React.createElement(Component, __assign({ isMlMatch: true, matchRules: MlMatchRules }, otherProps)) : null));
|
|
@@ -5,9 +5,7 @@ declare type MatchRule = {
|
|
|
5
5
|
export declare type MatchRules = MatchRule[];
|
|
6
6
|
export declare enum MatchRuleVariant {
|
|
7
7
|
all = "all",
|
|
8
|
-
ml = "ml",
|
|
9
8
|
simple = "simple",
|
|
10
|
-
excludeML = "excludeML",
|
|
11
9
|
excludeNotMatch = "excludeNotMatch"
|
|
12
10
|
}
|
|
13
11
|
export declare type TransitiveMatchRules = Array<{
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export var MatchRuleVariant;
|
|
2
2
|
(function (MatchRuleVariant) {
|
|
3
3
|
MatchRuleVariant["all"] = "all";
|
|
4
|
-
MatchRuleVariant["ml"] = "ml";
|
|
5
4
|
MatchRuleVariant["simple"] = "simple";
|
|
6
|
-
MatchRuleVariant["excludeML"] = "excludeML";
|
|
7
5
|
MatchRuleVariant["excludeNotMatch"] = "excludeNotMatch";
|
|
8
6
|
})(MatchRuleVariant || (MatchRuleVariant = {}));
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1209",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@date-io/moment": "^1.3.5",
|
|
9
9
|
"@react-google-maps/api": "2.7.0",
|
|
10
|
-
"@reltio/mdm-module": "^1.4.
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
10
|
+
"@reltio/mdm-module": "^1.4.1209",
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1209",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|