@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,12 +1,11 @@
1
1
  import Field from '../_classes/field/Field';
2
- import { uniqueName } from '../../utils/utils';
2
+ import { componentValueTypes, getComponentSavedTypes, uniqueName } from '../../utils/utils';
3
3
  import download from 'downloadjs';
4
4
  import _ from 'lodash';
5
- import NativePromise from 'native-promise-only';
6
5
  import fileProcessor from '../../providers/processor/fileProcessor';
7
6
  import BMF from 'browser-md5-file';
8
7
  let Camera;
9
- let webViewCamera = navigator.camera || Camera;
8
+ let webViewCamera = 'undefined' !== typeof window ? navigator.camera : Camera;
10
9
  // canvas.toBlob polyfill.
11
10
  let htmlCanvasElement;
12
11
  if (typeof window !== 'undefined') {
@@ -54,6 +53,19 @@ export default class FileComponent extends Field {
54
53
  schema: FileComponent.schema(),
55
54
  };
56
55
  }
56
+ static get serverConditionSettings() {
57
+ return FileComponent.conditionOperatorsSettings;
58
+ }
59
+ static get conditionOperatorsSettings() {
60
+ return {
61
+ ...super.conditionOperatorsSettings,
62
+ operators: ['isEmpty', 'isNotEmpty'],
63
+ };
64
+ }
65
+ static savedValueTypes(schema) {
66
+ schema = schema || {};
67
+ return getComponentSavedTypes(schema) || [componentValueTypes.object];
68
+ }
57
69
  init() {
58
70
  super.init();
59
71
  webViewCamera = navigator.camera || Camera;
@@ -71,7 +83,7 @@ export default class FileComponent extends Field {
71
83
  this.fileDropHidden = false;
72
84
  }
73
85
  get dataReady() {
74
- return this.filesReady || NativePromise.resolve();
86
+ return this.filesReady || Promise.resolve();
75
87
  }
76
88
  get defaultSchema() {
77
89
  return FileComponent.schema();
@@ -138,7 +150,7 @@ export default class FileComponent extends Field {
138
150
  videoStream.getVideoTracks().forEach((track) => track.stop());
139
151
  }
140
152
  getFrame(videoPlayer) {
141
- return new NativePromise((resolve) => {
153
+ return new Promise((resolve) => {
142
154
  const canvas = document.createElement('canvas');
143
155
  canvas.height = videoPlayer.videoHeight;
144
156
  canvas.width = videoPlayer.videoWidth;
@@ -192,7 +204,7 @@ export default class FileComponent extends Field {
192
204
  });
193
205
  }
194
206
  browseFiles(attrs = {}) {
195
- return new NativePromise((resolve) => {
207
+ return new Promise((resolve) => {
196
208
  const fileInput = this.ce('input', {
197
209
  type: 'file',
198
210
  style: 'height: 0; width: 0; visibility: hidden;',
@@ -237,9 +249,12 @@ export default class FileComponent extends Field {
237
249
  if (this.component.multiple) {
238
250
  options.multiple = true;
239
251
  }
252
+ if (this.component.capture) {
253
+ options.capture = this.component.capture;
254
+ }
240
255
  //use "accept" attribute only for desktop devices because of its limited support by mobile browsers
256
+ const filePattern = this.component.filePattern.trim() || '';
241
257
  if (!this.isMobile.any) {
242
- const filePattern = this.component.filePattern.trim() || '';
243
258
  const imagesPattern = 'image/*';
244
259
  if (this.imageUpload && (!filePattern || filePattern === '*')) {
245
260
  options.accept = imagesPattern;
@@ -251,11 +266,23 @@ export default class FileComponent extends Field {
251
266
  options.accept = filePattern;
252
267
  }
253
268
  }
269
+ // if input capture is set, we need the "accept" attribute to determine which device to launch
270
+ else if (this.component.capture) {
271
+ if (filePattern.includes('video')) {
272
+ options.accept = 'video/*';
273
+ }
274
+ else if (filePattern.includes('audio')) {
275
+ options.accept = 'audio/*';
276
+ }
277
+ else {
278
+ options.accept = 'image/*';
279
+ }
280
+ }
254
281
  return options;
255
282
  }
256
283
  deleteFile(fileInfo) {
257
284
  const { options = {} } = this.component;
258
- if (fileInfo && (['url', 'indexeddb'].includes(this.component.storage))) {
285
+ if (fileInfo && (['url', 'indexeddb', 's3', 'googledrive', 'azure'].includes(this.component.storage))) {
259
286
  const { fileService } = this;
260
287
  if (fileService && typeof fileService.deleteFile === 'function') {
261
288
  fileService.deleteFile(fileInfo, options);
@@ -333,8 +360,10 @@ export default class FileComponent extends Field {
333
360
  this.refs.fileStatusRemove.forEach((fileStatusRemove, index) => {
334
361
  this.addEventListener(fileStatusRemove, 'click', (event) => {
335
362
  event.preventDefault();
336
- if (this.abortUpload) {
337
- this.abortUpload();
363
+ const fileUpload = this.statuses[index];
364
+ _.pull(this.filesUploading, fileUpload.originalName);
365
+ if (fileUpload.abort) {
366
+ fileUpload.abort();
338
367
  }
339
368
  this.statuses.splice(index, 1);
340
369
  this.redraw();
@@ -412,7 +441,7 @@ export default class FileComponent extends Field {
412
441
  const fileService = this.fileService;
413
442
  if (fileService) {
414
443
  const loadingImages = [];
415
- this.filesReady = new NativePromise((resolve, reject) => {
444
+ this.filesReady = new Promise((resolve, reject) => {
416
445
  this.filesReadyResolve = resolve;
417
446
  this.filesReadyReject = reject;
418
447
  });
@@ -420,7 +449,7 @@ export default class FileComponent extends Field {
420
449
  loadingImages.push(this.loadImage(this.dataValue[index]).then((url) => (image.src = url)));
421
450
  });
422
451
  if (loadingImages.length) {
423
- NativePromise.all(loadingImages).then(() => {
452
+ Promise.all(loadingImages).then(() => {
424
453
  this.filesReadyResolve();
425
454
  }).catch(() => this.filesReadyReject());
426
455
  }
@@ -540,6 +569,7 @@ export default class FileComponent extends Field {
540
569
  const fileName = uniqueName(file.name, this.component.fileNameTemplate, this.evalContext());
541
570
  const escapedFileName = file.name ? file.name.replaceAll('<', '&lt;').replaceAll('>', '&gt;') : file.name;
542
571
  const fileUpload = {
572
+ abort: () => null,
543
573
  originalName: escapedFileName,
544
574
  name: fileName,
545
575
  size: file.size,
@@ -658,7 +688,7 @@ export default class FileComponent extends Field {
658
688
  }
659
689
  }
660
690
  }
661
- fileUpload.message = this.t('Starting upload.');
691
+ fileUpload.message = this.t('Starting upload...');
662
692
  this.redraw();
663
693
  const filePromise = fileService.uploadFile(storage, processedFile || file, fileName, dir,
664
694
  // Progress callback
@@ -671,9 +701,7 @@ export default class FileComponent extends Field {
671
701
  // Upload start callback
672
702
  () => {
673
703
  this.emit('fileUploadingStart', filePromise);
674
- },
675
- // Abort upload callback
676
- (abort) => this.abortUpload = abort).then((fileInfo) => {
704
+ }, (abort) => fileUpload.abort = abort).then((fileInfo) => {
677
705
  const index = this.statuses.indexOf(fileUpload);
678
706
  if (index !== -1) {
679
707
  this.statuses.splice(index, 1);
@@ -14,6 +14,10 @@ declare const _default: ({
14
14
  conditional?: undefined;
15
15
  rows?: undefined;
16
16
  editor?: undefined;
17
+ optionsLabelPosition?: undefined;
18
+ inline?: undefined;
19
+ defaultValue?: undefined;
20
+ values?: undefined;
17
21
  components?: undefined;
18
22
  } | {
19
23
  type: string;
@@ -38,6 +42,10 @@ declare const _default: ({
38
42
  data?: undefined;
39
43
  rows?: undefined;
40
44
  editor?: undefined;
45
+ optionsLabelPosition?: undefined;
46
+ inline?: undefined;
47
+ defaultValue?: undefined;
48
+ values?: undefined;
41
49
  components?: undefined;
42
50
  } | {
43
51
  type: string;
@@ -62,6 +70,10 @@ declare const _default: ({
62
70
  data?: undefined;
63
71
  rows?: undefined;
64
72
  editor?: undefined;
73
+ optionsLabelPosition?: undefined;
74
+ inline?: undefined;
75
+ defaultValue?: undefined;
76
+ values?: undefined;
65
77
  components?: undefined;
66
78
  } | {
67
79
  type: string;
@@ -86,6 +98,10 @@ declare const _default: ({
86
98
  valueProperty?: undefined;
87
99
  dataSrc?: undefined;
88
100
  data?: undefined;
101
+ optionsLabelPosition?: undefined;
102
+ inline?: undefined;
103
+ defaultValue?: undefined;
104
+ values?: undefined;
89
105
  components?: undefined;
90
106
  } | {
91
107
  type: string;
@@ -110,6 +126,10 @@ declare const _default: ({
110
126
  data?: undefined;
111
127
  rows?: undefined;
112
128
  editor?: undefined;
129
+ optionsLabelPosition?: undefined;
130
+ inline?: undefined;
131
+ defaultValue?: undefined;
132
+ values?: undefined;
113
133
  components?: undefined;
114
134
  } | {
115
135
  type: string;
@@ -125,6 +145,10 @@ declare const _default: ({
125
145
  conditional?: undefined;
126
146
  rows?: undefined;
127
147
  editor?: undefined;
148
+ optionsLabelPosition?: undefined;
149
+ inline?: undefined;
150
+ defaultValue?: undefined;
151
+ values?: undefined;
128
152
  components?: undefined;
129
153
  } | {
130
154
  type: string;
@@ -140,6 +164,10 @@ declare const _default: ({
140
164
  conditional?: undefined;
141
165
  rows?: undefined;
142
166
  editor?: undefined;
167
+ optionsLabelPosition?: undefined;
168
+ inline?: undefined;
169
+ defaultValue?: undefined;
170
+ values?: undefined;
143
171
  components?: undefined;
144
172
  } | {
145
173
  type: string;
@@ -164,6 +192,10 @@ declare const _default: ({
164
192
  data?: undefined;
165
193
  rows?: undefined;
166
194
  editor?: undefined;
195
+ optionsLabelPosition?: undefined;
196
+ inline?: undefined;
197
+ defaultValue?: undefined;
198
+ values?: undefined;
167
199
  components?: undefined;
168
200
  } | {
169
201
  type: string;
@@ -188,6 +220,32 @@ declare const _default: ({
188
220
  data?: undefined;
189
221
  rows?: undefined;
190
222
  editor?: undefined;
223
+ optionsLabelPosition?: undefined;
224
+ inline?: undefined;
225
+ defaultValue?: undefined;
226
+ values?: undefined;
227
+ components?: undefined;
228
+ } | {
229
+ type: string;
230
+ input: boolean;
231
+ key: string;
232
+ label: string;
233
+ tooltip: string;
234
+ optionsLabelPosition: string;
235
+ inline: boolean;
236
+ defaultValue: boolean;
237
+ values: {
238
+ label: string;
239
+ value: string;
240
+ }[];
241
+ placeholder?: undefined;
242
+ weight?: undefined;
243
+ valueProperty?: undefined;
244
+ dataSrc?: undefined;
245
+ data?: undefined;
246
+ conditional?: undefined;
247
+ rows?: undefined;
248
+ editor?: undefined;
191
249
  components?: undefined;
192
250
  } | {
193
251
  type: string;
@@ -209,5 +267,9 @@ declare const _default: ({
209
267
  conditional?: undefined;
210
268
  rows?: undefined;
211
269
  editor?: undefined;
270
+ optionsLabelPosition?: undefined;
271
+ inline?: undefined;
272
+ defaultValue?: undefined;
273
+ values?: undefined;
212
274
  })[];
213
275
  export default _default;
@@ -78,8 +78,11 @@ export default [
78
78
  input: true,
79
79
  weight: 15,
80
80
  placeholder: `{
81
- "withCredentials": true
82
- }`,
81
+ "withCredentials": true,
82
+ "headers": {
83
+ "Authorization": "Basic <key>"
84
+ }
85
+ }`,
83
86
  conditional: {
84
87
  json: {
85
88
  '===': [{
@@ -204,6 +207,30 @@ export default [
204
207
  json: { '==': [{ var: 'data.webcam' }, true] }
205
208
  }
206
209
  },
210
+ {
211
+ type: 'radio',
212
+ input: true,
213
+ key: 'capture',
214
+ label: 'Enable device capture',
215
+ tooltip: 'This will allow a mobile device to open the camera or microphone directly in capture mode.',
216
+ optionsLabelPosition: 'right',
217
+ inline: true,
218
+ defaultValue: false,
219
+ values: [
220
+ {
221
+ label: 'Disabled',
222
+ value: 'false'
223
+ },
224
+ {
225
+ label: 'Environment (rear camera)',
226
+ value: 'environment'
227
+ },
228
+ {
229
+ label: 'User (front camera)',
230
+ value: 'user'
231
+ }
232
+ ]
233
+ },
207
234
  {
208
235
  type: 'datagrid',
209
236
  input: true,
@@ -7,14 +7,17 @@ export default class FormComponent extends Component {
7
7
  weight: number;
8
8
  schema: any;
9
9
  };
10
+ static savedValueTypes(): string[];
10
11
  init(): any;
11
12
  formObj: any;
12
13
  valueChanged: boolean | undefined;
13
14
  subForm: any;
14
15
  formSrc: any;
16
+ get dataReady(): any;
15
17
  get emptyValue(): {
16
18
  data: {};
17
19
  };
20
+ get ready(): any;
18
21
  get useOriginalRevision(): any;
19
22
  setFormRevision(rev: any): void;
20
23
  subFormRevision: any;
@@ -26,6 +29,7 @@ export default class FormComponent extends Component {
26
29
  * Prints out the value of form components as a datagrid value.
27
30
  */
28
31
  getValueAsString(value: any): any;
32
+ attach(element: any): Promise<any>;
29
33
  get hasLoadedForm(): any;
30
34
  get isRevisionChanged(): any;
31
35
  subFormReady: any;
@@ -2,8 +2,7 @@ import _ from 'lodash';
2
2
  import Component from '../_classes/component/Component';
3
3
  import ComponentModal from '../_classes/componentModal/ComponentModal';
4
4
  import EventEmitter from 'eventemitter3';
5
- import NativePromise from 'native-promise-only';
6
- import { isMongoId, eachComponent, getStringFromComponentPath, getArrayFromComponentPath } from '../../utils/utils';
5
+ import { isMongoId, eachComponent, getStringFromComponentPath, getArrayFromComponentPath, componentValueTypes } from '../../utils/utils';
7
6
  import { Formio } from '../../Formio';
8
7
  import Form from '../../Form';
9
8
  export default class FormComponent extends Component {
@@ -29,6 +28,9 @@ export default class FormComponent extends Component {
29
28
  schema: FormComponent.schema()
30
29
  };
31
30
  }
31
+ static savedValueTypes() {
32
+ return [componentValueTypes.object];
33
+ }
32
34
  init() {
33
35
  super.init();
34
36
  this.formObj = {
@@ -94,7 +96,7 @@ export default class FormComponent extends Component {
94
96
  return this.createSubForm();
95
97
  }
96
98
  get dataReady() {
97
- return this.subFormReady || NativePromise.resolve();
99
+ return this.subFormReady || Promise.resolve();
98
100
  }
99
101
  get defaultValue() {
100
102
  // Not not provide a default value unless the subform is ready so that it will initialize correctly.
@@ -107,7 +109,7 @@ export default class FormComponent extends Component {
107
109
  return { data: {} };
108
110
  }
109
111
  get ready() {
110
- return this.subFormReady || NativePromise.resolve();
112
+ return this.subFormReady || Promise.resolve();
111
113
  }
112
114
  get useOriginalRevision() {
113
115
  return this.component?.useOriginalRevision && !!this.formObj?.revisions;
@@ -381,14 +383,14 @@ export default class FormComponent extends Component {
381
383
  */
382
384
  loadSubForm(fromAttach) {
383
385
  if (this.builderMode || this.isHidden() || (this.isSubFormLazyLoad() && !fromAttach)) {
384
- return NativePromise.resolve();
386
+ return Promise.resolve();
385
387
  }
386
- if (this.hasLoadedForm && !this.isRevisionChanged && !(this.options.pdf && _.isUndefined(this.subFormRevision))) {
388
+ if (this.hasLoadedForm && !this.isRevisionChanged) {
387
389
  // Pass config down to sub forms.
388
390
  if (this.root && this.root.form && this.root.form.config && !this.formObj.config) {
389
391
  this.formObj.config = this.root.form.config;
390
392
  }
391
- return NativePromise.resolve(this.formObj);
393
+ return Promise.resolve(this.formObj);
392
394
  }
393
395
  else if (this.formSrc) {
394
396
  this.subFormLoading = true;
@@ -403,7 +405,7 @@ export default class FormComponent extends Component {
403
405
  return null;
404
406
  });
405
407
  }
406
- return NativePromise.resolve();
408
+ return Promise.resolve();
407
409
  }
408
410
  get subFormData() {
409
411
  return this.dataValue?.data || {};
@@ -465,7 +467,7 @@ export default class FormComponent extends Component {
465
467
  return this.subForm.getSubmission();
466
468
  }
467
469
  else {
468
- return NativePromise.resolve(this.dataValue);
470
+ return Promise.resolve(this.dataValue);
469
471
  }
470
472
  }
471
473
  /**
@@ -490,7 +492,7 @@ export default class FormComponent extends Component {
490
492
  this.subForm.showAllErrors = true;
491
493
  if (rejectOnError) {
492
494
  this.subForm.onSubmissionError(err);
493
- return NativePromise.reject(err);
495
+ return Promise.reject(err);
494
496
  }
495
497
  else {
496
498
  return {};
@@ -519,7 +521,7 @@ export default class FormComponent extends Component {
519
521
  // This submission has already been submitted, so just return the reference data.
520
522
  if (isAlreadySubmitted && !this.subForm?.wizard) {
521
523
  this.dataValue = submission;
522
- return NativePromise.resolve(this.dataValue);
524
+ return Promise.resolve(this.dataValue);
523
525
  }
524
526
  return this.submitSubForm(false)
525
527
  .then(() => {
@@ -5,6 +5,7 @@ export default class HiddenComponent extends Input {
5
5
  icon: string;
6
6
  weight: number;
7
7
  documentation: string;
8
+ showPreview: boolean;
8
9
  schema: any;
9
10
  };
10
11
  get inputInfo(): {
@@ -14,6 +14,7 @@ export default class HiddenComponent extends Input {
14
14
  icon: 'user-secret',
15
15
  weight: 0,
16
16
  documentation: '/userguide/form-building/data-components#hidden',
17
+ showPreview: false,
17
18
  schema: HiddenComponent.schema()
18
19
  };
19
20
  }
@@ -5,8 +5,10 @@ export default class HTMLComponent extends Component {
5
5
  icon: string;
6
6
  weight: number;
7
7
  documentation: string;
8
+ showPreview: boolean;
8
9
  schema: any;
9
10
  };
11
+ static savedValueTypes(): never[];
10
12
  get content(): any;
11
13
  get singleTags(): string[];
12
14
  checkRefreshOn(changed: any): void;
@@ -19,9 +19,13 @@ export default class HTMLComponent extends Component {
19
19
  icon: 'code',
20
20
  weight: 0,
21
21
  documentation: '/userguide/form-building/layout-components#html-element',
22
+ showPreview: false,
22
23
  schema: HTMLComponent.schema()
23
24
  };
24
25
  }
26
+ static savedValueTypes() {
27
+ return [];
28
+ }
25
29
  get defaultSchema() {
26
30
  return HTMLComponent.schema();
27
31
  }
@@ -7,11 +7,34 @@ export default class NumberComponent extends Input {
7
7
  weight: number;
8
8
  schema: any;
9
9
  };
10
+ static get serverConditionSettings(): {
11
+ operators: any[];
12
+ valueComponent(classComp: any): any;
13
+ constructor: Function;
14
+ toString(): string;
15
+ toLocaleString(): string;
16
+ valueOf(): Object;
17
+ hasOwnProperty(v: PropertyKey): boolean;
18
+ isPrototypeOf(v: Object): boolean;
19
+ propertyIsEnumerable(v: PropertyKey): boolean;
20
+ };
21
+ static get conditionOperatorsSettings(): {
22
+ operators: any[];
23
+ valueComponent(classComp: any): any;
24
+ constructor: Function;
25
+ toString(): string;
26
+ toLocaleString(): string;
27
+ valueOf(): Object;
28
+ hasOwnProperty(v: PropertyKey): boolean;
29
+ isPrototypeOf(v: Object): boolean;
30
+ propertyIsEnumerable(v: PropertyKey): boolean;
31
+ };
32
+ static savedValueTypes(schema: any): string[];
10
33
  constructor(...args: any[]);
11
34
  validators: string[];
12
- decimalSeparator: any;
13
35
  delimiter: any;
14
36
  decimalLimit: any;
37
+ decimalSeparator: any;
15
38
  numberMask: any;
16
39
  /**
17
40
  * Creates the number mask for normal numbers.
@@ -1,8 +1,8 @@
1
- import { maskInput, conformToMask } from '@formio/vanilla-text-mask';
2
- import _ from 'lodash';
3
1
  import { createNumberMask } from '@formio/text-mask-addons';
2
+ import { conformToMask, maskInput } from '@formio/vanilla-text-mask';
3
+ import _ from 'lodash';
4
4
  import Input from '../_classes/input/Input';
5
- import { getNumberSeparators, getNumberDecimalLimit } from '../../utils/utils';
5
+ import { getNumberSeparators, getNumberDecimalLimit, componentValueTypes, getComponentSavedTypes } from '../../utils/utils';
6
6
  export default class NumberComponent extends Input {
7
7
  static schema(...extend) {
8
8
  return Input.schema({
@@ -27,13 +27,27 @@ export default class NumberComponent extends Input {
27
27
  schema: NumberComponent.schema()
28
28
  };
29
29
  }
30
+ static get serverConditionSettings() {
31
+ return NumberComponent.conditionOperatorsSettings;
32
+ }
33
+ static get conditionOperatorsSettings() {
34
+ return {
35
+ ...super.conditionOperatorsSettings,
36
+ operators: [...super.conditionOperatorsSettings.operators, 'lessThan', 'greaterThan', 'lessThanOrEqual', 'greaterThanOrEqual'],
37
+ valueComponent(classComp) {
38
+ return { ...classComp, type: 'number' };
39
+ }
40
+ };
41
+ }
42
+ static savedValueTypes(schema) {
43
+ schema = schema || {};
44
+ return getComponentSavedTypes(schema) || [componentValueTypes.number];
45
+ }
30
46
  constructor(...args) {
31
47
  super(...args);
32
48
  this.validators = this.validators.concat(['min', 'max']);
33
49
  const separators = getNumberSeparators(this.options.language || navigator.language);
34
- this.decimalSeparator = this.options.decimalSeparator = this.options.decimalSeparator
35
- || this.options.properties?.decimalSeparator
36
- || separators.decimalSeparator;
50
+ const requireDecimal = _.get(this.component, 'requireDecimal', false);
37
51
  if (this.component.delimiter) {
38
52
  if (this.options.hasOwnProperty('thousandsSeparator')) {
39
53
  console.warn("Property 'thousandsSeparator' is deprecated. Please use i18n to specify delimiter.");
@@ -43,8 +57,10 @@ export default class NumberComponent extends Input {
43
57
  else {
44
58
  this.delimiter = '';
45
59
  }
46
- const requireDecimal = _.get(this.component, 'requireDecimal', false);
47
60
  this.decimalLimit = getNumberDecimalLimit(this.component, requireDecimal ? 2 : 20);
61
+ this.decimalSeparator = this.decimalLimit !== 0 ?
62
+ this.options.decimalSeparator || this.options.properties?.decimalSeparator || separators.decimalSeparator :
63
+ '';
48
64
  // Currencies to override BrowserLanguage Config. Object key {}
49
65
  if (_.has(this.options, `languageOverride.${this.options.language}`)) {
50
66
  const override = _.get(this.options, `languageOverride.${this.options.language}`);
@@ -7,6 +7,7 @@ export default class PanelComponent extends NestedComponent {
7
7
  weight: number;
8
8
  schema: any;
9
9
  };
10
+ static savedValueTypes(): never[];
10
11
  constructor(...args: any[]);
11
12
  noField: boolean;
12
13
  getComponent(path: any, fn: any, originalPath: any): Object;
@@ -33,6 +33,9 @@ export default class PanelComponent extends NestedComponent {
33
33
  get templateName() {
34
34
  return 'panel';
35
35
  }
36
+ static savedValueTypes() {
37
+ return [];
38
+ }
36
39
  constructor(...args) {
37
40
  super(...args);
38
41
  this.noField = true;
@@ -15,6 +15,15 @@ export default function (...extend) {
15
15
  }
16
16
  ]
17
17
  },
18
+ {
19
+ key: 'data',
20
+ components: [
21
+ {
22
+ key: 'case',
23
+ ignore: true
24
+ }
25
+ ]
26
+ },
18
27
  {
19
28
  key: 'validation',
20
29
  components: PhoneNumberEditValidation
@@ -7,6 +7,25 @@ export default class RadioComponent extends ListComponent {
7
7
  documentation: string;
8
8
  schema: any;
9
9
  };
10
+ static get conditionOperatorsSettings(): {
11
+ valueComponent(classComp: any): {
12
+ type: string;
13
+ dataSrc: string;
14
+ valueProperty: string;
15
+ dataType: any;
16
+ data: {
17
+ custom(): any;
18
+ };
19
+ };
20
+ constructor: Function;
21
+ toString(): string;
22
+ toLocaleString(): string;
23
+ valueOf(): Object;
24
+ hasOwnProperty(v: PropertyKey): boolean;
25
+ isPrototypeOf(v: Object): boolean;
26
+ propertyIsEnumerable(v: PropertyKey): boolean;
27
+ };
28
+ static savedValueTypes(schema: any): any[];
10
29
  constructor(component: any, options: any, data: any);
11
30
  previousValue: any;
12
31
  get inputInfo(): {
@@ -23,11 +42,12 @@ export default class RadioComponent extends ListComponent {
23
42
  get emptyValue(): string;
24
43
  get isRadio(): boolean;
25
44
  get optionSelectedClass(): string;
45
+ get listData(): any;
26
46
  templateData: {} | undefined;
27
47
  triggerUpdate: ((...args: any[]) => any) | undefined;
28
- itemsLoaded: any;
29
- itemsLoadedResolve: any;
30
- shouldLoad: boolean | undefined;
48
+ itemsLoaded: Promise<any> | undefined;
49
+ itemsLoadedResolve: ((value: any) => void) | undefined;
50
+ optionsLoaded: boolean | undefined;
31
51
  loadedOptions: any[] | undefined;
32
52
  render(): any;
33
53
  detach(element: any): void;
@@ -36,6 +56,7 @@ export default class RadioComponent extends ListComponent {
36
56
  getValueAsString(value: any): any;
37
57
  setValueAt(index: any, value: any): void;
38
58
  loadItems(url: any, search: any, headers: any, options: any, method: any, body: any): void;
59
+ loadItemsFromMetadata(): void;
39
60
  setItems(items: any): void;
40
61
  setSelectedClasses(): void;
41
62
  updateValue(value: any, flags: any): boolean;