@reltio/components 1.4.1216 → 1.4.1217

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.
@@ -30,13 +30,15 @@ var prop_types_1 = __importDefault(require("prop-types"));
30
30
  var ramda_1 = require("ramda");
31
31
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
32
32
  var types_1 = require("../types");
33
+ var styles_1 = __importDefault(require("./styles"));
33
34
  var SimpleMatchRulesBuilder = function (_a) {
34
35
  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"]);
36
+ var styles = styles_1.default();
35
37
  var _c = mdm_sdk_1.partitionByMlMatch(matchRules), MlMatchRules = _c[0], otherMatchRules = _c[1];
36
38
  var all = types_1.MatchRuleVariant.all, simple = types_1.MatchRuleVariant.simple, excludeNotMatch = types_1.MatchRuleVariant.excludeNotMatch;
37
39
  var showSimple = [all, simple, excludeNotMatch].includes(variant) && !ramda_1.isEmpty(otherMatchRules);
38
40
  var showML = [all, excludeNotMatch].includes(variant) && !ramda_1.isEmpty(MlMatchRules);
39
- return (react_1.default.createElement(react_1.default.Fragment, null,
41
+ return (react_1.default.createElement("div", { className: styles.container },
40
42
  showSimple ? react_1.default.createElement(Component, __assign({ matchRules: otherMatchRules }, otherProps)) : null,
41
43
  showML ? react_1.default.createElement(Component, __assign({ isMlMatch: true, matchRules: MlMatchRules }, otherProps)) : null));
42
44
  };
@@ -0,0 +1,2 @@
1
+ declare const styles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"container">;
2
+ export default styles;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var styles_1 = require("@material-ui/core/styles");
4
+ var styles = styles_1.makeStyles({
5
+ container: {
6
+ display: 'flex',
7
+ flexDirection: 'column',
8
+ '& :not(:last-child)': {
9
+ marginBottom: '2px'
10
+ }
11
+ }
12
+ });
13
+ exports.default = styles;
@@ -1,2 +1,2 @@
1
- declare const styles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"container" | "rulesWrapper">;
1
+ declare const styles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"container">;
2
2
  export default styles;
@@ -4,11 +4,10 @@ var styles_1 = require("@material-ui/core/styles");
4
4
  var styles = styles_1.makeStyles({
5
5
  container: {
6
6
  display: 'flex',
7
- flexDirection: 'column'
8
- },
9
- rulesWrapper: {
10
- display: 'flex',
11
- flexDirection: 'column'
7
+ flexDirection: 'column',
8
+ '& :not(:last-child)': {
9
+ marginBottom: '2px'
10
+ }
12
11
  }
13
12
  });
14
13
  exports.default = styles;
@@ -25,13 +25,15 @@ import PropTypes from 'prop-types';
25
25
  import { isEmpty } from 'ramda';
26
26
  import { MatchRulesType, partitionByMlMatch } from '@reltio/mdm-sdk';
27
27
  import { MatchRuleVariant } from '../types';
28
+ import useStyles from './styles';
28
29
  var SimpleMatchRulesBuilder = function (_a) {
29
30
  var matchRules = _a.matchRules, Component = _a.Component, _b = _a.variant, variant = _b === void 0 ? MatchRuleVariant.all : _b, otherProps = __rest(_a, ["matchRules", "Component", "variant"]);
31
+ var styles = useStyles();
30
32
  var _c = partitionByMlMatch(matchRules), MlMatchRules = _c[0], otherMatchRules = _c[1];
31
33
  var all = MatchRuleVariant.all, simple = MatchRuleVariant.simple, excludeNotMatch = MatchRuleVariant.excludeNotMatch;
32
34
  var showSimple = [all, simple, excludeNotMatch].includes(variant) && !isEmpty(otherMatchRules);
33
35
  var showML = [all, excludeNotMatch].includes(variant) && !isEmpty(MlMatchRules);
34
- return (React.createElement(React.Fragment, null,
36
+ return (React.createElement("div", { className: styles.container },
35
37
  showSimple ? React.createElement(Component, __assign({ matchRules: otherMatchRules }, otherProps)) : null,
36
38
  showML ? React.createElement(Component, __assign({ isMlMatch: true, matchRules: MlMatchRules }, otherProps)) : null));
37
39
  };
@@ -0,0 +1,2 @@
1
+ declare const styles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"container">;
2
+ export default styles;
@@ -0,0 +1,11 @@
1
+ import { makeStyles } from '@material-ui/core/styles';
2
+ var styles = makeStyles({
3
+ container: {
4
+ display: 'flex',
5
+ flexDirection: 'column',
6
+ '& :not(:last-child)': {
7
+ marginBottom: '2px'
8
+ }
9
+ }
10
+ });
11
+ export default styles;
@@ -1,2 +1,2 @@
1
- declare const styles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"container" | "rulesWrapper">;
1
+ declare const styles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"container">;
2
2
  export default styles;
@@ -2,11 +2,10 @@ import { makeStyles } from '@material-ui/core/styles';
2
2
  var styles = makeStyles({
3
3
  container: {
4
4
  display: 'flex',
5
- flexDirection: 'column'
6
- },
7
- rulesWrapper: {
8
- display: 'flex',
9
- flexDirection: 'column'
5
+ flexDirection: 'column',
6
+ '& :not(:last-child)': {
7
+ marginBottom: '2px'
8
+ }
10
9
  }
11
10
  });
12
11
  export default styles;
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.1216",
3
+ "version": "1.4.1217",
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.1216",
11
- "@reltio/mdm-sdk": "^1.4.1216",
10
+ "@reltio/mdm-module": "^1.4.1217",
11
+ "@reltio/mdm-sdk": "^1.4.1217",
12
12
  "classnames": "^2.2.5",
13
13
  "d3-cloud": "^1.2.5",
14
14
  "d3-geo": "^2.0.1",