versacall-dashboards-library-react 2.0.39 → 2.0.41
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/dist/components/DashboardsCell/DashboardsCell.js +54 -104
- package/dist/components/DashboardsCell/index.js +2 -4
- package/dist/components/DashboardsCellContent/DashboardsCellContent.js +29 -62
- package/dist/components/DashboardsCellContent/index.js +2 -4
- package/dist/components/DashboardsCellFindAndReplace/DashboardsCellFindAndReplace.js +27 -57
- package/dist/components/DashboardsCellFindAndReplace/index.js +2 -4
- package/dist/components/DashboardsCellGlobalActions/DashboardsCellGlobalActions.js +151 -155
- package/dist/components/DashboardsCellGlobalActions/index.js +2 -4
- package/dist/components/DashboardsCellGlobalConditions/DashboardsCellGlobalConditions.js +463 -563
- package/dist/components/DashboardsCellGlobalConditions/DashboardsCellGlobalConditionsNestable.js +109 -199
- package/dist/components/DashboardsCellGlobalConditions/DashboardsCellGlobalConditionsOld.js +87 -173
- package/dist/components/DashboardsCellGlobalConditions/index.js +2 -4
- package/dist/components/DashboardsCellGlobalStyles/DashboardsCellGlobalStyles.js +28 -78
- package/dist/components/DashboardsCellGlobalStyles/index.js +2 -4
- package/dist/components/DashboardsCellMergeUnmerge/DashboardsCellMergeUnmerge.js +33 -65
- package/dist/components/DashboardsCellMergeUnmerge/index.js +2 -4
- package/dist/components/DashboardsCellPosition/DashboardsCellPosition.js +5 -11
- package/dist/components/DashboardsCellPosition/index.js +2 -4
- package/dist/components/DashboardsCellSize/DashboardsCellSize.js +7 -16
- package/dist/components/DashboardsCellSize/index.js +2 -4
- package/dist/components/DashboardsCellStyle/DashboardsCellStyle.js +5 -21
- package/dist/components/DashboardsCellStyle/index.js +2 -4
- package/dist/components/DashboardsCellStyleAlignItems/DashboardsCellStyleAlignItems.js +12 -28
- package/dist/components/DashboardsCellStyleAlignItems/index.js +2 -4
- package/dist/components/DashboardsCellStyleBackgroundColor/DashboardsCellStyleBackgroundColor.js +15 -52
- package/dist/components/DashboardsCellStyleBackgroundColor/index.js +2 -4
- package/dist/components/DashboardsCellStyleClear/DashboardsCellStyleClear.js +4 -12
- package/dist/components/DashboardsCellStyleClear/index.js +2 -4
- package/dist/components/DashboardsCellStyleColor/DashboardsCellStyleColor.js +15 -52
- package/dist/components/DashboardsCellStyleColor/index.js +2 -4
- package/dist/components/DashboardsCellStyleDisplay/DashboardsCellStyleDisplay.js +6 -15
- package/dist/components/DashboardsCellStyleDisplay/index.js +2 -4
- package/dist/components/DashboardsCellStyleFontFamily/DashboardsCellStyleFontFamily.js +6 -15
- package/dist/components/DashboardsCellStyleFontFamily/index.js +2 -4
- package/dist/components/DashboardsCellStyleFontSize/DashboardsCellStyleFontSize.js +8 -19
- package/dist/components/DashboardsCellStyleFontSize/index.js +2 -4
- package/dist/components/DashboardsCellStyleJustifyContent/DashboardsCellStyleJustifyContent.js +12 -28
- package/dist/components/DashboardsCellStyleJustifyContent/index.js +2 -4
- package/dist/components/DashboardsCellStyleObjectFit/DashboardsCellStyleObjectFit.js +6 -15
- package/dist/components/DashboardsCellStyleObjectFit/index.js +2 -4
- package/dist/components/DashboardsCellStylePadding/DashboardsCellStylePadding.js +7 -16
- package/dist/components/DashboardsCellStylePadding/index.js +2 -4
- package/dist/components/DashboardsCellStyleWeightStyleDecoration/DashboardsCellStyleWeightStyleDecoration.js +12 -28
- package/dist/components/DashboardsCellStyleWeightStyleDecoration/index.js +2 -4
- package/dist/components/DashboardsCopyAndPaste/DashboardsCopyAndPaste.js +19 -40
- package/dist/components/DashboardsCopyAndPaste/index.js +2 -4
- package/dist/components/DashboardsEditor/DashboardsEditor.js +34 -68
- package/dist/components/DashboardsEditor/index.js +2 -4
- package/dist/components/DashboardsGlobalStylesPicker/DashboardsGlobalStylesPicker.js +13 -25
- package/dist/components/DashboardsGlobalStylesPicker/index.js +2 -4
- package/dist/components/DashboardsGrid/DashboardsGrid.js +21 -33
- package/dist/components/DashboardsGrid/index.js +2 -4
- package/dist/components/DashboardsMainFreehand/DashboardsMainFreehand.js +65 -130
- package/dist/components/DashboardsMainFreehand/index.js +2 -4
- package/dist/components/DashboardsMainMessaging/DashboardsMainMessaging.js +86 -203
- package/dist/components/DashboardsMainMessaging/index.js +2 -4
- package/dist/components/DashboardsMainTable/DashboardsMainTable.js +94 -208
- package/dist/components/DashboardsMainTable/index.js +2 -4
- package/dist/components/DashboardsPreview/DashboardsPreview.js +18 -32
- package/dist/components/DashboardsPreview/index.js +2 -4
- package/dist/components/DashboardsRatio/DashboardsRatio.js +18 -64
- package/dist/components/DashboardsRatio/DashboardsRatioOld.js +12 -27
- package/dist/components/DashboardsRatio/index.js +2 -4
- package/dist/components/DashboardsStatusBar/DashboardsStatusBar.js +16 -30
- package/dist/components/DashboardsStatusBar/index.js +2 -4
- package/dist/components/DashboardsUndoRedo/DashboardsUndoRedo.js +13 -42
- package/dist/components/DashboardsUndoRedo/index.js +2 -4
- package/dist/components/DashboardsViewer/DashboardsViewer.js +12 -19
- package/dist/components/DashboardsViewer/index.js +2 -4
- package/dist/components/DashboardsWidthHeight/DashboardsWidthHeight.js +8 -18
- package/dist/components/DashboardsWidthHeight/index.js +2 -4
- package/dist/components/WidgetParameters/WidgetParameters.js +32 -74
- package/dist/components/WidgetParameters/index.js +2 -4
- package/dist/components/index.js +41 -77
- package/dist/constants/defaultFreehandCell.js +2 -3
- package/dist/constants/defaultFreehandDashboard.js +2 -3
- package/dist/constants/defaultMessagingDashboard.js +2 -3
- package/dist/constants/defaultStyle.js +2 -3
- package/dist/constants/defaultTableCell.js +2 -3
- package/dist/constants/defaultTableDashboard.js +2 -3
- package/dist/constants/index.js +7 -14
- package/dist/functions/addTranslations.js +7 -14
- package/dist/functions/calculateDashboardVariables.js +24 -48
- package/dist/functions/convertColorObject.js +0 -1
- package/dist/functions/convertColorString.js +2 -4
- package/dist/functions/convertPercentToInt.js +0 -1
- package/dist/functions/convertSecondsToElapsedTime.js +8 -13
- package/dist/functions/generateFreehandCell.js +3 -6
- package/dist/functions/generateFreehandDashboard.js +2 -6
- package/dist/functions/generateMessagingDashboard.js +1 -3
- package/dist/functions/generateSelected.js +1 -4
- package/dist/functions/generateTableCell.js +1 -3
- package/dist/functions/generateTableDashboard.js +7 -15
- package/dist/functions/index.js +15 -30
- package/dist/functions/mergeSelected.js +3 -5
- package/dist/functions/sortCells.js +0 -5
- package/dist/index.js +3 -9
- package/dist/translations/en.json +2 -1
- package/package.json +2 -2
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _DashboardsUndoRedo.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _DashboardsUndoRedo = _interopRequireDefault(require("./DashboardsUndoRedo"));
|
|
14
|
-
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -4,24 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _BackgroundTransparency = _interopRequireDefault(require("../../images/BackgroundTransparency.png"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
11
|
function DashboardsViewer(props) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
const {
|
|
13
|
+
viewColor,
|
|
14
|
+
alignItems,
|
|
15
|
+
previewColor,
|
|
16
|
+
justifyContent,
|
|
17
|
+
viewWidth,
|
|
18
|
+
viewHeight,
|
|
19
|
+
showEditor
|
|
20
|
+
} = props;
|
|
21
|
+
const style = {
|
|
25
22
|
flex: {
|
|
26
23
|
display: 'flex',
|
|
27
24
|
overflow: 'hidden',
|
|
@@ -40,19 +37,16 @@ function DashboardsViewer(props) {
|
|
|
40
37
|
fontSize: viewHeight
|
|
41
38
|
}
|
|
42
39
|
};
|
|
43
|
-
|
|
44
40
|
if (showEditor && previewColor === 'transparent') {
|
|
45
41
|
delete style.flex.backgrounColor;
|
|
46
42
|
style.flex.backgroundImage = "url(".concat(_BackgroundTransparency.default, ")");
|
|
47
43
|
}
|
|
48
|
-
|
|
49
44
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
50
45
|
style: style.flex
|
|
51
46
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
52
47
|
style: style.viewer
|
|
53
48
|
}, props.children));
|
|
54
49
|
}
|
|
55
|
-
|
|
56
50
|
DashboardsViewer.propTypes = {
|
|
57
51
|
viewColor: _propTypes.default.string,
|
|
58
52
|
alignItems: _propTypes.default.string,
|
|
@@ -70,5 +64,4 @@ DashboardsViewer.defaultProps = {
|
|
|
70
64
|
justifyContent: 'center',
|
|
71
65
|
showEditor: false
|
|
72
66
|
};
|
|
73
|
-
var _default = DashboardsViewer;
|
|
74
|
-
exports.default = _default;
|
|
67
|
+
var _default = exports.default = DashboardsViewer;
|
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _DashboardsViewer.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _DashboardsViewer = _interopRequireDefault(require("./DashboardsViewer"));
|
|
14
|
-
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -4,29 +4,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _TextField = _interopRequireDefault(require("@material-ui/core/TextField"));
|
|
11
|
-
|
|
12
9
|
var _Grid = _interopRequireDefault(require("@material-ui/core/Grid"));
|
|
13
|
-
|
|
14
10
|
var _reactIntl = require("react-intl");
|
|
15
|
-
|
|
16
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
13
|
function createValue(type, index, properties, value) {
|
|
21
|
-
|
|
14
|
+
const newProperties = JSON.parse(JSON.stringify(properties));
|
|
22
15
|
newProperties[index][type] = String(value);
|
|
23
16
|
return newProperties;
|
|
24
17
|
}
|
|
25
|
-
|
|
26
18
|
function DashboardsWidthHeight(props) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
const {
|
|
20
|
+
intl,
|
|
21
|
+
selected,
|
|
22
|
+
tableDashboard
|
|
23
|
+
} = props;
|
|
30
24
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, selected.column > 0 && /*#__PURE__*/_react.default.createElement(_Grid.default, {
|
|
31
25
|
spacing: 16,
|
|
32
26
|
style: {
|
|
@@ -85,14 +79,10 @@ function DashboardsWidthHeight(props) {
|
|
|
85
79
|
fullWidth: true
|
|
86
80
|
}))));
|
|
87
81
|
}
|
|
88
|
-
|
|
89
82
|
DashboardsWidthHeight.propTypes = {
|
|
90
83
|
intl: _propTypes.default.shape().isRequired,
|
|
91
84
|
selected: _propTypes.default.shape().isRequired,
|
|
92
85
|
tableDashboard: _propTypes.default.shape().isRequired,
|
|
93
86
|
updateTableDashboard: _propTypes.default.func.isRequired
|
|
94
87
|
};
|
|
95
|
-
|
|
96
|
-
var _default = (0, _reactIntl.injectIntl)(DashboardsWidthHeight);
|
|
97
|
-
|
|
98
|
-
exports.default = _default;
|
|
88
|
+
var _default = exports.default = (0, _reactIntl.injectIntl)(DashboardsWidthHeight);
|
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _DashboardsWidthHeight.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _DashboardsWidthHeight = _interopRequireDefault(require("./DashboardsWidthHeight"));
|
|
14
|
-
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -4,52 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _styles = require("@material-ui/core/styles");
|
|
13
|
-
|
|
14
10
|
var _FormControlLabel = _interopRequireDefault(require("@material-ui/core/FormControlLabel"));
|
|
15
|
-
|
|
16
11
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
17
|
-
|
|
18
12
|
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
19
|
-
|
|
20
13
|
var _TextField = _interopRequireDefault(require("@material-ui/core/TextField"));
|
|
21
|
-
|
|
22
14
|
var _Switch = _interopRequireDefault(require("@material-ui/core/Switch"));
|
|
23
|
-
|
|
24
15
|
var _Paper = _interopRequireDefault(require("@material-ui/core/Paper"));
|
|
25
|
-
|
|
26
16
|
var _Menu = _interopRequireDefault(require("@material-ui/core/Menu"));
|
|
27
|
-
|
|
28
17
|
var _MenuItem = _interopRequireDefault(require("@material-ui/core/MenuItem"));
|
|
29
|
-
|
|
30
18
|
var _Add = _interopRequireDefault(require("@material-ui/icons/Add"));
|
|
31
|
-
|
|
32
19
|
var _MoreVert = _interopRequireDefault(require("@material-ui/icons/MoreVert"));
|
|
33
|
-
|
|
34
20
|
var _Delete = _interopRequireDefault(require("@material-ui/icons/Delete"));
|
|
35
|
-
|
|
36
21
|
var _reactIntl = require("react-intl");
|
|
37
|
-
|
|
38
22
|
var _versacallCoreLibraryReact = require("versacall-core-library-react");
|
|
39
|
-
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
function
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
49
|
-
|
|
50
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
51
|
-
|
|
52
|
-
var styles = () => ({
|
|
23
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
24
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
25
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
28
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
29
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
30
|
+
const styles = () => ({
|
|
53
31
|
menuPaper: {
|
|
54
32
|
backgroundColor: '#496b78',
|
|
55
33
|
color: '#ffffff'
|
|
@@ -64,12 +42,10 @@ var styles = () => ({
|
|
|
64
42
|
marginRight: 10
|
|
65
43
|
}
|
|
66
44
|
});
|
|
67
|
-
|
|
68
45
|
function regexFilter(filter) {
|
|
69
|
-
|
|
46
|
+
const newFilter = filter.toUpperCase();
|
|
70
47
|
return newFilter.replace(/([^A-Z0-9_])/g, '');
|
|
71
48
|
}
|
|
72
|
-
|
|
73
49
|
class WidgetParameters extends _react.Component {
|
|
74
50
|
constructor(props) {
|
|
75
51
|
super(props);
|
|
@@ -78,42 +54,30 @@ class WidgetParameters extends _react.Component {
|
|
|
78
54
|
menuAnchorEl: null
|
|
79
55
|
};
|
|
80
56
|
}
|
|
81
|
-
|
|
82
57
|
addParameter() {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
var newParameter = {
|
|
58
|
+
const newParameter = {
|
|
86
59
|
name: 'PARAMETER_',
|
|
87
60
|
description: '',
|
|
88
61
|
type: 'text'
|
|
89
62
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if (_this.props.parameters.some(parameter => parameter.name === newName)) {
|
|
63
|
+
let isSearching = true;
|
|
64
|
+
let searchIndex = 1;
|
|
65
|
+
while (isSearching) {
|
|
66
|
+
const newName = "".concat(newParameter.name).concat(searchIndex);
|
|
67
|
+
if (this.props.parameters.some(parameter => parameter.name === newName)) {
|
|
97
68
|
isSearching = true;
|
|
98
69
|
searchIndex++;
|
|
99
70
|
} else {
|
|
100
71
|
newParameter.name = newName;
|
|
101
72
|
isSearching = false;
|
|
102
73
|
}
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
while (isSearching) {
|
|
106
|
-
_loop();
|
|
107
74
|
}
|
|
108
|
-
|
|
109
|
-
var newParameters = [...this.props.parameters];
|
|
75
|
+
const newParameters = [...this.props.parameters];
|
|
110
76
|
newParameters.push(newParameter);
|
|
111
77
|
this.props.updateParameters(newParameters);
|
|
112
78
|
}
|
|
113
|
-
|
|
114
79
|
changeParameter(value) {
|
|
115
|
-
|
|
116
|
-
|
|
80
|
+
const newValue = JSON.parse(JSON.stringify(value));
|
|
117
81
|
if (newValue.row.type === 'tag') {
|
|
118
82
|
newValue.row.hideAdvanced = false;
|
|
119
83
|
newValue.row.hideModuleTagFilters = false;
|
|
@@ -127,24 +91,22 @@ class WidgetParameters extends _react.Component {
|
|
|
127
91
|
delete newValue.row.hideMonitoringPointTagFilters;
|
|
128
92
|
delete newValue.row.hideMonitoringPointTypeFilters;
|
|
129
93
|
}
|
|
130
|
-
|
|
131
94
|
this.updateParameter(newValue);
|
|
132
95
|
}
|
|
133
|
-
|
|
134
96
|
updateParameter(value) {
|
|
135
|
-
|
|
97
|
+
const newParameters = [...this.props.parameters];
|
|
136
98
|
newParameters[value.index] = value.row;
|
|
137
99
|
this.props.updateParameters(newParameters);
|
|
138
100
|
}
|
|
139
|
-
|
|
140
101
|
deleteParameter(deleteIndex) {
|
|
141
|
-
|
|
102
|
+
const newParameters = [...this.props.parameters];
|
|
142
103
|
newParameters.splice(deleteIndex, 1);
|
|
143
104
|
this.props.updateParameters(newParameters);
|
|
144
105
|
}
|
|
145
|
-
|
|
146
106
|
renderParameterCard(index, parameter) {
|
|
147
|
-
|
|
107
|
+
const {
|
|
108
|
+
intl
|
|
109
|
+
} = this.props;
|
|
148
110
|
return /*#__PURE__*/_react.default.createElement(_Paper.default, {
|
|
149
111
|
key: String(index),
|
|
150
112
|
style: {
|
|
@@ -309,15 +271,16 @@ class WidgetParameters extends _react.Component {
|
|
|
309
271
|
})
|
|
310
272
|
})));
|
|
311
273
|
}
|
|
312
|
-
|
|
313
274
|
render() {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
275
|
+
const {
|
|
276
|
+
classes,
|
|
277
|
+
intl,
|
|
278
|
+
parameters
|
|
279
|
+
} = this.props;
|
|
280
|
+
const {
|
|
281
|
+
menuIndex,
|
|
282
|
+
menuAnchorEl
|
|
283
|
+
} = this.state;
|
|
321
284
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_versacallCoreLibraryReact.CoreToolbar, {
|
|
322
285
|
title: "".concat(intl.formatMessage({
|
|
323
286
|
id: '__parameters'
|
|
@@ -366,9 +329,7 @@ class WidgetParameters extends _react.Component {
|
|
|
366
329
|
id: "__delete"
|
|
367
330
|
}))));
|
|
368
331
|
}
|
|
369
|
-
|
|
370
332
|
}
|
|
371
|
-
|
|
372
333
|
WidgetParameters.propTypes = {
|
|
373
334
|
classes: _propTypes.default.shape().isRequired,
|
|
374
335
|
intl: _propTypes.default.shape().isRequired,
|
|
@@ -377,7 +338,4 @@ WidgetParameters.propTypes = {
|
|
|
377
338
|
updateParameters: _propTypes.default.func.isRequired,
|
|
378
339
|
onClose: _propTypes.default.func.isRequired
|
|
379
340
|
};
|
|
380
|
-
|
|
381
|
-
var _default = (0, _reactIntl.injectIntl)((0, _styles.withStyles)(styles)(WidgetParameters));
|
|
382
|
-
|
|
383
|
-
exports.default = _default;
|
|
341
|
+
var _default = exports.default = (0, _reactIntl.injectIntl)((0, _styles.withStyles)(styles)(WidgetParameters));
|
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _WidgetParameters.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _WidgetParameters = _interopRequireDefault(require("./WidgetParameters"));
|
|
14
|
-
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|