@formio/js 5.3.1 → 5.3.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/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 +33 -24
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +2 -4
- package/dist/formio.full.js +35 -26
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +2 -4
- package/dist/formio.js +30 -10
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +2 -2
- package/dist/formio.utils.js +29 -20
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +2 -4
- package/lib/cjs/Embed.js +29 -1
- package/lib/cjs/Formio.js +1 -1
- package/lib/cjs/Webform.js +26 -0
- package/lib/cjs/components/datetime/editForm/DateTime.edit.date.d.ts +18 -1
- package/lib/cjs/components/datetime/editForm/DateTime.edit.date.js +3 -0
- package/lib/cjs/components/datetime/editForm/DateTime.edit.time.d.ts +13 -2
- package/lib/cjs/components/datetime/editForm/DateTime.edit.time.js +3 -0
- package/lib/cjs/package.json +1 -1
- package/lib/mjs/Embed.js +29 -1
- package/lib/mjs/Formio.js +1 -1
- package/lib/mjs/Webform.js +26 -0
- package/lib/mjs/components/datetime/editForm/DateTime.edit.date.d.ts +18 -1
- package/lib/mjs/components/datetime/editForm/DateTime.edit.date.js +3 -0
- package/lib/mjs/components/datetime/editForm/DateTime.edit.time.d.ts +13 -2
- package/lib/mjs/components/datetime/editForm/DateTime.edit.time.js +3 -0
- package/lib/mjs/package.json +1 -1
- package/package.json +4 -4
|
@@ -18,11 +18,9 @@
|
|
|
18
18
|
* MIT licensed
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
/*! @license DOMPurify 3.
|
|
21
|
+
/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */
|
|
22
22
|
|
|
23
|
-
/*!
|
|
24
|
-
|
|
25
|
-
/*! formiojs v5.3.1 | https://unpkg.com/formiojs@5.3.1/LICENSE.txt */
|
|
23
|
+
/*! formiojs v5.3.2 | https://unpkg.com/formiojs@5.3.2/LICENSE.txt */
|
|
26
24
|
|
|
27
25
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
28
26
|
|
package/lib/cjs/Embed.js
CHANGED
|
@@ -154,6 +154,34 @@ class Formio {
|
|
|
154
154
|
if (successMessage && successMessage.toLowerCase() !== 'false' && instance.element) {
|
|
155
155
|
instance.element.innerHTML = `<div class="alert-success" role="alert">${successMessage}</div>`;
|
|
156
156
|
}
|
|
157
|
+
const announcementMessage = successMessage && successMessage.toLowerCase() !== 'false'
|
|
158
|
+
? successMessage
|
|
159
|
+
: 'Form submission complete';
|
|
160
|
+
let liveRegion = document.getElementById('formio-announcements');
|
|
161
|
+
if (!liveRegion) {
|
|
162
|
+
liveRegion = _a.createElement('div', {
|
|
163
|
+
id: 'formio-announcements',
|
|
164
|
+
'role': 'status',
|
|
165
|
+
'aria-live': 'polite',
|
|
166
|
+
'aria-atomic': 'true',
|
|
167
|
+
style: 'position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0);'
|
|
168
|
+
});
|
|
169
|
+
document.body.appendChild(liveRegion);
|
|
170
|
+
}
|
|
171
|
+
// Announce the submission completion using VPAT clear-and-reset technique
|
|
172
|
+
liveRegion.textContent = '';
|
|
173
|
+
liveRegion.setAttribute('aria-live', 'off');
|
|
174
|
+
requestAnimationFrame(() => {
|
|
175
|
+
setTimeout(() => {
|
|
176
|
+
liveRegion.setAttribute('aria-live', 'polite');
|
|
177
|
+
liveRegion.textContent = announcementMessage;
|
|
178
|
+
setTimeout(() => {
|
|
179
|
+
if (liveRegion) {
|
|
180
|
+
liveRegion.textContent = '';
|
|
181
|
+
}
|
|
182
|
+
}, 1000);
|
|
183
|
+
}, 100);
|
|
184
|
+
});
|
|
157
185
|
let returnUrl = _a.config.redirect;
|
|
158
186
|
// Allow form based configuration for return url.
|
|
159
187
|
if (!returnUrl &&
|
|
@@ -453,7 +481,7 @@ Formio.formioReady = new Promise((ready, reject) => {
|
|
|
453
481
|
_a._formioReady = ready;
|
|
454
482
|
_a._formioReadyReject = reject;
|
|
455
483
|
});
|
|
456
|
-
Formio.version = '5.3.
|
|
484
|
+
Formio.version = '5.3.2';
|
|
457
485
|
// Create a report.
|
|
458
486
|
Formio.Report = {
|
|
459
487
|
create: (element, submission, options = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
package/lib/cjs/Formio.js
CHANGED
|
@@ -11,7 +11,7 @@ const CDN_1 = __importDefault(require("./CDN"));
|
|
|
11
11
|
const providers_1 = __importDefault(require("./providers"));
|
|
12
12
|
sdk_1.Formio.cdn = new CDN_1.default();
|
|
13
13
|
sdk_1.Formio.Providers = providers_1.default;
|
|
14
|
-
sdk_1.Formio.version = '5.3.
|
|
14
|
+
sdk_1.Formio.version = '5.3.2';
|
|
15
15
|
CDN_1.default.defaultCDN = sdk_1.Formio.version.includes('rc')
|
|
16
16
|
? 'https://cdn.test-form.io'
|
|
17
17
|
: 'https://cdn.form.io';
|
package/lib/cjs/Webform.js
CHANGED
|
@@ -1130,6 +1130,32 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
1130
1130
|
if (this.draftEnabled && ((_a = this.triggerSaveDraft) === null || _a === void 0 ? void 0 : _a.cancel)) {
|
|
1131
1131
|
this.triggerSaveDraft.cancel();
|
|
1132
1132
|
}
|
|
1133
|
+
if (typeof document !== 'undefined' && document.body) {
|
|
1134
|
+
const announcementMessage = this.t ? this.t('complete') : 'Form submission complete';
|
|
1135
|
+
// Get or create ARIA live region for announcements
|
|
1136
|
+
let liveRegion = document.getElementById('formio-announcements');
|
|
1137
|
+
if (!liveRegion) {
|
|
1138
|
+
liveRegion = document.createElement('div');
|
|
1139
|
+
liveRegion.id = 'formio-announcements';
|
|
1140
|
+
liveRegion.setAttribute('role', 'status');
|
|
1141
|
+
liveRegion.setAttribute('aria-live', 'polite');
|
|
1142
|
+
liveRegion.setAttribute('aria-atomic', 'true');
|
|
1143
|
+
liveRegion.style.cssText = 'position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0);';
|
|
1144
|
+
document.body.appendChild(liveRegion);
|
|
1145
|
+
}
|
|
1146
|
+
// Announce the submission completion using VPAT clear-and-reset technique
|
|
1147
|
+
liveRegion.textContent = '';
|
|
1148
|
+
liveRegion.setAttribute('aria-live', 'off');
|
|
1149
|
+
requestAnimationFrame(() => {
|
|
1150
|
+
setTimeout(() => {
|
|
1151
|
+
liveRegion.setAttribute('aria-live', 'polite');
|
|
1152
|
+
liveRegion.textContent = announcementMessage;
|
|
1153
|
+
setTimeout(() => {
|
|
1154
|
+
liveRegion.textContent = '';
|
|
1155
|
+
}, 1000);
|
|
1156
|
+
}, 100);
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1133
1159
|
this.emit('submit', submission, saved);
|
|
1134
1160
|
if (saved) {
|
|
1135
1161
|
this.emit('submitDone', submission);
|
|
@@ -5,8 +5,10 @@ declare const _default: ({
|
|
|
5
5
|
label: string;
|
|
6
6
|
weight: number;
|
|
7
7
|
tooltip: string;
|
|
8
|
+
validate: {
|
|
9
|
+
custom: string;
|
|
10
|
+
};
|
|
8
11
|
placeholder?: undefined;
|
|
9
|
-
validate?: undefined;
|
|
10
12
|
title?: undefined;
|
|
11
13
|
collapsible?: undefined;
|
|
12
14
|
collapsed?: undefined;
|
|
@@ -57,7 +59,22 @@ declare const _default: ({
|
|
|
57
59
|
label?: undefined;
|
|
58
60
|
weight?: undefined;
|
|
59
61
|
tooltip?: undefined;
|
|
62
|
+
validate?: undefined;
|
|
60
63
|
placeholder?: undefined;
|
|
64
|
+
} | {
|
|
65
|
+
type: string;
|
|
66
|
+
input: boolean;
|
|
67
|
+
key: string;
|
|
68
|
+
label: string;
|
|
69
|
+
tooltip: string;
|
|
70
|
+
weight: number;
|
|
61
71
|
validate?: undefined;
|
|
72
|
+
placeholder?: undefined;
|
|
73
|
+
title?: undefined;
|
|
74
|
+
collapsible?: undefined;
|
|
75
|
+
collapsed?: undefined;
|
|
76
|
+
style?: undefined;
|
|
77
|
+
customConditional?: undefined;
|
|
78
|
+
components?: undefined;
|
|
62
79
|
})[];
|
|
63
80
|
export default _default;
|
|
@@ -13,6 +13,9 @@ exports.default = [
|
|
|
13
13
|
label: 'Enable Date Input',
|
|
14
14
|
weight: 0,
|
|
15
15
|
tooltip: 'Enables date input for this field.',
|
|
16
|
+
validate: {
|
|
17
|
+
custom: "valid = !data.enableTime && !input ? 'Cannot disable both Date and Time inputs at the same time' : true",
|
|
18
|
+
},
|
|
16
19
|
},
|
|
17
20
|
{
|
|
18
21
|
type: 'tags',
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
declare const _default: {
|
|
1
|
+
declare const _default: ({
|
|
2
2
|
type: string;
|
|
3
3
|
input: boolean;
|
|
4
4
|
key: string;
|
|
5
5
|
label: string;
|
|
6
6
|
tooltip: string;
|
|
7
7
|
weight: number;
|
|
8
|
-
|
|
8
|
+
validate: {
|
|
9
|
+
custom: string;
|
|
10
|
+
};
|
|
11
|
+
} | {
|
|
12
|
+
type: string;
|
|
13
|
+
input: boolean;
|
|
14
|
+
key: string;
|
|
15
|
+
label: string;
|
|
16
|
+
tooltip: string;
|
|
17
|
+
weight: number;
|
|
18
|
+
validate?: undefined;
|
|
19
|
+
})[];
|
|
9
20
|
export default _default;
|
|
@@ -8,6 +8,9 @@ exports.default = [
|
|
|
8
8
|
label: 'Enable Time Input',
|
|
9
9
|
tooltip: 'Enables time input for this field.',
|
|
10
10
|
weight: 0,
|
|
11
|
+
validate: {
|
|
12
|
+
custom: "valid = !data.enableDate && !input ? 'Cannot disable both Date and Time inputs at the same time' : true",
|
|
13
|
+
},
|
|
11
14
|
},
|
|
12
15
|
{
|
|
13
16
|
type: 'number',
|
package/lib/cjs/package.json
CHANGED
package/lib/mjs/Embed.js
CHANGED
|
@@ -14,7 +14,7 @@ export class Formio {
|
|
|
14
14
|
Formio._formioReady = ready;
|
|
15
15
|
Formio._formioReadyReject = reject;
|
|
16
16
|
});
|
|
17
|
-
static version = '5.3.
|
|
17
|
+
static version = '5.3.2';
|
|
18
18
|
static setLicense(license, norecurse = false) {
|
|
19
19
|
Formio.license = license;
|
|
20
20
|
if (!norecurse && Formio.FormioClass) {
|
|
@@ -148,6 +148,34 @@ export class Formio {
|
|
|
148
148
|
if (successMessage && successMessage.toLowerCase() !== 'false' && instance.element) {
|
|
149
149
|
instance.element.innerHTML = `<div class="alert-success" role="alert">${successMessage}</div>`;
|
|
150
150
|
}
|
|
151
|
+
const announcementMessage = successMessage && successMessage.toLowerCase() !== 'false'
|
|
152
|
+
? successMessage
|
|
153
|
+
: 'Form submission complete';
|
|
154
|
+
let liveRegion = document.getElementById('formio-announcements');
|
|
155
|
+
if (!liveRegion) {
|
|
156
|
+
liveRegion = Formio.createElement('div', {
|
|
157
|
+
id: 'formio-announcements',
|
|
158
|
+
'role': 'status',
|
|
159
|
+
'aria-live': 'polite',
|
|
160
|
+
'aria-atomic': 'true',
|
|
161
|
+
style: 'position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0);'
|
|
162
|
+
});
|
|
163
|
+
document.body.appendChild(liveRegion);
|
|
164
|
+
}
|
|
165
|
+
// Announce the submission completion using VPAT clear-and-reset technique
|
|
166
|
+
liveRegion.textContent = '';
|
|
167
|
+
liveRegion.setAttribute('aria-live', 'off');
|
|
168
|
+
requestAnimationFrame(() => {
|
|
169
|
+
setTimeout(() => {
|
|
170
|
+
liveRegion.setAttribute('aria-live', 'polite');
|
|
171
|
+
liveRegion.textContent = announcementMessage;
|
|
172
|
+
setTimeout(() => {
|
|
173
|
+
if (liveRegion) {
|
|
174
|
+
liveRegion.textContent = '';
|
|
175
|
+
}
|
|
176
|
+
}, 1000);
|
|
177
|
+
}, 100);
|
|
178
|
+
});
|
|
151
179
|
let returnUrl = Formio.config.redirect;
|
|
152
180
|
// Allow form based configuration for return url.
|
|
153
181
|
if (!returnUrl &&
|
package/lib/mjs/Formio.js
CHANGED
|
@@ -4,7 +4,7 @@ import CDN from './CDN';
|
|
|
4
4
|
import Providers from './providers';
|
|
5
5
|
FormioCore.cdn = new CDN();
|
|
6
6
|
FormioCore.Providers = Providers;
|
|
7
|
-
FormioCore.version = '5.3.
|
|
7
|
+
FormioCore.version = '5.3.2';
|
|
8
8
|
CDN.defaultCDN = FormioCore.version.includes('rc')
|
|
9
9
|
? 'https://cdn.test-form.io'
|
|
10
10
|
: 'https://cdn.form.io';
|
package/lib/mjs/Webform.js
CHANGED
|
@@ -1120,6 +1120,32 @@ export default class Webform extends NestedDataComponent {
|
|
|
1120
1120
|
if (this.draftEnabled && this.triggerSaveDraft?.cancel) {
|
|
1121
1121
|
this.triggerSaveDraft.cancel();
|
|
1122
1122
|
}
|
|
1123
|
+
if (typeof document !== 'undefined' && document.body) {
|
|
1124
|
+
const announcementMessage = this.t ? this.t('complete') : 'Form submission complete';
|
|
1125
|
+
// Get or create ARIA live region for announcements
|
|
1126
|
+
let liveRegion = document.getElementById('formio-announcements');
|
|
1127
|
+
if (!liveRegion) {
|
|
1128
|
+
liveRegion = document.createElement('div');
|
|
1129
|
+
liveRegion.id = 'formio-announcements';
|
|
1130
|
+
liveRegion.setAttribute('role', 'status');
|
|
1131
|
+
liveRegion.setAttribute('aria-live', 'polite');
|
|
1132
|
+
liveRegion.setAttribute('aria-atomic', 'true');
|
|
1133
|
+
liveRegion.style.cssText = 'position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0);';
|
|
1134
|
+
document.body.appendChild(liveRegion);
|
|
1135
|
+
}
|
|
1136
|
+
// Announce the submission completion using VPAT clear-and-reset technique
|
|
1137
|
+
liveRegion.textContent = '';
|
|
1138
|
+
liveRegion.setAttribute('aria-live', 'off');
|
|
1139
|
+
requestAnimationFrame(() => {
|
|
1140
|
+
setTimeout(() => {
|
|
1141
|
+
liveRegion.setAttribute('aria-live', 'polite');
|
|
1142
|
+
liveRegion.textContent = announcementMessage;
|
|
1143
|
+
setTimeout(() => {
|
|
1144
|
+
liveRegion.textContent = '';
|
|
1145
|
+
}, 1000);
|
|
1146
|
+
}, 100);
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1123
1149
|
this.emit('submit', submission, saved);
|
|
1124
1150
|
if (saved) {
|
|
1125
1151
|
this.emit('submitDone', submission);
|
|
@@ -5,8 +5,10 @@ declare const _default: ({
|
|
|
5
5
|
label: string;
|
|
6
6
|
weight: number;
|
|
7
7
|
tooltip: string;
|
|
8
|
+
validate: {
|
|
9
|
+
custom: string;
|
|
10
|
+
};
|
|
8
11
|
placeholder?: undefined;
|
|
9
|
-
validate?: undefined;
|
|
10
12
|
title?: undefined;
|
|
11
13
|
collapsible?: undefined;
|
|
12
14
|
collapsed?: undefined;
|
|
@@ -57,7 +59,22 @@ declare const _default: ({
|
|
|
57
59
|
label?: undefined;
|
|
58
60
|
weight?: undefined;
|
|
59
61
|
tooltip?: undefined;
|
|
62
|
+
validate?: undefined;
|
|
60
63
|
placeholder?: undefined;
|
|
64
|
+
} | {
|
|
65
|
+
type: string;
|
|
66
|
+
input: boolean;
|
|
67
|
+
key: string;
|
|
68
|
+
label: string;
|
|
69
|
+
tooltip: string;
|
|
70
|
+
weight: number;
|
|
61
71
|
validate?: undefined;
|
|
72
|
+
placeholder?: undefined;
|
|
73
|
+
title?: undefined;
|
|
74
|
+
collapsible?: undefined;
|
|
75
|
+
collapsed?: undefined;
|
|
76
|
+
style?: undefined;
|
|
77
|
+
customConditional?: undefined;
|
|
78
|
+
components?: undefined;
|
|
62
79
|
})[];
|
|
63
80
|
export default _default;
|
|
@@ -8,6 +8,9 @@ export default [
|
|
|
8
8
|
label: 'Enable Date Input',
|
|
9
9
|
weight: 0,
|
|
10
10
|
tooltip: 'Enables date input for this field.',
|
|
11
|
+
validate: {
|
|
12
|
+
custom: "valid = !data.enableTime && !input ? 'Cannot disable both Date and Time inputs at the same time' : true",
|
|
13
|
+
},
|
|
11
14
|
},
|
|
12
15
|
{
|
|
13
16
|
type: 'tags',
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
declare const _default: {
|
|
1
|
+
declare const _default: ({
|
|
2
2
|
type: string;
|
|
3
3
|
input: boolean;
|
|
4
4
|
key: string;
|
|
5
5
|
label: string;
|
|
6
6
|
tooltip: string;
|
|
7
7
|
weight: number;
|
|
8
|
-
|
|
8
|
+
validate: {
|
|
9
|
+
custom: string;
|
|
10
|
+
};
|
|
11
|
+
} | {
|
|
12
|
+
type: string;
|
|
13
|
+
input: boolean;
|
|
14
|
+
key: string;
|
|
15
|
+
label: string;
|
|
16
|
+
tooltip: string;
|
|
17
|
+
weight: number;
|
|
18
|
+
validate?: undefined;
|
|
19
|
+
})[];
|
|
9
20
|
export default _default;
|
|
@@ -6,6 +6,9 @@ export default [
|
|
|
6
6
|
label: 'Enable Time Input',
|
|
7
7
|
tooltip: 'Enables time input for this field.',
|
|
8
8
|
weight: 0,
|
|
9
|
+
validate: {
|
|
10
|
+
custom: "valid = !data.enableDate && !input ? 'Cannot disable both Date and Time inputs at the same time' : true",
|
|
11
|
+
},
|
|
9
12
|
},
|
|
10
13
|
{
|
|
11
14
|
type: 'number',
|
package/lib/mjs/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formio/js",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.2",
|
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"core-js": "^3.37.1",
|
|
68
68
|
"dialog-polyfill": "^0.5.6",
|
|
69
69
|
"dom-autoscroller": "^2.3.4",
|
|
70
|
-
"dompurify": "^3.
|
|
70
|
+
"dompurify": "^3.3.3",
|
|
71
71
|
"downloadjs": "^1.4.7",
|
|
72
72
|
"dragula": "^3.7.3",
|
|
73
73
|
"eventemitter3": "^5.0.1",
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
"tippy.js": "^6.3.7",
|
|
89
89
|
"uuid": "^9.0.0",
|
|
90
90
|
"vanilla-picker": "^2.12.3",
|
|
91
|
-
"@formio/bootstrap": "^3.2.
|
|
92
|
-
"@formio/core": "^2.6.
|
|
91
|
+
"@formio/bootstrap": "^3.2.2",
|
|
92
|
+
"@formio/core": "^2.6.2"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@types/node": "^22.15.19",
|