@formio/js 5.0.0-dev.5641.d9ab3df → 5.0.0-dev.5643.17b8168

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 (461) hide show
  1. package/Changelog.md +0 -37
  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 +1188 -607
  6. package/dist/formio.form.min.js +1 -1
  7. package/dist/formio.form.min.js.LICENSE.txt +5 -3
  8. package/dist/formio.full.js +912 -651
  9. package/dist/formio.full.min.js +1 -1
  10. package/dist/formio.full.min.js.LICENSE.txt +5 -3
  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 +494 -1831
  15. package/dist/formio.utils.min.js +1 -1
  16. package/dist/formio.utils.min.js.LICENSE.txt +4 -10
  17. package/lib/cjs/CDN.d.ts +0 -1
  18. package/lib/cjs/CDN.js +3 -6
  19. package/lib/cjs/Element.d.ts +96 -86
  20. package/lib/cjs/Element.js +78 -68
  21. package/lib/cjs/Embed.d.ts +1 -1
  22. package/lib/cjs/Embed.js +12 -52
  23. package/lib/cjs/Form.d.ts +36 -365
  24. package/lib/cjs/Form.js +64 -50
  25. package/lib/cjs/FormBuilder.d.ts +2 -187
  26. package/lib/cjs/FormBuilder.js +8 -30
  27. package/lib/cjs/PDF.d.ts +13 -11
  28. package/lib/cjs/PDF.js +8 -6
  29. package/lib/cjs/Webform.d.ts +139 -180
  30. package/lib/cjs/Webform.js +296 -309
  31. package/lib/cjs/WebformBuilder.d.ts +14 -16
  32. package/lib/cjs/WebformBuilder.js +10 -11
  33. package/lib/cjs/Wizard.d.ts +21 -31
  34. package/lib/cjs/Wizard.js +20 -43
  35. package/lib/cjs/WizardBuilder.d.ts +1 -1
  36. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +5 -8
  37. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +3 -6
  38. package/lib/cjs/components/Components.d.ts +4 -4
  39. package/lib/cjs/components/Components.js +3 -3
  40. package/lib/cjs/components/_classes/component/Component.d.ts +269 -502
  41. package/lib/cjs/components/_classes/component/Component.form.d.ts +3 -6
  42. package/lib/cjs/components/_classes/component/Component.form.js +0 -5
  43. package/lib/cjs/components/_classes/component/Component.js +189 -433
  44. package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +8 -0
  45. package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +2 -2
  46. package/lib/cjs/components/_classes/component/editForm/utils.js +2 -2
  47. package/lib/cjs/components/_classes/field/Field.d.ts +2 -11
  48. package/lib/cjs/components/_classes/field/Field.js +1 -13
  49. package/lib/cjs/components/_classes/input/Input.d.ts +3 -4
  50. package/lib/cjs/components/_classes/input/Input.js +2 -2
  51. package/lib/cjs/components/_classes/list/ListComponent.d.ts +2 -2
  52. package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +3 -6
  53. package/lib/cjs/components/_classes/list/ListComponent.form.js +0 -5
  54. package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +12 -43
  55. package/lib/cjs/components/_classes/multivalue/Multivalue.js +3 -37
  56. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +67 -163
  57. package/lib/cjs/components/_classes/nested/NestedComponent.form.d.ts +3 -6
  58. package/lib/cjs/components/_classes/nested/NestedComponent.form.js +0 -5
  59. package/lib/cjs/components/_classes/nested/NestedComponent.js +54 -175
  60. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +2 -2
  61. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
  62. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +1 -7
  63. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +3 -2
  64. package/lib/cjs/components/address/Address.d.ts +2 -4
  65. package/lib/cjs/components/address/Address.form.d.ts +3 -6
  66. package/lib/cjs/components/address/Address.form.js +0 -5
  67. package/lib/cjs/components/button/Button.d.ts +12 -3
  68. package/lib/cjs/components/button/Button.form.d.ts +3 -6
  69. package/lib/cjs/components/button/Button.form.js +0 -5
  70. package/lib/cjs/components/button/Button.js +0 -5
  71. package/lib/cjs/components/checkbox/Checkbox.d.ts +27 -4
  72. package/lib/cjs/components/checkbox/Checkbox.form.d.ts +3 -6
  73. package/lib/cjs/components/checkbox/Checkbox.form.js +0 -5
  74. package/lib/cjs/components/columns/Columns.d.ts +2 -3
  75. package/lib/cjs/components/columns/Columns.form.d.ts +3 -6
  76. package/lib/cjs/components/columns/Columns.form.js +0 -5
  77. package/lib/cjs/components/columns/Columns.js +1 -1
  78. package/lib/cjs/components/container/Container.form.d.ts +3 -6
  79. package/lib/cjs/components/container/Container.form.js +0 -5
  80. package/lib/cjs/components/content/Content.d.ts +1 -2
  81. package/lib/cjs/components/content/Content.form.d.ts +3 -6
  82. package/lib/cjs/components/content/Content.form.js +0 -5
  83. package/lib/cjs/components/currency/Currency.form.d.ts +3 -6
  84. package/lib/cjs/components/currency/Currency.form.js +0 -5
  85. package/lib/cjs/components/currency/Currency.js +2 -1
  86. package/lib/cjs/components/datagrid/DataGrid.d.ts +7 -8
  87. package/lib/cjs/components/datagrid/DataGrid.form.d.ts +3 -6
  88. package/lib/cjs/components/datagrid/DataGrid.form.js +0 -5
  89. package/lib/cjs/components/datagrid/DataGrid.js +5 -5
  90. package/lib/cjs/components/datagrid/fixtures/comp-with-checkboxes.d.ts +29 -0
  91. package/lib/cjs/components/datagrid/fixtures/comp-with-checkboxes.js +36 -0
  92. package/lib/cjs/components/datagrid/fixtures/index.d.ts +2 -1
  93. package/lib/cjs/components/datagrid/fixtures/index.js +3 -1
  94. package/lib/cjs/components/datamap/DataMap.d.ts +0 -1
  95. package/lib/cjs/components/datamap/DataMap.form.d.ts +3 -6
  96. package/lib/cjs/components/datamap/DataMap.form.js +0 -5
  97. package/lib/cjs/components/datetime/DateTime.d.ts +14 -0
  98. package/lib/cjs/components/datetime/DateTime.form.d.ts +3 -6
  99. package/lib/cjs/components/datetime/DateTime.form.js +0 -5
  100. package/lib/cjs/components/datetime/editForm/DateTime.edit.date.js +2 -2
  101. package/lib/cjs/components/day/Day.d.ts +48 -22
  102. package/lib/cjs/components/day/Day.form.d.ts +3 -6
  103. package/lib/cjs/components/day/Day.form.js +0 -5
  104. package/lib/cjs/components/day/Day.js +20 -15
  105. package/lib/cjs/components/editgrid/EditGrid.d.ts +3 -7
  106. package/lib/cjs/components/editgrid/EditGrid.form.d.ts +3 -6
  107. package/lib/cjs/components/editgrid/EditGrid.form.js +0 -5
  108. package/lib/cjs/components/editgrid/EditGrid.js +3 -3
  109. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +5 -2
  110. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.js +9 -6
  111. package/lib/cjs/components/email/Email.form.d.ts +3 -6
  112. package/lib/cjs/components/email/Email.form.js +0 -5
  113. package/lib/cjs/components/fieldset/Fieldset.form.d.ts +3 -6
  114. package/lib/cjs/components/fieldset/Fieldset.form.js +0 -5
  115. package/lib/cjs/components/file/File.d.ts +22 -9
  116. package/lib/cjs/components/file/File.form.d.ts +3 -6
  117. package/lib/cjs/components/file/File.form.js +0 -5
  118. package/lib/cjs/components/form/Form.d.ts +20 -31
  119. package/lib/cjs/components/form/Form.form.d.ts +3 -6
  120. package/lib/cjs/components/form/Form.form.js +0 -5
  121. package/lib/cjs/components/form/Form.js +14 -17
  122. package/lib/cjs/components/hidden/Hidden.d.ts +11 -1
  123. package/lib/cjs/components/hidden/Hidden.form.d.ts +3 -6
  124. package/lib/cjs/components/hidden/Hidden.form.js +0 -5
  125. package/lib/cjs/components/hidden/Hidden.js +2 -1
  126. package/lib/cjs/components/html/HTML.d.ts +1 -2
  127. package/lib/cjs/components/html/HTML.form.d.ts +3 -6
  128. package/lib/cjs/components/html/HTML.form.js +0 -5
  129. package/lib/cjs/components/number/Number.d.ts +17 -3
  130. package/lib/cjs/components/number/Number.form.d.ts +3 -6
  131. package/lib/cjs/components/number/Number.form.js +0 -5
  132. package/lib/cjs/components/number/Number.js +2 -1
  133. package/lib/cjs/components/panel/Panel.form.d.ts +3 -6
  134. package/lib/cjs/components/panel/Panel.form.js +0 -5
  135. package/lib/cjs/components/panel/Panel.js +1 -0
  136. package/lib/cjs/components/password/Password.form.d.ts +3 -6
  137. package/lib/cjs/components/password/Password.form.js +0 -5
  138. package/lib/cjs/components/phonenumber/PhoneNumber.form.d.ts +3 -6
  139. package/lib/cjs/components/phonenumber/PhoneNumber.form.js +0 -5
  140. package/lib/cjs/components/radio/Radio.d.ts +26 -3
  141. package/lib/cjs/components/radio/Radio.form.d.ts +3 -6
  142. package/lib/cjs/components/radio/Radio.form.js +0 -5
  143. package/lib/cjs/components/radio/Radio.js +7 -5
  144. package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +1 -1
  145. package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +3 -6
  146. package/lib/cjs/components/recaptcha/ReCaptcha.form.js +0 -5
  147. package/lib/cjs/components/select/Select.d.ts +39 -16
  148. package/lib/cjs/components/select/Select.form.d.ts +3 -6
  149. package/lib/cjs/components/select/Select.form.js +0 -5
  150. package/lib/cjs/components/select/Select.js +16 -13
  151. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +17 -2
  152. package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +3 -6
  153. package/lib/cjs/components/selectboxes/SelectBoxes.form.js +0 -5
  154. package/lib/cjs/components/selectboxes/SelectBoxes.js +9 -7
  155. package/lib/cjs/components/signature/Signature.d.ts +14 -1
  156. package/lib/cjs/components/signature/Signature.form.d.ts +3 -6
  157. package/lib/cjs/components/signature/Signature.form.js +0 -5
  158. package/lib/cjs/components/survey/Survey.d.ts +15 -3
  159. package/lib/cjs/components/survey/Survey.form.d.ts +3 -6
  160. package/lib/cjs/components/survey/Survey.form.js +0 -5
  161. package/lib/cjs/components/table/Table.d.ts +1 -2
  162. package/lib/cjs/components/table/Table.form.d.ts +3 -6
  163. package/lib/cjs/components/table/Table.form.js +0 -5
  164. package/lib/cjs/components/tabs/Tabs.d.ts +4 -4
  165. package/lib/cjs/components/tabs/Tabs.form.d.ts +3 -6
  166. package/lib/cjs/components/tabs/Tabs.form.js +0 -5
  167. package/lib/cjs/components/tabs/Tabs.js +2 -1
  168. package/lib/cjs/components/tags/Tags.d.ts +14 -0
  169. package/lib/cjs/components/tags/Tags.form.d.ts +3 -6
  170. package/lib/cjs/components/tags/Tags.form.js +0 -5
  171. package/lib/cjs/components/textarea/TextArea.d.ts +9 -4
  172. package/lib/cjs/components/textarea/TextArea.form.d.ts +3 -6
  173. package/lib/cjs/components/textarea/TextArea.form.js +0 -5
  174. package/lib/cjs/components/textarea/TextArea.js +2 -2
  175. package/lib/cjs/components/textfield/TextField.d.ts +30 -14
  176. package/lib/cjs/components/textfield/TextField.form.d.ts +3 -6
  177. package/lib/cjs/components/textfield/TextField.form.js +0 -5
  178. package/lib/cjs/components/textfield/TextField.js +17 -16
  179. package/lib/cjs/components/time/Time.form.d.ts +3 -6
  180. package/lib/cjs/components/time/Time.form.js +0 -5
  181. package/lib/cjs/components/unknown/Unknown.form.d.ts +34 -5
  182. package/lib/cjs/components/unknown/Unknown.form.js +0 -4
  183. package/lib/cjs/components/url/Url.form.d.ts +3 -6
  184. package/lib/cjs/components/url/Url.form.js +0 -5
  185. package/lib/cjs/components/well/Well.form.d.ts +3 -6
  186. package/lib/cjs/components/well/Well.form.js +0 -5
  187. package/lib/cjs/formio.embed.d.ts +2 -1
  188. package/lib/cjs/formio.embed.js +100 -2
  189. package/lib/cjs/formio.form.d.ts +4 -11
  190. package/lib/cjs/formio.form.js +5 -13
  191. package/lib/cjs/providers/Providers.d.ts +5 -36
  192. package/lib/cjs/providers/Providers.js +0 -29
  193. package/lib/cjs/providers/address/AddressProvider.d.ts +12 -131
  194. package/lib/cjs/providers/address/AddressProvider.js +2 -88
  195. package/lib/cjs/providers/address/AzureAddressProvider.d.ts +1 -48
  196. package/lib/cjs/providers/address/AzureAddressProvider.js +0 -37
  197. package/lib/cjs/providers/address/CustomAddressProvider.d.ts +4 -27
  198. package/lib/cjs/providers/address/CustomAddressProvider.js +0 -34
  199. package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +6 -130
  200. package/lib/cjs/providers/address/GoogleAddressProvider.js +0 -72
  201. package/lib/cjs/providers/address/NominatimAddressProvider.d.ts +7 -32
  202. package/lib/cjs/providers/address/NominatimAddressProvider.js +0 -33
  203. package/lib/cjs/providers/address/index.d.ts +1 -3
  204. package/lib/cjs/providers/processor/fileProcessor.d.ts +1 -7
  205. package/lib/cjs/providers/processor/fileProcessor.js +0 -6
  206. package/lib/cjs/providers/storage/azure.d.ts +13 -6
  207. package/lib/cjs/providers/storage/azure.js +0 -5
  208. package/lib/cjs/providers/storage/base64.d.ts +6 -5
  209. package/lib/cjs/providers/storage/base64.js +0 -4
  210. package/lib/cjs/providers/storage/dropbox.d.ts +4 -6
  211. package/lib/cjs/providers/storage/dropbox.js +0 -5
  212. package/lib/cjs/providers/storage/googleDrive.d.ts +5 -7
  213. package/lib/cjs/providers/storage/googleDrive.js +0 -6
  214. package/lib/cjs/providers/storage/indexeddb.d.ts +7 -5
  215. package/lib/cjs/providers/storage/indexeddb.js +0 -4
  216. package/lib/cjs/providers/storage/s3.d.ts +20 -6
  217. package/lib/cjs/providers/storage/s3.js +0 -5
  218. package/lib/cjs/providers/storage/url.d.ts +7 -6
  219. package/lib/cjs/providers/storage/url.js +0 -10
  220. package/lib/cjs/providers/storage/util.d.ts +1 -24
  221. package/lib/cjs/providers/storage/util.js +0 -18
  222. package/lib/cjs/templates/Templates.d.ts +0 -1
  223. package/lib/cjs/utils/Evaluator.d.ts +3 -6
  224. package/lib/cjs/utils/Evaluator.js +20 -11
  225. package/lib/cjs/utils/builder.d.ts +7 -9
  226. package/lib/cjs/utils/builder.js +5 -10
  227. package/lib/cjs/utils/calendarUtils.d.ts +13 -7
  228. package/lib/cjs/utils/calendarUtils.js +17 -10
  229. package/lib/cjs/utils/formUtils.d.ts +171 -43
  230. package/lib/cjs/utils/formUtils.js +569 -38
  231. package/lib/cjs/utils/utils.d.ts +221 -367
  232. package/lib/cjs/utils/utils.js +228 -335
  233. package/lib/cjs/widgets/CalendarWidget.d.ts +10 -9
  234. package/lib/cjs/widgets/CalendarWidget.js +11 -9
  235. package/lib/mjs/CDN.d.ts +0 -1
  236. package/lib/mjs/CDN.js +3 -6
  237. package/lib/mjs/Element.d.ts +96 -86
  238. package/lib/mjs/Element.js +78 -68
  239. package/lib/mjs/Embed.d.ts +1 -1
  240. package/lib/mjs/Embed.js +12 -52
  241. package/lib/mjs/Form.d.ts +36 -365
  242. package/lib/mjs/Form.js +57 -140
  243. package/lib/mjs/FormBuilder.d.ts +2 -187
  244. package/lib/mjs/FormBuilder.js +8 -32
  245. package/lib/mjs/PDF.d.ts +13 -11
  246. package/lib/mjs/PDF.js +8 -6
  247. package/lib/mjs/Webform.d.ts +139 -180
  248. package/lib/mjs/Webform.js +308 -321
  249. package/lib/mjs/WebformBuilder.d.ts +14 -16
  250. package/lib/mjs/WebformBuilder.js +10 -11
  251. package/lib/mjs/Wizard.d.ts +21 -31
  252. package/lib/mjs/Wizard.js +19 -42
  253. package/lib/mjs/WizardBuilder.d.ts +1 -1
  254. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +5 -8
  255. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +3 -6
  256. package/lib/mjs/components/Components.d.ts +4 -4
  257. package/lib/mjs/components/Components.js +3 -3
  258. package/lib/mjs/components/_classes/component/Component.d.ts +269 -502
  259. package/lib/mjs/components/_classes/component/Component.form.d.ts +3 -6
  260. package/lib/mjs/components/_classes/component/Component.form.js +0 -5
  261. package/lib/mjs/components/_classes/component/Component.js +189 -433
  262. package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +8 -0
  263. package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +1 -1
  264. package/lib/mjs/components/_classes/component/editForm/utils.js +1 -1
  265. package/lib/mjs/components/_classes/field/Field.d.ts +2 -11
  266. package/lib/mjs/components/_classes/field/Field.js +1 -13
  267. package/lib/mjs/components/_classes/input/Input.d.ts +3 -4
  268. package/lib/mjs/components/_classes/input/Input.js +2 -2
  269. package/lib/mjs/components/_classes/list/ListComponent.d.ts +2 -2
  270. package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +3 -6
  271. package/lib/mjs/components/_classes/list/ListComponent.form.js +0 -5
  272. package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +12 -43
  273. package/lib/mjs/components/_classes/multivalue/Multivalue.js +3 -37
  274. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +67 -163
  275. package/lib/mjs/components/_classes/nested/NestedComponent.form.d.ts +3 -6
  276. package/lib/mjs/components/_classes/nested/NestedComponent.form.js +0 -5
  277. package/lib/mjs/components/_classes/nested/NestedComponent.js +54 -175
  278. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +2 -2
  279. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
  280. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +1 -7
  281. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +3 -2
  282. package/lib/mjs/components/address/Address.d.ts +2 -4
  283. package/lib/mjs/components/address/Address.form.d.ts +3 -6
  284. package/lib/mjs/components/address/Address.form.js +0 -5
  285. package/lib/mjs/components/button/Button.d.ts +12 -3
  286. package/lib/mjs/components/button/Button.form.d.ts +3 -6
  287. package/lib/mjs/components/button/Button.form.js +0 -5
  288. package/lib/mjs/components/button/Button.js +0 -5
  289. package/lib/mjs/components/checkbox/Checkbox.d.ts +27 -4
  290. package/lib/mjs/components/checkbox/Checkbox.form.d.ts +3 -6
  291. package/lib/mjs/components/checkbox/Checkbox.form.js +0 -5
  292. package/lib/mjs/components/columns/Columns.d.ts +2 -3
  293. package/lib/mjs/components/columns/Columns.form.d.ts +3 -6
  294. package/lib/mjs/components/columns/Columns.form.js +0 -5
  295. package/lib/mjs/components/columns/Columns.js +1 -1
  296. package/lib/mjs/components/container/Container.form.d.ts +3 -6
  297. package/lib/mjs/components/container/Container.form.js +0 -5
  298. package/lib/mjs/components/content/Content.d.ts +1 -2
  299. package/lib/mjs/components/content/Content.form.d.ts +3 -6
  300. package/lib/mjs/components/content/Content.form.js +0 -5
  301. package/lib/mjs/components/currency/Currency.form.d.ts +3 -6
  302. package/lib/mjs/components/currency/Currency.form.js +0 -5
  303. package/lib/mjs/components/currency/Currency.js +2 -1
  304. package/lib/mjs/components/datagrid/DataGrid.d.ts +7 -8
  305. package/lib/mjs/components/datagrid/DataGrid.form.d.ts +3 -6
  306. package/lib/mjs/components/datagrid/DataGrid.form.js +0 -5
  307. package/lib/mjs/components/datagrid/DataGrid.js +5 -5
  308. package/lib/mjs/components/datagrid/fixtures/comp-with-checkboxes.d.ts +29 -0
  309. package/lib/mjs/components/datagrid/fixtures/comp-with-checkboxes.js +34 -0
  310. package/lib/mjs/components/datagrid/fixtures/index.d.ts +2 -1
  311. package/lib/mjs/components/datagrid/fixtures/index.js +2 -1
  312. package/lib/mjs/components/datamap/DataMap.d.ts +0 -1
  313. package/lib/mjs/components/datamap/DataMap.form.d.ts +3 -6
  314. package/lib/mjs/components/datamap/DataMap.form.js +0 -5
  315. package/lib/mjs/components/datetime/DateTime.d.ts +14 -0
  316. package/lib/mjs/components/datetime/DateTime.form.d.ts +3 -6
  317. package/lib/mjs/components/datetime/DateTime.form.js +0 -5
  318. package/lib/mjs/components/datetime/editForm/DateTime.edit.date.js +1 -1
  319. package/lib/mjs/components/day/Day.d.ts +48 -22
  320. package/lib/mjs/components/day/Day.form.d.ts +3 -6
  321. package/lib/mjs/components/day/Day.form.js +0 -5
  322. package/lib/mjs/components/day/Day.js +20 -15
  323. package/lib/mjs/components/editgrid/EditGrid.d.ts +3 -7
  324. package/lib/mjs/components/editgrid/EditGrid.form.d.ts +3 -6
  325. package/lib/mjs/components/editgrid/EditGrid.form.js +0 -5
  326. package/lib/mjs/components/editgrid/EditGrid.js +3 -3
  327. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -1
  328. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.js +1 -1
  329. package/lib/mjs/components/email/Email.form.d.ts +3 -6
  330. package/lib/mjs/components/email/Email.form.js +0 -5
  331. package/lib/mjs/components/fieldset/Fieldset.form.d.ts +3 -6
  332. package/lib/mjs/components/fieldset/Fieldset.form.js +0 -5
  333. package/lib/mjs/components/file/File.d.ts +22 -9
  334. package/lib/mjs/components/file/File.form.d.ts +3 -6
  335. package/lib/mjs/components/file/File.form.js +0 -5
  336. package/lib/mjs/components/form/Form.d.ts +20 -31
  337. package/lib/mjs/components/form/Form.form.d.ts +3 -6
  338. package/lib/mjs/components/form/Form.form.js +0 -5
  339. package/lib/mjs/components/form/Form.js +12 -15
  340. package/lib/mjs/components/hidden/Hidden.d.ts +11 -1
  341. package/lib/mjs/components/hidden/Hidden.form.d.ts +3 -6
  342. package/lib/mjs/components/hidden/Hidden.form.js +0 -5
  343. package/lib/mjs/components/hidden/Hidden.js +2 -1
  344. package/lib/mjs/components/html/HTML.d.ts +1 -2
  345. package/lib/mjs/components/html/HTML.form.d.ts +3 -6
  346. package/lib/mjs/components/html/HTML.form.js +0 -5
  347. package/lib/mjs/components/number/Number.d.ts +17 -3
  348. package/lib/mjs/components/number/Number.form.d.ts +3 -6
  349. package/lib/mjs/components/number/Number.form.js +0 -5
  350. package/lib/mjs/components/number/Number.js +2 -1
  351. package/lib/mjs/components/panel/Panel.form.d.ts +3 -6
  352. package/lib/mjs/components/panel/Panel.form.js +0 -5
  353. package/lib/mjs/components/panel/Panel.js +1 -0
  354. package/lib/mjs/components/password/Password.form.d.ts +3 -6
  355. package/lib/mjs/components/password/Password.form.js +0 -5
  356. package/lib/mjs/components/phonenumber/PhoneNumber.form.d.ts +3 -6
  357. package/lib/mjs/components/phonenumber/PhoneNumber.form.js +0 -5
  358. package/lib/mjs/components/radio/Radio.d.ts +26 -3
  359. package/lib/mjs/components/radio/Radio.form.d.ts +3 -6
  360. package/lib/mjs/components/radio/Radio.form.js +0 -5
  361. package/lib/mjs/components/radio/Radio.js +7 -5
  362. package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +1 -1
  363. package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +3 -6
  364. package/lib/mjs/components/recaptcha/ReCaptcha.form.js +0 -5
  365. package/lib/mjs/components/select/Select.d.ts +39 -16
  366. package/lib/mjs/components/select/Select.form.d.ts +3 -6
  367. package/lib/mjs/components/select/Select.form.js +0 -5
  368. package/lib/mjs/components/select/Select.js +17 -14
  369. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +17 -2
  370. package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +3 -6
  371. package/lib/mjs/components/selectboxes/SelectBoxes.form.js +0 -5
  372. package/lib/mjs/components/selectboxes/SelectBoxes.js +9 -7
  373. package/lib/mjs/components/signature/Signature.d.ts +14 -1
  374. package/lib/mjs/components/signature/Signature.form.d.ts +3 -6
  375. package/lib/mjs/components/signature/Signature.form.js +0 -5
  376. package/lib/mjs/components/survey/Survey.d.ts +15 -3
  377. package/lib/mjs/components/survey/Survey.form.d.ts +3 -6
  378. package/lib/mjs/components/survey/Survey.form.js +0 -5
  379. package/lib/mjs/components/table/Table.d.ts +1 -2
  380. package/lib/mjs/components/table/Table.form.d.ts +3 -6
  381. package/lib/mjs/components/table/Table.form.js +0 -5
  382. package/lib/mjs/components/tabs/Tabs.d.ts +4 -4
  383. package/lib/mjs/components/tabs/Tabs.form.d.ts +3 -6
  384. package/lib/mjs/components/tabs/Tabs.form.js +0 -5
  385. package/lib/mjs/components/tabs/Tabs.js +2 -1
  386. package/lib/mjs/components/tags/Tags.d.ts +14 -0
  387. package/lib/mjs/components/tags/Tags.form.d.ts +3 -6
  388. package/lib/mjs/components/tags/Tags.form.js +0 -5
  389. package/lib/mjs/components/textarea/TextArea.d.ts +9 -4
  390. package/lib/mjs/components/textarea/TextArea.form.d.ts +3 -6
  391. package/lib/mjs/components/textarea/TextArea.form.js +0 -5
  392. package/lib/mjs/components/textarea/TextArea.js +2 -2
  393. package/lib/mjs/components/textfield/TextField.d.ts +30 -14
  394. package/lib/mjs/components/textfield/TextField.form.d.ts +3 -6
  395. package/lib/mjs/components/textfield/TextField.form.js +0 -5
  396. package/lib/mjs/components/textfield/TextField.js +17 -16
  397. package/lib/mjs/components/time/Time.form.d.ts +3 -6
  398. package/lib/mjs/components/time/Time.form.js +0 -5
  399. package/lib/mjs/components/unknown/Unknown.form.d.ts +34 -5
  400. package/lib/mjs/components/unknown/Unknown.form.js +0 -4
  401. package/lib/mjs/components/url/Url.form.d.ts +3 -6
  402. package/lib/mjs/components/url/Url.form.js +0 -5
  403. package/lib/mjs/components/well/Well.form.d.ts +3 -6
  404. package/lib/mjs/components/well/Well.form.js +0 -5
  405. package/lib/mjs/formio.embed.d.ts +2 -1
  406. package/lib/mjs/formio.embed.js +99 -2
  407. package/lib/mjs/formio.form.d.ts +4 -11
  408. package/lib/mjs/formio.form.js +3 -10
  409. package/lib/mjs/providers/Providers.d.ts +5 -36
  410. package/lib/mjs/providers/Providers.js +0 -29
  411. package/lib/mjs/providers/address/AddressProvider.d.ts +12 -131
  412. package/lib/mjs/providers/address/AddressProvider.js +2 -88
  413. package/lib/mjs/providers/address/AzureAddressProvider.d.ts +1 -48
  414. package/lib/mjs/providers/address/AzureAddressProvider.js +0 -37
  415. package/lib/mjs/providers/address/CustomAddressProvider.d.ts +4 -27
  416. package/lib/mjs/providers/address/CustomAddressProvider.js +0 -34
  417. package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +6 -130
  418. package/lib/mjs/providers/address/GoogleAddressProvider.js +0 -72
  419. package/lib/mjs/providers/address/NominatimAddressProvider.d.ts +7 -32
  420. package/lib/mjs/providers/address/NominatimAddressProvider.js +0 -33
  421. package/lib/mjs/providers/address/index.d.ts +1 -3
  422. package/lib/mjs/providers/processor/fileProcessor.d.ts +1 -7
  423. package/lib/mjs/providers/processor/fileProcessor.js +0 -6
  424. package/lib/mjs/providers/storage/azure.d.ts +13 -6
  425. package/lib/mjs/providers/storage/azure.js +0 -5
  426. package/lib/mjs/providers/storage/base64.d.ts +6 -5
  427. package/lib/mjs/providers/storage/base64.js +0 -4
  428. package/lib/mjs/providers/storage/dropbox.d.ts +4 -6
  429. package/lib/mjs/providers/storage/dropbox.js +0 -5
  430. package/lib/mjs/providers/storage/googleDrive.d.ts +5 -7
  431. package/lib/mjs/providers/storage/googleDrive.js +0 -6
  432. package/lib/mjs/providers/storage/indexeddb.d.ts +7 -5
  433. package/lib/mjs/providers/storage/indexeddb.js +0 -4
  434. package/lib/mjs/providers/storage/s3.d.ts +20 -6
  435. package/lib/mjs/providers/storage/s3.js +0 -5
  436. package/lib/mjs/providers/storage/url.d.ts +7 -6
  437. package/lib/mjs/providers/storage/url.js +0 -10
  438. package/lib/mjs/providers/storage/util.d.ts +1 -24
  439. package/lib/mjs/providers/storage/util.js +0 -18
  440. package/lib/mjs/templates/Templates.d.ts +0 -1
  441. package/lib/mjs/utils/Evaluator.d.ts +3 -6
  442. package/lib/mjs/utils/Evaluator.js +20 -9
  443. package/lib/mjs/utils/builder.d.ts +7 -9
  444. package/lib/mjs/utils/builder.js +5 -10
  445. package/lib/mjs/utils/calendarUtils.d.ts +13 -7
  446. package/lib/mjs/utils/calendarUtils.js +17 -10
  447. package/lib/mjs/utils/formUtils.d.ts +171 -43
  448. package/lib/mjs/utils/formUtils.js +554 -6
  449. package/lib/mjs/utils/utils.d.ts +221 -367
  450. package/lib/mjs/utils/utils.js +222 -329
  451. package/lib/mjs/widgets/CalendarWidget.d.ts +10 -9
  452. package/lib/mjs/widgets/CalendarWidget.js +11 -9
  453. package/package.json +22 -22
  454. package/embed.d.ts +0 -1
  455. package/form.d.ts +0 -1
  456. package/lib/cjs/InlineEmbed.d.ts +0 -7
  457. package/lib/cjs/InlineEmbed.js +0 -116
  458. package/lib/mjs/InlineEmbed.d.ts +0 -7
  459. package/lib/mjs/InlineEmbed.js +0 -112
  460. package/sdk.d.ts +0 -1
  461. package/utils.d.ts +0 -1
@@ -70,18 +70,21 @@ class Element {
70
70
  this.options.i18next = this.i18next = this.options.i18next || i18n_1.I18n.init(this.options.i18n);
71
71
  /**
72
72
  * An instance of the EventEmitter class to handle the emitting and registration of events.
73
+ *
73
74
  * @type {EventEmitter}
74
75
  */
75
76
  this.events = (options && options.events) ? options.events : new EventEmitter_1.default();
76
77
  this.defaultMask = null;
77
78
  /**
78
79
  * Conditional to show or hide helplinks in editForm
80
+ *
79
81
  * @type {*|boolean}
80
82
  */
81
83
  this.helplinks = (this.options.helplinks === 'false') ? false : (this.options.helplinks || 'https://help.form.io');
82
84
  }
83
85
  /**
84
86
  * Register for a new event within this component.
87
+ *
85
88
  * @example
86
89
  * let component = new BaseComponent({
87
90
  * type: 'textfield',
@@ -91,11 +94,12 @@ class Element {
91
94
  * component.on('componentChange', (changed) => {
92
95
  * console.log('this element is changed.');
93
96
  * });
97
+ *
98
+ *
94
99
  * @param {string} event - The event you wish to register the handler for.
95
- * @param {Function} cb - The callback handler to handle this event.
100
+ * @param {function} cb - The callback handler to handle this event.
96
101
  * @param {boolean} [internal] - This is an internal event handler.
97
102
  * @param {boolean} [once] - This event should only fire once.
98
- * @returns {EventEmitter | void} - The event emitter instance.
99
103
  */
100
104
  on(event, cb, internal, once = false) {
101
105
  if (!this.events) {
@@ -111,18 +115,18 @@ class Element {
111
115
  }
112
116
  /**
113
117
  * Register for a new single-fire event within this component.
118
+ *
114
119
  * @param {string} event - The event you wish to register the handler for.
115
- * @param {Function} cb - The callback handler to handle this event.
116
- * @param {boolean} internal - This is an internal event handler.
117
- * @returns {EventEmitter} - The event emitter instance.
120
+ * @param {function} cb - The callback handler to handle this event.
118
121
  */
119
122
  once(event, cb, internal) {
120
123
  return this.on(event, cb, internal, true);
121
124
  }
122
125
  /**
123
126
  * Allow catching any event.
124
- * @param {Function} cb - The callback handler to handle this event.
125
- * @returns {EventEmitter | void} - The event emitter instance.
127
+ *
128
+ * @param cb
129
+ * @returns {this}
126
130
  */
127
131
  onAny(cb) {
128
132
  if (!this.events) {
@@ -132,8 +136,9 @@ class Element {
132
136
  }
133
137
  /**
134
138
  * Removes the listener that will be fired when any event is emitted.
135
- * @param {Function} cb - The callback handler to handle this event.
136
- * @returns {EventEmitter | void} - The event emitter instance.
139
+ *
140
+ * @param cb
141
+ * @returns {this}
137
142
  */
138
143
  offAny(cb) {
139
144
  if (!this.events) {
@@ -143,8 +148,9 @@ class Element {
143
148
  }
144
149
  /**
145
150
  * Removes a listener for a certain event. Not passing the 2nd arg will remove all listeners for that event.
151
+ *
146
152
  * @param {string} event - The event you wish to register the handler for.
147
- * @param {Function | undefined} cb - The callback handler to handle this event.
153
+ * @param {function|undefined} cb - The callback handler to handle this event.
148
154
  */
149
155
  off(event, cb) {
150
156
  if (!this.events) {
@@ -165,8 +171,9 @@ class Element {
165
171
  }
166
172
  /**
167
173
  * Emit a new event.
174
+ *
168
175
  * @param {string} event - The event to emit.
169
- * @param {object} data - The data to emit with the handler.
176
+ * @param {Object} data - The data to emit with the handler.
170
177
  */
171
178
  emit(event, ...data) {
172
179
  if (this.events) {
@@ -175,8 +182,9 @@ class Element {
175
182
  }
176
183
  /**
177
184
  * Check if the component has an event handler set up for the event.
185
+ *
178
186
  * @param {string} event - The event name.
179
- * @returns {boolean} - TRUE if the event is registered, FALSE otherwise.
187
+ * @returns {boolean}
180
188
  */
181
189
  hasEventHandler(event) {
182
190
  if (!this.events) {
@@ -192,12 +200,15 @@ class Element {
192
200
  }
193
201
  /**
194
202
  * Wrapper method to add an event listener to an HTML element.
195
- * @param {HtmlElement} obj - The DOM element to add the event to.
196
- * @param {string} type - The event name to add.
197
- * @param {Function} func - The callback function to be executed when the listener is triggered.
198
- * @param {boolean} persistent - If this listener should persist beyond "destroy" commands.
199
- * @param {boolean} capture - If this listener should be executed in the capture phase.
200
- * @returns {void | this} - The instance of the element.
203
+ *
204
+ * @param obj
205
+ * The DOM element to add the event to.
206
+ * @param type
207
+ * The event name to add.
208
+ * @param func
209
+ * The callback function to be executed when the listener is triggered.
210
+ * @param persistent
211
+ * If this listener should persist beyond "destroy" commands.
201
212
  */
202
213
  addEventListener(obj, type, func, persistent, capture) {
203
214
  if (!obj) {
@@ -216,10 +227,9 @@ class Element {
216
227
  }
217
228
  /**
218
229
  * Remove an event listener from the object.
219
- * @param {HTMLElement} obj - The DOM element to remove the event from.
220
- * @param {string} type - The event name to remove.
221
- * @param {Function} func - The callback function to remove.
222
- * @returns {this | void} - The instance of the element.
230
+ *
231
+ * @param obj
232
+ * @param type
223
233
  */
224
234
  removeEventListener(obj, type, func = null) {
225
235
  const indexes = [];
@@ -265,7 +275,6 @@ class Element {
265
275
  }
266
276
  /**
267
277
  * Removes all event listeners attached to this component.
268
- * @param {boolean} all - If all events should be removed, including external events.
269
278
  */
270
279
  destroy(all = false) {
271
280
  this.removeEventListeners();
@@ -276,9 +285,9 @@ class Element {
276
285
  }
277
286
  /**
278
287
  * Append an HTML DOM element to a container.
279
- * @param {HTMLElement} element - The DOM element to append.
280
- * @param {HTMLElement} container - The DOM element that is the container of the element getting appended.
281
- * @returns {this} - The instance of the element.
288
+ *
289
+ * @param element
290
+ * @param container
282
291
  */
283
292
  appendTo(element, container) {
284
293
  container === null || container === void 0 ? void 0 : container.appendChild(element);
@@ -286,9 +295,9 @@ class Element {
286
295
  }
287
296
  /**
288
297
  * Prepend an HTML DOM element to a container.
298
+ *
289
299
  * @param {HTMLElement} element - The DOM element to prepend.
290
300
  * @param {HTMLElement} container - The DOM element that is the container of the element getting prepended.
291
- * @returns {this} - The instance of the element.
292
301
  */
293
302
  prependTo(element, container) {
294
303
  if (container) {
@@ -309,9 +318,9 @@ class Element {
309
318
  }
310
319
  /**
311
320
  * Removes an HTML DOM element from its bounding container.
321
+ *
312
322
  * @param {HTMLElement} element - The element to remove.
313
323
  * @param {HTMLElement} container - The DOM element that is the container of the element to remove.
314
- * @returns {this} - The instance of the element.
315
324
  */
316
325
  removeChildFrom(element, container) {
317
326
  if (container && container.contains(element)) {
@@ -326,10 +335,12 @@ class Element {
326
335
  }
327
336
  /**
328
337
  * Alias for document.createElement.
338
+ *
329
339
  * @param {string} type - The type of element to create
330
- * @param {object} attr - The element attributes to add to the created element.
340
+ * @param {Object} attr - The element attributes to add to the created element.
331
341
  * @param {Various} children - Child elements. Can be a DOM Element, string or array of both.
332
- * @returns {HTMLElement} - The created element.
342
+ *
343
+ * @return {HTMLElement} - The created element.
333
344
  */
334
345
  ce(type, attr, children = null) {
335
346
  // console.warn('Call to deprecated this.ce(). Dom elements should be created with templates, not manually with ce.');
@@ -345,9 +356,8 @@ class Element {
345
356
  }
346
357
  /**
347
358
  * Append different types of children.
348
- * @param {HTMLElement} element - The element to append to.
349
- * @param {HTMLElement} child - The child element to append.
350
- * @returns {this} - The instance of the element.
359
+ *
360
+ * @param child
351
361
  */
352
362
  appendChild(element, child) {
353
363
  if (Array.isArray(child)) {
@@ -369,19 +379,16 @@ class Element {
369
379
  maskPlaceholder(mask) {
370
380
  return mask.map((char) => (char instanceof RegExp) ? this.placeholderChar : char).join('');
371
381
  }
372
- /**
373
- * Get the placeholder character for the input mask.
374
- * @returns {string} - The placeholder character.
375
- */
376
382
  get placeholderChar() {
377
383
  var _a;
378
384
  return ((_a = this.component) === null || _a === void 0 ? void 0 : _a.inputMaskPlaceholderChar) || '_';
379
385
  }
380
386
  /**
381
387
  * Sets the input mask for an input.
388
+ *
382
389
  * @param {HTMLElement} input - The html input to apply the mask to.
383
- * @param {string} inputMask - The input mask to add to this input.
384
- * @param {boolean} usePlaceholder - Set the mask placeholder on the input.
390
+ * @param {String} inputMask - The input mask to add to this input.
391
+ * @param {Boolean} usePlaceholder - Set the mask placeholder on the input.
385
392
  */
386
393
  setInputMask(input, inputMask, usePlaceholder) {
387
394
  if (input && inputMask) {
@@ -414,17 +421,17 @@ class Element {
414
421
  }
415
422
  /**
416
423
  * Translate a text using the i18n system.
424
+ *
417
425
  * @param {string|Array<string>} text - The i18n identifier.
418
- * @param {...any} args - The arguments to pass to the i18n translation.
419
- * @returns {string} - The translated text.
426
+ * @param {Object} params - The i18n parameters to use for translation.
420
427
  */
421
428
  t(text, ...args) {
422
429
  return this.i18next ? this.i18next.t(text, ...args) : text;
423
430
  }
424
431
  /**
425
432
  * Alias to create a text node.
426
- * @param {string} text - The text to create.
427
- * @returns {HtmlElement} - The created text node.
433
+ * @param text
434
+ * @returns {Text}
428
435
  */
429
436
  text(text) {
430
437
  return document.createTextNode(this.t(text));
@@ -432,7 +439,7 @@ class Element {
432
439
  /**
433
440
  * Adds an object of attributes onto an element.
434
441
  * @param {HtmlElement} element - The element to add the attributes to.
435
- * @param {object} attr - The attributes to add to the input element.
442
+ * @param {Object} attr - The attributes to add to the input element.
436
443
  */
437
444
  attr(element, attr) {
438
445
  if (!element) {
@@ -455,9 +462,6 @@ class Element {
455
462
  * Determines if an element has a class.
456
463
  *
457
464
  * Taken from jQuery https://j11y.io/jquery/#v=1.5.0&fn=jQuery.fn.hasClass
458
- * @param {HTMLElement} element - The element to check for the class.
459
- * @param {string} className - The class to check for.
460
- * @returns {boolean} - TRUE if the element has the class, FALSE otherwise.
461
465
  */
462
466
  hasClass(element, className) {
463
467
  if (!element) {
@@ -469,9 +473,11 @@ class Element {
469
473
  }
470
474
  /**
471
475
  * Adds a class to a DOM element.
472
- * @param {HTMLElement} element - The element to add a class to.
473
- * @param {string} className - The name of the class to add.
474
- * @returns {this} - The instance of the element.
476
+ *
477
+ * @param element
478
+ * The element to add a class to.
479
+ * @param className
480
+ * The name of the class to add.
475
481
  */
476
482
  addClass(element, className) {
477
483
  if (!element || !(element instanceof HTMLElement)) {
@@ -486,9 +492,11 @@ class Element {
486
492
  }
487
493
  /**
488
494
  * Remove a class from a DOM element.
489
- * @param {HTMLElement} element - The DOM element to remove the class from.
490
- * @param {string} className - The name of the class that is to be removed.
491
- * @returns {this} - The instance of the element.
495
+ *
496
+ * @param element
497
+ * The DOM element to remove the class from.
498
+ * @param className
499
+ * The name of the class that is to be removed.
492
500
  */
493
501
  removeClass(element, className) {
494
502
  if (!element || !className || !(element instanceof HTMLElement)) {
@@ -504,6 +512,7 @@ class Element {
504
512
  }
505
513
  /**
506
514
  * Empty's an HTML DOM element.
515
+ *
507
516
  * @param {HTMLElement} element - The element you wish to empty.
508
517
  */
509
518
  empty(element) {
@@ -515,8 +524,9 @@ class Element {
515
524
  }
516
525
  /**
517
526
  * Create an evaluation context for all script executions and interpolations.
518
- * @param {object} additional - Additional context to apply to the evaluation context.
519
- * @returns {*} - The evaluation context.
527
+ *
528
+ * @param additional
529
+ * @return {*}
520
530
  */
521
531
  evalContext(additional) {
522
532
  var _a;
@@ -541,10 +551,10 @@ class Element {
541
551
  }
542
552
  /**
543
553
  * Performs an interpolation using the evaluation context of this component.
544
- * @param {string} string - The string to interpolate.
545
- * @param {object} data - The data to use in the interpolation.
546
- * @param {object} options - The options to pass to the interpolation.
547
- * @returns {XML|string|*|void} - The interpolated string.
554
+ *
555
+ * @param string
556
+ * @param data
557
+ * @return {XML|string|*|void}
548
558
  */
549
559
  interpolate(string, data, options = {}) {
550
560
  if (typeof string !== 'function' && (this.component.content || this.component.html)
@@ -560,19 +570,19 @@ class Element {
560
570
  }
561
571
  /**
562
572
  * Performs an evaluation using the evaluation context of this component.
563
- * @param {string|Function|object} func - The function or string to evaluate.
564
- * @param {object} args - The arguments to pass to the evaluation.
565
- * @param {string} ret - The name of the variable within the evaluation context to return.
566
- * @param {boolean} interpolate - Determines if it should replace all {{ }} token references with actual data.
567
- * @param {import('@formio/core').EvaluatorOptions} options - The options to pass to the evaluation.
568
- * @returns {*} - The result of the evaluation.
573
+ *
574
+ * @param func
575
+ * @param args
576
+ * @param ret
577
+ * @param tokenize
578
+ * @return {*}
569
579
  */
570
- evaluate(func, args, ret, interpolate, options = {}) {
571
- return FormioUtils.evaluate(func, this.evalContext(args), ret, interpolate, options);
580
+ evaluate(func, args, ret, tokenize) {
581
+ return FormioUtils.evaluate(func, this.evalContext(args), ret, tokenize);
572
582
  }
573
583
  /**
574
584
  * Allow for options to hook into the functionality of this renderer.
575
- * @returns {*} - The result of the hook function.
585
+ * @return {*}
576
586
  */
577
587
  hook() {
578
588
  const name = arguments[0];
@@ -26,7 +26,7 @@ export class Formio {
26
26
  static addStyles(wrapper: any, href: any): Promise<void>;
27
27
  static submitDone(instance: any, submission: any): Promise<void>;
28
28
  static formioScript(script: any, builder: any): any;
29
- static addLibrary(libWrapper: any, lib: any, name: any): Promise<void>;
29
+ static addLibrary(wrapper: any, lib: any, name: any): Promise<void>;
30
30
  static addLoader(wrapper: any): Promise<void>;
31
31
  static init(element: any, options?: {}, builder?: boolean): Promise<any>;
32
32
  static afterCreate(instance: any, wrapper: any, readyEvent: any): Promise<any>;
package/lib/cjs/Embed.js CHANGED
@@ -80,9 +80,6 @@ class Formio {
80
80
  }
81
81
  static createElement(type, attrs, children) {
82
82
  const element = document.createElement(type);
83
- if (!attrs) {
84
- return element;
85
- }
86
83
  Object.keys(attrs).forEach(key => {
87
84
  element.setAttribute(key, attrs[key]);
88
85
  });
@@ -147,9 +144,6 @@ class Formio {
147
144
  static submitDone(instance, submission) {
148
145
  return __awaiter(this, void 0, void 0, function* () {
149
146
  _a.debug('Submision Complete', submission);
150
- if (_a.config.submitDone) {
151
- _a.config.submitDone(submission, instance);
152
- }
153
147
  const successMessage = (_a.config.success || '').toString();
154
148
  if (successMessage && successMessage.toLowerCase() !== 'false' && instance.element) {
155
149
  instance.element.innerHTML = `<div class="alert-success" role="alert">${successMessage}</div>`;
@@ -190,22 +184,21 @@ class Formio {
190
184
  }
191
185
  return script;
192
186
  }
193
- static addLibrary(libWrapper, lib, name) {
187
+ static addLibrary(wrapper, lib, name) {
194
188
  return __awaiter(this, void 0, void 0, function* () {
195
189
  if (!lib) {
196
190
  return;
197
191
  }
198
192
  if (lib.dependencies) {
199
193
  for (let i = 0; i < lib.dependencies.length; i++) {
200
- const libName = lib.dependencies[i];
201
- yield _a.addLibrary(libWrapper, _a.config.libs[libName], libName);
194
+ yield _a.addLibrary(wrapper, _a.cdn.libs[lib.dependencies[i]]);
202
195
  }
203
196
  }
204
197
  if (lib.css) {
205
- yield _a.addStyles((lib.global ? document.body : libWrapper), lib.css);
198
+ yield _a.addStyles(wrapper, lib.css);
206
199
  }
207
200
  if (lib.js) {
208
- const module = yield _a.addScript((lib.global ? document.body : libWrapper), lib.js, lib.use ? name : false);
201
+ const module = yield _a.addScript(wrapper, lib.js, lib.use ? name : false);
209
202
  if (lib.use) {
210
203
  _a.debug(`Using ${name}`);
211
204
  const options = lib.options || {};
@@ -215,12 +208,6 @@ class Formio {
215
208
  _a.use((typeof lib.use === 'function' ? lib.use(module) : module), options);
216
209
  }
217
210
  }
218
- if (lib.globalStyle) {
219
- const style = _a.createElement('style');
220
- style.type = 'text/css';
221
- style.innerHTML = lib.globalStyle;
222
- document.body.appendChild(style);
223
- }
224
211
  });
225
212
  }
226
213
  static addLoader(wrapper) {
@@ -253,16 +240,7 @@ class Formio {
253
240
  use: true
254
241
  },
255
242
  fontawesome: {
256
- // Due to an issue with font-face not loading in the shadowdom (https://issues.chromium.org/issues/41085401), we need
257
- // to do 2 things. 1.) Load the fonts from the global cdn, and 2.) add the font-face to the global styles on the page.
258
- css: `https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css`,
259
- globalStyle: `@font-face {
260
- font-family: 'FontAwesome';
261
- src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?v=4.7.0');
262
- src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
263
- font-weight: normal;
264
- font-style: normal;
265
- }`
243
+ css: `${_a.cdn['font-awesome']}/css/font-awesome.min.css`
266
244
  },
267
245
  bootstrap4: {
268
246
  dependencies: ['fontawesome'],
@@ -273,24 +251,9 @@ class Formio {
273
251
  css: `${_a.cdn.bootstrap}/css/bootstrap.min.css`
274
252
  },
275
253
  'bootstrap-icons': {
276
- // Due to an issue with font-face not loading in the shadowdom (https://issues.chromium.org/issues/41085401), we need
277
- // to do 2 things. 1.) Load the fonts from the global cdn, and 2.) add the font-face to the global styles on the page.
278
- css: 'https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.min.css',
279
- globalStyle: `@font-face {
280
- font-display: block;
281
- font-family: "bootstrap-icons";
282
- src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6") format("woff2"),
283
- url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6") format("woff");
284
- }`
254
+ css: `${_a.cdn['bootstrap-icons']}/css/bootstrap-icons.css`
285
255
  }
286
256
  };
287
- // Add all bootswatch templates.
288
- ['cerulean', 'cosmo', 'cyborg', 'darkly', 'flatly', 'journal', 'litera', 'lumen', 'lux', 'materia', 'minty', 'pulse', 'sandstone', 'simplex', 'sketchy', 'slate', 'solar', 'spacelab', 'superhero', 'united', 'yeti'].forEach((template) => {
289
- _a.config.libs[template] = {
290
- dependencies: ['bootstrap-icons'],
291
- css: `${_a.cdn.bootswatch}/dist/${template}/bootstrap.min.css`
292
- };
293
- });
294
257
  const id = _a.config.id || `formio-${Math.random().toString(36).substring(7)}`;
295
258
  // Create a new wrapper and add the element inside of a new wrapper.
296
259
  let wrapper = _a.createElement('div', {
@@ -298,7 +261,7 @@ class Formio {
298
261
  });
299
262
  element.parentNode.insertBefore(wrapper, element);
300
263
  // If we include the libraries, then we will attempt to run this in shadow dom.
301
- const useShadowDom = _a.config.includeLibs && !_a.config.noshadow && (typeof wrapper.attachShadow === 'function');
264
+ const useShadowDom = _a.config.includeLibs && (typeof wrapper.attachShadow === 'function');
302
265
  if (useShadowDom) {
303
266
  wrapper = wrapper.attachShadow({
304
267
  mode: 'open'
@@ -334,17 +297,14 @@ class Formio {
334
297
  if (_a.config.template && _a.config.includeLibs) {
335
298
  yield _a.addLibrary(libWrapper, _a.config.libs[_a.config.template], _a.config.template);
336
299
  }
337
- if (!_a.config.libraries) {
338
- _a.config.libraries = _a.config.modules || {};
339
- }
340
- // Adding premium if it is provided via the config.
300
+ // Add the premium modules.
341
301
  if (_a.config.premium) {
342
- _a.config.libraries.premium = _a.config.premium;
302
+ _a.config.modules.premium = _a.config.premium;
343
303
  }
344
304
  // Allow adding dynamic modules.
345
- if (_a.config.libraries) {
346
- for (const name in _a.config.libraries) {
347
- const lib = _a.config.libraries[name];
305
+ if (_a.config.modules) {
306
+ for (const name in _a.config.modules) {
307
+ const lib = _a.config.modules[name];
348
308
  lib.use = lib.use || true;
349
309
  yield _a.addLibrary(libWrapper, lib, name);
350
310
  }