@formio/js 5.0.0-dev.5950.723a551 → 5.0.0-dev.5954.7e72629
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.form.js +8 -8
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.js +8 -8
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +1 -1
- package/dist/formio.js +2 -2
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.js +1 -1
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/lib/cjs/components/datetime/DateTime.js +0 -4
- package/lib/cjs/components/form/Form.js +3 -2
- package/lib/cjs/components/textfield/TextField.js +0 -3
- package/lib/mjs/components/datetime/DateTime.js +1 -5
- package/lib/mjs/components/form/Form.js +3 -2
- package/lib/mjs/components/textfield/TextField.js +0 -3
- package/package.json +2 -2
@@ -18,7 +18,7 @@
|
|
18
18
|
* MIT licensed
|
19
19
|
*/
|
20
20
|
|
21
|
-
/*! @license DOMPurify 3.2.
|
21
|
+
/*! @license DOMPurify 3.2.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.2.3/LICENSE */
|
22
22
|
|
23
23
|
/*! formiojs v5.0.0-rc.59 | https://unpkg.com/formiojs@5.0.0-rc.59/LICENSE.txt */
|
24
24
|
|
@@ -103,10 +103,6 @@ class DateTimeComponent extends Input_1.default {
|
|
103
103
|
}
|
104
104
|
/* eslint-disable camelcase */
|
105
105
|
this.component.widget = Object.assign({ type: 'calendar', timezone, displayInTimezone: lodash_1.default.get(this.component, 'displayInTimezone', 'viewer'), locale: this.options.language, useLocaleSettings: lodash_1.default.get(this.component, 'useLocaleSettings', false), allowInput: lodash_1.default.get(this.component, 'allowInput', true), mode: 'single', enableTime: lodash_1.default.get(this.component, 'enableTime', true), noCalendar: !lodash_1.default.get(this.component, 'enableDate', true), format: this.component.format, hourIncrement: lodash_1.default.get(this.component, 'timePicker.hourStep', 1), minuteIncrement: lodash_1.default.get(this.component, 'timePicker.minuteStep', 5), time_24hr: time24hr, readOnly: this.options.readOnly, minDate: lodash_1.default.get(this.component, 'datePicker.minDate'), disabledDates: lodash_1.default.get(this.component, 'datePicker.disable'), disableWeekends: lodash_1.default.get(this.component, 'datePicker.disableWeekends'), disableWeekdays: lodash_1.default.get(this.component, 'datePicker.disableWeekdays'), disableFunction: lodash_1.default.get(this.component, 'datePicker.disableFunction'), maxDate: lodash_1.default.get(this.component, 'datePicker.maxDate') }, customOptions);
|
106
|
-
// update originalComponent to include widget and other updated settings
|
107
|
-
// it is done here since these settings depend on properties present after the component is initialized
|
108
|
-
// originalComponent is used to restore the component (and widget) after evaluating field logic
|
109
|
-
this.originalComponent = (0, utils_2.fastCloneDeep)(this.component);
|
110
106
|
/* eslint-enable camelcase */
|
111
107
|
}
|
112
108
|
get defaultSchema() {
|
@@ -144,6 +144,8 @@ class FormComponent extends Component_1.default {
|
|
144
144
|
options.events = this.createEmitter();
|
145
145
|
// Make sure to not show the submit button in wizards in the nested forms.
|
146
146
|
lodash_1.default.set(options, 'buttonSettings.showSubmit', false);
|
147
|
+
// Set the parent option to the subform so those references are stable when the subform is created
|
148
|
+
options.parent = this;
|
147
149
|
if (!this.options) {
|
148
150
|
return options;
|
149
151
|
}
|
@@ -393,12 +395,11 @@ class FormComponent extends Component_1.default {
|
|
393
395
|
return (new Form_1.default(form, this.getSubOptions())).ready.then((instance) => {
|
394
396
|
this.subForm = instance;
|
395
397
|
this.subForm.currentForm = this;
|
398
|
+
this.subForm.parentVisible = this.visible;
|
396
399
|
const componentsMap = this.componentsMap;
|
397
400
|
const formComponentsMap = this.subForm.componentsMap;
|
398
401
|
lodash_1.default.assign(componentsMap, formComponentsMap);
|
399
402
|
this.component.components = this.subForm.components.map((comp) => comp.component);
|
400
|
-
this.subForm.parent = this;
|
401
|
-
this.subForm.parentVisible = this.visible;
|
402
403
|
this.subForm.on('change', () => {
|
403
404
|
if (this.subForm) {
|
404
405
|
this.dataValue = this.subForm.getValue();
|
@@ -102,9 +102,6 @@ class TextFieldComponent extends Input_1.default {
|
|
102
102
|
if (((_c = this.component.widget) === null || _c === void 0 ? void 0 : _c.type) === 'calendar') {
|
103
103
|
this.component.widget = Object.assign(Object.assign({}, this.component.widget), { readOnly: this.options.readOnly, timezone,
|
104
104
|
displayInTimezone, locale: this.component.widget.locale || this.options.language, saveAs: 'text' });
|
105
|
-
// update originalComponent to include widget settings after component initialization
|
106
|
-
// originalComponent is used to restore the component (and widget) after evaluating field logic
|
107
|
-
this.originalComponent = FormioUtils.fastCloneDeep(this.component);
|
108
105
|
}
|
109
106
|
}
|
110
107
|
attach(element) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _ from 'lodash';
|
2
2
|
import moment from 'moment';
|
3
3
|
import FormioUtils from '../../utils';
|
4
|
-
import { componentValueTypes,
|
4
|
+
import { componentValueTypes, getComponentSavedTypes } from '../../utils/utils';
|
5
5
|
import Input from '../_classes/input/Input';
|
6
6
|
export default class DateTimeComponent extends Input {
|
7
7
|
static schema(...extend) {
|
@@ -127,10 +127,6 @@ export default class DateTimeComponent extends Input {
|
|
127
127
|
maxDate: _.get(this.component, 'datePicker.maxDate'),
|
128
128
|
...customOptions,
|
129
129
|
};
|
130
|
-
// update originalComponent to include widget and other updated settings
|
131
|
-
// it is done here since these settings depend on properties present after the component is initialized
|
132
|
-
// originalComponent is used to restore the component (and widget) after evaluating field logic
|
133
|
-
this.originalComponent = fastCloneDeep(this.component);
|
134
130
|
/* eslint-enable camelcase */
|
135
131
|
}
|
136
132
|
get defaultSchema() {
|
@@ -138,6 +138,8 @@ export default class FormComponent extends Component {
|
|
138
138
|
options.events = this.createEmitter();
|
139
139
|
// Make sure to not show the submit button in wizards in the nested forms.
|
140
140
|
_.set(options, 'buttonSettings.showSubmit', false);
|
141
|
+
// Set the parent option to the subform so those references are stable when the subform is created
|
142
|
+
options.parent = this;
|
141
143
|
if (!this.options) {
|
142
144
|
return options;
|
143
145
|
}
|
@@ -389,12 +391,11 @@ export default class FormComponent extends Component {
|
|
389
391
|
return (new Form(form, this.getSubOptions())).ready.then((instance) => {
|
390
392
|
this.subForm = instance;
|
391
393
|
this.subForm.currentForm = this;
|
394
|
+
this.subForm.parentVisible = this.visible;
|
392
395
|
const componentsMap = this.componentsMap;
|
393
396
|
const formComponentsMap = this.subForm.componentsMap;
|
394
397
|
_.assign(componentsMap, formComponentsMap);
|
395
398
|
this.component.components = this.subForm.components.map((comp) => comp.component);
|
396
|
-
this.subForm.parent = this;
|
397
|
-
this.subForm.parentVisible = this.visible;
|
398
399
|
this.subForm.on('change', () => {
|
399
400
|
if (this.subForm) {
|
400
401
|
this.dataValue = this.subForm.getValue();
|
@@ -86,9 +86,6 @@ export default class TextFieldComponent extends Input {
|
|
86
86
|
locale: this.component.widget.locale || this.options.language,
|
87
87
|
saveAs: 'text'
|
88
88
|
};
|
89
|
-
// update originalComponent to include widget settings after component initialization
|
90
|
-
// originalComponent is used to restore the component (and widget) after evaluating field logic
|
91
|
-
this.originalComponent = FormioUtils.fastCloneDeep(this.component);
|
92
89
|
}
|
93
90
|
}
|
94
91
|
attach(element) {
|
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.5954.7e72629",
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
5
5
|
"main": "lib/cjs/index.js",
|
6
6
|
"exports": {
|
@@ -80,7 +80,7 @@
|
|
80
80
|
},
|
81
81
|
"homepage": "https://github.com/formio/formio.js#readme",
|
82
82
|
"dependencies": {
|
83
|
-
"@formio/bootstrap": "3.0.0-dev.
|
83
|
+
"@formio/bootstrap": "3.0.0-dev.119.c4cb299",
|
84
84
|
"@formio/choices.js": "^10.2.1",
|
85
85
|
"@formio/core": "2.1.0-dev.193.68cf8c3",
|
86
86
|
"@formio/text-mask-addons": "3.8.0-formio.4",
|