@formio/js 5.0.0-rc.40 → 5.0.0-rc.41
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.js +54 -10
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +3 -3
- package/dist/formio.full.js +54 -10
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +3 -3
- package/dist/formio.js +76 -4
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +13 -1
- package/dist/formio.utils.js +46 -2
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/lib/cjs/Embed.js +11 -11
- package/lib/cjs/providers/storage/util.js +2 -2
- package/lib/cjs/utils/conditionOperators/IsEqualTo.js +1 -1
- package/lib/mjs/utils/conditionOperators/IsEqualTo.js +1 -1
- package/package.json +8 -8
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */
|
16
16
|
|
17
|
-
/*! formiojs v5.0.0-rc.
|
17
|
+
/*! formiojs v5.0.0-rc.41 | https://unpkg.com/formiojs@5.0.0-rc.41/LICENSE.txt */
|
18
18
|
|
19
19
|
/**
|
20
20
|
* @license
|
package/lib/cjs/Embed.js
CHANGED
@@ -88,8 +88,8 @@ class Formio {
|
|
88
88
|
});
|
89
89
|
return element;
|
90
90
|
}
|
91
|
-
static addScript(
|
92
|
-
return __awaiter(this,
|
91
|
+
static addScript(wrapper, src, name, flag = '') {
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
93
93
|
if (!src) {
|
94
94
|
return Promise.resolve();
|
95
95
|
}
|
@@ -229,8 +229,8 @@ class Formio {
|
|
229
229
|
});
|
230
230
|
}
|
231
231
|
// eslint-disable-next-line max-statements
|
232
|
-
static init(
|
233
|
-
return __awaiter(this,
|
232
|
+
static init(element, options = {}, builder = false) {
|
233
|
+
return __awaiter(this, void 0, void 0, function* () {
|
234
234
|
_a.cdn = new CDN_js_1.default(_a.config.cdn, _a.config.cdnUrls || {});
|
235
235
|
_a.config.libs = _a.config.libs || {
|
236
236
|
uswds: {
|
@@ -334,8 +334,8 @@ class Formio {
|
|
334
334
|
});
|
335
335
|
}
|
336
336
|
// Create a new form.
|
337
|
-
static createForm(
|
338
|
-
return __awaiter(this,
|
337
|
+
static createForm(element, form, options = {}) {
|
338
|
+
return __awaiter(this, void 0, void 0, function* () {
|
339
339
|
if (_a.FormioClass) {
|
340
340
|
return _a.FormioClass.createForm(element, form, Object.assign(Object.assign({}, options), { noLoader: true }));
|
341
341
|
}
|
@@ -353,10 +353,10 @@ class Formio {
|
|
353
353
|
});
|
354
354
|
}
|
355
355
|
// Create a form builder.
|
356
|
-
static builder(
|
357
|
-
|
358
|
-
|
359
|
-
if ((
|
356
|
+
static builder(element, form, options = {}) {
|
357
|
+
var _b;
|
358
|
+
return __awaiter(this, void 0, void 0, function* () {
|
359
|
+
if ((_b = _a.FormioClass) === null || _b === void 0 ? void 0 : _b.builder) {
|
360
360
|
return _a.FormioClass.builder(element, form, options);
|
361
361
|
}
|
362
362
|
const wrapper = yield _a.init(element, options, true);
|
@@ -381,7 +381,7 @@ Formio.formioReady = new Promise((ready, reject) => {
|
|
381
381
|
Formio.version = 'FORMIO_VERSION';
|
382
382
|
// Create a report.
|
383
383
|
Formio.Report = {
|
384
|
-
create: (
|
384
|
+
create: (element, submission, options = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
385
385
|
var _b;
|
386
386
|
if ((_b = _a.FormioClass) === null || _b === void 0 ? void 0 : _b.Report) {
|
387
387
|
return _a.FormioClass.Report.create(element, submission, options);
|
@@ -10,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
exports.withRetries = void 0;
|
13
|
-
function withRetries(
|
14
|
-
return __awaiter(this,
|
13
|
+
function withRetries(fn, args, retries = 3, err = null) {
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
15
15
|
if (!retries) {
|
16
16
|
throw new Error(err);
|
17
17
|
}
|
@@ -15,7 +15,7 @@ class IsEqualTo extends ConditionOperator_1.default {
|
|
15
15
|
}
|
16
16
|
execute({ value, comparedValue, instance, conditionComponentPath }) {
|
17
17
|
var _a;
|
18
|
-
if (value && comparedValue && typeof value !== typeof comparedValue && lodash_1.default.isString(comparedValue)) {
|
18
|
+
if ((value || value === false) && comparedValue && typeof value !== typeof comparedValue && lodash_1.default.isString(comparedValue)) {
|
19
19
|
try {
|
20
20
|
comparedValue = JSON.parse(comparedValue);
|
21
21
|
}
|
@@ -9,7 +9,7 @@ export default class IsEqualTo extends ConditionOperator {
|
|
9
9
|
return 'Is Equal To';
|
10
10
|
}
|
11
11
|
execute({ value, comparedValue, instance, conditionComponentPath }) {
|
12
|
-
if (value && comparedValue && typeof value !== typeof comparedValue && _.isString(comparedValue)) {
|
12
|
+
if ((value || value === false) && comparedValue && typeof value !== typeof comparedValue && _.isString(comparedValue)) {
|
13
13
|
try {
|
14
14
|
comparedValue = JSON.parse(comparedValue);
|
15
15
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@formio/js",
|
3
|
-
"version": "5.0.0-rc.
|
3
|
+
"version": "5.0.0-rc.41",
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
5
5
|
"main": "lib/cjs/index.js",
|
6
6
|
"exports": {
|
@@ -84,9 +84,9 @@
|
|
84
84
|
},
|
85
85
|
"homepage": "https://github.com/formio/formio.js#readme",
|
86
86
|
"dependencies": {
|
87
|
-
"@formio/bootstrap": "^3.0.0-rc.
|
87
|
+
"@formio/bootstrap": "^3.0.0-rc.21",
|
88
88
|
"@formio/choices.js": "^10.2.1",
|
89
|
-
"@formio/core": "^2.0.0-rc.
|
89
|
+
"@formio/core": "^2.0.0-rc.18",
|
90
90
|
"@formio/text-mask-addons": "^3.8.0-formio.2",
|
91
91
|
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
|
92
92
|
"abortcontroller-polyfill": "^1.7.5",
|
@@ -115,15 +115,15 @@
|
|
115
115
|
"moment": "^2.29.4",
|
116
116
|
"moment-timezone": "^0.5.44",
|
117
117
|
"quill": "^2.0.0-dev.3",
|
118
|
-
"signature_pad": "^4.
|
118
|
+
"signature_pad": "^4.2.0",
|
119
119
|
"string-hash": "^1.1.3",
|
120
120
|
"tippy.js": "^6.3.7",
|
121
121
|
"uuid": "^9.0.0",
|
122
122
|
"vanilla-picker": "^2.12.2"
|
123
123
|
},
|
124
124
|
"devDependencies": {
|
125
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
126
|
-
"@typescript-eslint/parser": "^7.
|
125
|
+
"@typescript-eslint/eslint-plugin": "^7.3.0",
|
126
|
+
"@typescript-eslint/parser": "^7.3.0",
|
127
127
|
"ace-builds": "1.32.7",
|
128
128
|
"async-limiter": "^2.0.0",
|
129
129
|
"bootstrap-icons": "^1.10.5",
|
@@ -170,13 +170,13 @@
|
|
170
170
|
"pretty": "^2.0.0",
|
171
171
|
"pygments-css": "^1.0.0",
|
172
172
|
"raw-loader": "^4.0.2",
|
173
|
-
"sass": "^1.
|
173
|
+
"sass": "^1.72.0",
|
174
174
|
"shortcut-buttons-flatpickr": "^0.4.0",
|
175
175
|
"sinon": "^17.0.1",
|
176
176
|
"string-replace-loader": "^3.1.0",
|
177
177
|
"ts-loader": "^9.4.4",
|
178
178
|
"ts-node": "^10.9.1",
|
179
|
-
"typescript": "
|
179
|
+
"typescript": "5.3.3",
|
180
180
|
"webpack": "^5.90.3",
|
181
181
|
"webpack-bundle-analyzer": "^4.9.0",
|
182
182
|
"webpack-cli": "^5.1.1",
|