@formio/js 5.2.0 → 5.2.1-rc.1

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.
Files changed (76) hide show
  1. package/dist/formio.builder.css +15 -17
  2. package/dist/formio.builder.min.css +1 -1
  3. package/dist/formio.embed.js +1 -1
  4. package/dist/formio.embed.min.js +1 -1
  5. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  6. package/dist/formio.form.css +15 -17
  7. package/dist/formio.form.js +31 -31
  8. package/dist/formio.form.min.css +1 -1
  9. package/dist/formio.form.min.js +1 -1
  10. package/dist/formio.form.min.js.LICENSE.txt +3 -3
  11. package/dist/formio.full.css +15 -17
  12. package/dist/formio.full.js +32 -32
  13. package/dist/formio.full.min.css +1 -1
  14. package/dist/formio.full.min.js +1 -1
  15. package/dist/formio.full.min.js.LICENSE.txt +3 -3
  16. package/dist/formio.js +6 -6
  17. package/dist/formio.min.js +1 -1
  18. package/dist/formio.min.js.LICENSE.txt +1 -1
  19. package/dist/formio.utils.js +5 -5
  20. package/dist/formio.utils.min.js +1 -1
  21. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  22. package/lib/cjs/Embed.js +1 -1
  23. package/lib/cjs/Formio.js +1 -1
  24. package/lib/cjs/Webform.js +2 -1
  25. package/lib/cjs/WebformBuilder.js +18 -11
  26. package/lib/cjs/Wizard.d.ts +1 -2
  27. package/lib/cjs/Wizard.js +17 -23
  28. package/lib/cjs/components/Components.js +1 -1
  29. package/lib/cjs/components/_classes/component/Component.d.ts +23 -2
  30. package/lib/cjs/components/_classes/component/Component.js +61 -35
  31. package/lib/cjs/components/_classes/nested/NestedComponent.js +2 -2
  32. package/lib/cjs/components/file/File.d.ts +1 -1
  33. package/lib/cjs/components/file/File.js +6 -1
  34. package/lib/cjs/components/form/Form.d.ts +0 -2
  35. package/lib/cjs/components/form/Form.js +12 -20
  36. package/lib/cjs/components/select/Select.d.ts +0 -1
  37. package/lib/cjs/components/select/Select.js +3 -23
  38. package/lib/cjs/components/tags/Tags.d.ts +1 -1
  39. package/lib/cjs/components/tags/Tags.js +2 -2
  40. package/lib/cjs/formio.form.js +1 -0
  41. package/lib/cjs/utils/ChoicesWrapper.d.ts +4 -25
  42. package/lib/cjs/utils/ChoicesWrapper.js +47 -124
  43. package/lib/cjs/utils/formUtils.d.ts +2 -2
  44. package/lib/cjs/utils/index.d.ts +4 -4
  45. package/lib/cjs/utils/utils.d.ts +4 -4
  46. package/lib/cjs/utils/utils.js +2 -2
  47. package/lib/cjs/widgets/CalendarWidget.d.ts +1 -1
  48. package/lib/cjs/widgets/CalendarWidget.js +1 -1
  49. package/lib/mjs/Embed.js +1 -1
  50. package/lib/mjs/Formio.js +1 -1
  51. package/lib/mjs/Webform.js +1 -1
  52. package/lib/mjs/WebformBuilder.js +19 -12
  53. package/lib/mjs/Wizard.d.ts +1 -2
  54. package/lib/mjs/Wizard.js +16 -22
  55. package/lib/mjs/components/Components.js +1 -1
  56. package/lib/mjs/components/_classes/component/Component.d.ts +23 -2
  57. package/lib/mjs/components/_classes/component/Component.js +61 -35
  58. package/lib/mjs/components/_classes/nested/NestedComponent.js +2 -2
  59. package/lib/mjs/components/file/File.d.ts +1 -1
  60. package/lib/mjs/components/file/File.js +6 -1
  61. package/lib/mjs/components/form/Form.d.ts +0 -2
  62. package/lib/mjs/components/form/Form.js +12 -20
  63. package/lib/mjs/components/select/Select.d.ts +0 -1
  64. package/lib/mjs/components/select/Select.js +3 -22
  65. package/lib/mjs/components/tags/Tags.d.ts +1 -1
  66. package/lib/mjs/components/tags/Tags.js +2 -2
  67. package/lib/mjs/formio.form.js +1 -0
  68. package/lib/mjs/utils/ChoicesWrapper.d.ts +4 -25
  69. package/lib/mjs/utils/ChoicesWrapper.js +26 -119
  70. package/lib/mjs/utils/formUtils.d.ts +2 -2
  71. package/lib/mjs/utils/index.d.ts +4 -4
  72. package/lib/mjs/utils/utils.d.ts +4 -4
  73. package/lib/mjs/utils/utils.js +2 -2
  74. package/lib/mjs/widgets/CalendarWidget.d.ts +1 -1
  75. package/lib/mjs/widgets/CalendarWidget.js +1 -1
  76. package/package.json +5 -5
@@ -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 {bool} - TRUE if the component is an input component; FALSE otherwise.
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 {Arryay<number>} - The array of paths.
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: any): string;
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.0",
3
+ "version": "5.2.1-rc.1",
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/choices.js": "^10.2.1",
84
- "@formio/core": "2.5.0",
82
+ "@formio/bootstrap": "3.1.2-rc.1",
83
+ "@formio/core": "2.5.1-rc.2",
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
- "compare-versions": "^6.0.0-rc.2",
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",