versacall-dashboards-library-react 2.0.32 → 2.0.34

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.
@@ -390,7 +390,14 @@ class DashboardsMainFreehand extends _react.Component {
390
390
  left: "".concat(cell.x, "%"),
391
391
  zIndex: cell.z
392
392
  },
393
- onClick: event => this.updateSelected(["".concat(index)]),
393
+ onClick: event => {
394
+ this.updateSelected(["".concat(index)]);
395
+
396
+ if (!showEditor && cell.actionType && this.props.onCellAction) {
397
+ event.stopPropagation();
398
+ this.props.onCellAction(event, index, cell);
399
+ }
400
+ },
394
401
  onKeyPress: event => this.updateSelected(["".concat(index)])
395
402
  }, /*#__PURE__*/_react.default.createElement(_DashboardsCell.default, {
396
403
  cell: cell,
@@ -433,7 +440,8 @@ DashboardsMainFreehand.propTypes = {
433
440
  viewers: _propTypes.default.arrayOf(_propTypes.default.shape()),
434
441
  widgets: _propTypes.default.arrayOf(_propTypes.default.shape()),
435
442
  variables: _propTypes.default.arrayOf(_propTypes.default.shape()),
436
- freehandDashboard: _propTypes.default.shape().isRequired
443
+ freehandDashboard: _propTypes.default.shape().isRequired,
444
+ onCellAction: _propTypes.default.func
437
445
  };
438
446
  DashboardsMainFreehand.defaultProps = {
439
447
  styles: [],
@@ -449,7 +457,8 @@ DashboardsMainFreehand.defaultProps = {
449
457
  row: 0,
450
458
  column: 0,
451
459
  cells: []
452
- }
460
+ },
461
+ onCellAction: null
453
462
  };
454
463
 
455
464
  var _default = (0, _reactIntl.injectIntl)((0, _versacallCoreLibraryReact.withCore)(DashboardsMainFreehand));
@@ -46,7 +46,8 @@ function replaceText(text, variables) {
46
46
 
47
47
  if (dependencies.length > 0) {
48
48
  variables.filter(variable => dependencies.includes(variable.name)).forEach(variable => {
49
- newText = newText.replace(new RegExp("~".concat(variable.name)), "".concat(variable.calculated !== '' ? variable.calculated : variable.value));
49
+ // newText = newText.replace(new RegExp(`~${variable.name}`), `${variable.calculated !== '' ? variable.calculated : variable.value}`);
50
+ newText = newText.split("~".concat(variable.name)).join("".concat(variable.calculated !== '' ? variable.calculated : variable.value));
50
51
  missingDependencies = missingDependencies.filter(missingDependency => missingDependency !== variable.name);
51
52
  });
52
53
  }
package/package.json CHANGED
@@ -1,83 +1,90 @@
1
- {
2
- "versacall": {
3
- "title": "Versacall Dashboards Library React",
4
- "applicationType": "react-library",
5
- "build": 32
6
- },
7
- "name": "versacall-dashboards-library-react",
8
- "version": "2.0.32",
9
- "description": "Versacall Dashboards Library",
10
- "main": "dist/index.js",
11
- "module": "dist/index.js",
12
- "files": ["dist"],
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/versacall/versacall-dashboards-library-react.git"
16
- },
17
- "scripts": {
18
- "start": "react-scripts start",
19
- "build": "react-scripts build",
20
- "test": "react-scripts test",
21
- "eject": "react-scripts eject",
22
- "compile": "del-cli dist/ && cross-env NODE_ENV=production babel src/lib --out-dir dist --copy-files --ignore __tests__,spec.js,test.js,__snapshots__"
23
- },
24
- "dependencies": {
25
- "cross-env": "^5.2.0",
26
- "del-cli": "^1.1.0",
27
- "react-color": "^2.17.3",
28
- "react-nestable-fork": "^1.3.0"
29
- },
30
- "devDependencies": {
31
- "@babel/cli": "^7.2.3",
32
- "@babel/preset-env": "^7.3.4",
33
- "@babel/preset-react": "^7.0.0",
34
- "@material-ui/core": "^4.12.1",
35
- "@material-ui/icons": "^4.11.2",
36
- "axios": "^0.21.1",
37
- "deepmerge": "^3.2.0",
38
- "emitter-io": "^1.39.0",
39
- "eslint-config-airbnb": "^17.1.0",
40
- "eslint-config-airbnb-base": "^13.1.0",
41
- "eslint-plugin-import": "^2.16.0",
42
- "eslint-plugin-jsx-a11y": "^6.2.1",
43
- "eslint-plugin-react": "^7.12.4",
44
- "eslint-plugin-reactintl": "^0.1.3",
45
- "js-cookie": "^2.2.0",
46
- "prop-types": "^15.7.2",
47
- "react": "^16.8.4",
48
- "react-beautiful-dnd": "^13.1.0",
49
- "react-dom": "^16.8.4",
50
- "react-intl": "^2.8.0",
51
- "react-router-dom": "^4.3.1",
52
- "react-scripts": "2.1.8",
53
- "react-testing-library": "^6.0.1",
54
- "versacall-core-library-react": "^2.0.63"
55
- },
56
- "peerDependencies": {
57
- "@material-ui/core": "^4.12.1",
58
- "@material-ui/icons": "^4.11.2",
59
- "axios": "^0.21.1",
60
- "deepmerge": "^3.2.0",
61
- "emitter-io": "^1.39.0",
62
- "eslint-config-airbnb": "^17.1.0",
63
- "eslint-config-airbnb-base": "^13.1.0",
64
- "eslint-plugin-import": "^2.16.0",
65
- "eslint-plugin-jsx-a11y": "^6.2.1",
66
- "eslint-plugin-react": "^7.12.4",
67
- "eslint-plugin-reactintl": "^0.1.3",
68
- "js-cookie": "^2.2.0",
69
- "prop-types": "^15.7.2",
70
- "react": "^16.8.4",
71
- "react-beautiful-dnd": "^13.0.0",
72
- "react-dom": "^16.8.4",
73
- "react-intl": "^2.8.0",
74
- "react-router-dom": "^4.3.1",
75
- "react-scripts": "2.1.8",
76
- "react-testing-library": "^6.0.1",
77
- "versacall-core-library-react": "^2.0.26"
78
- },
79
- "eslintConfig": {
80
- "extends": "react-app"
81
- },
82
- "browserslist": [">0.2%", "not dead", "not ie <= 11", "not op_mini all"]
83
- }
1
+ {
2
+ "versacall": {
3
+ "title": "Versacall Dashboards Library React",
4
+ "applicationType": "react-library",
5
+ "build": 34
6
+ },
7
+ "name": "versacall-dashboards-library-react",
8
+ "version": "2.0.34",
9
+ "description": "Versacall Dashboards Library",
10
+ "main": "dist/index.js",
11
+ "module": "dist/index.js",
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/versacall/versacall-dashboards-library-react.git"
18
+ },
19
+ "scripts": {
20
+ "start": "react-scripts start",
21
+ "build": "react-scripts build",
22
+ "test": "react-scripts test",
23
+ "eject": "react-scripts eject",
24
+ "compile": "del-cli dist/ && cross-env NODE_ENV=production babel src/lib --out-dir dist --copy-files --ignore __tests__,spec.js,test.js,__snapshots__"
25
+ },
26
+ "dependencies": {
27
+ "cross-env": "^5.2.0",
28
+ "del-cli": "^1.1.0",
29
+ "react-color": "^2.17.3",
30
+ "react-nestable-fork": "^1.3.0"
31
+ },
32
+ "devDependencies": {
33
+ "@babel/cli": "^7.2.3",
34
+ "@babel/preset-env": "^7.3.4",
35
+ "@babel/preset-react": "^7.0.0",
36
+ "@material-ui/core": "^4.12.1",
37
+ "@material-ui/icons": "^4.11.2",
38
+ "axios": "^0.21.1",
39
+ "deepmerge": "^3.2.0",
40
+ "emitter-io": "^1.39.0",
41
+ "eslint-config-airbnb": "^17.1.0",
42
+ "eslint-config-airbnb-base": "^13.1.0",
43
+ "eslint-plugin-import": "^2.16.0",
44
+ "eslint-plugin-jsx-a11y": "^6.2.1",
45
+ "eslint-plugin-react": "^7.12.4",
46
+ "eslint-plugin-reactintl": "^0.1.3",
47
+ "js-cookie": "^2.2.0",
48
+ "prop-types": "^15.7.2",
49
+ "react": "^16.8.4",
50
+ "react-beautiful-dnd": "^13.1.0",
51
+ "react-dom": "^16.8.4",
52
+ "react-intl": "^2.8.0",
53
+ "react-router-dom": "^4.3.1",
54
+ "react-scripts": "2.1.8",
55
+ "react-testing-library": "^6.0.1",
56
+ "versacall-core-library-react": "^2.0.63"
57
+ },
58
+ "peerDependencies": {
59
+ "@material-ui/core": "^4.12.1",
60
+ "@material-ui/icons": "^4.11.2",
61
+ "axios": "^0.21.1",
62
+ "deepmerge": "^3.2.0",
63
+ "emitter-io": "^1.39.0",
64
+ "eslint-config-airbnb": "^17.1.0",
65
+ "eslint-config-airbnb-base": "^13.1.0",
66
+ "eslint-plugin-import": "^2.16.0",
67
+ "eslint-plugin-jsx-a11y": "^6.2.1",
68
+ "eslint-plugin-react": "^7.12.4",
69
+ "eslint-plugin-reactintl": "^0.1.3",
70
+ "js-cookie": "^2.2.0",
71
+ "prop-types": "^15.7.2",
72
+ "react": "^16.8.4",
73
+ "react-beautiful-dnd": "^13.0.0",
74
+ "react-dom": "^16.8.4",
75
+ "react-intl": "^2.8.0",
76
+ "react-router-dom": "^4.3.1",
77
+ "react-scripts": "2.1.8",
78
+ "react-testing-library": "^6.0.1",
79
+ "versacall-core-library-react": "^2.0.26"
80
+ },
81
+ "eslintConfig": {
82
+ "extends": "react-app"
83
+ },
84
+ "browserslist": [
85
+ ">0.2%",
86
+ "not dead",
87
+ "not ie <= 11",
88
+ "not op_mini all"
89
+ ]
90
+ }