formiojs-eorion 0.1.1 → 0.1.2

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/Formio.js CHANGED
@@ -1724,7 +1724,7 @@ Formio.projectUrlSet = false;
1724
1724
  Formio.plugins = [];
1725
1725
  Formio.cache = {};
1726
1726
  Formio.Providers = _providers.default;
1727
- Formio.version = '0.1.1';
1727
+ Formio.version = '0.1.2';
1728
1728
  Formio.pathType = '';
1729
1729
  Formio.events = new _EventEmitter.default();
1730
1730
  Formio.cdn = new _CDN.default();
@@ -22,10 +22,10 @@ require("core-js/modules/es.string.replace.js");
22
22
  require("core-js/modules/es.string.trim.js");
23
23
  require("core-js/modules/es.array.find.js");
24
24
  require("core-js/modules/es.object.to-string.js");
25
+ require("core-js/modules/web.dom-collections.for-each.js");
25
26
  require("core-js/modules/es.array.concat.js");
26
27
  require("core-js/modules/es.object.get-prototype-of.js");
27
28
  var _Field = _interopRequireDefault(require("../_classes/field/Field"));
28
- var _jquery = _interopRequireDefault(require("jquery"));
29
29
  require("peity");
30
30
  var _lodash = _interopRequireDefault(require("lodash"));
31
31
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -195,17 +195,32 @@ var DataChinaGrid = /*#__PURE__*/function (_Component) {
195
195
  container.querySelector('.sparkline-container').innerHTML = "<span class=\"line\">".concat(self.parseTpl(self.component['sparkLine-value'], {
196
196
  data: self.rootValue
197
197
  }), "</span>");
198
- // @ts-ignore
199
- (0, _jquery.default)(container).find('.line').peity(sparkLineType, {
200
- fill: fillColor,
201
- height: self.component['sparkLine-height'],
202
- max: self.component['sparkLine-max-value-count'],
203
- min: 0,
204
- stroke: self.component['sparkLine-stroke-color'],
205
- strokeWidth: 2,
206
- width: self.component['sparkLine-width']
207
- });
208
- self.isLoadingSparkLine = false;
198
+ try {
199
+ // @ts-ignore
200
+ $(container).find('.line').peity(sparkLineType, {
201
+ fill: fillColor,
202
+ height: self.component['sparkLine-height'],
203
+ max: self.component['sparkLine-max-value-count'],
204
+ min: 0,
205
+ stroke: self.component['sparkLine-stroke-color'],
206
+ strokeWidth: 2,
207
+ width: self.component['sparkLine-width']
208
+ });
209
+ self.isLoadingSparkLine = false;
210
+ } catch (e) {
211
+ container.querySelectorAll(".line").forEach(function (e) {
212
+ return peity(e, sparkLineType, {
213
+ fill: fillColor,
214
+ height: self.component['sparkLine-height'],
215
+ max: self.component['sparkLine-max-value-count'],
216
+ min: 0,
217
+ stroke: self.component['sparkLine-stroke-color'],
218
+ strokeWidth: 2,
219
+ width: self.component['sparkLine-width']
220
+ });
221
+ });
222
+ self.isLoadingSparkLine = false;
223
+ }
209
224
  }
210
225
  } catch (e) {
211
226
  console.log(e);
@@ -220,11 +235,12 @@ var DataChinaGrid = /*#__PURE__*/function (_Component) {
220
235
  }
221
236
  return _Field.default.schema.apply(_Field.default, [{
222
237
  type: 'data_china_grid',
223
- icon: '',
224
- color: '#ff7754',
225
- header: '',
226
- url: '',
227
- field: ''
238
+ "title-content": "低压问题综合治理率 <i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i>",
239
+ "value-content": "160 <i style='font-size: 10px;color: #0a6ebd'>%</i>",
240
+ "footer-content1": "name",
241
+ "footer-content2": "<div style='color:red'>up</div>",
242
+ "footer-content3": "info",
243
+ "footer-content": "开始时间"
228
244
  }].concat(extend));
229
245
  }
230
246
  }, {
@@ -99,6 +99,12 @@ var _default = [{
99
99
  input: true,
100
100
  defaultValue: '#000000',
101
101
  label: '字体大小'
102
+ }, {
103
+ key: 'value-font-weight',
104
+ type: 'input',
105
+ input: true,
106
+ defaultValue: 'bold',
107
+ label: '字体粗细'
102
108
  }]
103
109
  }, {
104
110
  type: 'panel',
@@ -22,6 +22,7 @@ require("core-js/modules/es.string.replace.js");
22
22
  require("core-js/modules/es.string.trim.js");
23
23
  require("core-js/modules/es.array.find.js");
24
24
  require("core-js/modules/es.object.to-string.js");
25
+ require("core-js/modules/web.dom-collections.for-each.js");
25
26
  require("core-js/modules/es.array.concat.js");
26
27
  require("core-js/modules/es.object.get-prototype-of.js");
27
28
  var _Field = _interopRequireDefault(require("../_classes/field/Field"));
@@ -195,17 +196,35 @@ var DataChinaGridRow = /*#__PURE__*/function (_Component) {
195
196
  container.querySelector('.sparkline-container').innerHTML = "<span class=\"line\">".concat(self.parseTpl(self.component['sparkLine-value'], {
196
197
  data: self.rootValue
197
198
  }), "</span>");
198
- // @ts-ignore
199
- (0, _jquery.default)(container).find('.line').peity(sparkLineType, {
200
- fill: fillColor,
201
- height: self.component['sparkLine-height'],
202
- max: self.component['sparkLine-max-value-count'],
203
- min: 0,
204
- stroke: self.component['sparkLine-stroke-color'],
205
- strokeWidth: 2,
206
- width: self.component['sparkLine-width']
207
- });
208
- self.isLoadingSparkLine = false;
199
+ // 宽度计算
200
+ var parentWidth = container.querySelector('#sparkline-container-parent').offsetWidth;
201
+ parentWidth = parentWidth * self.component['sparkLine-width'];
202
+ try {
203
+ // @ts-ignore
204
+ (0, _jquery.default)(container).find('.line').peity(sparkLineType, {
205
+ fill: fillColor,
206
+ height: self.component['sparkLine-height'],
207
+ max: self.component['sparkLine-max-value-count'],
208
+ min: 0,
209
+ stroke: self.component['sparkLine-stroke-color'],
210
+ strokeWidth: 2,
211
+ width: parentWidth
212
+ });
213
+ self.isLoadingSparkLine = false;
214
+ } catch (e) {
215
+ container.querySelectorAll(".line").forEach(function (e) {
216
+ return peity(e, sparkLineType, {
217
+ fill: fillColor,
218
+ height: self.component['sparkLine-height'],
219
+ max: self.component['sparkLine-max-value-count'],
220
+ min: 0,
221
+ stroke: self.component['sparkLine-stroke-color'],
222
+ strokeWidth: 2,
223
+ width: parentWidth
224
+ });
225
+ });
226
+ self.isLoadingSparkLine = false;
227
+ }
209
228
  }
210
229
  } catch (e) {
211
230
  console.log(e);
@@ -220,11 +239,13 @@ var DataChinaGridRow = /*#__PURE__*/function (_Component) {
220
239
  }
221
240
  return _Field.default.schema.apply(_Field.default, [{
222
241
  type: 'data_china_grid_row',
223
- icon: '',
224
242
  color: '#ff7754',
225
- header: '',
226
- url: '',
227
- field: ''
243
+ "title-content": "低压问题综合治理率 <i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i>",
244
+ "value-content": "160 <i style='font-size: 10px;color: #0a6ebd'>%</i>",
245
+ "footer-content1": "name",
246
+ "footer-content2": "<div style='color:red'>up</div>",
247
+ "footer-content3": "info",
248
+ "footer-content": "开始时间"
228
249
  }].concat(extend));
229
250
  }
230
251
  }, {
@@ -99,6 +99,12 @@ var _default = [{
99
99
  input: true,
100
100
  defaultValue: '#000000',
101
101
  label: '字体大小'
102
+ }, {
103
+ key: 'value-font-weight',
104
+ type: 'input',
105
+ input: true,
106
+ defaultValue: 'bold',
107
+ label: '字体粗细'
102
108
  }]
103
109
  }, {
104
110
  type: 'panel',
@@ -240,8 +246,8 @@ var _default = [{
240
246
  label: 'width',
241
247
  key: 'sparkLine-width',
242
248
  input: true,
243
- tooltip: '',
244
- defaultValue: 32
249
+ defaultValue: 0.8,
250
+ tooltip: '占剩余空间所占比例,0-1.0'
245
251
  }, {
246
252
  type: 'number',
247
253
  label: 'height',
@@ -35,6 +35,18 @@ var _default = [{
35
35
  defaultValue: '11',
36
36
  tooltip: 'Unit:rem',
37
37
  label: 'Column Height'
38
+ }, {
39
+ weight: 150,
40
+ type: 'checkbox',
41
+ key: 'flex-wrap',
42
+ defaultValue: false,
43
+ label: '可换行'
44
+ }, {
45
+ weight: 150,
46
+ type: 'checkbox',
47
+ key: 'flex-scrollable',
48
+ defaultValue: false,
49
+ label: '可滚动'
38
50
  }, {
39
51
  weight: 150,
40
52
  type: 'datagrid',