versacall-dashboards-library-react 2.0.29 → 2.0.31

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.
@@ -19,6 +19,12 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
19
19
 
20
20
  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; }
21
21
 
22
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
23
+
24
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
25
+
26
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
27
+
22
28
  // import BackgroundTransparencyImage from '../../images/BackgroundTransparency.png';
23
29
  var style = {
24
30
  root: {
@@ -34,6 +40,49 @@ var style = {
34
40
  }
35
41
  };
36
42
 
43
+ function formatAnimationName(name) {
44
+ /* let nameAdjusted = name.split(' ').join('_');
45
+ nameAdjusted = nameAdjusted.toLowerCase();
46
+ nameAdjusted = nameAdjusted.split('');
47
+ let newName = '';
48
+ nameAdjusted.forEach(character => { if (/[a-z0-9_]+/.exec(character) !== null) newName += character; }); */
49
+ var code = '';
50
+ var addUnderscore = false;
51
+ var haveLetterOrDigit = false; // const isLetter = char => (/[a-zA-Z]+/.exec(char) !== null);
52
+ // const isDigit = char => (/[0-9]+/.exec(char) !== null);
53
+
54
+ var isLetterOrDigit = char => /[a-zA-Z0-9]+/.exec(char) !== null; // eslint-disable-next-line no-restricted-syntax
55
+
56
+
57
+ var _iterator = _createForOfIteratorHelper(name),
58
+ _step;
59
+
60
+ try {
61
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
62
+ var char = _step.value;
63
+
64
+ if (isLetterOrDigit(char)) {
65
+ haveLetterOrDigit = true;
66
+
67
+ if (addUnderscore) {
68
+ addUnderscore = false;
69
+ code += '_';
70
+ }
71
+
72
+ code += char;
73
+ } else if (haveLetterOrDigit) {
74
+ addUnderscore = true;
75
+ }
76
+ }
77
+ } catch (err) {
78
+ _iterator.e(err);
79
+ } finally {
80
+ _iterator.f();
81
+ }
82
+
83
+ return code.toLowerCase();
84
+ }
85
+
37
86
  function DashboardsCell(props) {
38
87
  var widget = props.widget,
39
88
  viewer = props.viewer,
@@ -56,7 +105,8 @@ function DashboardsCell(props) {
56
105
  } */
57
106
 
58
107
  if (styles.backgroundColor && styles.backgroundColorFade && styles.backgroundColorFade !== 'none') {
59
- var name = "backgroundColorFade".concat(styles.backgroundColor.replace(/[., ()]+/g, '')).concat(styles.backgroundColorFade.replace(/[., ()]+/g, ''));
108
+ // const name = `backgroundColorFade${styles.backgroundColor.replace(/[., ()]+/g, '')}${styles.backgroundColorFade.replace(/[., ()]+/g, '')}`;
109
+ var name = formatAnimationName("backgroundColorFade_".concat(styles.backgroundColor, "_").concat(styles.backgroundColorFade));
60
110
  var canAddRule = true;
61
111
 
62
112
  for (var i = 0; i < document.styleSheets[0].cssRules.length; i++) {
@@ -72,7 +122,7 @@ function DashboardsCell(props) {
72
122
 
73
123
  backgroundColorFadeStyle = {
74
124
  animationName: name,
75
- animationDuration: '1s',
125
+ animationDuration: styles.fadeDuration ? styles.fadeDuration : '1s',
76
126
  animationIterationCount: 'infinite'
77
127
  };
78
128
  }
@@ -99,7 +149,8 @@ function DashboardsCell(props) {
99
149
  var colorFadeStyle = {};
100
150
 
101
151
  if (styles.color && styles.colorFade && styles.colorFade !== 'none') {
102
- var _name = "colorFade".concat(styles.color.replace(/[., ()]+/g, '')).concat(styles.colorFade.replace(/[., ()]+/g, ''));
152
+ // const name = `colorFade${styles.color.replace(/[., ()]+/g, '')}${styles.colorFade.replace(/[., ()]+/g, '')}`;
153
+ var _name = formatAnimationName("colorFade_".concat(styles.color, "_").concat(styles.colorFade));
103
154
 
104
155
  var _canAddRule = true;
105
156
 
@@ -116,7 +167,7 @@ function DashboardsCell(props) {
116
167
 
117
168
  colorFadeStyle = {
118
169
  animationName: _name,
119
- animationDuration: '1s',
170
+ animationDuration: styles.fadeDuration ? styles.fadeDuration : '1s',
120
171
  animationIterationCount: 'infinite'
121
172
  };
122
173
  }
@@ -543,7 +543,8 @@ class DashboardsMainTable extends _react.Component {
543
543
  viewHeight: viewHeight,
544
544
  previewColor: previewColor,
545
545
  alignItems: tableDashboard.ratio.verticalAlignment,
546
- justifyContent: tableDashboard.ratio.horizontalAlignment
546
+ justifyContent: tableDashboard.ratio.horizontalAlignment,
547
+ showEditor: showEditor
547
548
  }, /*#__PURE__*/_react.default.createElement(_DashboardsGrid.default, {
548
549
  gap: gap,
549
550
  selected: selected,
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": 29
5
+ "build": 31
6
6
  },
7
7
  "name": "versacall-dashboards-library-react",
8
- "version": "2.0.29",
8
+ "version": "2.0.31",
9
9
  "description": "Versacall Dashboards Library",
10
10
  "main": "dist/index.js",
11
11
  "module": "dist/index.js",
@@ -51,7 +51,7 @@
51
51
  "react-router-dom": "^4.3.1",
52
52
  "react-scripts": "2.1.8",
53
53
  "react-testing-library": "^6.0.1",
54
- "versacall-core-library-react": "^2.0.28"
54
+ "versacall-core-library-react": "^2.0.63"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "@material-ui/core": "^4.12.1",