@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
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const lodash_1 = __importDefault(require("lodash"));
7
7
  const ListComponent_1 = __importDefault(require("../_classes/list/ListComponent"));
8
- const native_promise_only_1 = __importDefault(require("native-promise-only"));
9
8
  const Formio_1 = require("../../Formio");
10
9
  const utils_1 = require("../../utils/utils");
11
10
  class RadioComponent extends ListComponent_1.default {
@@ -32,6 +31,36 @@ class RadioComponent extends ListComponent_1.default {
32
31
  schema: RadioComponent.schema()
33
32
  };
34
33
  }
34
+ static get conditionOperatorsSettings() {
35
+ return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { valueComponent(classComp) {
36
+ return {
37
+ type: 'select',
38
+ dataSrc: 'custom',
39
+ valueProperty: 'value',
40
+ dataType: classComp.dataType || '',
41
+ data: {
42
+ custom() {
43
+ return classComp.values;
44
+ }
45
+ },
46
+ };
47
+ } });
48
+ }
49
+ static savedValueTypes(schema) {
50
+ const { boolean, string, number, object, array } = utils_1.componentValueTypes;
51
+ const { dataType } = schema;
52
+ const types = (0, utils_1.getComponentSavedTypes)(schema);
53
+ if (types) {
54
+ return types;
55
+ }
56
+ if (dataType === 'object') {
57
+ return [object, array];
58
+ }
59
+ if (utils_1.componentValueTypes[dataType]) {
60
+ return [utils_1.componentValueTypes[dataType]];
61
+ }
62
+ return [boolean, string, number, object, array];
63
+ }
35
64
  constructor(component, options, data) {
36
65
  super(component, options, data);
37
66
  this.previousValue = this.dataValue || null;
@@ -64,6 +93,10 @@ class RadioComponent extends ListComponent_1.default {
64
93
  get optionSelectedClass() {
65
94
  return 'radio-selected';
66
95
  }
96
+ get listData() {
97
+ const listData = lodash_1.default.get(this.root, 'submission.metadata.listData', {});
98
+ return lodash_1.default.get(listData, this.path);
99
+ }
67
100
  init() {
68
101
  super.init();
69
102
  this.templateData = {};
@@ -79,7 +112,7 @@ class RadioComponent extends ListComponent_1.default {
79
112
  if (typeof this.itemsLoadedResolve === 'function') {
80
113
  this.itemsLoadedResolve();
81
114
  }
82
- this.itemsLoaded = new native_promise_only_1.default((resolve) => {
115
+ this.itemsLoaded = new Promise((resolve) => {
83
116
  this.itemsLoadedResolve = resolve;
84
117
  });
85
118
  if (args.length) {
@@ -87,11 +120,13 @@ class RadioComponent extends ListComponent_1.default {
87
120
  }
88
121
  return triggerUpdate(...updateArgs);
89
122
  };
90
- this.itemsLoaded = new native_promise_only_1.default((resolve) => {
123
+ this.itemsLoaded = new Promise((resolve) => {
91
124
  this.itemsLoadedResolve = resolve;
92
125
  });
93
- this.shouldLoad = true;
126
+ this.optionsLoaded = false;
94
127
  this.loadedOptions = [];
128
+ // Get the template keys for this radio component.
129
+ this.getTemplateKeys();
95
130
  }
96
131
  render() {
97
132
  return super.render(this.renderTemplate('radio', {
@@ -191,6 +226,13 @@ class RadioComponent extends ListComponent_1.default {
191
226
  }
192
227
  }
193
228
  loadItems(url, search, headers, options, method, body) {
229
+ if (this.optionsLoaded) {
230
+ return;
231
+ }
232
+ if (!this.shouldLoad) {
233
+ this.loadItemsFromMetadata();
234
+ return;
235
+ }
194
236
  // Ensure we have a method and remove any body if method is get
195
237
  method = method || 'GET';
196
238
  if (method.toUpperCase() === 'GET') {
@@ -200,33 +242,55 @@ class RadioComponent extends ListComponent_1.default {
200
242
  options.ignoreCache = this.component.ignoreCache;
201
243
  // Make the request.
202
244
  options.header = headers;
203
- if (this.shouldLoad) {
204
- this.loading = true;
205
- Formio_1.Formio.makeRequest(this.options.formio, 'select', url, method, body, options)
206
- .then((response) => {
207
- this.loading = false;
208
- this.error = null;
209
- this.setItems(response);
210
- this.shouldLoad = false;
211
- this.redraw();
212
- })
213
- .catch((err) => {
214
- this.handleLoadingError(err);
215
- });
216
- }
245
+ this.loading = true;
246
+ Formio_1.Formio.makeRequest(this.options.formio, 'select', url, method, body, options)
247
+ .then((response) => {
248
+ this.loading = false;
249
+ this.error = null;
250
+ this.setItems(response);
251
+ this.optionsLoaded = true;
252
+ this.redraw();
253
+ })
254
+ .catch((err) => {
255
+ this.handleLoadingError(err);
256
+ });
257
+ }
258
+ loadItemsFromMetadata() {
259
+ this.listData.forEach((item, i) => {
260
+ this.loadedOptions[i] = {
261
+ label: this.itemTemplate(item)
262
+ };
263
+ if (lodash_1.default.isEqual(item, this.selectData)) {
264
+ this.loadedOptions[i].value = this.dataValue;
265
+ }
266
+ });
267
+ this.optionsLoaded = true;
268
+ this.redraw();
217
269
  }
218
270
  setItems(items) {
271
+ const listData = [];
219
272
  items === null || items === void 0 ? void 0 : items.forEach((item, i) => {
220
273
  this.loadedOptions[i] = {
221
274
  value: item[this.component.valueProperty],
222
275
  label: this.itemTemplate(item, item[this.component.valueProperty])
223
276
  };
277
+ listData.push(this.templateData[item[this.component.valueProperty]]);
224
278
  if (lodash_1.default.isUndefined(item[this.component.valueProperty]) ||
225
279
  lodash_1.default.isObject(item[this.component.valueProperty]) ||
226
280
  (!this.isRadio && lodash_1.default.isBoolean(item[this.component.valueProperty]))) {
227
281
  this.loadedOptions[i].invalid = true;
228
282
  }
229
283
  });
284
+ if (this.isSelectURL) {
285
+ const submission = this.root.submission;
286
+ if (!submission.metadata) {
287
+ submission.metadata = {};
288
+ }
289
+ if (!submission.metadata.listData) {
290
+ submission.metadata.listData = {};
291
+ }
292
+ lodash_1.default.set(submission.metadata.listData, this.path, listData);
293
+ }
230
294
  }
231
295
  setSelectedClasses() {
232
296
  if (this.refs.wrapper) {
@@ -289,6 +353,13 @@ class RadioComponent extends ListComponent_1.default {
289
353
  if (value === 'false') {
290
354
  value = false;
291
355
  }
356
+ if (this.isSelectURL && this.templateData && this.templateData[value]) {
357
+ const submission = this.root.submission;
358
+ if (!submission.metadata.selectData) {
359
+ submission.metadata.selectData = {};
360
+ }
361
+ lodash_1.default.set(submission.metadata.selectData, this.path, this.templateData[value]);
362
+ }
292
363
  return super.normalizeValue(value);
293
364
  }
294
365
  }
@@ -7,13 +7,14 @@ export default class ReCaptchaComponent extends Component {
7
7
  weight: number;
8
8
  schema: any;
9
9
  };
10
+ static savedValueTypes(): never[];
10
11
  render(): any;
11
12
  recaptchaResult: any;
12
13
  createInput(): void;
13
14
  recaptchaApiReady: any;
14
15
  createLabel(): void;
15
16
  verify(actionName: any): void;
16
- recaptchaVerifiedPromise: any;
17
+ recaptchaVerifiedPromise: Promise<void> | undefined;
17
18
  isLoading: boolean | undefined;
18
19
  sendVerificationRequest(token: any): any;
19
20
  checkComponentValidity(data: any, dirty: any, row: any, options?: {}): any;
@@ -8,7 +8,6 @@ const Component_1 = __importDefault(require("../_classes/component/Component"));
8
8
  const Formio_1 = require("../../Formio");
9
9
  const get_1 = __importDefault(require("lodash/get"));
10
10
  const debounce_1 = __importDefault(require("lodash/debounce"));
11
- const native_promise_only_1 = __importDefault(require("native-promise-only"));
12
11
  class ReCaptchaComponent extends Component_1.default {
13
12
  static schema(...extend) {
14
13
  return Component_1.default.schema({
@@ -27,6 +26,9 @@ class ReCaptchaComponent extends Component_1.default {
27
26
  schema: ReCaptchaComponent.schema()
28
27
  };
29
28
  }
29
+ static savedValueTypes() {
30
+ return [];
31
+ }
30
32
  render() {
31
33
  this.recaptchaResult = null;
32
34
  if (this.builderMode) {
@@ -66,7 +68,7 @@ class ReCaptchaComponent extends Component_1.default {
66
68
  this.recaptchaApiReady = Formio_1.Formio.requireLibrary('googleRecaptcha', 'grecaptcha', recaptchaApiScriptUrl, true);
67
69
  }
68
70
  if (this.recaptchaApiReady) {
69
- this.recaptchaVerifiedPromise = new native_promise_only_1.default((resolve, reject) => {
71
+ this.recaptchaVerifiedPromise = new Promise((resolve, reject) => {
70
72
  this.recaptchaApiReady
71
73
  .then(() => {
72
74
  if (!this.isLoading) {
@@ -119,13 +121,13 @@ class ReCaptchaComponent extends Component_1.default {
119
121
  const componentData = row[this.component.key];
120
122
  if (!componentData || !componentData.token) {
121
123
  this.setCustomValidity('ReCAPTCHA: Token is not specified in submission');
122
- return native_promise_only_1.default.resolve(false);
124
+ return Promise.resolve(false);
123
125
  }
124
126
  if (!componentData.success) {
125
127
  this.setCustomValidity('ReCAPTCHA: Token validation error');
126
- return native_promise_only_1.default.resolve(false);
128
+ return Promise.resolve(false);
127
129
  }
128
- return this.hook('validateReCaptcha', componentData.token, () => native_promise_only_1.default.resolve(true))
130
+ return this.hook('validateReCaptcha', componentData.token, () => Promise.resolve(true))
129
131
  .then((success) => success)
130
132
  .catch((err) => {
131
133
  this.setCustomValidity(err.message || err);
@@ -1,3 +1,10 @@
1
1
  export default class ResourceComponent extends SelectComponent {
2
+ static get builderInfo(): {
3
+ title: string;
4
+ icon: string;
5
+ weight: number;
6
+ documentation: string;
7
+ schema: any;
8
+ };
2
9
  }
3
10
  import SelectComponent from '../select/Select';
@@ -19,7 +19,6 @@ class ResourceComponent extends Select_1.default {
19
19
  static get builderInfo() {
20
20
  return {
21
21
  title: 'Resource',
22
- group: 'premium',
23
22
  icon: 'files-o',
24
23
  weight: 90,
25
24
  documentation: '/userguide/form-building/form-components#resource',
@@ -7,7 +7,7 @@ exports.default = [
7
7
  type: 'htmlelement',
8
8
  tag: 'div',
9
9
  className: 'alert alert-danger',
10
- content: 'The Resource component is deprecated. Use the Select component with data source of "Resource" instead.',
10
+ content: 'This component has been deprecated and will be removed in a future version of Formio.js.',
11
11
  },
12
12
  {
13
13
  type: 'select',
@@ -7,11 +7,32 @@ export default class SelectComponent extends ListComponent {
7
7
  documentation: string;
8
8
  schema: any;
9
9
  };
10
+ static get serverConditionSettings(): {
11
+ valueComponent(classComp: any): any;
12
+ constructor: Function;
13
+ toString(): string;
14
+ toLocaleString(): string;
15
+ valueOf(): Object;
16
+ hasOwnProperty(v: PropertyKey): boolean;
17
+ isPrototypeOf(v: Object): boolean;
18
+ propertyIsEnumerable(v: PropertyKey): boolean;
19
+ };
20
+ static get conditionOperatorsSettings(): {
21
+ valueComponent(classComp: any): any;
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 savedValueTypes(schema: any): any[];
10
31
  templateData: {} | undefined;
11
32
  triggerUpdate: ((...args: any[]) => any) | undefined;
12
33
  set itemsLoaded(arg: any);
13
34
  get itemsLoaded(): any;
14
- itemsLoadedResolve: any;
35
+ itemsLoadedResolve: ((value: any) => void) | undefined;
15
36
  isFromSearch: boolean | undefined;
16
37
  searchServerCount: any;
17
38
  defaultServerCount: any;
@@ -19,6 +40,7 @@ export default class SelectComponent extends ListComponent {
19
40
  searchDownloadedResources: any;
20
41
  defaultDownloadedResources: any;
21
42
  activated: boolean | undefined;
43
+ get dataReady(): any;
22
44
  get emptyValue(): {};
23
45
  get valueProperty(): any;
24
46
  get inputInfo(): {
@@ -35,6 +57,7 @@ export default class SelectComponent extends ListComponent {
35
57
  get isSelectResource(): boolean;
36
58
  get itemsFromUrl(): boolean;
37
59
  get isInfiniteScrollProvided(): boolean;
60
+ get shouldInitialLoad(): any;
38
61
  isEntireObjectDisplay(): boolean;
39
62
  selectValueAndLabel(data: any): {
40
63
  value: any;
@@ -55,11 +78,7 @@ export default class SelectComponent extends ListComponent {
55
78
  set downloadedResources(arg: any);
56
79
  get downloadedResources(): any;
57
80
  getSingleItemValueForHTMLMode(data: any): any;
58
- getTemplateKeys(): void;
59
- templateKeys: any[] | undefined;
60
81
  get loadingError(): boolean | undefined;
61
- get selectData(): any;
62
- get shouldLoad(): any;
63
82
  loadItems(url: any, search: any, headers: any, options: any, method: any, body: any): void;
64
83
  getCustomItems(): any;
65
84
  asyncValues: boolean | undefined;
@@ -79,6 +98,7 @@ export default class SelectComponent extends ListComponent {
79
98
  render(): any;
80
99
  wrapElement(element: any): any;
81
100
  choicesOptions(): any;
101
+ attach(element: any): Promise<void> | undefined;
82
102
  focusableElement: any;
83
103
  choices: Choices | null | undefined;
84
104
  scrollList: any;
@@ -7,7 +7,6 @@ const lodash_1 = __importDefault(require("lodash"));
7
7
  const Formio_1 = require("../../Formio");
8
8
  const ListComponent_1 = __importDefault(require("../_classes/list/ListComponent"));
9
9
  const Form_1 = __importDefault(require("../../Form"));
10
- const native_promise_only_1 = __importDefault(require("native-promise-only"));
11
10
  const utils_1 = require("../../utils/utils");
12
11
  const ChoicesWrapper_1 = __importDefault(require("../../utils/ChoicesWrapper"));
13
12
  class SelectComponent extends ListComponent_1.default {
@@ -59,6 +58,32 @@ class SelectComponent extends ListComponent_1.default {
59
58
  schema: SelectComponent.schema()
60
59
  };
61
60
  }
61
+ static get serverConditionSettings() {
62
+ return SelectComponent.conditionOperatorsSettings;
63
+ }
64
+ static get conditionOperatorsSettings() {
65
+ return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { valueComponent(classComp) {
66
+ return Object.assign(Object.assign({}, classComp), { type: 'select' });
67
+ } });
68
+ }
69
+ static savedValueTypes(schema) {
70
+ const { boolean, string, number, object, array } = utils_1.componentValueTypes;
71
+ const { dataType, reference } = schema;
72
+ const types = (0, utils_1.getComponentSavedTypes)(schema);
73
+ if (types) {
74
+ return types;
75
+ }
76
+ if (reference) {
77
+ return [object];
78
+ }
79
+ if (dataType === 'object') {
80
+ return [object, array];
81
+ }
82
+ if (utils_1.componentValueTypes[dataType]) {
83
+ return [utils_1.componentValueTypes[dataType]];
84
+ }
85
+ return [boolean, string, number, object, array];
86
+ }
62
87
  init() {
63
88
  super.init();
64
89
  this.templateData = {};
@@ -74,7 +99,7 @@ class SelectComponent extends ListComponent_1.default {
74
99
  if (typeof this.itemsLoadedResolve === 'function') {
75
100
  this.itemsLoadedResolve();
76
101
  }
77
- this.itemsLoaded = new native_promise_only_1.default((resolve) => {
102
+ this.itemsLoaded = new Promise((resolve) => {
78
103
  this.itemsLoadedResolve = resolve;
79
104
  });
80
105
  if (args.length) {
@@ -94,7 +119,7 @@ class SelectComponent extends ListComponent_1.default {
94
119
  }
95
120
  // If this component has been activated.//
96
121
  this.activated = false;
97
- this.itemsLoaded = new native_promise_only_1.default((resolve) => {
122
+ this.itemsLoaded = new Promise((resolve) => {
98
123
  this.itemsLoadedResolve = resolve;
99
124
  });
100
125
  if (this.isHtmlRenderMode()) {
@@ -109,7 +134,7 @@ class SelectComponent extends ListComponent_1.default {
109
134
  if (this.root &&
110
135
  this.root.submissionSet &&
111
136
  !this.attached) {
112
- return native_promise_only_1.default.resolve();
137
+ return Promise.resolve();
113
138
  }
114
139
  return this.itemsLoaded;
115
140
  }
@@ -170,6 +195,15 @@ class SelectComponent extends ListComponent_1.default {
170
195
  get shouldDisabled() {
171
196
  return super.shouldDisabled || this.parentDisabled;
172
197
  }
198
+ get shouldInitialLoad() {
199
+ if (this.component.widget === 'html5' &&
200
+ this.isEntireObjectDisplay() &&
201
+ this.component.searchField &&
202
+ this.dataValue) {
203
+ return false;
204
+ }
205
+ return super.shouldLoad;
206
+ }
173
207
  isEntireObjectDisplay() {
174
208
  return this.component.dataSrc === 'resource' && this.valueProperty === 'data';
175
209
  }
@@ -194,7 +228,7 @@ class SelectComponent extends ListComponent_1.default {
194
228
  const value = (typeof itemLabel === 'string') ? this.t(itemLabel, { _userInput: true }) : itemLabel;
195
229
  return this.sanitize(value, this.shouldSanitizeValue);
196
230
  }
197
- if (this.component.multiple ? this.dataValue.find((val) => value === val) : (this.dataValue === value)) {
231
+ if (this.component.multiple && lodash_1.default.isArray(this.dataValue) ? this.dataValue.find((val) => value === val) : (this.dataValue === value)) {
198
232
  const selectData = this.selectData;
199
233
  if (selectData) {
200
234
  const templateValue = this.component.reference && (value === null || value === void 0 ? void 0 : value._id) ? value._id.toString() : value;
@@ -437,48 +471,9 @@ class SelectComponent extends ListComponent_1.default {
437
471
  }
438
472
  return defaultValue;
439
473
  }
440
- getTemplateKeys() {
441
- this.templateKeys = [];
442
- if (this.options.readOnly && this.component.template) {
443
- const keys = this.component.template.match(/({{\s*(.*?)\s*}})/g);
444
- if (keys) {
445
- keys.forEach((key) => {
446
- const propKey = key.match(/{{\s*item\.(.*?)\s*}}/);
447
- if (propKey && propKey.length > 1) {
448
- this.templateKeys.push(propKey[1]);
449
- }
450
- });
451
- }
452
- }
453
- }
454
474
  get loadingError() {
455
475
  return !this.component.refreshOn && !this.component.refreshOnBlur && this.networkError;
456
476
  }
457
- get selectData() {
458
- const selectData = lodash_1.default.get(this.root, 'submission.metadata.selectData', {});
459
- return lodash_1.default.get(selectData, this.path);
460
- }
461
- get shouldLoad() {
462
- if (this.loadingError) {
463
- return false;
464
- }
465
- // Live forms should always load.
466
- if (!this.options.readOnly) {
467
- return true;
468
- }
469
- // If there are template keys, then we need to see if we have the data.
470
- if (this.templateKeys && this.templateKeys.length) {
471
- // See if we already have the data we need.
472
- const dataValue = this.dataValue;
473
- const selectData = this.selectData;
474
- return this.templateKeys.reduce((shouldLoad, key) => {
475
- const hasValue = lodash_1.default.has(dataValue, key) || lodash_1.default.has(selectData, key);
476
- return shouldLoad || !hasValue;
477
- }, false);
478
- }
479
- // Return that we should load.
480
- return true;
481
- }
482
477
  loadItems(url, search, headers, options, method, body) {
483
478
  options = options || {};
484
479
  // See if we should load items or not.
@@ -517,7 +512,11 @@ class SelectComponent extends ListComponent_1.default {
517
512
  });
518
513
  // Add search capability.
519
514
  if (this.component.searchField && search) {
520
- const searchValue = Array.isArray(search) ? search.join(',') : search;
515
+ const searchValue = Array.isArray(search)
516
+ ? search.join(',')
517
+ : typeof search === 'object'
518
+ ? JSON.stringify(search)
519
+ : search;
521
520
  query[this.component.searchField] = this.component.searchField.endsWith('__regex')
522
521
  ? lodash_1.default.escapeRegExp(searchValue)
523
522
  : searchValue;
@@ -911,7 +910,7 @@ class SelectComponent extends ListComponent_1.default {
911
910
  const items = this.choices._store.activeItems;
912
911
  if (!items.length) {
913
912
  this.choices._addItem({
914
- value: placeholderValue,
913
+ value: '',
915
914
  label: placeholderValue,
916
915
  choiceId: 0,
917
916
  groupId: -1,
@@ -1082,7 +1081,7 @@ class SelectComponent extends ListComponent_1.default {
1082
1081
  if (this.component.multiple) {
1083
1082
  templateData = {};
1084
1083
  const dataValue = this.dataValue;
1085
- if (dataValue && dataValue.length) {
1084
+ if (dataValue && lodash_1.default.isArray(dataValue) && dataValue.length) {
1086
1085
  dataValue.forEach((dataValueItem) => {
1087
1086
  const dataValueItemValue = this.component.reference ? dataValueItem._id.toString() : dataValueItem;
1088
1087
  templateData[dataValueItemValue] = this.templateData[dataValueItemValue];
@@ -1150,7 +1149,7 @@ class SelectComponent extends ListComponent_1.default {
1150
1149
  }
1151
1150
  setValue(value, flags = {}) {
1152
1151
  const previousValue = this.dataValue;
1153
- if (this.component.widget === 'html5' && (lodash_1.default.isEqual(value, previousValue) || lodash_1.default.isEqual(previousValue, {}) && lodash_1.default.isEqual(flags, {}))) {
1152
+ if (this.component.widget === 'html5' && (lodash_1.default.isEqual(value, previousValue) || lodash_1.default.isEqual(previousValue, {}) && lodash_1.default.isEqual(flags, {})) && !flags.fromSubmission) {
1154
1153
  return false;
1155
1154
  }
1156
1155
  const changed = this.updateValue(value, flags);
@@ -1202,7 +1201,7 @@ class SelectComponent extends ListComponent_1.default {
1202
1201
  !this.active &&
1203
1202
  !this.selectOptions.length &&
1204
1203
  hasValue &&
1205
- this.shouldLoad &&
1204
+ this.shouldInitialLoad &&
1206
1205
  this.visible && (this.component.searchField || this.component.valueProperty);
1207
1206
  }
1208
1207
  setChoicesValue(value, hasPreviousValue, flags = {}) {
@@ -1226,7 +1225,8 @@ class SelectComponent extends ListComponent_1.default {
1226
1225
  else {
1227
1226
  if (hasValue) {
1228
1227
  const values = Array.isArray(value) ? value : [value];
1229
- if (!lodash_1.default.isEqual(this.dataValue, this.defaultValue) && this.selectOptions.length < 2) {
1228
+ if (!lodash_1.default.isEqual(this.dataValue, this.defaultValue) && this.selectOptions.length < 2
1229
+ || (this.selectData && flags.fromSubmission)) {
1230
1230
  const { value, label } = this.selectValueAndLabel(this.dataValue);
1231
1231
  this.addOption(value, label);
1232
1232
  }
@@ -1254,7 +1254,7 @@ class SelectComponent extends ListComponent_1.default {
1254
1254
  }
1255
1255
  }
1256
1256
  get itemsLoaded() {
1257
- return this._itemsLoaded || native_promise_only_1.default.resolve();
1257
+ return this._itemsLoaded || Promise.resolve();
1258
1258
  }
1259
1259
  set itemsLoaded(promise) {
1260
1260
  this._itemsLoaded = promise;
@@ -1,4 +1,41 @@
1
1
  export default class SelectBoxesComponent extends RadioComponent {
2
+ static get serverConditionSettings(): {
3
+ valueComponent(classComp: any): {
4
+ type: string;
5
+ dataSrc: string;
6
+ valueProperty: string;
7
+ valueType: string;
8
+ data: {
9
+ custom: string;
10
+ };
11
+ };
12
+ constructor: Function;
13
+ toString(): string;
14
+ toLocaleString(): string;
15
+ valueOf(): Object;
16
+ hasOwnProperty(v: PropertyKey): boolean;
17
+ isPrototypeOf(v: Object): boolean;
18
+ propertyIsEnumerable(v: PropertyKey): boolean;
19
+ };
20
+ static get conditionOperatorsSettings(): {
21
+ valueComponent(classComp: any): {
22
+ type: string;
23
+ dataSrc: string;
24
+ valueProperty: string;
25
+ valueType: string;
26
+ data: {
27
+ custom: string;
28
+ };
29
+ };
30
+ constructor: Function;
31
+ toString(): string;
32
+ toLocaleString(): string;
33
+ valueOf(): Object;
34
+ hasOwnProperty(v: PropertyKey): boolean;
35
+ isPrototypeOf(v: Object): boolean;
36
+ propertyIsEnumerable(v: PropertyKey): boolean;
37
+ };
38
+ static savedValueTypes(schema: any): string[];
2
39
  constructor(...args: any[]);
3
40
  validators: string[];
4
41
  get emptyValue(): any;