formiojs-eorion 0.1.21 → 0.1.22

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.
Files changed (44) hide show
  1. package/Formio.js +1 -1
  2. package/components/Chart/Chart.js +9 -16
  3. package/components/CustomCheckBox/CustomCheckBox.js +7 -14
  4. package/components/CustomFile/CustomFile.js +65 -72
  5. package/components/CustomRadio/CustomRadio.js +13 -21
  6. package/components/CustomSelect/CustomSelect.js +32 -40
  7. package/components/CustomTable/CustomTable.js +7 -15
  8. package/components/CustomTextArea/CustomTextArea.js +4 -3
  9. package/components/CustomTextField/CustomTextField.js +7 -14
  10. package/components/Data/Data.js +15 -23
  11. package/components/DataChinaGrid/Data.js +2 -1
  12. package/components/DataChinaGridRow/Data.js +2 -1
  13. package/components/DataSource/DataSource.js +2 -1
  14. package/components/Department/Department.js +10 -17
  15. package/components/LocationInputTextField/LocationInputTextField.js +7 -14
  16. package/components/NocodbFile/NocodbFile.js +65 -72
  17. package/components/QrCode/QrCode.js +6 -13
  18. package/components/ScanInputTextField/ScanInputTextField.js +7 -14
  19. package/components/TaskCalendar/TaskCalendar.js +8 -16
  20. package/components/_classes/Department/Department.js +10 -17
  21. package/components/button/Button.js +2 -1
  22. package/components/echarts/ECharts.js +2 -1
  23. package/components/file/File.js +63 -71
  24. package/components/iconButton/IconButton.js +2 -1
  25. package/components/map/Map.js +14 -22
  26. package/components/progress/Progress.js +2 -1
  27. package/components/radio/Radio.js +45 -53
  28. package/components/select/Select.js +102 -110
  29. package/components/tree/Tree.js +10 -17
  30. package/dist/formio.contrib.js +2 -2
  31. package/dist/formio.contrib.min.js +1 -1
  32. package/dist/formio.contrib.min.js.LICENSE.txt +1 -1
  33. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  34. package/dist/formio.form.js +27 -27
  35. package/dist/formio.form.min.js +1 -1
  36. package/dist/formio.form.min.js.LICENSE.txt +1 -1
  37. package/dist/formio.full.js +27 -27
  38. package/dist/formio.full.min.js +1 -1
  39. package/dist/formio.full.min.js.LICENSE.txt +1 -1
  40. package/dist/formio.js +1 -1
  41. package/dist/formio.min.js +1 -1
  42. package/dist/formio.min.js.LICENSE.txt +1 -1
  43. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  44. package/package.json +1 -1
@@ -19,10 +19,10 @@ Object.defineProperty(exports, "__esModule", {
19
19
  value: true
20
20
  });
21
21
  exports.default = void 0;
22
- require("core-js/modules/es.object.to-string.js");
23
22
  require("core-js/modules/es.regexp.exec.js");
24
23
  require("core-js/modules/es.string.replace.js");
25
24
  require("core-js/modules/es.string.trim.js");
25
+ require("core-js/modules/es.object.to-string.js");
26
26
  require("core-js/modules/web.dom-collections.for-each.js");
27
27
  require("core-js/modules/es.array.concat.js");
28
28
  require("core-js/modules/es.function.name.js");
@@ -31,6 +31,7 @@ require("core-js/modules/es.string.includes.js");
31
31
  require("core-js/modules/es.object.get-prototype-of.js");
32
32
  var _Field = _interopRequireDefault(require("../_classes/field/Field"));
33
33
  var _Formio = require("../../Formio");
34
+ var _lodash = _interopRequireDefault(require("lodash"));
34
35
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
36
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { 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 = it.call(o); }, 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; } } }; }
36
37
  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); }
@@ -60,20 +61,12 @@ var Data = /*#__PURE__*/function (_FieldComponent) {
60
61
  return _this;
61
62
  }
62
63
  _createClass(Data, [{
63
- key: "get",
64
- value: function get(path, obj) {
65
- var fb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "${".concat(path, "}");
66
- return path.split('.').reduce(function (res, key) {
67
- return res[key] || fb;
68
- }, obj);
69
- }
70
- }, {
71
64
  key: "parseTpl",
72
- value: function parseTpl(template, map, fallback) {
73
- var _this2 = this;
65
+ value: function parseTpl(template, map) {
74
66
  return template.replace(/\$\{.+?}/g, function (match) {
67
+ var _$get;
75
68
  var path = match.substr(2, match.length - 3).trim();
76
- return _this2.get(path, map, fallback);
69
+ return (_$get = _lodash.default.get(map, path)) !== null && _$get !== void 0 ? _$get : '--';
77
70
  });
78
71
  }
79
72
  }, {
@@ -92,7 +85,7 @@ var Data = /*#__PURE__*/function (_FieldComponent) {
92
85
  }, {
93
86
  key: "attach",
94
87
  value: function attach(element) {
95
- var _this3 = this;
88
+ var _this2 = this;
96
89
  var refs = {};
97
90
  var self = this;
98
91
  this.loadRefs(element, refs);
@@ -109,10 +102,10 @@ var Data = /*#__PURE__*/function (_FieldComponent) {
109
102
  try {
110
103
  parsedOptions = JSON.parse(this.parseTpl(options || '{"headers":{}}', {
111
104
  data: this.rootValue
112
- }, null));
105
+ }));
113
106
  parsedBody = JSON.parse(this.parseTpl(body || '{}', {
114
107
  data: this.rootValue
115
- }, null));
108
+ }));
116
109
  } catch (e) {
117
110
  console.log(e);
118
111
  }
@@ -154,10 +147,10 @@ var Data = /*#__PURE__*/function (_FieldComponent) {
154
147
  setTimeout(function () {
155
148
  self.setValue(self.initValue);
156
149
  }, 300);
157
- return _get(_getPrototypeOf(Data.prototype), "attach", _this3).call(_this3, element);
150
+ return _get(_getPrototypeOf(Data.prototype), "attach", _this2).call(_this2, element);
158
151
  }).catch(function (e) {
159
152
  self.isInitData = true;
160
- return _get(_getPrototypeOf(Data.prototype), "attach", _this3).call(_this3, element);
153
+ return _get(_getPrototypeOf(Data.prototype), "attach", _this2).call(_this2, element);
161
154
  });
162
155
  }
163
156
  // Allow basic component functionality to attach like field logic and tooltips.