@formio/js 5.0.0-rc.27 → 5.0.0-rc.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/dist/fonts/bootstrap-icons.woff +0 -0
  2. package/dist/fonts/bootstrap-icons.woff2 +0 -0
  3. package/dist/formio.embed.js +1 -1
  4. package/dist/formio.embed.min.js +1 -1
  5. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  6. package/dist/formio.form.js +957 -2270
  7. package/dist/formio.form.min.js +1 -1
  8. package/dist/formio.form.min.js.LICENSE.txt +4 -2
  9. package/dist/formio.full.css +100 -3
  10. package/dist/formio.full.js +961 -2231
  11. package/dist/formio.full.min.css +2 -2
  12. package/dist/formio.full.min.js +1 -1
  13. package/dist/formio.full.min.js.LICENSE.txt +4 -2
  14. package/dist/formio.js +101 -1966
  15. package/dist/formio.min.js +1 -1
  16. package/dist/formio.min.js.LICENSE.txt +1 -3
  17. package/dist/formio.utils.js +145 -104
  18. package/dist/formio.utils.min.js +1 -1
  19. package/dist/formio.utils.min.js.LICENSE.txt +4 -2
  20. package/lib/cjs/CDN.d.ts +1 -1
  21. package/lib/cjs/CDN.js +2 -2
  22. package/lib/cjs/Embed.d.ts +16 -7
  23. package/lib/cjs/Embed.js +76 -24
  24. package/lib/cjs/Formio.d.ts +0 -1
  25. package/lib/cjs/Formio.js +27 -19
  26. package/lib/cjs/PDF.js +2 -2
  27. package/lib/cjs/Webform.d.ts +6 -9
  28. package/lib/cjs/Webform.js +59 -81
  29. package/lib/cjs/WebformBuilder.d.ts +1 -1
  30. package/lib/cjs/WebformBuilder.js +33 -16
  31. package/lib/cjs/Wizard.d.ts +5 -4
  32. package/lib/cjs/Wizard.js +37 -26
  33. package/lib/cjs/WizardBuilder.d.ts +1 -0
  34. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +1 -2
  35. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +11 -12
  36. package/lib/cjs/addons/index.d.ts +1 -0
  37. package/lib/cjs/addons/index.js +5 -1
  38. package/lib/cjs/components/Components.d.ts +7 -0
  39. package/lib/cjs/components/Components.js +30 -0
  40. package/lib/cjs/components/_classes/component/Component.d.ts +57 -27
  41. package/lib/cjs/components/_classes/component/Component.js +193 -119
  42. package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.d.ts +8 -0
  43. package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.js +31 -1
  44. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +28 -11
  45. package/lib/cjs/components/_classes/nested/NestedComponent.js +88 -57
  46. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +4 -3
  47. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +17 -4
  48. package/lib/cjs/components/builder.js +0 -2
  49. package/lib/cjs/components/button/Button.js +2 -1
  50. package/lib/cjs/components/columns/Columns.d.ts +1 -0
  51. package/lib/cjs/components/columns/Columns.js +2 -3
  52. package/lib/cjs/components/columns/editForm/Columns.edit.display.d.ts +30 -1
  53. package/lib/cjs/components/columns/editForm/Columns.edit.display.js +23 -1
  54. package/lib/cjs/components/container/Container.d.ts +1 -0
  55. package/lib/cjs/components/container/Container.js +2 -6
  56. package/lib/cjs/components/content/Content.d.ts +1 -0
  57. package/lib/cjs/components/content/Content.js +1 -0
  58. package/lib/cjs/components/datagrid/DataGrid.d.ts +0 -8
  59. package/lib/cjs/components/datagrid/DataGrid.js +9 -26
  60. package/lib/cjs/components/datamap/DataMap.js +2 -1
  61. package/lib/cjs/components/datetime/DateTime.js +0 -2
  62. package/lib/cjs/components/day/Day.js +2 -3
  63. package/lib/cjs/components/editgrid/EditGrid.d.ts +8 -4
  64. package/lib/cjs/components/editgrid/EditGrid.js +96 -73
  65. package/lib/cjs/components/email/Email.js +0 -1
  66. package/lib/cjs/components/file/File.js +1 -1
  67. package/lib/cjs/components/file/fixtures/comp3.d.ts +29 -0
  68. package/lib/cjs/components/file/fixtures/comp3.js +31 -0
  69. package/lib/cjs/components/form/Form.d.ts +2 -6
  70. package/lib/cjs/components/form/Form.js +43 -14
  71. package/lib/cjs/components/index.d.ts +0 -2
  72. package/lib/cjs/components/index.js +0 -2
  73. package/lib/cjs/components/number/Number.d.ts +1 -2
  74. package/lib/cjs/components/number/Number.js +5 -6
  75. package/lib/cjs/components/panel/Panel.d.ts +0 -1
  76. package/lib/cjs/components/panel/Panel.js +2 -9
  77. package/lib/cjs/components/panel/editForm/Panel.edit.display.d.ts +6 -38
  78. package/lib/cjs/components/panel/editForm/Panel.edit.display.js +3 -16
  79. package/lib/cjs/components/phonenumber/PhoneNumber.js +17 -0
  80. package/lib/cjs/components/radio/Radio.js +0 -2
  81. package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +1 -1
  82. package/lib/cjs/components/recaptcha/ReCaptcha.js +2 -2
  83. package/lib/cjs/components/select/Select.js +3 -2
  84. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +1 -2
  85. package/lib/cjs/components/selectboxes/SelectBoxes.js +7 -6
  86. package/lib/cjs/components/table/editForm/Table.edit.display.d.ts +31 -2
  87. package/lib/cjs/components/table/editForm/Table.edit.display.js +22 -0
  88. package/lib/cjs/components/tabs/editForm/Tabs.edit.display.d.ts +30 -2
  89. package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +22 -0
  90. package/lib/cjs/components/textfield/TextField.js +20 -6
  91. package/lib/cjs/components/time/Time.js +0 -6
  92. package/lib/cjs/components/url/Url.js +0 -1
  93. package/lib/cjs/components/well/editForm/Well.edit.display.d.ts +25 -2
  94. package/lib/cjs/components/well/editForm/Well.edit.display.js +18 -0
  95. package/lib/cjs/formio.embed.js +5 -3
  96. package/lib/cjs/formio.form.d.ts +1 -7
  97. package/lib/cjs/formio.form.js +3 -38
  98. package/lib/cjs/index.d.ts +2 -1
  99. package/lib/cjs/index.js +3 -1
  100. package/lib/cjs/providers/Providers.d.ts +0 -4
  101. package/lib/cjs/providers/storage/azure.d.ts +0 -2
  102. package/lib/cjs/providers/storage/azure.js +1 -6
  103. package/lib/cjs/providers/storage/googleDrive.d.ts +0 -1
  104. package/lib/cjs/providers/storage/googleDrive.js +0 -4
  105. package/lib/cjs/providers/storage/s3.d.ts +0 -1
  106. package/lib/cjs/providers/storage/s3.js +0 -4
  107. package/lib/cjs/templates/Templates.d.ts +1 -11
  108. package/lib/cjs/templates/Templates.js +4 -41
  109. package/lib/cjs/translations/en.d.ts +5 -0
  110. package/lib/cjs/translations/en.js +5 -0
  111. package/lib/cjs/utils/formUtils.js +1 -0
  112. package/lib/cjs/utils/index.d.ts +1 -0
  113. package/lib/cjs/utils/index.js +2 -0
  114. package/lib/cjs/utils/utils.d.ts +2 -1
  115. package/lib/cjs/utils/utils.js +27 -9
  116. package/lib/mjs/CDN.d.ts +1 -1
  117. package/lib/mjs/CDN.js +2 -2
  118. package/lib/mjs/Embed.d.ts +16 -7
  119. package/lib/mjs/Embed.js +75 -18
  120. package/lib/mjs/Formio.d.ts +0 -1
  121. package/lib/mjs/Formio.js +11 -3
  122. package/lib/mjs/PDF.js +2 -2
  123. package/lib/mjs/Webform.d.ts +6 -9
  124. package/lib/mjs/Webform.js +58 -82
  125. package/lib/mjs/WebformBuilder.d.ts +1 -1
  126. package/lib/mjs/WebformBuilder.js +31 -10
  127. package/lib/mjs/Wizard.d.ts +5 -4
  128. package/lib/mjs/Wizard.js +36 -27
  129. package/lib/mjs/WizardBuilder.d.ts +1 -0
  130. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +1 -2
  131. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +11 -12
  132. package/lib/mjs/addons/index.d.ts +1 -0
  133. package/lib/mjs/addons/index.js +5 -1
  134. package/lib/mjs/components/Components.d.ts +7 -0
  135. package/lib/mjs/components/Components.js +29 -0
  136. package/lib/mjs/components/_classes/component/Component.d.ts +57 -27
  137. package/lib/mjs/components/_classes/component/Component.js +191 -118
  138. package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.d.ts +8 -0
  139. package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.js +31 -1
  140. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +28 -11
  141. package/lib/mjs/components/_classes/nested/NestedComponent.js +88 -57
  142. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +4 -3
  143. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +18 -5
  144. package/lib/mjs/components/builder.js +0 -2
  145. package/lib/mjs/components/button/Button.js +2 -1
  146. package/lib/mjs/components/columns/Columns.d.ts +1 -0
  147. package/lib/mjs/components/columns/Columns.js +2 -3
  148. package/lib/mjs/components/columns/editForm/Columns.edit.display.d.ts +30 -1
  149. package/lib/mjs/components/columns/editForm/Columns.edit.display.js +23 -1
  150. package/lib/mjs/components/container/Container.d.ts +1 -0
  151. package/lib/mjs/components/container/Container.js +2 -6
  152. package/lib/mjs/components/content/Content.d.ts +1 -0
  153. package/lib/mjs/components/content/Content.js +1 -0
  154. package/lib/mjs/components/datagrid/DataGrid.d.ts +0 -8
  155. package/lib/mjs/components/datagrid/DataGrid.js +9 -26
  156. package/lib/mjs/components/datamap/DataMap.js +2 -1
  157. package/lib/mjs/components/datetime/DateTime.js +0 -2
  158. package/lib/mjs/components/day/Day.js +2 -3
  159. package/lib/mjs/components/editgrid/EditGrid.d.ts +8 -4
  160. package/lib/mjs/components/editgrid/EditGrid.js +97 -76
  161. package/lib/mjs/components/email/Email.js +0 -1
  162. package/lib/mjs/components/file/File.js +1 -1
  163. package/lib/mjs/components/file/fixtures/comp3.d.ts +29 -0
  164. package/lib/mjs/components/file/fixtures/comp3.js +29 -0
  165. package/lib/mjs/components/form/Form.d.ts +2 -6
  166. package/lib/mjs/components/form/Form.js +45 -14
  167. package/lib/mjs/components/index.d.ts +0 -2
  168. package/lib/mjs/components/index.js +0 -2
  169. package/lib/mjs/components/number/Number.d.ts +1 -2
  170. package/lib/mjs/components/number/Number.js +4 -5
  171. package/lib/mjs/components/panel/Panel.d.ts +0 -1
  172. package/lib/mjs/components/panel/Panel.js +3 -9
  173. package/lib/mjs/components/panel/editForm/Panel.edit.display.d.ts +6 -38
  174. package/lib/mjs/components/panel/editForm/Panel.edit.display.js +3 -16
  175. package/lib/mjs/components/phonenumber/PhoneNumber.js +17 -0
  176. package/lib/mjs/components/radio/Radio.js +0 -2
  177. package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +1 -1
  178. package/lib/mjs/components/recaptcha/ReCaptcha.js +2 -2
  179. package/lib/mjs/components/select/Select.js +3 -2
  180. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +1 -2
  181. package/lib/mjs/components/selectboxes/SelectBoxes.js +7 -6
  182. package/lib/mjs/components/table/editForm/Table.edit.display.d.ts +31 -2
  183. package/lib/mjs/components/table/editForm/Table.edit.display.js +22 -0
  184. package/lib/mjs/components/tabs/editForm/Tabs.edit.display.d.ts +30 -2
  185. package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +22 -0
  186. package/lib/mjs/components/textfield/TextField.js +20 -6
  187. package/lib/mjs/components/time/Time.js +0 -6
  188. package/lib/mjs/components/url/Url.js +0 -1
  189. package/lib/mjs/components/well/editForm/Well.edit.display.d.ts +25 -2
  190. package/lib/mjs/components/well/editForm/Well.edit.display.js +18 -0
  191. package/lib/mjs/formio.embed.js +5 -3
  192. package/lib/mjs/formio.form.d.ts +1 -7
  193. package/lib/mjs/formio.form.js +3 -32
  194. package/lib/mjs/index.d.ts +2 -1
  195. package/lib/mjs/index.js +2 -1
  196. package/lib/mjs/providers/Providers.d.ts +0 -4
  197. package/lib/mjs/providers/storage/azure.d.ts +0 -2
  198. package/lib/mjs/providers/storage/azure.js +1 -6
  199. package/lib/mjs/providers/storage/googleDrive.d.ts +0 -1
  200. package/lib/mjs/providers/storage/googleDrive.js +0 -4
  201. package/lib/mjs/providers/storage/s3.d.ts +0 -1
  202. package/lib/mjs/providers/storage/s3.js +0 -4
  203. package/lib/mjs/templates/Templates.d.ts +1 -11
  204. package/lib/mjs/templates/Templates.js +4 -40
  205. package/lib/mjs/translations/en.d.ts +5 -0
  206. package/lib/mjs/translations/en.js +5 -0
  207. package/lib/mjs/utils/formUtils.js +1 -0
  208. package/lib/mjs/utils/index.d.ts +1 -0
  209. package/lib/mjs/utils/index.js +1 -0
  210. package/lib/mjs/utils/utils.d.ts +2 -1
  211. package/lib/mjs/utils/utils.js +24 -7
  212. package/package.json +13 -13
  213. package/lib/cjs/components/tree/Node.d.ts +0 -55
  214. package/lib/cjs/components/tree/Node.js +0 -185
  215. package/lib/cjs/components/tree/Tree.d.ts +0 -48
  216. package/lib/cjs/components/tree/Tree.form.d.ts +0 -3
  217. package/lib/cjs/components/tree/Tree.form.js +0 -21
  218. package/lib/cjs/components/tree/Tree.js +0 -383
  219. package/lib/cjs/components/tree/editForm/Tree.edit.data.d.ts +0 -5
  220. package/lib/cjs/components/tree/editForm/Tree.edit.data.js +0 -9
  221. package/lib/cjs/components/tree/editForm/Tree.edit.display.d.ts +0 -9
  222. package/lib/cjs/components/tree/editForm/Tree.edit.display.js +0 -12
  223. package/lib/cjs/components/tree/fixtures/comp1.d.ts +0 -23
  224. package/lib/cjs/components/tree/fixtures/comp1.js +0 -24
  225. package/lib/cjs/components/tree/fixtures/comp2.d.ts +0 -116
  226. package/lib/cjs/components/tree/fixtures/comp2.js +0 -82
  227. package/lib/cjs/components/tree/fixtures/comp3.d.ts +0 -24
  228. package/lib/cjs/components/tree/fixtures/comp3.js +0 -25
  229. package/lib/cjs/components/tree/fixtures/comp4.d.ts +0 -42
  230. package/lib/cjs/components/tree/fixtures/comp4.js +0 -47
  231. package/lib/cjs/components/tree/fixtures/index.d.ts +0 -5
  232. package/lib/cjs/components/tree/fixtures/index.js +0 -14
  233. package/lib/cjs/validator/Rules.d.ts +0 -53
  234. package/lib/cjs/validator/Rules.js +0 -22
  235. package/lib/cjs/validator/Validator.d.ts +0 -228
  236. package/lib/cjs/validator/Validator.js +0 -1113
  237. package/lib/cjs/validator/conjunctions/index.d.ts +0 -7
  238. package/lib/cjs/validator/conjunctions/index.js +0 -18
  239. package/lib/cjs/validator/operators/index.d.ts +0 -7
  240. package/lib/cjs/validator/operators/index.js +0 -18
  241. package/lib/cjs/validator/quickRules/index.d.ts +0 -7
  242. package/lib/cjs/validator/quickRules/index.js +0 -18
  243. package/lib/cjs/validator/rules/Custom.d.ts +0 -5
  244. package/lib/cjs/validator/rules/Custom.js +0 -30
  245. package/lib/cjs/validator/rules/Date.d.ts +0 -5
  246. package/lib/cjs/validator/rules/Date.js +0 -25
  247. package/lib/cjs/validator/rules/Day.d.ts +0 -5
  248. package/lib/cjs/validator/rules/Day.js +0 -58
  249. package/lib/cjs/validator/rules/Email.d.ts +0 -5
  250. package/lib/cjs/validator/rules/Email.js +0 -24
  251. package/lib/cjs/validator/rules/JSON.d.ts +0 -5
  252. package/lib/cjs/validator/rules/JSON.js +0 -29
  253. package/lib/cjs/validator/rules/Mask.d.ts +0 -5
  254. package/lib/cjs/validator/rules/Mask.js +0 -32
  255. package/lib/cjs/validator/rules/Max.d.ts +0 -5
  256. package/lib/cjs/validator/rules/Max.js +0 -21
  257. package/lib/cjs/validator/rules/MaxDate.d.ts +0 -5
  258. package/lib/cjs/validator/rules/MaxDate.js +0 -34
  259. package/lib/cjs/validator/rules/MaxLength.d.ts +0 -5
  260. package/lib/cjs/validator/rules/MaxLength.js +0 -20
  261. package/lib/cjs/validator/rules/MaxWords.d.ts +0 -5
  262. package/lib/cjs/validator/rules/MaxWords.js +0 -20
  263. package/lib/cjs/validator/rules/MaxYear.d.ts +0 -5
  264. package/lib/cjs/validator/rules/MaxYear.js +0 -22
  265. package/lib/cjs/validator/rules/Min.d.ts +0 -5
  266. package/lib/cjs/validator/rules/Min.js +0 -21
  267. package/lib/cjs/validator/rules/MinDate.d.ts +0 -5
  268. package/lib/cjs/validator/rules/MinDate.js +0 -30
  269. package/lib/cjs/validator/rules/MinLength.d.ts +0 -5
  270. package/lib/cjs/validator/rules/MinLength.js +0 -20
  271. package/lib/cjs/validator/rules/MinWords.d.ts +0 -5
  272. package/lib/cjs/validator/rules/MinWords.js +0 -20
  273. package/lib/cjs/validator/rules/MinYear.d.ts +0 -5
  274. package/lib/cjs/validator/rules/MinYear.js +0 -22
  275. package/lib/cjs/validator/rules/Pattern.d.ts +0 -5
  276. package/lib/cjs/validator/rules/Pattern.js +0 -20
  277. package/lib/cjs/validator/rules/Required.d.ts +0 -5
  278. package/lib/cjs/validator/rules/Required.js +0 -17
  279. package/lib/cjs/validator/rules/Rule.d.ts +0 -7
  280. package/lib/cjs/validator/rules/Rule.js +0 -12
  281. package/lib/cjs/validator/rules/Select.d.ts +0 -5
  282. package/lib/cjs/validator/rules/Select.js +0 -95
  283. package/lib/cjs/validator/rules/Time.d.ts +0 -5
  284. package/lib/cjs/validator/rules/Time.js +0 -19
  285. package/lib/cjs/validator/rules/Unique.d.ts +0 -5
  286. package/lib/cjs/validator/rules/Unique.js +0 -69
  287. package/lib/cjs/validator/rules/Url.d.ts +0 -5
  288. package/lib/cjs/validator/rules/Url.js +0 -23
  289. package/lib/cjs/validator/rules/index.d.ts +0 -47
  290. package/lib/cjs/validator/rules/index.js +0 -51
  291. package/lib/cjs/validator/transformers/index.d.ts +0 -7
  292. package/lib/cjs/validator/transformers/index.js +0 -18
  293. package/lib/cjs/validator/valueSources/index.d.ts +0 -7
  294. package/lib/cjs/validator/valueSources/index.js +0 -18
  295. package/lib/mjs/components/tree/Node.d.ts +0 -55
  296. package/lib/mjs/components/tree/Node.js +0 -179
  297. package/lib/mjs/components/tree/Tree.d.ts +0 -48
  298. package/lib/mjs/components/tree/Tree.form.d.ts +0 -3
  299. package/lib/mjs/components/tree/Tree.form.js +0 -15
  300. package/lib/mjs/components/tree/Tree.js +0 -384
  301. package/lib/mjs/components/tree/editForm/Tree.edit.data.d.ts +0 -5
  302. package/lib/mjs/components/tree/editForm/Tree.edit.data.js +0 -7
  303. package/lib/mjs/components/tree/editForm/Tree.edit.display.d.ts +0 -9
  304. package/lib/mjs/components/tree/editForm/Tree.edit.display.js +0 -10
  305. package/lib/mjs/components/tree/fixtures/comp1.d.ts +0 -23
  306. package/lib/mjs/components/tree/fixtures/comp1.js +0 -22
  307. package/lib/mjs/components/tree/fixtures/comp2.d.ts +0 -116
  308. package/lib/mjs/components/tree/fixtures/comp2.js +0 -80
  309. package/lib/mjs/components/tree/fixtures/comp3.d.ts +0 -24
  310. package/lib/mjs/components/tree/fixtures/comp3.js +0 -23
  311. package/lib/mjs/components/tree/fixtures/comp4.d.ts +0 -42
  312. package/lib/mjs/components/tree/fixtures/comp4.js +0 -45
  313. package/lib/mjs/components/tree/fixtures/index.d.ts +0 -5
  314. package/lib/mjs/components/tree/fixtures/index.js +0 -5
  315. package/lib/mjs/validator/Rules.d.ts +0 -53
  316. package/lib/mjs/validator/Rules.js +0 -17
  317. package/lib/mjs/validator/Validator.d.ts +0 -228
  318. package/lib/mjs/validator/Validator.js +0 -1103
  319. package/lib/mjs/validator/conjunctions/index.d.ts +0 -7
  320. package/lib/mjs/validator/conjunctions/index.js +0 -16
  321. package/lib/mjs/validator/operators/index.d.ts +0 -7
  322. package/lib/mjs/validator/operators/index.js +0 -16
  323. package/lib/mjs/validator/quickRules/index.d.ts +0 -7
  324. package/lib/mjs/validator/quickRules/index.js +0 -16
  325. package/lib/mjs/validator/rules/Custom.d.ts +0 -5
  326. package/lib/mjs/validator/rules/Custom.js +0 -21
  327. package/lib/mjs/validator/rules/Date.d.ts +0 -5
  328. package/lib/mjs/validator/rules/Date.js +0 -16
  329. package/lib/mjs/validator/rules/Day.d.ts +0 -5
  330. package/lib/mjs/validator/rules/Day.js +0 -49
  331. package/lib/mjs/validator/rules/Email.d.ts +0 -5
  332. package/lib/mjs/validator/rules/Email.js +0 -15
  333. package/lib/mjs/validator/rules/JSON.d.ts +0 -5
  334. package/lib/mjs/validator/rules/JSON.js +0 -20
  335. package/lib/mjs/validator/rules/Mask.d.ts +0 -5
  336. package/lib/mjs/validator/rules/Mask.js +0 -23
  337. package/lib/mjs/validator/rules/Max.d.ts +0 -5
  338. package/lib/mjs/validator/rules/Max.js +0 -12
  339. package/lib/mjs/validator/rules/MaxDate.d.ts +0 -5
  340. package/lib/mjs/validator/rules/MaxDate.js +0 -25
  341. package/lib/mjs/validator/rules/MaxLength.d.ts +0 -5
  342. package/lib/mjs/validator/rules/MaxLength.js +0 -11
  343. package/lib/mjs/validator/rules/MaxWords.d.ts +0 -5
  344. package/lib/mjs/validator/rules/MaxWords.js +0 -11
  345. package/lib/mjs/validator/rules/MaxYear.d.ts +0 -5
  346. package/lib/mjs/validator/rules/MaxYear.js +0 -13
  347. package/lib/mjs/validator/rules/Min.d.ts +0 -5
  348. package/lib/mjs/validator/rules/Min.js +0 -12
  349. package/lib/mjs/validator/rules/MinDate.d.ts +0 -5
  350. package/lib/mjs/validator/rules/MinDate.js +0 -21
  351. package/lib/mjs/validator/rules/MinLength.d.ts +0 -5
  352. package/lib/mjs/validator/rules/MinLength.js +0 -11
  353. package/lib/mjs/validator/rules/MinWords.d.ts +0 -5
  354. package/lib/mjs/validator/rules/MinWords.js +0 -11
  355. package/lib/mjs/validator/rules/MinYear.d.ts +0 -5
  356. package/lib/mjs/validator/rules/MinYear.js +0 -13
  357. package/lib/mjs/validator/rules/Pattern.d.ts +0 -5
  358. package/lib/mjs/validator/rules/Pattern.js +0 -11
  359. package/lib/mjs/validator/rules/Required.d.ts +0 -5
  360. package/lib/mjs/validator/rules/Required.js +0 -8
  361. package/lib/mjs/validator/rules/Rule.d.ts +0 -7
  362. package/lib/mjs/validator/rules/Rule.js +0 -9
  363. package/lib/mjs/validator/rules/Select.d.ts +0 -5
  364. package/lib/mjs/validator/rules/Select.js +0 -86
  365. package/lib/mjs/validator/rules/Time.d.ts +0 -5
  366. package/lib/mjs/validator/rules/Time.js +0 -10
  367. package/lib/mjs/validator/rules/Unique.d.ts +0 -5
  368. package/lib/mjs/validator/rules/Unique.js +0 -60
  369. package/lib/mjs/validator/rules/Url.d.ts +0 -5
  370. package/lib/mjs/validator/rules/Url.js +0 -14
  371. package/lib/mjs/validator/rules/index.d.ts +0 -47
  372. package/lib/mjs/validator/rules/index.js +0 -46
  373. package/lib/mjs/validator/transformers/index.d.ts +0 -7
  374. package/lib/mjs/validator/transformers/index.js +0 -16
  375. package/lib/mjs/validator/valueSources/index.d.ts +0 -7
  376. package/lib/mjs/validator/valueSources/index.js +0 -16
@@ -3,6 +3,7 @@ import _ from 'lodash';
3
3
  import Field from '../field/Field';
4
4
  import Components from '../../Components';
5
5
  import { getArrayFromComponentPath, getStringFromComponentPath, getRandomComponentId } from '../../../utils/utils';
6
+ import { process as processAsync, processSync } from '@formio/core/process';
6
7
  export default class NestedComponent extends Field {
7
8
  static schema(...extend) {
8
9
  return Field.schema({
@@ -30,7 +31,7 @@ export default class NestedComponent extends Field {
30
31
  collapse(value) {
31
32
  const promise = this.redraw();
32
33
  if (!value) {
33
- this.checkValidity(this.data, !this.pristine, null, this.pristine);
34
+ this.checkValidity(this.data, !this.pristine);
34
35
  }
35
36
  return promise;
36
37
  }
@@ -188,6 +189,14 @@ export default class NestedComponent extends Field {
188
189
  */
189
190
  getComponent(path, fn, originalPath) {
190
191
  originalPath = originalPath || getStringFromComponentPath(path);
192
+ if (this.componentsMap.hasOwnProperty(originalPath)) {
193
+ if (fn) {
194
+ return fn(this.componentsMap[originalPath]);
195
+ }
196
+ else {
197
+ return this.componentsMap[originalPath];
198
+ }
199
+ }
191
200
  path = getArrayFromComponentPath(path);
192
201
  const pathStr = originalPath;
193
202
  const newPath = _.clone(path);
@@ -242,26 +251,6 @@ export default class NestedComponent extends Field {
242
251
  });
243
252
  return comp;
244
253
  }
245
- /**
246
- * Return a path of component's value.
247
- *
248
- * @param {Object} component - The component instance.
249
- * @return {string} - The component's value path.
250
- */
251
- calculateComponentPath(component) {
252
- let path = '';
253
- if (component.component.key) {
254
- let thisPath = this;
255
- while (thisPath && !thisPath.allowData && thisPath.parent) {
256
- thisPath = thisPath.parent;
257
- }
258
- const rowIndex = component.row ? `[${Number.parseInt(component.row)}]` : '';
259
- path = thisPath.path ? `${thisPath.path}${rowIndex}.` : '';
260
- path += component._parentPath && component.component.shouldIncludeSubFormPath ? component._parentPath : '';
261
- path += component.component.key;
262
- return path;
263
- }
264
- }
265
254
  /**
266
255
  * Create a new component and add it to the components array.
267
256
  *
@@ -282,14 +271,7 @@ export default class NestedComponent extends Field {
282
271
  if (!(options.display === 'pdf' && this.builderMode)) {
283
272
  component.id = getRandomComponentId();
284
273
  }
285
- if (!this.isInputComponent && this.component.shouldIncludeSubFormPath) {
286
- component.shouldIncludeSubFormPath = true;
287
- }
288
274
  const comp = Components.create(component, options, data, true);
289
- const path = this.calculateComponentPath(comp);
290
- if (path) {
291
- comp.path = path;
292
- }
293
275
  comp.init();
294
276
  if (component.internal) {
295
277
  return comp;
@@ -362,9 +344,6 @@ export default class NestedComponent extends Field {
362
344
  addComponent(component, data, before, noAdd) {
363
345
  data = data || this.data;
364
346
  this.components = this.components || [];
365
- if (this.options.parentPath) {
366
- component.shouldIncludeSubFormPath = true;
367
- }
368
347
  component = this.hook('addComponent', component, data, before, noAdd);
369
348
  const comp = this.createComponent(component, this.options, data, before ? before : null);
370
349
  if (noAdd) {
@@ -451,7 +430,7 @@ export default class NestedComponent extends Field {
451
430
  return Promise.all(promises);
452
431
  }
453
432
  /**
454
- * Remove a component from the components array.
433
+ * Remove a component from the components array and from the children object
455
434
  *
456
435
  * @param {Component} component - The component to remove from the components.
457
436
  * @param {Array<Component>} components - An array of components to remove this component from.
@@ -460,6 +439,9 @@ export default class NestedComponent extends Field {
460
439
  components = components || this.components;
461
440
  component.destroy(all);
462
441
  _.remove(components, { id: component.id });
442
+ if (this.componentsMap[component.path]) {
443
+ delete this.componentsMap[component.path];
444
+ }
463
445
  }
464
446
  /**
465
447
  * Removes a component provided the API key of that component.
@@ -508,13 +490,13 @@ export default class NestedComponent extends Field {
508
490
  return comp.updateValue(null, flags) || changed;
509
491
  }, super.updateValue(value, flags));
510
492
  }
511
- shouldSkipValidation(data, dirty, row) {
493
+ shouldSkipValidation(data, row, flags) {
512
494
  // Nested components with no input should not be validated.
513
495
  if (!this.component.input) {
514
496
  return true;
515
497
  }
516
498
  else {
517
- return super.shouldSkipValidation(data, dirty, row);
499
+ return super.shouldSkipValidation(data, row, flags);
518
500
  }
519
501
  }
520
502
  checkData(data, flags, row, components) {
@@ -525,11 +507,8 @@ export default class NestedComponent extends Field {
525
507
  flags = flags || {};
526
508
  row = row || this.data;
527
509
  components = components && _.isArray(components) ? components : this.getComponents();
528
- const isValid = components.reduce((valid, comp) => {
529
- return comp.checkData(data, flags, row) && valid;
530
- }, super.checkData(data, flags, row));
531
- this.checkModal(isValid, this.isDirty);
532
- return isValid;
510
+ super.checkData(data, flags, row);
511
+ components.forEach((comp) => comp.checkData(data, flags, row));
533
512
  }
534
513
  checkConditions(data, flags, row) {
535
514
  // check conditions of parent component first, because it may influence on visibility of it's children
@@ -567,7 +546,7 @@ export default class NestedComponent extends Field {
567
546
  * @return {*}
568
547
  */
569
548
  beforeSubmit() {
570
- return Promise.all(this.getComponents().map((comp) => comp.beforeSubmit()));
549
+ return Promise.allSettled(this.getComponents().map((comp) => comp.beforeSubmit()));
571
550
  }
572
551
  calculateValue(data, flags, row) {
573
552
  // Do not iterate into children and calculateValues if this nested component is conditionally hidden.
@@ -582,23 +561,75 @@ export default class NestedComponent extends Field {
582
561
  isValid(data, dirty) {
583
562
  return this.getComponents().reduce((valid, comp) => comp.isValid(data, dirty) && valid, super.isValid(data, dirty));
584
563
  }
585
- checkChildComponentsValidity(data, dirty, row, silentCheck, isParentValid) {
586
- return this.getComponents().reduce((check, comp) => comp.checkValidity(data, dirty, row, silentCheck) && check, isParentValid);
587
- }
588
- checkValidity(data, dirty, row, silentCheck) {
589
- if (!this.checkCondition(row, data)) {
590
- this.setCustomValidity('');
591
- return true;
564
+ validationProcessor({ scope, data, row, instance }, flags) {
565
+ const { dirty } = flags;
566
+ if (!instance) {
567
+ return;
568
+ }
569
+ instance.checkComponentValidity(data, dirty, row, flags, scope.errors);
570
+ if (instance.processOwnValidation) {
571
+ scope.noRecurse = true;
592
572
  }
593
- const isValid = this.checkChildComponentsValidity(data, dirty, row, silentCheck, super.checkValidity(data, dirty, row, silentCheck));
594
- this.checkModal(isValid, dirty);
595
- return isValid;
573
+ }
574
+ /**
575
+ * Perform a validation on all child components of this nested component.
576
+ * @param {*} components
577
+ * @param {*} data
578
+ * @param {*} flags
579
+ * @returns
580
+ */
581
+ validateComponents(components, data, flags = {}) {
582
+ components = components || this.component.components;
583
+ data = data || this.rootValue;
584
+ const { async, dirty, process } = flags;
585
+ const processorContext = {
586
+ process: process || 'unknown',
587
+ components,
588
+ instances: this.componentsMap,
589
+ data: data,
590
+ scope: { errors: [] },
591
+ processors: [
592
+ (context) => this.validationProcessor(context, flags),
593
+ ({ instance, component, components }) => {
594
+ // If we just validated the last component, and there are errors from our parent, then we need to show a model of those errors.
595
+ if (instance &&
596
+ instance.parent &&
597
+ (component === components[components.length - 1]) &&
598
+ instance.parent.componentModal) {
599
+ instance.parent.checkModal(instance.parent.childErrors, dirty);
600
+ }
601
+ }
602
+ ]
603
+ };
604
+ return async ? processAsync(processorContext).then((scope) => scope.errors) : processSync(processorContext).errors;
605
+ }
606
+ /**
607
+ * Validate a nested component with data, or its own internal data.
608
+ * @param {*} data
609
+ * @param {*} flags
610
+ * @returns
611
+ */
612
+ validate(data, flags = {}) {
613
+ data = data || this.rootValue;
614
+ return this.validateComponents(this.getComponents().map((component) => component.component), data, flags);
615
+ }
616
+ checkComponentValidity(data, dirty, row, flags = {}, allErrors = []) {
617
+ this.childErrors = [];
618
+ return super.checkComponentValidity(data, dirty, row, flags, allErrors);
619
+ }
620
+ checkValidity(data, dirty, row, silentCheck, childErrors = []) {
621
+ console.log('Deprecation warning: Component.checkValidity() will be deprecated in 6.x version of renderer. Use "validate" method instead.');
622
+ childErrors.push(...this.validate(data, { dirty, silentCheck }));
623
+ return this.checkComponentValidity(data, dirty, row, { dirty, silentCheck }, childErrors) && childErrors.length === 0;
596
624
  }
597
625
  checkAsyncValidity(data, dirty, row, silentCheck) {
626
+ console.log('Deprecation warning: Component.checkAsyncValidity() will be deprecated in 6.x version of renderer.');
598
627
  return this.ready.then(() => {
599
- const promises = [super.checkAsyncValidity(data, dirty, row, silentCheck)];
600
- this.eachComponent((component) => promises.push(component.checkAsyncValidity(data, dirty, row, silentCheck)));
601
- return Promise.all(promises).then((results) => results.reduce((valid, result) => (valid && result), true));
628
+ return this.validate(data, { dirty, silentCheck, async: true }).then((childErrors) => {
629
+ return this.checkComponentValidity(data, dirty, row, { dirty, silentCheck, async: true }, childErrors).then((valid) => {
630
+ return valid && childErrors.length === 0;
631
+ });
632
+ });
602
633
  });
603
634
  }
604
635
  setPristine(pristine) {
@@ -632,8 +663,11 @@ export default class NestedComponent extends Field {
632
663
  components.forEach((comp) => this.removeComponent(comp, this.components, all));
633
664
  this.components = [];
634
665
  }
666
+ get visibleErrors() {
667
+ return this.getComponents().reduce((errors, comp) => errors.concat(comp.visibleErrors || []), super.visibleErrors);
668
+ }
635
669
  get errors() {
636
- const thisErrors = this.error ? [this.error] : [];
670
+ const thisErrors = super.errors;
637
671
  return this.getComponents()
638
672
  .reduce((errors, comp) => errors.concat(comp.errors || []), thisErrors)
639
673
  .filter(err => err.level !== 'hidden');
@@ -673,9 +707,6 @@ export default class NestedComponent extends Field {
673
707
  if (!value) {
674
708
  return false;
675
709
  }
676
- if (value.submitAsDraft && !value.submit) {
677
- flags.noValidate = true;
678
- }
679
710
  return this.getComponents().reduce((changed, component) => {
680
711
  return this.setNestedValue(component, value, flags, changed) || changed;
681
712
  }, false);
@@ -5,10 +5,11 @@ export default class NestedArrayComponent extends NestedDataComponent {
5
5
  prevHasAddButton: any;
6
6
  checkAddButtonChanged(): void;
7
7
  checkData(data: any, flags: any, row: any): any;
8
- checkRows(method: any, data: any, opts: any, defaultValue: any, silentCheck: any): any;
9
- checkRow(method: any, data: any, opts: any, row: any, components: any, silentCheck: any): any;
8
+ processRows(method: any, data: any, opts: any, defaultValue: any, silentCheck: any): any;
9
+ validate(data: any, flags?: {}): any;
10
+ processRow(method: any, data: any, opts: any, row: any, components: any, silentCheck: any): any;
10
11
  hasAddButton(): any;
11
- getComponent(path: any, fn: any, originalPath: any): any[];
12
+ getComponent(path: any, fn: any, originalPath: any): any;
12
13
  everyComponent(fn: any, rowIndex: any, options: any): void;
13
14
  getComponents(rowIndex: any): any;
14
15
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  import _ from 'lodash';
3
- import { componentValueTypes } from '../../../utils/utils';
3
+ import { componentValueTypes, getStringFromComponentPath } from '../../../utils/utils';
4
4
  import Component from '../component/Component';
5
5
  import NestedDataComponent from '../nesteddata/NestedDataComponent';
6
6
  export default class NestedArrayComponent extends NestedDataComponent {
@@ -40,19 +40,23 @@ export default class NestedArrayComponent extends NestedDataComponent {
40
40
  flags = flags || {};
41
41
  row = row || this.data;
42
42
  this.checkAddButtonChanged();
43
- return this.checkRows('checkData', data, flags, Component.prototype.checkData.call(this, data, flags, row));
43
+ return this.processRows('checkData', data, flags, Component.prototype.checkData.call(this, data, flags, row));
44
44
  }
45
- checkRows(method, data, opts, defaultValue, silentCheck) {
45
+ processRows(method, data, opts, defaultValue, silentCheck) {
46
46
  return this.iteratableRows.reduce((valid, row, rowIndex) => {
47
47
  if (!opts?.rowIndex || opts?.rowIndex === rowIndex) {
48
- return this.checkRow(method, data, opts, row.data, row.components, silentCheck) && valid;
48
+ return this.processRow(method, data, opts, row.data, row.components, silentCheck) && valid;
49
49
  }
50
50
  else {
51
51
  return valid;
52
52
  }
53
53
  }, defaultValue);
54
54
  }
55
- checkRow(method, data, opts, row, components, silentCheck) {
55
+ validate(data, flags = {}) {
56
+ data = data || this.data;
57
+ return this.validateComponents([this.component], data, flags);
58
+ }
59
+ processRow(method, data, opts, row, components, silentCheck) {
56
60
  if (opts?.isolateRow) {
57
61
  silentCheck = true;
58
62
  opts.noRefresh = true;
@@ -77,6 +81,15 @@ export default class NestedArrayComponent extends NestedDataComponent {
77
81
  }, 'show'));
78
82
  }
79
83
  getComponent(path, fn, originalPath) {
84
+ originalPath = originalPath || getStringFromComponentPath(path);
85
+ if (this.componentsMap.hasOwnProperty(originalPath)) {
86
+ if (fn) {
87
+ return fn(this.componentsMap[originalPath]);
88
+ }
89
+ else {
90
+ return this.componentsMap[originalPath];
91
+ }
92
+ }
80
93
  path = Array.isArray(path) ? path : [path];
81
94
  let key = path.shift();
82
95
  const remainingPath = path;
@@ -37,7 +37,6 @@ import TagsForm from './tags/Tags.form';
37
37
  import TextAreaForm from './textarea/TextArea.form';
38
38
  import TextfieldForm from './textfield/TextField.form';
39
39
  import TimeForm from './time/Time.form';
40
- import TreeForm from './tree/Tree.form';
41
40
  import UnknownForm from './unknown/Unknown.form';
42
41
  import UrlForm from './url/Url.form';
43
42
  import WellForm from './well/Well.form';
@@ -79,7 +78,6 @@ Components.tags.editForm = TagsForm;
79
78
  Components.textarea.editForm = TextAreaForm;
80
79
  Components.textfield.editForm = TextfieldForm;
81
80
  Components.time.editForm = TimeForm;
82
- Components.tree.editForm = TreeForm;
83
81
  Components.unknown.editForm = UnknownForm;
84
82
  Components.url.editForm = UrlForm;
85
83
  Components.well.editForm = WellForm;
@@ -190,7 +190,7 @@ export default class ButtonComponent extends Field {
190
190
  const isSilent = flags && flags.silent;
191
191
  //check root validity only if disableOnInvalid is set and when it is not possible to make submission because of validation errors
192
192
  if (flags && flags.noValidate && (this.component.disableOnInvalid || this.hasError)) {
193
- isValid = flags.rootValidity || (this.root ? this.root.checkValidity(this.root.data, null, null, true) : true);
193
+ isValid = flags.rootValidity || (this.root ? (this.root.validate(this.root.data, { dirty: false, silentCheck: true }).length === 0) : true);
194
194
  flags.rootValidity = isValid;
195
195
  }
196
196
  this.isDisabledOnInvalid = this.component.disableOnInvalid && (isSilent || !isValid);
@@ -278,6 +278,7 @@ export default class ButtonComponent extends Field {
278
278
  event.stopPropagation();
279
279
  this.loading = true;
280
280
  this.emit('submitButton', {
281
+ noValidate: this.component.state === 'draft',
281
282
  state: this.component.state || 'submitted',
282
283
  component: this.component,
283
284
  instance: this
@@ -22,6 +22,7 @@ export default class ColumnsComponent extends NestedComponent {
22
22
  * @return {Array.<ColumnComponent[]>}
23
23
  */
24
24
  groupByRow(): Array<ColumnComponent[]>;
25
+ checkData(data: any, flags: any, row: any, components: any): void;
25
26
  detach(all: any): void;
26
27
  }
27
28
  import NestedComponent from '../_classes/nested/NestedComponent';
@@ -65,7 +65,7 @@ export default class ColumnsComponent extends NestedComponent {
65
65
  if (!column.size) {
66
66
  column.size = 'md';
67
67
  }
68
- column.currentWidth = column.width || 0;
68
+ column.currentWidth = this.options.condensedMode ? this.gridSize : column.width || 0;
69
69
  // Ensure there is a components array.
70
70
  if (!Array.isArray(column.components)) {
71
71
  column.components = [];
@@ -134,14 +134,13 @@ export default class ColumnsComponent extends NestedComponent {
134
134
  return _.concat(result.rows, [result.stack]);
135
135
  }
136
136
  checkData(data, flags, row, components) {
137
- const isValid = super.checkData(data, flags, row, components);
137
+ super.checkData(data, flags, row, components);
138
138
  if (this.component.autoAdjust && this.options.display !== 'pdf') {
139
139
  const redraw = this.justify();
140
140
  if (redraw) {
141
141
  this.redraw();
142
142
  }
143
143
  }
144
- return isValid;
145
144
  }
146
145
  detach(all) {
147
146
  super.detach(all);
@@ -5,8 +5,29 @@ declare const _default: ({
5
5
  type?: undefined;
6
6
  input?: undefined;
7
7
  label?: undefined;
8
- addAnother?: undefined;
8
+ placeholder?: undefined;
9
9
  tooltip?: undefined;
10
+ validate?: undefined;
11
+ autofocus?: undefined;
12
+ overrideEditForm?: undefined;
13
+ addAnother?: undefined;
14
+ reorder?: undefined;
15
+ components?: undefined;
16
+ } | {
17
+ weight: number;
18
+ type: string;
19
+ input: boolean;
20
+ key: string;
21
+ label: string;
22
+ placeholder: string;
23
+ tooltip: string;
24
+ validate: {
25
+ required: boolean;
26
+ };
27
+ autofocus: boolean;
28
+ overrideEditForm: boolean;
29
+ ignore?: undefined;
30
+ addAnother?: undefined;
10
31
  reorder?: undefined;
11
32
  components?: undefined;
12
33
  } | {
@@ -43,6 +64,10 @@ declare const _default: ({
43
64
  data?: undefined;
44
65
  })[];
45
66
  ignore?: undefined;
67
+ placeholder?: undefined;
68
+ validate?: undefined;
69
+ autofocus?: undefined;
70
+ overrideEditForm?: undefined;
46
71
  } | {
47
72
  weight: number;
48
73
  type: string;
@@ -51,6 +76,10 @@ declare const _default: ({
51
76
  key: string;
52
77
  input: boolean;
53
78
  ignore?: undefined;
79
+ placeholder?: undefined;
80
+ validate?: undefined;
81
+ autofocus?: undefined;
82
+ overrideEditForm?: undefined;
54
83
  addAnother?: undefined;
55
84
  reorder?: undefined;
56
85
  components?: undefined;
@@ -31,6 +31,24 @@ export default [
31
31
  key: 'tableView',
32
32
  ignore: true
33
33
  },
34
+ {
35
+ key: 'hideLabel',
36
+ ignore: true
37
+ },
38
+ {
39
+ weight: 0,
40
+ type: 'textfield',
41
+ input: true,
42
+ key: 'label',
43
+ label: 'Label',
44
+ placeholder: 'Field Label',
45
+ tooltip: 'The label for this field.',
46
+ validate: {
47
+ required: true
48
+ },
49
+ autofocus: true,
50
+ overrideEditForm: true
51
+ },
34
52
  {
35
53
  weight: 150,
36
54
  type: 'datagrid',
@@ -94,5 +112,9 @@ export default [
94
112
  tooltip: 'Will automatically adjust columns based on if nested components are hidden.',
95
113
  key: 'autoAdjust',
96
114
  input: true
97
- }
115
+ },
116
+ {
117
+ key: 'hideLabel',
118
+ ignore: true
119
+ },
98
120
  ];
@@ -10,6 +10,7 @@ export default class ContainerComponent extends NestedDataComponent {
10
10
  };
11
11
  constructor(...args: any[]);
12
12
  addComponents(data: any, options: any): void;
13
+ checkData(data: any, flags: any, row: any, components: any): void;
13
14
  focus(): void;
14
15
  }
15
16
  import NestedDataComponent from '../_classes/nesteddata/NestedDataComponent';
@@ -54,12 +54,8 @@ export default class ContainerComponent extends NestedDataComponent {
54
54
  flags = flags || {};
55
55
  row = row || this.data;
56
56
  components = components && _.isArray(components) ? components : this.getComponents();
57
- return components.reduce((valid, comp) => {
58
- return comp.checkData(data, flags, this.dataValue) && valid;
59
- }, Component.prototype.checkData.call(this, data, flags, row));
60
- }
61
- checkChildComponentsValidity(data, dirty, row, silentCheck, isParentValid) {
62
- return super.checkChildComponentsValidity(data, dirty, this.dataValue, silentCheck, isParentValid);
57
+ Component.prototype.checkData.call(this, data, flags, row);
58
+ components.forEach((comp) => comp.checkData(data, flags, this.dataValue));
63
59
  }
64
60
  focus() {
65
61
  const focusableElements = getFocusableElements(this.element);
@@ -4,6 +4,7 @@ export default class ContentComponent extends Component {
4
4
  group: string;
5
5
  icon: string;
6
6
  preview: boolean;
7
+ showPreview: boolean;
7
8
  documentation: string;
8
9
  weight: number;
9
10
  schema: any;
@@ -16,6 +16,7 @@ export default class ContentComponent extends Component {
16
16
  group: 'layout',
17
17
  icon: 'html5',
18
18
  preview: false,
19
+ showPreview: false,
19
20
  documentation: '/userguide/form-building/layout-components#content',
20
21
  weight: 5,
21
22
  schema: ContentComponent.schema()
@@ -70,14 +70,6 @@ export default class DataGridComponent extends NestedArrayComponent {
70
70
  setRowComponentsData(rowIndex: any, rowData: any): void;
71
71
  createRows(init: any, rebuild: any): boolean;
72
72
  createRowComponents(row: any, rowIndex: any): {};
73
- /**
74
- * Checks the validity of this datagrid.
75
- *
76
- * @param data
77
- * @param dirty
78
- * @return {*}
79
- */
80
- checkValidity(data: any, dirty: any, row: any, silentCheck: any): any;
81
73
  checkColumns(data: any, flags?: {}): {
82
74
  rebuild: boolean;
83
75
  show: boolean;
@@ -1,6 +1,7 @@
1
1
  import _ from 'lodash';
2
2
  import NestedArrayComponent from '../_classes/nestedarray/NestedArrayComponent';
3
3
  import { fastCloneDeep, getFocusableElements } from '../../utils/utils';
4
+ import { Components } from '../Components';
4
5
  export default class DataGridComponent extends NestedArrayComponent {
5
6
  static schema(...extend) {
6
7
  return NestedArrayComponent.schema({
@@ -344,10 +345,13 @@ export default class DataGridComponent extends NestedArrayComponent {
344
345
  }
345
346
  focusOnNewRowElement(row) {
346
347
  Object.keys(row).find((key) => {
347
- const focusableElements = getFocusableElements(row[key].element);
348
- if (focusableElements && focusableElements[0]) {
349
- focusableElements[0].focus();
350
- return true;
348
+ const element = row[key].element;
349
+ if (element) {
350
+ const focusableElements = getFocusableElements(element);
351
+ if (focusableElements && focusableElements[0]) {
352
+ focusableElements[0].focus();
353
+ return true;
354
+ }
351
355
  }
352
356
  return false;
353
357
  });
@@ -387,7 +391,7 @@ export default class DataGridComponent extends NestedArrayComponent {
387
391
  }
388
392
  component.rowIndex = rowIndex;
389
393
  component.row = `${rowIndex}-${colIndex}`;
390
- component.path = this.calculateComponentPath(component);
394
+ component.path = Components.getComponentPath(component);
391
395
  });
392
396
  }
393
397
  updateRowsComponents(rowIndex) {
@@ -470,27 +474,6 @@ export default class DataGridComponent extends NestedArrayComponent {
470
474
  });
471
475
  return components;
472
476
  }
473
- /**
474
- * Checks the validity of this datagrid.
475
- *
476
- * @param data
477
- * @param dirty
478
- * @return {*}
479
- */
480
- checkValidity(data, dirty, row, silentCheck) {
481
- data = data || this.rootValue;
482
- row = row || this.data;
483
- if (!this.checkCondition(row, data)) {
484
- this.setCustomValidity('');
485
- return true;
486
- }
487
- if (!this.checkComponentValidity(data, dirty, row, { silentCheck })) {
488
- return false;
489
- }
490
- const isValid = this.checkRows('checkValidity', data, dirty, true, silentCheck);
491
- this.checkModal(isValid, dirty);
492
- return isValid;
493
- }
494
477
  checkColumns(data, flags = {}) {
495
478
  data = data || this.rootValue;
496
479
  let show = false;
@@ -3,6 +3,7 @@ import DataGridComponent from '../datagrid/DataGrid';
3
3
  import _ from 'lodash';
4
4
  import EventEmitter from 'eventemitter3';
5
5
  import { componentValueTypes, getComponentSavedTypes, uniqueKey } from '../../utils/utils';
6
+ import { Components } from '../Components';
6
7
  export default class DataMapComponent extends DataGridComponent {
7
8
  static schema(...extend) {
8
9
  return Component.schema({
@@ -235,7 +236,7 @@ export default class DataMapComponent extends DataGridComponent {
235
236
  delete dataValue[key];
236
237
  const comp = components[this.valueKey];
237
238
  comp.component.key = newKey;
238
- comp.path = this.calculateComponentPath(comp);
239
+ comp.path = Components.calculateComponentPath(comp);
239
240
  key = newKey;
240
241
  });
241
242
  const valueComponent = _.clone(this.component.valueComponent);
@@ -128,8 +128,6 @@ export default class DateTimeComponent extends Input {
128
128
  ...customOptions,
129
129
  };
130
130
  /* eslint-enable camelcase */
131
- // Add the validators date.
132
- this.validators.push('date');
133
131
  }
134
132
  get defaultSchema() {
135
133
  return DateTimeComponent.schema();
@@ -49,10 +49,10 @@ export default class DayComponent extends Field {
49
49
  return getComponentSavedTypes(schema) || [componentValueTypes.string];
50
50
  }
51
51
  constructor(component, options, data) {
52
- if (component.maxDate) {
52
+ if (component.maxDate && component.maxDate.indexOf('moment(') === -1) {
53
53
  component.maxDate = moment(component.maxDate, 'YYYY-MM-DD').toISOString();
54
54
  }
55
- if (component.minDate) {
55
+ if (component.minDate && component.minDate.indexOf('moment(') === -1) {
56
56
  component.minDate = moment(component.minDate, 'YYYY-MM-DD').toISOString();
57
57
  }
58
58
  super(component, options, data);
@@ -209,7 +209,6 @@ export default class DayComponent extends Field {
209
209
  }
210
210
  init() {
211
211
  super.init();
212
- this.validators = this.validators.concat(['day', 'maxDate', 'minDate', 'minYear', 'maxYear']);
213
212
  const minYear = this.component.fields.year.minYear;
214
213
  const maxYear = this.component.fields.year.maxYear;
215
214
  this.component.maxYear = maxYear;