@formio/js 5.0.0-dev.5613.3476921 → 5.0.0-dev.5614.b5c93f3

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 (581) hide show
  1. package/Changelog.md +73 -4
  2. package/dist/formio.builder.css +8 -13
  3. package/dist/formio.builder.min.css +1 -1
  4. package/dist/formio.embed.js +1 -1
  5. package/dist/formio.embed.min.js +1 -1
  6. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  7. package/dist/formio.form.css +8 -13
  8. package/dist/formio.form.js +803 -1226
  9. package/dist/formio.form.min.css +1 -1
  10. package/dist/formio.form.min.js +1 -1
  11. package/dist/formio.form.min.js.LICENSE.txt +3 -3
  12. package/dist/formio.full.css +8 -13
  13. package/dist/formio.full.js +722 -941
  14. package/dist/formio.full.min.css +1 -1
  15. package/dist/formio.full.min.js +1 -1
  16. package/dist/formio.full.min.js.LICENSE.txt +3 -3
  17. package/dist/formio.js +18 -18
  18. package/dist/formio.min.js +1 -1
  19. package/dist/formio.min.js.LICENSE.txt +1 -1
  20. package/dist/formio.utils.js +1853 -466
  21. package/dist/formio.utils.min.js +1 -1
  22. package/dist/formio.utils.min.js.LICENSE.txt +10 -2
  23. package/embed.d.ts +1 -0
  24. package/form.d.ts +1 -0
  25. package/lib/cjs/CDN.d.ts +1 -0
  26. package/lib/cjs/CDN.js +6 -3
  27. package/lib/cjs/Element.d.ts +87 -98
  28. package/lib/cjs/Element.js +76 -95
  29. package/lib/cjs/Embed.d.ts +1 -1
  30. package/lib/cjs/Embed.js +52 -12
  31. package/lib/cjs/Form.d.ts +365 -36
  32. package/lib/cjs/Form.js +50 -75
  33. package/lib/cjs/FormBuilder.d.ts +187 -2
  34. package/lib/cjs/FormBuilder.js +30 -8
  35. package/lib/cjs/Formio.js +12 -0
  36. package/lib/cjs/InlineEmbed.d.ts +7 -0
  37. package/lib/cjs/InlineEmbed.js +116 -0
  38. package/lib/cjs/PDF.d.ts +11 -13
  39. package/lib/cjs/PDF.js +7 -16
  40. package/lib/cjs/PDFBuilder.js +3 -3
  41. package/lib/cjs/Webform.d.ts +193 -140
  42. package/lib/cjs/Webform.js +341 -306
  43. package/lib/cjs/WebformBuilder.d.ts +18 -15
  44. package/lib/cjs/WebformBuilder.js +34 -27
  45. package/lib/cjs/Wizard.d.ts +31 -21
  46. package/lib/cjs/Wizard.js +44 -21
  47. package/lib/cjs/WizardBuilder.d.ts +1 -1
  48. package/lib/cjs/addons/FormioAddon.d.ts +0 -1
  49. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +8 -5
  50. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +6 -3
  51. package/lib/cjs/components/Components.d.ts +4 -4
  52. package/lib/cjs/components/Components.js +3 -3
  53. package/lib/cjs/components/_classes/component/Component.d.ts +516 -270
  54. package/lib/cjs/components/_classes/component/Component.form.d.ts +6 -3
  55. package/lib/cjs/components/_classes/component/Component.form.js +5 -0
  56. package/lib/cjs/components/_classes/component/Component.js +470 -246
  57. package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +1 -1
  58. package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +2 -2
  59. package/lib/cjs/components/_classes/component/editForm/utils.js +2 -2
  60. package/lib/cjs/components/_classes/component/fixtures/comp6.d.ts +77 -0
  61. package/lib/cjs/components/_classes/component/fixtures/comp6.js +59 -0
  62. package/lib/cjs/components/_classes/component/fixtures/comp7.d.ts +84 -0
  63. package/lib/cjs/components/_classes/component/fixtures/comp7.js +86 -0
  64. package/lib/cjs/components/_classes/component/fixtures/index.d.ts +3 -1
  65. package/lib/cjs/components/_classes/component/fixtures/index.js +5 -1
  66. package/lib/cjs/components/_classes/field/Field.d.ts +11 -2
  67. package/lib/cjs/components/_classes/field/Field.js +13 -1
  68. package/lib/cjs/components/_classes/input/Input.d.ts +4 -3
  69. package/lib/cjs/components/_classes/input/Input.js +32 -23
  70. package/lib/cjs/components/_classes/list/ListComponent.d.ts +2 -2
  71. package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +6 -3
  72. package/lib/cjs/components/_classes/list/ListComponent.form.js +5 -0
  73. package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +43 -12
  74. package/lib/cjs/components/_classes/multivalue/Multivalue.js +44 -3
  75. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +164 -68
  76. package/lib/cjs/components/_classes/nested/NestedComponent.form.d.ts +6 -3
  77. package/lib/cjs/components/_classes/nested/NestedComponent.form.js +5 -0
  78. package/lib/cjs/components/_classes/nested/NestedComponent.js +182 -62
  79. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +2 -2
  80. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
  81. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +7 -1
  82. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +2 -3
  83. package/lib/cjs/components/address/Address.d.ts +4 -2
  84. package/lib/cjs/components/address/Address.form.d.ts +6 -3
  85. package/lib/cjs/components/address/Address.form.js +5 -0
  86. package/lib/cjs/components/address/Address.js +4 -0
  87. package/lib/cjs/components/address/editForm/Address.edit.provider.js +1 -1
  88. package/lib/cjs/components/button/Button.d.ts +4 -13
  89. package/lib/cjs/components/button/Button.form.d.ts +6 -3
  90. package/lib/cjs/components/button/Button.form.js +5 -0
  91. package/lib/cjs/components/button/Button.js +12 -7
  92. package/lib/cjs/components/checkbox/Checkbox.d.ts +5 -28
  93. package/lib/cjs/components/checkbox/Checkbox.form.d.ts +6 -3
  94. package/lib/cjs/components/checkbox/Checkbox.form.js +5 -0
  95. package/lib/cjs/components/checkbox/Checkbox.js +1 -1
  96. package/lib/cjs/components/checkbox/fixtures/comp6.d.ts +32 -0
  97. package/lib/cjs/components/checkbox/fixtures/comp6.js +30 -0
  98. package/lib/cjs/components/checkbox/fixtures/index.d.ts +2 -1
  99. package/lib/cjs/components/checkbox/fixtures/index.js +3 -1
  100. package/lib/cjs/components/columns/Columns.d.ts +3 -2
  101. package/lib/cjs/components/columns/Columns.form.d.ts +6 -3
  102. package/lib/cjs/components/columns/Columns.form.js +5 -0
  103. package/lib/cjs/components/columns/Columns.js +3 -3
  104. package/lib/cjs/components/container/Container.form.d.ts +6 -3
  105. package/lib/cjs/components/container/Container.form.js +5 -0
  106. package/lib/cjs/components/content/Content.d.ts +2 -1
  107. package/lib/cjs/components/content/Content.form.d.ts +6 -3
  108. package/lib/cjs/components/content/Content.form.js +5 -0
  109. package/lib/cjs/components/currency/Currency.form.d.ts +6 -3
  110. package/lib/cjs/components/currency/Currency.form.js +5 -0
  111. package/lib/cjs/components/currency/Currency.js +1 -2
  112. package/lib/cjs/components/datagrid/DataGrid.d.ts +17 -7
  113. package/lib/cjs/components/datagrid/DataGrid.form.d.ts +6 -3
  114. package/lib/cjs/components/datagrid/DataGrid.form.js +5 -0
  115. package/lib/cjs/components/datagrid/DataGrid.js +55 -37
  116. package/lib/cjs/components/datagrid/fixtures/comp-with-checkboxes.d.ts +29 -0
  117. package/lib/cjs/components/datagrid/fixtures/comp-with-checkboxes.js +36 -0
  118. package/lib/cjs/components/datagrid/fixtures/comp-with-reorder.d.ts +100 -0
  119. package/lib/cjs/components/datagrid/fixtures/comp-with-reorder.js +139 -0
  120. package/lib/cjs/components/datagrid/fixtures/comp10.d.ts +81 -0
  121. package/lib/cjs/components/datagrid/fixtures/comp10.js +87 -0
  122. package/lib/cjs/components/datagrid/fixtures/comp9.d.ts +41 -0
  123. package/lib/cjs/components/datagrid/fixtures/comp9.js +44 -0
  124. package/lib/cjs/components/datagrid/fixtures/index.d.ts +5 -1
  125. package/lib/cjs/components/datagrid/fixtures/index.js +9 -1
  126. package/lib/cjs/components/datamap/DataMap.d.ts +1 -0
  127. package/lib/cjs/components/datamap/DataMap.form.d.ts +6 -3
  128. package/lib/cjs/components/datamap/DataMap.form.js +5 -0
  129. package/lib/cjs/components/datetime/DateTime.d.ts +0 -14
  130. package/lib/cjs/components/datetime/DateTime.form.d.ts +6 -3
  131. package/lib/cjs/components/datetime/DateTime.form.js +5 -0
  132. package/lib/cjs/components/datetime/editForm/DateTime.edit.date.js +2 -2
  133. package/lib/cjs/components/day/Day.d.ts +23 -49
  134. package/lib/cjs/components/day/Day.form.d.ts +6 -3
  135. package/lib/cjs/components/day/Day.form.js +5 -0
  136. package/lib/cjs/components/day/Day.js +16 -21
  137. package/lib/cjs/components/day/fixtures/comp7.d.ts +109 -0
  138. package/lib/cjs/components/day/fixtures/comp7.js +109 -0
  139. package/lib/cjs/components/day/fixtures/comp8.d.ts +41 -0
  140. package/lib/cjs/components/day/fixtures/comp8.js +40 -0
  141. package/lib/cjs/components/day/fixtures/index.d.ts +3 -1
  142. package/lib/cjs/components/day/fixtures/index.js +5 -1
  143. package/lib/cjs/components/editgrid/EditGrid.d.ts +8 -4
  144. package/lib/cjs/components/editgrid/EditGrid.form.d.ts +6 -3
  145. package/lib/cjs/components/editgrid/EditGrid.form.js +5 -0
  146. package/lib/cjs/components/editgrid/EditGrid.js +12 -26
  147. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +2 -5
  148. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.js +6 -9
  149. package/lib/cjs/components/email/Email.form.d.ts +6 -3
  150. package/lib/cjs/components/email/Email.form.js +5 -0
  151. package/lib/cjs/components/fieldset/Fieldset.form.d.ts +6 -3
  152. package/lib/cjs/components/fieldset/Fieldset.form.js +5 -0
  153. package/lib/cjs/components/file/File.d.ts +9 -23
  154. package/lib/cjs/components/file/File.form.d.ts +6 -3
  155. package/lib/cjs/components/file/File.form.js +5 -0
  156. package/lib/cjs/components/file/File.js +3 -4
  157. package/lib/cjs/components/form/Form.d.ts +38 -20
  158. package/lib/cjs/components/form/Form.form.d.ts +6 -3
  159. package/lib/cjs/components/form/Form.form.js +5 -0
  160. package/lib/cjs/components/form/Form.js +33 -20
  161. package/lib/cjs/components/hidden/Hidden.d.ts +1 -11
  162. package/lib/cjs/components/hidden/Hidden.form.d.ts +6 -3
  163. package/lib/cjs/components/hidden/Hidden.form.js +5 -0
  164. package/lib/cjs/components/hidden/Hidden.js +1 -2
  165. package/lib/cjs/components/html/HTML.d.ts +2 -1
  166. package/lib/cjs/components/html/HTML.form.d.ts +6 -3
  167. package/lib/cjs/components/html/HTML.form.js +5 -0
  168. package/lib/cjs/components/number/Number.d.ts +3 -17
  169. package/lib/cjs/components/number/Number.form.d.ts +6 -3
  170. package/lib/cjs/components/number/Number.form.js +5 -0
  171. package/lib/cjs/components/number/Number.js +2 -3
  172. package/lib/cjs/components/number/fixtures/comp8.d.ts +32 -0
  173. package/lib/cjs/components/number/fixtures/comp8.js +28 -0
  174. package/lib/cjs/components/number/fixtures/index.d.ts +2 -1
  175. package/lib/cjs/components/number/fixtures/index.js +3 -1
  176. package/lib/cjs/components/panel/Panel.form.d.ts +6 -3
  177. package/lib/cjs/components/panel/Panel.form.js +5 -0
  178. package/lib/cjs/components/panel/Panel.js +0 -1
  179. package/lib/cjs/components/password/Password.form.d.ts +6 -3
  180. package/lib/cjs/components/password/Password.form.js +5 -0
  181. package/lib/cjs/components/phonenumber/PhoneNumber.form.d.ts +6 -3
  182. package/lib/cjs/components/phonenumber/PhoneNumber.form.js +5 -0
  183. package/lib/cjs/components/phonenumber/fixtures/comp2.d.ts +16 -0
  184. package/lib/cjs/components/phonenumber/fixtures/comp2.js +25 -0
  185. package/lib/cjs/components/phonenumber/fixtures/index.d.ts +2 -1
  186. package/lib/cjs/components/phonenumber/fixtures/index.js +3 -1
  187. package/lib/cjs/components/radio/Radio.d.ts +4 -27
  188. package/lib/cjs/components/radio/Radio.form.d.ts +6 -3
  189. package/lib/cjs/components/radio/Radio.form.js +5 -0
  190. package/lib/cjs/components/radio/Radio.js +11 -9
  191. package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +2 -9
  192. package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +6 -3
  193. package/lib/cjs/components/recaptcha/ReCaptcha.form.js +7 -2
  194. package/lib/cjs/components/recaptcha/ReCaptcha.js +1 -8
  195. package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +33 -2
  196. package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +13 -2
  197. package/lib/cjs/components/select/Select.d.ts +16 -39
  198. package/lib/cjs/components/select/Select.form.d.ts +6 -3
  199. package/lib/cjs/components/select/Select.form.js +5 -0
  200. package/lib/cjs/components/select/Select.js +23 -24
  201. package/lib/cjs/components/select/editForm/Select.edit.data.js +16 -2
  202. package/lib/cjs/components/select/fixtures/comp22.js +1 -1
  203. package/lib/cjs/components/select/fixtures/comp23.d.ts +58 -0
  204. package/lib/cjs/components/select/fixtures/comp23.js +49 -0
  205. package/lib/cjs/components/select/fixtures/comp24.d.ts +47 -0
  206. package/lib/cjs/components/select/fixtures/comp24.js +40 -0
  207. package/lib/cjs/components/select/fixtures/index.d.ts +3 -1
  208. package/lib/cjs/components/select/fixtures/index.js +5 -1
  209. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +2 -17
  210. package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +6 -3
  211. package/lib/cjs/components/selectboxes/SelectBoxes.form.js +5 -0
  212. package/lib/cjs/components/selectboxes/SelectBoxes.js +11 -10
  213. package/lib/cjs/components/signature/Signature.d.ts +0 -14
  214. package/lib/cjs/components/signature/Signature.form.d.ts +6 -3
  215. package/lib/cjs/components/signature/Signature.form.js +5 -0
  216. package/lib/cjs/components/signature/Signature.js +1 -1
  217. package/lib/cjs/components/survey/Survey.d.ts +3 -15
  218. package/lib/cjs/components/survey/Survey.form.d.ts +6 -3
  219. package/lib/cjs/components/survey/Survey.form.js +5 -0
  220. package/lib/cjs/components/table/Table.d.ts +3 -1
  221. package/lib/cjs/components/table/Table.form.d.ts +6 -3
  222. package/lib/cjs/components/table/Table.form.js +5 -0
  223. package/lib/cjs/components/table/Table.js +1 -1
  224. package/lib/cjs/components/tabs/Tabs.d.ts +4 -4
  225. package/lib/cjs/components/tabs/Tabs.form.d.ts +6 -3
  226. package/lib/cjs/components/tabs/Tabs.form.js +5 -0
  227. package/lib/cjs/components/tabs/Tabs.js +1 -2
  228. package/lib/cjs/components/tags/Tags.d.ts +0 -14
  229. package/lib/cjs/components/tags/Tags.form.d.ts +6 -3
  230. package/lib/cjs/components/tags/Tags.form.js +5 -0
  231. package/lib/cjs/components/tags/Tags.js +2 -4
  232. package/lib/cjs/components/textarea/TextArea.d.ts +4 -9
  233. package/lib/cjs/components/textarea/TextArea.form.d.ts +6 -3
  234. package/lib/cjs/components/textarea/TextArea.form.js +5 -0
  235. package/lib/cjs/components/textarea/TextArea.js +2 -2
  236. package/lib/cjs/components/textfield/TextField.d.ts +14 -30
  237. package/lib/cjs/components/textfield/TextField.form.d.ts +6 -3
  238. package/lib/cjs/components/textfield/TextField.form.js +5 -0
  239. package/lib/cjs/components/textfield/TextField.js +16 -17
  240. package/lib/cjs/components/time/Time.form.d.ts +6 -3
  241. package/lib/cjs/components/time/Time.form.js +5 -0
  242. package/lib/cjs/components/unknown/Unknown.form.d.ts +5 -34
  243. package/lib/cjs/components/unknown/Unknown.form.js +4 -0
  244. package/lib/cjs/components/url/Url.form.d.ts +6 -3
  245. package/lib/cjs/components/url/Url.form.js +5 -0
  246. package/lib/cjs/components/well/Well.form.d.ts +6 -3
  247. package/lib/cjs/components/well/Well.form.js +5 -0
  248. package/lib/cjs/formio.embed.d.ts +1 -2
  249. package/lib/cjs/formio.embed.js +2 -100
  250. package/lib/cjs/formio.form.d.ts +11 -4
  251. package/lib/cjs/formio.form.js +13 -5
  252. package/lib/cjs/providers/Providers.d.ts +36 -5
  253. package/lib/cjs/providers/Providers.js +29 -0
  254. package/lib/cjs/providers/address/AddressProvider.d.ts +131 -12
  255. package/lib/cjs/providers/address/AddressProvider.js +88 -2
  256. package/lib/cjs/providers/address/AzureAddressProvider.d.ts +48 -1
  257. package/lib/cjs/providers/address/AzureAddressProvider.js +37 -0
  258. package/lib/cjs/providers/address/CustomAddressProvider.d.ts +27 -4
  259. package/lib/cjs/providers/address/CustomAddressProvider.js +34 -0
  260. package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +135 -6
  261. package/lib/cjs/providers/address/GoogleAddressProvider.js +95 -1
  262. package/lib/cjs/providers/address/NominatimAddressProvider.d.ts +32 -7
  263. package/lib/cjs/providers/address/NominatimAddressProvider.js +33 -0
  264. package/lib/cjs/providers/address/index.d.ts +3 -1
  265. package/lib/cjs/providers/processor/fileProcessor.d.ts +7 -1
  266. package/lib/cjs/providers/processor/fileProcessor.js +6 -0
  267. package/lib/cjs/providers/storage/azure.d.ts +6 -13
  268. package/lib/cjs/providers/storage/azure.js +5 -0
  269. package/lib/cjs/providers/storage/base64.d.ts +5 -6
  270. package/lib/cjs/providers/storage/base64.js +4 -0
  271. package/lib/cjs/providers/storage/dropbox.d.ts +6 -4
  272. package/lib/cjs/providers/storage/dropbox.js +5 -0
  273. package/lib/cjs/providers/storage/googleDrive.d.ts +7 -5
  274. package/lib/cjs/providers/storage/googleDrive.js +6 -0
  275. package/lib/cjs/providers/storage/indexeddb.d.ts +5 -7
  276. package/lib/cjs/providers/storage/indexeddb.js +4 -0
  277. package/lib/cjs/providers/storage/s3.d.ts +6 -20
  278. package/lib/cjs/providers/storage/s3.js +5 -0
  279. package/lib/cjs/providers/storage/url.d.ts +6 -7
  280. package/lib/cjs/providers/storage/url.js +10 -0
  281. package/lib/cjs/providers/storage/util.d.ts +24 -1
  282. package/lib/cjs/providers/storage/util.js +18 -0
  283. package/lib/cjs/templates/Templates.d.ts +1 -0
  284. package/lib/cjs/translations/en.d.ts +5 -0
  285. package/lib/cjs/translations/en.js +6 -1
  286. package/lib/cjs/utils/ChoicesWrapper.d.ts +1 -1
  287. package/lib/cjs/utils/ChoicesWrapper.js +13 -2
  288. package/lib/cjs/utils/Evaluator.d.ts +6 -3
  289. package/lib/cjs/utils/Evaluator.js +11 -20
  290. package/lib/cjs/utils/builder.d.ts +9 -7
  291. package/lib/cjs/utils/builder.js +10 -5
  292. package/lib/cjs/utils/calendarUtils.d.ts +7 -13
  293. package/lib/cjs/utils/calendarUtils.js +10 -17
  294. package/lib/cjs/utils/conditionOperators/IsEmptyValue.js +4 -3
  295. package/lib/cjs/utils/conditionOperators/IsEqualTo.js +3 -3
  296. package/lib/cjs/utils/formUtils.d.ts +43 -171
  297. package/lib/cjs/utils/formUtils.js +38 -569
  298. package/lib/cjs/utils/utils.d.ts +367 -218
  299. package/lib/cjs/utils/utils.js +420 -252
  300. package/lib/cjs/widgets/CalendarWidget.d.ts +9 -10
  301. package/lib/cjs/widgets/CalendarWidget.js +11 -13
  302. package/lib/mjs/CDN.d.ts +1 -0
  303. package/lib/mjs/CDN.js +6 -3
  304. package/lib/mjs/Element.d.ts +87 -98
  305. package/lib/mjs/Element.js +76 -95
  306. package/lib/mjs/Embed.d.ts +1 -1
  307. package/lib/mjs/Embed.js +52 -12
  308. package/lib/mjs/Form.d.ts +365 -36
  309. package/lib/mjs/Form.js +140 -68
  310. package/lib/mjs/FormBuilder.d.ts +187 -2
  311. package/lib/mjs/FormBuilder.js +32 -8
  312. package/lib/mjs/Formio.js +12 -0
  313. package/lib/mjs/InlineEmbed.d.ts +7 -0
  314. package/lib/mjs/InlineEmbed.js +112 -0
  315. package/lib/mjs/PDF.d.ts +11 -13
  316. package/lib/mjs/PDF.js +7 -16
  317. package/lib/mjs/PDFBuilder.js +3 -3
  318. package/lib/mjs/Webform.d.ts +193 -140
  319. package/lib/mjs/Webform.js +353 -318
  320. package/lib/mjs/WebformBuilder.d.ts +18 -15
  321. package/lib/mjs/WebformBuilder.js +34 -27
  322. package/lib/mjs/Wizard.d.ts +31 -21
  323. package/lib/mjs/Wizard.js +43 -20
  324. package/lib/mjs/WizardBuilder.d.ts +1 -1
  325. package/lib/mjs/addons/FormioAddon.d.ts +0 -1
  326. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +8 -5
  327. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +6 -3
  328. package/lib/mjs/components/Components.d.ts +4 -4
  329. package/lib/mjs/components/Components.js +3 -3
  330. package/lib/mjs/components/_classes/component/Component.d.ts +516 -270
  331. package/lib/mjs/components/_classes/component/Component.form.d.ts +6 -3
  332. package/lib/mjs/components/_classes/component/Component.form.js +5 -0
  333. package/lib/mjs/components/_classes/component/Component.js +479 -247
  334. package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +1 -1
  335. package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +1 -1
  336. package/lib/mjs/components/_classes/component/editForm/utils.js +1 -1
  337. package/lib/mjs/components/_classes/component/fixtures/comp6.d.ts +77 -0
  338. package/lib/mjs/components/_classes/component/fixtures/comp6.js +57 -0
  339. package/lib/mjs/components/_classes/component/fixtures/comp7.d.ts +84 -0
  340. package/lib/mjs/components/_classes/component/fixtures/comp7.js +84 -0
  341. package/lib/mjs/components/_classes/component/fixtures/index.d.ts +3 -1
  342. package/lib/mjs/components/_classes/component/fixtures/index.js +3 -1
  343. package/lib/mjs/components/_classes/field/Field.d.ts +11 -2
  344. package/lib/mjs/components/_classes/field/Field.js +13 -1
  345. package/lib/mjs/components/_classes/input/Input.d.ts +4 -3
  346. package/lib/mjs/components/_classes/input/Input.js +31 -23
  347. package/lib/mjs/components/_classes/list/ListComponent.d.ts +2 -2
  348. package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +6 -3
  349. package/lib/mjs/components/_classes/list/ListComponent.form.js +5 -0
  350. package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +43 -12
  351. package/lib/mjs/components/_classes/multivalue/Multivalue.js +44 -3
  352. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +164 -68
  353. package/lib/mjs/components/_classes/nested/NestedComponent.form.d.ts +6 -3
  354. package/lib/mjs/components/_classes/nested/NestedComponent.form.js +5 -0
  355. package/lib/mjs/components/_classes/nested/NestedComponent.js +182 -62
  356. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +2 -2
  357. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
  358. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +7 -1
  359. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +2 -3
  360. package/lib/mjs/components/address/Address.d.ts +4 -2
  361. package/lib/mjs/components/address/Address.form.d.ts +6 -3
  362. package/lib/mjs/components/address/Address.form.js +5 -0
  363. package/lib/mjs/components/address/Address.js +4 -0
  364. package/lib/mjs/components/address/editForm/Address.edit.provider.js +1 -1
  365. package/lib/mjs/components/button/Button.d.ts +4 -13
  366. package/lib/mjs/components/button/Button.form.d.ts +6 -3
  367. package/lib/mjs/components/button/Button.form.js +5 -0
  368. package/lib/mjs/components/button/Button.js +12 -7
  369. package/lib/mjs/components/checkbox/Checkbox.d.ts +5 -28
  370. package/lib/mjs/components/checkbox/Checkbox.form.d.ts +6 -3
  371. package/lib/mjs/components/checkbox/Checkbox.form.js +5 -0
  372. package/lib/mjs/components/checkbox/Checkbox.js +1 -1
  373. package/lib/mjs/components/checkbox/fixtures/comp6.d.ts +32 -0
  374. package/lib/mjs/components/checkbox/fixtures/comp6.js +28 -0
  375. package/lib/mjs/components/checkbox/fixtures/index.d.ts +2 -1
  376. package/lib/mjs/components/checkbox/fixtures/index.js +2 -1
  377. package/lib/mjs/components/columns/Columns.d.ts +3 -2
  378. package/lib/mjs/components/columns/Columns.form.d.ts +6 -3
  379. package/lib/mjs/components/columns/Columns.form.js +5 -0
  380. package/lib/mjs/components/columns/Columns.js +3 -3
  381. package/lib/mjs/components/container/Container.form.d.ts +6 -3
  382. package/lib/mjs/components/container/Container.form.js +5 -0
  383. package/lib/mjs/components/content/Content.d.ts +2 -1
  384. package/lib/mjs/components/content/Content.form.d.ts +6 -3
  385. package/lib/mjs/components/content/Content.form.js +5 -0
  386. package/lib/mjs/components/currency/Currency.form.d.ts +6 -3
  387. package/lib/mjs/components/currency/Currency.form.js +5 -0
  388. package/lib/mjs/components/currency/Currency.js +1 -2
  389. package/lib/mjs/components/datagrid/DataGrid.d.ts +17 -7
  390. package/lib/mjs/components/datagrid/DataGrid.form.d.ts +6 -3
  391. package/lib/mjs/components/datagrid/DataGrid.form.js +5 -0
  392. package/lib/mjs/components/datagrid/DataGrid.js +55 -37
  393. package/lib/mjs/components/datagrid/fixtures/comp-with-checkboxes.d.ts +29 -0
  394. package/lib/mjs/components/datagrid/fixtures/comp-with-checkboxes.js +34 -0
  395. package/lib/mjs/components/datagrid/fixtures/comp-with-reorder.d.ts +100 -0
  396. package/lib/mjs/components/datagrid/fixtures/comp-with-reorder.js +137 -0
  397. package/lib/mjs/components/datagrid/fixtures/comp10.d.ts +81 -0
  398. package/lib/mjs/components/datagrid/fixtures/comp10.js +85 -0
  399. package/lib/mjs/components/datagrid/fixtures/comp9.d.ts +41 -0
  400. package/lib/mjs/components/datagrid/fixtures/comp9.js +42 -0
  401. package/lib/mjs/components/datagrid/fixtures/index.d.ts +5 -1
  402. package/lib/mjs/components/datagrid/fixtures/index.js +5 -1
  403. package/lib/mjs/components/datamap/DataMap.d.ts +1 -0
  404. package/lib/mjs/components/datamap/DataMap.form.d.ts +6 -3
  405. package/lib/mjs/components/datamap/DataMap.form.js +5 -0
  406. package/lib/mjs/components/datetime/DateTime.d.ts +0 -14
  407. package/lib/mjs/components/datetime/DateTime.form.d.ts +6 -3
  408. package/lib/mjs/components/datetime/DateTime.form.js +5 -0
  409. package/lib/mjs/components/datetime/editForm/DateTime.edit.date.js +1 -1
  410. package/lib/mjs/components/day/Day.d.ts +23 -49
  411. package/lib/mjs/components/day/Day.form.d.ts +6 -3
  412. package/lib/mjs/components/day/Day.form.js +5 -0
  413. package/lib/mjs/components/day/Day.js +16 -21
  414. package/lib/mjs/components/day/fixtures/comp7.d.ts +109 -0
  415. package/lib/mjs/components/day/fixtures/comp7.js +107 -0
  416. package/lib/mjs/components/day/fixtures/comp8.d.ts +41 -0
  417. package/lib/mjs/components/day/fixtures/comp8.js +38 -0
  418. package/lib/mjs/components/day/fixtures/index.d.ts +3 -1
  419. package/lib/mjs/components/day/fixtures/index.js +3 -1
  420. package/lib/mjs/components/editgrid/EditGrid.d.ts +8 -4
  421. package/lib/mjs/components/editgrid/EditGrid.form.d.ts +6 -3
  422. package/lib/mjs/components/editgrid/EditGrid.form.js +5 -0
  423. package/lib/mjs/components/editgrid/EditGrid.js +12 -25
  424. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -1
  425. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.js +1 -1
  426. package/lib/mjs/components/email/Email.form.d.ts +6 -3
  427. package/lib/mjs/components/email/Email.form.js +5 -0
  428. package/lib/mjs/components/fieldset/Fieldset.form.d.ts +6 -3
  429. package/lib/mjs/components/fieldset/Fieldset.form.js +5 -0
  430. package/lib/mjs/components/file/File.d.ts +9 -23
  431. package/lib/mjs/components/file/File.form.d.ts +6 -3
  432. package/lib/mjs/components/file/File.form.js +5 -0
  433. package/lib/mjs/components/file/File.js +3 -4
  434. package/lib/mjs/components/form/Form.d.ts +38 -20
  435. package/lib/mjs/components/form/Form.form.d.ts +6 -3
  436. package/lib/mjs/components/form/Form.form.js +5 -0
  437. package/lib/mjs/components/form/Form.js +31 -18
  438. package/lib/mjs/components/hidden/Hidden.d.ts +1 -11
  439. package/lib/mjs/components/hidden/Hidden.form.d.ts +6 -3
  440. package/lib/mjs/components/hidden/Hidden.form.js +5 -0
  441. package/lib/mjs/components/hidden/Hidden.js +1 -2
  442. package/lib/mjs/components/html/HTML.d.ts +2 -1
  443. package/lib/mjs/components/html/HTML.form.d.ts +6 -3
  444. package/lib/mjs/components/html/HTML.form.js +5 -0
  445. package/lib/mjs/components/number/Number.d.ts +3 -17
  446. package/lib/mjs/components/number/Number.form.d.ts +6 -3
  447. package/lib/mjs/components/number/Number.form.js +5 -0
  448. package/lib/mjs/components/number/Number.js +2 -3
  449. package/lib/mjs/components/number/fixtures/comp8.d.ts +32 -0
  450. package/lib/mjs/components/number/fixtures/comp8.js +26 -0
  451. package/lib/mjs/components/number/fixtures/index.d.ts +2 -1
  452. package/lib/mjs/components/number/fixtures/index.js +2 -1
  453. package/lib/mjs/components/panel/Panel.form.d.ts +6 -3
  454. package/lib/mjs/components/panel/Panel.form.js +5 -0
  455. package/lib/mjs/components/panel/Panel.js +0 -1
  456. package/lib/mjs/components/password/Password.form.d.ts +6 -3
  457. package/lib/mjs/components/password/Password.form.js +5 -0
  458. package/lib/mjs/components/phonenumber/PhoneNumber.form.d.ts +6 -3
  459. package/lib/mjs/components/phonenumber/PhoneNumber.form.js +5 -0
  460. package/lib/mjs/components/phonenumber/fixtures/comp2.d.ts +16 -0
  461. package/lib/mjs/components/phonenumber/fixtures/comp2.js +23 -0
  462. package/lib/mjs/components/phonenumber/fixtures/index.d.ts +2 -1
  463. package/lib/mjs/components/phonenumber/fixtures/index.js +2 -1
  464. package/lib/mjs/components/radio/Radio.d.ts +4 -27
  465. package/lib/mjs/components/radio/Radio.form.d.ts +6 -3
  466. package/lib/mjs/components/radio/Radio.form.js +5 -0
  467. package/lib/mjs/components/radio/Radio.js +11 -9
  468. package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +2 -9
  469. package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +6 -3
  470. package/lib/mjs/components/recaptcha/ReCaptcha.form.js +7 -2
  471. package/lib/mjs/components/recaptcha/ReCaptcha.js +1 -8
  472. package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +33 -2
  473. package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +13 -2
  474. package/lib/mjs/components/select/Select.d.ts +16 -39
  475. package/lib/mjs/components/select/Select.form.d.ts +6 -3
  476. package/lib/mjs/components/select/Select.form.js +5 -0
  477. package/lib/mjs/components/select/Select.js +24 -25
  478. package/lib/mjs/components/select/editForm/Select.edit.data.js +16 -2
  479. package/lib/mjs/components/select/fixtures/comp22.js +1 -1
  480. package/lib/mjs/components/select/fixtures/comp23.d.ts +58 -0
  481. package/lib/mjs/components/select/fixtures/comp23.js +47 -0
  482. package/lib/mjs/components/select/fixtures/comp24.d.ts +47 -0
  483. package/lib/mjs/components/select/fixtures/comp24.js +38 -0
  484. package/lib/mjs/components/select/fixtures/index.d.ts +3 -1
  485. package/lib/mjs/components/select/fixtures/index.js +3 -1
  486. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +2 -17
  487. package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +6 -3
  488. package/lib/mjs/components/selectboxes/SelectBoxes.form.js +5 -0
  489. package/lib/mjs/components/selectboxes/SelectBoxes.js +11 -10
  490. package/lib/mjs/components/signature/Signature.d.ts +0 -14
  491. package/lib/mjs/components/signature/Signature.form.d.ts +6 -3
  492. package/lib/mjs/components/signature/Signature.form.js +5 -0
  493. package/lib/mjs/components/signature/Signature.js +1 -1
  494. package/lib/mjs/components/survey/Survey.d.ts +3 -15
  495. package/lib/mjs/components/survey/Survey.form.d.ts +6 -3
  496. package/lib/mjs/components/survey/Survey.form.js +5 -0
  497. package/lib/mjs/components/table/Table.d.ts +3 -1
  498. package/lib/mjs/components/table/Table.form.d.ts +6 -3
  499. package/lib/mjs/components/table/Table.form.js +5 -0
  500. package/lib/mjs/components/table/Table.js +1 -1
  501. package/lib/mjs/components/tabs/Tabs.d.ts +4 -4
  502. package/lib/mjs/components/tabs/Tabs.form.d.ts +6 -3
  503. package/lib/mjs/components/tabs/Tabs.form.js +5 -0
  504. package/lib/mjs/components/tabs/Tabs.js +1 -2
  505. package/lib/mjs/components/tags/Tags.d.ts +0 -14
  506. package/lib/mjs/components/tags/Tags.form.d.ts +6 -3
  507. package/lib/mjs/components/tags/Tags.form.js +5 -0
  508. package/lib/mjs/components/tags/Tags.js +2 -4
  509. package/lib/mjs/components/textarea/TextArea.d.ts +4 -9
  510. package/lib/mjs/components/textarea/TextArea.form.d.ts +6 -3
  511. package/lib/mjs/components/textarea/TextArea.form.js +5 -0
  512. package/lib/mjs/components/textarea/TextArea.js +2 -2
  513. package/lib/mjs/components/textfield/TextField.d.ts +14 -30
  514. package/lib/mjs/components/textfield/TextField.form.d.ts +6 -3
  515. package/lib/mjs/components/textfield/TextField.form.js +5 -0
  516. package/lib/mjs/components/textfield/TextField.js +16 -17
  517. package/lib/mjs/components/time/Time.form.d.ts +6 -3
  518. package/lib/mjs/components/time/Time.form.js +5 -0
  519. package/lib/mjs/components/unknown/Unknown.form.d.ts +5 -34
  520. package/lib/mjs/components/unknown/Unknown.form.js +4 -0
  521. package/lib/mjs/components/url/Url.form.d.ts +6 -3
  522. package/lib/mjs/components/url/Url.form.js +5 -0
  523. package/lib/mjs/components/well/Well.form.d.ts +6 -3
  524. package/lib/mjs/components/well/Well.form.js +5 -0
  525. package/lib/mjs/formio.embed.d.ts +1 -2
  526. package/lib/mjs/formio.embed.js +2 -99
  527. package/lib/mjs/formio.form.d.ts +11 -4
  528. package/lib/mjs/formio.form.js +10 -3
  529. package/lib/mjs/providers/Providers.d.ts +36 -5
  530. package/lib/mjs/providers/Providers.js +29 -0
  531. package/lib/mjs/providers/address/AddressProvider.d.ts +131 -12
  532. package/lib/mjs/providers/address/AddressProvider.js +88 -2
  533. package/lib/mjs/providers/address/AzureAddressProvider.d.ts +48 -1
  534. package/lib/mjs/providers/address/AzureAddressProvider.js +37 -0
  535. package/lib/mjs/providers/address/CustomAddressProvider.d.ts +27 -4
  536. package/lib/mjs/providers/address/CustomAddressProvider.js +34 -0
  537. package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +135 -6
  538. package/lib/mjs/providers/address/GoogleAddressProvider.js +94 -1
  539. package/lib/mjs/providers/address/NominatimAddressProvider.d.ts +32 -7
  540. package/lib/mjs/providers/address/NominatimAddressProvider.js +33 -0
  541. package/lib/mjs/providers/address/index.d.ts +3 -1
  542. package/lib/mjs/providers/processor/fileProcessor.d.ts +7 -1
  543. package/lib/mjs/providers/processor/fileProcessor.js +6 -0
  544. package/lib/mjs/providers/storage/azure.d.ts +6 -13
  545. package/lib/mjs/providers/storage/azure.js +5 -0
  546. package/lib/mjs/providers/storage/base64.d.ts +5 -6
  547. package/lib/mjs/providers/storage/base64.js +4 -0
  548. package/lib/mjs/providers/storage/dropbox.d.ts +6 -4
  549. package/lib/mjs/providers/storage/dropbox.js +5 -0
  550. package/lib/mjs/providers/storage/googleDrive.d.ts +7 -5
  551. package/lib/mjs/providers/storage/googleDrive.js +6 -0
  552. package/lib/mjs/providers/storage/indexeddb.d.ts +5 -7
  553. package/lib/mjs/providers/storage/indexeddb.js +4 -0
  554. package/lib/mjs/providers/storage/s3.d.ts +6 -20
  555. package/lib/mjs/providers/storage/s3.js +5 -0
  556. package/lib/mjs/providers/storage/url.d.ts +6 -7
  557. package/lib/mjs/providers/storage/url.js +10 -0
  558. package/lib/mjs/providers/storage/util.d.ts +24 -1
  559. package/lib/mjs/providers/storage/util.js +18 -0
  560. package/lib/mjs/templates/Templates.d.ts +1 -0
  561. package/lib/mjs/translations/en.d.ts +5 -0
  562. package/lib/mjs/translations/en.js +6 -1
  563. package/lib/mjs/utils/ChoicesWrapper.d.ts +1 -1
  564. package/lib/mjs/utils/ChoicesWrapper.js +13 -2
  565. package/lib/mjs/utils/Evaluator.d.ts +6 -3
  566. package/lib/mjs/utils/Evaluator.js +9 -20
  567. package/lib/mjs/utils/builder.d.ts +9 -7
  568. package/lib/mjs/utils/builder.js +10 -5
  569. package/lib/mjs/utils/calendarUtils.d.ts +7 -13
  570. package/lib/mjs/utils/calendarUtils.js +10 -17
  571. package/lib/mjs/utils/conditionOperators/IsEmptyValue.js +3 -3
  572. package/lib/mjs/utils/conditionOperators/IsEqualTo.js +1 -1
  573. package/lib/mjs/utils/formUtils.d.ts +43 -171
  574. package/lib/mjs/utils/formUtils.js +6 -554
  575. package/lib/mjs/utils/utils.d.ts +367 -218
  576. package/lib/mjs/utils/utils.js +409 -233
  577. package/lib/mjs/widgets/CalendarWidget.d.ts +9 -10
  578. package/lib/mjs/widgets/CalendarWidget.js +11 -13
  579. package/package.json +22 -23
  580. package/sdk.d.ts +1 -0
  581. package/utils.d.ts +1 -0
@@ -1,17 +1,136 @@
1
+ /**
2
+ * @typedef {object} RequestOptions
3
+ * @property {object} params - The request parameters.
4
+ * @property {boolean} noToken - Whether to include a token in the request.
5
+ */
6
+ /**
7
+ * @typedef {object} Address
8
+ * @property {string} street - The street address.
9
+ * @property {string} city - The city.
10
+ * @property {string} state - The state.
11
+ * @property {string} country - The country.
12
+ * @property {string} postalCode - The postal code.
13
+ */
14
+ /**
15
+ * @class AddressProvider
16
+ * @classdesc Represents an address provider.
17
+ */
1
18
  export class AddressProvider {
19
+ /**
20
+ * @static
21
+ * @type {string}
22
+ * @description The name of the address provider.
23
+ */
2
24
  static get name(): string;
25
+ /**
26
+ * @static
27
+ * @type {string}
28
+ * @description The display name of the address provider.
29
+ */
3
30
  static get displayName(): string;
4
- constructor(options?: {});
31
+ /**
32
+ * @class
33
+ * @param {object} options - The options for the address provider.
34
+ */
35
+ constructor(options?: object);
5
36
  options: any;
6
- beforeMergeOptions(): void;
7
- get defaultOptions(): {};
8
- get queryProperty(): string;
9
- get responseProperty(): null;
10
- get displayValueProperty(): null;
11
- serialize(params: any): any;
12
- getRequestOptions(options?: {}): any;
13
- getRequestUrl(options?: {}): void;
14
- makeRequest(options?: {}): any;
15
- search(query: any, options?: {}): any;
16
- getDisplayValue(address: any): any;
37
+ /**
38
+ * @private
39
+ * @description Executes before merging the options.
40
+ */
41
+ private beforeMergeOptions;
42
+ /**
43
+ * @private
44
+ * @type {object}
45
+ * @description The default options for the address provider.
46
+ */
47
+ private get defaultOptions();
48
+ /**
49
+ * @private
50
+ * @type {string}
51
+ * @description The query property name.
52
+ */
53
+ private get queryProperty();
54
+ /**
55
+ * @private
56
+ * @type {string|null}
57
+ * @description The response property name.
58
+ */
59
+ private get responseProperty();
60
+ /**
61
+ * @private
62
+ * @type {string|null}
63
+ * @description The display value property name.
64
+ */
65
+ private get displayValueProperty();
66
+ /**
67
+ * @private
68
+ * @param {object} params - The parameters to serialize.
69
+ * @returns {string} The serialized parameters.
70
+ */
71
+ private serialize;
72
+ /**
73
+ * @private
74
+ * @param {object} options - The request options.
75
+ * @returns {RequestOptions} The merged request options.
76
+ */
77
+ private getRequestOptions;
78
+ /**
79
+ * @private
80
+ * @param {object} _options - The request options.
81
+ * @throws {Error} Throws an error if the method is not implemented.
82
+ */
83
+ private getRequestUrl;
84
+ /**
85
+ * @private
86
+ * @param {object} options - The request options.
87
+ * @returns {Promise} A promise that resolves with the request result.
88
+ */
89
+ private makeRequest;
90
+ /**
91
+ * @public
92
+ * @description The search parameters for the request.
93
+ * @param {string} query - The search query.
94
+ * @param {object} options - The search options.
95
+ * @returns {Promise<Address[]>} A promise that resolves with the search results.
96
+ */
97
+ public search(query: string, options?: object): Promise<Address[]>;
98
+ /**
99
+ * @public
100
+ * @param {Address} address - The address object.
101
+ * @returns {string} The display value of the address.
102
+ */
103
+ public getDisplayValue(address: Address): string;
17
104
  }
105
+ export type RequestOptions = {
106
+ /**
107
+ * - The request parameters.
108
+ */
109
+ params: object;
110
+ /**
111
+ * - Whether to include a token in the request.
112
+ */
113
+ noToken: boolean;
114
+ };
115
+ export type Address = {
116
+ /**
117
+ * - The street address.
118
+ */
119
+ street: string;
120
+ /**
121
+ * - The city.
122
+ */
123
+ city: string;
124
+ /**
125
+ * - The state.
126
+ */
127
+ state: string;
128
+ /**
129
+ * - The country.
130
+ */
131
+ country: string;
132
+ /**
133
+ * - The postal code.
134
+ */
135
+ postalCode: string;
136
+ };
@@ -6,47 +6,128 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AddressProvider = void 0;
7
7
  const lodash_1 = __importDefault(require("lodash"));
8
8
  const Formio_1 = require("../../Formio");
9
+ /**
10
+ * @typedef {object} RequestOptions
11
+ * @property {object} params - The request parameters.
12
+ * @property {boolean} noToken - Whether to include a token in the request.
13
+ */
14
+ /**
15
+ * @typedef {object} Address
16
+ * @property {string} street - The street address.
17
+ * @property {string} city - The city.
18
+ * @property {string} state - The state.
19
+ * @property {string} country - The country.
20
+ * @property {string} postalCode - The postal code.
21
+ */
22
+ /**
23
+ * @class AddressProvider
24
+ * @classdesc Represents an address provider.
25
+ */
9
26
  class AddressProvider {
27
+ /**
28
+ * @static
29
+ * @type {string}
30
+ * @description The name of the address provider.
31
+ */
10
32
  static get name() {
11
33
  return 'address';
12
34
  }
35
+ /**
36
+ * @static
37
+ * @type {string}
38
+ * @description The display name of the address provider.
39
+ */
13
40
  static get displayName() {
14
41
  return 'Address';
15
42
  }
43
+ /**
44
+ * @class
45
+ * @param {object} options - The options for the address provider.
46
+ */
16
47
  constructor(options = {}) {
17
48
  this.beforeMergeOptions(options);
18
49
  this.options = lodash_1.default.merge({}, this.defaultOptions, options);
19
50
  }
51
+ /**
52
+ * @private
53
+ * @description Executes before merging the options.
54
+ */
20
55
  beforeMergeOptions() {
21
56
  return;
22
57
  }
58
+ /**
59
+ * @private
60
+ * @type {object}
61
+ * @description The default options for the address provider.
62
+ */
23
63
  get defaultOptions() {
24
64
  return {};
25
65
  }
66
+ /**
67
+ * @private
68
+ * @type {string}
69
+ * @description The query property name.
70
+ */
26
71
  get queryProperty() {
27
72
  return 'query';
28
73
  }
74
+ /**
75
+ * @private
76
+ * @type {string|null}
77
+ * @description The response property name.
78
+ */
29
79
  get responseProperty() {
30
80
  return null;
31
81
  }
82
+ /**
83
+ * @private
84
+ * @type {string|null}
85
+ * @description The display value property name.
86
+ */
32
87
  get displayValueProperty() {
33
88
  return null;
34
89
  }
90
+ /**
91
+ * @private
92
+ * @param {object} params - The parameters to serialize.
93
+ * @returns {string} The serialized parameters.
94
+ */
35
95
  serialize(params) {
36
96
  return lodash_1.default.toPairs(params).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join('&');
37
97
  }
98
+ /**
99
+ * @private
100
+ * @param {object} options - The request options.
101
+ * @returns {RequestOptions} The merged request options.
102
+ */
38
103
  getRequestOptions(options = {}) {
39
104
  return lodash_1.default.merge({}, this.options, options);
40
105
  }
41
- // eslint-disable-next-line no-unused-vars
42
- getRequestUrl(options = {}) {
106
+ /**
107
+ * @private
108
+ * @param {object} _options - The request options.
109
+ * @throws {Error} Throws an error if the method is not implemented.
110
+ */
111
+ getRequestUrl(_options = {}) {
43
112
  throw new Error('Method AddressProvider#getRequestUrl(options) is abstract.');
44
113
  }
114
+ /**
115
+ * @private
116
+ * @param {object} options - The request options.
117
+ * @returns {Promise} A promise that resolves with the request result.
118
+ */
45
119
  makeRequest(options = {}) {
46
120
  return Formio_1.Formio.makeStaticRequest(this.getRequestUrl(options), 'GET', null, {
47
121
  noToken: true,
48
122
  });
49
123
  }
124
+ /**
125
+ * @public
126
+ * @description The search parameters for the request.
127
+ * @param {string} query - The search query.
128
+ * @param {object} options - The search options.
129
+ * @returns {Promise<Address[]>} A promise that resolves with the search results.
130
+ */
50
131
  search(query, options = {}) {
51
132
  const requestOptions = this.getRequestOptions(options);
52
133
  const params = requestOptions.params = requestOptions.params || {};
@@ -54,6 +135,11 @@ class AddressProvider {
54
135
  return this.makeRequest(requestOptions)
55
136
  .then((result) => this.responseProperty ? lodash_1.default.get(result, this.responseProperty, []) : result);
56
137
  }
138
+ /**
139
+ * @public
140
+ * @param {Address} address - The address object.
141
+ * @returns {string} The display value of the address.
142
+ */
57
143
  getDisplayValue(address) {
58
144
  return this.displayValueProperty ? lodash_1.default.get(address, this.displayValueProperty, '') : String(address);
59
145
  }
@@ -1,12 +1,59 @@
1
+ /**
2
+ * @typedef {object} AzureAddressProviderOptionsParams
3
+ * @property {string} 'api-version' - The version of the Azure Maps API.
4
+ * @property {string} typeahead - Whether to enable typeahead in the search.
5
+ * @typedef {object} AzureAddressProviderOptions
6
+ * @property {AzureAddressProviderOptionsParams} params - The parameters for the Azure Maps API request.
7
+ */
8
+ /**
9
+ * @class
10
+ * @augments AddressProvider
11
+ * @classdesc Represents an Azure Maps address provider.
12
+ */
1
13
  export class AzureAddressProvider extends AddressProvider {
14
+ /**
15
+ * Gets the default options for the address provider.
16
+ * @returns {{ params: { 'api-version': string, typeahead: string } }} The default options.
17
+ */
2
18
  get defaultOptions(): {
3
19
  params: {
4
20
  'api-version': string;
5
21
  typeahead: string;
6
22
  };
7
23
  };
24
+ /**
25
+ * Gets the response property for the address provider.
26
+ * @type {string}
27
+ */
8
28
  get responseProperty(): string;
29
+ /**
30
+ * Gets the display value property for the address provider.
31
+ * @type {string}
32
+ */
9
33
  get displayValueProperty(): string;
10
- getRequestUrl(options?: {}): string;
34
+ /**
35
+ * Gets the request URL for the address provider.
36
+ * @param {{params: any}} options - The request options.
37
+ * @returns {string} The request URL.
38
+ */
39
+ getRequestUrl(options?: {
40
+ params: any;
41
+ }): string;
11
42
  }
43
+ export type AzureAddressProviderOptionsParams = {
44
+ /**
45
+ * 'api-version' - The version of the Azure Maps API.
46
+ */
47
+ "": string;
48
+ /**
49
+ * - Whether to enable typeahead in the search.
50
+ */
51
+ typeahead: string;
52
+ };
53
+ export type AzureAddressProviderOptions = {
54
+ /**
55
+ * - The parameters for the Azure Maps API request.
56
+ */
57
+ params: AzureAddressProviderOptionsParams;
58
+ };
12
59
  import { AddressProvider } from './AddressProvider';
@@ -2,13 +2,37 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AzureAddressProvider = void 0;
4
4
  const AddressProvider_1 = require("./AddressProvider");
5
+ /**
6
+ * @typedef {object} AzureAddressProviderOptionsParams
7
+ * @property {string} 'api-version' - The version of the Azure Maps API.
8
+ * @property {string} typeahead - Whether to enable typeahead in the search.
9
+ * @typedef {object} AzureAddressProviderOptions
10
+ * @property {AzureAddressProviderOptionsParams} params - The parameters for the Azure Maps API request.
11
+ */
12
+ /**
13
+ * @class
14
+ * @augments AddressProvider
15
+ * @classdesc Represents an Azure Maps address provider.
16
+ */
5
17
  class AzureAddressProvider extends AddressProvider_1.AddressProvider {
18
+ /**
19
+ * Gets the name of the address provider.
20
+ * @type {string}
21
+ */
6
22
  static get name() {
7
23
  return 'azure';
8
24
  }
25
+ /**
26
+ * Gets the display name of the address provider.
27
+ * @type {string}
28
+ */
9
29
  static get displayName() {
10
30
  return 'Azure Maps';
11
31
  }
32
+ /**
33
+ * Gets the default options for the address provider.
34
+ * @returns {{ params: { 'api-version': string, typeahead: string } }} The default options.
35
+ */
12
36
  get defaultOptions() {
13
37
  return {
14
38
  params: {
@@ -17,12 +41,25 @@ class AzureAddressProvider extends AddressProvider_1.AddressProvider {
17
41
  },
18
42
  };
19
43
  }
44
+ /**
45
+ * Gets the response property for the address provider.
46
+ * @type {string}
47
+ */
20
48
  get responseProperty() {
21
49
  return 'results';
22
50
  }
51
+ /**
52
+ * Gets the display value property for the address provider.
53
+ * @type {string}
54
+ */
23
55
  get displayValueProperty() {
24
56
  return 'address.freeformAddress';
25
57
  }
58
+ /**
59
+ * Gets the request URL for the address provider.
60
+ * @param {{params: any}} options - The request options.
61
+ * @returns {string} The request URL.
62
+ */
26
63
  getRequestUrl(options = {}) {
27
64
  const { params } = options;
28
65
  return `https://atlas.microsoft.com/search/address/json?${this.serialize(params)}`;
@@ -1,7 +1,30 @@
1
+ /**
2
+ * CustomAddressProvider class extends the AddressProvider class and provides custom functionality for address handling.
3
+ * @augments AddressProvider
4
+ */
1
5
  export class CustomAddressProvider extends AddressProvider {
2
- get queryProperty(): any;
3
- get responseProperty(): any;
4
- get displayValueProperty(): any;
5
- getRequestUrl(options?: {}): string;
6
+ /**
7
+ * Returns the response property of the custom address provider.
8
+ * If not provided, falls back to the response property of the parent class.
9
+ * @type {string}
10
+ */
11
+ get responseProperty(): string;
12
+ /**
13
+ * Returns the display value property of the custom address provider.
14
+ * If not provided, falls back to the display value property of the parent class.
15
+ * @type {string}
16
+ */
17
+ get displayValueProperty(): string;
18
+ /**
19
+ * Returns the request URL for the custom address provider.
20
+ * @param {object} options - The options for the request.
21
+ * @param {object} options.params - The parameters for the request.
22
+ * @param {string} options.url - The URL for the request.
23
+ * @returns {string} The request URL.
24
+ */
25
+ getRequestUrl(options?: {
26
+ params: object;
27
+ url: string;
28
+ }): string;
6
29
  }
7
30
  import { AddressProvider } from './AddressProvider';
@@ -2,22 +2,56 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CustomAddressProvider = void 0;
4
4
  const AddressProvider_1 = require("./AddressProvider");
5
+ /**
6
+ * CustomAddressProvider class extends the AddressProvider class and provides custom functionality for address handling.
7
+ * @augments AddressProvider
8
+ */
5
9
  class CustomAddressProvider extends AddressProvider_1.AddressProvider {
10
+ /**
11
+ * Returns the name of the custom address provider.
12
+ * @type {string}
13
+ */
6
14
  static get name() {
7
15
  return 'custom';
8
16
  }
17
+ /**
18
+ * Returns the display name of the custom address provider.
19
+ * @type {string}
20
+ */
9
21
  static get displayName() {
10
22
  return 'Custom';
11
23
  }
24
+ /**
25
+ * Returns the query property of the custom address provider.
26
+ * If not provided, falls back to the query property of the parent class.
27
+ * @type {string}
28
+ */
12
29
  get queryProperty() {
13
30
  return this.options.queryProperty || super.queryProperty;
14
31
  }
32
+ /**
33
+ * Returns the response property of the custom address provider.
34
+ * If not provided, falls back to the response property of the parent class.
35
+ * @type {string}
36
+ */
15
37
  get responseProperty() {
16
38
  return this.options.responseProperty || super.responseProperty;
17
39
  }
40
+ /**
41
+ * Returns the display value property of the custom address provider.
42
+ * If not provided, falls back to the display value property of the parent class.
43
+ * @type {string}
44
+ */
18
45
  get displayValueProperty() {
19
46
  return this.options.displayValueProperty || super.displayValueProperty;
20
47
  }
48
+ /**
49
+ * Returns the request URL for the custom address provider.
50
+ * @param {object} options - The options for the request.
51
+ * @param {object} options.params - The parameters for the request.
52
+ * @param {string} options.url - The URL for the request.
53
+ * @returns {string} The request URL.
54
+ */
21
55
  getRequestUrl(options = {}) {
22
56
  const { params, url } = options;
23
57
  return `${url}?${this.serialize(params)}`;
@@ -1,18 +1,147 @@
1
+ /**
2
+ * @typedef {object} AutocompleteOptions
3
+ * @property {string[]} fields - The fields to include in the autocomplete response.
4
+ * @property {object} componentRestrictions - The component restrictions for the autocomplete response.
5
+ * @property {string[]} componentRestrictions.country - The country codes to restrict the autocomplete response to.
6
+ */
7
+ /**
8
+ * @typedef {object} ProviderOptions
9
+ * @property {string} region - The region to restrict the autocomplete response to.
10
+ * @property {string} key - The API key for Google Maps.
11
+ * @property {AutocompleteOptions} autocompleteOptions - The options for the autocomplete functionality.
12
+ */
13
+ /**
14
+ * @typedef {object} Place
15
+ * @property {object} address_components - The address components of the place.
16
+ * @property {string} formatted_address - The formatted address of the place.
17
+ * @property {object} geometry - The geometry information of the place.
18
+ * @property {string} place_id - The place ID of the place.
19
+ * @property {object} plus_code - The plus code of the place.
20
+ * @property {string[]} types - The types of the place.
21
+ * @property {string} formattedPlace - The formatted place value.
22
+ */
23
+ /**
24
+ * @class GoogleAddressProvider
25
+ * @augments AddressProvider
26
+ */
1
27
  export class GoogleAddressProvider extends AddressProvider {
28
+ /**
29
+
30
+ * @param {ProviderOptions} options - The options for the provider.
31
+ */
32
+ constructor(options?: ProviderOptions);
33
+ /**
34
+ * get display value property
35
+ * @returns {string} The property to use for display value.
36
+ */
2
37
  get displayValueProperty(): string;
38
+ /**
39
+ * @returns {string} The alternative property to use for display value.
40
+ */
3
41
  get alternativeDisplayValueProperty(): string;
4
- set autocompleteOptions(options: any);
5
- get autocompleteOptions(): any;
6
- _autocompleteOptions: any;
42
+ /**
43
+ * @param {AutocompleteOptions} options - The autocomplete options.
44
+ */
45
+ set autocompleteOptions(options: AutocompleteOptions);
46
+ /**
47
+ * @returns {AutocompleteOptions} The autocomplete options.
48
+ */
49
+ get autocompleteOptions(): AutocompleteOptions;
50
+ _autocompleteOptions: AutocompleteOptions | undefined;
51
+ /**
52
+ * Sets the autocomplete options based on the provider options.
53
+
54
+ */
7
55
  setAutocompleteOptions(): void;
8
- beforeMergeOptions(options: any): void;
56
+ /**
57
+
58
+ * Converts the region to autocomplete option if it exists.
59
+ * @param {ProviderOptions} options - The provider options.
60
+ */
61
+ beforeMergeOptions(options: ProviderOptions): void;
62
+ /**
63
+ * @returns {string} The name of the library.
64
+ */
9
65
  getLibraryName(): string;
10
- convertRegionToAutocompleteOption(options: any): void;
66
+ /**
67
+ * Converts the region to autocomplete option.
68
+ * @param {ProviderOptions} options - The provider options.
69
+ */
70
+ convertRegionToAutocompleteOption(options: ProviderOptions): void;
71
+ /**
72
+ * @returns {string[]} The required address properties.
73
+ */
11
74
  getRequiredAddressProperties(): string[];
12
- addRequiredProviderOptions(options: any): void;
75
+ /**
76
+ * Adds the required provider options to the options.
77
+ * @param {AutocompleteOptions} options - The autocomplete options.
78
+ */
79
+ addRequiredProviderOptions(options: AutocompleteOptions): void;
13
80
  filterPlace(place: any): {};
14
81
  attachAutocomplete(elem: any, index: any, onSelectAddress: any): void;
15
82
  search(): Promise<void>;
16
83
  makeRequest(): Promise<void>;
84
+ getDisplayValue(address: any): any;
85
+ /**
86
+ * Tries to remove the library if api key for loaded script is different.
87
+ * @param {ProviderOptions} options - The options for the provider.
88
+ */
89
+ tryRemoveLibrary(options?: ProviderOptions): void;
17
90
  }
91
+ export type AutocompleteOptions = {
92
+ /**
93
+ * - The fields to include in the autocomplete response.
94
+ */
95
+ fields: string[];
96
+ /**
97
+ * - The component restrictions for the autocomplete response.
98
+ */
99
+ componentRestrictions: {
100
+ country: string[];
101
+ };
102
+ };
103
+ export type ProviderOptions = {
104
+ /**
105
+ * - The region to restrict the autocomplete response to.
106
+ */
107
+ region: string;
108
+ /**
109
+ * - The API key for Google Maps.
110
+ */
111
+ key: string;
112
+ /**
113
+ * - The options for the autocomplete functionality.
114
+ */
115
+ autocompleteOptions: AutocompleteOptions;
116
+ };
117
+ export type Place = {
118
+ /**
119
+ * - The address components of the place.
120
+ */
121
+ address_components: object;
122
+ /**
123
+ * - The formatted address of the place.
124
+ */
125
+ formatted_address: string;
126
+ /**
127
+ * - The geometry information of the place.
128
+ */
129
+ geometry: object;
130
+ /**
131
+ * - The place ID of the place.
132
+ */
133
+ place_id: string;
134
+ /**
135
+ * - The plus code of the place.
136
+ */
137
+ plus_code: object;
138
+ /**
139
+ * - The types of the place.
140
+ */
141
+ types: string[];
142
+ /**
143
+ * - The formatted place value.
144
+ */
145
+ formattedPlace: string;
146
+ };
18
147
  import { AddressProvider } from './AddressProvider';