@formio/js 5.0.0-dev.5636.99a32e6 → 5.0.0-dev.5641.6eb7b96

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 (453) hide show
  1. package/Changelog.md +45 -0
  2. package/dist/formio.embed.js +1 -1
  3. package/dist/formio.embed.min.js +1 -1
  4. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  5. package/dist/formio.form.js +607 -1188
  6. package/dist/formio.form.min.js +1 -1
  7. package/dist/formio.form.min.js.LICENSE.txt +3 -5
  8. package/dist/formio.full.js +651 -912
  9. package/dist/formio.full.min.js +1 -1
  10. package/dist/formio.full.min.js.LICENSE.txt +3 -5
  11. package/dist/formio.js +18 -18
  12. package/dist/formio.min.js +1 -1
  13. package/dist/formio.min.js.LICENSE.txt +1 -1
  14. package/dist/formio.utils.js +1829 -492
  15. package/dist/formio.utils.min.js +1 -1
  16. package/dist/formio.utils.min.js.LICENSE.txt +10 -4
  17. package/embed.d.ts +1 -0
  18. package/form.d.ts +1 -0
  19. package/lib/cjs/CDN.d.ts +1 -0
  20. package/lib/cjs/CDN.js +6 -3
  21. package/lib/cjs/Element.d.ts +86 -96
  22. package/lib/cjs/Element.js +68 -78
  23. package/lib/cjs/Embed.d.ts +1 -1
  24. package/lib/cjs/Embed.js +52 -12
  25. package/lib/cjs/Form.d.ts +365 -36
  26. package/lib/cjs/Form.js +50 -64
  27. package/lib/cjs/FormBuilder.d.ts +187 -2
  28. package/lib/cjs/FormBuilder.js +30 -8
  29. package/lib/cjs/InlineEmbed.d.ts +7 -0
  30. package/lib/cjs/InlineEmbed.js +116 -0
  31. package/lib/cjs/PDF.d.ts +11 -13
  32. package/lib/cjs/PDF.js +6 -8
  33. package/lib/cjs/Webform.d.ts +180 -139
  34. package/lib/cjs/Webform.js +311 -297
  35. package/lib/cjs/WebformBuilder.d.ts +16 -14
  36. package/lib/cjs/WebformBuilder.js +19 -12
  37. package/lib/cjs/Wizard.d.ts +31 -21
  38. package/lib/cjs/Wizard.js +43 -20
  39. package/lib/cjs/WizardBuilder.d.ts +1 -1
  40. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +8 -5
  41. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +6 -3
  42. package/lib/cjs/components/Components.d.ts +4 -4
  43. package/lib/cjs/components/Components.js +3 -3
  44. package/lib/cjs/components/_classes/component/Component.d.ts +502 -269
  45. package/lib/cjs/components/_classes/component/Component.form.d.ts +6 -3
  46. package/lib/cjs/components/_classes/component/Component.form.js +5 -0
  47. package/lib/cjs/components/_classes/component/Component.js +434 -193
  48. package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +0 -8
  49. package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +2 -2
  50. package/lib/cjs/components/_classes/component/editForm/utils.js +2 -2
  51. package/lib/cjs/components/_classes/field/Field.d.ts +11 -2
  52. package/lib/cjs/components/_classes/field/Field.js +13 -1
  53. package/lib/cjs/components/_classes/input/Input.d.ts +4 -3
  54. package/lib/cjs/components/_classes/input/Input.js +2 -2
  55. package/lib/cjs/components/_classes/list/ListComponent.d.ts +2 -2
  56. package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +6 -3
  57. package/lib/cjs/components/_classes/list/ListComponent.form.js +5 -0
  58. package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +43 -12
  59. package/lib/cjs/components/_classes/multivalue/Multivalue.js +37 -3
  60. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +163 -67
  61. package/lib/cjs/components/_classes/nested/NestedComponent.form.d.ts +6 -3
  62. package/lib/cjs/components/_classes/nested/NestedComponent.form.js +5 -0
  63. package/lib/cjs/components/_classes/nested/NestedComponent.js +175 -54
  64. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +2 -2
  65. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
  66. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +7 -1
  67. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +2 -3
  68. package/lib/cjs/components/address/Address.d.ts +4 -2
  69. package/lib/cjs/components/address/Address.form.d.ts +6 -3
  70. package/lib/cjs/components/address/Address.form.js +5 -0
  71. package/lib/cjs/components/button/Button.d.ts +3 -12
  72. package/lib/cjs/components/button/Button.form.d.ts +6 -3
  73. package/lib/cjs/components/button/Button.form.js +5 -0
  74. package/lib/cjs/components/button/Button.js +5 -0
  75. package/lib/cjs/components/checkbox/Checkbox.d.ts +4 -27
  76. package/lib/cjs/components/checkbox/Checkbox.form.d.ts +6 -3
  77. package/lib/cjs/components/checkbox/Checkbox.form.js +5 -0
  78. package/lib/cjs/components/columns/Columns.d.ts +3 -2
  79. package/lib/cjs/components/columns/Columns.form.d.ts +6 -3
  80. package/lib/cjs/components/columns/Columns.form.js +5 -0
  81. package/lib/cjs/components/columns/Columns.js +1 -1
  82. package/lib/cjs/components/container/Container.form.d.ts +6 -3
  83. package/lib/cjs/components/container/Container.form.js +5 -0
  84. package/lib/cjs/components/content/Content.d.ts +2 -1
  85. package/lib/cjs/components/content/Content.form.d.ts +6 -3
  86. package/lib/cjs/components/content/Content.form.js +5 -0
  87. package/lib/cjs/components/currency/Currency.form.d.ts +6 -3
  88. package/lib/cjs/components/currency/Currency.form.js +5 -0
  89. package/lib/cjs/components/currency/Currency.js +1 -2
  90. package/lib/cjs/components/datagrid/DataGrid.d.ts +8 -7
  91. package/lib/cjs/components/datagrid/DataGrid.form.d.ts +6 -3
  92. package/lib/cjs/components/datagrid/DataGrid.form.js +5 -0
  93. package/lib/cjs/components/datagrid/DataGrid.js +5 -5
  94. package/lib/cjs/components/datamap/DataMap.d.ts +1 -0
  95. package/lib/cjs/components/datamap/DataMap.form.d.ts +6 -3
  96. package/lib/cjs/components/datamap/DataMap.form.js +5 -0
  97. package/lib/cjs/components/datetime/DateTime.d.ts +0 -14
  98. package/lib/cjs/components/datetime/DateTime.form.d.ts +6 -3
  99. package/lib/cjs/components/datetime/DateTime.form.js +5 -0
  100. package/lib/cjs/components/datetime/editForm/DateTime.edit.date.js +2 -2
  101. package/lib/cjs/components/day/Day.d.ts +22 -48
  102. package/lib/cjs/components/day/Day.form.d.ts +6 -3
  103. package/lib/cjs/components/day/Day.form.js +5 -0
  104. package/lib/cjs/components/day/Day.js +15 -20
  105. package/lib/cjs/components/editgrid/EditGrid.d.ts +7 -3
  106. package/lib/cjs/components/editgrid/EditGrid.form.d.ts +6 -3
  107. package/lib/cjs/components/editgrid/EditGrid.form.js +5 -0
  108. package/lib/cjs/components/editgrid/EditGrid.js +3 -3
  109. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +2 -5
  110. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.js +6 -9
  111. package/lib/cjs/components/email/Email.form.d.ts +6 -3
  112. package/lib/cjs/components/email/Email.form.js +5 -0
  113. package/lib/cjs/components/fieldset/Fieldset.form.d.ts +6 -3
  114. package/lib/cjs/components/fieldset/Fieldset.form.js +5 -0
  115. package/lib/cjs/components/file/File.d.ts +9 -22
  116. package/lib/cjs/components/file/File.form.d.ts +6 -3
  117. package/lib/cjs/components/file/File.form.js +5 -0
  118. package/lib/cjs/components/form/Form.d.ts +31 -20
  119. package/lib/cjs/components/form/Form.form.d.ts +6 -3
  120. package/lib/cjs/components/form/Form.form.js +5 -0
  121. package/lib/cjs/components/form/Form.js +16 -12
  122. package/lib/cjs/components/hidden/Hidden.d.ts +1 -11
  123. package/lib/cjs/components/hidden/Hidden.form.d.ts +6 -3
  124. package/lib/cjs/components/hidden/Hidden.form.js +5 -0
  125. package/lib/cjs/components/hidden/Hidden.js +1 -2
  126. package/lib/cjs/components/html/HTML.d.ts +2 -1
  127. package/lib/cjs/components/html/HTML.form.d.ts +6 -3
  128. package/lib/cjs/components/html/HTML.form.js +5 -0
  129. package/lib/cjs/components/number/Number.d.ts +3 -17
  130. package/lib/cjs/components/number/Number.form.d.ts +6 -3
  131. package/lib/cjs/components/number/Number.form.js +5 -0
  132. package/lib/cjs/components/number/Number.js +1 -2
  133. package/lib/cjs/components/panel/Panel.form.d.ts +6 -3
  134. package/lib/cjs/components/panel/Panel.form.js +5 -0
  135. package/lib/cjs/components/panel/Panel.js +0 -1
  136. package/lib/cjs/components/password/Password.form.d.ts +6 -3
  137. package/lib/cjs/components/password/Password.form.js +5 -0
  138. package/lib/cjs/components/phonenumber/PhoneNumber.form.d.ts +6 -3
  139. package/lib/cjs/components/phonenumber/PhoneNumber.form.js +5 -0
  140. package/lib/cjs/components/radio/Radio.d.ts +3 -26
  141. package/lib/cjs/components/radio/Radio.form.d.ts +6 -3
  142. package/lib/cjs/components/radio/Radio.form.js +5 -0
  143. package/lib/cjs/components/radio/Radio.js +3 -4
  144. package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +1 -1
  145. package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +6 -3
  146. package/lib/cjs/components/recaptcha/ReCaptcha.form.js +5 -0
  147. package/lib/cjs/components/select/Select.d.ts +16 -39
  148. package/lib/cjs/components/select/Select.form.d.ts +6 -3
  149. package/lib/cjs/components/select/Select.form.js +5 -0
  150. package/lib/cjs/components/select/Select.js +14 -17
  151. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +2 -17
  152. package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +6 -3
  153. package/lib/cjs/components/selectboxes/SelectBoxes.form.js +5 -0
  154. package/lib/cjs/components/selectboxes/SelectBoxes.js +7 -9
  155. package/lib/cjs/components/signature/Signature.d.ts +1 -14
  156. package/lib/cjs/components/signature/Signature.form.d.ts +6 -3
  157. package/lib/cjs/components/signature/Signature.form.js +5 -0
  158. package/lib/cjs/components/survey/Survey.d.ts +3 -15
  159. package/lib/cjs/components/survey/Survey.form.d.ts +6 -3
  160. package/lib/cjs/components/survey/Survey.form.js +5 -0
  161. package/lib/cjs/components/table/Table.d.ts +2 -1
  162. package/lib/cjs/components/table/Table.form.d.ts +6 -3
  163. package/lib/cjs/components/table/Table.form.js +5 -0
  164. package/lib/cjs/components/tabs/Tabs.d.ts +4 -4
  165. package/lib/cjs/components/tabs/Tabs.form.d.ts +6 -3
  166. package/lib/cjs/components/tabs/Tabs.form.js +5 -0
  167. package/lib/cjs/components/tabs/Tabs.js +1 -2
  168. package/lib/cjs/components/tags/Tags.d.ts +0 -14
  169. package/lib/cjs/components/tags/Tags.form.d.ts +6 -3
  170. package/lib/cjs/components/tags/Tags.form.js +5 -0
  171. package/lib/cjs/components/textarea/TextArea.d.ts +4 -9
  172. package/lib/cjs/components/textarea/TextArea.form.d.ts +6 -3
  173. package/lib/cjs/components/textarea/TextArea.form.js +5 -0
  174. package/lib/cjs/components/textarea/TextArea.js +2 -2
  175. package/lib/cjs/components/textfield/TextField.d.ts +14 -30
  176. package/lib/cjs/components/textfield/TextField.form.d.ts +6 -3
  177. package/lib/cjs/components/textfield/TextField.form.js +5 -0
  178. package/lib/cjs/components/textfield/TextField.js +14 -17
  179. package/lib/cjs/components/time/Time.form.d.ts +6 -3
  180. package/lib/cjs/components/time/Time.form.js +5 -0
  181. package/lib/cjs/components/unknown/Unknown.form.d.ts +5 -34
  182. package/lib/cjs/components/unknown/Unknown.form.js +4 -0
  183. package/lib/cjs/components/url/Url.form.d.ts +6 -3
  184. package/lib/cjs/components/url/Url.form.js +5 -0
  185. package/lib/cjs/components/well/Well.form.d.ts +6 -3
  186. package/lib/cjs/components/well/Well.form.js +5 -0
  187. package/lib/cjs/formio.embed.d.ts +1 -2
  188. package/lib/cjs/formio.embed.js +2 -100
  189. package/lib/cjs/formio.form.d.ts +11 -4
  190. package/lib/cjs/formio.form.js +13 -5
  191. package/lib/cjs/providers/Providers.d.ts +36 -5
  192. package/lib/cjs/providers/Providers.js +29 -0
  193. package/lib/cjs/providers/address/AddressProvider.d.ts +131 -12
  194. package/lib/cjs/providers/address/AddressProvider.js +88 -2
  195. package/lib/cjs/providers/address/AzureAddressProvider.d.ts +48 -1
  196. package/lib/cjs/providers/address/AzureAddressProvider.js +37 -0
  197. package/lib/cjs/providers/address/CustomAddressProvider.d.ts +27 -4
  198. package/lib/cjs/providers/address/CustomAddressProvider.js +34 -0
  199. package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +130 -6
  200. package/lib/cjs/providers/address/GoogleAddressProvider.js +72 -0
  201. package/lib/cjs/providers/address/NominatimAddressProvider.d.ts +32 -7
  202. package/lib/cjs/providers/address/NominatimAddressProvider.js +33 -0
  203. package/lib/cjs/providers/address/index.d.ts +3 -1
  204. package/lib/cjs/providers/processor/fileProcessor.d.ts +7 -1
  205. package/lib/cjs/providers/processor/fileProcessor.js +6 -0
  206. package/lib/cjs/providers/storage/azure.d.ts +6 -13
  207. package/lib/cjs/providers/storage/azure.js +5 -0
  208. package/lib/cjs/providers/storage/base64.d.ts +5 -6
  209. package/lib/cjs/providers/storage/base64.js +4 -0
  210. package/lib/cjs/providers/storage/dropbox.d.ts +6 -4
  211. package/lib/cjs/providers/storage/dropbox.js +5 -0
  212. package/lib/cjs/providers/storage/googleDrive.d.ts +7 -5
  213. package/lib/cjs/providers/storage/googleDrive.js +6 -0
  214. package/lib/cjs/providers/storage/indexeddb.d.ts +5 -7
  215. package/lib/cjs/providers/storage/indexeddb.js +4 -0
  216. package/lib/cjs/providers/storage/s3.d.ts +6 -20
  217. package/lib/cjs/providers/storage/s3.js +5 -0
  218. package/lib/cjs/providers/storage/url.d.ts +6 -7
  219. package/lib/cjs/providers/storage/url.js +10 -0
  220. package/lib/cjs/providers/storage/util.d.ts +24 -1
  221. package/lib/cjs/providers/storage/util.js +18 -0
  222. package/lib/cjs/templates/Templates.d.ts +1 -0
  223. package/lib/cjs/utils/Evaluator.d.ts +6 -3
  224. package/lib/cjs/utils/Evaluator.js +11 -20
  225. package/lib/cjs/utils/builder.d.ts +9 -7
  226. package/lib/cjs/utils/builder.js +10 -5
  227. package/lib/cjs/utils/calendarUtils.d.ts +7 -13
  228. package/lib/cjs/utils/calendarUtils.js +10 -17
  229. package/lib/cjs/utils/formUtils.d.ts +43 -171
  230. package/lib/cjs/utils/formUtils.js +38 -569
  231. package/lib/cjs/utils/utils.d.ts +370 -218
  232. package/lib/cjs/utils/utils.js +348 -230
  233. package/lib/cjs/widgets/CalendarWidget.d.ts +9 -10
  234. package/lib/cjs/widgets/CalendarWidget.js +9 -11
  235. package/lib/mjs/CDN.d.ts +1 -0
  236. package/lib/mjs/CDN.js +6 -3
  237. package/lib/mjs/Element.d.ts +86 -96
  238. package/lib/mjs/Element.js +68 -78
  239. package/lib/mjs/Embed.d.ts +1 -1
  240. package/lib/mjs/Embed.js +52 -12
  241. package/lib/mjs/Form.d.ts +365 -36
  242. package/lib/mjs/Form.js +140 -57
  243. package/lib/mjs/FormBuilder.d.ts +187 -2
  244. package/lib/mjs/FormBuilder.js +32 -8
  245. package/lib/mjs/InlineEmbed.d.ts +7 -0
  246. package/lib/mjs/InlineEmbed.js +112 -0
  247. package/lib/mjs/PDF.d.ts +11 -13
  248. package/lib/mjs/PDF.js +6 -8
  249. package/lib/mjs/Webform.d.ts +180 -139
  250. package/lib/mjs/Webform.js +323 -309
  251. package/lib/mjs/WebformBuilder.d.ts +16 -14
  252. package/lib/mjs/WebformBuilder.js +19 -12
  253. package/lib/mjs/Wizard.d.ts +31 -21
  254. package/lib/mjs/Wizard.js +42 -19
  255. package/lib/mjs/WizardBuilder.d.ts +1 -1
  256. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +8 -5
  257. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +6 -3
  258. package/lib/mjs/components/Components.d.ts +4 -4
  259. package/lib/mjs/components/Components.js +3 -3
  260. package/lib/mjs/components/_classes/component/Component.d.ts +502 -269
  261. package/lib/mjs/components/_classes/component/Component.form.d.ts +6 -3
  262. package/lib/mjs/components/_classes/component/Component.form.js +5 -0
  263. package/lib/mjs/components/_classes/component/Component.js +434 -193
  264. package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +0 -8
  265. package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +1 -1
  266. package/lib/mjs/components/_classes/component/editForm/utils.js +1 -1
  267. package/lib/mjs/components/_classes/field/Field.d.ts +11 -2
  268. package/lib/mjs/components/_classes/field/Field.js +13 -1
  269. package/lib/mjs/components/_classes/input/Input.d.ts +4 -3
  270. package/lib/mjs/components/_classes/input/Input.js +2 -2
  271. package/lib/mjs/components/_classes/list/ListComponent.d.ts +2 -2
  272. package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +6 -3
  273. package/lib/mjs/components/_classes/list/ListComponent.form.js +5 -0
  274. package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +43 -12
  275. package/lib/mjs/components/_classes/multivalue/Multivalue.js +37 -3
  276. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +163 -67
  277. package/lib/mjs/components/_classes/nested/NestedComponent.form.d.ts +6 -3
  278. package/lib/mjs/components/_classes/nested/NestedComponent.form.js +5 -0
  279. package/lib/mjs/components/_classes/nested/NestedComponent.js +175 -54
  280. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +2 -2
  281. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
  282. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +7 -1
  283. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +2 -3
  284. package/lib/mjs/components/address/Address.d.ts +4 -2
  285. package/lib/mjs/components/address/Address.form.d.ts +6 -3
  286. package/lib/mjs/components/address/Address.form.js +5 -0
  287. package/lib/mjs/components/button/Button.d.ts +3 -12
  288. package/lib/mjs/components/button/Button.form.d.ts +6 -3
  289. package/lib/mjs/components/button/Button.form.js +5 -0
  290. package/lib/mjs/components/button/Button.js +5 -0
  291. package/lib/mjs/components/checkbox/Checkbox.d.ts +4 -27
  292. package/lib/mjs/components/checkbox/Checkbox.form.d.ts +6 -3
  293. package/lib/mjs/components/checkbox/Checkbox.form.js +5 -0
  294. package/lib/mjs/components/columns/Columns.d.ts +3 -2
  295. package/lib/mjs/components/columns/Columns.form.d.ts +6 -3
  296. package/lib/mjs/components/columns/Columns.form.js +5 -0
  297. package/lib/mjs/components/columns/Columns.js +1 -1
  298. package/lib/mjs/components/container/Container.form.d.ts +6 -3
  299. package/lib/mjs/components/container/Container.form.js +5 -0
  300. package/lib/mjs/components/content/Content.d.ts +2 -1
  301. package/lib/mjs/components/content/Content.form.d.ts +6 -3
  302. package/lib/mjs/components/content/Content.form.js +5 -0
  303. package/lib/mjs/components/currency/Currency.form.d.ts +6 -3
  304. package/lib/mjs/components/currency/Currency.form.js +5 -0
  305. package/lib/mjs/components/currency/Currency.js +1 -2
  306. package/lib/mjs/components/datagrid/DataGrid.d.ts +8 -7
  307. package/lib/mjs/components/datagrid/DataGrid.form.d.ts +6 -3
  308. package/lib/mjs/components/datagrid/DataGrid.form.js +5 -0
  309. package/lib/mjs/components/datagrid/DataGrid.js +5 -5
  310. package/lib/mjs/components/datamap/DataMap.d.ts +1 -0
  311. package/lib/mjs/components/datamap/DataMap.form.d.ts +6 -3
  312. package/lib/mjs/components/datamap/DataMap.form.js +5 -0
  313. package/lib/mjs/components/datetime/DateTime.d.ts +0 -14
  314. package/lib/mjs/components/datetime/DateTime.form.d.ts +6 -3
  315. package/lib/mjs/components/datetime/DateTime.form.js +5 -0
  316. package/lib/mjs/components/datetime/editForm/DateTime.edit.date.js +1 -1
  317. package/lib/mjs/components/day/Day.d.ts +22 -48
  318. package/lib/mjs/components/day/Day.form.d.ts +6 -3
  319. package/lib/mjs/components/day/Day.form.js +5 -0
  320. package/lib/mjs/components/day/Day.js +15 -20
  321. package/lib/mjs/components/editgrid/EditGrid.d.ts +7 -3
  322. package/lib/mjs/components/editgrid/EditGrid.form.d.ts +6 -3
  323. package/lib/mjs/components/editgrid/EditGrid.form.js +5 -0
  324. package/lib/mjs/components/editgrid/EditGrid.js +3 -3
  325. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -1
  326. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.js +1 -1
  327. package/lib/mjs/components/email/Email.form.d.ts +6 -3
  328. package/lib/mjs/components/email/Email.form.js +5 -0
  329. package/lib/mjs/components/fieldset/Fieldset.form.d.ts +6 -3
  330. package/lib/mjs/components/fieldset/Fieldset.form.js +5 -0
  331. package/lib/mjs/components/file/File.d.ts +9 -22
  332. package/lib/mjs/components/file/File.form.d.ts +6 -3
  333. package/lib/mjs/components/file/File.form.js +5 -0
  334. package/lib/mjs/components/form/Form.d.ts +31 -20
  335. package/lib/mjs/components/form/Form.form.d.ts +6 -3
  336. package/lib/mjs/components/form/Form.form.js +5 -0
  337. package/lib/mjs/components/form/Form.js +16 -12
  338. package/lib/mjs/components/hidden/Hidden.d.ts +1 -11
  339. package/lib/mjs/components/hidden/Hidden.form.d.ts +6 -3
  340. package/lib/mjs/components/hidden/Hidden.form.js +5 -0
  341. package/lib/mjs/components/hidden/Hidden.js +1 -2
  342. package/lib/mjs/components/html/HTML.d.ts +2 -1
  343. package/lib/mjs/components/html/HTML.form.d.ts +6 -3
  344. package/lib/mjs/components/html/HTML.form.js +5 -0
  345. package/lib/mjs/components/number/Number.d.ts +3 -17
  346. package/lib/mjs/components/number/Number.form.d.ts +6 -3
  347. package/lib/mjs/components/number/Number.form.js +5 -0
  348. package/lib/mjs/components/number/Number.js +1 -2
  349. package/lib/mjs/components/panel/Panel.form.d.ts +6 -3
  350. package/lib/mjs/components/panel/Panel.form.js +5 -0
  351. package/lib/mjs/components/panel/Panel.js +0 -1
  352. package/lib/mjs/components/password/Password.form.d.ts +6 -3
  353. package/lib/mjs/components/password/Password.form.js +5 -0
  354. package/lib/mjs/components/phonenumber/PhoneNumber.form.d.ts +6 -3
  355. package/lib/mjs/components/phonenumber/PhoneNumber.form.js +5 -0
  356. package/lib/mjs/components/radio/Radio.d.ts +3 -26
  357. package/lib/mjs/components/radio/Radio.form.d.ts +6 -3
  358. package/lib/mjs/components/radio/Radio.form.js +5 -0
  359. package/lib/mjs/components/radio/Radio.js +3 -4
  360. package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +1 -1
  361. package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +6 -3
  362. package/lib/mjs/components/recaptcha/ReCaptcha.form.js +5 -0
  363. package/lib/mjs/components/select/Select.d.ts +16 -39
  364. package/lib/mjs/components/select/Select.form.d.ts +6 -3
  365. package/lib/mjs/components/select/Select.form.js +5 -0
  366. package/lib/mjs/components/select/Select.js +15 -18
  367. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +2 -17
  368. package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +6 -3
  369. package/lib/mjs/components/selectboxes/SelectBoxes.form.js +5 -0
  370. package/lib/mjs/components/selectboxes/SelectBoxes.js +7 -9
  371. package/lib/mjs/components/signature/Signature.d.ts +1 -14
  372. package/lib/mjs/components/signature/Signature.form.d.ts +6 -3
  373. package/lib/mjs/components/signature/Signature.form.js +5 -0
  374. package/lib/mjs/components/survey/Survey.d.ts +3 -15
  375. package/lib/mjs/components/survey/Survey.form.d.ts +6 -3
  376. package/lib/mjs/components/survey/Survey.form.js +5 -0
  377. package/lib/mjs/components/table/Table.d.ts +2 -1
  378. package/lib/mjs/components/table/Table.form.d.ts +6 -3
  379. package/lib/mjs/components/table/Table.form.js +5 -0
  380. package/lib/mjs/components/tabs/Tabs.d.ts +4 -4
  381. package/lib/mjs/components/tabs/Tabs.form.d.ts +6 -3
  382. package/lib/mjs/components/tabs/Tabs.form.js +5 -0
  383. package/lib/mjs/components/tabs/Tabs.js +1 -2
  384. package/lib/mjs/components/tags/Tags.d.ts +0 -14
  385. package/lib/mjs/components/tags/Tags.form.d.ts +6 -3
  386. package/lib/mjs/components/tags/Tags.form.js +5 -0
  387. package/lib/mjs/components/textarea/TextArea.d.ts +4 -9
  388. package/lib/mjs/components/textarea/TextArea.form.d.ts +6 -3
  389. package/lib/mjs/components/textarea/TextArea.form.js +5 -0
  390. package/lib/mjs/components/textarea/TextArea.js +2 -2
  391. package/lib/mjs/components/textfield/TextField.d.ts +14 -30
  392. package/lib/mjs/components/textfield/TextField.form.d.ts +6 -3
  393. package/lib/mjs/components/textfield/TextField.form.js +5 -0
  394. package/lib/mjs/components/textfield/TextField.js +14 -17
  395. package/lib/mjs/components/time/Time.form.d.ts +6 -3
  396. package/lib/mjs/components/time/Time.form.js +5 -0
  397. package/lib/mjs/components/unknown/Unknown.form.d.ts +5 -34
  398. package/lib/mjs/components/unknown/Unknown.form.js +4 -0
  399. package/lib/mjs/components/url/Url.form.d.ts +6 -3
  400. package/lib/mjs/components/url/Url.form.js +5 -0
  401. package/lib/mjs/components/well/Well.form.d.ts +6 -3
  402. package/lib/mjs/components/well/Well.form.js +5 -0
  403. package/lib/mjs/formio.embed.d.ts +1 -2
  404. package/lib/mjs/formio.embed.js +2 -99
  405. package/lib/mjs/formio.form.d.ts +11 -4
  406. package/lib/mjs/formio.form.js +10 -3
  407. package/lib/mjs/providers/Providers.d.ts +36 -5
  408. package/lib/mjs/providers/Providers.js +29 -0
  409. package/lib/mjs/providers/address/AddressProvider.d.ts +131 -12
  410. package/lib/mjs/providers/address/AddressProvider.js +88 -2
  411. package/lib/mjs/providers/address/AzureAddressProvider.d.ts +48 -1
  412. package/lib/mjs/providers/address/AzureAddressProvider.js +37 -0
  413. package/lib/mjs/providers/address/CustomAddressProvider.d.ts +27 -4
  414. package/lib/mjs/providers/address/CustomAddressProvider.js +34 -0
  415. package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +130 -6
  416. package/lib/mjs/providers/address/GoogleAddressProvider.js +72 -0
  417. package/lib/mjs/providers/address/NominatimAddressProvider.d.ts +32 -7
  418. package/lib/mjs/providers/address/NominatimAddressProvider.js +33 -0
  419. package/lib/mjs/providers/address/index.d.ts +3 -1
  420. package/lib/mjs/providers/processor/fileProcessor.d.ts +7 -1
  421. package/lib/mjs/providers/processor/fileProcessor.js +6 -0
  422. package/lib/mjs/providers/storage/azure.d.ts +6 -13
  423. package/lib/mjs/providers/storage/azure.js +5 -0
  424. package/lib/mjs/providers/storage/base64.d.ts +5 -6
  425. package/lib/mjs/providers/storage/base64.js +4 -0
  426. package/lib/mjs/providers/storage/dropbox.d.ts +6 -4
  427. package/lib/mjs/providers/storage/dropbox.js +5 -0
  428. package/lib/mjs/providers/storage/googleDrive.d.ts +7 -5
  429. package/lib/mjs/providers/storage/googleDrive.js +6 -0
  430. package/lib/mjs/providers/storage/indexeddb.d.ts +5 -7
  431. package/lib/mjs/providers/storage/indexeddb.js +4 -0
  432. package/lib/mjs/providers/storage/s3.d.ts +6 -20
  433. package/lib/mjs/providers/storage/s3.js +5 -0
  434. package/lib/mjs/providers/storage/url.d.ts +6 -7
  435. package/lib/mjs/providers/storage/url.js +10 -0
  436. package/lib/mjs/providers/storage/util.d.ts +24 -1
  437. package/lib/mjs/providers/storage/util.js +18 -0
  438. package/lib/mjs/templates/Templates.d.ts +1 -0
  439. package/lib/mjs/utils/Evaluator.d.ts +6 -3
  440. package/lib/mjs/utils/Evaluator.js +9 -20
  441. package/lib/mjs/utils/builder.d.ts +9 -7
  442. package/lib/mjs/utils/builder.js +10 -5
  443. package/lib/mjs/utils/calendarUtils.d.ts +7 -13
  444. package/lib/mjs/utils/calendarUtils.js +10 -17
  445. package/lib/mjs/utils/formUtils.d.ts +43 -171
  446. package/lib/mjs/utils/formUtils.js +6 -554
  447. package/lib/mjs/utils/utils.d.ts +370 -218
  448. package/lib/mjs/utils/utils.js +339 -222
  449. package/lib/mjs/widgets/CalendarWidget.d.ts +9 -10
  450. package/lib/mjs/widgets/CalendarWidget.js +9 -11
  451. package/package.json +22 -22
  452. package/sdk.d.ts +1 -0
  453. package/utils.d.ts +1 -0
@@ -165,9 +165,7 @@ export default class Component extends Element {
165
165
  }
166
166
  /**
167
167
  * Return the simple condition settings as part of the component.
168
- *
169
- * @return {Object}
170
- *
168
+ * @returns {object} - The simple conditional settings.
171
169
  */
172
170
  static get conditionOperatorsSettings() {
173
171
  return {
@@ -184,10 +182,8 @@ export default class Component extends Element {
184
182
  }
185
183
  /**
186
184
  * Return the array of possible types of component value absed on its schema.
187
- *
188
185
  * @param schema
189
- * @return {Array}
190
- *
186
+ * @returns {Array}
191
187
  */
192
188
  static savedValueTypes(schema) {
193
189
  schema = schema || {};
@@ -196,7 +192,6 @@ export default class Component extends Element {
196
192
  /**
197
193
  * Provides a table view for this component. Override if you wish to do something different than using getView
198
194
  * method of your instance.
199
- *
200
195
  * @param value
201
196
  * @param options
202
197
  */
@@ -205,10 +200,9 @@ export default class Component extends Element {
205
200
  /* eslint-enable no-unused-vars */
206
201
  /**
207
202
  * Initialize a new Component.
208
- *
209
- * @param {Object} component - The component JSON you wish to initialize.
210
- * @param {Object} options - The options for this component.
211
- * @param {Object} data - The global data submission object this component will belong.
203
+ * @param {object} component - The component JSON you wish to initialize.
204
+ * @param {object} options - The options for this component.
205
+ * @param {object} data - The global data submission object this component will belong.
212
206
  */
213
207
  /* eslint-disable max-statements */
214
208
  constructor(component, options, data) {
@@ -239,7 +233,6 @@ export default class Component extends Element {
239
233
  }
240
234
  /**
241
235
  * The data path to this specific component instance.
242
- *
243
236
  * @type {string}
244
237
  */
245
238
  this.path = component?.key || '';
@@ -287,32 +280,27 @@ export default class Component extends Element {
287
280
  this.row = this.options.row;
288
281
  /**
289
282
  * Points to a flat map of child components (if applicable).
290
- *
291
- * @type {Object}
283
+ * @type {object}
292
284
  */
293
285
  this.childComponentsMap = {};
294
286
  /**
295
287
  * Determines if this component is disabled, or not.
296
- *
297
288
  * @type {boolean}
298
289
  */
299
290
  this._disabled = boolValue(this.component.disabled) ? this.component.disabled : false;
300
291
  /**
301
292
  * Points to the root component, usually the FormComponent.
302
- *
303
293
  * @type {Component}
304
294
  */
305
295
  this.root = this.options.root || this;
306
296
  this.localRoot = this.options.localRoot || this;
307
297
  /**
308
298
  * If this input has been input and provided value.
309
- *
310
299
  * @type {boolean}
311
300
  */
312
301
  this.pristine = true;
313
302
  /**
314
303
  * Points to the parent component.
315
- *
316
304
  * @type {Component}
317
305
  */
318
306
  this.parent = this.options.parent;
@@ -332,7 +320,7 @@ export default class Component extends Element {
332
320
  this._referenceAttributeName = 'ref';
333
321
  /**
334
322
  * Used to trigger a new change in this component.
335
- * @type {function} - Call to trigger a change in this component.
323
+ * @type {Function} - Call to trigger a change in this component.
336
324
  */
337
325
  let changes = [];
338
326
  let lastChanged = null;
@@ -373,7 +361,6 @@ export default class Component extends Element {
373
361
  };
374
362
  /**
375
363
  * Used to trigger a redraw event within this component.
376
- *
377
364
  * @type {Function}
378
365
  */
379
366
  this.triggerRedraw = _.debounce(this.redraw.bind(this), 100);
@@ -572,8 +559,8 @@ export default class Component extends Element {
572
559
  return this.shouldForceVisibility(component, 'show');
573
560
  }
574
561
  /**
575
- *
576
- * @param value {boolean}
562
+ * Sets the component visibility.
563
+ * @param {boolean} value - Whether the component should be visible or not.
577
564
  */
578
565
  set visible(value) {
579
566
  if (this._visible !== value) {
@@ -591,8 +578,8 @@ export default class Component extends Element {
591
578
  }
592
579
  }
593
580
  /**
594
- *
595
- * @returns {boolean}
581
+ * Returns the component visibility
582
+ * @returns {boolean} - Whether the component is visible or not.
596
583
  */
597
584
  get visible() {
598
585
  // Show only if visibility changes or if we are in builder mode or if hidden fields should be shown.
@@ -682,9 +669,10 @@ export default class Component extends Element {
682
669
  }
683
670
  /**
684
671
  * Returns only the schema that is different from the default.
685
- *
686
- * @param schema
687
- * @param defaultSchema
672
+ * @param {object} schema - The "full" json schema for the component.
673
+ * @param {object} defaultSchema - The "default" json schema for the component.
674
+ * @param {boolean} recursion - If we are currently in a recursive loop.
675
+ * @returns {object} - The minified json schema for this component.
688
676
  */
689
677
  getModifiedSchema(schema, defaultSchema, recursion) {
690
678
  const modified = {};
@@ -718,21 +706,24 @@ export default class Component extends Element {
718
706
  }
719
707
  /**
720
708
  * Returns the JSON schema for this component.
709
+ * @returns {object} - The JSON schema for this component.
721
710
  */
722
711
  get schema() {
723
712
  return fastCloneDeep(this.getModifiedSchema(_.omit(this.component, 'id'), this.defaultSchema));
724
713
  }
725
714
  /**
726
715
  * Returns true if component is inside DataGrid
716
+ * @returns {boolean} - True if component is inside DataGrid
727
717
  */
728
718
  get isInDataGrid() {
729
719
  return this.inDataGrid;
730
720
  }
731
721
  /**
732
722
  * Translate a text using the i18n system.
733
- *
734
723
  * @param {string} text - The i18n identifier.
735
- * @param {Object} params - The i18n parameters to use for translation.
724
+ * @param {object} params - The i18n parameters to use for translation.
725
+ * @param {...any} args - Additional arguments to pass to the translation library.
726
+ * @returns {string} - The translated text.
736
727
  */
737
728
  t(text, params = {}, ...args) {
738
729
  if (!text) {
@@ -822,7 +813,7 @@ export default class Component extends Element {
822
813
  isHtmlRenderMode() {
823
814
  return this.options.renderMode === 'html';
824
815
  }
825
- renderTemplate(name, data = {}, modeOption) {
816
+ renderTemplate(name, data = {}, modeOption = '') {
826
817
  // Need to make this fall back to form if renderMode is not found similar to how we search templates.
827
818
  const mode = modeOption || this.options.renderMode || 'form';
828
819
  data.component = this.component;
@@ -862,11 +853,12 @@ export default class Component extends Element {
862
853
  }
863
854
  /**
864
855
  * Sanitize an html string.
865
- *
866
- * @param string
867
- * @returns {*}
856
+ * @param {string} dirty - The dirty html string to sanitize.
857
+ * @param {boolean} forceSanitize - If we should force the sanitize to occur.
858
+ * @param {object} options - The options for the sanitize.
859
+ * @returns {*} - The sanitized html string.
868
860
  */
869
- sanitize(dirty, forceSanitize, options) {
861
+ sanitize(dirty, forceSanitize = false, options = {}) {
870
862
  if (!this.shouldSanitizeValue && !forceSanitize) {
871
863
  return dirty;
872
864
  }
@@ -876,12 +868,9 @@ export default class Component extends Element {
876
868
  }
877
869
  /**
878
870
  * Render a template string into html.
879
- *
880
- * @param template
881
- * @param data
882
- * @param actions
883
- *
884
- * @return {HTMLElement|String} - The created element or an empty string if template is not specified.
871
+ * @param {string} template - The template to render.
872
+ * @param {object} data - The data to provide to the template.
873
+ * @returns {HTMLElement | string} - The created element or an empty string if template is not specified.
885
874
  */
886
875
  renderString(template, data) {
887
876
  if (!template) {
@@ -890,9 +879,18 @@ export default class Component extends Element {
890
879
  // Interpolate the template and populate
891
880
  return this.interpolate(template, data);
892
881
  }
882
+ /**
883
+ * Allows for modification of the component value prior to submission.
884
+ * @param {*} input - The input to be modified.
885
+ * @returns {*} - The modified input mapping for the extended component.
886
+ */
893
887
  performInputMapping(input) {
894
888
  return input;
895
889
  }
890
+ /**
891
+ * Returns the component "widget" if one is available.
892
+ * @returns {Widget|null} - The widget instance. null if not available.
893
+ */
896
894
  get widget() {
897
895
  const settings = this.component.widget;
898
896
  if (settings && this.root?.shadowRoot) {
@@ -901,6 +899,10 @@ export default class Component extends Element {
901
899
  const widget = settings && Widgets[settings.type] ? new Widgets[settings.type](settings, this.component, this) : null;
902
900
  return widget;
903
901
  }
902
+ /**
903
+ * Returns the native supported browser language.
904
+ * @returns {string|null} - The native browser language that is supported.
905
+ */
904
906
  getBrowserLanguage() {
905
907
  const nav = window.navigator;
906
908
  const browserLanguagePropertyKeys = ['language', 'browserLanguage', 'systemLanguage', 'userLanguage'];
@@ -924,38 +926,46 @@ export default class Component extends Element {
924
926
  return null;
925
927
  }
926
928
  /**
927
- * Called before a next and previous page is triggered allowing the components
928
- * to perform special functions.
929
- *
930
- * @return {*}
929
+ * Called before a next and previous page is triggered allowing the components to perform special functions.
930
+ * @returns {Promise<boolean>} - A promise to resolve when the component is no longer blocking the next/previous page navigation.
931
931
  */
932
932
  beforePage() {
933
933
  return Promise.resolve(true);
934
934
  }
935
+ /**
936
+ * Called before the next page is triggered allowing the components to hook into the page navigation and perform tasks.
937
+ * @returns {Promise<boolean>} - A promise to resolve when the component is no longer blocking the next page navigation.
938
+ */
935
939
  beforeNext() {
936
940
  return this.beforePage(true);
937
941
  }
938
942
  /**
939
- * Called before a submission is triggered allowing the components
940
- * to perform special async functions.
941
- *
942
- * @return {*}
943
+ * Called before a submission is triggered allowing the components to perform special async functions.
944
+ * @returns {Promise<boolean>} - A promise to resolve when the component is no longer blocking the submission.
943
945
  */
944
946
  beforeSubmit() {
945
947
  return Promise.resolve(true);
946
948
  }
947
949
  /**
948
950
  * Return the submission timezone.
949
- *
950
- * @return {*}
951
+ * @returns {string} - The submission timezone.
951
952
  */
952
953
  get submissionTimezone() {
953
954
  this.options.submissionTimezone = this.options.submissionTimezone || _.get(this.root, 'options.submissionTimezone');
954
955
  return this.options.submissionTimezone;
955
956
  }
957
+ /**
958
+ * Return the current timezone.
959
+ * @returns {string} - The current timezone.
960
+ */
956
961
  get timezone() {
957
962
  return this.getTimezone(this.component);
958
963
  }
964
+ /**
965
+ * Return the current timezone.
966
+ * @param {object} settings - Settings to control how the timezone should be returned.
967
+ * @returns {string} - The current timezone.
968
+ */
959
969
  getTimezone(settings) {
960
970
  if (settings.timezone) {
961
971
  return settings.timezone;
@@ -979,6 +989,9 @@ export default class Component extends Element {
979
989
  * @param {string} [referenceAttributeName] - The attribute name to use for the reference.
980
990
  */
981
991
  loadRefs(element, refs, referenceAttributeName) {
992
+ if (!element) {
993
+ return;
994
+ }
982
995
  for (const ref in refs) {
983
996
  const refType = refs[ref];
984
997
  const isString = typeof refType === 'string';
@@ -993,9 +1006,17 @@ export default class Component extends Element {
993
1006
  }
994
1007
  }
995
1008
  }
996
- setOpenModalElement(template) {
1009
+ /**
1010
+ * Opens the modal element.
1011
+ * @param {string} template - The template to use for the modal dialog.
1012
+ */
1013
+ setOpenModalElement(template = null) {
997
1014
  this.componentModal.setOpenModalElement(template || this.getModalPreviewTemplate());
998
1015
  }
1016
+ /**
1017
+ * Returns the modal preview template.
1018
+ * @returns {string} - The modal preview template.
1019
+ */
999
1020
  getModalPreviewTemplate() {
1000
1021
  const dataValue = this.component.type === 'password' ? this.dataValue.replace(/./g, '•') : this.dataValue;
1001
1022
  let modalLabel;
@@ -1008,6 +1029,11 @@ export default class Component extends Element {
1008
1029
  labelInfo: modalLabel,
1009
1030
  });
1010
1031
  }
1032
+ /**
1033
+ * Performs a complete build of a component, which empties, renders, sets the content in the DOM, and then finally attaches events.
1034
+ * @param {HTMLElement} element - The element to attach this component to.
1035
+ * @returns {Promise<void>} - A promise that resolves when the component has been built.
1036
+ */
1011
1037
  build(element) {
1012
1038
  element = element || this.element;
1013
1039
  this.empty(element);
@@ -1017,6 +1043,12 @@ export default class Component extends Element {
1017
1043
  get hasModalSaveButton() {
1018
1044
  return true;
1019
1045
  }
1046
+ /**
1047
+ * Renders a component as an HTML string.
1048
+ * @param {string} children - The contents of all the children HTML as a string.
1049
+ * @param {boolean} topLevel - If this is the topmost component that is being rendered.
1050
+ * @returns {string} - The rendered HTML string of a component.
1051
+ */
1020
1052
  render(children = `Unknown component: ${this.component.type}`, topLevel = false) {
1021
1053
  const isVisible = this.visible;
1022
1054
  this.rendered = true;
@@ -1040,6 +1072,11 @@ export default class Component extends Element {
1040
1072
  }, topLevel);
1041
1073
  }
1042
1074
  }
1075
+ /**
1076
+ * Attaches all the tooltips provided the refs object.
1077
+ * @param {object} toolTipsRefs - The refs for the tooltips within your template.
1078
+ * @returns {void}
1079
+ */
1043
1080
  attachTooltips(toolTipsRefs) {
1044
1081
  toolTipsRefs?.forEach((tooltip, index) => {
1045
1082
  if (tooltip) {
@@ -1058,9 +1095,21 @@ export default class Component extends Element {
1058
1095
  }
1059
1096
  });
1060
1097
  }
1098
+ /**
1099
+ * Create a new component modal for this component.
1100
+ * @param {HTMLElement} element - The element to attach the modal to.
1101
+ * @param {boolean} modalShouldBeOpened - TRUE if the modal should open immediately.
1102
+ * @param {any} currentValue - The current value of the component.
1103
+ * @returns {ComponentModal} - The created component modal.
1104
+ */
1061
1105
  createComponentModal(element, modalShouldBeOpened, currentValue) {
1062
1106
  return new ComponentModal(this, element, modalShouldBeOpened, currentValue, this._referenceAttributeName);
1063
1107
  }
1108
+ /**
1109
+ * Attaches all event listensers for this component to the DOM elements that were rendered.
1110
+ * @param {HTMLElement} element - The element to attach the listeners to.
1111
+ * @returns {Promise<void>} - Resolves when the component is done attaching to the DOM.
1112
+ */
1064
1113
  attach(element) {
1065
1114
  if (!this.builderMode && !this.previewMode && this.component.modalEdit) {
1066
1115
  const modalShouldBeOpened = this.componentModal ? this.componentModal.isOpened : false;
@@ -1098,6 +1147,9 @@ export default class Component extends Element {
1098
1147
  this.addons.forEach((addon) => addon.attach(element));
1099
1148
  return Promise.resolve();
1100
1149
  }
1150
+ /**
1151
+ * Restors the "focus" on a component after a redraw event has occured.
1152
+ */
1101
1153
  restoreFocus() {
1102
1154
  const isFocused = this.root?.focusedComponent?.path === this.path;
1103
1155
  if (isFocused) {
@@ -1106,6 +1158,12 @@ export default class Component extends Element {
1106
1158
  this.restoreCaretPosition();
1107
1159
  }
1108
1160
  }
1161
+ /**
1162
+ * Adds a keyboard shortcut to this component.
1163
+ * @param {HTMLElement} element - The element to attach the keyboard shortcut to.
1164
+ * @param {string} shortcut - The keyboard shortcut to add.
1165
+ * @returns {void}
1166
+ */
1109
1167
  addShortcut(element, shortcut) {
1110
1168
  // Avoid infinite recursion.
1111
1169
  if (!element || !this.root || (this.root === this)) {
@@ -1116,6 +1174,12 @@ export default class Component extends Element {
1116
1174
  }
1117
1175
  this.root.addShortcut(element, shortcut);
1118
1176
  }
1177
+ /**
1178
+ * Removes a keyboard shortcut from this component.
1179
+ * @param {HTMLElement} element - The element to remove the keyboard shortcut from.
1180
+ * @param {string} shortcut - The keyboard shortcut to remove.
1181
+ * @returns {void}
1182
+ */
1119
1183
  removeShortcut(element, shortcut) {
1120
1184
  // Avoid infinite recursion.
1121
1185
  if (!element || (this.root === this)) {
@@ -1148,6 +1212,13 @@ export default class Component extends Element {
1148
1212
  this.tooltip.destroy();
1149
1213
  }
1150
1214
  }
1215
+ /**
1216
+ * Determines if the component should be refreshed based on the path of another component that changed.
1217
+ * @param {string} refreshData - The path of the data that needs to trigger a refresh.
1218
+ * @param {boolean} changed - Flag that is true if the data has been changed.
1219
+ * @param {any} flags - The flags for the checkData procedure.
1220
+ * @returns {void}
1221
+ */
1151
1222
  checkRefresh(refreshData, changed, flags) {
1152
1223
  const changePath = _.get(changed, 'instance.path', false);
1153
1224
  // Don't let components change themselves.
@@ -1164,6 +1235,12 @@ export default class Component extends Element {
1164
1235
  this.refresh(changed.value, changed, flags);
1165
1236
  }
1166
1237
  }
1238
+ /**
1239
+ * Iterates over a list of changes, and determines if the component should be refreshed if it is configured to refresh on any of those components.
1240
+ * @param {Array<any>} changes - The list of components that have changed.
1241
+ * @param {any} flags - The checkData flags.
1242
+ * @returns {void}
1243
+ */
1167
1244
  checkRefreshOn(changes, flags = {}) {
1168
1245
  changes = changes || [];
1169
1246
  if (flags.noRefresh) {
@@ -1185,8 +1262,8 @@ export default class Component extends Element {
1185
1262
  }
1186
1263
  /**
1187
1264
  * Refreshes the component with a new value.
1188
- *
1189
- * @param value
1265
+ * @param {any} value - The latest value of the component to check if it needs to be refreshed.
1266
+ * @returns {void}
1190
1267
  */
1191
1268
  refresh(value) {
1192
1269
  if (this.hasOwnProperty('refreshOnValue')) {
@@ -1209,8 +1286,8 @@ export default class Component extends Element {
1209
1286
  * with the components data and returns true if they are in the same context.
1210
1287
  *
1211
1288
  * Different rows of the same EditGrid, for example, are in different contexts.
1212
- *
1213
- * @param component
1289
+ * @param {any} component - The component to check if it is in the same context as this component.
1290
+ * @returns {boolean} - TRUE if the component is in the same context as this component.
1214
1291
  */
1215
1292
  inContext(component) {
1216
1293
  if (component.data === this.data) {
@@ -1225,9 +1302,18 @@ export default class Component extends Element {
1225
1302
  }
1226
1303
  return false;
1227
1304
  }
1305
+ /**
1306
+ * Determines if we are in "view" only mode.
1307
+ * @returns {boolean} - TRUE if we are in "view" only mode.
1308
+ */
1228
1309
  get viewOnly() {
1229
1310
  return this.options.readOnly && this.options.viewAsHtml;
1230
1311
  }
1312
+ /**
1313
+ * Sets the HTMLElement for this component.
1314
+ * @param {HTMLElement} element - The element that is attached to this component.
1315
+ * @returns {void}
1316
+ */
1231
1317
  setElement(element) {
1232
1318
  if (this.element) {
1233
1319
  delete this.element.component;
@@ -1235,6 +1321,10 @@ export default class Component extends Element {
1235
1321
  }
1236
1322
  this.element = element;
1237
1323
  }
1324
+ /**
1325
+ * Creates an element to hold the "view only" version of this component.
1326
+ * @returns {HTMLElement} - The element for this component.
1327
+ */
1238
1328
  createViewOnlyElement() {
1239
1329
  this.setElement(this.ce('dl', {
1240
1330
  id: this.id
@@ -1245,14 +1335,18 @@ export default class Component extends Element {
1245
1335
  }
1246
1336
  return this.element;
1247
1337
  }
1338
+ /**
1339
+ * The default value for the "view only" mode of a component if the value is not provided.
1340
+ * @returns {string} - The default value for this component.
1341
+ */
1248
1342
  get defaultViewOnlyValue() {
1249
1343
  return '-';
1250
1344
  }
1251
1345
  /**
1252
1346
  * Uses the widget to determine the output string.
1253
- *
1254
- * @param value
1255
- * @return {*}
1347
+ * @param {any} value - The current value of the component.
1348
+ * @param {any} options - The options for getValueAsString.
1349
+ * @returns {any|Array<any>} - The value as a string.
1256
1350
  */
1257
1351
  getWidgetValueAsString(value, options) {
1258
1352
  const noInputWidget = !this.refs.input || !this.refs.input[0] || !this.refs.input[0].widget;
@@ -1277,6 +1371,12 @@ export default class Component extends Element {
1277
1371
  const widget = this.refs.input[0].widget;
1278
1372
  return widget.getValueAsString(value, options);
1279
1373
  }
1374
+ /**
1375
+ * Returns the value of the component as a string.
1376
+ * @param {any} value - The value for this component.
1377
+ * @param {any} options - The options for this component.
1378
+ * @returns {string} - The string representation of the value of this component.
1379
+ */
1280
1380
  getValueAsString(value, options) {
1281
1381
  if (!value) {
1282
1382
  return '';
@@ -1294,20 +1394,32 @@ export default class Component extends Element {
1294
1394
  const stringValue = value.toString();
1295
1395
  return this.sanitize(stringValue);
1296
1396
  }
1397
+ /**
1398
+ * Returns the string representation "view" of the component value.
1399
+ * @param {any} value - The value of the component.
1400
+ * @param {any} options - The options for this component.
1401
+ * @returns {string} - The string representation of the value of this component.
1402
+ */
1297
1403
  getView(value, options) {
1298
1404
  if (this.component.protected) {
1299
1405
  return '--- PROTECTED ---';
1300
1406
  }
1301
1407
  return this.getValueAsString(value, options);
1302
1408
  }
1409
+ /**
1410
+ * Updates the items list for this component. Useful for Select and other List component types.
1411
+ * @param {...any} args - The arguments to pass to the onChange event.
1412
+ * @returns {void}
1413
+ */
1303
1414
  updateItems(...args) {
1304
1415
  this.restoreValue();
1305
1416
  this.onChange(...args);
1306
1417
  }
1307
1418
  /**
1308
- * @param {*} data
1309
- * @param {boolean} [forceUseValue=false] - if true, return 'value' property of the data
1310
- * @return {*}
1419
+ * Returns the value for a specific item in a List type component.
1420
+ * @param {any} data - The data for this component.
1421
+ * @param {boolean} [forceUseValue] - if true, return 'value' property of the data
1422
+ * @returns {any} - The value of the item.
1311
1423
  */
1312
1424
  itemValue(data, forceUseValue = false) {
1313
1425
  if (_.isObject(data) && !_.isArray(data)) {
@@ -1320,6 +1432,11 @@ export default class Component extends Element {
1320
1432
  }
1321
1433
  return data;
1322
1434
  }
1435
+ /**
1436
+ * Returns the item value for html mode.
1437
+ * @param {any} value - The value for this component.
1438
+ * @returns {any} - The value of the item for html mode.
1439
+ */
1323
1440
  itemValueForHTMLMode(value) {
1324
1441
  if (Array.isArray(value)) {
1325
1442
  const values = value.map(item => Array.isArray(item) ? this.itemValueForHTMLMode(item) : this.itemValue(item));
@@ -1327,6 +1444,13 @@ export default class Component extends Element {
1327
1444
  }
1328
1445
  return this.itemValue(value);
1329
1446
  }
1447
+ /**
1448
+ * Creates a modal to input the value of this component.
1449
+ * @param {HTMLElement} element - The element to attach the modal to.
1450
+ * @param {any} attr - A list of attributes to add to the modal.
1451
+ * @param {boolean} confirm - If we should add a confirmation to the modal that keeps it from closing unless confirmed.
1452
+ * @returns {HTMLElement} - The created modal element.
1453
+ */
1330
1454
  createModal(element, attr, confirm) {
1331
1455
  const dialog = this.ce('div', attr || {});
1332
1456
  this.setContent(dialog, this.renderTemplate('dialog'));
@@ -1362,6 +1486,10 @@ export default class Component extends Element {
1362
1486
  this.addEventListener(dialog.refs.dialogClose, 'click', handleCloseClick);
1363
1487
  return dialog;
1364
1488
  }
1489
+ /**
1490
+ * Uses CSS classes to show or hide an element.
1491
+ * @returns {boolean} - TRUE if the element has been css removed.
1492
+ */
1365
1493
  get optimizeRedraw() {
1366
1494
  if (this.options.optimizeRedraw && this.element && !this.visible) {
1367
1495
  this.addClass(this.element, 'formio-removed');
@@ -1399,7 +1527,7 @@ export default class Component extends Element {
1399
1527
  }
1400
1528
  /**
1401
1529
  * Build the custom style from the layout values
1402
- * @return {string} - The custom style
1530
+ * @returns {string} - The custom style
1403
1531
  */
1404
1532
  get customStyle() {
1405
1533
  let customCSS = '';
@@ -1410,24 +1538,31 @@ export default class Component extends Element {
1410
1538
  });
1411
1539
  return customCSS;
1412
1540
  }
1541
+ /**
1542
+ * Returns the component condition operator settings if available.
1543
+ * @returns {object} - The component condition operator settings.
1544
+ */
1413
1545
  static get serverConditionSettings() {
1414
1546
  return Component.conditionOperatorsSettings;
1415
1547
  }
1548
+ /**
1549
+ * Returns if the application is on a mobile device.
1550
+ * @returns {boolean} - TRUE if the application is on a mobile device.
1551
+ */
1416
1552
  get isMobile() {
1417
1553
  return isMobile();
1418
1554
  }
1419
1555
  /**
1420
1556
  * Returns the outside wrapping element of this component.
1421
- * @returns {HTMLElement}
1557
+ * @returns {HTMLElement} - The wrapping element of this component.
1422
1558
  */
1423
1559
  getElement() {
1424
1560
  return this.element;
1425
1561
  }
1426
1562
  /**
1427
1563
  * Create an evaluation context for all script executions and interpolations.
1428
- *
1429
- * @param additional
1430
- * @return {*}
1564
+ * @param {any} additional - Additional context to provide.
1565
+ * @returns {any} - The evaluation context.
1431
1566
  */
1432
1567
  evalContext(additional) {
1433
1568
  return super.evalContext(Object.assign({
@@ -1449,18 +1584,29 @@ export default class Component extends Element {
1449
1584
  }
1450
1585
  /**
1451
1586
  * Sets the pristine flag for this component.
1452
- *
1453
- * @param pristine {boolean} - TRUE to make pristine, FALSE not pristine.
1587
+ * @param {boolean} pristine - TRUE to make pristine, FALSE not pristine.
1454
1588
  */
1455
1589
  setPristine(pristine) {
1456
1590
  this.pristine = pristine;
1457
1591
  }
1592
+ /**
1593
+ * Returns if the component is pristine.
1594
+ * @returns {boolean} - TRUE if the component is pristine.
1595
+ */
1458
1596
  get isPristine() {
1459
1597
  return this.pristine;
1460
1598
  }
1599
+ /**
1600
+ * Sets the dirty flag for this component.
1601
+ * @param {boolean} dirty - TRUE to make dirty, FALSE not dirty.
1602
+ */
1461
1603
  setDirty(dirty) {
1462
1604
  this.dirty = dirty;
1463
1605
  }
1606
+ /**
1607
+ * Returns if the component is dirty.
1608
+ * @returns {boolean} - TRUE if the component is dirty.
1609
+ */
1464
1610
  get isDirty() {
1465
1611
  return this.dirty;
1466
1612
  }
@@ -1474,12 +1620,23 @@ export default class Component extends Element {
1474
1620
  this.restoreValue();
1475
1621
  this.triggerRootChange();
1476
1622
  }
1623
+ /**
1624
+ * Returns the icon class for a given icon name.
1625
+ * @param {string} name - The name of the icon you wish to fetch provided the icon class. This is the "font awesome" version of the name of the icon.
1626
+ * @param {boolean} spinning - If the component should be spinning.
1627
+ * @returns {string} - The icon class for the equivalent icon in the iconset we are using.
1628
+ */
1477
1629
  iconClass(name, spinning) {
1478
1630
  const iconset = this.options.iconset || Templates.current.defaultIconset || 'fa';
1479
1631
  return Templates.current.hasOwnProperty('iconClass')
1480
1632
  ? Templates.current.iconClass(iconset, name, spinning)
1481
1633
  : this.options.iconset === 'fa' ? Templates.defaultTemplates.iconClass(iconset, name, spinning) : name;
1482
1634
  }
1635
+ /**
1636
+ * Returns the size css class names for our current template.
1637
+ * @param {string} size - The size class name for the default iconset.
1638
+ * @returns {string} - The size class for our component.
1639
+ */
1483
1640
  size(size) {
1484
1641
  return Templates.current.hasOwnProperty('size')
1485
1642
  ? Templates.current.size(size)
@@ -1492,15 +1649,23 @@ export default class Component extends Element {
1492
1649
  get name() {
1493
1650
  return this.t(this.component.label || this.component.placeholder || this.key, { _userInput: true });
1494
1651
  }
1652
+ /**
1653
+ * Returns the visible errors for this component.
1654
+ * @returns {Array<object>} - The visible errors for this component.
1655
+ */
1495
1656
  get visibleErrors() {
1496
1657
  return this._visibleErrors;
1497
1658
  }
1659
+ /**
1660
+ * Returns all the errors for this component, visible or not.
1661
+ * @returns {Array<object>} - All the errors for this component.
1662
+ */
1498
1663
  get errors() {
1499
1664
  return this._errors;
1500
1665
  }
1501
1666
  /**
1502
1667
  * Returns the error label for this component.
1503
- * @return {*}
1668
+ * @returns {string} - The error label for this component.
1504
1669
  */
1505
1670
  get errorLabel() {
1506
1671
  return this.t(this.component.errorLabel
@@ -1510,12 +1675,20 @@ export default class Component extends Element {
1510
1675
  }
1511
1676
  /**
1512
1677
  * Get the error message provided a certain type of error.
1513
- * @param type
1514
- * @return {*}
1678
+ * @param {string} type - The type of error to fetch the message for.
1679
+ * @returns {string} - The error message configured for this component.
1515
1680
  */
1516
1681
  errorMessage(type) {
1517
1682
  return (this.component.errors && this.component.errors[type]) ? this.component.errors[type] : type;
1518
1683
  }
1684
+ /**
1685
+ * Sets the content, innerHTML, of an element to the sanitized content.
1686
+ * @param {HTMLElement} element - The element to set the innerHTML to.
1687
+ * @param {string} content - The HTML string content that we wish to set.
1688
+ * @param {boolean} forceSanitize - If we should force the content to be sanitized.
1689
+ * @param {any} sanitizeOptions - The options for the sanitize function.
1690
+ * @returns {boolean} - TRUE if the content was sanitized and set.
1691
+ */
1519
1692
  setContent(element, content, forceSanitize, sanitizeOptions) {
1520
1693
  if (element instanceof HTMLElement) {
1521
1694
  element.innerHTML = this.sanitize(content, forceSanitize, sanitizeOptions);
@@ -1523,6 +1696,9 @@ export default class Component extends Element {
1523
1696
  }
1524
1697
  return false;
1525
1698
  }
1699
+ /**
1700
+ * Restores the caret position in the input element after a refresh occurs.
1701
+ */
1526
1702
  restoreCaretPosition() {
1527
1703
  if (this.root?.currentSelection) {
1528
1704
  if (this.refs.input?.length) {
@@ -1544,6 +1720,10 @@ export default class Component extends Element {
1544
1720
  }
1545
1721
  }
1546
1722
  }
1723
+ /**
1724
+ * Redraw the component.
1725
+ * @returns {Promise<void>} - A promise that resolves when the component is done redrawing.
1726
+ */
1547
1727
  redraw() {
1548
1728
  // Don't bother if we have not built yet.
1549
1729
  if (!this.element || !this.element.parentNode || this.optimizeRedraw) {
@@ -1559,29 +1739,54 @@ export default class Component extends Element {
1559
1739
  this.setElement(parent.children[index]);
1560
1740
  return this.attach(this.element);
1561
1741
  }
1742
+ /**
1743
+ * Rebuild and redraw a component.
1744
+ * @returns {Promise<void>} - A promise that resolves when the component is done rebuilding and redrawing.
1745
+ */
1562
1746
  rebuild() {
1563
1747
  this.destroy();
1564
1748
  this.init();
1565
1749
  this.visible = this.conditionallyVisible(null, null);
1566
1750
  return this.redraw();
1567
1751
  }
1752
+ /**
1753
+ * Removes all event listeners attached to this component.
1754
+ */
1568
1755
  removeEventListeners() {
1569
1756
  super.removeEventListeners();
1570
1757
  this.tooltips.forEach(tooltip => tooltip.destroy());
1571
1758
  this.tooltips = [];
1572
1759
  }
1760
+ /**
1761
+ * Returns if the dom node has the classes provided.
1762
+ * @param {HTMLElement} element - The element to check for the class.
1763
+ * @param {string} className - The name of the class to check.
1764
+ * @returns {boolean|void} - TRUE if the element has the class.
1765
+ */
1573
1766
  hasClass(element, className) {
1574
1767
  if (!element) {
1575
1768
  return;
1576
1769
  }
1577
1770
  return super.hasClass(element, this.transform('class', className));
1578
1771
  }
1772
+ /**
1773
+ * Adds a class to an HTML element.
1774
+ * @param {HTMLElement} element - The dom element to add the class to.
1775
+ * @param {string} className - The class name you wish to add.
1776
+ * @returns {this|void} - The component instance.
1777
+ */
1579
1778
  addClass(element, className) {
1580
1779
  if (!element) {
1581
1780
  return;
1582
1781
  }
1583
1782
  return super.addClass(element, this.transform('class', className));
1584
1783
  }
1784
+ /**
1785
+ * Removes a class from an element.
1786
+ * @param {HTMLElement} element - The element to remove the class from.
1787
+ * @param {string} className - The class name to remove.
1788
+ * @returns {this|void} - The component instance.
1789
+ */
1585
1790
  removeClass(element, className) {
1586
1791
  if (!element) {
1587
1792
  return;
@@ -1590,8 +1795,7 @@ export default class Component extends Element {
1590
1795
  }
1591
1796
  /**
1592
1797
  * Determines if this component has a condition defined.
1593
- *
1594
- * @return {null}
1798
+ * @returns {boolean} - TRUE if the component has a condition defined.
1595
1799
  */
1596
1800
  hasCondition() {
1597
1801
  if (this._hasCondition !== null) {
@@ -1602,9 +1806,9 @@ export default class Component extends Element {
1602
1806
  }
1603
1807
  /**
1604
1808
  * Check if this component is conditionally visible.
1605
- *
1606
- * @param data
1607
- * @return {boolean}
1809
+ * @param {any} data - The data to check against.
1810
+ * @param {any} row - The row data to check against.
1811
+ * @returns {boolean} - TRUE if the component is conditionally visible.
1608
1812
  */
1609
1813
  conditionallyVisible(data, row) {
1610
1814
  data = data || this.rootValue;
@@ -1619,16 +1823,19 @@ export default class Component extends Element {
1619
1823
  * Checks the condition of this component.
1620
1824
  *
1621
1825
  * TODO: Switch row and data parameters to be consistent with other methods.
1622
- *
1623
- * @param row - The row contextual data.
1624
- * @param data - The global data object.
1625
- * @return {boolean} - True if the condition applies to this component.
1826
+ * @param {any} row - The row contextual data.
1827
+ * @param {any} data - The global data object.
1828
+ * @returns {boolean} - True if the condition applies to this component.
1626
1829
  */
1627
1830
  checkCondition(row, data) {
1628
1831
  return FormioUtils.checkCondition(this.component, row || this.data, data || this.rootValue, this.root ? this.root._form : {}, this);
1629
1832
  }
1630
1833
  /**
1631
1834
  * Check for conditionals and hide/show the element based on those conditions.
1835
+ * @param {any} data - The data to check against.
1836
+ * @param {any} flags - The flags passed to checkData function.
1837
+ * @param {any} row - The row data to check against.
1838
+ * @returns {boolean} - TRUE if the component is visible.
1632
1839
  */
1633
1840
  checkComponentConditions(data, flags, row) {
1634
1841
  data = data || this.rootValue;
@@ -1646,8 +1853,10 @@ export default class Component extends Element {
1646
1853
  }
1647
1854
  /**
1648
1855
  * Checks conditions for this component and any sub components.
1649
- * @param args
1650
- * @return {boolean}
1856
+ * @param {any} data - The data to check against.
1857
+ * @param {any} flags - The flags passed to checkData function.
1858
+ * @param {any} row - The row data to check against.
1859
+ * @returns {boolean} - TRUE if the component is visible.
1651
1860
  */
1652
1861
  checkConditions(data, flags, row) {
1653
1862
  data = data || this.rootValue;
@@ -1655,17 +1864,20 @@ export default class Component extends Element {
1655
1864
  row = row || this.data;
1656
1865
  return this.checkComponentConditions(data, flags, row);
1657
1866
  }
1867
+ /**
1868
+ * Returns the component logic if applicable.
1869
+ * @returns {Array<object>} - The component logic.
1870
+ */
1658
1871
  get logic() {
1659
1872
  return this.component.logic || [];
1660
1873
  }
1661
1874
  /**
1662
1875
  * Check all triggers and apply necessary actions.
1663
- *
1664
- * @param data
1876
+ * @param {any} data - The data to check against.
1877
+ * @param {any} row - The row data to check against.
1878
+ * @returns {boolean|void} - TRUE if the component was altered.
1665
1879
  */
1666
- fieldLogic(data, row) {
1667
- data = data || this.rootValue;
1668
- row = row || this.data;
1880
+ fieldLogic(data = this.rootValue, row = this.data) {
1669
1881
  const logics = this.logic;
1670
1882
  // If there aren't logic, don't go further.
1671
1883
  if (logics.length === 0) {
@@ -1688,6 +1900,10 @@ export default class Component extends Element {
1688
1900
  }
1689
1901
  return changed;
1690
1902
  }
1903
+ /**
1904
+ * Retuns if the browser is Internet Explorer.
1905
+ * @returns {boolean} - TRUE if the browser is IE.
1906
+ */
1691
1907
  isIE() {
1692
1908
  if (typeof window === 'undefined') {
1693
1909
  return false;
@@ -1712,9 +1928,24 @@ export default class Component extends Element {
1712
1928
  // other browser
1713
1929
  return false;
1714
1930
  }
1931
+ /**
1932
+ * Defines the logic action value through evaluation.
1933
+ * @param {object} action - The action within the Logic system to perform.
1934
+ * @param {object} argsObject - The arguments to pass to the evaluation.
1935
+ * @returns {any} - The result of the evaluation.
1936
+ */
1715
1937
  defineActionValue(action, argsObject) {
1716
1938
  return this.evaluate(action.value, argsObject, 'value');
1717
1939
  }
1940
+ /**
1941
+ * Apply the actions of Logic for a component once the conditions have been met.
1942
+ * @param {object} newComponent - The new component to apply the actions to.
1943
+ * @param {Array<object>} actions - An array of actions
1944
+ * @param {any} result - The result of the conditional check in order to evaluate the actions.
1945
+ * @param {any} row - The contextual row data for this component.
1946
+ * @param {any} data - The global data object for the submission.
1947
+ * @returns {boolean} - TRUE if the component was altered.
1948
+ */
1718
1949
  applyActions(newComponent, actions, result, row, data) {
1719
1950
  data = data || this.rootValue;
1720
1951
  row = row || this.data;
@@ -1794,8 +2025,8 @@ export default class Component extends Element {
1794
2025
  }
1795
2026
  /**
1796
2027
  * Add a new input error to this element.
1797
- *
1798
- * @param {{level: string, message: string}[]} messages
2028
+ * @param {Array<object>|string} messages - An array of messages to add to the element.
2029
+ * @returns {void}
1799
2030
  */
1800
2031
  addMessages(messages) {
1801
2032
  if (!messages) {
@@ -1814,13 +2045,19 @@ export default class Component extends Element {
1814
2045
  messages = _.uniqBy(messages, message => message.message);
1815
2046
  if (this.refs.messageContainer) {
1816
2047
  this.setContent(this.refs.messageContainer, messages.map((message) => {
1817
- if (message.message && typeof message.message === 'string') {
1818
- message.message = message.message.replaceAll('<', '&lt;').replaceAll('>', '&gt;');
1819
- }
1820
2048
  return this.renderTemplate('message', { ...message });
1821
2049
  }).join(''));
1822
2050
  }
1823
2051
  }
2052
+ /**
2053
+ * Sets the form input widget error classes.
2054
+ * @param {Array<HTMLElement>} elements - An array of DOM elements to set the error classes on.
2055
+ * @param {boolean} dirty - If the input is dirty.
2056
+ * @param {boolean} hasErrors - If the input has errors.
2057
+ * @param {boolean} hasMessages - If the input has messages.
2058
+ * @param {HTMLElement} element - The wrapper element for all the other elements passed in first argument.
2059
+ * @returns {void}
2060
+ */
1824
2061
  setErrorClasses(elements, dirty, hasErrors, hasMessages, element = this.element) {
1825
2062
  this.clearErrorClasses();
1826
2063
  elements.forEach((element) => {
@@ -1847,6 +2084,12 @@ export default class Component extends Element {
1847
2084
  this.addClass(element, 'has-message');
1848
2085
  }
1849
2086
  }
2087
+ /**
2088
+ * Adds the classes necessary to mark an element as invalid.
2089
+ * @param {HTMLElement} element - The element you wish to add the invalid classes to.
2090
+ * @param {boolean} invalid - TRUE if the component is invalid, FALSE otherwise.
2091
+ * @returns {void}
2092
+ */
1850
2093
  setElementInvalid(element, invalid) {
1851
2094
  if (!element)
1852
2095
  return;
@@ -1858,6 +2101,9 @@ export default class Component extends Element {
1858
2101
  }
1859
2102
  element.setAttribute('aria-invalid', invalid ? 'true' : 'false');
1860
2103
  }
2104
+ /**
2105
+ * Clears the components data if it is conditionally hidden AND clearOnHide is set to true for this component.
2106
+ */
1861
2107
  clearOnHide() {
1862
2108
  // clearOnHide defaults to true for old forms (without the value set) so only trigger if the value is false.
1863
2109
  if (
@@ -1877,6 +2123,10 @@ export default class Component extends Element {
1877
2123
  }
1878
2124
  }
1879
2125
  }
2126
+ /**
2127
+ * Triggers a debounced onChange event for the root component (usually Webform).
2128
+ * @param {...any} args - The arguments to pass to the onChange event.
2129
+ */
1880
2130
  triggerRootChange(...args) {
1881
2131
  if (this.options.onChange) {
1882
2132
  this.options.onChange(...args);
@@ -1885,6 +2135,13 @@ export default class Component extends Element {
1885
2135
  this.root.triggerChange(...args);
1886
2136
  }
1887
2137
  }
2138
+ /**
2139
+ * Called when the component value has been changed. This will then trigger the root level onChange handler which
2140
+ * propagates the checkData methods for the full component tree.
2141
+ * @param {any} flags - The flags for the change event propagation.
2142
+ * @param {boolean} fromRoot - If the change event is from the root component.
2143
+ * @returns {boolean} - TRUE if the component has changed.
2144
+ */
1888
2145
  onChange(flags, fromRoot) {
1889
2146
  flags = flags || {};
1890
2147
  if (flags.modified) {
@@ -2020,7 +2277,7 @@ export default class Component extends Element {
2020
2277
  return Promise.reject();
2021
2278
  }
2022
2279
  this.quill = new Quill(element, isIEBrowser ? { ...settings, modules: {} } : settings);
2023
- /** This block of code adds the [source] capabilities. See https://codepen.io/anon/pen/ZyEjrQ **/
2280
+ /** This block of code adds the [source] capabilities. See https://codepen.io/anon/pen/ZyEjrQ */
2024
2281
  const txtArea = document.createElement('textarea');
2025
2282
  txtArea.setAttribute('class', 'quill-source-code');
2026
2283
  this.quill.addContainer('ql-custom').appendChild(txtArea);
@@ -2034,7 +2291,7 @@ export default class Component extends Element {
2034
2291
  txtArea.style.display = (txtArea.style.display === 'none') ? 'inherit' : 'none';
2035
2292
  });
2036
2293
  }
2037
- /** END CODEBLOCK **/
2294
+ /** END CODEBLOCK */
2038
2295
  // Make sure to select cursor when they click on the element.
2039
2296
  this.addEventListener(element, 'click', () => this.quill.focus());
2040
2297
  // Allows users to skip toolbar items when tabbing though form
@@ -2081,23 +2338,22 @@ export default class Component extends Element {
2081
2338
  }
2082
2339
  /**
2083
2340
  * The empty value for this component.
2084
- *
2085
- * @return {null}
2341
+ * @returns {null} - The empty value for this component.
2086
2342
  */
2087
2343
  get emptyValue() {
2088
2344
  return null;
2089
2345
  }
2090
2346
  /**
2091
2347
  * Returns if this component has a value set.
2092
- *
2348
+ * @param {any} data - The global data object.
2349
+ * @returns {boolean} - TRUE if a value is set.
2093
2350
  */
2094
2351
  hasValue(data) {
2095
2352
  return !_.isUndefined(_.get(data || this.data, this.key));
2096
2353
  }
2097
2354
  /**
2098
2355
  * Get the data value at the root level.
2099
- *
2100
- * @return {*}
2356
+ * @returns {*} - The root value for the component, typically the Webform data object.
2101
2357
  */
2102
2358
  get rootValue() {
2103
2359
  return this.root ? this.root.data : this.data;
@@ -2107,7 +2363,7 @@ export default class Component extends Element {
2107
2363
  }
2108
2364
  /**
2109
2365
  * Get the static value of this component.
2110
- * @return {*}
2366
+ * @returns {*} - The value for this component.
2111
2367
  */
2112
2368
  get dataValue() {
2113
2369
  if (!this.key ||
@@ -2125,8 +2381,7 @@ export default class Component extends Element {
2125
2381
  }
2126
2382
  /**
2127
2383
  * Sets the static value of this component.
2128
- *
2129
- * @param value
2384
+ * @param {*} value - The value to set for this component.
2130
2385
  */
2131
2386
  set dataValue(value) {
2132
2387
  if (!this.allowData ||
@@ -2146,8 +2401,8 @@ export default class Component extends Element {
2146
2401
  }
2147
2402
  /**
2148
2403
  * Splice a value from the dataValue.
2149
- *
2150
- * @param index
2404
+ * @param {number} index - The index to splice for an array component values.
2405
+ * @param {*} flags - The flags to use when splicing the value.
2151
2406
  */
2152
2407
  splice(index, flags = {}) {
2153
2408
  if (this.hasValue()) {
@@ -2215,8 +2470,7 @@ export default class Component extends Element {
2215
2470
  }
2216
2471
  /**
2217
2472
  * Get the input value of this component.
2218
- *
2219
- * @return {*}
2473
+ * @returns {*} - The value for the component.
2220
2474
  */
2221
2475
  getValue() {
2222
2476
  if (!this.hasInput || this.viewOnly || !this.refs.input || !this.refs.input.length) {
@@ -2238,9 +2492,8 @@ export default class Component extends Element {
2238
2492
  }
2239
2493
  /**
2240
2494
  * Get the value at a specific index.
2241
- *
2242
- * @param index
2243
- * @returns {*}
2495
+ * @param {number} index - For an array component or multiple values, this returns the value at a specific index.
2496
+ * @returns {*} - The value at the specified index.
2244
2497
  */
2245
2498
  getValueAt(index) {
2246
2499
  const input = this.performInputMapping(this.refs.input[index]);
@@ -2248,11 +2501,9 @@ export default class Component extends Element {
2248
2501
  }
2249
2502
  /**
2250
2503
  * Set the value of this component.
2251
- *
2252
- * @param value
2253
- * @param flags
2254
- *
2255
- * @return {boolean} - If the value changed.
2504
+ * @param {*} value - The value to set for this component.
2505
+ * @param {*} flags - The flags to use when setting the value.
2506
+ * @returns {boolean} - If the value changed.
2256
2507
  */
2257
2508
  setValue(value, flags = {}) {
2258
2509
  const changed = this.updateValue(value, flags);
@@ -2283,9 +2534,9 @@ export default class Component extends Element {
2283
2534
  }
2284
2535
  /**
2285
2536
  * Set the value at a specific index.
2286
- *
2287
- * @param index
2288
- * @param value
2537
+ * @param {number} index - The index to set the value at.
2538
+ * @param {*} value - The value to set at the specified index.
2539
+ * @param {*} flags - The flags to use when setting the value.
2289
2540
  */
2290
2541
  setValueAt(index, value, flags = {}) {
2291
2542
  if (!flags.noDefault && (value === null || value === undefined) && !this.component.multiple) {
@@ -2332,9 +2583,8 @@ export default class Component extends Element {
2332
2583
  }
2333
2584
  /**
2334
2585
  * Normalize values coming into updateValue.
2335
- *
2336
- * @param value
2337
- * @return {*}
2586
+ * @param {*} value - The value to normalize before setting.
2587
+ * @returns {*} - The normalized value.
2338
2588
  */
2339
2589
  normalizeValue(value) {
2340
2590
  if (this.component.multiple && !Array.isArray(value)) {
@@ -2344,8 +2594,9 @@ export default class Component extends Element {
2344
2594
  }
2345
2595
  /**
2346
2596
  * Update a value of this component.
2347
- *
2348
- * @param flags
2597
+ * @param {*} value - The value to update.
2598
+ * @param {*} flags - The flags to use when updating the value.
2599
+ * @returns {boolean} - If the value changed.
2349
2600
  */
2350
2601
  updateComponentValue(value, flags = {}) {
2351
2602
  let newValue = (!flags.resetValue && (value === undefined || value === null)) ? this.getValue() : value;
@@ -2364,9 +2615,8 @@ export default class Component extends Element {
2364
2615
  }
2365
2616
  /**
2366
2617
  * Updates the value of this component plus all sub-components.
2367
- *
2368
- * @param args
2369
- * @return {boolean}
2618
+ * @param {...any} args - The arguments to pass to updateValue.
2619
+ * @returns {boolean} - If the value changed.
2370
2620
  */
2371
2621
  updateValue(...args) {
2372
2622
  return this.updateComponentValue(...args);
@@ -2392,10 +2642,9 @@ export default class Component extends Element {
2392
2642
  }
2393
2643
  /**
2394
2644
  * Determine if the value of this component has changed.
2395
- *
2396
- * @param newValue
2397
- * @param oldValue
2398
- * @return {boolean}
2645
+ * @param {*} newValue - The new value to check.
2646
+ * @param {*} oldValue - The existing value of the component.
2647
+ * @returns {boolean} - TRUE if the value has changed.
2399
2648
  */
2400
2649
  hasChanged(newValue, oldValue) {
2401
2650
  if (((newValue === undefined) || (newValue === null)) &&
@@ -2413,8 +2662,9 @@ export default class Component extends Element {
2413
2662
  }
2414
2663
  /**
2415
2664
  * Update the value on change.
2416
- *
2417
- * @param flags
2665
+ * @param {*} flags - The flags to use when triggering the on change event.
2666
+ * @param {boolean} changed - If the value has changed.
2667
+ * @returns {boolean} - If the value changed.
2418
2668
  */
2419
2669
  updateOnChange(flags = {}, changed = false) {
2420
2670
  if (!flags.noUpdateEvent && changed) {
@@ -2427,13 +2677,6 @@ export default class Component extends Element {
2427
2677
  }
2428
2678
  return false;
2429
2679
  }
2430
- /**
2431
- * Perform a calculated value operation.
2432
- *
2433
- * @param data - The global data object.
2434
- *
2435
- * @return {boolean} - If the value changed during calculation.
2436
- */
2437
2680
  convertNumberOrBoolToString(value) {
2438
2681
  if (typeof value === 'number' || typeof value === 'boolean') {
2439
2682
  return value.toString();
@@ -2530,7 +2773,7 @@ export default class Component extends Element {
2530
2773
  }
2531
2774
  this.calculatedValue = fastCloneDeep(calculatedValue);
2532
2775
  if (changed) {
2533
- if (!flags.noPristineChangeOnModified) {
2776
+ if (!flags.noPristineChangeOnModified && this.root.initialized) {
2534
2777
  this.pristine = false;
2535
2778
  }
2536
2779
  flags.triggeredComponentId = this.id;
@@ -2541,9 +2784,10 @@ export default class Component extends Element {
2541
2784
  /* eslint-enable max-statements */
2542
2785
  /**
2543
2786
  * Performs calculations in this component plus any child components.
2544
- *
2545
- * @param args
2546
- * @return {boolean}
2787
+ * @param {*} data - The data to perform the calculation with.
2788
+ * @param {*} flags - The flags to use when calculating the value.
2789
+ * @param {*} row - The contextual row data to use when performing the calculation.
2790
+ * @returns {boolean} - TRUE if the value changed.
2547
2791
  */
2548
2792
  calculateValue(data, flags, row) {
2549
2793
  data = data || this.rootValue;
@@ -2553,15 +2797,14 @@ export default class Component extends Element {
2553
2797
  }
2554
2798
  /**
2555
2799
  * Get this component's label text.
2556
- *
2800
+ * @returns {string} - The label text for this component.
2557
2801
  */
2558
2802
  get label() {
2559
2803
  return this.component.label;
2560
2804
  }
2561
2805
  /**
2562
2806
  * Set this component's label text and render it.
2563
- *
2564
- * @param value - The new label text.
2807
+ * @param {string} value - The new label text.
2565
2808
  */
2566
2809
  set label(value) {
2567
2810
  this.component.label = value;
@@ -2571,17 +2814,18 @@ export default class Component extends Element {
2571
2814
  }
2572
2815
  /**
2573
2816
  * Get FormioForm element at the root of this component tree.
2574
- *
2817
+ * @returns {*} root - The root component to search from.
2575
2818
  */
2576
2819
  getRoot() {
2577
2820
  return this.root;
2578
2821
  }
2579
2822
  /**
2580
2823
  * Returns the invalid message, or empty string if the component is valid.
2581
- *
2582
- * @param data
2583
- * @param dirty
2584
- * @return {*}
2824
+ * @param {*} data - The data to check if the component is valid.
2825
+ * @param {boolean} dirty - If the component is dirty.
2826
+ * @param {boolean} ignoreCondition - If conditions for the component should be ignored when checking validity.
2827
+ * @param {*} row - Contextual row data for this component.
2828
+ * @returns {string} - The message to show when the component is invalid.
2585
2829
  */
2586
2830
  invalidMessage(data, dirty, ignoreCondition, row) {
2587
2831
  if (!ignoreCondition && !this.checkCondition(row, data)) {
@@ -2613,10 +2857,9 @@ export default class Component extends Element {
2613
2857
  }
2614
2858
  /**
2615
2859
  * Returns if the component is valid or not.
2616
- *
2617
- * @param data
2618
- * @param dirty
2619
- * @return {boolean}
2860
+ * @param {*} data - The data to check if the component is valid.
2861
+ * @param {boolean} dirty - If the component is dirty.
2862
+ * @returns {boolean} - TRUE if the component is valid.
2620
2863
  */
2621
2864
  isValid(data, dirty) {
2622
2865
  return !this.invalidMessage(data, dirty);
@@ -2635,8 +2878,8 @@ export default class Component extends Element {
2635
2878
  }
2636
2879
  /**
2637
2880
  * Interpolate errors from the validation methods.
2638
- * @param {*} errors
2639
- * @returns
2881
+ * @param {Array<any>} errors - An array of errors to interpolate.
2882
+ * @returns {Array<any>} - The interpolated errors.
2640
2883
  */
2641
2884
  interpolateErrors(errors) {
2642
2885
  const interpolatedErrors = FormioUtils.interpolateErrors(this.component, errors, this.t.bind(this));
@@ -2648,7 +2891,7 @@ export default class Component extends Element {
2648
2891
  * @param {*} data - The root submission data.
2649
2892
  * @param {*} row - The contextual row data.
2650
2893
  * @param {*} flags - The flags to perform validation.
2651
- * @returns
2894
+ * @returns {boolean} - TRUE if the component is valid.
2652
2895
  */
2653
2896
  showValidationErrors(errors, data, row, flags) {
2654
2897
  if (flags.silentCheck) {
@@ -2668,9 +2911,9 @@ export default class Component extends Element {
2668
2911
  * @param {*} data - The root data you wish to use for this component.
2669
2912
  * @param {*} row - The contextual row data you wish to use for this component.
2670
2913
  * @param {*} flags - The flags to control the behavior of the validation.
2671
- * @returns
2914
+ * @returns {Array<any>} - An array of errors if the component is invalid.
2672
2915
  */
2673
- validateComponent(data, row, flags = {}) {
2916
+ validateComponent(data = null, row = null, flags = {}) {
2674
2917
  data = data || this.rootValue;
2675
2918
  row = row || this.data;
2676
2919
  const { async = false } = flags;
@@ -2701,13 +2944,14 @@ export default class Component extends Element {
2701
2944
  }
2702
2945
  /**
2703
2946
  * Checks the validity of this component and sets the error message if it is invalid.
2704
- *
2705
- * @param data
2706
- * @param dirty
2707
- * @param row
2708
- * @return {boolean}
2709
- */
2710
- checkComponentValidity(data, dirty, row, flags = {}, allErrors = []) {
2947
+ * @param {*} data - The data to check if the component is valid.
2948
+ * @param {boolean} dirty - If the component is dirty.
2949
+ * @param {*} row - The contextual row data for this component.
2950
+ * @param {*} flags - The flags to use when checking the validity.
2951
+ * @param {Array<any>} allErrors - An array of all errors that have occured so that it can be appended when another one occurs here.
2952
+ * @returns {boolean} - TRUE if the component is valid.
2953
+ */
2954
+ checkComponentValidity(data = null, dirty = false, row = null, flags = {}, allErrors = []) {
2711
2955
  data = data || this.rootValue;
2712
2956
  row = row || this.data;
2713
2957
  flags.dirty = dirty || false;
@@ -2743,32 +2987,30 @@ export default class Component extends Element {
2743
2987
  }
2744
2988
  /**
2745
2989
  * Checks the validity of the component.
2746
- * @param {*} data
2747
- * @param {*} dirty
2748
- * @param {*} row
2749
- * @param {*} silentCheck
2750
- * @returns
2751
- */
2752
- checkValidity(data, dirty, row, silentCheck, errors = []) {
2990
+ * @param {*} data - The data to check if the component is valid.
2991
+ * @param {boolean} dirty - If the component is dirty.
2992
+ * @param {*} row - The contextual row data for this component.
2993
+ * @param {boolean} silentCheck - If the check should be silent and not set the error messages.
2994
+ * @param {Array<any>} errors - An array of all errors that have occured so that it can be appended when another one occurs here.
2995
+ * @returns {boolean} - TRUE if the component is valid.
2996
+ */
2997
+ checkValidity(data = null, dirty = false, row = null, silentCheck = false, errors = []) {
2753
2998
  data = data || this.rootValue;
2754
2999
  row = row || this.data;
2755
- console.log('Deprecation warning: Component.checkValidity() will be deprecated in 6.x version of renderer. Use Component.validateComponent instead.');
2756
3000
  return this.checkComponentValidity(data, dirty, row, { silentCheck }, errors);
2757
3001
  }
2758
- checkAsyncValidity(data, dirty, row, silentCheck, errors = []) {
2759
- console.log('Deprecation warning: Component.checkAsyncValidity() will be deprecated in 6.x version of renderer. Use Component.validateComponent instead.');
3002
+ checkAsyncValidity(data = null, dirty = false, row = null, silentCheck = false, errors = []) {
2760
3003
  return this.checkComponentValidity(data, dirty, row, { async: true, silentCheck }, errors);
2761
3004
  }
2762
3005
  /**
2763
3006
  * Check the conditions, calculations, and validity of a single component and triggers an update if
2764
3007
  * something changed.
2765
- *
2766
- * @param data - The root data of the change event.
2767
- * @param flags - The flags from this change event.
2768
- *
2769
- * @return boolean - If component is valid or not.
3008
+ * @param {*} data - The root data of the change event.
3009
+ * @param {*} flags - The flags from this change event.
3010
+ * @param {*} row - The contextual row data for this component.
3011
+ * @returns {void|boolean} - TRUE if no check should be performed on the component.
2770
3012
  */
2771
- checkData(data, flags, row) {
3013
+ checkData(data = null, flags = null, row = null) {
2772
3014
  data = data || this.rootValue;
2773
3015
  flags = flags || {};
2774
3016
  row = row || this.data;
@@ -2811,8 +3053,7 @@ export default class Component extends Element {
2811
3053
  }
2812
3054
  /**
2813
3055
  * Check if a component is eligible for multiple validation
2814
- *
2815
- * @return {boolean}
3056
+ * @returns {boolean} - TRUE if the component is eligible for multiple validation.
2816
3057
  */
2817
3058
  validateMultiple() {
2818
3059
  return true;
@@ -2930,8 +3171,7 @@ export default class Component extends Element {
2930
3171
  /**
2931
3172
  * Determines if the value of this component is hidden from the user as if it is coming from the server, but is
2932
3173
  * protected.
2933
- *
2934
- * @return {boolean|*}
3174
+ * @returns {boolean|*} - TRUE if the value is hidden.
2935
3175
  */
2936
3176
  isValueHidden() {
2937
3177
  if (this.component.protected && this.root.editing) {
@@ -2976,6 +3216,8 @@ export default class Component extends Element {
2976
3216
  }
2977
3217
  /**
2978
3218
  * Prints out the value of this component as a string value.
3219
+ * @param {*} value - The value to print out.
3220
+ * @returns {string} - The string representation of the value.
2979
3221
  */
2980
3222
  asString(value) {
2981
3223
  value = value || this.getValue();
@@ -2983,15 +3225,14 @@ export default class Component extends Element {
2983
3225
  }
2984
3226
  /**
2985
3227
  * Return if the component is disabled.
2986
- * @return {boolean}
3228
+ * @returns {boolean} - TRUE if the component is disabled.
2987
3229
  */
2988
3230
  get disabled() {
2989
3231
  return this._disabled || this.parentDisabled;
2990
3232
  }
2991
3233
  /**
2992
3234
  * Disable this component.
2993
- *
2994
- * @param {boolean} disabled
3235
+ * @param {boolean} disabled - TRUE to disable the component.
2995
3236
  */
2996
3237
  set disabled(disabled) {
2997
3238
  this._disabled = disabled;
@@ -3116,6 +3357,7 @@ export default class Component extends Element {
3116
3357
  }
3117
3358
  /**
3118
3359
  * Get the element information.
3360
+ * @returns {*} - The components "input" DOM element information.
3119
3361
  */
3120
3362
  elementInfo() {
3121
3363
  const attributes = {
@@ -3154,14 +3396,12 @@ export default class Component extends Element {
3154
3396
  const { left, top } = element.getBoundingClientRect();
3155
3397
  window.scrollTo(left + window.scrollX, top + window.scrollY);
3156
3398
  }
3157
- focus(index) {
3399
+ focus(index = (this.refs.input.length - 1)) {
3158
3400
  if ('beforeFocus' in this.parent) {
3159
3401
  this.parent.beforeFocus(this);
3160
3402
  }
3161
3403
  if (this.refs.input?.length) {
3162
- const focusingInput = typeof index === 'number' && this.refs.input[index]
3163
- ? this.refs.input[index]
3164
- : this.refs.input[this.refs.input.length - 1];
3404
+ const focusingInput = this.refs.input[index];
3165
3405
  if (this.component.widget?.type === 'calendar') {
3166
3406
  const sibling = focusingInput.nextSibling;
3167
3407
  if (sibling) {
@@ -3181,6 +3421,7 @@ export default class Component extends Element {
3181
3421
  }
3182
3422
  /**
3183
3423
  * Get `Formio` instance for working with files
3424
+ * @returns {import('@formio/core').Formio} - The Formio instance file service.
3184
3425
  */
3185
3426
  get fileService() {
3186
3427
  if (this.options.fileService) {