versacall-dashboards-library-react 2.0.43 → 2.0.45
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 +48 -26
- package/dist/components/DashboardsCellContent/DashboardsCellContent.js +40 -31
- package/dist/components/DashboardsCellFindAndReplace/DashboardsCellFindAndReplace.js +2 -2
- package/dist/components/DashboardsCellGlobalActions/DashboardsCellGlobalActions.js +4 -6
- package/dist/components/DashboardsCellGlobalConditions/DashboardsCellGlobalConditions.js +268 -158
- package/dist/components/DashboardsCellGlobalConditions/DashboardsCellGlobalConditionsNestable.js +59 -39
- package/dist/components/DashboardsCellGlobalConditions/DashboardsCellGlobalConditionsOld.js +57 -39
- package/dist/components/DashboardsCellGlobalStyles/DashboardsCellGlobalStyles.js +52 -32
- package/dist/components/DashboardsCellStyle/DashboardsCellStyle.js +1 -2
- package/dist/components/DashboardsCellStyleAlignItems/DashboardsCellStyleAlignItems.js +3 -7
- package/dist/components/DashboardsCellStyleBackgroundColor/DashboardsCellStyleBackgroundColor.js +9 -11
- package/dist/components/DashboardsCellStyleColor/DashboardsCellStyleColor.js +9 -11
- package/dist/components/DashboardsCellStyleDisplay/DashboardsCellStyleDisplay.js +4 -4
- package/dist/components/DashboardsCellStyleFontSize/DashboardsCellStyleFontSize.js +1 -1
- package/dist/components/DashboardsCellStyleJustifyContent/DashboardsCellStyleJustifyContent.js +3 -7
- package/dist/components/DashboardsCellStyleWeightStyleDecoration/DashboardsCellStyleWeightStyleDecoration.js +3 -7
- package/dist/components/DashboardsCopyAndPaste/DashboardsCopyAndPaste.js +3 -6
- package/dist/components/DashboardsEditor/DashboardsEditor.js +32 -27
- package/dist/components/DashboardsGlobalStylesPicker/DashboardsGlobalStylesPicker.js +3 -7
- package/dist/components/DashboardsGrid/DashboardsGrid.js +5 -9
- package/dist/components/DashboardsMainFreehand/DashboardsMainFreehand.js +39 -28
- package/dist/components/DashboardsMainMessaging/DashboardsMainMessaging.js +45 -32
- package/dist/components/DashboardsMainTable/DashboardsMainTable.js +41 -26
- package/dist/components/DashboardsPreview/DashboardsPreview.js +4 -8
- package/dist/components/DashboardsRatio/DashboardsRatio.js +20 -16
- package/dist/components/DashboardsRatio/DashboardsRatioOld.js +23 -22
- package/dist/components/DashboardsStatusBar/DashboardsStatusBar.js +6 -9
- package/dist/components/DashboardsViewer/DashboardsViewer.js +1 -1
- package/dist/components/WidgetParameters/WidgetParameters.js +27 -24
- package/dist/functions/addTranslations.js +11 -8
- package/dist/functions/calculateDashboardVariables.js +12 -15
- package/dist/functions/convertColorObject.js +1 -1
- package/dist/functions/convertSecondsToElapsedTime.js +5 -5
- package/package.json +4 -3
|
@@ -8,11 +8,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _versacallCoreLibraryReact = require("versacall-core-library-react");
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
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; }
|
|
12
|
-
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; }
|
|
13
|
-
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; }
|
|
14
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
15
|
-
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); }
|
|
16
11
|
// import BackgroundTransparencyImage from '../../images/BackgroundTransparency.png';
|
|
17
12
|
|
|
18
13
|
const style = {
|
|
@@ -65,11 +60,14 @@ function DashboardsCell(props) {
|
|
|
65
60
|
core,
|
|
66
61
|
showEditor
|
|
67
62
|
} = props;
|
|
68
|
-
const spanStyle =
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
const spanStyle = {
|
|
64
|
+
...style.root,
|
|
65
|
+
gridColumn: `span ${cell.columnSpan}`,
|
|
66
|
+
gridRow: `span ${cell.rowSpan}`
|
|
67
|
+
};
|
|
68
|
+
const styles = {
|
|
69
|
+
...cell.custom.style
|
|
70
|
+
};
|
|
73
71
|
let backgroundColorFadeStyle = {};
|
|
74
72
|
// NOTE: Definitely don't want this when viewing... It is debatable if we want it will editing. Could
|
|
75
73
|
// through an "&& showEditor" in the below condition if we want it to show in edit mode.
|
|
@@ -78,7 +76,7 @@ function DashboardsCell(props) {
|
|
|
78
76
|
} */
|
|
79
77
|
if (styles.backgroundColor && styles.backgroundColorFade && styles.backgroundColorFade !== 'none') {
|
|
80
78
|
// const name = `backgroundColorFade${styles.backgroundColor.replace(/[., ()]+/g, '')}${styles.backgroundColorFade.replace(/[., ()]+/g, '')}`;
|
|
81
|
-
const name = formatAnimationName(
|
|
79
|
+
const name = formatAnimationName(`backgroundColorFade_${styles.backgroundColor}_${styles.backgroundColorFade}`);
|
|
82
80
|
let canAddRule = true;
|
|
83
81
|
for (let i = 0; i < document.styleSheets[0].cssRules.length; i++) {
|
|
84
82
|
if (document.styleSheets[0].cssRules[i].name === name) {
|
|
@@ -87,7 +85,17 @@ function DashboardsCell(props) {
|
|
|
87
85
|
}
|
|
88
86
|
}
|
|
89
87
|
if (canAddRule) {
|
|
90
|
-
document.styleSheets[0].insertRule(
|
|
88
|
+
document.styleSheets[0].insertRule(`@-webkit-keyframes ${name} {
|
|
89
|
+
0% {
|
|
90
|
+
background-color: ${styles.backgroundColor};
|
|
91
|
+
}
|
|
92
|
+
50% {
|
|
93
|
+
background-color: ${styles.backgroundColorFade};
|
|
94
|
+
}
|
|
95
|
+
100% {
|
|
96
|
+
background-color: ${styles.backgroundColor};
|
|
97
|
+
}
|
|
98
|
+
}`, document.styleSheets[0].cssRules.length);
|
|
91
99
|
}
|
|
92
100
|
backgroundColorFadeStyle = {
|
|
93
101
|
animationName: name,
|
|
@@ -95,12 +103,13 @@ function DashboardsCell(props) {
|
|
|
95
103
|
animationIterationCount: 'infinite'
|
|
96
104
|
};
|
|
97
105
|
}
|
|
98
|
-
const prepareMainStyle =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
const prepareMainStyle = {
|
|
107
|
+
...style.root,
|
|
108
|
+
borderWidth: (cell.custom.viewWidth <= cell.custom.viewHeight ? cell.custom.viewWidth : cell.custom.viewHeight) / 200 * Number(styles.borderSize ? styles.borderSize : 2),
|
|
109
|
+
...backgroundColorFadeStyle,
|
|
110
|
+
padding: `${styles.paddingVertical ? cell.custom.viewHeight / 200 * styles.paddingVertical : 0}px ${styles.paddingHorizontal ? cell.custom.viewWidth / 200 * styles.paddingHorizontal : 0}px`,
|
|
102
111
|
fontSize: styles.fontSize ? styles.fontSize : '12%'
|
|
103
|
-
}
|
|
112
|
+
};
|
|
104
113
|
if (cell.content.type !== 'text') {
|
|
105
114
|
prepareMainStyle.fontSize = '0%';
|
|
106
115
|
}
|
|
@@ -115,7 +124,7 @@ function DashboardsCell(props) {
|
|
|
115
124
|
let colorFadeStyle = {};
|
|
116
125
|
if (styles.color && styles.colorFade && styles.colorFade !== 'none') {
|
|
117
126
|
// const name = `colorFade${styles.color.replace(/[., ()]+/g, '')}${styles.colorFade.replace(/[., ()]+/g, '')}`;
|
|
118
|
-
const name = formatAnimationName(
|
|
127
|
+
const name = formatAnimationName(`colorFade_${styles.color}_${styles.colorFade}`);
|
|
119
128
|
let canAddRule = true;
|
|
120
129
|
for (let i = 0; i < document.styleSheets[0].cssRules.length; i++) {
|
|
121
130
|
if (document.styleSheets[0].cssRules[i].name === name) {
|
|
@@ -124,7 +133,17 @@ function DashboardsCell(props) {
|
|
|
124
133
|
}
|
|
125
134
|
}
|
|
126
135
|
if (canAddRule) {
|
|
127
|
-
document.styleSheets[0].insertRule(
|
|
136
|
+
document.styleSheets[0].insertRule(`@-webkit-keyframes ${name} {
|
|
137
|
+
0% {
|
|
138
|
+
color: ${styles.color};
|
|
139
|
+
}
|
|
140
|
+
50% {
|
|
141
|
+
color: ${styles.colorFade};
|
|
142
|
+
}
|
|
143
|
+
100% {
|
|
144
|
+
color: ${styles.color};
|
|
145
|
+
}
|
|
146
|
+
}`, document.styleSheets[0].cssRules.length);
|
|
128
147
|
}
|
|
129
148
|
colorFadeStyle = {
|
|
130
149
|
animationName: name,
|
|
@@ -132,17 +151,17 @@ function DashboardsCell(props) {
|
|
|
132
151
|
animationIterationCount: 'infinite'
|
|
133
152
|
};
|
|
134
153
|
}
|
|
135
|
-
const contentStyle =
|
|
154
|
+
const contentStyle = {
|
|
136
155
|
display: 'block',
|
|
137
156
|
boxSizing: 'border-box',
|
|
138
157
|
overflow: 'hidden',
|
|
139
|
-
color: styles.color ? styles.color : 'black'
|
|
140
|
-
|
|
158
|
+
color: styles.color ? styles.color : 'black',
|
|
159
|
+
...colorFadeStyle,
|
|
141
160
|
textDecoration: styles.textDecoration ? styles.textDecoration : 'none',
|
|
142
161
|
width: cell.content.type === 'text' ? 'auto' : '100%',
|
|
143
162
|
height: cell.content.type === 'text' ? 'auto' : '100%',
|
|
144
163
|
textAlign: 'left'
|
|
145
|
-
}
|
|
164
|
+
};
|
|
146
165
|
if (styles.justifyContent) {
|
|
147
166
|
switch (styles.justifyContent) {
|
|
148
167
|
case 'center':
|
|
@@ -171,7 +190,10 @@ function DashboardsCell(props) {
|
|
|
171
190
|
delete styles.colorFade;
|
|
172
191
|
delete styles.textDecoration;
|
|
173
192
|
delete styles.objectFit;
|
|
174
|
-
const mainStyle =
|
|
193
|
+
const mainStyle = {
|
|
194
|
+
...prepareMainStyle,
|
|
195
|
+
...styles
|
|
196
|
+
};
|
|
175
197
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
176
198
|
style: spanStyle
|
|
177
199
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -190,14 +212,14 @@ function DashboardsCell(props) {
|
|
|
190
212
|
style: style.url
|
|
191
213
|
}), cell.content.type === 'image' && cell.content.id && /*#__PURE__*/_react.default.createElement("img", {
|
|
192
214
|
style: imageStyle,
|
|
193
|
-
src:
|
|
215
|
+
src: `${core.baseUrl}/api/contentstorage/${cell.content.id}`,
|
|
194
216
|
alt: "altImg"
|
|
195
217
|
}), cell.content.type === 'widget' && cell.content.id && widget && /*#__PURE__*/_react.default.createElement(_versacallCoreLibraryReact.CoreWidget, {
|
|
196
218
|
sandbox: "allow-scripts allow-same-origin allow-popups",
|
|
197
219
|
controller: {
|
|
198
220
|
properties: cell.content.properties
|
|
199
221
|
},
|
|
200
|
-
url: viewer ?
|
|
222
|
+
url: viewer ? `${core.baseUrl}${viewer.metadata.url}?type=widget&id=${widget.id}${showEditor ? '&editor=true' : ''}&version=${viewer.version}` : `${core.baseUrl}${widget.viewerUrl}${showEditor ? '&editor=true' : ''}`,
|
|
201
223
|
withAuthentication: true,
|
|
202
224
|
withOrganization: true
|
|
203
225
|
})))));
|
|
@@ -15,11 +15,6 @@ var _reactIntl = require("react-intl");
|
|
|
15
15
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
16
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
17
|
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); }
|
|
18
|
-
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; }
|
|
19
|
-
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; }
|
|
20
|
-
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; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
22
|
-
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); }
|
|
23
18
|
const style = {
|
|
24
19
|
widget: {
|
|
25
20
|
width: '100%',
|
|
@@ -196,14 +191,16 @@ class DashboardsCellContent extends _react.Component {
|
|
|
196
191
|
shrink: true
|
|
197
192
|
},
|
|
198
193
|
updateValue: eventValue => this.props.updateValue({
|
|
199
|
-
content:
|
|
194
|
+
content: {
|
|
195
|
+
...value,
|
|
200
196
|
text: eventValue
|
|
201
|
-
}
|
|
197
|
+
}
|
|
202
198
|
}),
|
|
203
199
|
selectOption: eventOption => this.props.updateValue({
|
|
204
|
-
content:
|
|
205
|
-
|
|
206
|
-
|
|
200
|
+
content: {
|
|
201
|
+
...value,
|
|
202
|
+
text: `~${eventOption.name}`
|
|
203
|
+
}
|
|
207
204
|
}),
|
|
208
205
|
fullWidth: true,
|
|
209
206
|
multiline: true
|
|
@@ -221,9 +218,10 @@ class DashboardsCellContent extends _react.Component {
|
|
|
221
218
|
shrink: true
|
|
222
219
|
},
|
|
223
220
|
onChange: event => this.props.updateValue({
|
|
224
|
-
content:
|
|
221
|
+
content: {
|
|
222
|
+
...value,
|
|
225
223
|
url: event.target.value
|
|
226
|
-
}
|
|
224
|
+
}
|
|
227
225
|
}),
|
|
228
226
|
fullWidth: true
|
|
229
227
|
})), value.type === 'image' && /*#__PURE__*/_react.default.createElement(_Grid.default, {
|
|
@@ -242,9 +240,10 @@ class DashboardsCellContent extends _react.Component {
|
|
|
242
240
|
shrink: true
|
|
243
241
|
},
|
|
244
242
|
onChange: event => this.props.updateValue({
|
|
245
|
-
content:
|
|
243
|
+
content: {
|
|
244
|
+
...value,
|
|
246
245
|
id: event.target.value
|
|
247
|
-
}
|
|
246
|
+
}
|
|
248
247
|
}),
|
|
249
248
|
fullWidth: true,
|
|
250
249
|
select: true
|
|
@@ -317,11 +316,12 @@ class DashboardsCellContent extends _react.Component {
|
|
|
317
316
|
properties: value.properties,
|
|
318
317
|
variables: variables
|
|
319
318
|
},
|
|
320
|
-
url:
|
|
319
|
+
url: `${core.baseUrl}${widgets.find(widget => widget.id === value.id).configureUrl}`,
|
|
321
320
|
onChange: event => this.props.updateValue({
|
|
322
|
-
content:
|
|
321
|
+
content: {
|
|
322
|
+
...value,
|
|
323
323
|
properties: event.properties
|
|
324
|
-
}
|
|
324
|
+
}
|
|
325
325
|
}),
|
|
326
326
|
withAuthentication: true,
|
|
327
327
|
withOrganization: true
|
|
@@ -344,18 +344,22 @@ class DashboardsCellContent extends _react.Component {
|
|
|
344
344
|
placeholder: parameter.description,
|
|
345
345
|
value: currentWidgetProperties[parameter.name],
|
|
346
346
|
updateValue: eventValue => this.updateProperties({
|
|
347
|
-
content:
|
|
348
|
-
|
|
347
|
+
content: {
|
|
348
|
+
...value,
|
|
349
|
+
properties: {
|
|
350
|
+
...currentWidgetProperties,
|
|
349
351
|
[parameter.name]: eventValue
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
352
354
|
}),
|
|
353
355
|
selectOption: eventOption => this.updateProperties({
|
|
354
|
-
content:
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
356
|
+
content: {
|
|
357
|
+
...value,
|
|
358
|
+
properties: {
|
|
359
|
+
...currentWidgetProperties,
|
|
360
|
+
[parameter.name]: `~${eventOption.name}`
|
|
361
|
+
}
|
|
362
|
+
}
|
|
359
363
|
}),
|
|
360
364
|
fullWidth: true
|
|
361
365
|
}), parameter.type === 'tag' && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -376,11 +380,16 @@ class DashboardsCellContent extends _react.Component {
|
|
|
376
380
|
hideMonitoringPointTagFilters: parameter.hideMonitoringPointTagFilters,
|
|
377
381
|
hideMonitoringPointTypeFilters: parameter.hideMonitoringPointTypeFilters,
|
|
378
382
|
updateFilter: event => this.updateProperties({
|
|
379
|
-
content:
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
383
|
+
content: {
|
|
384
|
+
...value,
|
|
385
|
+
properties: {
|
|
386
|
+
...currentWidgetProperties,
|
|
387
|
+
[parameter.name]: {
|
|
388
|
+
...currentWidgetProperties[parameter.name],
|
|
389
|
+
...event
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
384
393
|
}),
|
|
385
394
|
filter: currentWidgetProperties[parameter.name]
|
|
386
395
|
})))))))))));
|
|
@@ -117,7 +117,7 @@ class DashboardsCellFindAndReplace extends _react.Component {
|
|
|
117
117
|
find: event
|
|
118
118
|
}),
|
|
119
119
|
selectOption: event => this.setState({
|
|
120
|
-
find:
|
|
120
|
+
find: `~${event.name}`
|
|
121
121
|
}),
|
|
122
122
|
fullWidth: true
|
|
123
123
|
})), /*#__PURE__*/_react.default.createElement(_Grid.default, {
|
|
@@ -134,7 +134,7 @@ class DashboardsCellFindAndReplace extends _react.Component {
|
|
|
134
134
|
replace: event
|
|
135
135
|
}),
|
|
136
136
|
selectOption: event => this.setState({
|
|
137
|
-
replace:
|
|
137
|
+
replace: `~${event.name}`
|
|
138
138
|
}),
|
|
139
139
|
fullWidth: true
|
|
140
140
|
})), /*#__PURE__*/_react.default.createElement(_Grid.default, {
|
|
@@ -15,11 +15,6 @@ var _Grid = _interopRequireDefault(require("@material-ui/core/Grid"));
|
|
|
15
15
|
var _reactIntl = require("react-intl");
|
|
16
16
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
-
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; }
|
|
19
|
-
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; }
|
|
20
|
-
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; }
|
|
21
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
22
|
-
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); }
|
|
23
18
|
// Constants
|
|
24
19
|
const ACTION_TYPES = {
|
|
25
20
|
NONE: 'none',
|
|
@@ -55,7 +50,10 @@ function DashboardsCellGlobalActions(props) {
|
|
|
55
50
|
const [open, setOpen] = _react.default.useState(false);
|
|
56
51
|
const handleClose = () => setOpen(false);
|
|
57
52
|
const handleActionUpdate = updates => {
|
|
58
|
-
updateAction(
|
|
53
|
+
updateAction({
|
|
54
|
+
...action,
|
|
55
|
+
...updates
|
|
56
|
+
});
|
|
59
57
|
};
|
|
60
58
|
const renderActionTypeSelect = () => /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
|
61
59
|
variant: "outlined",
|