@formio/js 5.0.0-dev.5643.9c5173a → 5.0.0-dev.5646.35daa65

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 (547) hide show
  1. package/Changelog.md +65 -2
  2. package/dist/formio.builder.css +8 -8
  3. package/dist/formio.builder.min.css +1 -1
  4. package/dist/formio.embed.js +1 -1
  5. package/dist/formio.embed.min.js +1 -1
  6. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  7. package/dist/formio.form.css +8 -8
  8. package/dist/formio.form.js +792 -1237
  9. package/dist/formio.form.min.css +1 -1
  10. package/dist/formio.form.min.js +1 -1
  11. package/dist/formio.form.min.js.LICENSE.txt +3 -5
  12. package/dist/formio.full.css +8 -8
  13. package/dist/formio.full.js +692 -933
  14. package/dist/formio.full.min.css +1 -1
  15. package/dist/formio.full.min.js +1 -1
  16. package/dist/formio.full.min.js.LICENSE.txt +3 -5
  17. package/dist/formio.js +18 -18
  18. package/dist/formio.min.js +1 -1
  19. package/dist/formio.min.js.LICENSE.txt +1 -1
  20. package/dist/formio.utils.js +1853 -476
  21. package/dist/formio.utils.min.js +1 -1
  22. package/dist/formio.utils.min.js.LICENSE.txt +10 -4
  23. package/embed.d.ts +1 -0
  24. package/form.d.ts +1 -0
  25. package/lib/cjs/CDN.d.ts +1 -0
  26. package/lib/cjs/CDN.js +6 -3
  27. package/lib/cjs/Element.d.ts +86 -96
  28. package/lib/cjs/Element.js +68 -78
  29. package/lib/cjs/Embed.d.ts +1 -1
  30. package/lib/cjs/Embed.js +52 -12
  31. package/lib/cjs/Form.d.ts +365 -36
  32. package/lib/cjs/Form.js +50 -64
  33. package/lib/cjs/FormBuilder.d.ts +187 -2
  34. package/lib/cjs/FormBuilder.js +30 -8
  35. package/lib/cjs/Formio.js +1 -0
  36. package/lib/cjs/InlineEmbed.d.ts +7 -0
  37. package/lib/cjs/InlineEmbed.js +116 -0
  38. package/lib/cjs/PDF.d.ts +11 -13
  39. package/lib/cjs/PDF.js +6 -8
  40. package/lib/cjs/Webform.d.ts +187 -139
  41. package/lib/cjs/Webform.js +330 -300
  42. package/lib/cjs/WebformBuilder.d.ts +16 -14
  43. package/lib/cjs/WebformBuilder.js +19 -12
  44. package/lib/cjs/Wizard.d.ts +31 -21
  45. package/lib/cjs/Wizard.js +43 -20
  46. package/lib/cjs/WizardBuilder.d.ts +1 -1
  47. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +8 -5
  48. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +6 -3
  49. package/lib/cjs/components/Components.d.ts +4 -4
  50. package/lib/cjs/components/Components.js +3 -3
  51. package/lib/cjs/components/_classes/component/Component.d.ts +515 -269
  52. package/lib/cjs/components/_classes/component/Component.form.d.ts +6 -3
  53. package/lib/cjs/components/_classes/component/Component.form.js +5 -0
  54. package/lib/cjs/components/_classes/component/Component.js +462 -204
  55. package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +1 -1
  56. package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +2 -2
  57. package/lib/cjs/components/_classes/component/editForm/utils.js +2 -2
  58. package/lib/cjs/components/_classes/component/fixtures/comp6.d.ts +77 -0
  59. package/lib/cjs/components/_classes/component/fixtures/comp6.js +59 -0
  60. package/lib/cjs/components/_classes/component/fixtures/comp7.d.ts +84 -0
  61. package/lib/cjs/components/_classes/component/fixtures/comp7.js +86 -0
  62. package/lib/cjs/components/_classes/component/fixtures/index.d.ts +3 -1
  63. package/lib/cjs/components/_classes/component/fixtures/index.js +5 -1
  64. package/lib/cjs/components/_classes/field/Field.d.ts +11 -2
  65. package/lib/cjs/components/_classes/field/Field.js +13 -1
  66. package/lib/cjs/components/_classes/input/Input.d.ts +4 -3
  67. package/lib/cjs/components/_classes/input/Input.js +31 -7
  68. package/lib/cjs/components/_classes/list/ListComponent.d.ts +2 -2
  69. package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +6 -3
  70. package/lib/cjs/components/_classes/list/ListComponent.form.js +5 -0
  71. package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +43 -12
  72. package/lib/cjs/components/_classes/multivalue/Multivalue.js +44 -3
  73. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +163 -67
  74. package/lib/cjs/components/_classes/nested/NestedComponent.form.d.ts +6 -3
  75. package/lib/cjs/components/_classes/nested/NestedComponent.form.js +5 -0
  76. package/lib/cjs/components/_classes/nested/NestedComponent.js +175 -54
  77. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +2 -2
  78. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
  79. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +7 -1
  80. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +2 -3
  81. package/lib/cjs/components/address/Address.d.ts +4 -2
  82. package/lib/cjs/components/address/Address.form.d.ts +6 -3
  83. package/lib/cjs/components/address/Address.form.js +5 -0
  84. package/lib/cjs/components/address/Address.js +4 -0
  85. package/lib/cjs/components/address/editForm/Address.edit.provider.js +1 -1
  86. package/lib/cjs/components/button/Button.d.ts +3 -12
  87. package/lib/cjs/components/button/Button.form.d.ts +6 -3
  88. package/lib/cjs/components/button/Button.form.js +5 -0
  89. package/lib/cjs/components/button/Button.js +5 -0
  90. package/lib/cjs/components/checkbox/Checkbox.d.ts +5 -28
  91. package/lib/cjs/components/checkbox/Checkbox.form.d.ts +6 -3
  92. package/lib/cjs/components/checkbox/Checkbox.form.js +5 -0
  93. package/lib/cjs/components/checkbox/Checkbox.js +1 -1
  94. package/lib/cjs/components/checkbox/fixtures/comp6.d.ts +32 -0
  95. package/lib/cjs/components/checkbox/fixtures/comp6.js +30 -0
  96. package/lib/cjs/components/checkbox/fixtures/index.d.ts +2 -1
  97. package/lib/cjs/components/checkbox/fixtures/index.js +3 -1
  98. package/lib/cjs/components/columns/Columns.d.ts +3 -2
  99. package/lib/cjs/components/columns/Columns.form.d.ts +6 -3
  100. package/lib/cjs/components/columns/Columns.form.js +5 -0
  101. package/lib/cjs/components/columns/Columns.js +1 -1
  102. package/lib/cjs/components/container/Container.form.d.ts +6 -3
  103. package/lib/cjs/components/container/Container.form.js +5 -0
  104. package/lib/cjs/components/content/Content.d.ts +2 -1
  105. package/lib/cjs/components/content/Content.form.d.ts +6 -3
  106. package/lib/cjs/components/content/Content.form.js +5 -0
  107. package/lib/cjs/components/currency/Currency.form.d.ts +6 -3
  108. package/lib/cjs/components/currency/Currency.form.js +5 -0
  109. package/lib/cjs/components/currency/Currency.js +1 -2
  110. package/lib/cjs/components/datagrid/DataGrid.d.ts +17 -7
  111. package/lib/cjs/components/datagrid/DataGrid.form.d.ts +6 -3
  112. package/lib/cjs/components/datagrid/DataGrid.form.js +5 -0
  113. package/lib/cjs/components/datagrid/DataGrid.js +55 -37
  114. package/lib/cjs/components/datagrid/fixtures/comp-with-reorder.d.ts +100 -0
  115. package/lib/cjs/components/datagrid/fixtures/comp-with-reorder.js +139 -0
  116. package/lib/cjs/components/datagrid/fixtures/comp10.d.ts +81 -0
  117. package/lib/cjs/components/datagrid/fixtures/comp10.js +87 -0
  118. package/lib/cjs/components/datagrid/fixtures/comp9.d.ts +41 -0
  119. package/lib/cjs/components/datagrid/fixtures/comp9.js +44 -0
  120. package/lib/cjs/components/datagrid/fixtures/index.d.ts +4 -1
  121. package/lib/cjs/components/datagrid/fixtures/index.js +7 -1
  122. package/lib/cjs/components/datamap/DataMap.d.ts +1 -0
  123. package/lib/cjs/components/datamap/DataMap.form.d.ts +6 -3
  124. package/lib/cjs/components/datamap/DataMap.form.js +5 -0
  125. package/lib/cjs/components/datetime/DateTime.d.ts +0 -14
  126. package/lib/cjs/components/datetime/DateTime.form.d.ts +6 -3
  127. package/lib/cjs/components/datetime/DateTime.form.js +5 -0
  128. package/lib/cjs/components/datetime/editForm/DateTime.edit.date.js +2 -2
  129. package/lib/cjs/components/day/Day.d.ts +23 -49
  130. package/lib/cjs/components/day/Day.form.d.ts +6 -3
  131. package/lib/cjs/components/day/Day.form.js +5 -0
  132. package/lib/cjs/components/day/Day.js +16 -21
  133. package/lib/cjs/components/day/fixtures/comp7.d.ts +109 -0
  134. package/lib/cjs/components/day/fixtures/comp7.js +109 -0
  135. package/lib/cjs/components/day/fixtures/comp8.d.ts +41 -0
  136. package/lib/cjs/components/day/fixtures/comp8.js +40 -0
  137. package/lib/cjs/components/day/fixtures/index.d.ts +3 -1
  138. package/lib/cjs/components/day/fixtures/index.js +5 -1
  139. package/lib/cjs/components/editgrid/EditGrid.d.ts +7 -3
  140. package/lib/cjs/components/editgrid/EditGrid.form.d.ts +6 -3
  141. package/lib/cjs/components/editgrid/EditGrid.form.js +5 -0
  142. package/lib/cjs/components/editgrid/EditGrid.js +5 -5
  143. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +2 -5
  144. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.js +6 -9
  145. package/lib/cjs/components/email/Email.form.d.ts +6 -3
  146. package/lib/cjs/components/email/Email.form.js +5 -0
  147. package/lib/cjs/components/fieldset/Fieldset.form.d.ts +6 -3
  148. package/lib/cjs/components/fieldset/Fieldset.form.js +5 -0
  149. package/lib/cjs/components/file/File.d.ts +9 -22
  150. package/lib/cjs/components/file/File.form.d.ts +6 -3
  151. package/lib/cjs/components/file/File.form.js +5 -0
  152. package/lib/cjs/components/file/File.js +1 -2
  153. package/lib/cjs/components/form/Form.d.ts +38 -20
  154. package/lib/cjs/components/form/Form.form.d.ts +6 -3
  155. package/lib/cjs/components/form/Form.form.js +5 -0
  156. package/lib/cjs/components/form/Form.js +27 -15
  157. package/lib/cjs/components/hidden/Hidden.d.ts +1 -11
  158. package/lib/cjs/components/hidden/Hidden.form.d.ts +6 -3
  159. package/lib/cjs/components/hidden/Hidden.form.js +5 -0
  160. package/lib/cjs/components/hidden/Hidden.js +1 -2
  161. package/lib/cjs/components/html/HTML.d.ts +2 -1
  162. package/lib/cjs/components/html/HTML.form.d.ts +6 -3
  163. package/lib/cjs/components/html/HTML.form.js +5 -0
  164. package/lib/cjs/components/number/Number.d.ts +3 -17
  165. package/lib/cjs/components/number/Number.form.d.ts +6 -3
  166. package/lib/cjs/components/number/Number.form.js +5 -0
  167. package/lib/cjs/components/number/Number.js +2 -3
  168. package/lib/cjs/components/number/fixtures/comp8.d.ts +32 -0
  169. package/lib/cjs/components/number/fixtures/comp8.js +28 -0
  170. package/lib/cjs/components/number/fixtures/index.d.ts +2 -1
  171. package/lib/cjs/components/number/fixtures/index.js +3 -1
  172. package/lib/cjs/components/panel/Panel.form.d.ts +6 -3
  173. package/lib/cjs/components/panel/Panel.form.js +5 -0
  174. package/lib/cjs/components/panel/Panel.js +0 -1
  175. package/lib/cjs/components/password/Password.form.d.ts +6 -3
  176. package/lib/cjs/components/password/Password.form.js +5 -0
  177. package/lib/cjs/components/phonenumber/PhoneNumber.form.d.ts +6 -3
  178. package/lib/cjs/components/phonenumber/PhoneNumber.form.js +5 -0
  179. package/lib/cjs/components/phonenumber/fixtures/comp2.d.ts +16 -0
  180. package/lib/cjs/components/phonenumber/fixtures/comp2.js +25 -0
  181. package/lib/cjs/components/phonenumber/fixtures/index.d.ts +2 -1
  182. package/lib/cjs/components/phonenumber/fixtures/index.js +3 -1
  183. package/lib/cjs/components/radio/Radio.d.ts +3 -26
  184. package/lib/cjs/components/radio/Radio.form.d.ts +6 -3
  185. package/lib/cjs/components/radio/Radio.form.js +5 -0
  186. package/lib/cjs/components/radio/Radio.js +6 -7
  187. package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +1 -1
  188. package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +6 -3
  189. package/lib/cjs/components/recaptcha/ReCaptcha.form.js +5 -0
  190. package/lib/cjs/components/select/Select.d.ts +16 -39
  191. package/lib/cjs/components/select/Select.form.d.ts +6 -3
  192. package/lib/cjs/components/select/Select.form.js +5 -0
  193. package/lib/cjs/components/select/Select.js +14 -18
  194. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +2 -17
  195. package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +6 -3
  196. package/lib/cjs/components/selectboxes/SelectBoxes.form.js +5 -0
  197. package/lib/cjs/components/selectboxes/SelectBoxes.js +7 -9
  198. package/lib/cjs/components/signature/Signature.d.ts +0 -14
  199. package/lib/cjs/components/signature/Signature.form.d.ts +6 -3
  200. package/lib/cjs/components/signature/Signature.form.js +5 -0
  201. package/lib/cjs/components/signature/Signature.js +1 -1
  202. package/lib/cjs/components/survey/Survey.d.ts +3 -15
  203. package/lib/cjs/components/survey/Survey.form.d.ts +6 -3
  204. package/lib/cjs/components/survey/Survey.form.js +5 -0
  205. package/lib/cjs/components/table/Table.d.ts +2 -1
  206. package/lib/cjs/components/table/Table.form.d.ts +6 -3
  207. package/lib/cjs/components/table/Table.form.js +5 -0
  208. package/lib/cjs/components/tabs/Tabs.d.ts +4 -4
  209. package/lib/cjs/components/tabs/Tabs.form.d.ts +6 -3
  210. package/lib/cjs/components/tabs/Tabs.form.js +5 -0
  211. package/lib/cjs/components/tabs/Tabs.js +1 -2
  212. package/lib/cjs/components/tags/Tags.d.ts +0 -14
  213. package/lib/cjs/components/tags/Tags.form.d.ts +6 -3
  214. package/lib/cjs/components/tags/Tags.form.js +5 -0
  215. package/lib/cjs/components/textarea/TextArea.d.ts +4 -9
  216. package/lib/cjs/components/textarea/TextArea.form.d.ts +6 -3
  217. package/lib/cjs/components/textarea/TextArea.form.js +5 -0
  218. package/lib/cjs/components/textarea/TextArea.js +2 -2
  219. package/lib/cjs/components/textfield/TextField.d.ts +14 -30
  220. package/lib/cjs/components/textfield/TextField.form.d.ts +6 -3
  221. package/lib/cjs/components/textfield/TextField.form.js +5 -0
  222. package/lib/cjs/components/textfield/TextField.js +16 -17
  223. package/lib/cjs/components/time/Time.form.d.ts +6 -3
  224. package/lib/cjs/components/time/Time.form.js +5 -0
  225. package/lib/cjs/components/unknown/Unknown.form.d.ts +5 -34
  226. package/lib/cjs/components/unknown/Unknown.form.js +4 -0
  227. package/lib/cjs/components/url/Url.form.d.ts +6 -3
  228. package/lib/cjs/components/url/Url.form.js +5 -0
  229. package/lib/cjs/components/well/Well.form.d.ts +6 -3
  230. package/lib/cjs/components/well/Well.form.js +5 -0
  231. package/lib/cjs/formio.embed.d.ts +1 -2
  232. package/lib/cjs/formio.embed.js +2 -100
  233. package/lib/cjs/formio.form.d.ts +11 -4
  234. package/lib/cjs/formio.form.js +13 -5
  235. package/lib/cjs/providers/Providers.d.ts +36 -5
  236. package/lib/cjs/providers/Providers.js +29 -0
  237. package/lib/cjs/providers/address/AddressProvider.d.ts +131 -12
  238. package/lib/cjs/providers/address/AddressProvider.js +88 -2
  239. package/lib/cjs/providers/address/AzureAddressProvider.d.ts +48 -1
  240. package/lib/cjs/providers/address/AzureAddressProvider.js +37 -0
  241. package/lib/cjs/providers/address/CustomAddressProvider.d.ts +27 -4
  242. package/lib/cjs/providers/address/CustomAddressProvider.js +34 -0
  243. package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +135 -6
  244. package/lib/cjs/providers/address/GoogleAddressProvider.js +95 -1
  245. package/lib/cjs/providers/address/NominatimAddressProvider.d.ts +32 -7
  246. package/lib/cjs/providers/address/NominatimAddressProvider.js +33 -0
  247. package/lib/cjs/providers/address/index.d.ts +3 -1
  248. package/lib/cjs/providers/processor/fileProcessor.d.ts +7 -1
  249. package/lib/cjs/providers/processor/fileProcessor.js +6 -0
  250. package/lib/cjs/providers/storage/azure.d.ts +6 -13
  251. package/lib/cjs/providers/storage/azure.js +5 -0
  252. package/lib/cjs/providers/storage/base64.d.ts +5 -6
  253. package/lib/cjs/providers/storage/base64.js +4 -0
  254. package/lib/cjs/providers/storage/dropbox.d.ts +6 -4
  255. package/lib/cjs/providers/storage/dropbox.js +5 -0
  256. package/lib/cjs/providers/storage/googleDrive.d.ts +7 -5
  257. package/lib/cjs/providers/storage/googleDrive.js +6 -0
  258. package/lib/cjs/providers/storage/indexeddb.d.ts +5 -7
  259. package/lib/cjs/providers/storage/indexeddb.js +4 -0
  260. package/lib/cjs/providers/storage/s3.d.ts +6 -20
  261. package/lib/cjs/providers/storage/s3.js +5 -0
  262. package/lib/cjs/providers/storage/url.d.ts +6 -7
  263. package/lib/cjs/providers/storage/url.js +10 -0
  264. package/lib/cjs/providers/storage/util.d.ts +24 -1
  265. package/lib/cjs/providers/storage/util.js +18 -0
  266. package/lib/cjs/templates/Templates.d.ts +1 -0
  267. package/lib/cjs/translations/en.d.ts +5 -0
  268. package/lib/cjs/translations/en.js +6 -1
  269. package/lib/cjs/utils/ChoicesWrapper.d.ts +1 -1
  270. package/lib/cjs/utils/ChoicesWrapper.js +13 -2
  271. package/lib/cjs/utils/Evaluator.d.ts +6 -3
  272. package/lib/cjs/utils/Evaluator.js +11 -20
  273. package/lib/cjs/utils/builder.d.ts +9 -7
  274. package/lib/cjs/utils/builder.js +10 -5
  275. package/lib/cjs/utils/calendarUtils.d.ts +7 -13
  276. package/lib/cjs/utils/calendarUtils.js +10 -17
  277. package/lib/cjs/utils/conditionOperators/IsEmptyValue.js +4 -3
  278. package/lib/cjs/utils/conditionOperators/IsEqualTo.js +3 -3
  279. package/lib/cjs/utils/formUtils.d.ts +43 -171
  280. package/lib/cjs/utils/formUtils.js +38 -569
  281. package/lib/cjs/utils/utils.d.ts +360 -223
  282. package/lib/cjs/utils/utils.js +394 -239
  283. package/lib/cjs/widgets/CalendarWidget.d.ts +9 -10
  284. package/lib/cjs/widgets/CalendarWidget.js +9 -11
  285. package/lib/mjs/CDN.d.ts +1 -0
  286. package/lib/mjs/CDN.js +6 -3
  287. package/lib/mjs/Element.d.ts +86 -96
  288. package/lib/mjs/Element.js +68 -78
  289. package/lib/mjs/Embed.d.ts +1 -1
  290. package/lib/mjs/Embed.js +52 -12
  291. package/lib/mjs/Form.d.ts +365 -36
  292. package/lib/mjs/Form.js +140 -57
  293. package/lib/mjs/FormBuilder.d.ts +187 -2
  294. package/lib/mjs/FormBuilder.js +32 -8
  295. package/lib/mjs/Formio.js +1 -0
  296. package/lib/mjs/InlineEmbed.d.ts +7 -0
  297. package/lib/mjs/InlineEmbed.js +112 -0
  298. package/lib/mjs/PDF.d.ts +11 -13
  299. package/lib/mjs/PDF.js +6 -8
  300. package/lib/mjs/Webform.d.ts +187 -139
  301. package/lib/mjs/Webform.js +342 -312
  302. package/lib/mjs/WebformBuilder.d.ts +16 -14
  303. package/lib/mjs/WebformBuilder.js +19 -12
  304. package/lib/mjs/Wizard.d.ts +31 -21
  305. package/lib/mjs/Wizard.js +42 -19
  306. package/lib/mjs/WizardBuilder.d.ts +1 -1
  307. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +8 -5
  308. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +6 -3
  309. package/lib/mjs/components/Components.d.ts +4 -4
  310. package/lib/mjs/components/Components.js +3 -3
  311. package/lib/mjs/components/_classes/component/Component.d.ts +515 -269
  312. package/lib/mjs/components/_classes/component/Component.form.d.ts +6 -3
  313. package/lib/mjs/components/_classes/component/Component.form.js +5 -0
  314. package/lib/mjs/components/_classes/component/Component.js +470 -204
  315. package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +1 -1
  316. package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +1 -1
  317. package/lib/mjs/components/_classes/component/editForm/utils.js +1 -1
  318. package/lib/mjs/components/_classes/component/fixtures/comp6.d.ts +77 -0
  319. package/lib/mjs/components/_classes/component/fixtures/comp6.js +57 -0
  320. package/lib/mjs/components/_classes/component/fixtures/comp7.d.ts +84 -0
  321. package/lib/mjs/components/_classes/component/fixtures/comp7.js +84 -0
  322. package/lib/mjs/components/_classes/component/fixtures/index.d.ts +3 -1
  323. package/lib/mjs/components/_classes/component/fixtures/index.js +3 -1
  324. package/lib/mjs/components/_classes/field/Field.d.ts +11 -2
  325. package/lib/mjs/components/_classes/field/Field.js +13 -1
  326. package/lib/mjs/components/_classes/input/Input.d.ts +4 -3
  327. package/lib/mjs/components/_classes/input/Input.js +30 -7
  328. package/lib/mjs/components/_classes/list/ListComponent.d.ts +2 -2
  329. package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +6 -3
  330. package/lib/mjs/components/_classes/list/ListComponent.form.js +5 -0
  331. package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +43 -12
  332. package/lib/mjs/components/_classes/multivalue/Multivalue.js +44 -3
  333. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +163 -67
  334. package/lib/mjs/components/_classes/nested/NestedComponent.form.d.ts +6 -3
  335. package/lib/mjs/components/_classes/nested/NestedComponent.form.js +5 -0
  336. package/lib/mjs/components/_classes/nested/NestedComponent.js +175 -54
  337. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +2 -2
  338. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
  339. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +7 -1
  340. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +2 -3
  341. package/lib/mjs/components/address/Address.d.ts +4 -2
  342. package/lib/mjs/components/address/Address.form.d.ts +6 -3
  343. package/lib/mjs/components/address/Address.form.js +5 -0
  344. package/lib/mjs/components/address/Address.js +4 -0
  345. package/lib/mjs/components/address/editForm/Address.edit.provider.js +1 -1
  346. package/lib/mjs/components/button/Button.d.ts +3 -12
  347. package/lib/mjs/components/button/Button.form.d.ts +6 -3
  348. package/lib/mjs/components/button/Button.form.js +5 -0
  349. package/lib/mjs/components/button/Button.js +5 -0
  350. package/lib/mjs/components/checkbox/Checkbox.d.ts +5 -28
  351. package/lib/mjs/components/checkbox/Checkbox.form.d.ts +6 -3
  352. package/lib/mjs/components/checkbox/Checkbox.form.js +5 -0
  353. package/lib/mjs/components/checkbox/Checkbox.js +1 -1
  354. package/lib/mjs/components/checkbox/fixtures/comp6.d.ts +32 -0
  355. package/lib/mjs/components/checkbox/fixtures/comp6.js +28 -0
  356. package/lib/mjs/components/checkbox/fixtures/index.d.ts +2 -1
  357. package/lib/mjs/components/checkbox/fixtures/index.js +2 -1
  358. package/lib/mjs/components/columns/Columns.d.ts +3 -2
  359. package/lib/mjs/components/columns/Columns.form.d.ts +6 -3
  360. package/lib/mjs/components/columns/Columns.form.js +5 -0
  361. package/lib/mjs/components/columns/Columns.js +1 -1
  362. package/lib/mjs/components/container/Container.form.d.ts +6 -3
  363. package/lib/mjs/components/container/Container.form.js +5 -0
  364. package/lib/mjs/components/content/Content.d.ts +2 -1
  365. package/lib/mjs/components/content/Content.form.d.ts +6 -3
  366. package/lib/mjs/components/content/Content.form.js +5 -0
  367. package/lib/mjs/components/currency/Currency.form.d.ts +6 -3
  368. package/lib/mjs/components/currency/Currency.form.js +5 -0
  369. package/lib/mjs/components/currency/Currency.js +1 -2
  370. package/lib/mjs/components/datagrid/DataGrid.d.ts +17 -7
  371. package/lib/mjs/components/datagrid/DataGrid.form.d.ts +6 -3
  372. package/lib/mjs/components/datagrid/DataGrid.form.js +5 -0
  373. package/lib/mjs/components/datagrid/DataGrid.js +55 -37
  374. package/lib/mjs/components/datagrid/fixtures/comp-with-reorder.d.ts +100 -0
  375. package/lib/mjs/components/datagrid/fixtures/comp-with-reorder.js +137 -0
  376. package/lib/mjs/components/datagrid/fixtures/comp10.d.ts +81 -0
  377. package/lib/mjs/components/datagrid/fixtures/comp10.js +85 -0
  378. package/lib/mjs/components/datagrid/fixtures/comp9.d.ts +41 -0
  379. package/lib/mjs/components/datagrid/fixtures/comp9.js +42 -0
  380. package/lib/mjs/components/datagrid/fixtures/index.d.ts +4 -1
  381. package/lib/mjs/components/datagrid/fixtures/index.js +4 -1
  382. package/lib/mjs/components/datamap/DataMap.d.ts +1 -0
  383. package/lib/mjs/components/datamap/DataMap.form.d.ts +6 -3
  384. package/lib/mjs/components/datamap/DataMap.form.js +5 -0
  385. package/lib/mjs/components/datetime/DateTime.d.ts +0 -14
  386. package/lib/mjs/components/datetime/DateTime.form.d.ts +6 -3
  387. package/lib/mjs/components/datetime/DateTime.form.js +5 -0
  388. package/lib/mjs/components/datetime/editForm/DateTime.edit.date.js +1 -1
  389. package/lib/mjs/components/day/Day.d.ts +23 -49
  390. package/lib/mjs/components/day/Day.form.d.ts +6 -3
  391. package/lib/mjs/components/day/Day.form.js +5 -0
  392. package/lib/mjs/components/day/Day.js +16 -21
  393. package/lib/mjs/components/day/fixtures/comp7.d.ts +109 -0
  394. package/lib/mjs/components/day/fixtures/comp7.js +107 -0
  395. package/lib/mjs/components/day/fixtures/comp8.d.ts +41 -0
  396. package/lib/mjs/components/day/fixtures/comp8.js +38 -0
  397. package/lib/mjs/components/day/fixtures/index.d.ts +3 -1
  398. package/lib/mjs/components/day/fixtures/index.js +3 -1
  399. package/lib/mjs/components/editgrid/EditGrid.d.ts +7 -3
  400. package/lib/mjs/components/editgrid/EditGrid.form.d.ts +6 -3
  401. package/lib/mjs/components/editgrid/EditGrid.form.js +5 -0
  402. package/lib/mjs/components/editgrid/EditGrid.js +5 -5
  403. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -1
  404. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.js +1 -1
  405. package/lib/mjs/components/email/Email.form.d.ts +6 -3
  406. package/lib/mjs/components/email/Email.form.js +5 -0
  407. package/lib/mjs/components/fieldset/Fieldset.form.d.ts +6 -3
  408. package/lib/mjs/components/fieldset/Fieldset.form.js +5 -0
  409. package/lib/mjs/components/file/File.d.ts +9 -22
  410. package/lib/mjs/components/file/File.form.d.ts +6 -3
  411. package/lib/mjs/components/file/File.form.js +5 -0
  412. package/lib/mjs/components/file/File.js +1 -2
  413. package/lib/mjs/components/form/Form.d.ts +38 -20
  414. package/lib/mjs/components/form/Form.form.d.ts +6 -3
  415. package/lib/mjs/components/form/Form.form.js +5 -0
  416. package/lib/mjs/components/form/Form.js +25 -13
  417. package/lib/mjs/components/hidden/Hidden.d.ts +1 -11
  418. package/lib/mjs/components/hidden/Hidden.form.d.ts +6 -3
  419. package/lib/mjs/components/hidden/Hidden.form.js +5 -0
  420. package/lib/mjs/components/hidden/Hidden.js +1 -2
  421. package/lib/mjs/components/html/HTML.d.ts +2 -1
  422. package/lib/mjs/components/html/HTML.form.d.ts +6 -3
  423. package/lib/mjs/components/html/HTML.form.js +5 -0
  424. package/lib/mjs/components/number/Number.d.ts +3 -17
  425. package/lib/mjs/components/number/Number.form.d.ts +6 -3
  426. package/lib/mjs/components/number/Number.form.js +5 -0
  427. package/lib/mjs/components/number/Number.js +2 -3
  428. package/lib/mjs/components/number/fixtures/comp8.d.ts +32 -0
  429. package/lib/mjs/components/number/fixtures/comp8.js +26 -0
  430. package/lib/mjs/components/number/fixtures/index.d.ts +2 -1
  431. package/lib/mjs/components/number/fixtures/index.js +2 -1
  432. package/lib/mjs/components/panel/Panel.form.d.ts +6 -3
  433. package/lib/mjs/components/panel/Panel.form.js +5 -0
  434. package/lib/mjs/components/panel/Panel.js +0 -1
  435. package/lib/mjs/components/password/Password.form.d.ts +6 -3
  436. package/lib/mjs/components/password/Password.form.js +5 -0
  437. package/lib/mjs/components/phonenumber/PhoneNumber.form.d.ts +6 -3
  438. package/lib/mjs/components/phonenumber/PhoneNumber.form.js +5 -0
  439. package/lib/mjs/components/phonenumber/fixtures/comp2.d.ts +16 -0
  440. package/lib/mjs/components/phonenumber/fixtures/comp2.js +23 -0
  441. package/lib/mjs/components/phonenumber/fixtures/index.d.ts +2 -1
  442. package/lib/mjs/components/phonenumber/fixtures/index.js +2 -1
  443. package/lib/mjs/components/radio/Radio.d.ts +3 -26
  444. package/lib/mjs/components/radio/Radio.form.d.ts +6 -3
  445. package/lib/mjs/components/radio/Radio.form.js +5 -0
  446. package/lib/mjs/components/radio/Radio.js +6 -6
  447. package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +1 -1
  448. package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +6 -3
  449. package/lib/mjs/components/recaptcha/ReCaptcha.form.js +5 -0
  450. package/lib/mjs/components/select/Select.d.ts +16 -39
  451. package/lib/mjs/components/select/Select.form.d.ts +6 -3
  452. package/lib/mjs/components/select/Select.form.js +5 -0
  453. package/lib/mjs/components/select/Select.js +15 -19
  454. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +2 -17
  455. package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +6 -3
  456. package/lib/mjs/components/selectboxes/SelectBoxes.form.js +5 -0
  457. package/lib/mjs/components/selectboxes/SelectBoxes.js +7 -9
  458. package/lib/mjs/components/signature/Signature.d.ts +0 -14
  459. package/lib/mjs/components/signature/Signature.form.d.ts +6 -3
  460. package/lib/mjs/components/signature/Signature.form.js +5 -0
  461. package/lib/mjs/components/signature/Signature.js +1 -1
  462. package/lib/mjs/components/survey/Survey.d.ts +3 -15
  463. package/lib/mjs/components/survey/Survey.form.d.ts +6 -3
  464. package/lib/mjs/components/survey/Survey.form.js +5 -0
  465. package/lib/mjs/components/table/Table.d.ts +2 -1
  466. package/lib/mjs/components/table/Table.form.d.ts +6 -3
  467. package/lib/mjs/components/table/Table.form.js +5 -0
  468. package/lib/mjs/components/tabs/Tabs.d.ts +4 -4
  469. package/lib/mjs/components/tabs/Tabs.form.d.ts +6 -3
  470. package/lib/mjs/components/tabs/Tabs.form.js +5 -0
  471. package/lib/mjs/components/tabs/Tabs.js +1 -2
  472. package/lib/mjs/components/tags/Tags.d.ts +0 -14
  473. package/lib/mjs/components/tags/Tags.form.d.ts +6 -3
  474. package/lib/mjs/components/tags/Tags.form.js +5 -0
  475. package/lib/mjs/components/textarea/TextArea.d.ts +4 -9
  476. package/lib/mjs/components/textarea/TextArea.form.d.ts +6 -3
  477. package/lib/mjs/components/textarea/TextArea.form.js +5 -0
  478. package/lib/mjs/components/textarea/TextArea.js +2 -2
  479. package/lib/mjs/components/textfield/TextField.d.ts +14 -30
  480. package/lib/mjs/components/textfield/TextField.form.d.ts +6 -3
  481. package/lib/mjs/components/textfield/TextField.form.js +5 -0
  482. package/lib/mjs/components/textfield/TextField.js +16 -17
  483. package/lib/mjs/components/time/Time.form.d.ts +6 -3
  484. package/lib/mjs/components/time/Time.form.js +5 -0
  485. package/lib/mjs/components/unknown/Unknown.form.d.ts +5 -34
  486. package/lib/mjs/components/unknown/Unknown.form.js +4 -0
  487. package/lib/mjs/components/url/Url.form.d.ts +6 -3
  488. package/lib/mjs/components/url/Url.form.js +5 -0
  489. package/lib/mjs/components/well/Well.form.d.ts +6 -3
  490. package/lib/mjs/components/well/Well.form.js +5 -0
  491. package/lib/mjs/formio.embed.d.ts +1 -2
  492. package/lib/mjs/formio.embed.js +2 -99
  493. package/lib/mjs/formio.form.d.ts +11 -4
  494. package/lib/mjs/formio.form.js +10 -3
  495. package/lib/mjs/providers/Providers.d.ts +36 -5
  496. package/lib/mjs/providers/Providers.js +29 -0
  497. package/lib/mjs/providers/address/AddressProvider.d.ts +131 -12
  498. package/lib/mjs/providers/address/AddressProvider.js +88 -2
  499. package/lib/mjs/providers/address/AzureAddressProvider.d.ts +48 -1
  500. package/lib/mjs/providers/address/AzureAddressProvider.js +37 -0
  501. package/lib/mjs/providers/address/CustomAddressProvider.d.ts +27 -4
  502. package/lib/mjs/providers/address/CustomAddressProvider.js +34 -0
  503. package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +135 -6
  504. package/lib/mjs/providers/address/GoogleAddressProvider.js +94 -1
  505. package/lib/mjs/providers/address/NominatimAddressProvider.d.ts +32 -7
  506. package/lib/mjs/providers/address/NominatimAddressProvider.js +33 -0
  507. package/lib/mjs/providers/address/index.d.ts +3 -1
  508. package/lib/mjs/providers/processor/fileProcessor.d.ts +7 -1
  509. package/lib/mjs/providers/processor/fileProcessor.js +6 -0
  510. package/lib/mjs/providers/storage/azure.d.ts +6 -13
  511. package/lib/mjs/providers/storage/azure.js +5 -0
  512. package/lib/mjs/providers/storage/base64.d.ts +5 -6
  513. package/lib/mjs/providers/storage/base64.js +4 -0
  514. package/lib/mjs/providers/storage/dropbox.d.ts +6 -4
  515. package/lib/mjs/providers/storage/dropbox.js +5 -0
  516. package/lib/mjs/providers/storage/googleDrive.d.ts +7 -5
  517. package/lib/mjs/providers/storage/googleDrive.js +6 -0
  518. package/lib/mjs/providers/storage/indexeddb.d.ts +5 -7
  519. package/lib/mjs/providers/storage/indexeddb.js +4 -0
  520. package/lib/mjs/providers/storage/s3.d.ts +6 -20
  521. package/lib/mjs/providers/storage/s3.js +5 -0
  522. package/lib/mjs/providers/storage/url.d.ts +6 -7
  523. package/lib/mjs/providers/storage/url.js +10 -0
  524. package/lib/mjs/providers/storage/util.d.ts +24 -1
  525. package/lib/mjs/providers/storage/util.js +18 -0
  526. package/lib/mjs/templates/Templates.d.ts +1 -0
  527. package/lib/mjs/translations/en.d.ts +5 -0
  528. package/lib/mjs/translations/en.js +6 -1
  529. package/lib/mjs/utils/ChoicesWrapper.d.ts +1 -1
  530. package/lib/mjs/utils/ChoicesWrapper.js +13 -2
  531. package/lib/mjs/utils/Evaluator.d.ts +6 -3
  532. package/lib/mjs/utils/Evaluator.js +9 -20
  533. package/lib/mjs/utils/builder.d.ts +9 -7
  534. package/lib/mjs/utils/builder.js +10 -5
  535. package/lib/mjs/utils/calendarUtils.d.ts +7 -13
  536. package/lib/mjs/utils/calendarUtils.js +10 -17
  537. package/lib/mjs/utils/conditionOperators/IsEmptyValue.js +3 -3
  538. package/lib/mjs/utils/conditionOperators/IsEqualTo.js +1 -1
  539. package/lib/mjs/utils/formUtils.d.ts +43 -171
  540. package/lib/mjs/utils/formUtils.js +6 -554
  541. package/lib/mjs/utils/utils.d.ts +360 -223
  542. package/lib/mjs/utils/utils.js +387 -233
  543. package/lib/mjs/widgets/CalendarWidget.d.ts +9 -10
  544. package/lib/mjs/widgets/CalendarWidget.js +9 -11
  545. package/package.json +22 -23
  546. package/sdk.d.ts +1 -0
  547. package/utils.d.ts +1 -0
@@ -3,6 +3,11 @@ import FileEditData from './editForm/File.edit.data';
3
3
  import FileEditDisplay from './editForm/File.edit.display';
4
4
  import FileEditFile from './editForm/File.edit.file';
5
5
  import FileEditValidation from './editForm/File.edit.validation';
6
+ /**
7
+ * The Edit Form function.
8
+ * @param {...any} extend - The components that extend the edit form.
9
+ * @returns {import('@formio/core').Component[]} - The edit form components.
10
+ */
6
11
  export default function (...extend) {
7
12
  return Components.baseEditForm([
8
13
  {
@@ -649,8 +649,7 @@ export default class FileComponent extends Field {
649
649
  // Check if file with the same name is being uploaded
650
650
  const fileWithSameNameUploading = this.filesToSync.filesToUpload
651
651
  .some(fileToSync => fileToSync.file?.name === file.name);
652
- const fileWithSameNameUploaded = this.dataValue
653
- .some(fileStatus => fileStatus.originalName === file.name);
652
+ const fileWithSameNameUploaded = _.some(this.dataValue, fileStatus => fileStatus.originalName === file.name);
654
653
  return fileWithSameNameUploaded || fileWithSameNameUploading
655
654
  ? {
656
655
  status: 'error',
@@ -13,41 +13,47 @@ export default class FormComponent extends Component {
13
13
  valueChanged: boolean | undefined;
14
14
  subForm: any;
15
15
  formSrc: any;
16
- get dataReady(): any;
16
+ get dataReady(): Promise<any>;
17
17
  get emptyValue(): {
18
18
  data: {};
19
19
  };
20
- get ready(): any;
20
+ get ready(): Promise<any>;
21
21
  get useOriginalRevision(): any;
22
22
  setFormRevision(rev: any): void;
23
23
  subFormRevision: any;
24
24
  getComponent(path: any, fn: any): any;
25
25
  getSubOptions(options?: {}): {};
26
- render(): any;
26
+ render(): string;
27
27
  asString(value: any): any;
28
- attach(element: any): Promise<any>;
28
+ /**
29
+ * Prints out the value of form components as a datagrid value.
30
+ */
31
+ getValueAsString(value: any, options: any): any;
32
+ attach(element: any): Promise<void>;
29
33
  get hasLoadedForm(): any;
30
34
  get isRevisionChanged(): any;
31
- subFormReady: any;
35
+ subFormReady: Promise<any> | null | undefined;
32
36
  /**
33
37
  * Pass everyComponent to subform.
34
- * @param args
35
- * @returns {*|void}
38
+ * @param {any[]} args - Arguments to pass through to the subform's everyComponent method.
39
+ * @returns {*} - The result of the subform's everyComponent method.
36
40
  */
37
- everyComponent(...args: any[]): any | void;
41
+ everyComponent(...args: any[]): any;
38
42
  setSubFormDisabled(subForm: any): void;
39
43
  updateSubWizards(subForm: any): void;
40
44
  /**
41
45
  * Create a subform instance.
42
- *
43
- * @return {*}
46
+ * @param {boolean} [fromAttach] - This function is being called from an `attach` method.
47
+ * @returns {*} - The subform instance.
44
48
  */
45
- createSubForm(fromAttach: any): any;
49
+ createSubForm(fromAttach?: boolean | undefined): any;
46
50
  hideSubmitButton(component: any): void;
47
51
  /**
48
52
  * Load the subform.
53
+ * @param {boolean} fromAttach - This function is being called from an `attach` method.
54
+ * @returns {Promise} - The promise that resolves when the subform is loaded.
49
55
  */
50
- loadSubForm(fromAttach: any): any;
56
+ loadSubForm(fromAttach: boolean): Promise<any>;
51
57
  subFormLoading: boolean | undefined;
52
58
  get subFormData(): any;
53
59
  checkComponentValidity(data: any, dirty: any, row: any, options: any, errors?: any[]): any;
@@ -56,35 +62,47 @@ export default class FormComponent extends Component {
56
62
  setPristine(pristine: any): void;
57
63
  /**
58
64
  * Determine if the subform should be submitted.
59
- * @return {*|boolean}
65
+ * @returns {*|boolean} - TRUE if the subform should be submitted, FALSE if it should not.
60
66
  */
61
67
  get shouldSubmit(): any;
62
68
  /**
63
69
  * Returns the data for the subform.
64
- *
65
- * @return {*}
70
+ * @returns {*} - the data for the subform.
66
71
  */
67
72
  getSubFormData(): any;
68
73
  /**
69
74
  * Submit the subform if configured to do so.
70
- *
71
- * @return {*}
75
+ * @returns {Promise} - The promise that resolves when the subform is submitted.
72
76
  */
73
- submitSubForm(): any;
77
+ submitSubForm(): Promise<any>;
74
78
  /**
75
79
  * Submit the form before the next page is triggered.
80
+ * @param {Function} next - The function to trigger the next page.
81
+ * @returns {Promise} - The promise that resolves when the subform submission is complete (if necessary) and the next page is triggered.
82
+ */
83
+ beforePage(next: Function): Promise<any>;
84
+ /**
85
+ * Submit the form before the whole form is triggered.
86
+ * @returns {Promise} - The promise that resolves when the subform submission is complete (if necessary) and the form is submitted.
76
87
  */
77
- beforePage(next: any): any;
88
+ beforeSubmit(): Promise<any>;
78
89
  isSubFormLazyLoad(): any;
79
90
  isHidden(): boolean;
80
91
  setValue(submission: any, flags?: {}): boolean;
81
92
  setSubFormValue(submission: any, flags: any): void;
93
+ /**
94
+ * Sets the subform value
95
+ * @param {object|null|undefined} submission - The submission to set.
96
+ * @param {object|null|undefined} flags - Any flags to apply when setting the submission.
97
+ * @returns {void}
98
+ */
99
+ onSetSubFormValue(submission: object | null | undefined, flags: object | null | undefined): void;
82
100
  areAllComponentsEmpty(data: any): boolean;
83
101
  updateSubFormVisibility(): void;
84
102
  /**
85
103
  * Determines if this form is a Nested Wizard
86
104
  * which means it should be a Wizard itself and should be a direct child of a Wizard's page
87
- * @returns {boolean}
105
+ * @returns {boolean} - TRUE if this form is a Nested Wizard, FALSE otherwise
88
106
  */
89
107
  get isNestedWizard(): boolean;
90
108
  isInternalEvent(event: any): boolean;
@@ -1,3 +1,6 @@
1
- export default function _default(...extend: any[]): {
2
- components: any;
3
- };
1
+ /**
2
+ * The Edit Form function.
3
+ * @param {...any} extend - The components that extend the edit form.
4
+ * @returns {import('@formio/core').Component[]} - The edit form components.
5
+ */
6
+ export default function _default(...extend: any[]): import('@formio/core').Component[];
@@ -2,6 +2,11 @@ import nestedComponentForm from '../_classes/nested/NestedComponent.form';
2
2
  import FormEditDisplay from './editForm/Form.edit.display';
3
3
  import FormEditForm from './editForm/Form.edit.form';
4
4
  import FormEditData from './editForm/Form.edit.data';
5
+ /**
6
+ * The Edit Form function.
7
+ * @param {...any} extend - The components that extend the edit form.
8
+ * @returns {import('@formio/core').Component[]} - The edit form components.
9
+ */
5
10
  export default function (...extend) {
6
11
  return nestedComponentForm([
7
12
  {
@@ -346,8 +346,8 @@ export default class FormComponent extends Component {
346
346
  }
347
347
  /**
348
348
  * Pass everyComponent to subform.
349
- * @param args
350
- * @returns {*|void}
349
+ * @param {any[]} args - Arguments to pass through to the subform's everyComponent method.
350
+ * @returns {*} - The result of the subform's everyComponent method.
351
351
  */
352
352
  everyComponent(...args) {
353
353
  if (this.subForm) {
@@ -371,8 +371,8 @@ export default class FormComponent extends Component {
371
371
  }
372
372
  /**
373
373
  * Create a subform instance.
374
- *
375
- * @return {*}
374
+ * @param {boolean} [fromAttach] - This function is being called from an `attach` method.
375
+ * @returns {*} - The subform instance.
376
376
  */
377
377
  createSubForm(fromAttach) {
378
378
  this.subFormReady = this.loadSubForm(fromAttach).then((form) => {
@@ -425,6 +425,8 @@ export default class FormComponent extends Component {
425
425
  }
426
426
  /**
427
427
  * Load the subform.
428
+ * @param {boolean} fromAttach - This function is being called from an `attach` method.
429
+ * @returns {Promise} - The promise that resolves when the subform is loaded.
428
430
  */
429
431
  loadSubForm(fromAttach) {
430
432
  if (this.builderMode || this.isHidden() || (this.isSubFormLazyLoad() && !fromAttach)) {
@@ -440,7 +442,7 @@ export default class FormComponent extends Component {
440
442
  }
441
443
  else if (this.formSrc) {
442
444
  this.subFormLoading = true;
443
- const options = this.root.formio?.base && this.root.formio?.projectUrl
445
+ const options = this.root?.formio?.base && this.root?.formio?.projectUrl
444
446
  ? {
445
447
  base: this.root.formio.base,
446
448
  project: this.root.formio.projectUrl,
@@ -507,15 +509,14 @@ export default class FormComponent extends Component {
507
509
  }
508
510
  /**
509
511
  * Determine if the subform should be submitted.
510
- * @return {*|boolean}
512
+ * @returns {*|boolean} - TRUE if the subform should be submitted, FALSE if it should not.
511
513
  */
512
514
  get shouldSubmit() {
513
515
  return this.subFormReady && (!this.component.hasOwnProperty('reference') || this.component.reference) && !this.isHidden();
514
516
  }
515
517
  /**
516
518
  * Returns the data for the subform.
517
- *
518
- * @return {*}
519
+ * @returns {*} - the data for the subform.
519
520
  */
520
521
  getSubFormData() {
521
522
  if (_.get(this.subForm, 'form.display') === 'pdf') {
@@ -527,8 +528,7 @@ export default class FormComponent extends Component {
527
528
  }
528
529
  /**
529
530
  * Submit the subform if configured to do so.
530
- *
531
- * @return {*}
531
+ * @returns {Promise} - The promise that resolves when the subform is submitted.
532
532
  */
533
533
  submitSubForm() {
534
534
  // If we wish to submit the form on next page, then do that here.
@@ -555,6 +555,8 @@ export default class FormComponent extends Component {
555
555
  }
556
556
  /**
557
557
  * Submit the form before the next page is triggered.
558
+ * @param {Function} next - The function to trigger the next page.
559
+ * @returns {Promise} - The promise that resolves when the subform submission is complete (if necessary) and the next page is triggered.
558
560
  */
559
561
  beforePage(next) {
560
562
  // Should not submit child forms if we are going to the previous page
@@ -565,6 +567,7 @@ export default class FormComponent extends Component {
565
567
  }
566
568
  /**
567
569
  * Submit the form before the whole form is triggered.
570
+ * @returns {Promise} - The promise that resolves when the subform submission is complete (if necessary) and the form is submitted.
568
571
  */
569
572
  beforeSubmit() {
570
573
  const submission = this.dataValue;
@@ -624,7 +627,7 @@ export default class FormComponent extends Component {
624
627
  if (shouldLoadSubmissionById || shouldLoadDraftById) {
625
628
  const formId = submission.form || this.formObj.form || this.component.form;
626
629
  const submissionUrl = `${this.subForm.formio.formsUrl}/${formId}/submission/${submission._id || this.subForm.submission._id}`;
627
- const options = this.root.formio?.base && this.root.formio?.projectUrl
630
+ const options = this.root?.formio?.base && this.root?.formio?.projectUrl
628
631
  ? {
629
632
  base: this.root.formio.base,
630
633
  project: this.root.formio.projectUrl,
@@ -636,9 +639,18 @@ export default class FormComponent extends Component {
636
639
  });
637
640
  }
638
641
  else {
639
- this.subForm.setValue(submission, flags);
642
+ this.onSetSubFormValue(submission, flags);
640
643
  }
641
644
  }
645
+ /**
646
+ * Sets the subform value
647
+ * @param {object|null|undefined} submission - The submission to set.
648
+ * @param {object|null|undefined} flags - Any flags to apply when setting the submission.
649
+ * @returns {void}
650
+ */
651
+ onSetSubFormValue(submission, flags) {
652
+ this.subForm.setValue(submission, flags);
653
+ }
642
654
  isEmpty(value = this.dataValue) {
643
655
  return value === null || _.isEqual(value, this.emptyValue) || (this.areAllComponentsEmpty(value?.data) && !value?._id);
644
656
  }
@@ -676,7 +688,7 @@ export default class FormComponent extends Component {
676
688
  /**
677
689
  * Determines if this form is a Nested Wizard
678
690
  * which means it should be a Wizard itself and should be a direct child of a Wizard's page
679
- * @returns {boolean}
691
+ * @returns {boolean} - TRUE if this form is a Nested Wizard, FALSE otherwise
680
692
  */
681
693
  get isNestedWizard() {
682
694
  return this.subForm?._form?.display === 'wizard' && this.parent?.parent?._form?.display === 'wizard';
@@ -8,17 +8,7 @@ export default class HiddenComponent extends Input {
8
8
  showPreview: boolean;
9
9
  schema: any;
10
10
  };
11
- get inputInfo(): {
12
- type: string;
13
- component: any;
14
- changeEvent: string;
15
- attr: {
16
- name: any;
17
- type: any;
18
- class: string;
19
- lang: any;
20
- };
21
- };
11
+ get inputInfo(): any;
22
12
  labelIsHidden(): boolean;
23
13
  get emptyValue(): string;
24
14
  setValue(value: any, flags?: {}): boolean;
@@ -1,3 +1,6 @@
1
- export default function _default(...extend: any[]): {
2
- components: any;
3
- };
1
+ /**
2
+ * The Edit Form function.
3
+ * @param {...any} extend - The components that extend the edit form.
4
+ * @returns {import('@formio/core').Component[]} - The edit form components.
5
+ */
6
+ export default function _default(...extend: any[]): import('@formio/core').Component[];
@@ -1,6 +1,11 @@
1
1
  import Components from '../Components';
2
2
  import HiddenEditDisplay from './editForm/Hidden.edit.display';
3
3
  import HiddenEditData from './editForm/Hidden.edit.data';
4
+ /**
5
+ * The Edit Form function.
6
+ * @param {...any} extend - The components that extend the edit form.
7
+ * @returns {import('@formio/core').Component[]} - The edit form components.
8
+ */
4
9
  export default function (...extend) {
5
10
  return Components.baseEditForm([
6
11
  {
@@ -33,8 +33,7 @@ export default class HiddenComponent extends Input {
33
33
  }
34
34
  /**
35
35
  * Check if a component is eligible for multiple validation
36
- *
37
- * @return {boolean}
36
+ * @returns {boolean} - If the component is eligible for multiple validation.
38
37
  */
39
38
  validateMultiple() {
40
39
  // Since "arrays" are able to be stored in hidden components, we need to turn off multiple validation.
@@ -13,7 +13,8 @@ export default class HTMLComponent extends Component {
13
13
  get singleTags(): string[];
14
14
  checkRefreshOn(changed: any): void;
15
15
  renderContent(): any;
16
- render(): any;
16
+ render(): string;
17
17
  get dataReady(): any;
18
+ attach(element: any): Promise<void>;
18
19
  }
19
20
  import Component from '../_classes/component/Component';
@@ -1,3 +1,6 @@
1
- export default function _default(...extend: any[]): {
2
- components: any;
3
- };
1
+ /**
2
+ * The Edit Form function.
3
+ * @param {...any} extend - The components that extend the edit form.
4
+ * @returns {import('@formio/core').Component[]} - The edit form components.
5
+ */
6
+ export default function _default(...extend: any[]): import('@formio/core').Component[];
@@ -1,6 +1,11 @@
1
1
  import Components from '../Components';
2
2
  import HTMLEditDisplay from './editForm/HTML.edit.display';
3
3
  import HTMLEditLogic from './editForm/HTML.edit.logic';
4
+ /**
5
+ * The Edit Form function.
6
+ * @param {...any} extend - The components that extend the edit form.
7
+ * @returns {import('@formio/core').Component[]} - The edit form components.
8
+ */
4
9
  export default function (...extend) {
5
10
  return Components.baseEditForm([
6
11
  {
@@ -10,35 +10,20 @@ export default class NumberComponent extends Input {
10
10
  static get serverConditionSettings(): {
11
11
  operators: any[];
12
12
  valueComponent(classComp: any): any;
13
- constructor: Function;
14
- toString(): string;
15
- toLocaleString(): string;
16
- valueOf(): Object;
17
- hasOwnProperty(v: PropertyKey): boolean;
18
- isPrototypeOf(v: Object): boolean;
19
- propertyIsEnumerable(v: PropertyKey): boolean;
20
13
  };
21
14
  static get conditionOperatorsSettings(): {
22
15
  operators: any[];
23
16
  valueComponent(classComp: any): any;
24
- constructor: Function;
25
- toString(): string;
26
- toLocaleString(): string;
27
- valueOf(): Object;
28
- hasOwnProperty(v: PropertyKey): boolean;
29
- isPrototypeOf(v: Object): boolean;
30
- propertyIsEnumerable(v: PropertyKey): boolean;
31
17
  };
32
18
  static savedValueTypes(schema: any): string[];
33
19
  constructor(...args: any[]);
34
20
  decimalSeparator: any;
35
21
  delimiter: any;
36
- decimalLimit: any;
22
+ decimalLimit: number;
37
23
  numberMask: any;
38
24
  /**
39
25
  * Creates the number mask for normal numbers.
40
- *
41
- * @return {*}
26
+ * @returns {*} - The number mask.
42
27
  */
43
28
  createNumberMask(): any;
44
29
  isDecimalAllowed(): any;
@@ -49,5 +34,6 @@ export default class NumberComponent extends Input {
49
34
  parseValue(input: any): number;
50
35
  focus(): void;
51
36
  getMaskedValue(value: any): any;
37
+ getValueAsString(value: any, options: any): any;
52
38
  }
53
39
  import Input from '../_classes/input/Input';
@@ -1,3 +1,6 @@
1
- export default function _default(...extend: any[]): {
2
- components: any;
3
- };
1
+ /**
2
+ * The Edit Form function.
3
+ * @param {...any} extend - The components that extend the edit form.
4
+ * @returns {import('@formio/core').Component[]} - The edit form components.
5
+ */
6
+ export default function _default(...extend: any[]): import('@formio/core').Component[];
@@ -2,6 +2,11 @@ import textEditForm from '../textfield/TextField.form';
2
2
  import NumberEditDisplay from './editForm/Number.edit.display';
3
3
  import NumberEditData from './editForm/Number.edit.data';
4
4
  import NumberEditValidation from './editForm/Number.edit.validation';
5
+ /**
6
+ * The Edit Form function.
7
+ * @param {...any} extend - The components that extend the edit form.
8
+ * @returns {import('@formio/core').Component[]} - The edit form components.
9
+ */
5
10
  export default function (...extend) {
6
11
  return textEditForm([
7
12
  {
@@ -46,7 +46,7 @@ export default class NumberComponent extends Input {
46
46
  constructor(...args) {
47
47
  super(...args);
48
48
  const separators = getNumberSeparators(this.options.language || navigator.language);
49
- this.decimalSeparator = this.options.decimalSeparator = this.options.decimalSeparator
49
+ this.decimalSeparator = this.options.decimalSeparator = this.component.decimalSymbol || this.options.decimalSeparator
50
50
  || this.options.properties?.decimalSeparator
51
51
  || separators.decimalSeparator;
52
52
  if (this.component.delimiter) {
@@ -70,8 +70,7 @@ export default class NumberComponent extends Input {
70
70
  }
71
71
  /**
72
72
  * Creates the number mask for normal numbers.
73
- *
74
- * @return {*}
73
+ * @returns {*} - The number mask.
75
74
  */
76
75
  createNumberMask() {
77
76
  return createNumberMask({
@@ -0,0 +1,32 @@
1
+ declare namespace _default {
2
+ let components: ({
3
+ label: string;
4
+ applyMaskOn: string;
5
+ mask: boolean;
6
+ tableView: boolean;
7
+ delimiter: boolean;
8
+ requireDecimal: boolean;
9
+ inputFormat: string;
10
+ truncateMultipleSpaces: boolean;
11
+ key: string;
12
+ type: string;
13
+ input: boolean;
14
+ decimalSymbol: string;
15
+ disableOnInvalid?: undefined;
16
+ } | {
17
+ type: string;
18
+ label: string;
19
+ key: string;
20
+ disableOnInvalid: boolean;
21
+ input: boolean;
22
+ tableView: boolean;
23
+ applyMaskOn?: undefined;
24
+ mask?: undefined;
25
+ delimiter?: undefined;
26
+ requireDecimal?: undefined;
27
+ inputFormat?: undefined;
28
+ truncateMultipleSpaces?: undefined;
29
+ decimalSymbol?: undefined;
30
+ })[];
31
+ }
32
+ export default _default;
@@ -0,0 +1,26 @@
1
+ export default {
2
+ components: [
3
+ {
4
+ "label": "Number",
5
+ "applyMaskOn": "change",
6
+ "mask": false,
7
+ "tableView": false,
8
+ "delimiter": false,
9
+ "requireDecimal": false,
10
+ "inputFormat": "plain",
11
+ "truncateMultipleSpaces": false,
12
+ "key": "number",
13
+ "type": "number",
14
+ "input": true,
15
+ "decimalSymbol": "-"
16
+ },
17
+ {
18
+ "type": "button",
19
+ "label": "Submit",
20
+ "key": "submit",
21
+ "disableOnInvalid": true,
22
+ "input": true,
23
+ "tableView": false
24
+ }
25
+ ]
26
+ };
@@ -5,4 +5,5 @@ import comp4 from './comp4';
5
5
  import comp5 from './comp5';
6
6
  import comp6 from './comp6';
7
7
  import comp7 from './comp7';
8
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7 };
8
+ import comp8 from './comp8';
9
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
@@ -5,4 +5,5 @@ import comp4 from './comp4';
5
5
  import comp5 from './comp5';
6
6
  import comp6 from './comp6';
7
7
  import comp7 from './comp7';
8
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7 };
8
+ import comp8 from './comp8';
9
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
@@ -1,3 +1,6 @@
1
- export default function _default(...extend: any[]): {
2
- components: any;
3
- };
1
+ /**
2
+ * The Edit Form function.
3
+ * @param {...any} extend - The components that extend the edit form.
4
+ * @returns {import('@formio/core').Component[]} - The edit form components.
5
+ */
6
+ export default function _default(...extend: any[]): import('@formio/core').Component[];
@@ -1,6 +1,11 @@
1
1
  import nestedComponentForm from '../_classes/nested/NestedComponent.form';
2
2
  import PanelEditDisplay from './editForm/Panel.edit.display';
3
3
  import PanelEditConditional from './editForm/Panel.edit.conditional';
4
+ /**
5
+ * The Edit Form function.
6
+ * @param {...any} extend - The components that extend the edit form.
7
+ * @returns {import('@formio/core').Component[]} - The edit form components.
8
+ */
4
9
  export default function (...extend) {
5
10
  return nestedComponentForm([
6
11
  {
@@ -1,6 +1,5 @@
1
1
  import NestedComponent from '../_classes/nested/NestedComponent';
2
2
  import { isChildOf } from '../../utils/utils';
3
- import FormComponent from '../form/Form';
4
3
  export default class PanelComponent extends NestedComponent {
5
4
  static schema(...extend) {
6
5
  return NestedComponent.schema({
@@ -1,3 +1,6 @@
1
- export default function _default(...extend: any[]): {
2
- components: any;
3
- };
1
+ /**
2
+ * The Edit Form function.
3
+ * @param {...any} extend - The components that extend the edit form.
4
+ * @returns {import('@formio/core').Component[]} - The edit form components.
5
+ */
6
+ export default function _default(...extend: any[]): import('@formio/core').Component[];
@@ -2,6 +2,11 @@ import textEditForm from '../textfield/TextField.form';
2
2
  import PasswordEditDisplay from './editForm/Password.edit.display';
3
3
  import PasswordEditData from './editForm/Password.edit.data';
4
4
  import PasswordEditValidation from './editForm/Password.edit.validation';
5
+ /**
6
+ * The Edit Form function.
7
+ * @param {...any} extend - The components that extend the edit form.
8
+ * @returns {import('@formio/core').Component[]} - The edit form components.
9
+ */
5
10
  export default function (...extend) {
6
11
  return textEditForm([
7
12
  {
@@ -1,3 +1,6 @@
1
- export default function _default(...extend: any[]): {
2
- components: any;
3
- };
1
+ /**
2
+ * The Edit Form function.
3
+ * @param {...any} extend - The components that extend the edit form.
4
+ * @returns {import('@formio/core').Component[]} - The edit form components.
5
+ */
6
+ export default function _default(...extend: any[]): import('@formio/core').Component[];
@@ -1,5 +1,10 @@
1
1
  import textEditForm from '../textfield/TextField.form';
2
2
  import PhoneNumberEditValidation from './editForm/PhoneNumber.edit.validation';
3
+ /**
4
+ * The Edit Form function.
5
+ * @param {...any} extend - The components that extend the edit form.
6
+ * @returns {import('@formio/core').Component[]} - The edit form components.
7
+ */
3
8
  export default function (...extend) {
4
9
  return textEditForm([
5
10
  {
@@ -0,0 +1,16 @@
1
+ declare namespace _default {
2
+ let components: {
3
+ label: string;
4
+ applyMaskOn: string;
5
+ allowMultipleMasks: boolean;
6
+ tableView: boolean;
7
+ key: string;
8
+ type: string;
9
+ inputMasks: {
10
+ label: string;
11
+ mask: string;
12
+ }[];
13
+ input: boolean;
14
+ }[];
15
+ }
16
+ export default _default;