@formio/js 5.0.0-rc.19 → 5.0.0-rc.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (370) hide show
  1. package/README.md +1 -1
  2. package/dist/formio.builder.css +14 -22
  3. package/dist/formio.builder.min.css +1 -1
  4. package/dist/formio.embed.css +1 -40
  5. package/dist/formio.embed.js +2 -90
  6. package/dist/formio.embed.min.css +1 -1
  7. package/dist/formio.embed.min.js +1 -1
  8. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  9. package/dist/formio.form.css +10 -2
  10. package/dist/formio.form.js +1267 -1103
  11. package/dist/formio.form.min.css +1 -1
  12. package/dist/formio.form.min.js +1 -1
  13. package/dist/formio.form.min.js.LICENSE.txt +3 -8
  14. package/dist/formio.full.css +14 -22
  15. package/dist/formio.full.js +1302 -1127
  16. package/dist/formio.full.min.css +1 -1
  17. package/dist/formio.full.min.js +1 -1
  18. package/dist/formio.full.min.js.LICENSE.txt +3 -8
  19. package/dist/formio.js +713 -626
  20. package/dist/formio.min.js +1 -1
  21. package/dist/formio.min.js.LICENSE.txt +2 -7
  22. package/dist/formio.utils.js +220 -13
  23. package/dist/formio.utils.min.js +1 -1
  24. package/dist/formio.utils.min.js.LICENSE.txt +2 -7
  25. package/lib/cjs/CDN.d.ts +1 -0
  26. package/lib/cjs/CDN.js +2 -1
  27. package/lib/cjs/Element.js +7 -2
  28. package/lib/cjs/Embed.d.ts +21 -1
  29. package/lib/cjs/Embed.js +211 -308
  30. package/lib/cjs/Form.d.ts +9 -6
  31. package/lib/cjs/Form.js +53 -11
  32. package/lib/cjs/PDF.d.ts +11 -3
  33. package/lib/cjs/PDF.js +4 -5
  34. package/lib/cjs/PDFBuilder.js +2 -3
  35. package/lib/cjs/Webform.d.ts +10 -13
  36. package/lib/cjs/Webform.js +46 -125
  37. package/lib/cjs/WebformBuilder.d.ts +6 -1
  38. package/lib/cjs/WebformBuilder.js +105 -65
  39. package/lib/cjs/Wizard.d.ts +8 -5
  40. package/lib/cjs/Wizard.js +12 -12
  41. package/lib/cjs/WizardBuilder.d.ts +6 -4
  42. package/lib/cjs/WizardBuilder.js +20 -3
  43. package/lib/cjs/addons/FormioAddon.d.ts +1 -1
  44. package/lib/cjs/addons/FormioAddon.js +1 -2
  45. package/lib/cjs/components/_classes/component/Component.d.ts +24 -8
  46. package/lib/cjs/components/_classes/component/Component.js +44 -14
  47. package/lib/cjs/components/_classes/input/Input.d.ts +1 -1
  48. package/lib/cjs/components/_classes/input/Input.js +1 -2
  49. package/lib/cjs/components/_classes/list/ListComponent.d.ts +4 -0
  50. package/lib/cjs/components/_classes/list/ListComponent.js +43 -6
  51. package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +1 -0
  52. package/lib/cjs/components/_classes/multivalue/Multivalue.js +10 -4
  53. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +5 -2
  54. package/lib/cjs/components/_classes/nested/NestedComponent.js +9 -10
  55. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +1 -0
  56. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +4 -0
  57. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +1 -0
  58. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +4 -0
  59. package/lib/cjs/components/address/Address.d.ts +8 -0
  60. package/lib/cjs/components/address/Address.js +5 -0
  61. package/lib/cjs/components/button/Button.d.ts +1 -0
  62. package/lib/cjs/components/button/Button.js +5 -3
  63. package/lib/cjs/components/checkbox/Checkbox.d.ts +41 -0
  64. package/lib/cjs/components/checkbox/Checkbox.js +32 -5
  65. package/lib/cjs/components/columns/Columns.d.ts +2 -0
  66. package/lib/cjs/components/columns/Columns.js +4 -0
  67. package/lib/cjs/components/container/Container.d.ts +1 -0
  68. package/lib/cjs/components/container/Container.js +4 -0
  69. package/lib/cjs/components/content/Content.d.ts +2 -0
  70. package/lib/cjs/components/content/Content.js +4 -2
  71. package/lib/cjs/components/currency/editForm/Currency.edit.data.d.ts +14 -2
  72. package/lib/cjs/components/currency/editForm/Currency.edit.data.js +4 -0
  73. package/lib/cjs/components/currency/editForm/Currency.edit.display.js +4 -0
  74. package/lib/cjs/components/datagrid/DataGrid.d.ts +1 -0
  75. package/lib/cjs/components/datagrid/DataGrid.js +8 -1
  76. package/lib/cjs/components/datamap/DataMap.d.ts +1 -0
  77. package/lib/cjs/components/datamap/DataMap.js +4 -0
  78. package/lib/cjs/components/datetime/DateTime.d.ts +23 -0
  79. package/lib/cjs/components/datetime/DateTime.js +20 -1
  80. package/lib/cjs/components/day/Day.d.ts +22 -1
  81. package/lib/cjs/components/day/Day.js +20 -6
  82. package/lib/cjs/components/day/fixtures/comp3.js +2 -2
  83. package/lib/cjs/components/editgrid/EditGrid.d.ts +4 -3
  84. package/lib/cjs/components/editgrid/EditGrid.js +11 -6
  85. package/lib/cjs/components/editgrid/fixtures/comp-with-custom-default-value.d.ts +190 -0
  86. package/lib/cjs/components/editgrid/fixtures/comp-with-custom-default-value.js +227 -0
  87. package/lib/cjs/components/editgrid/fixtures/comp15.d.ts +54 -0
  88. package/lib/cjs/components/editgrid/fixtures/comp15.js +51 -0
  89. package/lib/cjs/components/editgrid/fixtures/index.d.ts +3 -1
  90. package/lib/cjs/components/editgrid/fixtures/index.js +5 -1
  91. package/lib/cjs/components/fieldset/Fieldset.d.ts +2 -0
  92. package/lib/cjs/components/fieldset/Fieldset.js +4 -0
  93. package/lib/cjs/components/file/File.d.ts +28 -6
  94. package/lib/cjs/components/file/File.js +40 -15
  95. package/lib/cjs/components/file/editForm/File.edit.file.d.ts +62 -0
  96. package/lib/cjs/components/file/editForm/File.edit.file.js +29 -2
  97. package/lib/cjs/components/form/Form.d.ts +4 -0
  98. package/lib/cjs/components/form/Form.js +12 -10
  99. package/lib/cjs/components/hidden/Hidden.d.ts +1 -0
  100. package/lib/cjs/components/hidden/Hidden.js +1 -0
  101. package/lib/cjs/components/html/HTML.d.ts +2 -0
  102. package/lib/cjs/components/html/HTML.js +4 -0
  103. package/lib/cjs/components/number/Number.d.ts +24 -1
  104. package/lib/cjs/components/number/Number.js +18 -6
  105. package/lib/cjs/components/panel/Panel.d.ts +1 -0
  106. package/lib/cjs/components/panel/Panel.js +3 -0
  107. package/lib/cjs/components/phonenumber/PhoneNumber.form.js +9 -0
  108. package/lib/cjs/components/radio/Radio.d.ts +24 -3
  109. package/lib/cjs/components/radio/Radio.js +89 -18
  110. package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +2 -1
  111. package/lib/cjs/components/recaptcha/ReCaptcha.js +7 -5
  112. package/lib/cjs/components/resource/Resource.d.ts +7 -0
  113. package/lib/cjs/components/resource/Resource.js +0 -1
  114. package/lib/cjs/components/resource/editForm/Resource.edit.display.js +1 -1
  115. package/lib/cjs/components/select/Select.d.ts +25 -5
  116. package/lib/cjs/components/select/Select.js +51 -51
  117. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +37 -0
  118. package/lib/cjs/components/selectboxes/SelectBoxes.js +60 -25
  119. package/lib/cjs/components/selectboxes/fixtures/comp4.d.ts +30 -27
  120. package/lib/cjs/components/selectboxes/fixtures/comp4.js +47 -32
  121. package/lib/cjs/components/selectboxes/fixtures/comp6.d.ts +14 -0
  122. package/lib/cjs/components/selectboxes/fixtures/comp6.js +15 -0
  123. package/lib/cjs/components/selectboxes/fixtures/index.d.ts +2 -1
  124. package/lib/cjs/components/selectboxes/fixtures/index.js +3 -1
  125. package/lib/cjs/components/signature/Signature.d.ts +22 -1
  126. package/lib/cjs/components/signature/Signature.js +16 -3
  127. package/lib/cjs/components/survey/Survey.d.ts +21 -0
  128. package/lib/cjs/components/survey/Survey.js +9 -0
  129. package/lib/cjs/components/table/Table.d.ts +2 -0
  130. package/lib/cjs/components/table/Table.js +4 -0
  131. package/lib/cjs/components/tabs/Tabs.d.ts +2 -0
  132. package/lib/cjs/components/tabs/Tabs.js +4 -0
  133. package/lib/cjs/components/tags/Tags.d.ts +21 -0
  134. package/lib/cjs/components/tags/Tags.js +11 -0
  135. package/lib/cjs/components/textarea/TextArea.d.ts +3 -2
  136. package/lib/cjs/components/textarea/TextArea.js +4 -5
  137. package/lib/cjs/components/textarea/fixtures/comp4.d.ts +30 -0
  138. package/lib/cjs/components/textarea/fixtures/comp4.js +27 -0
  139. package/lib/cjs/components/textarea/fixtures/index.d.ts +2 -1
  140. package/lib/cjs/components/textarea/fixtures/index.js +3 -1
  141. package/lib/cjs/components/textfield/TextField.d.ts +22 -0
  142. package/lib/cjs/components/textfield/TextField.js +11 -3
  143. package/lib/cjs/components/time/Time.d.ts +11 -0
  144. package/lib/cjs/components/time/Time.js +6 -1
  145. package/lib/cjs/components/tree/Tree.d.ts +5 -4
  146. package/lib/cjs/components/tree/Tree.form.js +5 -0
  147. package/lib/cjs/components/tree/Tree.js +8 -9
  148. package/lib/cjs/components/tree/editForm/Tree.edit.display.d.ts +9 -0
  149. package/lib/cjs/components/tree/editForm/Tree.edit.display.js +12 -0
  150. package/lib/cjs/components/well/Well.d.ts +2 -0
  151. package/lib/cjs/components/well/Well.js +4 -0
  152. package/lib/cjs/formio.embed.d.ts +2 -1
  153. package/lib/cjs/formio.embed.js +96 -1
  154. package/lib/cjs/formio.form.d.ts +4 -3
  155. package/lib/cjs/formio.form.js +17 -8
  156. package/lib/cjs/licenses/Licenses.d.ts +7 -0
  157. package/lib/cjs/licenses/Licenses.js +22 -0
  158. package/lib/cjs/licenses/index.d.ts +2 -0
  159. package/lib/cjs/licenses/index.js +7 -0
  160. package/lib/cjs/providers/Providers.d.ts +31 -11
  161. package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +2 -2
  162. package/lib/cjs/providers/address/GoogleAddressProvider.js +2 -3
  163. package/lib/cjs/providers/processor/fileProcessor.d.ts +1 -1
  164. package/lib/cjs/providers/processor/fileProcessor.js +1 -5
  165. package/lib/cjs/providers/storage/azure.d.ts +10 -1
  166. package/lib/cjs/providers/storage/azure.js +7 -2
  167. package/lib/cjs/providers/storage/base64.d.ts +2 -2
  168. package/lib/cjs/providers/storage/base64.js +2 -6
  169. package/lib/cjs/providers/storage/dropbox.d.ts +2 -2
  170. package/lib/cjs/providers/storage/dropbox.js +2 -6
  171. package/lib/cjs/providers/storage/googleDrive.d.ts +3 -2
  172. package/lib/cjs/providers/storage/googleDrive.js +6 -6
  173. package/lib/cjs/providers/storage/indexeddb.d.ts +3 -3
  174. package/lib/cjs/providers/storage/indexeddb.js +9 -13
  175. package/lib/cjs/providers/storage/s3.d.ts +11 -1
  176. package/lib/cjs/providers/storage/s3.js +5 -2
  177. package/lib/cjs/providers/storage/uploadAdapter.js +1 -5
  178. package/lib/cjs/providers/storage/url.d.ts +2 -2
  179. package/lib/cjs/providers/storage/url.js +12 -8
  180. package/lib/cjs/providers/storage/xhr.d.ts +1 -1
  181. package/lib/cjs/providers/storage/xhr.js +1 -2
  182. package/lib/cjs/templates/index.d.ts +226 -1
  183. package/lib/cjs/utils/Evaluator.js +4 -33
  184. package/lib/cjs/utils/i18n.d.ts +16 -0
  185. package/lib/cjs/utils/i18n.js +88 -0
  186. package/lib/cjs/utils/utils.d.ts +11 -1
  187. package/lib/cjs/utils/utils.js +29 -10
  188. package/lib/cjs/validator/Validator.d.ts +30 -2
  189. package/lib/cjs/validator/Validator.js +32 -9
  190. package/lib/cjs/validator/rules/Select.js +1 -2
  191. package/lib/cjs/validator/rules/Unique.d.ts +1 -1
  192. package/lib/cjs/validator/rules/Unique.js +1 -2
  193. package/lib/cjs/widgets/CalendarWidget.d.ts +1 -0
  194. package/lib/cjs/widgets/InputWidget.d.ts +1 -1
  195. package/lib/cjs/widgets/InputWidget.js +1 -2
  196. package/lib/mjs/CDN.d.ts +1 -0
  197. package/lib/mjs/CDN.js +2 -1
  198. package/lib/mjs/Element.js +6 -2
  199. package/lib/mjs/Embed.d.ts +21 -1
  200. package/lib/mjs/Embed.js +208 -319
  201. package/lib/mjs/Form.d.ts +9 -6
  202. package/lib/mjs/Form.js +53 -11
  203. package/lib/mjs/PDF.d.ts +11 -3
  204. package/lib/mjs/PDF.js +4 -5
  205. package/lib/mjs/PDFBuilder.js +2 -3
  206. package/lib/mjs/Webform.d.ts +10 -13
  207. package/lib/mjs/Webform.js +46 -128
  208. package/lib/mjs/WebformBuilder.d.ts +6 -1
  209. package/lib/mjs/WebformBuilder.js +103 -65
  210. package/lib/mjs/Wizard.d.ts +8 -5
  211. package/lib/mjs/Wizard.js +12 -12
  212. package/lib/mjs/WizardBuilder.d.ts +6 -4
  213. package/lib/mjs/WizardBuilder.js +20 -3
  214. package/lib/mjs/addons/FormioAddon.d.ts +1 -1
  215. package/lib/mjs/addons/FormioAddon.js +1 -2
  216. package/lib/mjs/components/_classes/component/Component.d.ts +24 -8
  217. package/lib/mjs/components/_classes/component/Component.js +44 -14
  218. package/lib/mjs/components/_classes/input/Input.d.ts +1 -1
  219. package/lib/mjs/components/_classes/input/Input.js +1 -2
  220. package/lib/mjs/components/_classes/list/ListComponent.d.ts +4 -0
  221. package/lib/mjs/components/_classes/list/ListComponent.js +43 -5
  222. package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +1 -0
  223. package/lib/mjs/components/_classes/multivalue/Multivalue.js +10 -4
  224. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +5 -2
  225. package/lib/mjs/components/_classes/nested/NestedComponent.js +9 -10
  226. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +1 -0
  227. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +4 -0
  228. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +1 -0
  229. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +4 -0
  230. package/lib/mjs/components/address/Address.d.ts +8 -0
  231. package/lib/mjs/components/address/Address.js +5 -0
  232. package/lib/mjs/components/button/Button.d.ts +1 -0
  233. package/lib/mjs/components/button/Button.js +6 -4
  234. package/lib/mjs/components/checkbox/Checkbox.d.ts +41 -0
  235. package/lib/mjs/components/checkbox/Checkbox.js +36 -5
  236. package/lib/mjs/components/columns/Columns.d.ts +2 -0
  237. package/lib/mjs/components/columns/Columns.js +4 -0
  238. package/lib/mjs/components/container/Container.d.ts +1 -0
  239. package/lib/mjs/components/container/Container.js +5 -1
  240. package/lib/mjs/components/content/Content.d.ts +2 -0
  241. package/lib/mjs/components/content/Content.js +4 -2
  242. package/lib/mjs/components/currency/editForm/Currency.edit.data.d.ts +14 -2
  243. package/lib/mjs/components/currency/editForm/Currency.edit.data.js +4 -0
  244. package/lib/mjs/components/currency/editForm/Currency.edit.display.js +4 -0
  245. package/lib/mjs/components/datagrid/DataGrid.d.ts +1 -0
  246. package/lib/mjs/components/datagrid/DataGrid.js +8 -1
  247. package/lib/mjs/components/datamap/DataMap.d.ts +1 -0
  248. package/lib/mjs/components/datamap/DataMap.js +5 -1
  249. package/lib/mjs/components/datetime/DateTime.d.ts +23 -0
  250. package/lib/mjs/components/datetime/DateTime.js +27 -1
  251. package/lib/mjs/components/day/Day.d.ts +22 -1
  252. package/lib/mjs/components/day/Day.js +24 -7
  253. package/lib/mjs/components/day/fixtures/comp3.js +2 -2
  254. package/lib/mjs/components/editgrid/EditGrid.d.ts +4 -3
  255. package/lib/mjs/components/editgrid/EditGrid.js +11 -6
  256. package/lib/mjs/components/editgrid/fixtures/comp-with-custom-default-value.d.ts +190 -0
  257. package/lib/mjs/components/editgrid/fixtures/comp-with-custom-default-value.js +225 -0
  258. package/lib/mjs/components/editgrid/fixtures/comp15.d.ts +54 -0
  259. package/lib/mjs/components/editgrid/fixtures/comp15.js +49 -0
  260. package/lib/mjs/components/editgrid/fixtures/index.d.ts +3 -1
  261. package/lib/mjs/components/editgrid/fixtures/index.js +3 -1
  262. package/lib/mjs/components/fieldset/Fieldset.d.ts +2 -0
  263. package/lib/mjs/components/fieldset/Fieldset.js +4 -0
  264. package/lib/mjs/components/file/File.d.ts +28 -6
  265. package/lib/mjs/components/file/File.js +44 -16
  266. package/lib/mjs/components/file/editForm/File.edit.file.d.ts +62 -0
  267. package/lib/mjs/components/file/editForm/File.edit.file.js +29 -2
  268. package/lib/mjs/components/form/Form.d.ts +4 -0
  269. package/lib/mjs/components/form/Form.js +13 -11
  270. package/lib/mjs/components/hidden/Hidden.d.ts +1 -0
  271. package/lib/mjs/components/hidden/Hidden.js +1 -0
  272. package/lib/mjs/components/html/HTML.d.ts +2 -0
  273. package/lib/mjs/components/html/HTML.js +4 -0
  274. package/lib/mjs/components/number/Number.d.ts +24 -1
  275. package/lib/mjs/components/number/Number.js +23 -7
  276. package/lib/mjs/components/panel/Panel.d.ts +1 -0
  277. package/lib/mjs/components/panel/Panel.js +3 -0
  278. package/lib/mjs/components/phonenumber/PhoneNumber.form.js +9 -0
  279. package/lib/mjs/components/radio/Radio.d.ts +24 -3
  280. package/lib/mjs/components/radio/Radio.js +93 -19
  281. package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +2 -1
  282. package/lib/mjs/components/recaptcha/ReCaptcha.js +7 -5
  283. package/lib/mjs/components/resource/Resource.d.ts +7 -0
  284. package/lib/mjs/components/resource/Resource.js +0 -1
  285. package/lib/mjs/components/resource/editForm/Resource.edit.display.js +1 -1
  286. package/lib/mjs/components/select/Select.d.ts +25 -5
  287. package/lib/mjs/components/select/Select.js +55 -52
  288. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +37 -0
  289. package/lib/mjs/components/selectboxes/SelectBoxes.js +63 -25
  290. package/lib/mjs/components/selectboxes/fixtures/comp4.d.ts +30 -27
  291. package/lib/mjs/components/selectboxes/fixtures/comp4.js +47 -32
  292. package/lib/mjs/components/selectboxes/fixtures/comp6.d.ts +14 -0
  293. package/lib/mjs/components/selectboxes/fixtures/comp6.js +13 -0
  294. package/lib/mjs/components/selectboxes/fixtures/index.d.ts +2 -1
  295. package/lib/mjs/components/selectboxes/fixtures/index.js +2 -1
  296. package/lib/mjs/components/signature/Signature.d.ts +22 -1
  297. package/lib/mjs/components/signature/Signature.js +19 -3
  298. package/lib/mjs/components/survey/Survey.d.ts +21 -0
  299. package/lib/mjs/components/survey/Survey.js +13 -1
  300. package/lib/mjs/components/table/Table.d.ts +2 -0
  301. package/lib/mjs/components/table/Table.js +4 -0
  302. package/lib/mjs/components/tabs/Tabs.d.ts +2 -0
  303. package/lib/mjs/components/tabs/Tabs.js +4 -0
  304. package/lib/mjs/components/tags/Tags.d.ts +21 -0
  305. package/lib/mjs/components/tags/Tags.js +14 -0
  306. package/lib/mjs/components/textarea/TextArea.d.ts +3 -2
  307. package/lib/mjs/components/textarea/TextArea.js +4 -5
  308. package/lib/mjs/components/textarea/fixtures/comp4.d.ts +30 -0
  309. package/lib/mjs/components/textarea/fixtures/comp4.js +25 -0
  310. package/lib/mjs/components/textarea/fixtures/index.d.ts +2 -1
  311. package/lib/mjs/components/textarea/fixtures/index.js +2 -1
  312. package/lib/mjs/components/textfield/TextField.d.ts +22 -0
  313. package/lib/mjs/components/textfield/TextField.js +14 -3
  314. package/lib/mjs/components/time/Time.d.ts +11 -0
  315. package/lib/mjs/components/time/Time.js +12 -1
  316. package/lib/mjs/components/tree/Tree.d.ts +5 -4
  317. package/lib/mjs/components/tree/Tree.form.js +5 -0
  318. package/lib/mjs/components/tree/Tree.js +8 -9
  319. package/lib/mjs/components/tree/editForm/Tree.edit.display.d.ts +9 -0
  320. package/lib/mjs/components/tree/editForm/Tree.edit.display.js +10 -0
  321. package/lib/mjs/components/well/Well.d.ts +2 -0
  322. package/lib/mjs/components/well/Well.js +4 -0
  323. package/lib/mjs/formio.embed.d.ts +2 -1
  324. package/lib/mjs/formio.embed.js +96 -2
  325. package/lib/mjs/formio.form.d.ts +4 -3
  326. package/lib/mjs/formio.form.js +16 -8
  327. package/lib/mjs/licenses/Licenses.d.ts +7 -0
  328. package/lib/mjs/licenses/Licenses.js +17 -0
  329. package/lib/mjs/licenses/index.d.ts +2 -0
  330. package/lib/mjs/licenses/index.js +2 -0
  331. package/lib/mjs/providers/Providers.d.ts +31 -11
  332. package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +2 -2
  333. package/lib/mjs/providers/address/GoogleAddressProvider.js +2 -3
  334. package/lib/mjs/providers/processor/fileProcessor.d.ts +1 -1
  335. package/lib/mjs/providers/processor/fileProcessor.js +1 -2
  336. package/lib/mjs/providers/storage/azure.d.ts +10 -1
  337. package/lib/mjs/providers/storage/azure.js +7 -2
  338. package/lib/mjs/providers/storage/base64.d.ts +2 -2
  339. package/lib/mjs/providers/storage/base64.js +2 -3
  340. package/lib/mjs/providers/storage/dropbox.d.ts +2 -2
  341. package/lib/mjs/providers/storage/dropbox.js +2 -3
  342. package/lib/mjs/providers/storage/googleDrive.d.ts +3 -2
  343. package/lib/mjs/providers/storage/googleDrive.js +6 -3
  344. package/lib/mjs/providers/storage/indexeddb.d.ts +3 -3
  345. package/lib/mjs/providers/storage/indexeddb.js +9 -10
  346. package/lib/mjs/providers/storage/s3.d.ts +11 -1
  347. package/lib/mjs/providers/storage/s3.js +5 -2
  348. package/lib/mjs/providers/storage/uploadAdapter.js +1 -2
  349. package/lib/mjs/providers/storage/url.d.ts +2 -2
  350. package/lib/mjs/providers/storage/url.js +12 -5
  351. package/lib/mjs/providers/storage/xhr.d.ts +1 -1
  352. package/lib/mjs/providers/storage/xhr.js +1 -2
  353. package/lib/mjs/templates/index.d.ts +226 -1
  354. package/lib/mjs/utils/Evaluator.js +4 -33
  355. package/lib/mjs/utils/i18n.d.ts +16 -0
  356. package/lib/mjs/utils/i18n.js +81 -0
  357. package/lib/mjs/utils/utils.d.ts +11 -1
  358. package/lib/mjs/utils/utils.js +27 -9
  359. package/lib/mjs/validator/Validator.d.ts +30 -2
  360. package/lib/mjs/validator/Validator.js +31 -9
  361. package/lib/mjs/validator/rules/Select.js +1 -2
  362. package/lib/mjs/validator/rules/Unique.d.ts +1 -1
  363. package/lib/mjs/validator/rules/Unique.js +1 -2
  364. package/lib/mjs/widgets/CalendarWidget.d.ts +1 -0
  365. package/lib/mjs/widgets/InputWidget.d.ts +1 -1
  366. package/lib/mjs/widgets/InputWidget.js +1 -2
  367. package/package.json +18 -15
  368. package/types/index.d.ts +1 -0
  369. package/types/licenses.d.ts +7 -0
  370. package/types/utils.d.ts +2 -0
@@ -1,6 +1,5 @@
1
1
  /* globals Quill, ClassicEditor, CKEDITOR */
2
2
  import { conformToMask } from '@formio/vanilla-text-mask';
3
- import NativePromise from 'native-promise-only';
4
3
  import tippy from 'tippy.js';
5
4
  import _ from 'lodash';
6
5
  import isMobile from 'ismobilejs';
@@ -173,6 +172,31 @@ export default class Component extends Element {
173
172
  static get Validator() {
174
173
  return Validator;
175
174
  }
175
+ /**
176
+ * Return the simple condition settings as part of the component.
177
+ *
178
+ * @return {Object}
179
+ *
180
+ */
181
+ static get conditionOperatorsSettings() {
182
+ return {
183
+ operators: ['isEqual', 'isNotEqual', 'isEmpty', 'isNotEmpty'],
184
+ valueComponent() {
185
+ return { type: 'textfield' };
186
+ }
187
+ };
188
+ }
189
+ /**
190
+ * Return the array of possible types of component value absed on its schema.
191
+ *
192
+ * @param schema
193
+ * @return {Array}
194
+ *
195
+ */
196
+ static savedValueTypes(schema) {
197
+ schema = schema || {};
198
+ return FormioUtils.getComponentSavedTypes(schema) || [FormioUtils.componentValueTypes.any];
199
+ }
176
200
  /**
177
201
  * Provides a table view for this component. Override if you wish to do something different than using getView
178
202
  * method of your instance.
@@ -409,7 +433,7 @@ export default class Component extends Element {
409
433
  }
410
434
  // Allow componets to notify when ready.
411
435
  get ready() {
412
- return NativePromise.resolve(this);
436
+ return Promise.resolve(this);
413
437
  }
414
438
  get isPDFReadOnlyMode() {
415
439
  return this.parent &&
@@ -894,7 +918,7 @@ export default class Component extends Element {
894
918
  * @return {*}
895
919
  */
896
920
  beforePage() {
897
- return NativePromise.resolve(true);
921
+ return Promise.resolve(true);
898
922
  }
899
923
  beforeNext() {
900
924
  return this.beforePage(true);
@@ -906,7 +930,7 @@ export default class Component extends Element {
906
930
  * @return {*}
907
931
  */
908
932
  beforeSubmit() {
909
- return NativePromise.resolve(true);
933
+ return Promise.resolve(true);
910
934
  }
911
935
  /**
912
936
  * Return the submission timezone.
@@ -1056,7 +1080,7 @@ export default class Component extends Element {
1056
1080
  }
1057
1081
  this.restoreFocus();
1058
1082
  this.addons.forEach((addon) => addon.attach(element));
1059
- return NativePromise.resolve();
1083
+ return Promise.resolve();
1060
1084
  }
1061
1085
  restoreFocus() {
1062
1086
  const isFocused = this.root?.focusedComponent?.path === this.path;
@@ -1370,6 +1394,9 @@ export default class Component extends Element {
1370
1394
  });
1371
1395
  return customCSS;
1372
1396
  }
1397
+ static get serverConditionSettings() {
1398
+ return Component.conditionOperatorsSettings;
1399
+ }
1373
1400
  get isMobile() {
1374
1401
  return isMobile();
1375
1402
  }
@@ -1499,7 +1526,7 @@ export default class Component extends Element {
1499
1526
  // Don't bother if we have not built yet.
1500
1527
  if (!this.element || !this.element.parentNode || this.optimizeRedraw) {
1501
1528
  // Return a non-resolving promise.
1502
- return NativePromise.resolve();
1529
+ return Promise.resolve();
1503
1530
  }
1504
1531
  this.detach();
1505
1532
  this.emit('redraw');
@@ -1930,12 +1957,12 @@ export default class Component extends Element {
1930
1957
  return Formio.requireLibrary('ckeditor', isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', _.get(this.options, 'editors.ckeditor.src', `${Formio.cdn.ckeditor}/ckeditor.js`), true)
1931
1958
  .then(() => {
1932
1959
  if (!element.parentNode) {
1933
- return NativePromise.reject();
1960
+ return Promise.reject();
1934
1961
  }
1935
1962
  if (isIEBrowser) {
1936
1963
  const editor = CKEDITOR.replace(element);
1937
1964
  editor.on('change', () => onChange(editor.getData()));
1938
- return NativePromise.resolve(editor);
1965
+ return Promise.resolve(editor);
1939
1966
  }
1940
1967
  else {
1941
1968
  return ClassicEditor.create(element, settings).then(editor => {
@@ -1965,7 +1992,7 @@ export default class Component extends Element {
1965
1992
  return Formio.requireLibrary('quill-table', 'Quill', `${Formio.cdn.baseUrl}/quill/quill-table.js`, true)
1966
1993
  .then(() => {
1967
1994
  if (!element.parentNode) {
1968
- return NativePromise.reject();
1995
+ return Promise.reject();
1969
1996
  }
1970
1997
  this.quill = new Quill(element, isIEBrowser ? { ...settings, modules: {} } : settings);
1971
1998
  /** This block of code adds the [source] capabilities. See https://codepen.io/anon/pen/ZyEjrQ **/
@@ -2414,6 +2441,9 @@ export default class Component extends Element {
2414
2441
  const dataValue = this.dataValue;
2415
2442
  // Calculate the new value.
2416
2443
  let calculatedValue = this.doValueCalculation(dataValue, data, row, flags);
2444
+ if (this.options.readOnly && dataValue && !calculatedValue) {
2445
+ return false;
2446
+ }
2417
2447
  if (_.isNil(calculatedValue)) {
2418
2448
  calculatedValue = this.emptyValue;
2419
2449
  }
@@ -2563,7 +2593,7 @@ export default class Component extends Element {
2563
2593
  const { async = false, silentCheck = false } = options;
2564
2594
  if (this.shouldSkipValidation(data, dirty, row)) {
2565
2595
  this.setCustomValidity('');
2566
- return async ? NativePromise.resolve(true) : true;
2596
+ return async ? Promise.resolve(true) : true;
2567
2597
  }
2568
2598
  const check = Validator.checkComponent(this, data, row, true, async);
2569
2599
  let validations = check;
@@ -2582,7 +2612,7 @@ export default class Component extends Element {
2582
2612
  return isValid;
2583
2613
  }
2584
2614
  checkAsyncValidity(data, dirty, row, silentCheck) {
2585
- return NativePromise.resolve(this.checkComponentValidity(data, dirty, row, { async: true, silentCheck }));
2615
+ return Promise.resolve(this.checkComponentValidity(data, dirty, row, { async: true, silentCheck }));
2586
2616
  }
2587
2617
  /**
2588
2618
  * Check the conditions, calculations, and validity of a single component and triggers an update if
@@ -2821,7 +2851,7 @@ export default class Component extends Element {
2821
2851
  return this.dataReady;
2822
2852
  }
2823
2853
  get dataReady() {
2824
- return NativePromise.resolve();
2854
+ return Promise.resolve();
2825
2855
  }
2826
2856
  /**
2827
2857
  * Prints out the value of this component as a string value.
@@ -3057,7 +3087,7 @@ Component.externalLibraries = {};
3057
3087
  Component.requireLibrary = function (name, property, src, polling) {
3058
3088
  if (!Component.externalLibraries.hasOwnProperty(name)) {
3059
3089
  Component.externalLibraries[name] = {};
3060
- Component.externalLibraries[name].ready = new NativePromise((resolve, reject) => {
3090
+ Component.externalLibraries[name].ready = new Promise((resolve, reject) => {
3061
3091
  Component.externalLibraries[name].resolve = resolve;
3062
3092
  Component.externalLibraries[name].reject = reject;
3063
3093
  });
@@ -3130,5 +3160,5 @@ Component.libraryReady = function (name) {
3130
3160
  Component.externalLibraries[name].ready) {
3131
3161
  return Component.externalLibraries[name].ready;
3132
3162
  }
3133
- return NativePromise.reject(`${name} library was not required.`);
3163
+ return Promise.reject(`${name} library was not required.`);
3134
3164
  };
@@ -31,7 +31,7 @@ export default class Input extends Multivalue {
31
31
  parseValue(value: any): any;
32
32
  formatValue(value: any): any;
33
33
  getWidget(index: any): any;
34
- attachElement(element: any, index: any): any;
34
+ attachElement(element: any, index: any): Promise<void>;
35
35
  /**
36
36
  * Creates an instance of a widget for this component.
37
37
  *
@@ -1,7 +1,6 @@
1
1
  import Multivalue from '../multivalue/Multivalue';
2
2
  import { convertStringToHTMLElement } from '../../../utils/utils';
3
3
  import Widgets from '../../../widgets';
4
- import NativePromise from 'native-promise-only';
5
4
  import _ from 'lodash';
6
5
  export default class Input extends Multivalue {
7
6
  constructor(component, options, data) {
@@ -213,7 +212,7 @@ export default class Input extends Multivalue {
213
212
  element.widget.destroy();
214
213
  }
215
214
  // Attach the widget.
216
- let promise = NativePromise.resolve();
215
+ let promise = Promise.resolve();
217
216
  element.widget = this.createWidget(index);
218
217
  if (element.widget) {
219
218
  promise = element.widget.attach(element);
@@ -1,5 +1,9 @@
1
1
  export default class ListComponent extends Field {
2
2
  get isSelectURL(): boolean;
3
+ get selectData(): any;
4
+ get shouldLoad(): any;
5
+ getTemplateKeys(): void;
6
+ templateKeys: any[] | undefined;
3
7
  get requestHeaders(): any;
4
8
  setItems(): void;
5
9
  updateCustomItems(): void;
@@ -1,7 +1,6 @@
1
1
  import Field from '../field/Field';
2
2
  import { Formio } from '../../../Formio';
3
3
  import _ from 'lodash';
4
- import NativePromise from 'native-promise-only';
5
4
  export default class ListComponent extends Field {
6
5
  static schema(...extend) {
7
6
  return Field.schema({
@@ -17,6 +16,46 @@ export default class ListComponent extends Field {
17
16
  get isSelectURL() {
18
17
  return this.component.dataSrc === 'url';
19
18
  }
19
+ get selectData() {
20
+ const selectData = _.get(this.root, 'submission.metadata.selectData', {});
21
+ return _.get(selectData, this.path);
22
+ }
23
+ get shouldLoad() {
24
+ if (this.loadingError) {
25
+ return false;
26
+ }
27
+ // Live forms should always load.
28
+ if (!this.options.readOnly) {
29
+ return true;
30
+ }
31
+ // If there are template keys, then we need to see if we have the data.
32
+ if (this.templateKeys && this.templateKeys.length) {
33
+ // See if we already have the data we need.
34
+ const dataValue = this.dataValue;
35
+ const selectData = this.selectData;
36
+ return this.templateKeys.reduce((shouldLoad, key) => {
37
+ const hasValue = _.has(dataValue, key) ||
38
+ (_.isArray(selectData) ? selectData.every((data) => _.has(data, key)) : _.has(selectData, key));
39
+ return shouldLoad || !hasValue;
40
+ }, false);
41
+ }
42
+ // Return that we should load.
43
+ return true;
44
+ }
45
+ getTemplateKeys() {
46
+ this.templateKeys = [];
47
+ if (this.options.readOnly && this.component.template) {
48
+ const keys = this.component.template.match(/({{\s*(.*?)\s*}})/g);
49
+ if (keys) {
50
+ keys.forEach((key) => {
51
+ const propKey = key.match(/{{\s*item\.(.*?)\s*}}/);
52
+ if (propKey && propKey.length > 1) {
53
+ this.templateKeys.push(propKey[1]);
54
+ }
55
+ });
56
+ }
57
+ }
58
+ }
20
59
  get requestHeaders() {
21
60
  // Create the headers object.
22
61
  const headers = new Formio.Headers();
@@ -64,10 +103,9 @@ export default class ListComponent extends Field {
64
103
  const template = this.sanitize(this.getOptionTemplate(data, value), this.shouldSanitizeValue);
65
104
  if (template) {
66
105
  const label = template.replace(/<\/?[^>]+(>|$)/g, '');
67
- const hasTranslator = this.i18next?.translator;
68
- if (!label || (hasTranslator && !this.t(label, { _userInput: true })))
106
+ if (!label)
69
107
  return;
70
- return hasTranslator ? template.replace(label, this.t(label, { _userInput: true })) : label;
108
+ return template.replace(label, this.t(label, { _userInput: true }));
71
109
  }
72
110
  else {
73
111
  return this.sanitize(JSON.stringify(data), this.shouldSanitizeValue);
@@ -186,7 +224,7 @@ export default class ListComponent extends Field {
186
224
  const db = event.target.result;
187
225
  const transaction = db.transaction(this.component.indexeddb.table, 'readwrite');
188
226
  const objectStore = transaction.objectStore(this.component.indexeddb.table);
189
- new NativePromise((resolve) => {
227
+ new Promise((resolve) => {
190
228
  const responseItems = [];
191
229
  objectStore.getAll().onsuccess = (event) => {
192
230
  event.target.result.forEach((item) => {
@@ -4,6 +4,7 @@ export default class Multivalue extends Field {
4
4
  render(): any;
5
5
  renderElement(): string;
6
6
  renderRow(value: any, index: any): any;
7
+ attach(dom: any): Promise<any[]>;
7
8
  /**
8
9
  * Attach inputs to the element.
9
10
  *
@@ -1,5 +1,4 @@
1
1
  import Field from '../field/Field';
2
- import NativePromise from 'native-promise-only';
3
2
  import _ from 'lodash';
4
3
  export default class Multivalue extends Field {
5
4
  get dataValue() {
@@ -73,7 +72,7 @@ export default class Multivalue extends Field {
73
72
  promises.push(this.attachElement.call(this, element, index));
74
73
  });
75
74
  if (!this.component.multiple) {
76
- return NativePromise.all(promises);
75
+ return Promise.all(promises);
77
76
  }
78
77
  this.refs.removeRow.forEach((removeButton, index) => {
79
78
  this.addEventListener(removeButton, 'click', (event) => {
@@ -89,7 +88,7 @@ export default class Multivalue extends Field {
89
88
  });
90
89
  });
91
90
  return superAttach.then(() => {
92
- return NativePromise.all(promises);
91
+ return Promise.all(promises);
93
92
  });
94
93
  }
95
94
  detach() {
@@ -181,7 +180,14 @@ export default class Multivalue extends Field {
181
180
  // Saves current caret position to restore it after the component is redrawn
182
181
  saveCaretPosition(element, index) {
183
182
  if (this.root?.focusedComponent?.path === this.path) {
184
- this.root.currentSelection = { selection: [element.selectionStart, element.selectionEnd], index };
183
+ try {
184
+ this.root.currentSelection = { selection: [element.selectionStart, element.selectionEnd], index };
185
+ }
186
+ catch (e) {
187
+ if (!(e instanceof DOMException)) {
188
+ console.debug(e);
189
+ }
190
+ }
185
191
  }
186
192
  }
187
193
  onSelectMaskHandler(event) {
@@ -4,7 +4,8 @@ export default class NestedComponent extends Field {
4
4
  _collapsed: boolean;
5
5
  set collapsed(arg: boolean);
6
6
  get collapsed(): boolean;
7
- collapse(value: any): any;
7
+ collapse(value: any): Promise<void>;
8
+ get ready(): Promise<any[]>;
8
9
  set rowIndex(arg: any);
9
10
  get rowIndex(): any;
10
11
  _rowIndex: any;
@@ -78,8 +79,9 @@ export default class NestedComponent extends Field {
78
79
  addComponent(component: Object, data: Object, before: HTMLElement, noAdd: any): Component;
79
80
  beforeFocus(): void;
80
81
  renderComponents(components: any): any;
82
+ attach(element: any): Promise<[void, void]>;
81
83
  attachComponentsLogic(components: any): void;
82
- attachComponents(element: any, components: any, container: any): any;
84
+ attachComponents(element: any, components: any, container: any): Promise<any>;
83
85
  /**
84
86
  * Remove a component from the components array.
85
87
  *
@@ -123,6 +125,7 @@ export default class NestedComponent extends Field {
123
125
  get isPristine(): any;
124
126
  destroyComponents(all?: boolean): void;
125
127
  get errors(): any;
128
+ get dataReady(): Promise<any[]>;
126
129
  setNestedValue(component: any, value: any, flags?: {}): any;
127
130
  setValue(value: any, flags?: {}): any;
128
131
  get lazyLoad(): any;
@@ -2,7 +2,6 @@
2
2
  import _ from 'lodash';
3
3
  import Field from '../field/Field';
4
4
  import Components from '../../Components';
5
- import NativePromise from 'native-promise-only';
6
5
  import { getArrayFromComponentPath, getStringFromComponentPath, getRandomComponentId } from '../../../utils/utils';
7
6
  export default class NestedComponent extends Field {
8
7
  static schema(...extend) {
@@ -96,7 +95,7 @@ export default class NestedComponent extends Field {
96
95
  return super.parentDisabled;
97
96
  }
98
97
  get ready() {
99
- return NativePromise.all(this.getComponents().map(component => component.ready));
98
+ return Promise.all(this.getComponents().map(component => component.ready));
100
99
  }
101
100
  get currentForm() {
102
101
  return super.currentForm;
@@ -401,7 +400,7 @@ export default class NestedComponent extends Field {
401
400
  collapsed: this.collapsed,
402
401
  [this.nestedKey]: 'single',
403
402
  });
404
- let childPromise = NativePromise.resolve();
403
+ let childPromise = Promise.resolve();
405
404
  if (this.refs[this.nestedKey]) {
406
405
  childPromise = this.attachComponents(this.refs[this.nestedKey]);
407
406
  }
@@ -419,7 +418,7 @@ export default class NestedComponent extends Field {
419
418
  }
420
419
  });
421
420
  }
422
- return NativePromise.all([
421
+ return Promise.all([
423
422
  superPromise,
424
423
  childPromise,
425
424
  ]);
@@ -439,7 +438,7 @@ export default class NestedComponent extends Field {
439
438
  element = this.hook('attachComponents', element, components, container, this);
440
439
  if (!element) {
441
440
  // Return a non-resolving promise.
442
- return (new NativePromise(() => { }));
441
+ return (new Promise(() => { }));
443
442
  }
444
443
  let index = 0;
445
444
  const promises = [];
@@ -449,7 +448,7 @@ export default class NestedComponent extends Field {
449
448
  index++;
450
449
  }
451
450
  });
452
- return NativePromise.all(promises);
451
+ return Promise.all(promises);
453
452
  }
454
453
  /**
455
454
  * Remove a component from the components array.
@@ -560,7 +559,7 @@ export default class NestedComponent extends Field {
560
559
  * @return {*}
561
560
  */
562
561
  beforePage(next) {
563
- return NativePromise.all(this.getComponents().map((comp) => comp.beforePage(next)));
562
+ return Promise.all(this.getComponents().map((comp) => comp.beforePage(next)));
564
563
  }
565
564
  /**
566
565
  * Allow components to hook into the submission to provide their own async data.
@@ -568,7 +567,7 @@ export default class NestedComponent extends Field {
568
567
  * @return {*}
569
568
  */
570
569
  beforeSubmit() {
571
- return NativePromise.all(this.getComponents().map((comp) => comp.beforeSubmit()));
570
+ return Promise.all(this.getComponents().map((comp) => comp.beforeSubmit()));
572
571
  }
573
572
  calculateValue(data, flags, row) {
574
573
  // Do not iterate into children and calculateValues if this nested component is conditionally hidden.
@@ -599,7 +598,7 @@ export default class NestedComponent extends Field {
599
598
  return this.ready.then(() => {
600
599
  const promises = [super.checkAsyncValidity(data, dirty, row, silentCheck)];
601
600
  this.eachComponent((component) => promises.push(component.checkAsyncValidity(data, dirty, row, silentCheck)));
602
- return NativePromise.all(promises).then((results) => results.reduce((valid, result) => (valid && result), true));
601
+ return Promise.all(promises).then((results) => results.reduce((valid, result) => (valid && result), true));
603
602
  });
604
603
  }
605
604
  setPristine(pristine) {
@@ -648,7 +647,7 @@ export default class NestedComponent extends Field {
648
647
  this.setPristine(true);
649
648
  }
650
649
  get dataReady() {
651
- return NativePromise.all(this.getComponents().map((component) => component.dataReady));
650
+ return Promise.all(this.getComponents().map((component) => component.dataReady));
652
651
  }
653
652
  setNestedValue(component, value, flags = {}) {
654
653
  component._data = this.componentContext(component);
@@ -1,4 +1,5 @@
1
1
  export default class NestedArrayComponent extends NestedDataComponent {
2
+ static savedValueTypes(): string[];
2
3
  componentContext(component: any): any;
3
4
  get iteratableRows(): void;
4
5
  prevHasAddButton: any;
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
  import _ from 'lodash';
3
+ import { componentValueTypes } from '../../../utils/utils';
3
4
  import Component from '../component/Component';
4
5
  import NestedDataComponent from '../nesteddata/NestedDataComponent';
5
6
  export default class NestedArrayComponent extends NestedDataComponent {
@@ -8,6 +9,9 @@ export default class NestedArrayComponent extends NestedDataComponent {
8
9
  disableAddingRemovingRows: false
9
10
  }, ...extend);
10
11
  }
12
+ static savedValueTypes() {
13
+ return [componentValueTypes.array];
14
+ }
11
15
  componentContext(component) {
12
16
  return this.iteratableRows[component.rowIndex].data;
13
17
  }
@@ -1,4 +1,5 @@
1
1
  export default class NestedDataComponent extends NestedComponent {
2
+ static savedValueTypes(schema: any): string[];
2
3
  hasChanged(newValue: any, oldValue: any): boolean;
3
4
  get allowData(): boolean;
4
5
  get emptyValue(): {};
@@ -2,6 +2,7 @@
2
2
  import Component from '../component/Component';
3
3
  import NestedComponent from '../nested/NestedComponent';
4
4
  import _ from 'lodash';
5
+ import { componentValueTypes, getComponentSavedTypes } from '../../../utils/utils';
5
6
  export default class NestedDataComponent extends NestedComponent {
6
7
  hasChanged(newValue, oldValue) {
7
8
  // If we do not have a value and are getting set to anything other than undefined or null, then we changed.
@@ -12,6 +13,9 @@ export default class NestedDataComponent extends NestedComponent {
12
13
  }
13
14
  return !_.isEqual(newValue, oldValue);
14
15
  }
16
+ static savedValueTypes(schema) {
17
+ return getComponentSavedTypes(schema) || [componentValueTypes.object];
18
+ }
15
19
  get allowData() {
16
20
  return true;
17
21
  }
@@ -3,6 +3,14 @@ export namespace AddressComponentMode {
3
3
  const Manual: string;
4
4
  }
5
5
  export default class AddressComponent extends ContainerComponent {
6
+ static get builderInfo(): {
7
+ title: string;
8
+ group: string;
9
+ icon: string;
10
+ documentation: string;
11
+ weight: number;
12
+ schema: any;
13
+ };
6
14
  static get modeSwitcherRef(): string;
7
15
  static get removeValueIconRef(): string;
8
16
  static get searchInputRef(): string;
@@ -5,6 +5,7 @@ import { GoogleAddressProvider } from '../../providers/address/GoogleAddressProv
5
5
  import Field from '../_classes/field/Field';
6
6
  import NestedComponent from '../_classes/nested/NestedComponent';
7
7
  import ContainerComponent from '../container/Container';
8
+ import { componentValueTypes, getComponentSavedTypes } from '../../utils/utils';
8
9
  export const AddressComponentMode = {
9
10
  Autocomplete: 'autocomplete',
10
11
  Manual: 'manual',
@@ -76,6 +77,10 @@ export default class AddressComponent extends ContainerComponent {
76
77
  ],
77
78
  }, ...extend);
78
79
  }
80
+ static savedValueTypes(schema) {
81
+ schema = schema || {};
82
+ return getComponentSavedTypes(schema) || [componentValueTypes.object];
83
+ }
79
84
  static get builderInfo() {
80
85
  return {
81
86
  title: 'Address',
@@ -7,6 +7,7 @@ export default class ButtonComponent extends Field {
7
7
  weight: number;
8
8
  schema: any;
9
9
  };
10
+ static savedValueTypes(schema: any): string[];
10
11
  constructor(component: any, options: any, data: any);
11
12
  filesUploading: any[];
12
13
  get inputInfo(): {
@@ -1,8 +1,7 @@
1
1
  import _ from 'lodash';
2
- import NativePromise from 'native-promise-only';
3
2
  import Field from '../_classes/field/Field';
4
3
  import Input from '../_classes/input/Input';
5
- import { eachComponent, getArrayFromComponentPath } from '../../utils/utils';
4
+ import { componentValueTypes, eachComponent, getArrayFromComponentPath, getComponentSavedTypes } from '../../utils/utils';
6
5
  export default class ButtonComponent extends Field {
7
6
  static schema(...extend) {
8
7
  return Input.schema({
@@ -30,6 +29,9 @@ export default class ButtonComponent extends Field {
30
29
  schema: ButtonComponent.schema()
31
30
  };
32
31
  }
32
+ static savedValueTypes(schema) {
33
+ return getComponentSavedTypes(schema) || [componentValueTypes.boolean];
34
+ }
33
35
  constructor(component, options, data) {
34
36
  super(component, options, data);
35
37
  this.filesUploading = [];
@@ -354,7 +356,7 @@ export default class ButtonComponent extends Field {
354
356
  let params = {
355
357
  response_type: 'code',
356
358
  client_id: settings.clientId,
357
- redirect_uri: settings.redirectURI || window.location.origin || `${window.location.protocol}//${window.location.host}`,
359
+ redirect_uri: (settings.redirectURI && this.interpolate(settings.redirectURI)) || window.location.origin || `${window.location.protocol}//${window.location.host}`,
358
360
  state: settings.state,
359
361
  scope: settings.scope
360
362
  };
@@ -393,7 +395,7 @@ export default class ButtonComponent extends Field {
393
395
  return;
394
396
  }
395
397
  // Depending on where the settings came from, submit to either the submission endpoint (old) or oauth endpoint (new).
396
- let requestPromise = NativePromise.resolve();
398
+ let requestPromise = Promise.resolve();
397
399
  if (_.has(this, 'root.form.config.oauth') && this.root.form.config.oauth[this.component.oauthProvider]) {
398
400
  params.provider = settings.provider;
399
401
  params.redirectURI = originalRedirectUri;
@@ -7,6 +7,47 @@ export default class CheckBoxComponent extends Field {
7
7
  weight: number;
8
8
  schema: any;
9
9
  };
10
+ static get serverConditionSettings(): {
11
+ operators: string[];
12
+ valueComponent(): {
13
+ valueType: string;
14
+ data: {
15
+ values: {
16
+ label: string;
17
+ value: string;
18
+ }[];
19
+ };
20
+ type: string;
21
+ };
22
+ constructor: Function;
23
+ toString(): string;
24
+ toLocaleString(): string;
25
+ valueOf(): Object;
26
+ hasOwnProperty(v: PropertyKey): boolean;
27
+ isPrototypeOf(v: Object): boolean;
28
+ propertyIsEnumerable(v: PropertyKey): boolean;
29
+ };
30
+ static get conditionOperatorsSettings(): {
31
+ operators: string[];
32
+ valueComponent(): {
33
+ valueType: string;
34
+ data: {
35
+ values: {
36
+ label: string;
37
+ value: string;
38
+ }[];
39
+ };
40
+ type: string;
41
+ };
42
+ constructor: Function;
43
+ toString(): string;
44
+ toLocaleString(): string;
45
+ valueOf(): Object;
46
+ hasOwnProperty(v: PropertyKey): boolean;
47
+ isPrototypeOf(v: Object): boolean;
48
+ propertyIsEnumerable(v: PropertyKey): boolean;
49
+ };
50
+ static savedValueTypes(schema: any): string[] | null;
10
51
  get labelClass(): string;
11
52
  get inputInfo(): {
12
53
  type: string;