@formio/js 5.0.0-rc.26 → 5.0.0-rc.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (360) hide show
  1. package/dist/fonts/bootstrap-icons.woff +0 -0
  2. package/dist/fonts/bootstrap-icons.woff2 +0 -0
  3. package/dist/formio.embed.js +1 -1
  4. package/dist/formio.embed.min.js +1 -1
  5. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  6. package/dist/formio.form.js +710 -689
  7. package/dist/formio.form.min.js +1 -1
  8. package/dist/formio.form.min.js.LICENSE.txt +2 -2
  9. package/dist/formio.full.css +100 -3
  10. package/dist/formio.full.js +715 -727
  11. package/dist/formio.full.min.css +2 -2
  12. package/dist/formio.full.min.js +1 -1
  13. package/dist/formio.full.min.js.LICENSE.txt +2 -2
  14. package/dist/formio.js +659 -264
  15. package/dist/formio.min.js +1 -1
  16. package/dist/formio.min.js.LICENSE.txt +2 -2
  17. package/dist/formio.utils.js +29 -8
  18. package/dist/formio.utils.min.js +1 -1
  19. package/dist/formio.utils.min.js.LICENSE.txt +2 -2
  20. package/lib/cjs/Embed.d.ts +2 -1
  21. package/lib/cjs/Embed.js +20 -7
  22. package/lib/cjs/PDF.js +2 -2
  23. package/lib/cjs/Webform.d.ts +3 -5
  24. package/lib/cjs/Webform.js +59 -81
  25. package/lib/cjs/WebformBuilder.d.ts +1 -1
  26. package/lib/cjs/WebformBuilder.js +27 -10
  27. package/lib/cjs/Wizard.d.ts +2 -0
  28. package/lib/cjs/Wizard.js +37 -26
  29. package/lib/cjs/WizardBuilder.d.ts +1 -0
  30. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +1 -2
  31. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +11 -12
  32. package/lib/cjs/addons/index.d.ts +1 -0
  33. package/lib/cjs/addons/index.js +5 -1
  34. package/lib/cjs/components/Components.d.ts +7 -0
  35. package/lib/cjs/components/Components.js +30 -0
  36. package/lib/cjs/components/_classes/component/Component.d.ts +57 -27
  37. package/lib/cjs/components/_classes/component/Component.js +193 -119
  38. package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.d.ts +8 -0
  39. package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.js +31 -1
  40. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +28 -11
  41. package/lib/cjs/components/_classes/nested/NestedComponent.js +88 -57
  42. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +4 -3
  43. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +17 -4
  44. package/lib/cjs/components/builder.js +0 -2
  45. package/lib/cjs/components/button/Button.js +2 -1
  46. package/lib/cjs/components/columns/Columns.d.ts +1 -0
  47. package/lib/cjs/components/columns/Columns.js +2 -3
  48. package/lib/cjs/components/columns/editForm/Columns.edit.display.d.ts +30 -1
  49. package/lib/cjs/components/columns/editForm/Columns.edit.display.js +23 -1
  50. package/lib/cjs/components/container/Container.d.ts +1 -0
  51. package/lib/cjs/components/container/Container.js +2 -6
  52. package/lib/cjs/components/content/Content.d.ts +1 -0
  53. package/lib/cjs/components/content/Content.js +1 -0
  54. package/lib/cjs/components/datagrid/DataGrid.d.ts +0 -8
  55. package/lib/cjs/components/datagrid/DataGrid.js +9 -26
  56. package/lib/cjs/components/datamap/DataMap.js +2 -1
  57. package/lib/cjs/components/datetime/DateTime.js +0 -2
  58. package/lib/cjs/components/day/Day.js +2 -3
  59. package/lib/cjs/components/editgrid/EditGrid.d.ts +8 -4
  60. package/lib/cjs/components/editgrid/EditGrid.js +96 -73
  61. package/lib/cjs/components/email/Email.js +0 -1
  62. package/lib/cjs/components/file/File.js +1 -1
  63. package/lib/cjs/components/file/fixtures/comp3.d.ts +29 -0
  64. package/lib/cjs/components/file/fixtures/comp3.js +31 -0
  65. package/lib/cjs/components/form/Form.d.ts +2 -6
  66. package/lib/cjs/components/form/Form.js +43 -14
  67. package/lib/cjs/components/index.d.ts +0 -2
  68. package/lib/cjs/components/index.js +0 -2
  69. package/lib/cjs/components/number/Number.d.ts +1 -2
  70. package/lib/cjs/components/number/Number.js +5 -6
  71. package/lib/cjs/components/panel/Panel.d.ts +0 -1
  72. package/lib/cjs/components/panel/Panel.js +2 -9
  73. package/lib/cjs/components/panel/editForm/Panel.edit.display.d.ts +6 -38
  74. package/lib/cjs/components/panel/editForm/Panel.edit.display.js +3 -16
  75. package/lib/cjs/components/phonenumber/PhoneNumber.js +17 -0
  76. package/lib/cjs/components/radio/Radio.js +0 -2
  77. package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +1 -1
  78. package/lib/cjs/components/recaptcha/ReCaptcha.js +2 -2
  79. package/lib/cjs/components/select/Select.js +3 -2
  80. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +1 -2
  81. package/lib/cjs/components/selectboxes/SelectBoxes.js +7 -6
  82. package/lib/cjs/components/table/editForm/Table.edit.display.d.ts +31 -2
  83. package/lib/cjs/components/table/editForm/Table.edit.display.js +22 -0
  84. package/lib/cjs/components/tabs/editForm/Tabs.edit.display.d.ts +30 -2
  85. package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +22 -0
  86. package/lib/cjs/components/textfield/TextField.js +20 -6
  87. package/lib/cjs/components/time/Time.js +0 -6
  88. package/lib/cjs/components/url/Url.js +0 -1
  89. package/lib/cjs/components/well/editForm/Well.edit.display.d.ts +25 -2
  90. package/lib/cjs/components/well/editForm/Well.edit.display.js +18 -0
  91. package/lib/cjs/formio.embed.js +5 -3
  92. package/lib/cjs/formio.form.d.ts +1 -7
  93. package/lib/cjs/formio.form.js +2 -38
  94. package/lib/cjs/index.d.ts +2 -1
  95. package/lib/cjs/index.js +2 -1
  96. package/lib/cjs/providers/Providers.d.ts +0 -4
  97. package/lib/cjs/providers/storage/azure.d.ts +0 -2
  98. package/lib/cjs/providers/storage/azure.js +1 -6
  99. package/lib/cjs/providers/storage/googleDrive.d.ts +0 -1
  100. package/lib/cjs/providers/storage/googleDrive.js +0 -4
  101. package/lib/cjs/providers/storage/s3.d.ts +0 -1
  102. package/lib/cjs/providers/storage/s3.js +0 -4
  103. package/lib/cjs/translations/en.d.ts +5 -0
  104. package/lib/cjs/translations/en.js +5 -0
  105. package/lib/cjs/utils/formUtils.js +1 -0
  106. package/lib/cjs/utils/utils.d.ts +2 -1
  107. package/lib/cjs/utils/utils.js +27 -9
  108. package/lib/mjs/Embed.d.ts +2 -1
  109. package/lib/mjs/Embed.js +20 -7
  110. package/lib/mjs/PDF.js +2 -2
  111. package/lib/mjs/Webform.d.ts +3 -5
  112. package/lib/mjs/Webform.js +58 -82
  113. package/lib/mjs/WebformBuilder.d.ts +1 -1
  114. package/lib/mjs/WebformBuilder.js +28 -7
  115. package/lib/mjs/Wizard.d.ts +2 -0
  116. package/lib/mjs/Wizard.js +36 -27
  117. package/lib/mjs/WizardBuilder.d.ts +1 -0
  118. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +1 -2
  119. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +11 -12
  120. package/lib/mjs/addons/index.d.ts +1 -0
  121. package/lib/mjs/addons/index.js +5 -1
  122. package/lib/mjs/components/Components.d.ts +7 -0
  123. package/lib/mjs/components/Components.js +29 -0
  124. package/lib/mjs/components/_classes/component/Component.d.ts +57 -27
  125. package/lib/mjs/components/_classes/component/Component.js +191 -118
  126. package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.d.ts +8 -0
  127. package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.js +31 -1
  128. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +28 -11
  129. package/lib/mjs/components/_classes/nested/NestedComponent.js +88 -57
  130. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +4 -3
  131. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +18 -5
  132. package/lib/mjs/components/builder.js +0 -2
  133. package/lib/mjs/components/button/Button.js +2 -1
  134. package/lib/mjs/components/columns/Columns.d.ts +1 -0
  135. package/lib/mjs/components/columns/Columns.js +2 -3
  136. package/lib/mjs/components/columns/editForm/Columns.edit.display.d.ts +30 -1
  137. package/lib/mjs/components/columns/editForm/Columns.edit.display.js +23 -1
  138. package/lib/mjs/components/container/Container.d.ts +1 -0
  139. package/lib/mjs/components/container/Container.js +2 -6
  140. package/lib/mjs/components/content/Content.d.ts +1 -0
  141. package/lib/mjs/components/content/Content.js +1 -0
  142. package/lib/mjs/components/datagrid/DataGrid.d.ts +0 -8
  143. package/lib/mjs/components/datagrid/DataGrid.js +9 -26
  144. package/lib/mjs/components/datamap/DataMap.js +2 -1
  145. package/lib/mjs/components/datetime/DateTime.js +0 -2
  146. package/lib/mjs/components/day/Day.js +2 -3
  147. package/lib/mjs/components/editgrid/EditGrid.d.ts +8 -4
  148. package/lib/mjs/components/editgrid/EditGrid.js +97 -76
  149. package/lib/mjs/components/email/Email.js +0 -1
  150. package/lib/mjs/components/file/File.js +1 -1
  151. package/lib/mjs/components/file/fixtures/comp3.d.ts +29 -0
  152. package/lib/mjs/components/file/fixtures/comp3.js +29 -0
  153. package/lib/mjs/components/form/Form.d.ts +2 -6
  154. package/lib/mjs/components/form/Form.js +45 -14
  155. package/lib/mjs/components/index.d.ts +0 -2
  156. package/lib/mjs/components/index.js +0 -2
  157. package/lib/mjs/components/number/Number.d.ts +1 -2
  158. package/lib/mjs/components/number/Number.js +4 -5
  159. package/lib/mjs/components/panel/Panel.d.ts +0 -1
  160. package/lib/mjs/components/panel/Panel.js +3 -9
  161. package/lib/mjs/components/panel/editForm/Panel.edit.display.d.ts +6 -38
  162. package/lib/mjs/components/panel/editForm/Panel.edit.display.js +3 -16
  163. package/lib/mjs/components/phonenumber/PhoneNumber.js +17 -0
  164. package/lib/mjs/components/radio/Radio.js +0 -2
  165. package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +1 -1
  166. package/lib/mjs/components/recaptcha/ReCaptcha.js +2 -2
  167. package/lib/mjs/components/select/Select.js +3 -2
  168. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +1 -2
  169. package/lib/mjs/components/selectboxes/SelectBoxes.js +7 -6
  170. package/lib/mjs/components/table/editForm/Table.edit.display.d.ts +31 -2
  171. package/lib/mjs/components/table/editForm/Table.edit.display.js +22 -0
  172. package/lib/mjs/components/tabs/editForm/Tabs.edit.display.d.ts +30 -2
  173. package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +22 -0
  174. package/lib/mjs/components/textfield/TextField.js +20 -6
  175. package/lib/mjs/components/time/Time.js +0 -6
  176. package/lib/mjs/components/url/Url.js +0 -1
  177. package/lib/mjs/components/well/editForm/Well.edit.display.d.ts +25 -2
  178. package/lib/mjs/components/well/editForm/Well.edit.display.js +18 -0
  179. package/lib/mjs/formio.embed.js +5 -3
  180. package/lib/mjs/formio.form.d.ts +1 -7
  181. package/lib/mjs/formio.form.js +2 -32
  182. package/lib/mjs/index.d.ts +2 -1
  183. package/lib/mjs/index.js +1 -1
  184. package/lib/mjs/providers/Providers.d.ts +0 -4
  185. package/lib/mjs/providers/storage/azure.d.ts +0 -2
  186. package/lib/mjs/providers/storage/azure.js +1 -6
  187. package/lib/mjs/providers/storage/googleDrive.d.ts +0 -1
  188. package/lib/mjs/providers/storage/googleDrive.js +0 -4
  189. package/lib/mjs/providers/storage/s3.d.ts +0 -1
  190. package/lib/mjs/providers/storage/s3.js +0 -4
  191. package/lib/mjs/translations/en.d.ts +5 -0
  192. package/lib/mjs/translations/en.js +5 -0
  193. package/lib/mjs/utils/formUtils.js +1 -0
  194. package/lib/mjs/utils/utils.d.ts +2 -1
  195. package/lib/mjs/utils/utils.js +24 -7
  196. package/package.json +6 -6
  197. package/lib/cjs/components/tree/Node.d.ts +0 -55
  198. package/lib/cjs/components/tree/Node.js +0 -185
  199. package/lib/cjs/components/tree/Tree.d.ts +0 -48
  200. package/lib/cjs/components/tree/Tree.form.d.ts +0 -3
  201. package/lib/cjs/components/tree/Tree.form.js +0 -21
  202. package/lib/cjs/components/tree/Tree.js +0 -383
  203. package/lib/cjs/components/tree/editForm/Tree.edit.data.d.ts +0 -5
  204. package/lib/cjs/components/tree/editForm/Tree.edit.data.js +0 -9
  205. package/lib/cjs/components/tree/editForm/Tree.edit.display.d.ts +0 -9
  206. package/lib/cjs/components/tree/editForm/Tree.edit.display.js +0 -12
  207. package/lib/cjs/components/tree/fixtures/comp1.d.ts +0 -23
  208. package/lib/cjs/components/tree/fixtures/comp1.js +0 -24
  209. package/lib/cjs/components/tree/fixtures/comp2.d.ts +0 -116
  210. package/lib/cjs/components/tree/fixtures/comp2.js +0 -82
  211. package/lib/cjs/components/tree/fixtures/comp3.d.ts +0 -24
  212. package/lib/cjs/components/tree/fixtures/comp3.js +0 -25
  213. package/lib/cjs/components/tree/fixtures/comp4.d.ts +0 -42
  214. package/lib/cjs/components/tree/fixtures/comp4.js +0 -47
  215. package/lib/cjs/components/tree/fixtures/index.d.ts +0 -5
  216. package/lib/cjs/components/tree/fixtures/index.js +0 -14
  217. package/lib/cjs/validator/Rules.d.ts +0 -53
  218. package/lib/cjs/validator/Rules.js +0 -22
  219. package/lib/cjs/validator/Validator.d.ts +0 -228
  220. package/lib/cjs/validator/Validator.js +0 -1113
  221. package/lib/cjs/validator/conjunctions/index.d.ts +0 -7
  222. package/lib/cjs/validator/conjunctions/index.js +0 -18
  223. package/lib/cjs/validator/operators/index.d.ts +0 -7
  224. package/lib/cjs/validator/operators/index.js +0 -18
  225. package/lib/cjs/validator/quickRules/index.d.ts +0 -7
  226. package/lib/cjs/validator/quickRules/index.js +0 -18
  227. package/lib/cjs/validator/rules/Custom.d.ts +0 -5
  228. package/lib/cjs/validator/rules/Custom.js +0 -30
  229. package/lib/cjs/validator/rules/Date.d.ts +0 -5
  230. package/lib/cjs/validator/rules/Date.js +0 -25
  231. package/lib/cjs/validator/rules/Day.d.ts +0 -5
  232. package/lib/cjs/validator/rules/Day.js +0 -58
  233. package/lib/cjs/validator/rules/Email.d.ts +0 -5
  234. package/lib/cjs/validator/rules/Email.js +0 -24
  235. package/lib/cjs/validator/rules/JSON.d.ts +0 -5
  236. package/lib/cjs/validator/rules/JSON.js +0 -29
  237. package/lib/cjs/validator/rules/Mask.d.ts +0 -5
  238. package/lib/cjs/validator/rules/Mask.js +0 -32
  239. package/lib/cjs/validator/rules/Max.d.ts +0 -5
  240. package/lib/cjs/validator/rules/Max.js +0 -21
  241. package/lib/cjs/validator/rules/MaxDate.d.ts +0 -5
  242. package/lib/cjs/validator/rules/MaxDate.js +0 -34
  243. package/lib/cjs/validator/rules/MaxLength.d.ts +0 -5
  244. package/lib/cjs/validator/rules/MaxLength.js +0 -20
  245. package/lib/cjs/validator/rules/MaxWords.d.ts +0 -5
  246. package/lib/cjs/validator/rules/MaxWords.js +0 -20
  247. package/lib/cjs/validator/rules/MaxYear.d.ts +0 -5
  248. package/lib/cjs/validator/rules/MaxYear.js +0 -22
  249. package/lib/cjs/validator/rules/Min.d.ts +0 -5
  250. package/lib/cjs/validator/rules/Min.js +0 -21
  251. package/lib/cjs/validator/rules/MinDate.d.ts +0 -5
  252. package/lib/cjs/validator/rules/MinDate.js +0 -30
  253. package/lib/cjs/validator/rules/MinLength.d.ts +0 -5
  254. package/lib/cjs/validator/rules/MinLength.js +0 -20
  255. package/lib/cjs/validator/rules/MinWords.d.ts +0 -5
  256. package/lib/cjs/validator/rules/MinWords.js +0 -20
  257. package/lib/cjs/validator/rules/MinYear.d.ts +0 -5
  258. package/lib/cjs/validator/rules/MinYear.js +0 -22
  259. package/lib/cjs/validator/rules/Pattern.d.ts +0 -5
  260. package/lib/cjs/validator/rules/Pattern.js +0 -20
  261. package/lib/cjs/validator/rules/Required.d.ts +0 -5
  262. package/lib/cjs/validator/rules/Required.js +0 -17
  263. package/lib/cjs/validator/rules/Rule.d.ts +0 -7
  264. package/lib/cjs/validator/rules/Rule.js +0 -12
  265. package/lib/cjs/validator/rules/Select.d.ts +0 -5
  266. package/lib/cjs/validator/rules/Select.js +0 -95
  267. package/lib/cjs/validator/rules/Time.d.ts +0 -5
  268. package/lib/cjs/validator/rules/Time.js +0 -19
  269. package/lib/cjs/validator/rules/Unique.d.ts +0 -5
  270. package/lib/cjs/validator/rules/Unique.js +0 -69
  271. package/lib/cjs/validator/rules/Url.d.ts +0 -5
  272. package/lib/cjs/validator/rules/Url.js +0 -23
  273. package/lib/cjs/validator/rules/index.d.ts +0 -47
  274. package/lib/cjs/validator/rules/index.js +0 -51
  275. package/lib/cjs/validator/transformers/index.d.ts +0 -7
  276. package/lib/cjs/validator/transformers/index.js +0 -18
  277. package/lib/cjs/validator/valueSources/index.d.ts +0 -7
  278. package/lib/cjs/validator/valueSources/index.js +0 -18
  279. package/lib/mjs/components/tree/Node.d.ts +0 -55
  280. package/lib/mjs/components/tree/Node.js +0 -179
  281. package/lib/mjs/components/tree/Tree.d.ts +0 -48
  282. package/lib/mjs/components/tree/Tree.form.d.ts +0 -3
  283. package/lib/mjs/components/tree/Tree.form.js +0 -15
  284. package/lib/mjs/components/tree/Tree.js +0 -384
  285. package/lib/mjs/components/tree/editForm/Tree.edit.data.d.ts +0 -5
  286. package/lib/mjs/components/tree/editForm/Tree.edit.data.js +0 -7
  287. package/lib/mjs/components/tree/editForm/Tree.edit.display.d.ts +0 -9
  288. package/lib/mjs/components/tree/editForm/Tree.edit.display.js +0 -10
  289. package/lib/mjs/components/tree/fixtures/comp1.d.ts +0 -23
  290. package/lib/mjs/components/tree/fixtures/comp1.js +0 -22
  291. package/lib/mjs/components/tree/fixtures/comp2.d.ts +0 -116
  292. package/lib/mjs/components/tree/fixtures/comp2.js +0 -80
  293. package/lib/mjs/components/tree/fixtures/comp3.d.ts +0 -24
  294. package/lib/mjs/components/tree/fixtures/comp3.js +0 -23
  295. package/lib/mjs/components/tree/fixtures/comp4.d.ts +0 -42
  296. package/lib/mjs/components/tree/fixtures/comp4.js +0 -45
  297. package/lib/mjs/components/tree/fixtures/index.d.ts +0 -5
  298. package/lib/mjs/components/tree/fixtures/index.js +0 -5
  299. package/lib/mjs/validator/Rules.d.ts +0 -53
  300. package/lib/mjs/validator/Rules.js +0 -17
  301. package/lib/mjs/validator/Validator.d.ts +0 -228
  302. package/lib/mjs/validator/Validator.js +0 -1103
  303. package/lib/mjs/validator/conjunctions/index.d.ts +0 -7
  304. package/lib/mjs/validator/conjunctions/index.js +0 -16
  305. package/lib/mjs/validator/operators/index.d.ts +0 -7
  306. package/lib/mjs/validator/operators/index.js +0 -16
  307. package/lib/mjs/validator/quickRules/index.d.ts +0 -7
  308. package/lib/mjs/validator/quickRules/index.js +0 -16
  309. package/lib/mjs/validator/rules/Custom.d.ts +0 -5
  310. package/lib/mjs/validator/rules/Custom.js +0 -21
  311. package/lib/mjs/validator/rules/Date.d.ts +0 -5
  312. package/lib/mjs/validator/rules/Date.js +0 -16
  313. package/lib/mjs/validator/rules/Day.d.ts +0 -5
  314. package/lib/mjs/validator/rules/Day.js +0 -49
  315. package/lib/mjs/validator/rules/Email.d.ts +0 -5
  316. package/lib/mjs/validator/rules/Email.js +0 -15
  317. package/lib/mjs/validator/rules/JSON.d.ts +0 -5
  318. package/lib/mjs/validator/rules/JSON.js +0 -20
  319. package/lib/mjs/validator/rules/Mask.d.ts +0 -5
  320. package/lib/mjs/validator/rules/Mask.js +0 -23
  321. package/lib/mjs/validator/rules/Max.d.ts +0 -5
  322. package/lib/mjs/validator/rules/Max.js +0 -12
  323. package/lib/mjs/validator/rules/MaxDate.d.ts +0 -5
  324. package/lib/mjs/validator/rules/MaxDate.js +0 -25
  325. package/lib/mjs/validator/rules/MaxLength.d.ts +0 -5
  326. package/lib/mjs/validator/rules/MaxLength.js +0 -11
  327. package/lib/mjs/validator/rules/MaxWords.d.ts +0 -5
  328. package/lib/mjs/validator/rules/MaxWords.js +0 -11
  329. package/lib/mjs/validator/rules/MaxYear.d.ts +0 -5
  330. package/lib/mjs/validator/rules/MaxYear.js +0 -13
  331. package/lib/mjs/validator/rules/Min.d.ts +0 -5
  332. package/lib/mjs/validator/rules/Min.js +0 -12
  333. package/lib/mjs/validator/rules/MinDate.d.ts +0 -5
  334. package/lib/mjs/validator/rules/MinDate.js +0 -21
  335. package/lib/mjs/validator/rules/MinLength.d.ts +0 -5
  336. package/lib/mjs/validator/rules/MinLength.js +0 -11
  337. package/lib/mjs/validator/rules/MinWords.d.ts +0 -5
  338. package/lib/mjs/validator/rules/MinWords.js +0 -11
  339. package/lib/mjs/validator/rules/MinYear.d.ts +0 -5
  340. package/lib/mjs/validator/rules/MinYear.js +0 -13
  341. package/lib/mjs/validator/rules/Pattern.d.ts +0 -5
  342. package/lib/mjs/validator/rules/Pattern.js +0 -11
  343. package/lib/mjs/validator/rules/Required.d.ts +0 -5
  344. package/lib/mjs/validator/rules/Required.js +0 -8
  345. package/lib/mjs/validator/rules/Rule.d.ts +0 -7
  346. package/lib/mjs/validator/rules/Rule.js +0 -9
  347. package/lib/mjs/validator/rules/Select.d.ts +0 -5
  348. package/lib/mjs/validator/rules/Select.js +0 -86
  349. package/lib/mjs/validator/rules/Time.d.ts +0 -5
  350. package/lib/mjs/validator/rules/Time.js +0 -10
  351. package/lib/mjs/validator/rules/Unique.d.ts +0 -5
  352. package/lib/mjs/validator/rules/Unique.js +0 -60
  353. package/lib/mjs/validator/rules/Url.d.ts +0 -5
  354. package/lib/mjs/validator/rules/Url.js +0 -14
  355. package/lib/mjs/validator/rules/index.d.ts +0 -47
  356. package/lib/mjs/validator/rules/index.js +0 -46
  357. package/lib/mjs/validator/transformers/index.d.ts +0 -7
  358. package/lib/mjs/validator/transformers/index.js +0 -16
  359. package/lib/mjs/validator/valueSources/index.d.ts +0 -7
  360. package/lib/mjs/validator/valueSources/index.js +0 -16
Binary file
Binary file
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see formio.embed.min.js.LICENSE.txt */
2
- !function(e,i){"object"==typeof exports&&"object"==typeof module?module.exports=i():"function"==typeof define&&define.amd?define([],i):"object"==typeof exports?exports.Formio=i():e.Formio=i()}(self,(function(){return function(){"use strict";var e={36310:function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=class{constructor(e){this.baseUrl=e||"https://cdn.form.io",this.overrides={},this.libs={js:"",ace:"1.4.12",bootstrap:"4.6.2",ckeditor:"19.0.0",flatpickr:"4.6.8","flatpickr-formio":"4.6.13-formio.3","font-awesome":"4.7.0",grid:"latest","moment-timezone":"latest",quill:"2.0.0-dev.3","shortcut-buttons-flatpickr":"0.4.0",uswds:"2.4.8",core:""},this.updateUrls()}getVersion(e){return this.libs[e]}setVersion(e,i){this.libs[e]=i,this.updateUrls()}setBaseUrl(e){this.baseUrl=e,this.updateUrls()}setOverrideUrl(e,i){this.overrides[e]=i,this.updateUrls()}removeOverride(e){delete this.overrides[e],this.updateUrls()}removeOverrides(){this.overrides={},this.updateUrls()}buildUrl(e,i,o){let t;return t="latest"===o||""===o?`${e}/${i}`:`${e}/${i}/${o}`,t}updateUrls(){for(const e in this.libs)e in this.overrides?this[e]=this.buildUrl(this.overrides[e],e,this.libs[e]):this[e]=this.buildUrl(this.baseUrl,e,this.libs[e])}}},3805:function(e,i,o){var t=this&&this.__awaiter||function(e,i,o,t){return new(o||(o=Promise))((function(s,r){function n(e){try{c(t.next(e))}catch(e){r(e)}}function l(e){try{c(t.throw(e))}catch(e){r(e)}}function c(e){var i;e.done?s(e.value):(i=e.value,i instanceof o?i:new o((function(e){e(i)}))).then(n,l)}c((t=t.apply(e,i||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.FormBuilder=i.Form=i.Formio=void 0;const r=s(o(36310));class n{static setBaseUrl(e){return t(this,void 0,void 0,(function*(){n.baseUrl=e}))}static setProjectUrl(e){return t(this,void 0,void 0,(function*(){n.projectUrl=e}))}static debug(...e){n.config.debug&&console.log(...e)}static clearCache(){n.FormioClass&&n.FormioClass.clearCache()}static global(e){const i=window[e];return i&&i.proxy?null:(n.debug(`Getting global ${e}`,i),i)}static createElement(e,i,o){const t=document.createElement(e);return Object.keys(i).forEach((e=>{t.setAttribute(e,i[e])})),(o||[]).forEach((e=>{t.appendChild(n.createElement(e.tag,e.attrs,e.children))})),t}static addScript(e,i,o){return t(this,void 0,void 0,(function*(){return i?"string"!=typeof i&&i.length?Promise.all(i.map((i=>n.addScript(e,i)))):o&&n.global(o)?(n.debug(`${o} already loaded.`),Promise.resolve(n.global(o))):(n.debug("Adding Script",i),e.appendChild(n.createElement("script",{src:i})),o?new Promise((e=>{n.debug(`Waiting to load ${o}`);const i=setInterval((()=>{n.global(o)&&(clearInterval(i),n.debug(`${o} loaded.`),e(n.global(o)))}),100)})):Promise.resolve()):Promise.resolve()}))}static addStyles(e,i){return t(this,void 0,void 0,(function*(){i&&("string"!=typeof i&&i.length?i.forEach((i=>n.addStyles(e,i))):(n.debug("Adding Styles",i),e.appendChild(n.createElement("link",{rel:"stylesheet",href:i}))))}))}static submitDone(e,i){return t(this,void 0,void 0,(function*(){n.debug("Submision Complete",i);const o=(n.config.success||"").toString();o&&"false"!==o.toLowerCase()&&e.element&&(e.element.innerHTML=`<div class="alert-success" role="alert">${o}</div>`);let t=n.config.redirect;if(!t&&e._form&&e._form.settings&&(e._form.settings.returnUrl||e._form.settings.redirect)&&(n.debug("Return url found in form configuration"),t=e._form.settings.returnUrl||e._form.settings.redirect),t){const o=e.formio?e.formio.formUrl:"",s=!!t.match(/\?/),r=0===t.indexOf(location.origin);t+=s?"&":"?",t+=`sub=${i._id}`,!r&&o&&(t+=`&form=${encodeURIComponent(o)}`),n.debug("Return URL",t),window.location.href=t,r&&window.location.reload()}}))}static formioScript(e,i){return i?e.replace("formio.form","formio.full"):e}static init(e,i=!1){return t(this,void 0,void 0,(function*(){n.cdn=new r.default(n.config.cdn),n.config.libs=n.config.libs||{uswds:{fa:!0,js:`${n.cdn.uswds}/uswds.min.js`,css:`${n.cdn.uswds}/uswds.min.css`},fontawesome:{css:`${n.cdn["font-awesome"]}/css/font-awesome.min.css`},bootstrap:{css:`${n.cdn.bootstrap}/css/bootstrap.min.css`}};const o=n.config.id||`formio-${Math.random().toString(36).substring(7)}`,t=n.createElement("div",{id:`"${o}-wrapper"`});if(e.parentNode.insertBefore(t,e),e.parentNode.removeChild(e),t.appendChild(e),yield n.addStyles(t,n.config.embedCSS||`${n.cdn.js}/formio.embed.css`),t.appendChild(n.createElement("div",{class:"formio-loader"},[{tag:"div",attrs:{class:"loader-wrapper"},children:[{tag:"div",attrs:{class:"loader text-center"}}]}])),n.FormioClass=yield n.addScript(t,n.formioScript(n.config.script||`${n.cdn.js}/formio.form.min.js`,i),"Formio"),n.FormioClass.setBaseUrl(n.baseUrl||n.config.base),n.FormioClass.setProjectUrl(n.projectUrl||n.config.project),n.FormioClass.language=n.language,n.global("premium")&&(n.debug("Using premium module."),n.FormioClass.use(n.global("premium"))),n.global("vpat")&&(n.debug("Using vpat module."),n.FormioClass.use(n.global("vpat"))),n.config.template){if(n.config.includeLibs&&(yield n.addStyles(t,n.config.libs[n.config.template].css),yield n.addScript(t,n.config.libs[n.config.template].js),n.config.libs[n.config.template].fa&&(yield n.addStyles(t,n.config.libs.fontawesome.css))),n.cdn[n.config.template]){const e=`${n.cdn[n.config.template]}/${n.config.template}.min`;yield n.addStyles(t,`${e}.css`),n.debug(`Using ${n.config.template}`),n.FormioClass.use(yield n.addScript(t,`${e}.js`,n.config.template))}}else n.global("uswds")?(n.debug("Using uswds module."),n.FormioClass.use(n.global("uswds"))):n.config.includeLibs&&(yield n.addStyles(t,n.config.libs.fontawesome.css),yield n.addStyles(t,n.config.libs.bootstrap.css));return n.config.premium&&(yield n.addStyles(t,n.config.premium.css),n.debug("Using premium"),n.FormioClass.use(yield n.addScript(t,n.config.premium.js,"premium"))),yield n.addStyles(t,n.formioScript(n.config.style||`${n.cdn.js}/formio.form.min.css`,i)),n.config.before&&(yield n.config.before(n.FormioClass,e,n.config)),n.FormioClass.license=!0,t}))}static createForm(e,i,o){return t(this,void 0,void 0,(function*(){const t=yield n.init(e);return n.FormioClass.createForm(e,i,Object.assign(Object.assign({},o),{noLoader:!0})).then((e=>(n.debug("Form created",e),n.debug("Removing loader"),t.removeChild(t.querySelector(".formio-loader")),n.config.submission&&(n.debug("Setting submission",n.config.submission),e.submission=n.config.submission),n.debug("Triggering embed event"),n.FormioClass.events.emit("formEmbedded",e),n.config.after&&(n.debug("Calling ready callback"),n.config.after(e,n.config)),e)))}))}static builder(e,i,o){return t(this,void 0,void 0,(function*(){const t=yield n.init(e,!0);return n.FormioClass.builder(e,i,o).then((e=>(n.debug("Builder created",e),n.debug("Removing loader"),t.removeChild(t.querySelector(".formio-loader")),n.debug("Triggering embed event"),n.FormioClass.events.emit("builderEmbedded",e),n.config.after&&(n.debug("Calling ready callback"),n.config.after(e,n.config)),e)))}))}}n.config={},n.cdn=null,n.proxy=!0,i.Formio=n;class l{constructor(e,i,o){this.form=i,this.element=e,this.options=o||{},this.init(),this.instance={proxy:!0,ready:this.ready,destroy:()=>{}}}init(){this.element.innerHTML="",this.ready=this.create().then((e=>(this.instance=e,this.form=e.form,e)))}create(){return n.createForm(this.element,this.form,this.options)}setDisplay(e){return this.instance.proxy||(this.form.display=e,this.init()),this.ready}}i.Form=l;class c extends l{create(){return n.builder(this.element,this.form,this.options)}}i.FormBuilder=c,n.Form=l,n.FormBuilder=c}},i={};function o(t){var s=i[t];if(void 0!==s)return s.exports;var r=i[t]={exports:{}};return e[t].call(r.exports,r,r.exports,o),r.exports}var t={};return function(){var e=t;e.Formio=void 0;const i=o(3805);Object.defineProperty(e,"Formio",{enumerable:!0,get:function(){return i.Formio}});const s=document.getElementsByTagName("script"),r=window.FormioConfig||{};let n=null,l=s.length;const c=r.scriptName||"formio.embed.";for(;l--;)if(s[l].src&&-1!==s[l].src.indexOf(c)){n=s[l];break}if(n){const e={};n.src.replace(/^[^?]+\??/,"").replace(/\?/g,"&").split("&").forEach((i=>{e[i.split("=")[0]]=i.split("=")[1]&&decodeURIComponent(i.split("=")[1])}));let o=n.src.replace(/^([^?]+).*/,"$1").split("/");o.pop(),r.formioPath&&r.formioPath(o),o=o.join("/"),i.Formio.config=Object.assign({script:e.script||`${r.updatePath?r.updatePath():o}/formio.form.min.js`,style:e.styles||`${r.updatePath?r.updatePath():o}/formio.form.min.css`,cdn:e.cdn,class:e.class||"formio-form-wrapper",src:e.src,form:null,submission:null,project:e.project,base:e.base||"https://api.form.io",submit:e.submit,includeLibs:"true"===e.libs||"1"===e.libs,template:e.template,debug:"true"===e.debug||"1"===e.debug,config:{},redirect:e.return||e.redirect,embedCSS:`${r.updatePath?r.updatePath():o}/formio.embed.css`,success:e.success||"Thank you for your submission!",before:null,after:null},r);const t=i.Formio.config.form||i.Formio.config.src;if(t){i.Formio.debug("Embedding Configuration",r),i.Formio.config.addPremiumLib&&i.Formio.config.addPremiumLib(i.Formio.config,o),i.Formio.config.id=`formio-${Math.random().toString(36).substring(7)}`,i.Formio.debug("Creating form element");const e=i.Formio.createElement("div",{id:i.Formio.config.id,class:i.Formio.config.class});n.parentNode.insertBefore(e,n.parentNode.firstElementChild.nextSibling),i.Formio.createForm(e,t,i.Formio.config.config).then((e=>{i.Formio.config.submit&&(e.nosubmit=!0),e.on("submit",(o=>{if(i.Formio.debug("on('submit')",o),i.Formio.config.submit){i.Formio.debug(`Sending submission to ${i.Formio.config.submit}`);const t={"content-type":"application/json"},s=i.Formio.FormioClass.getToken();s&&(t["x-jwt-token"]=s),i.Formio.FormioClass.fetch(i.Formio.config.submit,{body:JSON.stringify(o),headers:t,method:"POST",mode:"cors"}).then((e=>e.json())).then((o=>i.Formio.submitDone(e,o)))}else i.Formio.submitDone(e,o)}))}))}}else document.write("<span>Could not locate the Embedded form.</span>")}(),t.Formio}()}));
2
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.Formio=o():e.Formio=o()}(self,(function(){return function(){"use strict";var e={36310:function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=class{constructor(e){this.baseUrl=e||"https://cdn.form.io",this.overrides={},this.libs={js:"",ace:"1.4.12",bootstrap:"4.6.2",ckeditor:"19.0.0",flatpickr:"4.6.8","flatpickr-formio":"4.6.13-formio.3","font-awesome":"4.7.0",grid:"latest","moment-timezone":"latest",quill:"2.0.0-dev.3","shortcut-buttons-flatpickr":"0.4.0",uswds:"2.4.8",core:""},this.updateUrls()}getVersion(e){return this.libs[e]}setVersion(e,o){this.libs[e]=o,this.updateUrls()}setBaseUrl(e){this.baseUrl=e,this.updateUrls()}setOverrideUrl(e,o){this.overrides[e]=o,this.updateUrls()}removeOverride(e){delete this.overrides[e],this.updateUrls()}removeOverrides(){this.overrides={},this.updateUrls()}buildUrl(e,o,i){let t;return t="latest"===i||""===i?`${e}/${o}`:`${e}/${o}/${i}`,t}updateUrls(){for(const e in this.libs)e in this.overrides?this[e]=this.buildUrl(this.overrides[e],e,this.libs[e]):this[e]=this.buildUrl(this.baseUrl,e,this.libs[e])}}},4481:function(e,o,i){var t=this&&this.__awaiter||function(e,o,i,t){return new(i||(i=Promise))((function(s,r){function n(e){try{l(t.next(e))}catch(e){r(e)}}function c(e){try{l(t.throw(e))}catch(e){r(e)}}function l(e){var o;e.done?s(e.value):(o=e.value,o instanceof i?o:new i((function(e){e(o)}))).then(n,c)}l((t=t.apply(e,o||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.FormBuilder=o.Form=o.Formio=void 0;const r=s(i(36310));class n{static setBaseUrl(e){return t(this,void 0,void 0,(function*(){n.baseUrl=e}))}static setProjectUrl(e){return t(this,void 0,void 0,(function*(){n.projectUrl=e}))}static debug(...e){n.config.debug&&console.log(...e)}static clearCache(){n.FormioClass&&n.FormioClass.clearCache()}static global(e){const o=window[e];return o&&o.proxy?null:(n.debug(`Getting global ${e}`,o),o)}static createElement(e,o,i){const t=document.createElement(e);return Object.keys(o).forEach((e=>{t.setAttribute(e,o[e])})),(i||[]).forEach((e=>{t.appendChild(n.createElement(e.tag,e.attrs,e.children))})),t}static addScript(e,o,i){return t(this,void 0,void 0,(function*(){return o?"string"!=typeof o&&o.length?Promise.all(o.map((o=>n.addScript(e,o)))):i&&n.global(i)?(n.debug(`${i} already loaded.`),Promise.resolve(n.global(i))):(n.debug("Adding Script",o),e.appendChild(n.createElement("script",{src:o})),i?new Promise((e=>{n.debug(`Waiting to load ${i}`);const o=setInterval((()=>{n.global(i)&&(clearInterval(o),n.debug(`${i} loaded.`),e(n.global(i)))}),100)})):Promise.resolve()):Promise.resolve()}))}static addStyles(e,o){return t(this,void 0,void 0,(function*(){o&&("string"!=typeof o&&o.length?o.forEach((o=>n.addStyles(e,o))):(n.debug("Adding Styles",o),e.appendChild(n.createElement("link",{rel:"stylesheet",href:o}))))}))}static submitDone(e,o){return t(this,void 0,void 0,(function*(){n.debug("Submision Complete",o);const i=(n.config.success||"").toString();i&&"false"!==i.toLowerCase()&&e.element&&(e.element.innerHTML=`<div class="alert-success" role="alert">${i}</div>`);let t=n.config.redirect;if(!t&&e._form&&e._form.settings&&(e._form.settings.returnUrl||e._form.settings.redirect)&&(n.debug("Return url found in form configuration"),t=e._form.settings.returnUrl||e._form.settings.redirect),t){const i=e.formio?e.formio.formUrl:"",s=!!t.match(/\?/),r=0===t.indexOf(location.origin);t+=s?"&":"?",t+=`sub=${o._id}`,!r&&i&&(t+=`&form=${encodeURIComponent(i)}`),n.debug("Return URL",t),window.location.href=t,r&&window.location.reload()}}))}static formioScript(e,o){return n.fullAdded||o?(n.fullAdded=!0,e.replace("formio.form","formio.full")):e}static init(e,o={},i=!1){return t(this,void 0,void 0,(function*(){n.cdn=new r.default(n.config.cdn),n.config.libs=n.config.libs||{uswds:{fa:!0,js:`${n.cdn.uswds}/uswds.min.js`,css:`${n.cdn.uswds}/uswds.min.css`},fontawesome:{css:`${n.cdn["font-awesome"]}/css/font-awesome.min.css`},bootstrap:{css:`${n.cdn.bootstrap}/css/bootstrap.min.css`}};const t=n.config.id||`formio-${Math.random().toString(36).substring(7)}`;let s=n.createElement("div",{id:`"${t}-wrapper"`});e.parentNode.insertBefore(s,e),n.config.includeLibs&&"function"==typeof s.attachShadow&&!n.config.premium&&(s=s.attachShadow({mode:"open"}),o.shadowRoot=s),e.parentNode.removeChild(e),s.appendChild(e),yield n.addStyles(s,n.config.embedCSS||`${n.cdn.js}/formio.embed.css`),s.appendChild(n.createElement("div",{class:"formio-loader"},[{tag:"div",attrs:{class:"loader-wrapper"},children:[{tag:"div",attrs:{class:"loader text-center"}}]}]));const c=n.config.debug?"formio.form":"formio.form.min";if(n.FormioClass=yield n.addScript(s,n.formioScript(n.config.script||`${n.cdn.js}/${c}.js`,i),"Formio"),n.FormioClass.setBaseUrl(n.baseUrl||n.config.base),n.FormioClass.setProjectUrl(n.projectUrl||n.config.project),n.FormioClass.language=n.language,n.global("premium")&&(n.debug("Using premium module."),n.FormioClass.use(n.global("premium"))),n.global("vpat")&&(n.debug("Using vpat module."),n.FormioClass.use(n.global("vpat"))),n.config.template){if(n.config.includeLibs&&(yield n.addStyles(s,n.config.libs[n.config.template].css),yield n.addScript(s,n.config.libs[n.config.template].js),n.config.libs[n.config.template].fa&&(yield n.addStyles(s,n.config.libs.fontawesome.css))),n.cdn[n.config.template]){const e=`${n.cdn[n.config.template]}/${n.config.template}.min`;yield n.addStyles(s,`${e}.css`),n.debug(`Using ${n.config.template}`),n.FormioClass.use(yield n.addScript(s,`${e}.js`,n.config.template))}}else n.global("uswds")?(n.debug("Using uswds module."),n.FormioClass.use(n.global("uswds"))):n.config.includeLibs&&(yield n.addStyles(s,n.config.libs.fontawesome.css),yield n.addStyles(s,n.config.libs.bootstrap.css));return n.config.premium&&(yield n.addStyles(s,n.config.premium.css),n.debug("Using premium"),n.FormioClass.use(yield n.addScript(s,n.config.premium.js,"premium"))),yield n.addStyles(s,n.formioScript(n.config.style||`${n.cdn.js}/${c}.css`,i)),n.config.before&&(yield n.config.before(n.FormioClass,e,n.config)),n.FormioClass.license=!0,s}))}static createForm(e,o,i){return t(this,void 0,void 0,(function*(){const t=yield n.init(e,i);return n.FormioClass.createForm(e,o,Object.assign(Object.assign({},i),{noLoader:!0})).then((e=>(n.debug("Form created",e),n.debug("Removing loader"),t.removeChild(t.querySelector(".formio-loader")),n.config.submission&&(n.debug("Setting submission",n.config.submission),e.submission=n.config.submission),n.debug("Triggering embed event"),n.FormioClass.events.emit("formEmbedded",e),n.config.after&&(n.debug("Calling ready callback"),n.config.after(e,n.config)),e)))}))}static builder(e,o,i){return t(this,void 0,void 0,(function*(){const t=yield n.init(e,i,!0);return n.FormioClass.builder(e,o,i).then((e=>(n.debug("Builder created",e),n.debug("Removing loader"),t.removeChild(t.querySelector(".formio-loader")),n.debug("Triggering embed event"),n.FormioClass.events.emit("builderEmbedded",e),n.config.after&&(n.debug("Calling ready callback"),n.config.after(e,n.config)),e)))}))}}n.config={},n.cdn=null,n.proxy=!0,n.version="5.0.0-rc.28",o.Formio=n;class c{constructor(e,o,i){this.form=o,this.element=e,this.options=i||{},this.init(),this.instance={proxy:!0,ready:this.ready,destroy:()=>{}}}init(){this.element.innerHTML="",this.ready=this.create().then((e=>(this.instance=e,this.form=e.form,e)))}create(){return n.createForm(this.element,this.form,this.options)}setDisplay(e){return this.instance.proxy||(this.form.display=e,this.init()),this.ready}}o.Form=c;class l extends c{create(){return n.builder(this.element,this.form,this.options)}}o.FormBuilder=l,n.Form=c,n.FormBuilder=l}},o={};function i(t){var s=o[t];if(void 0!==s)return s.exports;var r=o[t]={exports:{}};return e[t].call(r.exports,r,r.exports,i),r.exports}var t={};return function(){var e=t;e.Formio=void 0;const o=i(4481);Object.defineProperty(e,"Formio",{enumerable:!0,get:function(){return o.Formio}});const s=document.getElementsByTagName("script"),r=window.FormioConfig||{};let n=null,c=s.length;const l=r.scriptName||"formio.embed.";for(;c--;)if(s[c].src&&-1!==s[c].src.indexOf(l)){n=s[c];break}if(n){const e={};n.src.replace(/^[^?]+\??/,"").replace(/\?/g,"&").split("&").forEach((o=>{e[o.split("=")[0]]=o.split("=")[1]&&decodeURIComponent(o.split("=")[1])}));let i=n.src.replace(/^([^?]+).*/,"$1").split("/");i.pop(),r.formioPath&&r.formioPath(i),i=i.join("/");const t="true"===e.debug||"1"===e.debug,s=t?"formio.form":"formio.form.min";o.Formio.config=Object.assign({script:e.script||`${r.updatePath?r.updatePath():i}/${s}.js`,style:e.styles||`${r.updatePath?r.updatePath():i}/${s}.css`,cdn:e.cdn,class:e.class||"formio-form-wrapper",src:e.src,form:null,submission:null,project:e.project,base:e.base||"https://api.form.io",submit:e.submit,includeLibs:"true"===e.libs||"1"===e.libs,template:e.template,debug:t,config:{},redirect:e.return||e.redirect,embedCSS:`${r.updatePath?r.updatePath():i}/formio.embed.css`,success:e.success||"Thank you for your submission!",before:null,after:null},r);const c=o.Formio.config.form||o.Formio.config.src;if(c){o.Formio.debug("Embedding Configuration",r),o.Formio.config.addPremiumLib&&o.Formio.config.addPremiumLib(o.Formio.config,i),o.Formio.config.id=`formio-${Math.random().toString(36).substring(7)}`,o.Formio.debug("Creating form element");const e=o.Formio.createElement("div",{id:o.Formio.config.id,class:o.Formio.config.class});n.parentNode.insertBefore(e,n.parentNode.firstElementChild.nextSibling),o.Formio.createForm(e,c,o.Formio.config.config).then((e=>{o.Formio.config.submit&&(e.nosubmit=!0),e.on("submit",(i=>{if(o.Formio.debug("on('submit')",i),o.Formio.config.submit){o.Formio.debug(`Sending submission to ${o.Formio.config.submit}`);const t={"content-type":"application/json"},s=o.Formio.FormioClass.getToken();s&&(t["x-jwt-token"]=s),o.Formio.FormioClass.fetch(o.Formio.config.submit,{body:JSON.stringify(i),headers:t,method:"POST",mode:"cors"}).then((e=>e.json())).then((i=>o.Formio.submitDone(e,i)))}else o.Formio.submitDone(e,i)}))}))}}else document.write("<span>Could not locate the Embedded form.</span>")}(),t.Formio}()}));
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see formio.embed.min.js.LICENSE.txt */
2
- !function(e,i){"object"==typeof exports&&"object"==typeof module?module.exports=i():"function"==typeof define&&define.amd?define([],i):"object"==typeof exports?exports.Formio=i():e.Formio=i()}(self,(function(){return function(){"use strict";var e={36310:function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=class{constructor(e){this.baseUrl=e||"https://cdn.form.io",this.overrides={},this.libs={js:"",ace:"1.4.12",bootstrap:"4.6.2",ckeditor:"19.0.0",flatpickr:"4.6.8","flatpickr-formio":"4.6.13-formio.3","font-awesome":"4.7.0",grid:"latest","moment-timezone":"latest",quill:"2.0.0-dev.3","shortcut-buttons-flatpickr":"0.4.0",uswds:"2.4.8",core:""},this.updateUrls()}getVersion(e){return this.libs[e]}setVersion(e,i){this.libs[e]=i,this.updateUrls()}setBaseUrl(e){this.baseUrl=e,this.updateUrls()}setOverrideUrl(e,i){this.overrides[e]=i,this.updateUrls()}removeOverride(e){delete this.overrides[e],this.updateUrls()}removeOverrides(){this.overrides={},this.updateUrls()}buildUrl(e,i,o){let t;return t="latest"===o||""===o?`${e}/${i}`:`${e}/${i}/${o}`,t}updateUrls(){for(const e in this.libs)e in this.overrides?this[e]=this.buildUrl(this.overrides[e],e,this.libs[e]):this[e]=this.buildUrl(this.baseUrl,e,this.libs[e])}}},3805:function(e,i,o){var t=this&&this.__awaiter||function(e,i,o,t){return new(o||(o=Promise))((function(s,r){function n(e){try{c(t.next(e))}catch(e){r(e)}}function l(e){try{c(t.throw(e))}catch(e){r(e)}}function c(e){var i;e.done?s(e.value):(i=e.value,i instanceof o?i:new o((function(e){e(i)}))).then(n,l)}c((t=t.apply(e,i||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.FormBuilder=i.Form=i.Formio=void 0;const r=s(o(36310));class n{static setBaseUrl(e){return t(this,void 0,void 0,(function*(){n.baseUrl=e}))}static setProjectUrl(e){return t(this,void 0,void 0,(function*(){n.projectUrl=e}))}static debug(...e){n.config.debug&&console.log(...e)}static clearCache(){n.FormioClass&&n.FormioClass.clearCache()}static global(e){const i=window[e];return i&&i.proxy?null:(n.debug(`Getting global ${e}`,i),i)}static createElement(e,i,o){const t=document.createElement(e);return Object.keys(i).forEach((e=>{t.setAttribute(e,i[e])})),(o||[]).forEach((e=>{t.appendChild(n.createElement(e.tag,e.attrs,e.children))})),t}static addScript(e,i,o){return t(this,void 0,void 0,(function*(){return i?"string"!=typeof i&&i.length?Promise.all(i.map((i=>n.addScript(e,i)))):o&&n.global(o)?(n.debug(`${o} already loaded.`),Promise.resolve(n.global(o))):(n.debug("Adding Script",i),e.appendChild(n.createElement("script",{src:i})),o?new Promise((e=>{n.debug(`Waiting to load ${o}`);const i=setInterval((()=>{n.global(o)&&(clearInterval(i),n.debug(`${o} loaded.`),e(n.global(o)))}),100)})):Promise.resolve()):Promise.resolve()}))}static addStyles(e,i){return t(this,void 0,void 0,(function*(){i&&("string"!=typeof i&&i.length?i.forEach((i=>n.addStyles(e,i))):(n.debug("Adding Styles",i),e.appendChild(n.createElement("link",{rel:"stylesheet",href:i}))))}))}static submitDone(e,i){return t(this,void 0,void 0,(function*(){n.debug("Submision Complete",i);const o=(n.config.success||"").toString();o&&"false"!==o.toLowerCase()&&e.element&&(e.element.innerHTML=`<div class="alert-success" role="alert">${o}</div>`);let t=n.config.redirect;if(!t&&e._form&&e._form.settings&&(e._form.settings.returnUrl||e._form.settings.redirect)&&(n.debug("Return url found in form configuration"),t=e._form.settings.returnUrl||e._form.settings.redirect),t){const o=e.formio?e.formio.formUrl:"",s=!!t.match(/\?/),r=0===t.indexOf(location.origin);t+=s?"&":"?",t+=`sub=${i._id}`,!r&&o&&(t+=`&form=${encodeURIComponent(o)}`),n.debug("Return URL",t),window.location.href=t,r&&window.location.reload()}}))}static formioScript(e,i){return i?e.replace("formio.form","formio.full"):e}static init(e,i=!1){return t(this,void 0,void 0,(function*(){n.cdn=new r.default(n.config.cdn),n.config.libs=n.config.libs||{uswds:{fa:!0,js:`${n.cdn.uswds}/uswds.min.js`,css:`${n.cdn.uswds}/uswds.min.css`},fontawesome:{css:`${n.cdn["font-awesome"]}/css/font-awesome.min.css`},bootstrap:{css:`${n.cdn.bootstrap}/css/bootstrap.min.css`}};const o=n.config.id||`formio-${Math.random().toString(36).substring(7)}`,t=n.createElement("div",{id:`"${o}-wrapper"`});if(e.parentNode.insertBefore(t,e),e.parentNode.removeChild(e),t.appendChild(e),yield n.addStyles(t,n.config.embedCSS||`${n.cdn.js}/formio.embed.css`),t.appendChild(n.createElement("div",{class:"formio-loader"},[{tag:"div",attrs:{class:"loader-wrapper"},children:[{tag:"div",attrs:{class:"loader text-center"}}]}])),n.FormioClass=yield n.addScript(t,n.formioScript(n.config.script||`${n.cdn.js}/formio.form.min.js`,i),"Formio"),n.FormioClass.setBaseUrl(n.baseUrl||n.config.base),n.FormioClass.setProjectUrl(n.projectUrl||n.config.project),n.FormioClass.language=n.language,n.global("premium")&&(n.debug("Using premium module."),n.FormioClass.use(n.global("premium"))),n.global("vpat")&&(n.debug("Using vpat module."),n.FormioClass.use(n.global("vpat"))),n.config.template){if(n.config.includeLibs&&(yield n.addStyles(t,n.config.libs[n.config.template].css),yield n.addScript(t,n.config.libs[n.config.template].js),n.config.libs[n.config.template].fa&&(yield n.addStyles(t,n.config.libs.fontawesome.css))),n.cdn[n.config.template]){const e=`${n.cdn[n.config.template]}/${n.config.template}.min`;yield n.addStyles(t,`${e}.css`),n.debug(`Using ${n.config.template}`),n.FormioClass.use(yield n.addScript(t,`${e}.js`,n.config.template))}}else n.global("uswds")?(n.debug("Using uswds module."),n.FormioClass.use(n.global("uswds"))):n.config.includeLibs&&(yield n.addStyles(t,n.config.libs.fontawesome.css),yield n.addStyles(t,n.config.libs.bootstrap.css));return n.config.premium&&(yield n.addStyles(t,n.config.premium.css),n.debug("Using premium"),n.FormioClass.use(yield n.addScript(t,n.config.premium.js,"premium"))),yield n.addStyles(t,n.formioScript(n.config.style||`${n.cdn.js}/formio.form.min.css`,i)),n.config.before&&(yield n.config.before(n.FormioClass,e,n.config)),n.FormioClass.license=!0,t}))}static createForm(e,i,o){return t(this,void 0,void 0,(function*(){const t=yield n.init(e);return n.FormioClass.createForm(e,i,Object.assign(Object.assign({},o),{noLoader:!0})).then((e=>(n.debug("Form created",e),n.debug("Removing loader"),t.removeChild(t.querySelector(".formio-loader")),n.config.submission&&(n.debug("Setting submission",n.config.submission),e.submission=n.config.submission),n.debug("Triggering embed event"),n.FormioClass.events.emit("formEmbedded",e),n.config.after&&(n.debug("Calling ready callback"),n.config.after(e,n.config)),e)))}))}static builder(e,i,o){return t(this,void 0,void 0,(function*(){const t=yield n.init(e,!0);return n.FormioClass.builder(e,i,o).then((e=>(n.debug("Builder created",e),n.debug("Removing loader"),t.removeChild(t.querySelector(".formio-loader")),n.debug("Triggering embed event"),n.FormioClass.events.emit("builderEmbedded",e),n.config.after&&(n.debug("Calling ready callback"),n.config.after(e,n.config)),e)))}))}}n.config={},n.cdn=null,n.proxy=!0,i.Formio=n;class l{constructor(e,i,o){this.form=i,this.element=e,this.options=o||{},this.init(),this.instance={proxy:!0,ready:this.ready,destroy:()=>{}}}init(){this.element.innerHTML="",this.ready=this.create().then((e=>(this.instance=e,this.form=e.form,e)))}create(){return n.createForm(this.element,this.form,this.options)}setDisplay(e){return this.instance.proxy||(this.form.display=e,this.init()),this.ready}}i.Form=l;class c extends l{create(){return n.builder(this.element,this.form,this.options)}}i.FormBuilder=c,n.Form=l,n.FormBuilder=c}},i={};function o(t){var s=i[t];if(void 0!==s)return s.exports;var r=i[t]={exports:{}};return e[t].call(r.exports,r,r.exports,o),r.exports}var t={};return function(){var e=t;e.Formio=void 0;const i=o(3805);Object.defineProperty(e,"Formio",{enumerable:!0,get:function(){return i.Formio}});const s=document.getElementsByTagName("script"),r=window.FormioConfig||{};let n=null,l=s.length;const c=r.scriptName||"formio.embed.";for(;l--;)if(s[l].src&&-1!==s[l].src.indexOf(c)){n=s[l];break}if(n){const e={};n.src.replace(/^[^?]+\??/,"").replace(/\?/g,"&").split("&").forEach((i=>{e[i.split("=")[0]]=i.split("=")[1]&&decodeURIComponent(i.split("=")[1])}));let o=n.src.replace(/^([^?]+).*/,"$1").split("/");o.pop(),r.formioPath&&r.formioPath(o),o=o.join("/"),i.Formio.config=Object.assign({script:e.script||`${r.updatePath?r.updatePath():o}/formio.form.min.js`,style:e.styles||`${r.updatePath?r.updatePath():o}/formio.form.min.css`,cdn:e.cdn,class:e.class||"formio-form-wrapper",src:e.src,form:null,submission:null,project:e.project,base:e.base||"https://api.form.io",submit:e.submit,includeLibs:"true"===e.libs||"1"===e.libs,template:e.template,debug:"true"===e.debug||"1"===e.debug,config:{},redirect:e.return||e.redirect,embedCSS:`${r.updatePath?r.updatePath():o}/formio.embed.css`,success:e.success||"Thank you for your submission!",before:null,after:null},r);const t=i.Formio.config.form||i.Formio.config.src;if(t){i.Formio.debug("Embedding Configuration",r),i.Formio.config.addPremiumLib&&i.Formio.config.addPremiumLib(i.Formio.config,o),i.Formio.config.id=`formio-${Math.random().toString(36).substring(7)}`,i.Formio.debug("Creating form element");const e=i.Formio.createElement("div",{id:i.Formio.config.id,class:i.Formio.config.class});n.parentNode.insertBefore(e,n.parentNode.firstElementChild.nextSibling),i.Formio.createForm(e,t,i.Formio.config.config).then((e=>{i.Formio.config.submit&&(e.nosubmit=!0),e.on("submit",(o=>{if(i.Formio.debug("on('submit')",o),i.Formio.config.submit){i.Formio.debug(`Sending submission to ${i.Formio.config.submit}`);const t={"content-type":"application/json"},s=i.Formio.FormioClass.getToken();s&&(t["x-jwt-token"]=s),i.Formio.FormioClass.fetch(i.Formio.config.submit,{body:JSON.stringify(o),headers:t,method:"POST",mode:"cors"}).then((e=>e.json())).then((o=>i.Formio.submitDone(e,o)))}else i.Formio.submitDone(e,o)}))}))}}else document.write("<span>Could not locate the Embedded form.</span>")}(),t.Formio}()}));
2
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.Formio=o():e.Formio=o()}(self,(function(){return function(){"use strict";var e={36310:function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=class{constructor(e){this.baseUrl=e||"https://cdn.form.io",this.overrides={},this.libs={js:"",ace:"1.4.12",bootstrap:"4.6.2",ckeditor:"19.0.0",flatpickr:"4.6.8","flatpickr-formio":"4.6.13-formio.3","font-awesome":"4.7.0",grid:"latest","moment-timezone":"latest",quill:"2.0.0-dev.3","shortcut-buttons-flatpickr":"0.4.0",uswds:"2.4.8",core:""},this.updateUrls()}getVersion(e){return this.libs[e]}setVersion(e,o){this.libs[e]=o,this.updateUrls()}setBaseUrl(e){this.baseUrl=e,this.updateUrls()}setOverrideUrl(e,o){this.overrides[e]=o,this.updateUrls()}removeOverride(e){delete this.overrides[e],this.updateUrls()}removeOverrides(){this.overrides={},this.updateUrls()}buildUrl(e,o,i){let t;return t="latest"===i||""===i?`${e}/${o}`:`${e}/${o}/${i}`,t}updateUrls(){for(const e in this.libs)e in this.overrides?this[e]=this.buildUrl(this.overrides[e],e,this.libs[e]):this[e]=this.buildUrl(this.baseUrl,e,this.libs[e])}}},4481:function(e,o,i){var t=this&&this.__awaiter||function(e,o,i,t){return new(i||(i=Promise))((function(s,r){function n(e){try{l(t.next(e))}catch(e){r(e)}}function c(e){try{l(t.throw(e))}catch(e){r(e)}}function l(e){var o;e.done?s(e.value):(o=e.value,o instanceof i?o:new i((function(e){e(o)}))).then(n,c)}l((t=t.apply(e,o||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.FormBuilder=o.Form=o.Formio=void 0;const r=s(i(36310));class n{static setBaseUrl(e){return t(this,void 0,void 0,(function*(){n.baseUrl=e}))}static setProjectUrl(e){return t(this,void 0,void 0,(function*(){n.projectUrl=e}))}static debug(...e){n.config.debug&&console.log(...e)}static clearCache(){n.FormioClass&&n.FormioClass.clearCache()}static global(e){const o=window[e];return o&&o.proxy?null:(n.debug(`Getting global ${e}`,o),o)}static createElement(e,o,i){const t=document.createElement(e);return Object.keys(o).forEach((e=>{t.setAttribute(e,o[e])})),(i||[]).forEach((e=>{t.appendChild(n.createElement(e.tag,e.attrs,e.children))})),t}static addScript(e,o,i){return t(this,void 0,void 0,(function*(){return o?"string"!=typeof o&&o.length?Promise.all(o.map((o=>n.addScript(e,o)))):i&&n.global(i)?(n.debug(`${i} already loaded.`),Promise.resolve(n.global(i))):(n.debug("Adding Script",o),e.appendChild(n.createElement("script",{src:o})),i?new Promise((e=>{n.debug(`Waiting to load ${i}`);const o=setInterval((()=>{n.global(i)&&(clearInterval(o),n.debug(`${i} loaded.`),e(n.global(i)))}),100)})):Promise.resolve()):Promise.resolve()}))}static addStyles(e,o){return t(this,void 0,void 0,(function*(){o&&("string"!=typeof o&&o.length?o.forEach((o=>n.addStyles(e,o))):(n.debug("Adding Styles",o),e.appendChild(n.createElement("link",{rel:"stylesheet",href:o}))))}))}static submitDone(e,o){return t(this,void 0,void 0,(function*(){n.debug("Submision Complete",o);const i=(n.config.success||"").toString();i&&"false"!==i.toLowerCase()&&e.element&&(e.element.innerHTML=`<div class="alert-success" role="alert">${i}</div>`);let t=n.config.redirect;if(!t&&e._form&&e._form.settings&&(e._form.settings.returnUrl||e._form.settings.redirect)&&(n.debug("Return url found in form configuration"),t=e._form.settings.returnUrl||e._form.settings.redirect),t){const i=e.formio?e.formio.formUrl:"",s=!!t.match(/\?/),r=0===t.indexOf(location.origin);t+=s?"&":"?",t+=`sub=${o._id}`,!r&&i&&(t+=`&form=${encodeURIComponent(i)}`),n.debug("Return URL",t),window.location.href=t,r&&window.location.reload()}}))}static formioScript(e,o){return n.fullAdded||o?(n.fullAdded=!0,e.replace("formio.form","formio.full")):e}static init(e,o={},i=!1){return t(this,void 0,void 0,(function*(){n.cdn=new r.default(n.config.cdn),n.config.libs=n.config.libs||{uswds:{fa:!0,js:`${n.cdn.uswds}/uswds.min.js`,css:`${n.cdn.uswds}/uswds.min.css`},fontawesome:{css:`${n.cdn["font-awesome"]}/css/font-awesome.min.css`},bootstrap:{css:`${n.cdn.bootstrap}/css/bootstrap.min.css`}};const t=n.config.id||`formio-${Math.random().toString(36).substring(7)}`;let s=n.createElement("div",{id:`"${t}-wrapper"`});e.parentNode.insertBefore(s,e),n.config.includeLibs&&"function"==typeof s.attachShadow&&!n.config.premium&&(s=s.attachShadow({mode:"open"}),o.shadowRoot=s),e.parentNode.removeChild(e),s.appendChild(e),yield n.addStyles(s,n.config.embedCSS||`${n.cdn.js}/formio.embed.css`),s.appendChild(n.createElement("div",{class:"formio-loader"},[{tag:"div",attrs:{class:"loader-wrapper"},children:[{tag:"div",attrs:{class:"loader text-center"}}]}]));const c=n.config.debug?"formio.form":"formio.form.min";if(n.FormioClass=yield n.addScript(s,n.formioScript(n.config.script||`${n.cdn.js}/${c}.js`,i),"Formio"),n.FormioClass.setBaseUrl(n.baseUrl||n.config.base),n.FormioClass.setProjectUrl(n.projectUrl||n.config.project),n.FormioClass.language=n.language,n.global("premium")&&(n.debug("Using premium module."),n.FormioClass.use(n.global("premium"))),n.global("vpat")&&(n.debug("Using vpat module."),n.FormioClass.use(n.global("vpat"))),n.config.template){if(n.config.includeLibs&&(yield n.addStyles(s,n.config.libs[n.config.template].css),yield n.addScript(s,n.config.libs[n.config.template].js),n.config.libs[n.config.template].fa&&(yield n.addStyles(s,n.config.libs.fontawesome.css))),n.cdn[n.config.template]){const e=`${n.cdn[n.config.template]}/${n.config.template}.min`;yield n.addStyles(s,`${e}.css`),n.debug(`Using ${n.config.template}`),n.FormioClass.use(yield n.addScript(s,`${e}.js`,n.config.template))}}else n.global("uswds")?(n.debug("Using uswds module."),n.FormioClass.use(n.global("uswds"))):n.config.includeLibs&&(yield n.addStyles(s,n.config.libs.fontawesome.css),yield n.addStyles(s,n.config.libs.bootstrap.css));return n.config.premium&&(yield n.addStyles(s,n.config.premium.css),n.debug("Using premium"),n.FormioClass.use(yield n.addScript(s,n.config.premium.js,"premium"))),yield n.addStyles(s,n.formioScript(n.config.style||`${n.cdn.js}/${c}.css`,i)),n.config.before&&(yield n.config.before(n.FormioClass,e,n.config)),n.FormioClass.license=!0,s}))}static createForm(e,o,i){return t(this,void 0,void 0,(function*(){const t=yield n.init(e,i);return n.FormioClass.createForm(e,o,Object.assign(Object.assign({},i),{noLoader:!0})).then((e=>(n.debug("Form created",e),n.debug("Removing loader"),t.removeChild(t.querySelector(".formio-loader")),n.config.submission&&(n.debug("Setting submission",n.config.submission),e.submission=n.config.submission),n.debug("Triggering embed event"),n.FormioClass.events.emit("formEmbedded",e),n.config.after&&(n.debug("Calling ready callback"),n.config.after(e,n.config)),e)))}))}static builder(e,o,i){return t(this,void 0,void 0,(function*(){const t=yield n.init(e,i,!0);return n.FormioClass.builder(e,o,i).then((e=>(n.debug("Builder created",e),n.debug("Removing loader"),t.removeChild(t.querySelector(".formio-loader")),n.debug("Triggering embed event"),n.FormioClass.events.emit("builderEmbedded",e),n.config.after&&(n.debug("Calling ready callback"),n.config.after(e,n.config)),e)))}))}}n.config={},n.cdn=null,n.proxy=!0,n.version="5.0.0-rc.28",o.Formio=n;class c{constructor(e,o,i){this.form=o,this.element=e,this.options=i||{},this.init(),this.instance={proxy:!0,ready:this.ready,destroy:()=>{}}}init(){this.element.innerHTML="",this.ready=this.create().then((e=>(this.instance=e,this.form=e.form,e)))}create(){return n.createForm(this.element,this.form,this.options)}setDisplay(e){return this.instance.proxy||(this.form.display=e,this.init()),this.ready}}o.Form=c;class l extends c{create(){return n.builder(this.element,this.form,this.options)}}o.FormBuilder=l,n.Form=c,n.FormBuilder=l}},o={};function i(t){var s=o[t];if(void 0!==s)return s.exports;var r=o[t]={exports:{}};return e[t].call(r.exports,r,r.exports,i),r.exports}var t={};return function(){var e=t;e.Formio=void 0;const o=i(4481);Object.defineProperty(e,"Formio",{enumerable:!0,get:function(){return o.Formio}});const s=document.getElementsByTagName("script"),r=window.FormioConfig||{};let n=null,c=s.length;const l=r.scriptName||"formio.embed.";for(;c--;)if(s[c].src&&-1!==s[c].src.indexOf(l)){n=s[c];break}if(n){const e={};n.src.replace(/^[^?]+\??/,"").replace(/\?/g,"&").split("&").forEach((o=>{e[o.split("=")[0]]=o.split("=")[1]&&decodeURIComponent(o.split("=")[1])}));let i=n.src.replace(/^([^?]+).*/,"$1").split("/");i.pop(),r.formioPath&&r.formioPath(i),i=i.join("/");const t="true"===e.debug||"1"===e.debug,s=t?"formio.form":"formio.form.min";o.Formio.config=Object.assign({script:e.script||`${r.updatePath?r.updatePath():i}/${s}.js`,style:e.styles||`${r.updatePath?r.updatePath():i}/${s}.css`,cdn:e.cdn,class:e.class||"formio-form-wrapper",src:e.src,form:null,submission:null,project:e.project,base:e.base||"https://api.form.io",submit:e.submit,includeLibs:"true"===e.libs||"1"===e.libs,template:e.template,debug:t,config:{},redirect:e.return||e.redirect,embedCSS:`${r.updatePath?r.updatePath():i}/formio.embed.css`,success:e.success||"Thank you for your submission!",before:null,after:null},r);const c=o.Formio.config.form||o.Formio.config.src;if(c){o.Formio.debug("Embedding Configuration",r),o.Formio.config.addPremiumLib&&o.Formio.config.addPremiumLib(o.Formio.config,i),o.Formio.config.id=`formio-${Math.random().toString(36).substring(7)}`,o.Formio.debug("Creating form element");const e=o.Formio.createElement("div",{id:o.Formio.config.id,class:o.Formio.config.class});n.parentNode.insertBefore(e,n.parentNode.firstElementChild.nextSibling),o.Formio.createForm(e,c,o.Formio.config.config).then((e=>{o.Formio.config.submit&&(e.nosubmit=!0),e.on("submit",(i=>{if(o.Formio.debug("on('submit')",i),o.Formio.config.submit){o.Formio.debug(`Sending submission to ${o.Formio.config.submit}`);const t={"content-type":"application/json"},s=o.Formio.FormioClass.getToken();s&&(t["x-jwt-token"]=s),o.Formio.FormioClass.fetch(o.Formio.config.submit,{body:JSON.stringify(i),headers:t,method:"POST",mode:"cors"}).then((e=>e.json())).then((i=>o.Formio.submitDone(e,i)))}else o.Formio.submitDone(e,i)}))}))}}else document.write("<span>Could not locate the Embedded form.</span>")}(),t.Formio}()}));
@@ -1 +1 @@
1
- /*! formiojs v5.0.0-rc.25 | https://unpkg.com/formiojs@5.0.0-rc.25/LICENSE.txt */
1
+ /*! formiojs v5.0.0-rc.28 | https://unpkg.com/formiojs@5.0.0-rc.28/LICENSE.txt */