formiojs-eorion 0.1.7 → 0.1.8
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 +1 -1
- package/components/CustomTabs/Tabs.js +3 -0
- package/components/DataChinaGrid/Data.js +58 -51
- package/components/DataChinaGridRow/Data.js +61 -54
- package/dist/formio.contrib.js +1 -1
- package/dist/formio.contrib.min.js +1 -1
- package/dist/formio.contrib.min.js.LICENSE.txt +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.js +4 -4
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.js +4 -4
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +1 -1
- package/dist/formio.js +1 -1
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/package.json +1 -1
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.
|
|
1727
|
+
Formio.version = '0.1.8';
|
|
1728
1728
|
Formio.pathType = '';
|
|
1729
1729
|
Formio.events = new _EventEmitter.default();
|
|
1730
1730
|
Formio.cdn = new _CDN.default();
|
|
@@ -304,6 +304,9 @@ var CustomTabsComponent = /*#__PURE__*/function (_NestedComponent) {
|
|
|
304
304
|
if (['echarts', 'taskCalendar'].includes(item.type)) {
|
|
305
305
|
_this11.tabs[_this11.currentTab][index].refresh(new Date().getTime());
|
|
306
306
|
}
|
|
307
|
+
if (['data_china_grid_row', 'data_china_grid'].includes(item.type)) {
|
|
308
|
+
_this11.tabs[_this11.currentTab][index].resetSparkLine();
|
|
309
|
+
}
|
|
307
310
|
});
|
|
308
311
|
}
|
|
309
312
|
this.clearErrorClasses(this.refs[this.tabLinkKey]);
|
|
@@ -20,9 +20,9 @@ exports.default = void 0;
|
|
|
20
20
|
require("core-js/modules/es.regexp.exec.js");
|
|
21
21
|
require("core-js/modules/es.string.replace.js");
|
|
22
22
|
require("core-js/modules/es.string.trim.js");
|
|
23
|
+
require("core-js/modules/es.array.find.js");
|
|
23
24
|
require("core-js/modules/es.object.to-string.js");
|
|
24
25
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
25
|
-
require("core-js/modules/es.array.find.js");
|
|
26
26
|
require("core-js/modules/es.array.concat.js");
|
|
27
27
|
require("core-js/modules/es.object.get-prototype-of.js");
|
|
28
28
|
var _Field = _interopRequireDefault(require("../_classes/field/Field"));
|
|
@@ -135,6 +135,62 @@ var DataChinaGrid = /*#__PURE__*/function (_Component) {
|
|
|
135
135
|
value: function getValue() {
|
|
136
136
|
return this.component.field;
|
|
137
137
|
}
|
|
138
|
+
}, {
|
|
139
|
+
key: "resetSparkLine",
|
|
140
|
+
value: function resetSparkLine() {
|
|
141
|
+
var self = this;
|
|
142
|
+
var container = this.element.querySelector('.data-container');
|
|
143
|
+
if (self.component['enable-sparkline']) {
|
|
144
|
+
if (self.isLoadingSparkLine) {
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
self.isLoadingSparkLine = true;
|
|
148
|
+
var sparkLineType = this.component['sparkLine-type'] || 'line';
|
|
149
|
+
var fillColor;
|
|
150
|
+
if (self.component['sparkLine-fill-color']) {
|
|
151
|
+
switch (sparkLineType) {
|
|
152
|
+
case 'line':
|
|
153
|
+
fillColor = self.component['sparkLine-fill-color'].split(',')[0];
|
|
154
|
+
break;
|
|
155
|
+
case 'pie':
|
|
156
|
+
case 'donut':
|
|
157
|
+
case 'bar':
|
|
158
|
+
fillColor = self.component['sparkLine-fill-color'].split(',');
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
// values
|
|
163
|
+
container.querySelector('.sparkline-container').innerHTML = "<span class=\"line\">".concat(self.parseTpl(self.component['sparkLine-value'], {
|
|
164
|
+
data: self.rootValue
|
|
165
|
+
}), "</span>");
|
|
166
|
+
try {
|
|
167
|
+
// @ts-ignore
|
|
168
|
+
$(container).find('.line').peity(sparkLineType, {
|
|
169
|
+
fill: fillColor,
|
|
170
|
+
height: self.component['sparkLine-height'],
|
|
171
|
+
max: self.component['sparkLine-max-value-count'],
|
|
172
|
+
min: 0,
|
|
173
|
+
stroke: self.component['sparkLine-stroke-color'],
|
|
174
|
+
strokeWidth: 2,
|
|
175
|
+
width: self.component['sparkLine-width']
|
|
176
|
+
});
|
|
177
|
+
self.isLoadingSparkLine = false;
|
|
178
|
+
} catch (e) {
|
|
179
|
+
container.querySelectorAll(".line").forEach(function (e) {
|
|
180
|
+
return peity(e, sparkLineType, {
|
|
181
|
+
fill: fillColor,
|
|
182
|
+
height: self.component['sparkLine-height'],
|
|
183
|
+
max: self.component['sparkLine-max-value-count'],
|
|
184
|
+
min: 0,
|
|
185
|
+
stroke: self.component['sparkLine-stroke-color'],
|
|
186
|
+
strokeWidth: 2,
|
|
187
|
+
width: self.component['sparkLine-width']
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
self.isLoadingSparkLine = false;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
138
194
|
|
|
139
195
|
/**
|
|
140
196
|
* Set the value of the component into the dom elements.
|
|
@@ -179,56 +235,7 @@ var DataChinaGrid = /*#__PURE__*/function (_Component) {
|
|
|
179
235
|
});
|
|
180
236
|
}
|
|
181
237
|
// 图标
|
|
182
|
-
|
|
183
|
-
if (self.isLoadingSparkLine) {
|
|
184
|
-
return true;
|
|
185
|
-
}
|
|
186
|
-
self.isLoadingSparkLine = true;
|
|
187
|
-
var sparkLineType = this.component['sparkLine-type'] || 'line';
|
|
188
|
-
var fillColor;
|
|
189
|
-
if (self.component['sparkLine-fill-color']) {
|
|
190
|
-
switch (sparkLineType) {
|
|
191
|
-
case 'line':
|
|
192
|
-
fillColor = self.component['sparkLine-fill-color'].split(',')[0];
|
|
193
|
-
break;
|
|
194
|
-
case 'pie':
|
|
195
|
-
case 'donut':
|
|
196
|
-
case 'bar':
|
|
197
|
-
fillColor = self.component['sparkLine-fill-color'].split(',');
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
// values
|
|
202
|
-
container.querySelector('.sparkline-container').innerHTML = "<span class=\"line\">".concat(self.parseTpl(self.component['sparkLine-value'], {
|
|
203
|
-
data: self.rootValue
|
|
204
|
-
}), "</span>");
|
|
205
|
-
try {
|
|
206
|
-
// @ts-ignore
|
|
207
|
-
$(container).find('.line').peity(sparkLineType, {
|
|
208
|
-
fill: fillColor,
|
|
209
|
-
height: self.component['sparkLine-height'],
|
|
210
|
-
max: self.component['sparkLine-max-value-count'],
|
|
211
|
-
min: 0,
|
|
212
|
-
stroke: self.component['sparkLine-stroke-color'],
|
|
213
|
-
strokeWidth: 2,
|
|
214
|
-
width: self.component['sparkLine-width']
|
|
215
|
-
});
|
|
216
|
-
self.isLoadingSparkLine = false;
|
|
217
|
-
} catch (e) {
|
|
218
|
-
container.querySelectorAll(".line").forEach(function (e) {
|
|
219
|
-
return peity(e, sparkLineType, {
|
|
220
|
-
fill: fillColor,
|
|
221
|
-
height: self.component['sparkLine-height'],
|
|
222
|
-
max: self.component['sparkLine-max-value-count'],
|
|
223
|
-
min: 0,
|
|
224
|
-
stroke: self.component['sparkLine-stroke-color'],
|
|
225
|
-
strokeWidth: 2,
|
|
226
|
-
width: self.component['sparkLine-width']
|
|
227
|
-
});
|
|
228
|
-
});
|
|
229
|
-
self.isLoadingSparkLine = false;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
238
|
+
self.resetSparkLine();
|
|
232
239
|
} catch (e) {
|
|
233
240
|
console.log(e);
|
|
234
241
|
}
|
|
@@ -20,9 +20,9 @@ exports.default = void 0;
|
|
|
20
20
|
require("core-js/modules/es.regexp.exec.js");
|
|
21
21
|
require("core-js/modules/es.string.replace.js");
|
|
22
22
|
require("core-js/modules/es.string.trim.js");
|
|
23
|
+
require("core-js/modules/es.array.find.js");
|
|
23
24
|
require("core-js/modules/es.object.to-string.js");
|
|
24
25
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
25
|
-
require("core-js/modules/es.array.find.js");
|
|
26
26
|
require("core-js/modules/es.array.concat.js");
|
|
27
27
|
require("core-js/modules/es.object.get-prototype-of.js");
|
|
28
28
|
var _Field = _interopRequireDefault(require("../_classes/field/Field"));
|
|
@@ -136,6 +136,65 @@ var DataChinaGridRow = /*#__PURE__*/function (_Component) {
|
|
|
136
136
|
value: function getValue() {
|
|
137
137
|
return this.component.field;
|
|
138
138
|
}
|
|
139
|
+
}, {
|
|
140
|
+
key: "resetSparkLine",
|
|
141
|
+
value: function resetSparkLine() {
|
|
142
|
+
var self = this;
|
|
143
|
+
var container = this.element.querySelector('.data-container');
|
|
144
|
+
if (self.component['enable-sparkline']) {
|
|
145
|
+
if (self.isLoadingSparkLine) {
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
self.isLoadingSparkLine = true;
|
|
149
|
+
var sparkLineType = this.component['sparkLine-type'] || 'line';
|
|
150
|
+
var fillColor;
|
|
151
|
+
if (self.component['sparkLine-fill-color']) {
|
|
152
|
+
switch (sparkLineType) {
|
|
153
|
+
case 'line':
|
|
154
|
+
fillColor = self.component['sparkLine-fill-color'].split(',')[0];
|
|
155
|
+
break;
|
|
156
|
+
case 'pie':
|
|
157
|
+
case 'donut':
|
|
158
|
+
case 'bar':
|
|
159
|
+
fillColor = self.component['sparkLine-fill-color'].split(',');
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// values
|
|
164
|
+
container.querySelector('.sparkline-container').innerHTML = "<span class=\"line\">".concat(self.parseTpl(self.component['sparkLine-value'], {
|
|
165
|
+
data: self.rootValue
|
|
166
|
+
}), "</span>");
|
|
167
|
+
// 宽度计算
|
|
168
|
+
var parentWidth = container.querySelector('#sparkline-container-parent').offsetWidth;
|
|
169
|
+
parentWidth = parentWidth * self.component['sparkLine-width'];
|
|
170
|
+
try {
|
|
171
|
+
// @ts-ignore
|
|
172
|
+
(0, _jquery.default)(container).find('.line').peity(sparkLineType, {
|
|
173
|
+
fill: fillColor,
|
|
174
|
+
height: self.component['sparkLine-height'],
|
|
175
|
+
max: self.component['sparkLine-max-value-count'],
|
|
176
|
+
min: 0,
|
|
177
|
+
stroke: self.component['sparkLine-stroke-color'],
|
|
178
|
+
strokeWidth: 2,
|
|
179
|
+
width: parentWidth
|
|
180
|
+
});
|
|
181
|
+
self.isLoadingSparkLine = false;
|
|
182
|
+
} catch (e) {
|
|
183
|
+
container.querySelectorAll(".line").forEach(function (e) {
|
|
184
|
+
return peity(e, sparkLineType, {
|
|
185
|
+
fill: fillColor,
|
|
186
|
+
height: self.component['sparkLine-height'],
|
|
187
|
+
max: self.component['sparkLine-max-value-count'],
|
|
188
|
+
min: 0,
|
|
189
|
+
stroke: self.component['sparkLine-stroke-color'],
|
|
190
|
+
strokeWidth: 2,
|
|
191
|
+
width: parentWidth
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
self.isLoadingSparkLine = false;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
139
198
|
|
|
140
199
|
/**
|
|
141
200
|
* Set the value of the component into the dom elements.
|
|
@@ -180,59 +239,7 @@ var DataChinaGridRow = /*#__PURE__*/function (_Component) {
|
|
|
180
239
|
});
|
|
181
240
|
}
|
|
182
241
|
// 图标
|
|
183
|
-
|
|
184
|
-
if (self.isLoadingSparkLine) {
|
|
185
|
-
return true;
|
|
186
|
-
}
|
|
187
|
-
self.isLoadingSparkLine = true;
|
|
188
|
-
var sparkLineType = this.component['sparkLine-type'] || 'line';
|
|
189
|
-
var fillColor;
|
|
190
|
-
if (self.component['sparkLine-fill-color']) {
|
|
191
|
-
switch (sparkLineType) {
|
|
192
|
-
case 'line':
|
|
193
|
-
fillColor = self.component['sparkLine-fill-color'].split(',')[0];
|
|
194
|
-
break;
|
|
195
|
-
case 'pie':
|
|
196
|
-
case 'donut':
|
|
197
|
-
case 'bar':
|
|
198
|
-
fillColor = self.component['sparkLine-fill-color'].split(',');
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
// values
|
|
203
|
-
container.querySelector('.sparkline-container').innerHTML = "<span class=\"line\">".concat(self.parseTpl(self.component['sparkLine-value'], {
|
|
204
|
-
data: self.rootValue
|
|
205
|
-
}), "</span>");
|
|
206
|
-
// 宽度计算
|
|
207
|
-
var parentWidth = container.querySelector('#sparkline-container-parent').offsetWidth;
|
|
208
|
-
parentWidth = parentWidth * self.component['sparkLine-width'];
|
|
209
|
-
try {
|
|
210
|
-
// @ts-ignore
|
|
211
|
-
(0, _jquery.default)(container).find('.line').peity(sparkLineType, {
|
|
212
|
-
fill: fillColor,
|
|
213
|
-
height: self.component['sparkLine-height'],
|
|
214
|
-
max: self.component['sparkLine-max-value-count'],
|
|
215
|
-
min: 0,
|
|
216
|
-
stroke: self.component['sparkLine-stroke-color'],
|
|
217
|
-
strokeWidth: 2,
|
|
218
|
-
width: parentWidth
|
|
219
|
-
});
|
|
220
|
-
self.isLoadingSparkLine = false;
|
|
221
|
-
} catch (e) {
|
|
222
|
-
container.querySelectorAll(".line").forEach(function (e) {
|
|
223
|
-
return peity(e, sparkLineType, {
|
|
224
|
-
fill: fillColor,
|
|
225
|
-
height: self.component['sparkLine-height'],
|
|
226
|
-
max: self.component['sparkLine-max-value-count'],
|
|
227
|
-
min: 0,
|
|
228
|
-
stroke: self.component['sparkLine-stroke-color'],
|
|
229
|
-
strokeWidth: 2,
|
|
230
|
-
width: parentWidth
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
self.isLoadingSparkLine = false;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
242
|
+
self.resetSparkLine();
|
|
236
243
|
} catch (e) {
|
|
237
244
|
console.log(e);
|
|
238
245
|
}
|