@formio/js 5.0.0-dev.5864.1cff328 → 5.0.0-dev.5867.8552ccf
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/Changelog.md +15 -14
- package/dist/formio.form.js +17 -17
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +18 -18
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.utils.js +11 -11
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/Webform.js +1 -1
- package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.js +1 -1
- package/lib/cjs/components/_classes/component/editForm/Component.edit.data.js +1 -1
- package/lib/cjs/components/_classes/component/editForm/utils.js +1 -1
- package/lib/cjs/components/day/Day.d.ts +0 -1
- package/lib/cjs/components/day/Day.js +0 -12
- package/lib/cjs/components/form/editForm/Form.edit.data.js +1 -1
- package/lib/cjs/components/time/Time.js +0 -6
- package/lib/mjs/Webform.js +1 -1
- package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.js +1 -1
- package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +1 -1
- package/lib/mjs/components/_classes/component/editForm/utils.js +1 -1
- package/lib/mjs/components/day/Day.d.ts +0 -1
- package/lib/mjs/components/day/Day.js +0 -12
- package/lib/mjs/components/form/editForm/Form.edit.data.js +1 -1
- package/lib/mjs/components/time/Time.js +0 -6
- package/package.json +2 -2
package/lib/cjs/Webform.js
CHANGED
|
@@ -1533,7 +1533,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
1533
1533
|
return;
|
|
1534
1534
|
}
|
|
1535
1535
|
const captchaComponent = [];
|
|
1536
|
-
|
|
1536
|
+
this.eachComponent((component) => {
|
|
1537
1537
|
if (/^(re)?captcha$/.test(component.type) && component.component.eventType === 'formLoad') {
|
|
1538
1538
|
captchaComponent.push(component);
|
|
1539
1539
|
}
|
|
@@ -50,6 +50,6 @@ exports.default = [
|
|
|
50
50
|
},
|
|
51
51
|
utils_1.default.javaScriptValue('Advanced Conditions', 'customConditional', 'conditional.json', 110, '<p>You must assign the <strong>show</strong> variable a boolean result.</p>' +
|
|
52
52
|
'<p><strong>Note: Advanced Conditional logic will override the results of the Simple Conditional logic.</strong></p>' +
|
|
53
|
-
'<h5>Example</h5><pre>show = !!data.showMe;</pre>', '<p><a href="
|
|
53
|
+
'<h5>Example</h5><pre>show = !!data.showMe;</pre>', '<p><a href="https://help.form.io/userguide/form-building/logic-and-conditions" target="_blank" rel="noopener noreferrer">Click here for an example</a></p>')
|
|
54
54
|
];
|
|
55
55
|
/* eslint-enable quotes, max-len */
|
|
@@ -140,7 +140,7 @@ exports.default = [
|
|
|
140
140
|
input: true
|
|
141
141
|
},
|
|
142
142
|
utils_1.default.javaScriptValue('Custom Default Value', 'customDefaultValue', 'customDefaultValue', 1000, '<p><h4>Example:</h4><pre>value = data.firstName + " " + data.lastName;</pre></p>', '<p><h4>Example:</h4><pre>{"cat": [{"var": "data.firstName"}, " ", {"var": "data.lastName"}]}</pre>'),
|
|
143
|
-
utils_1.default.javaScriptValue('Calculated Value', 'calculateValue', 'calculateValue', 1100, '<p><h4>Example:</h4><pre>value = data.a + data.b + data.c;</pre></p>', '<p><h4>Example:</h4><pre>{"+": [{"var": "data.a"}, {"var": "data.b"}, {"var": "data.c"}]}</pre><p><a href="
|
|
143
|
+
utils_1.default.javaScriptValue('Calculated Value', 'calculateValue', 'calculateValue', 1100, '<p><h4>Example:</h4><pre>value = data.a + data.b + data.c;</pre></p>', '<p><h4>Example:</h4><pre>{"+": [{"var": "data.a"}, {"var": "data.b"}, {"var": "data.c"}]}</pre><p><a href="https://help.form.io/userguide/form-building/logic-and-conditions#calculated-values" target="_blank" rel="noopener noreferrer">Click here for an example</a></p>', '<tr><th>token</th><td>The decoded JWT token for the authenticated user.</td></tr>'),
|
|
144
144
|
{
|
|
145
145
|
type: 'checkbox',
|
|
146
146
|
input: true,
|
|
@@ -55,7 +55,7 @@ const EditFormUtils = {
|
|
|
55
55
|
'<tr><th>value</th><td>The current value of the component.</td></tr>' +
|
|
56
56
|
'<tr><th>moment</th><td>The moment.js library for date manipulation.</td></tr>' +
|
|
57
57
|
'<tr><th>_</th><td>An instance of <a href="https://lodash.com/docs/" target="_blank" rel="noopener noreferrer">Lodash</a>.</td></tr>' +
|
|
58
|
-
'<tr><th>utils</th><td>An instance of the <a href="
|
|
58
|
+
'<tr><th>utils</th><td>An instance of the <a href="https://help.form.io/developers/javascript-development/javascript-utilities" target="_blank" rel="noopener noreferrer">FormioUtils</a> object.</td></tr>' +
|
|
59
59
|
'<tr><th>util</th><td>An alias for "utils".</td></tr>' +
|
|
60
60
|
'</table><br/>'
|
|
61
61
|
/* eslint-enable prefer-template */
|
|
@@ -104,12 +104,6 @@ class DayComponent extends Field_1.default {
|
|
|
104
104
|
info.changeEvent = 'input';
|
|
105
105
|
return info;
|
|
106
106
|
}
|
|
107
|
-
isEmpty(value = this.dataValue) {
|
|
108
|
-
if (value === DayComponent.oldEmptyValue) {
|
|
109
|
-
return true;
|
|
110
|
-
}
|
|
111
|
-
return super.isEmpty(value);
|
|
112
|
-
}
|
|
113
107
|
inputDefinition(name) {
|
|
114
108
|
let min, max;
|
|
115
109
|
if (name === 'day') {
|
|
@@ -343,10 +337,6 @@ class DayComponent extends Field_1.default {
|
|
|
343
337
|
}
|
|
344
338
|
}
|
|
345
339
|
normalizeValue(value) {
|
|
346
|
-
// Adjust the value from old to new format
|
|
347
|
-
if (value === DayComponent.oldEmptyValue) {
|
|
348
|
-
value = '';
|
|
349
|
-
}
|
|
350
340
|
if (!value || this.valueMask.test(value)) {
|
|
351
341
|
return value;
|
|
352
342
|
}
|
|
@@ -653,6 +643,4 @@ class DayComponent extends Field_1.default {
|
|
|
653
643
|
return validationFormat;
|
|
654
644
|
}
|
|
655
645
|
}
|
|
656
|
-
// Empty value used before 9.3.x
|
|
657
|
-
DayComponent.oldEmptyValue = '00/00/0000';
|
|
658
646
|
exports.default = DayComponent;
|
|
@@ -7,7 +7,7 @@ const utils_1 = __importDefault(require("../../_classes/component/editForm/utils
|
|
|
7
7
|
/* eslint-disable max-len */
|
|
8
8
|
exports.default = [
|
|
9
9
|
utils_1.default.javaScriptValue('Custom Default Value', 'customDefaultValue', 'customDefaultValue', 120, '<p><h4>Example:</h4><pre>value = data.firstName + " " + data.lastName;</pre></p>', '<p><h4>Example:</h4><pre>{"cat": [{"var": "data.firstName"}, " ", {"var": "data.lastName"}]}</pre>'),
|
|
10
|
-
utils_1.default.javaScriptValue('Calculated Value', 'calculateValue', 'calculateValue', 130, '<p><h4>Example:</h4><pre>value = data.a + data.b + data.c;</pre></p>', '<p><h4>Example:</h4><pre>{"+": [{"var": "data.a"}, {"var": "data.b"}, {"var": "data.c"}]}</pre><p><a href="
|
|
10
|
+
utils_1.default.javaScriptValue('Calculated Value', 'calculateValue', 'calculateValue', 130, '<p><h4>Example:</h4><pre>value = data.a + data.b + data.c;</pre></p>', '<p><h4>Example:</h4><pre>{"+": [{"var": "data.a"}, {"var": "data.b"}, {"var": "data.c"}]}</pre><p><a href="https://help.form.io/userguide/form-building/logic-and-conditions#calculated-values" target="_blank" rel="noopener noreferrer">Click here for an example</a></p>'),
|
|
11
11
|
{
|
|
12
12
|
weight: 140,
|
|
13
13
|
type: 'checkbox',
|
|
@@ -56,12 +56,6 @@ class TimeComponent extends TextField_1.default {
|
|
|
56
56
|
}
|
|
57
57
|
return value;
|
|
58
58
|
}
|
|
59
|
-
get validationValue() {
|
|
60
|
-
if ((Array.isArray(this.rawData) && !this.rawData.length) || !this.rawData) {
|
|
61
|
-
return this.dataValue;
|
|
62
|
-
}
|
|
63
|
-
return this.rawData;
|
|
64
|
-
}
|
|
65
59
|
get inputInfo() {
|
|
66
60
|
const info = super.inputInfo;
|
|
67
61
|
info.attr.type = this.component.inputType;
|
package/lib/mjs/Webform.js
CHANGED
|
@@ -1536,7 +1536,7 @@ export default class Webform extends NestedDataComponent {
|
|
|
1536
1536
|
return;
|
|
1537
1537
|
}
|
|
1538
1538
|
const captchaComponent = [];
|
|
1539
|
-
|
|
1539
|
+
this.eachComponent((component) => {
|
|
1540
1540
|
if (/^(re)?captcha$/.test(component.type) && component.component.eventType === 'formLoad') {
|
|
1541
1541
|
captchaComponent.push(component);
|
|
1542
1542
|
}
|
|
@@ -45,6 +45,6 @@ export default [
|
|
|
45
45
|
},
|
|
46
46
|
EditFormUtils.javaScriptValue('Advanced Conditions', 'customConditional', 'conditional.json', 110, '<p>You must assign the <strong>show</strong> variable a boolean result.</p>' +
|
|
47
47
|
'<p><strong>Note: Advanced Conditional logic will override the results of the Simple Conditional logic.</strong></p>' +
|
|
48
|
-
'<h5>Example</h5><pre>show = !!data.showMe;</pre>', '<p><a href="
|
|
48
|
+
'<h5>Example</h5><pre>show = !!data.showMe;</pre>', '<p><a href="https://help.form.io/userguide/form-building/logic-and-conditions" target="_blank" rel="noopener noreferrer">Click here for an example</a></p>')
|
|
49
49
|
];
|
|
50
50
|
/* eslint-enable quotes, max-len */
|
|
@@ -135,7 +135,7 @@ export default [
|
|
|
135
135
|
input: true
|
|
136
136
|
},
|
|
137
137
|
EditFormUtils.javaScriptValue('Custom Default Value', 'customDefaultValue', 'customDefaultValue', 1000, '<p><h4>Example:</h4><pre>value = data.firstName + " " + data.lastName;</pre></p>', '<p><h4>Example:</h4><pre>{"cat": [{"var": "data.firstName"}, " ", {"var": "data.lastName"}]}</pre>'),
|
|
138
|
-
EditFormUtils.javaScriptValue('Calculated Value', 'calculateValue', 'calculateValue', 1100, '<p><h4>Example:</h4><pre>value = data.a + data.b + data.c;</pre></p>', '<p><h4>Example:</h4><pre>{"+": [{"var": "data.a"}, {"var": "data.b"}, {"var": "data.c"}]}</pre><p><a href="
|
|
138
|
+
EditFormUtils.javaScriptValue('Calculated Value', 'calculateValue', 'calculateValue', 1100, '<p><h4>Example:</h4><pre>value = data.a + data.b + data.c;</pre></p>', '<p><h4>Example:</h4><pre>{"+": [{"var": "data.a"}, {"var": "data.b"}, {"var": "data.c"}]}</pre><p><a href="https://help.form.io/userguide/form-building/logic-and-conditions#calculated-values" target="_blank" rel="noopener noreferrer">Click here for an example</a></p>', '<tr><th>token</th><td>The decoded JWT token for the authenticated user.</td></tr>'),
|
|
139
139
|
{
|
|
140
140
|
type: 'checkbox',
|
|
141
141
|
input: true,
|
|
@@ -50,7 +50,7 @@ const EditFormUtils = {
|
|
|
50
50
|
'<tr><th>value</th><td>The current value of the component.</td></tr>' +
|
|
51
51
|
'<tr><th>moment</th><td>The moment.js library for date manipulation.</td></tr>' +
|
|
52
52
|
'<tr><th>_</th><td>An instance of <a href="https://lodash.com/docs/" target="_blank" rel="noopener noreferrer">Lodash</a>.</td></tr>' +
|
|
53
|
-
'<tr><th>utils</th><td>An instance of the <a href="
|
|
53
|
+
'<tr><th>utils</th><td>An instance of the <a href="https://help.form.io/developers/javascript-development/javascript-utilities" target="_blank" rel="noopener noreferrer">FormioUtils</a> object.</td></tr>' +
|
|
54
54
|
'<tr><th>util</th><td>An alias for "utils".</td></tr>' +
|
|
55
55
|
'</table><br/>'
|
|
56
56
|
/* eslint-enable prefer-template */
|
|
@@ -49,8 +49,6 @@ export default class DayComponent extends Field {
|
|
|
49
49
|
schema = schema || {};
|
|
50
50
|
return getComponentSavedTypes(schema) || [componentValueTypes.string];
|
|
51
51
|
}
|
|
52
|
-
// Empty value used before 9.3.x
|
|
53
|
-
static oldEmptyValue = '00/00/0000';
|
|
54
52
|
constructor(component, options, data) {
|
|
55
53
|
if (component.maxDate && component.maxDate.indexOf('moment(') === -1) {
|
|
56
54
|
component.maxDate = moment(component.maxDate, 'YYYY-MM-DD').toISOString();
|
|
@@ -104,12 +102,6 @@ export default class DayComponent extends Field {
|
|
|
104
102
|
info.changeEvent = 'input';
|
|
105
103
|
return info;
|
|
106
104
|
}
|
|
107
|
-
isEmpty(value = this.dataValue) {
|
|
108
|
-
if (value === DayComponent.oldEmptyValue) {
|
|
109
|
-
return true;
|
|
110
|
-
}
|
|
111
|
-
return super.isEmpty(value);
|
|
112
|
-
}
|
|
113
105
|
inputDefinition(name) {
|
|
114
106
|
let min, max;
|
|
115
107
|
if (name === 'day') {
|
|
@@ -343,10 +335,6 @@ export default class DayComponent extends Field {
|
|
|
343
335
|
}
|
|
344
336
|
}
|
|
345
337
|
normalizeValue(value) {
|
|
346
|
-
// Adjust the value from old to new format
|
|
347
|
-
if (value === DayComponent.oldEmptyValue) {
|
|
348
|
-
value = '';
|
|
349
|
-
}
|
|
350
338
|
if (!value || this.valueMask.test(value)) {
|
|
351
339
|
return value;
|
|
352
340
|
}
|
|
@@ -2,7 +2,7 @@ import EditFormUtils from '../../_classes/component/editForm/utils';
|
|
|
2
2
|
/* eslint-disable max-len */
|
|
3
3
|
export default [
|
|
4
4
|
EditFormUtils.javaScriptValue('Custom Default Value', 'customDefaultValue', 'customDefaultValue', 120, '<p><h4>Example:</h4><pre>value = data.firstName + " " + data.lastName;</pre></p>', '<p><h4>Example:</h4><pre>{"cat": [{"var": "data.firstName"}, " ", {"var": "data.lastName"}]}</pre>'),
|
|
5
|
-
EditFormUtils.javaScriptValue('Calculated Value', 'calculateValue', 'calculateValue', 130, '<p><h4>Example:</h4><pre>value = data.a + data.b + data.c;</pre></p>', '<p><h4>Example:</h4><pre>{"+": [{"var": "data.a"}, {"var": "data.b"}, {"var": "data.c"}]}</pre><p><a href="
|
|
5
|
+
EditFormUtils.javaScriptValue('Calculated Value', 'calculateValue', 'calculateValue', 130, '<p><h4>Example:</h4><pre>value = data.a + data.b + data.c;</pre></p>', '<p><h4>Example:</h4><pre>{"+": [{"var": "data.a"}, {"var": "data.b"}, {"var": "data.c"}]}</pre><p><a href="https://help.form.io/userguide/form-building/logic-and-conditions#calculated-values" target="_blank" rel="noopener noreferrer">Click here for an example</a></p>'),
|
|
6
6
|
{
|
|
7
7
|
weight: 140,
|
|
8
8
|
type: 'checkbox',
|
|
@@ -51,12 +51,6 @@ export default class TimeComponent extends TextFieldComponent {
|
|
|
51
51
|
}
|
|
52
52
|
return value;
|
|
53
53
|
}
|
|
54
|
-
get validationValue() {
|
|
55
|
-
if ((Array.isArray(this.rawData) && !this.rawData.length) || !this.rawData) {
|
|
56
|
-
return this.dataValue;
|
|
57
|
-
}
|
|
58
|
-
return this.rawData;
|
|
59
|
-
}
|
|
60
54
|
get inputInfo() {
|
|
61
55
|
const info = super.inputInfo;
|
|
62
56
|
info.attr.type = this.component.inputType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formio/js",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.5867.8552ccf",
|
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"@formio/bootstrap": "3.0.0-dev.98.17ba6ea",
|
|
84
84
|
"@formio/choices.js": "^10.2.1",
|
|
85
|
-
"@formio/core": "v2.1.0-dev.
|
|
85
|
+
"@formio/core": "v2.1.0-dev.170.9d1e8b7",
|
|
86
86
|
"@formio/text-mask-addons": "^3.8.0-formio.2",
|
|
87
87
|
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
|
|
88
88
|
"abortcontroller-polyfill": "^1.7.5",
|