@formio/js 5.0.0-rc.54 → 5.0.0-rc.56

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. package/dist/formio.embed.js +1 -1
  2. package/dist/formio.embed.min.js +1 -1
  3. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  4. package/dist/formio.form.js +563 -563
  5. package/dist/formio.form.min.js +1 -1
  6. package/dist/formio.form.min.js.LICENSE.txt +3 -3
  7. package/dist/formio.full.js +606 -606
  8. package/dist/formio.full.min.js +1 -1
  9. package/dist/formio.full.min.js.LICENSE.txt +3 -3
  10. package/dist/formio.js +3 -3
  11. package/dist/formio.min.js +1 -1
  12. package/dist/formio.min.js.LICENSE.txt +1 -1
  13. package/dist/formio.utils.js +16 -16
  14. package/dist/formio.utils.min.js +1 -1
  15. package/dist/formio.utils.min.js.LICENSE.txt +3 -3
  16. package/lib/cjs/Element.d.ts +3 -2
  17. package/lib/cjs/Element.js +4 -3
  18. package/lib/cjs/Embed.js +8 -5
  19. package/lib/cjs/Form.d.ts +99 -36
  20. package/lib/cjs/Form.js +23 -18
  21. package/lib/cjs/PDF.d.ts +8 -7
  22. package/lib/cjs/PDF.js +6 -5
  23. package/lib/cjs/Webform.d.ts +1 -4
  24. package/lib/cjs/Webform.js +19 -16
  25. package/lib/cjs/WebformBuilder.d.ts +15 -14
  26. package/lib/cjs/WebformBuilder.js +11 -10
  27. package/lib/cjs/Wizard.d.ts +1 -12
  28. package/lib/cjs/Wizard.js +17 -15
  29. package/lib/cjs/WizardBuilder.d.ts +1 -1
  30. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +2 -2
  31. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.form.d.ts +2 -2
  32. package/lib/cjs/addons/index.d.ts +2 -2
  33. package/lib/cjs/components/Components.d.ts +6 -5
  34. package/lib/cjs/components/Components.js +2 -1
  35. package/lib/cjs/components/_classes/component/Component.form.d.ts +4 -5
  36. package/lib/cjs/components/_classes/component/Component.form.js +3 -2
  37. package/lib/cjs/components/_classes/component/Component.js +3 -2
  38. package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.d.ts +2 -2
  39. package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.d.ts +1 -1
  40. package/lib/cjs/components/_classes/component/editForm/Component.edit.data.d.ts +1 -1
  41. package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.d.ts +1 -1
  42. package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +2 -2
  43. package/lib/cjs/components/_classes/component/editForm/utils.d.ts +1 -1
  44. package/lib/cjs/components/_classes/component/editForm/utils.js +2 -2
  45. package/lib/cjs/components/_classes/list/ListComponent.d.ts +2 -2
  46. package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +4 -4
  47. package/lib/cjs/components/_classes/list/ListComponent.form.js +3 -3
  48. package/lib/cjs/components/_classes/nested/NestedComponent.form.d.ts +4 -5
  49. package/lib/cjs/components/_classes/nested/NestedComponent.form.js +3 -2
  50. package/lib/cjs/components/_classes/nested/NestedComponent.js +0 -2
  51. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +1 -1
  52. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +1 -1
  53. package/lib/cjs/components/address/Address.form.d.ts +4 -5
  54. package/lib/cjs/components/address/Address.form.js +3 -2
  55. package/lib/cjs/components/button/Button.form.d.ts +4 -5
  56. package/lib/cjs/components/button/Button.form.js +3 -2
  57. package/lib/cjs/components/button/Button.js +3 -2
  58. package/lib/cjs/components/checkbox/Checkbox.form.d.ts +4 -5
  59. package/lib/cjs/components/checkbox/Checkbox.form.js +3 -2
  60. package/lib/cjs/components/checkbox/Checkbox.js +2 -9
  61. package/lib/cjs/components/checkbox/fixtures/comp5.d.ts +34 -0
  62. package/lib/cjs/components/checkbox/fixtures/comp5.js +55 -0
  63. package/lib/cjs/components/checkbox/fixtures/index.d.ts +2 -1
  64. package/lib/cjs/components/checkbox/fixtures/index.js +3 -1
  65. package/lib/cjs/components/columns/Columns.d.ts +1 -1
  66. package/lib/cjs/components/columns/Columns.form.d.ts +4 -5
  67. package/lib/cjs/components/columns/Columns.form.js +3 -2
  68. package/lib/cjs/components/columns/Columns.js +1 -1
  69. package/lib/cjs/components/container/Container.form.d.ts +4 -5
  70. package/lib/cjs/components/container/Container.form.js +3 -2
  71. package/lib/cjs/components/content/Content.form.d.ts +4 -5
  72. package/lib/cjs/components/content/Content.form.js +3 -2
  73. package/lib/cjs/components/currency/Currency.form.d.ts +4 -5
  74. package/lib/cjs/components/currency/Currency.form.js +3 -2
  75. package/lib/cjs/components/currency/Currency.js +1 -1
  76. package/lib/cjs/components/datagrid/DataGrid.d.ts +4 -4
  77. package/lib/cjs/components/datagrid/DataGrid.form.d.ts +4 -5
  78. package/lib/cjs/components/datagrid/DataGrid.form.js +3 -2
  79. package/lib/cjs/components/datagrid/DataGrid.js +4 -4
  80. package/lib/cjs/components/datamap/DataMap.form.d.ts +4 -5
  81. package/lib/cjs/components/datamap/DataMap.form.js +3 -2
  82. package/lib/cjs/components/datetime/DateTime.form.d.ts +4 -5
  83. package/lib/cjs/components/datetime/DateTime.form.js +3 -2
  84. package/lib/cjs/components/datetime/editForm/DateTime.edit.date.d.ts +1 -1
  85. package/lib/cjs/components/datetime/editForm/DateTime.edit.date.js +2 -2
  86. package/lib/cjs/components/day/Day.d.ts +18 -23
  87. package/lib/cjs/components/day/Day.form.d.ts +4 -5
  88. package/lib/cjs/components/day/Day.form.js +3 -2
  89. package/lib/cjs/components/day/Day.js +15 -14
  90. package/lib/cjs/components/editgrid/EditGrid.d.ts +4 -3
  91. package/lib/cjs/components/editgrid/EditGrid.form.d.ts +4 -5
  92. package/lib/cjs/components/editgrid/EditGrid.form.js +3 -2
  93. package/lib/cjs/components/editgrid/EditGrid.js +3 -3
  94. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +2 -5
  95. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.d.ts +1 -1
  96. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.js +6 -9
  97. package/lib/cjs/components/email/Email.form.d.ts +4 -5
  98. package/lib/cjs/components/email/Email.form.js +3 -2
  99. package/lib/cjs/components/fieldset/Fieldset.form.d.ts +4 -5
  100. package/lib/cjs/components/fieldset/Fieldset.form.js +3 -2
  101. package/lib/cjs/components/file/File.form.d.ts +4 -5
  102. package/lib/cjs/components/file/File.form.js +3 -2
  103. package/lib/cjs/components/form/Form.d.ts +23 -20
  104. package/lib/cjs/components/form/Form.form.d.ts +4 -5
  105. package/lib/cjs/components/form/Form.form.js +3 -2
  106. package/lib/cjs/components/form/Form.js +18 -11
  107. package/lib/cjs/components/form/editForm/Form.edit.data.d.ts +1 -1
  108. package/lib/cjs/components/form/fixtures/comp7.d.ts +36 -0
  109. package/lib/cjs/components/form/fixtures/comp7.js +37 -0
  110. package/lib/cjs/components/form/fixtures/comp8.d.ts +26 -0
  111. package/lib/cjs/components/form/fixtures/comp8.js +29 -0
  112. package/lib/cjs/components/form/fixtures/index.d.ts +3 -1
  113. package/lib/cjs/components/form/fixtures/index.js +5 -1
  114. package/lib/cjs/components/hidden/Hidden.form.d.ts +4 -5
  115. package/lib/cjs/components/hidden/Hidden.form.js +3 -2
  116. package/lib/cjs/components/hidden/Hidden.js +1 -1
  117. package/lib/cjs/components/html/HTML.form.d.ts +4 -5
  118. package/lib/cjs/components/html/HTML.form.js +3 -2
  119. package/lib/cjs/components/number/Number.d.ts +1 -1
  120. package/lib/cjs/components/number/Number.form.d.ts +4 -5
  121. package/lib/cjs/components/number/Number.form.js +3 -2
  122. package/lib/cjs/components/number/Number.js +1 -1
  123. package/lib/cjs/components/panel/Panel.form.d.ts +4 -5
  124. package/lib/cjs/components/panel/Panel.form.js +3 -2
  125. package/lib/cjs/components/panel/editForm/Panel.edit.conditional.d.ts +1 -1
  126. package/lib/cjs/components/password/Password.form.d.ts +4 -5
  127. package/lib/cjs/components/password/Password.form.js +3 -2
  128. package/lib/cjs/components/phonenumber/PhoneNumber.form.d.ts +4 -5
  129. package/lib/cjs/components/phonenumber/PhoneNumber.form.js +3 -2
  130. package/lib/cjs/components/radio/Radio.form.d.ts +4 -3
  131. package/lib/cjs/components/radio/Radio.form.js +3 -2
  132. package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +3 -4
  133. package/lib/cjs/components/recaptcha/ReCaptcha.form.js +2 -1
  134. package/lib/cjs/components/select/Select.d.ts +2 -2
  135. package/lib/cjs/components/select/Select.form.d.ts +4 -3
  136. package/lib/cjs/components/select/Select.form.js +3 -2
  137. package/lib/cjs/components/select/Select.js +1 -1
  138. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +2 -8
  139. package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +4 -3
  140. package/lib/cjs/components/selectboxes/SelectBoxes.form.js +3 -2
  141. package/lib/cjs/components/selectboxes/SelectBoxes.js +7 -6
  142. package/lib/cjs/components/signature/Signature.form.d.ts +4 -5
  143. package/lib/cjs/components/signature/Signature.form.js +3 -2
  144. package/lib/cjs/components/survey/Survey.form.d.ts +4 -5
  145. package/lib/cjs/components/survey/Survey.form.js +3 -2
  146. package/lib/cjs/components/table/Table.form.d.ts +4 -5
  147. package/lib/cjs/components/table/Table.form.js +3 -2
  148. package/lib/cjs/components/tabs/Tabs.d.ts +2 -2
  149. package/lib/cjs/components/tabs/Tabs.form.d.ts +4 -5
  150. package/lib/cjs/components/tabs/Tabs.form.js +3 -2
  151. package/lib/cjs/components/tabs/Tabs.js +1 -1
  152. package/lib/cjs/components/tags/Tags.form.d.ts +4 -5
  153. package/lib/cjs/components/tags/Tags.form.js +3 -2
  154. package/lib/cjs/components/textarea/TextArea.d.ts +3 -3
  155. package/lib/cjs/components/textarea/TextArea.form.d.ts +4 -5
  156. package/lib/cjs/components/textarea/TextArea.form.js +3 -2
  157. package/lib/cjs/components/textarea/TextArea.js +2 -2
  158. package/lib/cjs/components/textfield/TextField.d.ts +12 -19
  159. package/lib/cjs/components/textfield/TextField.form.d.ts +4 -5
  160. package/lib/cjs/components/textfield/TextField.form.js +3 -2
  161. package/lib/cjs/components/textfield/TextField.js +13 -12
  162. package/lib/cjs/components/time/Time.form.d.ts +4 -5
  163. package/lib/cjs/components/time/Time.form.js +3 -2
  164. package/lib/cjs/components/unknown/Unknown.form.d.ts +3 -35
  165. package/lib/cjs/components/unknown/Unknown.form.js +2 -1
  166. package/lib/cjs/components/url/Url.form.d.ts +4 -5
  167. package/lib/cjs/components/url/Url.form.js +3 -2
  168. package/lib/cjs/components/well/Well.form.d.ts +4 -5
  169. package/lib/cjs/components/well/Well.form.js +3 -2
  170. package/lib/cjs/formio.form.js +2 -2
  171. package/lib/cjs/utils/Evaluator.d.ts +0 -1
  172. package/lib/cjs/utils/Evaluator.js +2 -5
  173. package/lib/cjs/utils/formUtils.d.ts +1 -1
  174. package/lib/cjs/utils/utils.d.ts +106 -83
  175. package/lib/cjs/utils/utils.js +96 -140
  176. package/lib/cjs/widgets/CalendarWidget.d.ts +8 -7
  177. package/lib/cjs/widgets/CalendarWidget.js +8 -7
  178. package/lib/mjs/Element.d.ts +3 -2
  179. package/lib/mjs/Element.js +4 -3
  180. package/lib/mjs/Embed.js +8 -5
  181. package/lib/mjs/Form.d.ts +99 -36
  182. package/lib/mjs/Form.js +43 -38
  183. package/lib/mjs/PDF.d.ts +8 -7
  184. package/lib/mjs/PDF.js +6 -5
  185. package/lib/mjs/Webform.d.ts +1 -4
  186. package/lib/mjs/Webform.js +19 -16
  187. package/lib/mjs/WebformBuilder.d.ts +15 -14
  188. package/lib/mjs/WebformBuilder.js +11 -10
  189. package/lib/mjs/Wizard.d.ts +1 -12
  190. package/lib/mjs/Wizard.js +15 -13
  191. package/lib/mjs/WizardBuilder.d.ts +1 -1
  192. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +2 -2
  193. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.form.d.ts +2 -2
  194. package/lib/mjs/addons/index.d.ts +2 -2
  195. package/lib/mjs/components/Components.d.ts +6 -5
  196. package/lib/mjs/components/Components.js +2 -1
  197. package/lib/mjs/components/_classes/component/Component.form.d.ts +4 -5
  198. package/lib/mjs/components/_classes/component/Component.form.js +3 -2
  199. package/lib/mjs/components/_classes/component/Component.js +3 -2
  200. package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.d.ts +2 -2
  201. package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.d.ts +1 -1
  202. package/lib/mjs/components/_classes/component/editForm/Component.edit.data.d.ts +1 -1
  203. package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.d.ts +1 -1
  204. package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +1 -1
  205. package/lib/mjs/components/_classes/component/editForm/utils.d.ts +1 -1
  206. package/lib/mjs/components/_classes/component/editForm/utils.js +1 -1
  207. package/lib/mjs/components/_classes/list/ListComponent.d.ts +2 -2
  208. package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +4 -4
  209. package/lib/mjs/components/_classes/list/ListComponent.form.js +3 -3
  210. package/lib/mjs/components/_classes/nested/NestedComponent.form.d.ts +4 -5
  211. package/lib/mjs/components/_classes/nested/NestedComponent.form.js +3 -2
  212. package/lib/mjs/components/_classes/nested/NestedComponent.js +0 -2
  213. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +1 -1
  214. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +1 -1
  215. package/lib/mjs/components/address/Address.form.d.ts +4 -5
  216. package/lib/mjs/components/address/Address.form.js +3 -2
  217. package/lib/mjs/components/button/Button.form.d.ts +4 -5
  218. package/lib/mjs/components/button/Button.form.js +3 -2
  219. package/lib/mjs/components/button/Button.js +3 -2
  220. package/lib/mjs/components/checkbox/Checkbox.form.d.ts +4 -5
  221. package/lib/mjs/components/checkbox/Checkbox.form.js +3 -2
  222. package/lib/mjs/components/checkbox/Checkbox.js +2 -9
  223. package/lib/mjs/components/checkbox/fixtures/comp5.d.ts +34 -0
  224. package/lib/mjs/components/checkbox/fixtures/comp5.js +53 -0
  225. package/lib/mjs/components/checkbox/fixtures/index.d.ts +2 -1
  226. package/lib/mjs/components/checkbox/fixtures/index.js +2 -1
  227. package/lib/mjs/components/columns/Columns.d.ts +1 -1
  228. package/lib/mjs/components/columns/Columns.form.d.ts +4 -5
  229. package/lib/mjs/components/columns/Columns.form.js +3 -2
  230. package/lib/mjs/components/columns/Columns.js +1 -1
  231. package/lib/mjs/components/container/Container.form.d.ts +4 -5
  232. package/lib/mjs/components/container/Container.form.js +3 -2
  233. package/lib/mjs/components/content/Content.form.d.ts +4 -5
  234. package/lib/mjs/components/content/Content.form.js +3 -2
  235. package/lib/mjs/components/currency/Currency.form.d.ts +4 -5
  236. package/lib/mjs/components/currency/Currency.form.js +3 -2
  237. package/lib/mjs/components/currency/Currency.js +1 -1
  238. package/lib/mjs/components/datagrid/DataGrid.d.ts +4 -4
  239. package/lib/mjs/components/datagrid/DataGrid.form.d.ts +4 -5
  240. package/lib/mjs/components/datagrid/DataGrid.form.js +3 -2
  241. package/lib/mjs/components/datagrid/DataGrid.js +4 -4
  242. package/lib/mjs/components/datamap/DataMap.form.d.ts +4 -5
  243. package/lib/mjs/components/datamap/DataMap.form.js +3 -2
  244. package/lib/mjs/components/datetime/DateTime.form.d.ts +4 -5
  245. package/lib/mjs/components/datetime/DateTime.form.js +3 -2
  246. package/lib/mjs/components/datetime/editForm/DateTime.edit.date.d.ts +1 -1
  247. package/lib/mjs/components/datetime/editForm/DateTime.edit.date.js +1 -1
  248. package/lib/mjs/components/day/Day.d.ts +18 -23
  249. package/lib/mjs/components/day/Day.form.d.ts +4 -5
  250. package/lib/mjs/components/day/Day.form.js +3 -2
  251. package/lib/mjs/components/day/Day.js +15 -14
  252. package/lib/mjs/components/editgrid/EditGrid.d.ts +4 -3
  253. package/lib/mjs/components/editgrid/EditGrid.form.d.ts +4 -5
  254. package/lib/mjs/components/editgrid/EditGrid.form.js +3 -2
  255. package/lib/mjs/components/editgrid/EditGrid.js +3 -3
  256. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -1
  257. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.d.ts +1 -1
  258. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.js +1 -1
  259. package/lib/mjs/components/email/Email.form.d.ts +4 -5
  260. package/lib/mjs/components/email/Email.form.js +3 -2
  261. package/lib/mjs/components/fieldset/Fieldset.form.d.ts +4 -5
  262. package/lib/mjs/components/fieldset/Fieldset.form.js +3 -2
  263. package/lib/mjs/components/file/File.form.d.ts +4 -5
  264. package/lib/mjs/components/file/File.form.js +3 -2
  265. package/lib/mjs/components/form/Form.d.ts +23 -20
  266. package/lib/mjs/components/form/Form.form.d.ts +4 -5
  267. package/lib/mjs/components/form/Form.form.js +3 -2
  268. package/lib/mjs/components/form/Form.js +18 -11
  269. package/lib/mjs/components/form/editForm/Form.edit.data.d.ts +1 -1
  270. package/lib/mjs/components/form/fixtures/comp7.d.ts +36 -0
  271. package/lib/mjs/components/form/fixtures/comp7.js +35 -0
  272. package/lib/mjs/components/form/fixtures/comp8.d.ts +26 -0
  273. package/lib/mjs/components/form/fixtures/comp8.js +27 -0
  274. package/lib/mjs/components/form/fixtures/index.d.ts +3 -1
  275. package/lib/mjs/components/form/fixtures/index.js +3 -1
  276. package/lib/mjs/components/hidden/Hidden.form.d.ts +4 -5
  277. package/lib/mjs/components/hidden/Hidden.form.js +3 -2
  278. package/lib/mjs/components/hidden/Hidden.js +1 -1
  279. package/lib/mjs/components/html/HTML.form.d.ts +4 -5
  280. package/lib/mjs/components/html/HTML.form.js +3 -2
  281. package/lib/mjs/components/number/Number.d.ts +1 -1
  282. package/lib/mjs/components/number/Number.form.d.ts +4 -5
  283. package/lib/mjs/components/number/Number.form.js +3 -2
  284. package/lib/mjs/components/number/Number.js +1 -1
  285. package/lib/mjs/components/panel/Panel.form.d.ts +4 -5
  286. package/lib/mjs/components/panel/Panel.form.js +3 -2
  287. package/lib/mjs/components/panel/editForm/Panel.edit.conditional.d.ts +1 -1
  288. package/lib/mjs/components/password/Password.form.d.ts +4 -5
  289. package/lib/mjs/components/password/Password.form.js +3 -2
  290. package/lib/mjs/components/phonenumber/PhoneNumber.form.d.ts +4 -5
  291. package/lib/mjs/components/phonenumber/PhoneNumber.form.js +3 -2
  292. package/lib/mjs/components/radio/Radio.form.d.ts +4 -3
  293. package/lib/mjs/components/radio/Radio.form.js +3 -2
  294. package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +3 -4
  295. package/lib/mjs/components/recaptcha/ReCaptcha.form.js +2 -1
  296. package/lib/mjs/components/select/Select.d.ts +2 -2
  297. package/lib/mjs/components/select/Select.form.d.ts +4 -3
  298. package/lib/mjs/components/select/Select.form.js +3 -2
  299. package/lib/mjs/components/select/Select.js +1 -1
  300. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +2 -8
  301. package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +4 -3
  302. package/lib/mjs/components/selectboxes/SelectBoxes.form.js +3 -2
  303. package/lib/mjs/components/selectboxes/SelectBoxes.js +7 -6
  304. package/lib/mjs/components/signature/Signature.form.d.ts +4 -5
  305. package/lib/mjs/components/signature/Signature.form.js +3 -2
  306. package/lib/mjs/components/survey/Survey.form.d.ts +4 -5
  307. package/lib/mjs/components/survey/Survey.form.js +3 -2
  308. package/lib/mjs/components/table/Table.form.d.ts +4 -5
  309. package/lib/mjs/components/table/Table.form.js +3 -2
  310. package/lib/mjs/components/tabs/Tabs.d.ts +2 -2
  311. package/lib/mjs/components/tabs/Tabs.form.d.ts +4 -5
  312. package/lib/mjs/components/tabs/Tabs.form.js +3 -2
  313. package/lib/mjs/components/tabs/Tabs.js +1 -1
  314. package/lib/mjs/components/tags/Tags.form.d.ts +4 -5
  315. package/lib/mjs/components/tags/Tags.form.js +3 -2
  316. package/lib/mjs/components/textarea/TextArea.d.ts +3 -3
  317. package/lib/mjs/components/textarea/TextArea.form.d.ts +4 -5
  318. package/lib/mjs/components/textarea/TextArea.form.js +3 -2
  319. package/lib/mjs/components/textarea/TextArea.js +2 -2
  320. package/lib/mjs/components/textfield/TextField.d.ts +12 -19
  321. package/lib/mjs/components/textfield/TextField.form.d.ts +4 -5
  322. package/lib/mjs/components/textfield/TextField.form.js +3 -2
  323. package/lib/mjs/components/textfield/TextField.js +13 -12
  324. package/lib/mjs/components/time/Time.form.d.ts +4 -5
  325. package/lib/mjs/components/time/Time.form.js +3 -2
  326. package/lib/mjs/components/unknown/Unknown.form.d.ts +3 -35
  327. package/lib/mjs/components/unknown/Unknown.form.js +2 -1
  328. package/lib/mjs/components/url/Url.form.d.ts +4 -5
  329. package/lib/mjs/components/url/Url.form.js +3 -2
  330. package/lib/mjs/components/well/Well.form.d.ts +4 -5
  331. package/lib/mjs/components/well/Well.form.js +3 -2
  332. package/lib/mjs/formio.form.js +1 -1
  333. package/lib/mjs/utils/Evaluator.d.ts +0 -1
  334. package/lib/mjs/utils/Evaluator.js +1 -4
  335. package/lib/mjs/utils/formUtils.d.ts +1 -1
  336. package/lib/mjs/utils/utils.d.ts +106 -83
  337. package/lib/mjs/utils/utils.js +96 -140
  338. package/lib/mjs/widgets/CalendarWidget.d.ts +8 -7
  339. package/lib/mjs/widgets/CalendarWidget.js +8 -7
  340. package/package.json +5 -8
@@ -3,10 +3,11 @@
3
3
  * @param {Function|string|object} func - The function to evaluate.
4
4
  * @param {*} args - A map of arguments to pass to the function.
5
5
  * @param {string} ret - The name of the "return" variable in the script.
6
- * @param {boolean} tokenize - True if the script should be interpolated before being executed.
6
+ * @param {boolean} interpolate - True if the script should be interpolated before being executed.
7
+ * @param {import('@formio/core').EvaluatorOptions} options - The evaluator options.
7
8
  * @returns {*} - The result of the evaluation.
8
9
  */
9
- export function evaluate(func: Function | string | object, args: any, ret: string, tokenize: boolean): any;
10
+ export function evaluate(func: Function | string | object, args: any, ret: string, interpolate: boolean, options?: import('@formio/core').EvaluatorOptions): any;
10
11
  /**
11
12
  * Returns a random compoennt ID.
12
13
  * @returns {string} - A random component ID.
@@ -324,99 +325,115 @@ export function delay(fn: Function, delay?: number, ...args: any[]): any;
324
325
  export function iterateKey(key: string): string;
325
326
  /**
326
327
  * Determines a unique key within a map provided the base key.
327
- * @param map
328
- * @param base
329
- * @returns {*}
328
+ * @param {Record<string, string>} map - The map to check for uniqueness.
329
+ * @param {string} base - The base path of the key.
330
+ * @returns {string} - The unique key.
330
331
  */
331
- export function uniqueKey(map: any, base: any): any;
332
+ export function uniqueKey(map: Record<string, string>, base: string): string;
332
333
  /**
333
334
  * Determines the major version number of bootstrap.
334
- * @param options
335
- * @returns {number}
335
+ * @param {object} options - The options to check for bootstrap version.
336
+ * @param {string} options.bootstrap - The bootstrap version to use.
337
+ * @returns {number} - The bootstrap version.
336
338
  */
337
- export function bootstrapVersion(options: any): number;
339
+ export function bootstrapVersion(options: {
340
+ bootstrap: string;
341
+ }): number;
338
342
  /**
339
343
  * Retrun provided argument.
340
344
  * If argument is a function, returns the result of a function call.
341
- * @param {*} e;
342
- * @param e
343
- * @returns {*}
345
+ * @param {Function|any} e - The argument to check if a function and call if so.
346
+ * @returns {any} - Either the result of the function call (e) or e if it is not a function.
344
347
  */
345
- export function unfold(e: any): any;
348
+ export function unfold(e: Function | any): any;
346
349
  /**
347
- *
348
- * @param a
349
- * @param b
350
+ * Create enclosed state. Returns functions to getting and cycling between states.
351
+ * @param {*} a - initial state.
352
+ * @param {*} b - next state.
353
+ * @returns {Functions[]} -- [get, toggle];
350
354
  */
351
- export function withSwitch(a: any, b: any): (() => any)[];
355
+ export function withSwitch(a: any, b: any): Functions[];
352
356
  /**
353
- *
354
- * @param callback
355
- * @param options
357
+ * Create a function that will call the provided function only the provided limit.
358
+ * @param {Function} callback - The callback to call.
359
+ * @param {object} options - The options to use.
360
+ * @param {number} options.limit - The limit to call the callback.
361
+ * @param {number} options.delay - The delay to wait before resetting the call count.
362
+ * @returns {Function} - The function that will call the callback only the provided limit.
356
363
  */
357
- export function observeOverload(callback: any, options?: {}): () => any;
364
+ export function observeOverload(callback: Function, options?: {
365
+ limit: number;
366
+ delay: number;
367
+ }): Function;
358
368
  /**
359
- *
360
- * @param context
361
- * @param excludeNested
362
- * @param excludedTypes
369
+ * Returns the components that are provided within an evaluation context.
370
+ * @param {any} context - The evaluation context to get the components from.
371
+ * @param {boolean} excludeNested - Exclude nested components.
372
+ * @param {Array<string>} excludedTypes - The types of components to exclude.
373
+ * @returns {Array} - The components within the evaluation context.
363
374
  */
364
- export function getContextComponents(context: any, excludeNested?: boolean, excludedTypes?: any[]): any[];
375
+ export function getContextComponents(context: any, excludeNested: boolean, excludedTypes?: Array<string>): any[];
365
376
  /**
366
- *
367
- * @param context
377
+ * Returns the button components that are within an evaluation context.
378
+ * @param {any} context - The evaluation context to get the components from.
379
+ * @returns {Array} - The button components within the evaluation context.
368
380
  */
369
381
  export function getContextButtons(context: any): any[];
370
382
  /**
371
383
  * Translates text values in html template.
372
- * @param {string} template
373
- * @param {Function} translate
374
- * @returns {string}
375
- * Html template with translated values.
384
+ * @param {string} template - The template to translate.
385
+ * @param {Function} translate - The translation function.
386
+ * @returns {string} - Html template with translated values.
376
387
  */
377
388
  export function translateHTMLTemplate(template: string, translate: Function): string;
378
389
  /**
379
390
  * Sanitize an html string.
380
- * @param string
381
- * @param options
382
- * @returns {*}
391
+ * @param {string} string - The string to sanitize.
392
+ * @param {any} options - The options to use for sanitization.
393
+ * @returns {string} - The sanitized html string.
383
394
  */
384
- export function sanitize(string: any, options: any): any;
395
+ export function sanitize(string: string, options: any): string;
385
396
  /**
386
397
  * Fast cloneDeep for JSON objects only.
387
- * @param obj
398
+ * @param {any} obj - The object to perform a fast clone deep against.
399
+ * @returns {any} - The cloned object.
388
400
  */
389
401
  export function fastCloneDeep(obj: any): any;
390
402
  /**
391
- *
392
- * @param componentJson
403
+ * Returns if the component is an input component.
404
+ * @param {import('@formio/core').Component} componentJson - The JSON of a component.
405
+ * @returns {bool} - TRUE if the component is an input component; FALSE otherwise.
393
406
  */
394
- export function isInputComponent(componentJson: any): any;
407
+ export function isInputComponent(componentJson: import('@formio/core').Component): bool;
395
408
  /**
396
- *
397
- * @param pathStr
409
+ * Takes a component path, and returns a component path array.
410
+ * @param {string} pathStr - The path string to convert to an array.
411
+ * @returns {Arryay<number>} - The array of paths.
398
412
  */
399
- export function getArrayFromComponentPath(pathStr: any): any;
413
+ export function getArrayFromComponentPath(pathStr: string): Arryay<number>;
400
414
  /**
401
- *
402
- * @param child
403
- * @param parent
415
+ * Returns true if the component is a child of the parent.
416
+ * @param {any} child - The child component to check.
417
+ * @param {any} parent - The parent component to check.
418
+ * @returns {boolean} - TRUE if the child is a child of the parent; FALSE otherwise.
404
419
  */
405
420
  export function isChildOf(child: any, parent: any): boolean;
406
421
  /**
407
- *
408
- * @param path
422
+ * Takes an array of component path indexes, and returns a string version of that array.
423
+ * @param {Array<number>} path - The path array to convert to a string.
424
+ * @returns {string} - The string version of the path.
409
425
  */
410
- export function getStringFromComponentPath(path: any): any;
426
+ export function getStringFromComponentPath(path: Array<number>): string;
411
427
  /**
412
- *
413
- * @param number
414
- * @param precision
428
+ * Takes a number and rounds it to the provided precision amount.
429
+ * @param {number} number - The number to round.
430
+ * @param {number} precision - The precision to round the number to.
431
+ * @returns {string} - The rounded number.
415
432
  */
416
- export function round(number: any, precision: any): any;
433
+ export function round(number: number, precision: number): string;
417
434
  /**
418
435
  * Check for Internet Explorer browser version
419
- * @returns {(number|null)}
436
+ * @returns {(number|null)} - The IE browser version or null if not IE
420
437
  */
421
438
  export function getIEBrowserVersion(): (number | null);
422
439
  /**
@@ -426,61 +443,67 @@ export function getIEBrowserVersion(): (number | null);
426
443
  */
427
444
  export function getBrowserInfo(): object;
428
445
  /**
429
- *
430
- * @param path
446
+ * Takes a component path, which may include array indicies (i.e. [0][1]), and returns the compoennt path without the indicies.
447
+ * @param {string} path - The path to remove the indicies from.
448
+ * @returns {string} - The path without the indicies.
431
449
  */
432
450
  export function getComponentPathWithoutIndicies(path?: string): string;
433
451
  /**
434
452
  * Returns a path to the component which based on its schema
435
- * @param {*} component is a component's schema containing link to its parent's schema in the 'parent' property
436
- * @param path
453
+ * @param {import('@formio/core').Component} component - Component containing link to its parent's schema in the 'parent' property
454
+ * @param {string} path - Path to the component
455
+ * @returns {string} - Path to the component
437
456
  */
438
- export function getComponentPath(component: any, path?: string): string;
457
+ export function getComponentPath(component: import('@formio/core').Component, path?: string): string;
439
458
  /**
440
459
  * Returns a parent component of the passed component instance skipping all the Layout components
441
- * @param {*} componentInstance
442
- * @returns {(Component|undefined)}
460
+ * @param {Component} componentInstance - The component to check for the parent.
461
+ * @returns {Component|undefined} - The parent data component.
443
462
  */
444
- export function getDataParentComponent(componentInstance: any): (Component | undefined);
463
+ export function getDataParentComponent(componentInstance: Component): Component | undefined;
445
464
  /**
446
465
  * Returns whether the value is a promise
447
- * @param value
448
- * @returns {boolean}
466
+ * @param {any} value - The value to check
467
+ * @returns {boolean} - TRUE if the value is a promise; FALSE otherwise
449
468
  */
450
469
  export function isPromise(value: any): boolean;
451
470
  /**
452
471
  * Determines if the component has a scoping parent in tree (a component which scopes its children and manages its
453
472
  * changes by itself, e.g. EditGrid)
454
- * @param componentInstance
455
- * @param firstPass
456
- * @returns {boolean|boolean|*}
473
+ * @param {Component} componentInstance - The component to check for the scoping parent.
474
+ * @param {boolean} firstPass - Whether it is the first pass of the function
475
+ * @returns {boolean|*} - TRUE if the component has a scoping parent; FALSE otherwise
457
476
  */
458
- export function isInsideScopingComponent(componentInstance: any, firstPass?: boolean): boolean | boolean | any;
477
+ export function isInsideScopingComponent(componentInstance: Component, firstPass?: boolean): boolean | any;
459
478
  /**
460
- *
461
- * @param element
479
+ * Returns all the focusable elements within the provided dom element.
480
+ * @param {HTMLElement} element - The element to get the focusable elements from.
481
+ * @returns {NodeList<HTMLElement>} - The focusable elements within the provided element.
462
482
  */
463
- export function getFocusableElements(element: any): any;
483
+ export function getFocusableElements(element: HTMLElement): NodeList<HTMLElement>;
464
484
  /**
465
- *
466
- * @param fullSchema
485
+ * Returns the saved types for the component
486
+ * @param {import('@formio/core').Component} fullSchema - The component schema
487
+ * @returns {Array<string>|null} - The saved types for the component
467
488
  */
468
- export function getComponentSavedTypes(fullSchema: any): string[] | null;
489
+ export function getComponentSavedTypes(fullSchema: import('@formio/core').Component): Array<string> | null;
469
490
  /**
470
- *
471
- * @param template
491
+ * Returns the template keys inside the template code.
492
+ * @param {string} template - The template to get the keys from.
493
+ * @returns {Array<string>} - The keys inside the template.
472
494
  */
473
- export function getItemTemplateKeys(template: any): any[];
495
+ export function getItemTemplateKeys(template: string): Array<string>;
474
496
  /**
475
- *
476
- * @param comp
497
+ * Returns if the component is a select resource with an object for its value.
498
+ * @param {import('@formio/core').Component} comp - The component to check.
499
+ * @returns {boolean} - TRUE if the component is a select resource with an object for its value; FALSE otherwise.
477
500
  */
478
- export function isSelectResourceWithObjectValue(comp?: {}): any;
501
+ export function isSelectResourceWithObjectValue(comp?: import('@formio/core').Component): boolean;
479
502
  export * from "./formUtils";
480
503
  /**
481
504
  * Map values through unfold and return first non-nil value.
482
- * @param {Array<T>} collection;
483
- * @returns {T}
505
+ * @param {Array<T>} collection - The collection to map through unfold.;
506
+ * @returns {T} - The first non-nil value.
484
507
  */
485
508
  export const firstNonNil: any;
486
509
  export namespace componentValueTypes {
@@ -492,7 +515,7 @@ export namespace componentValueTypes {
492
515
  let date: string;
493
516
  let any: string;
494
517
  }
495
- export function interpolateErrors(component: any, errors: FieldError[], interpolateFn: any): [];
518
+ export function interpolateErrors(component: Component, errors: FieldError[], interpolateFn: Function): [];
496
519
  import jsonLogic from 'json-logic-js';
497
520
  import ConditionOperators from './conditionOperators';
498
521
  import { Evaluator } from './Evaluator';