@formio/js 5.2.0 → 5.2.1-rc.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.builder.css +15 -17
- package/dist/formio.builder.min.css +1 -1
- 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.css +15 -17
- package/dist/formio.form.js +32 -32
- package/dist/formio.form.min.css +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +3 -3
- package/dist/formio.full.css +15 -17
- package/dist/formio.full.js +33 -33
- package/dist/formio.full.min.css +1 -1
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +3 -3
- package/dist/formio.js +7 -7
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.js +6 -6
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/lib/cjs/Embed.js +1 -1
- package/lib/cjs/Formio.js +1 -1
- package/lib/cjs/Webform.js +3 -2
- package/lib/cjs/WebformBuilder.js +18 -11
- package/lib/cjs/Wizard.d.ts +1 -2
- package/lib/cjs/Wizard.js +17 -23
- package/lib/cjs/components/Components.js +1 -1
- package/lib/cjs/components/_classes/component/Component.d.ts +23 -2
- package/lib/cjs/components/_classes/component/Component.js +61 -35
- package/lib/cjs/components/_classes/nested/NestedComponent.js +2 -2
- package/lib/cjs/components/file/File.d.ts +1 -1
- package/lib/cjs/components/file/File.js +6 -1
- package/lib/cjs/components/form/Form.d.ts +0 -2
- package/lib/cjs/components/form/Form.js +12 -20
- package/lib/cjs/components/select/Select.d.ts +1 -1
- package/lib/cjs/components/select/Select.js +16 -24
- package/lib/cjs/components/tags/Tags.d.ts +1 -1
- package/lib/cjs/components/tags/Tags.js +2 -2
- package/lib/cjs/formio.form.js +1 -0
- package/lib/cjs/utils/ChoicesWrapper.d.ts +4 -25
- package/lib/cjs/utils/ChoicesWrapper.js +47 -124
- package/lib/cjs/utils/formUtils.d.ts +2 -2
- package/lib/cjs/utils/index.d.ts +4 -4
- package/lib/cjs/utils/utils.d.ts +4 -4
- package/lib/cjs/utils/utils.js +2 -2
- package/lib/cjs/widgets/CalendarWidget.d.ts +1 -1
- package/lib/cjs/widgets/CalendarWidget.js +1 -1
- package/lib/mjs/Embed.js +1 -1
- package/lib/mjs/Formio.js +1 -1
- package/lib/mjs/Webform.js +2 -2
- package/lib/mjs/WebformBuilder.js +19 -12
- package/lib/mjs/Wizard.d.ts +1 -2
- package/lib/mjs/Wizard.js +16 -22
- package/lib/mjs/components/Components.js +1 -1
- package/lib/mjs/components/_classes/component/Component.d.ts +23 -2
- package/lib/mjs/components/_classes/component/Component.js +61 -35
- package/lib/mjs/components/_classes/nested/NestedComponent.js +2 -2
- package/lib/mjs/components/file/File.d.ts +1 -1
- package/lib/mjs/components/file/File.js +6 -1
- package/lib/mjs/components/form/Form.d.ts +0 -2
- package/lib/mjs/components/form/Form.js +12 -20
- package/lib/mjs/components/select/Select.d.ts +1 -1
- package/lib/mjs/components/select/Select.js +16 -23
- package/lib/mjs/components/tags/Tags.d.ts +1 -1
- package/lib/mjs/components/tags/Tags.js +2 -2
- package/lib/mjs/formio.form.js +1 -0
- package/lib/mjs/utils/ChoicesWrapper.d.ts +4 -25
- package/lib/mjs/utils/ChoicesWrapper.js +26 -119
- package/lib/mjs/utils/formUtils.d.ts +2 -2
- package/lib/mjs/utils/index.d.ts +4 -4
- package/lib/mjs/utils/utils.d.ts +4 -4
- package/lib/mjs/utils/utils.js +2 -2
- package/lib/mjs/widgets/CalendarWidget.d.ts +1 -1
- package/lib/mjs/widgets/CalendarWidget.js +1 -1
- package/package.json +5 -5
package/lib/mjs/utils/index.d.ts
CHANGED
@@ -37,8 +37,8 @@ declare const FormioUtils: {
|
|
37
37
|
getComponentFromPath: typeof import("@formio/core/lib/utils/formUtil").getComponentFromPath;
|
38
38
|
getComponentValue: typeof import("@formio/core/lib/utils/formUtil").getComponentValue;
|
39
39
|
findComponents: typeof import("@formio/core/lib/utils/formUtil").findComponents;
|
40
|
-
eachComponentDataAsync: (components: import("@formio/core").Component[], data: import("@formio/core").DataObject, fn: import("@formio/core").EachComponentDataAsyncCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: import("@formio/core").Component | undefined, parentPaths?: import("@formio/core").ComponentPaths | undefined) => Promise<void>;
|
41
|
-
eachComponentData: (components: import("@formio/core").Component[], data: import("@formio/core").DataObject, fn: import("@formio/core").EachComponentDataCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: import("@formio/core").Component | undefined, parentPaths?: import("@formio/core").ComponentPaths | undefined) => void;
|
40
|
+
eachComponentDataAsync: (components: import("@formio/core").Component[], data: import("@formio/core").DataObject, fn: import("@formio/core").EachComponentDataAsyncCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: import("@formio/core").Component | undefined, parentPaths?: import("@formio/core").ComponentPaths | undefined, noScopeReset?: boolean | undefined) => Promise<void>;
|
41
|
+
eachComponentData: (components: import("@formio/core").Component[], data: import("@formio/core").DataObject, fn: import("@formio/core").EachComponentDataCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: import("@formio/core").Component | undefined, parentPaths?: import("@formio/core").ComponentPaths | undefined, noScopeReset?: boolean | undefined) => void;
|
42
42
|
getComponentKey: typeof import("@formio/core/lib/utils/formUtil").getComponentKey;
|
43
43
|
getContextualRowPath: typeof import("@formio/core/lib/utils/formUtil").getContextualRowPath;
|
44
44
|
getContextualRowData: typeof import("@formio/core/lib/utils/formUtil").getContextualRowData;
|
@@ -137,8 +137,8 @@ declare const FormioUtils: {
|
|
137
137
|
translateHTMLTemplate(template: string, translate: Function): string;
|
138
138
|
sanitize(string: string, options: any): string;
|
139
139
|
fastCloneDeep(obj: any): any;
|
140
|
-
isInputComponent(componentJson: import("@formio/core").Component):
|
141
|
-
getArrayFromComponentPath(pathStr: string):
|
140
|
+
isInputComponent(componentJson: import("@formio/core").Component): boolean;
|
141
|
+
getArrayFromComponentPath(pathStr: string): string[];
|
142
142
|
isChildOf(child: any, parent: any): boolean;
|
143
143
|
getStringFromComponentPath(path: number[]): string;
|
144
144
|
round(number: number, precision: number): string;
|
package/lib/mjs/utils/utils.d.ts
CHANGED
@@ -414,15 +414,15 @@ export function fastCloneDeep(obj: any): any;
|
|
414
414
|
/**
|
415
415
|
* Returns if the component is an input component.
|
416
416
|
* @param {import('@formio/core').Component} componentJson - The JSON of a component.
|
417
|
-
* @returns {
|
417
|
+
* @returns {boolean} - TRUE if the component is an input component; FALSE otherwise.
|
418
418
|
*/
|
419
|
-
export function isInputComponent(componentJson: import('@formio/core').Component):
|
419
|
+
export function isInputComponent(componentJson: import('@formio/core').Component): boolean;
|
420
420
|
/**
|
421
421
|
* Takes a component path, and returns a component path array.
|
422
422
|
* @param {string} pathStr - The path string to convert to an array.
|
423
|
-
* @returns {
|
423
|
+
* @returns {Array<string>} - The array of paths.
|
424
424
|
*/
|
425
|
-
export function getArrayFromComponentPath(pathStr: string):
|
425
|
+
export function getArrayFromComponentPath(pathStr: string): Array<string>;
|
426
426
|
/**
|
427
427
|
* Returns true if the component is a child of the parent.
|
428
428
|
* @param {any} child - The child component to check.
|
package/lib/mjs/utils/utils.js
CHANGED
@@ -1295,7 +1295,7 @@ export function fastCloneDeep(obj) {
|
|
1295
1295
|
/**
|
1296
1296
|
* Returns if the component is an input component.
|
1297
1297
|
* @param {import('@formio/core').Component} componentJson - The JSON of a component.
|
1298
|
-
* @returns {
|
1298
|
+
* @returns {boolean} - TRUE if the component is an input component; FALSE otherwise.
|
1299
1299
|
*/
|
1300
1300
|
export function isInputComponent(componentJson) {
|
1301
1301
|
if (componentJson.input === false || componentJson.input === true) {
|
@@ -1319,7 +1319,7 @@ export function isInputComponent(componentJson) {
|
|
1319
1319
|
/**
|
1320
1320
|
* Takes a component path, and returns a component path array.
|
1321
1321
|
* @param {string} pathStr - The path string to convert to an array.
|
1322
|
-
* @returns {
|
1322
|
+
* @returns {Array<string>} - The array of paths.
|
1323
1323
|
*/
|
1324
1324
|
export function getArrayFromComponentPath(pathStr) {
|
1325
1325
|
if (!pathStr || !_.isString(pathStr)) {
|
@@ -84,7 +84,7 @@ export default class CalendarWidget extends InputWidget {
|
|
84
84
|
* @returns {void}
|
85
85
|
*/
|
86
86
|
setValue(value: any): void;
|
87
|
-
getValueAsString(value: any, format
|
87
|
+
getValueAsString(value: any, format?: string): string;
|
88
88
|
setErrorClasses(hasErrors: any): void;
|
89
89
|
isCalendarElement(element: any): any;
|
90
90
|
initFlatpickr(Flatpickr: any): void;
|
@@ -307,7 +307,7 @@ export default class CalendarWidget extends InputWidget {
|
|
307
307
|
this.calendar.clear(false);
|
308
308
|
}
|
309
309
|
}
|
310
|
-
getValueAsString(value, format) {
|
310
|
+
getValueAsString(value, format = '') {
|
311
311
|
const inputFormat = format || this.dateFormat;
|
312
312
|
const valueFormat = this.calendar ? this.valueFormat : this.settings.dateFormat;
|
313
313
|
if (this.settings.saveAs === 'text' && this.componentInstance.parent && !this.settings.readOnly) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@formio/js",
|
3
|
-
"version": "5.2.
|
3
|
+
"version": "5.2.1-rc.2",
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
5
5
|
"main": "lib/cjs/index.js",
|
6
6
|
"exports": {
|
@@ -79,9 +79,8 @@
|
|
79
79
|
},
|
80
80
|
"homepage": "https://github.com/formio/formio.js#readme",
|
81
81
|
"dependencies": {
|
82
|
-
"@formio/bootstrap": "3.1.1",
|
83
|
-
"@formio/
|
84
|
-
"@formio/core": "2.5.0",
|
82
|
+
"@formio/bootstrap": "3.1.2-rc.1",
|
83
|
+
"@formio/core": "2.5.1-rc.3",
|
85
84
|
"@formio/text-mask-addons": "^3.8.0-formio.4",
|
86
85
|
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
|
87
86
|
"abortcontroller-polyfill": "^1.7.5",
|
@@ -89,7 +88,8 @@
|
|
89
88
|
"bootstrap": "^5.3.3",
|
90
89
|
"browser-cookies": "^1.2.0",
|
91
90
|
"browser-md5-file": "^1.1.1",
|
92
|
-
"
|
91
|
+
"choices.js": "^11.0.6",
|
92
|
+
"compare-versions": "^6.1.1",
|
93
93
|
"core-js": "^3.37.1",
|
94
94
|
"dialog-polyfill": "^0.5.6",
|
95
95
|
"dom-autoscroller": "^2.3.4",
|