@reltio/components 1.4.1316 → 1.4.1318

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.
@@ -2,6 +2,6 @@ import React from 'react';
2
2
  declare const ColoredBlock: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
3
3
  color: string;
4
4
  opacity?: number;
5
- variant?: 'filled' | 'outlined';
5
+ variant?: 'standart' | 'disabled';
6
6
  } & React.RefAttributes<HTMLDivElement>>;
7
7
  export default ColoredBlock;
@@ -49,11 +49,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
49
49
  };
50
50
  Object.defineProperty(exports, "__esModule", { value: true });
51
51
  var react_1 = __importStar(require("react"));
52
+ var ui_i18n_1 = __importDefault(require("ui-i18n"));
52
53
  var classnames_1 = __importDefault(require("classnames"));
54
+ var EventBusy_1 = __importDefault(require("@material-ui/icons/EventBusy"));
55
+ var Tooltip_1 = __importDefault(require("@material-ui/core/Tooltip"));
53
56
  var styles_1 = require("./styles");
54
57
  var ColoredBlock = (0, react_1.forwardRef)(function (_a, ref) {
55
- var color = _a.color, opacity = _a.opacity, _b = _a.variant, variant = _b === void 0 ? 'filled' : _b, children = _a.children, className = _a.className, props = __rest(_a, ["color", "opacity", "variant", "children", "className"]);
58
+ var color = _a.color, opacity = _a.opacity, _b = _a.variant, variant = _b === void 0 ? 'standart' : _b, children = _a.children, className = _a.className, props = __rest(_a, ["color", "opacity", "variant", "children", "className"]);
56
59
  var styles = (0, styles_1.useColoredItemStyles)({ color: color, opacity: opacity, variant: variant });
57
- return (react_1.default.createElement("div", __assign({ ref: ref, className: (0, classnames_1.default)(styles.item, className) }, props), children));
60
+ return (react_1.default.createElement("div", __assign({ ref: ref, className: (0, classnames_1.default)(styles.item, className) }, props),
61
+ children,
62
+ variant === 'disabled' && (react_1.default.createElement(Tooltip_1.default, { title: ui_i18n_1.default.text('End-dated crosswalk') },
63
+ react_1.default.createElement(EventBusy_1.default, { className: styles.endDatedCrosswalkIcon })))));
58
64
  });
59
65
  exports.default = ColoredBlock;
@@ -1,7 +1,7 @@
1
1
  declare type StylesProps = {
2
2
  color?: string;
3
3
  opacity?: number;
4
- variant: 'filled' | 'outlined';
4
+ variant: 'standart' | 'disabled';
5
5
  };
6
- export declare const useColoredItemStyles: (props: StylesProps) => import("@material-ui/core/styles/withStyles").ClassNameMap<"item">;
6
+ export declare const useColoredItemStyles: (props: StylesProps) => import("@material-ui/core/styles/withStyles").ClassNameMap<"item" | "endDatedCrosswalkIcon">;
7
7
  export {};
@@ -16,6 +16,12 @@ var styles_1 = require("@material-ui/core/styles");
16
16
  exports.useColoredItemStyles = (0, styles_1.makeStyles)({
17
17
  item: function (_a) {
18
18
  var color = _a.color, opacity = _a.opacity, variant = _a.variant;
19
- return (__assign(__assign(__assign({}, (variant === 'filled' && { backgroundColor: color })), (variant === 'outlined' && { border: "".concat(color, " solid 2px") })), { opacity: opacity, transition: 'opacity 0.3s', boxSizing: 'border-box' }));
19
+ return (__assign(__assign(__assign({}, (variant === 'standart' && { backgroundColor: color, paddingRight: '29px' })), (variant === 'disabled' && { border: "".concat(color, " solid 2px") })), { opacity: opacity, transition: 'opacity 0.3s', boxSizing: 'border-box' }));
20
+ },
21
+ endDatedCrosswalkIcon: {
22
+ margin: '0 4px',
23
+ width: '20px',
24
+ height: '20px',
25
+ color: '#ff1744'
20
26
  }
21
27
  });
@@ -90,7 +90,7 @@ var CrosswalkRow = function (_a) {
90
90
  return (react_1.default.createElement("div", { className: styles.root, ref: ref },
91
91
  react_1.default.createElement(SmallIconButton_1.SmallIconButtonWithTooltip, { size: "XXS", className: styles.focusedIcon, icon: focusable && Visibility_1.default, onClick: function () { return toggleCrosswalkFocus(); }, disabled: !focusable, tooltipTitle: focusable && ui_i18n_1.default.text('Focus') }),
92
92
  react_1.default.createElement("div", { className: styles.crosswalkWrapper },
93
- react_1.default.createElement(ColoredBlock_1.default, { ref: drag, className: styles.header, color: color, variant: crosswalkDisabled ? 'outlined' : 'filled', onMouseEnter: function () { return highlightCrosswalk(); }, onMouseLeave: function () { return removeHighlight(); } },
93
+ react_1.default.createElement(ColoredBlock_1.default, { ref: drag, className: styles.header, color: color, variant: crosswalkDisabled ? 'disabled' : 'standart', onMouseEnter: function () { return highlightCrosswalk(); }, onMouseLeave: function () { return removeHighlight(); } },
94
94
  isDependent && react_1.default.createElement(NestedAttribute_1.default, { className: styles.dependentIcon }),
95
95
  react_1.default.createElement(ArrowExpandButton_1.default, { onClick: function () { return setExpanded(function (value) { return !value; }); }, expanded: expanded }),
96
96
  react_1.default.createElement(SourceIcon_1.default, { className: styles.sourceIcon, sourceType: crosswalk.type }),
@@ -54,8 +54,7 @@ exports.useStyles = (0, styles_1.makeStyles)({
54
54
  right: 5
55
55
  },
56
56
  labelValue: {
57
- marginLeft: 5,
58
- marginRight: 8
57
+ marginLeft: 5
59
58
  },
60
59
  dependentIcon: {
61
60
  width: '16px',
@@ -2,6 +2,6 @@ import React from 'react';
2
2
  declare const ColoredBlock: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
3
3
  color: string;
4
4
  opacity?: number;
5
- variant?: 'filled' | 'outlined';
5
+ variant?: 'standart' | 'disabled';
6
6
  } & React.RefAttributes<HTMLDivElement>>;
7
7
  export default ColoredBlock;
@@ -21,11 +21,17 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import React, { forwardRef } from 'react';
24
+ import i18n from 'ui-i18n';
24
25
  import classnames from 'classnames';
26
+ import EventBusyIcon from '@material-ui/icons/EventBusy';
27
+ import Tooltip from '@material-ui/core/Tooltip';
25
28
  import { useColoredItemStyles } from './styles';
26
29
  var ColoredBlock = forwardRef(function (_a, ref) {
27
- var color = _a.color, opacity = _a.opacity, _b = _a.variant, variant = _b === void 0 ? 'filled' : _b, children = _a.children, className = _a.className, props = __rest(_a, ["color", "opacity", "variant", "children", "className"]);
30
+ var color = _a.color, opacity = _a.opacity, _b = _a.variant, variant = _b === void 0 ? 'standart' : _b, children = _a.children, className = _a.className, props = __rest(_a, ["color", "opacity", "variant", "children", "className"]);
28
31
  var styles = useColoredItemStyles({ color: color, opacity: opacity, variant: variant });
29
- return (React.createElement("div", __assign({ ref: ref, className: classnames(styles.item, className) }, props), children));
32
+ return (React.createElement("div", __assign({ ref: ref, className: classnames(styles.item, className) }, props),
33
+ children,
34
+ variant === 'disabled' && (React.createElement(Tooltip, { title: i18n.text('End-dated crosswalk') },
35
+ React.createElement(EventBusyIcon, { className: styles.endDatedCrosswalkIcon })))));
30
36
  });
31
37
  export default ColoredBlock;
@@ -1,7 +1,7 @@
1
1
  declare type StylesProps = {
2
2
  color?: string;
3
3
  opacity?: number;
4
- variant: 'filled' | 'outlined';
4
+ variant: 'standart' | 'disabled';
5
5
  };
6
- export declare const useColoredItemStyles: (props: StylesProps) => import("@material-ui/core/styles/withStyles").ClassNameMap<"item">;
6
+ export declare const useColoredItemStyles: (props: StylesProps) => import("@material-ui/core/styles/withStyles").ClassNameMap<"item" | "endDatedCrosswalkIcon">;
7
7
  export {};
@@ -13,6 +13,12 @@ import { makeStyles } from '@material-ui/core/styles';
13
13
  export var useColoredItemStyles = makeStyles({
14
14
  item: function (_a) {
15
15
  var color = _a.color, opacity = _a.opacity, variant = _a.variant;
16
- return (__assign(__assign(__assign({}, (variant === 'filled' && { backgroundColor: color })), (variant === 'outlined' && { border: "".concat(color, " solid 2px") })), { opacity: opacity, transition: 'opacity 0.3s', boxSizing: 'border-box' }));
16
+ return (__assign(__assign(__assign({}, (variant === 'standart' && { backgroundColor: color, paddingRight: '29px' })), (variant === 'disabled' && { border: "".concat(color, " solid 2px") })), { opacity: opacity, transition: 'opacity 0.3s', boxSizing: 'border-box' }));
17
+ },
18
+ endDatedCrosswalkIcon: {
19
+ margin: '0 4px',
20
+ width: '20px',
21
+ height: '20px',
22
+ color: '#ff1744'
17
23
  }
18
24
  });
@@ -62,7 +62,7 @@ var CrosswalkRow = function (_a) {
62
62
  return (React.createElement("div", { className: styles.root, ref: ref },
63
63
  React.createElement(SmallIconButtonWithTooltip, { size: "XXS", className: styles.focusedIcon, icon: focusable && VisibilityIcon, onClick: function () { return toggleCrosswalkFocus(); }, disabled: !focusable, tooltipTitle: focusable && i18n.text('Focus') }),
64
64
  React.createElement("div", { className: styles.crosswalkWrapper },
65
- React.createElement(ColoredBlock, { ref: drag, className: styles.header, color: color, variant: crosswalkDisabled ? 'outlined' : 'filled', onMouseEnter: function () { return highlightCrosswalk(); }, onMouseLeave: function () { return removeHighlight(); } },
65
+ React.createElement(ColoredBlock, { ref: drag, className: styles.header, color: color, variant: crosswalkDisabled ? 'disabled' : 'standart', onMouseEnter: function () { return highlightCrosswalk(); }, onMouseLeave: function () { return removeHighlight(); } },
66
66
  isDependent && React.createElement(DependentIcon, { className: styles.dependentIcon }),
67
67
  React.createElement(ArrowExpandButton, { onClick: function () { return setExpanded(function (value) { return !value; }); }, expanded: expanded }),
68
68
  React.createElement(SourceIcon, { className: styles.sourceIcon, sourceType: crosswalk.type }),
@@ -51,8 +51,7 @@ export var useStyles = makeStyles({
51
51
  right: 5
52
52
  },
53
53
  labelValue: {
54
- marginLeft: 5,
55
- marginRight: 8
54
+ marginLeft: 5
56
55
  },
57
56
  dependentIcon: {
58
57
  width: '16px',
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.1316",
3
+ "version": "1.4.1318",
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.1316",
11
- "@reltio/mdm-sdk": "^1.4.1316",
10
+ "@reltio/mdm-module": "^1.4.1318",
11
+ "@reltio/mdm-sdk": "^1.4.1318",
12
12
  "classnames": "^2.2.5",
13
13
  "d3-cloud": "^1.2.5",
14
14
  "d3-geo": "^2.0.1",