formiojs-eorion 0.1.12 → 0.1.14
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/ActionButton/ActionButton.js +0 -4
- package/components/ActionButton/editForm/ActionButton.edit.display.js +10 -4
- package/components/CustomTabs/Tabs.js +2 -1
- package/components/button/Button.js +14 -0
- package/components/iconButton/IconButton.js +0 -1
- package/components/tabs/Tabs.js +4 -1
- package/components/well/Well.js +33 -1
- package/components/well/editForm/Well.edit.display.js +9 -0
- package/dist/formio.contrib.js +3 -3
- 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 +10 -10
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.js +10 -10
- 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/templates/bootstrap/well/form.ejs.js +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.14';
|
|
1728
1728
|
Formio.pathType = '';
|
|
1729
1729
|
Formio.events = new _EventEmitter.default();
|
|
1730
1730
|
Formio.cdn = new _CDN.default();
|
|
@@ -59,13 +59,9 @@ var ActionButton = /*#__PURE__*/function (_Button) {
|
|
|
59
59
|
page: component.page
|
|
60
60
|
};
|
|
61
61
|
var id = (0, _jquery.default)(this.element).attr("id");
|
|
62
|
-
// setTimeout(() => {
|
|
63
62
|
var element = (0, _jquery.default)("#".concat(id));
|
|
64
|
-
//let element = $(this.element);
|
|
65
63
|
element.attr("setting", JSON.stringify(setting));
|
|
66
64
|
element.data("setting", "setting");
|
|
67
|
-
element.attr("test", "test");
|
|
68
|
-
//}, 1000);
|
|
69
65
|
return result;
|
|
70
66
|
}
|
|
71
67
|
}], [{
|
|
@@ -34,6 +34,12 @@ var _default = [{
|
|
|
34
34
|
}, {
|
|
35
35
|
label: 'Open URL',
|
|
36
36
|
value: 'openUrl'
|
|
37
|
+
}, {
|
|
38
|
+
label: '打开弹窗',
|
|
39
|
+
value: 'bottomSheet'
|
|
40
|
+
}, {
|
|
41
|
+
label: '打开网址',
|
|
42
|
+
value: 'newIntent'
|
|
37
43
|
}]
|
|
38
44
|
}
|
|
39
45
|
}, {
|
|
@@ -133,9 +139,9 @@ var _default = [{
|
|
|
133
139
|
placeholder: 'https://example.form.io',
|
|
134
140
|
conditional: {
|
|
135
141
|
json: {
|
|
136
|
-
|
|
142
|
+
in: [{
|
|
137
143
|
var: 'data.action'
|
|
138
|
-
}, 'openUrl']
|
|
144
|
+
}, ['openUrl', 'newIntent']]
|
|
139
145
|
}
|
|
140
146
|
}
|
|
141
147
|
}, {
|
|
@@ -148,9 +154,9 @@ var _default = [{
|
|
|
148
154
|
weight: 140,
|
|
149
155
|
conditional: {
|
|
150
156
|
json: {
|
|
151
|
-
|
|
157
|
+
in: [{
|
|
152
158
|
var: 'data.action'
|
|
153
|
-
}, 'openPage']
|
|
159
|
+
}, ['openPage', 'bottomSheet']]
|
|
154
160
|
}
|
|
155
161
|
}
|
|
156
162
|
}, {
|
|
@@ -328,7 +328,8 @@ var CustomTabsComponent = /*#__PURE__*/function (_NestedComponent) {
|
|
|
328
328
|
// 切换tab时,刷新taskCalendar组件,修复taskCalendar在tab中高度错乱的问题
|
|
329
329
|
if (this.tabs[this.currentTab] && this.tabs[this.currentTab].length > 0) {
|
|
330
330
|
this.tabs[this.currentTab].forEach(function (item, index) {
|
|
331
|
-
|
|
331
|
+
// tab切换后刷新下面的组件
|
|
332
|
+
if (['echarts', 'taskCalendar', 'flex'].includes(item.type)) {
|
|
332
333
|
_this11.tabs[_this11.currentTab][index].refresh(new Date().getTime());
|
|
333
334
|
}
|
|
334
335
|
if (['data_china_grid_row', 'data_china_grid'].includes(item.type)) {
|
|
@@ -417,6 +417,20 @@ var ButtonComponent = /*#__PURE__*/function (_Field) {
|
|
|
417
417
|
}
|
|
418
418
|
this.openOauth(this.oauthConfig);
|
|
419
419
|
break;
|
|
420
|
+
case 'openPage':
|
|
421
|
+
window.openNewPage(this.component['page']);
|
|
422
|
+
break;
|
|
423
|
+
case 'bottomSheet':
|
|
424
|
+
window.openBottomSheet(this.component['page']);
|
|
425
|
+
break;
|
|
426
|
+
case 'newIntent':
|
|
427
|
+
var elink = document.createElement('a');
|
|
428
|
+
elink.style.display = 'none';
|
|
429
|
+
elink.target = "_blank";
|
|
430
|
+
elink.href = this.component["url"];
|
|
431
|
+
document.body.appendChild(elink);
|
|
432
|
+
elink.click();
|
|
433
|
+
break;
|
|
420
434
|
}
|
|
421
435
|
}
|
|
422
436
|
}, {
|
package/components/tabs/Tabs.js
CHANGED
|
@@ -258,9 +258,12 @@ var TabsComponent = /*#__PURE__*/function (_NestedComponent) {
|
|
|
258
258
|
// 切换tab时,刷新taskCalendar组件,修复taskCalendar在tab中高度错乱的问题
|
|
259
259
|
if (this.tabs[this.currentTab] && this.tabs[this.currentTab].length > 0) {
|
|
260
260
|
this.tabs[this.currentTab].forEach(function (item, index) {
|
|
261
|
-
if (['echarts', 'taskCalendar'].includes(item.type)) {
|
|
261
|
+
if (['echarts', 'taskCalendar', 'flex'].includes(item.type)) {
|
|
262
262
|
_this9.tabs[_this9.currentTab][index].refresh(new Date().getTime());
|
|
263
263
|
}
|
|
264
|
+
if (['data_china_grid_row', 'data_china_grid'].includes(item.type)) {
|
|
265
|
+
_this9.tabs[_this9.currentTab][index].resetSparkLine();
|
|
266
|
+
}
|
|
264
267
|
});
|
|
265
268
|
}
|
|
266
269
|
this.clearErrorClasses(this.refs[this.tabLinkKey]);
|
package/components/well/Well.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
require("core-js/modules/es.
|
|
4
|
+
require("core-js/modules/es.reflect.get.js");
|
|
5
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
5
6
|
require("core-js/modules/es.reflect.construct.js");
|
|
6
7
|
require("core-js/modules/es.symbol.to-primitive.js");
|
|
7
8
|
require("core-js/modules/es.date.to-primitive.js");
|
|
@@ -17,8 +18,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
17
18
|
});
|
|
18
19
|
exports.default = void 0;
|
|
19
20
|
require("core-js/modules/es.array.concat.js");
|
|
21
|
+
require("core-js/modules/es.string.trim.js");
|
|
22
|
+
require("core-js/modules/es.object.to-string.js");
|
|
23
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
20
24
|
require("core-js/modules/es.object.get-prototype-of.js");
|
|
21
25
|
var _NestedComponent2 = _interopRequireDefault(require("../_classes/nested/NestedComponent"));
|
|
26
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
22
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24
29
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
@@ -31,6 +36,8 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
31
36
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
32
37
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
38
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
|
+
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
40
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
34
41
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
35
42
|
var WellComponent = /*#__PURE__*/function (_NestedComponent) {
|
|
36
43
|
_inherits(WellComponent, _NestedComponent);
|
|
@@ -46,6 +53,31 @@ var WellComponent = /*#__PURE__*/function (_NestedComponent) {
|
|
|
46
53
|
return _this;
|
|
47
54
|
}
|
|
48
55
|
_createClass(WellComponent, [{
|
|
56
|
+
key: "attach",
|
|
57
|
+
value: function attach(element) {
|
|
58
|
+
var _this2 = this;
|
|
59
|
+
var refs = {
|
|
60
|
+
wellCardContainer: 'single'
|
|
61
|
+
};
|
|
62
|
+
this.loadRefs(element, refs);
|
|
63
|
+
if (this.refs.wellCardContainer) {
|
|
64
|
+
if (!this.component['custom-style'] || this.component['custom-style'] && this.component['custom-style'].trim().length === 0) {
|
|
65
|
+
// 没有设置自定义样式
|
|
66
|
+
this.refs.wellCardContainer.classList.add("bg-light");
|
|
67
|
+
this.refs.wellCardContainer.classList.add("mb-3");
|
|
68
|
+
} else {
|
|
69
|
+
// 设置card样式
|
|
70
|
+
try {
|
|
71
|
+
var customStyle = JSON.parse(this.component['custom-style'] || '{}');
|
|
72
|
+
_lodash.default.forEach(customStyle, function (value, key) {
|
|
73
|
+
_this2.refs.wellCardContainer.style[key] = value;
|
|
74
|
+
});
|
|
75
|
+
} catch (e) {}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return _get(_getPrototypeOf(WellComponent.prototype), "attach", this).call(this, element);
|
|
79
|
+
}
|
|
80
|
+
}, {
|
|
49
81
|
key: "defaultSchema",
|
|
50
82
|
get: function get() {
|
|
51
83
|
return WellComponent.schema();
|
|
@@ -5,6 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _default = [{
|
|
8
|
+
type: 'textarea',
|
|
9
|
+
label: '自定义样式',
|
|
10
|
+
key: 'custom-style',
|
|
11
|
+
editor: 'ace',
|
|
12
|
+
input: true,
|
|
13
|
+
weight: 1,
|
|
14
|
+
defaultValue: "{}",
|
|
15
|
+
tooltip: '自定义的style:json格式,ex:{"border":"none","border-radius":"30px"}'
|
|
16
|
+
}, {
|
|
8
17
|
key: 'labelPosition',
|
|
9
18
|
ignore: true
|
|
10
19
|
}, {
|