versacall-dashboards-library-react 2.0.13 → 2.0.14
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.
|
@@ -416,30 +416,40 @@ class DashboardsCellGlobalConditions extends _react.Component {
|
|
|
416
416
|
}
|
|
417
417
|
|
|
418
418
|
updateCondition(change) {
|
|
419
|
+
var _this$state = this.state,
|
|
420
|
+
conditionIndex = _this$state.conditionIndex,
|
|
421
|
+
typeCondition = _this$state.typeCondition;
|
|
422
|
+
console.log("conditionIndex = ".concat(conditionIndex, ", typeCondition = ").concat(typeCondition));
|
|
423
|
+
|
|
419
424
|
var updatedValue = _objectSpread({}, this.props.value);
|
|
420
425
|
|
|
421
|
-
|
|
426
|
+
console.log('updatedValue', updatedValue);
|
|
427
|
+
console.log('typeCondition');
|
|
428
|
+
var conditions = updatedValue["".concat(typeCondition, "Conditions")]; // const conditions = JSON.parse(JSON.stringify(this.props.value[`${this.state.typeCondition}Conditions`]));
|
|
422
429
|
|
|
423
430
|
if (this.state.advanced) {
|
|
424
|
-
conditions[
|
|
431
|
+
conditions[conditionIndex].condition = change.value;
|
|
425
432
|
} else {
|
|
426
|
-
var split = conditions[
|
|
433
|
+
var split = conditions[conditionIndex].condition.split(/[ ,]+/);
|
|
434
|
+
var segment1 = split[0];
|
|
435
|
+
var segment2 = split.length > 1 ? split[1] : '===';
|
|
436
|
+
var segment3 = split.length > 2 ? split[2] : '0';
|
|
427
437
|
|
|
428
438
|
switch (change.stringIndex) {
|
|
429
439
|
case 0:
|
|
430
|
-
conditions[
|
|
440
|
+
conditions[conditionIndex].condition = "".concat(change.value, " ").concat(segment2, " ").concat(segment3);
|
|
431
441
|
break;
|
|
432
442
|
|
|
433
443
|
case 1:
|
|
434
|
-
conditions[
|
|
444
|
+
conditions[conditionIndex].condition = "".concat(segment1, " ").concat(change.value, " ").concat(segment3);
|
|
435
445
|
break;
|
|
436
446
|
|
|
437
447
|
case 2:
|
|
438
|
-
conditions[
|
|
448
|
+
conditions[conditionIndex].condition = "".concat(segment1, " ").concat(segment2, " ").concat(change.value);
|
|
439
449
|
break;
|
|
440
450
|
|
|
441
451
|
default:
|
|
442
|
-
conditions[
|
|
452
|
+
conditions[conditionIndex].condition = "".concat(segment1, " ").concat(segment2, " ").concat(segment3);
|
|
443
453
|
break;
|
|
444
454
|
}
|
|
445
455
|
} // this.props.updateValue({ [`${this.state.typeCondition}Conditions`]: conditions });
|
|
@@ -617,9 +627,9 @@ class DashboardsCellGlobalConditions extends _react.Component {
|
|
|
617
627
|
var _this$props = this.props,
|
|
618
628
|
classes = _this$props.classes,
|
|
619
629
|
intl = _this$props.intl;
|
|
620
|
-
var _this$
|
|
621
|
-
tabIndex = _this$
|
|
622
|
-
conditionIndex = _this$
|
|
630
|
+
var _this$state2 = this.state,
|
|
631
|
+
tabIndex = _this$state2.tabIndex,
|
|
632
|
+
conditionIndex = _this$state2.conditionIndex;
|
|
623
633
|
var divStyle = {
|
|
624
634
|
border: '1px solid black',
|
|
625
635
|
padding: 10,
|
|
@@ -682,13 +692,13 @@ class DashboardsCellGlobalConditions extends _react.Component {
|
|
|
682
692
|
styles = _this$props2.styles,
|
|
683
693
|
widgets = _this$props2.widgets,
|
|
684
694
|
variables = _this$props2.variables;
|
|
685
|
-
var _this$
|
|
686
|
-
open = _this$
|
|
687
|
-
tabIndex = _this$
|
|
688
|
-
conditionIndex = _this$
|
|
689
|
-
menuIndex = _this$
|
|
690
|
-
menuAnchorEl = _this$
|
|
691
|
-
advanced = _this$
|
|
695
|
+
var _this$state3 = this.state,
|
|
696
|
+
open = _this$state3.open,
|
|
697
|
+
tabIndex = _this$state3.tabIndex,
|
|
698
|
+
conditionIndex = _this$state3.conditionIndex,
|
|
699
|
+
menuIndex = _this$state3.menuIndex,
|
|
700
|
+
menuAnchorEl = _this$state3.menuAnchorEl,
|
|
701
|
+
advanced = _this$state3.advanced;
|
|
692
702
|
var currentCondition = null;
|
|
693
703
|
|
|
694
704
|
if (conditionIndex !== null) {
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"versacall": {
|
|
3
3
|
"title": "Versacall Dashboards Library React",
|
|
4
4
|
"applicationType": "react-library",
|
|
5
|
-
"build":
|
|
5
|
+
"build": 14
|
|
6
6
|
},
|
|
7
7
|
"name": "versacall-dashboards-library-react",
|
|
8
|
-
"version": "2.0.
|
|
8
|
+
"version": "2.0.14",
|
|
9
9
|
"description": "Versacall Dashboards Library",
|
|
10
10
|
"main": "dist/index.js",
|
|
11
11
|
"module": "dist/index.js",
|