@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
@@ -43,13 +43,6 @@ export default class NestedComponent extends Field {
43
43
  * @return {Object} - The component retrieved.
44
44
  */
45
45
  getComponentById(id: string, fn: Function): Object;
46
- /**
47
- * Return a path of component's value.
48
- *
49
- * @param {Object} component - The component instance.
50
- * @return {string} - The component's value path.
51
- */
52
- calculateComponentPath(component: Object): string;
53
46
  /**
54
47
  * Create a new component and add it to the components array.
55
48
  *
@@ -83,7 +76,7 @@ export default class NestedComponent extends Field {
83
76
  attachComponentsLogic(components: any): void;
84
77
  attachComponents(element: any, components: any, container: any): Promise<any>;
85
78
  /**
86
- * Remove a component from the components array.
79
+ * Remove a component from the components array and from the children object
87
80
  *
88
81
  * @param {Component} component - The component to remove from the components.
89
82
  * @param {Array<Component>} components - An array of components to remove this component from.
@@ -106,7 +99,8 @@ export default class NestedComponent extends Field {
106
99
  */
107
100
  removeComponentById(id: string, fn: Function): null;
108
101
  updateValue(value: any, flags?: {}): any;
109
- checkData(data: any, flags: any, row: any, components: any): any;
102
+ shouldSkipValidation(data: any, row: any, flags: any): boolean;
103
+ checkData(data: any, flags: any, row: any, components: any): true | undefined;
110
104
  checkConditions(data: any, flags: any, row: any): boolean;
111
105
  clearOnHide(show: any): void;
112
106
  restoreComponentsContext(): void;
@@ -119,11 +113,34 @@ export default class NestedComponent extends Field {
119
113
  calculateValue(data: any, flags: any, row: any): any;
120
114
  isLastPage(): boolean;
121
115
  isValid(data: any, dirty: any): any;
122
- checkChildComponentsValidity(data: any, dirty: any, row: any, silentCheck: any, isParentValid: any): any;
123
- checkValidity(data: any, dirty: any, row: any, silentCheck: any): any;
116
+ validationProcessor({ scope, data, row, instance }: {
117
+ scope: any;
118
+ data: any;
119
+ row: any;
120
+ instance: any;
121
+ }, flags: any): void;
122
+ /**
123
+ * Perform a validation on all child components of this nested component.
124
+ * @param {*} components
125
+ * @param {*} data
126
+ * @param {*} flags
127
+ * @returns
128
+ */
129
+ validateComponents(components: any, data: any, flags?: any): any;
130
+ /**
131
+ * Validate a nested component with data, or its own internal data.
132
+ * @param {*} data
133
+ * @param {*} flags
134
+ * @returns
135
+ */
136
+ validate(data: any, flags?: any): any;
137
+ checkComponentValidity(data: any, dirty: any, row: any, flags?: {}, allErrors?: any[]): boolean;
138
+ checkValidity(data: any, dirty: any, row: any, silentCheck: any, childErrors?: any[]): boolean;
139
+ checkAsyncValidity(data: any, dirty: any, row: any, silentCheck: any): Promise<any>;
124
140
  setPristine(pristine: any): void;
125
141
  get isPristine(): any;
126
142
  destroyComponents(all?: boolean): void;
143
+ get visibleErrors(): any;
127
144
  get errors(): any;
128
145
  get dataReady(): Promise<any[]>;
129
146
  setNestedValue(component: any, value: any, flags?: {}): any;
@@ -7,6 +7,7 @@ const lodash_1 = __importDefault(require("lodash"));
7
7
  const Field_1 = __importDefault(require("../field/Field"));
8
8
  const Components_1 = __importDefault(require("../../Components"));
9
9
  const utils_1 = require("../../../utils/utils");
10
+ const process_1 = require("@formio/core/process");
10
11
  class NestedComponent extends Field_1.default {
11
12
  static schema(...extend) {
12
13
  return Field_1.default.schema({
@@ -34,7 +35,7 @@ class NestedComponent extends Field_1.default {
34
35
  collapse(value) {
35
36
  const promise = this.redraw();
36
37
  if (!value) {
37
- this.checkValidity(this.data, !this.pristine, null, this.pristine);
38
+ this.checkValidity(this.data, !this.pristine);
38
39
  }
39
40
  return promise;
40
41
  }
@@ -192,6 +193,14 @@ class NestedComponent extends Field_1.default {
192
193
  */
193
194
  getComponent(path, fn, originalPath) {
194
195
  originalPath = originalPath || (0, utils_1.getStringFromComponentPath)(path);
196
+ if (this.componentsMap.hasOwnProperty(originalPath)) {
197
+ if (fn) {
198
+ return fn(this.componentsMap[originalPath]);
199
+ }
200
+ else {
201
+ return this.componentsMap[originalPath];
202
+ }
203
+ }
195
204
  path = (0, utils_1.getArrayFromComponentPath)(path);
196
205
  const pathStr = originalPath;
197
206
  const newPath = lodash_1.default.clone(path);
@@ -246,26 +255,6 @@ class NestedComponent extends Field_1.default {
246
255
  });
247
256
  return comp;
248
257
  }
249
- /**
250
- * Return a path of component's value.
251
- *
252
- * @param {Object} component - The component instance.
253
- * @return {string} - The component's value path.
254
- */
255
- calculateComponentPath(component) {
256
- let path = '';
257
- if (component.component.key) {
258
- let thisPath = this;
259
- while (thisPath && !thisPath.allowData && thisPath.parent) {
260
- thisPath = thisPath.parent;
261
- }
262
- const rowIndex = component.row ? `[${Number.parseInt(component.row)}]` : '';
263
- path = thisPath.path ? `${thisPath.path}${rowIndex}.` : '';
264
- path += component._parentPath && component.component.shouldIncludeSubFormPath ? component._parentPath : '';
265
- path += component.component.key;
266
- return path;
267
- }
268
- }
269
258
  /**
270
259
  * Create a new component and add it to the components array.
271
260
  *
@@ -286,14 +275,7 @@ class NestedComponent extends Field_1.default {
286
275
  if (!(options.display === 'pdf' && this.builderMode)) {
287
276
  component.id = (0, utils_1.getRandomComponentId)();
288
277
  }
289
- if (!this.isInputComponent && this.component.shouldIncludeSubFormPath) {
290
- component.shouldIncludeSubFormPath = true;
291
- }
292
278
  const comp = Components_1.default.create(component, options, data, true);
293
- const path = this.calculateComponentPath(comp);
294
- if (path) {
295
- comp.path = path;
296
- }
297
279
  comp.init();
298
280
  if (component.internal) {
299
281
  return comp;
@@ -366,9 +348,6 @@ class NestedComponent extends Field_1.default {
366
348
  addComponent(component, data, before, noAdd) {
367
349
  data = data || this.data;
368
350
  this.components = this.components || [];
369
- if (this.options.parentPath) {
370
- component.shouldIncludeSubFormPath = true;
371
- }
372
351
  component = this.hook('addComponent', component, data, before, noAdd);
373
352
  const comp = this.createComponent(component, this.options, data, before ? before : null);
374
353
  if (noAdd) {
@@ -455,7 +434,7 @@ class NestedComponent extends Field_1.default {
455
434
  return Promise.all(promises);
456
435
  }
457
436
  /**
458
- * Remove a component from the components array.
437
+ * Remove a component from the components array and from the children object
459
438
  *
460
439
  * @param {Component} component - The component to remove from the components.
461
440
  * @param {Array<Component>} components - An array of components to remove this component from.
@@ -464,6 +443,9 @@ class NestedComponent extends Field_1.default {
464
443
  components = components || this.components;
465
444
  component.destroy(all);
466
445
  lodash_1.default.remove(components, { id: component.id });
446
+ if (this.componentsMap[component.path]) {
447
+ delete this.componentsMap[component.path];
448
+ }
467
449
  }
468
450
  /**
469
451
  * Removes a component provided the API key of that component.
@@ -512,13 +494,13 @@ class NestedComponent extends Field_1.default {
512
494
  return comp.updateValue(null, flags) || changed;
513
495
  }, super.updateValue(value, flags));
514
496
  }
515
- shouldSkipValidation(data, dirty, row) {
497
+ shouldSkipValidation(data, row, flags) {
516
498
  // Nested components with no input should not be validated.
517
499
  if (!this.component.input) {
518
500
  return true;
519
501
  }
520
502
  else {
521
- return super.shouldSkipValidation(data, dirty, row);
503
+ return super.shouldSkipValidation(data, row, flags);
522
504
  }
523
505
  }
524
506
  checkData(data, flags, row, components) {
@@ -529,11 +511,8 @@ class NestedComponent extends Field_1.default {
529
511
  flags = flags || {};
530
512
  row = row || this.data;
531
513
  components = components && lodash_1.default.isArray(components) ? components : this.getComponents();
532
- const isValid = components.reduce((valid, comp) => {
533
- return comp.checkData(data, flags, row) && valid;
534
- }, super.checkData(data, flags, row));
535
- this.checkModal(isValid, this.isDirty);
536
- return isValid;
514
+ super.checkData(data, flags, row);
515
+ components.forEach((comp) => comp.checkData(data, flags, row));
537
516
  }
538
517
  checkConditions(data, flags, row) {
539
518
  // check conditions of parent component first, because it may influence on visibility of it's children
@@ -571,7 +550,7 @@ class NestedComponent extends Field_1.default {
571
550
  * @return {*}
572
551
  */
573
552
  beforeSubmit() {
574
- return Promise.all(this.getComponents().map((comp) => comp.beforeSubmit()));
553
+ return Promise.allSettled(this.getComponents().map((comp) => comp.beforeSubmit()));
575
554
  }
576
555
  calculateValue(data, flags, row) {
577
556
  // Do not iterate into children and calculateValues if this nested component is conditionally hidden.
@@ -586,23 +565,75 @@ class NestedComponent extends Field_1.default {
586
565
  isValid(data, dirty) {
587
566
  return this.getComponents().reduce((valid, comp) => comp.isValid(data, dirty) && valid, super.isValid(data, dirty));
588
567
  }
589
- checkChildComponentsValidity(data, dirty, row, silentCheck, isParentValid) {
590
- return this.getComponents().reduce((check, comp) => comp.checkValidity(data, dirty, row, silentCheck) && check, isParentValid);
591
- }
592
- checkValidity(data, dirty, row, silentCheck) {
593
- if (!this.checkCondition(row, data)) {
594
- this.setCustomValidity('');
595
- return true;
568
+ validationProcessor({ scope, data, row, instance }, flags) {
569
+ const { dirty } = flags;
570
+ if (!instance) {
571
+ return;
572
+ }
573
+ instance.checkComponentValidity(data, dirty, row, flags, scope.errors);
574
+ if (instance.processOwnValidation) {
575
+ scope.noRecurse = true;
596
576
  }
597
- const isValid = this.checkChildComponentsValidity(data, dirty, row, silentCheck, super.checkValidity(data, dirty, row, silentCheck));
598
- this.checkModal(isValid, dirty);
599
- return isValid;
577
+ }
578
+ /**
579
+ * Perform a validation on all child components of this nested component.
580
+ * @param {*} components
581
+ * @param {*} data
582
+ * @param {*} flags
583
+ * @returns
584
+ */
585
+ validateComponents(components, data, flags = {}) {
586
+ components = components || this.component.components;
587
+ data = data || this.rootValue;
588
+ const { async, dirty, process } = flags;
589
+ const processorContext = {
590
+ process: process || 'unknown',
591
+ components,
592
+ instances: this.componentsMap,
593
+ data: data,
594
+ scope: { errors: [] },
595
+ processors: [
596
+ (context) => this.validationProcessor(context, flags),
597
+ ({ instance, component, components }) => {
598
+ // If we just validated the last component, and there are errors from our parent, then we need to show a model of those errors.
599
+ if (instance &&
600
+ instance.parent &&
601
+ (component === components[components.length - 1]) &&
602
+ instance.parent.componentModal) {
603
+ instance.parent.checkModal(instance.parent.childErrors, dirty);
604
+ }
605
+ }
606
+ ]
607
+ };
608
+ return async ? (0, process_1.process)(processorContext).then((scope) => scope.errors) : (0, process_1.processSync)(processorContext).errors;
609
+ }
610
+ /**
611
+ * Validate a nested component with data, or its own internal data.
612
+ * @param {*} data
613
+ * @param {*} flags
614
+ * @returns
615
+ */
616
+ validate(data, flags = {}) {
617
+ data = data || this.rootValue;
618
+ return this.validateComponents(this.getComponents().map((component) => component.component), data, flags);
619
+ }
620
+ checkComponentValidity(data, dirty, row, flags = {}, allErrors = []) {
621
+ this.childErrors = [];
622
+ return super.checkComponentValidity(data, dirty, row, flags, allErrors);
623
+ }
624
+ checkValidity(data, dirty, row, silentCheck, childErrors = []) {
625
+ console.log('Deprecation warning: Component.checkValidity() will be deprecated in 6.x version of renderer. Use "validate" method instead.');
626
+ childErrors.push(...this.validate(data, { dirty, silentCheck }));
627
+ return this.checkComponentValidity(data, dirty, row, { dirty, silentCheck }, childErrors) && childErrors.length === 0;
600
628
  }
601
629
  checkAsyncValidity(data, dirty, row, silentCheck) {
630
+ console.log('Deprecation warning: Component.checkAsyncValidity() will be deprecated in 6.x version of renderer.');
602
631
  return this.ready.then(() => {
603
- const promises = [super.checkAsyncValidity(data, dirty, row, silentCheck)];
604
- this.eachComponent((component) => promises.push(component.checkAsyncValidity(data, dirty, row, silentCheck)));
605
- return Promise.all(promises).then((results) => results.reduce((valid, result) => (valid && result), true));
632
+ return this.validate(data, { dirty, silentCheck, async: true }).then((childErrors) => {
633
+ return this.checkComponentValidity(data, dirty, row, { dirty, silentCheck, async: true }, childErrors).then((valid) => {
634
+ return valid && childErrors.length === 0;
635
+ });
636
+ });
606
637
  });
607
638
  }
608
639
  setPristine(pristine) {
@@ -636,8 +667,11 @@ class NestedComponent extends Field_1.default {
636
667
  components.forEach((comp) => this.removeComponent(comp, this.components, all));
637
668
  this.components = [];
638
669
  }
670
+ get visibleErrors() {
671
+ return this.getComponents().reduce((errors, comp) => errors.concat(comp.visibleErrors || []), super.visibleErrors);
672
+ }
639
673
  get errors() {
640
- const thisErrors = this.error ? [this.error] : [];
674
+ const thisErrors = super.errors;
641
675
  return this.getComponents()
642
676
  .reduce((errors, comp) => errors.concat(comp.errors || []), thisErrors)
643
677
  .filter(err => err.level !== 'hidden');
@@ -677,9 +711,6 @@ class NestedComponent extends Field_1.default {
677
711
  if (!value) {
678
712
  return false;
679
713
  }
680
- if (value.submitAsDraft && !value.submit) {
681
- flags.noValidate = true;
682
- }
683
714
  return this.getComponents().reduce((changed, component) => {
684
715
  return this.setNestedValue(component, value, flags, changed) || changed;
685
716
  }, 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
  }
@@ -44,19 +44,23 @@ class NestedArrayComponent extends NestedDataComponent_1.default {
44
44
  flags = flags || {};
45
45
  row = row || this.data;
46
46
  this.checkAddButtonChanged();
47
- return this.checkRows('checkData', data, flags, Component_1.default.prototype.checkData.call(this, data, flags, row));
47
+ return this.processRows('checkData', data, flags, Component_1.default.prototype.checkData.call(this, data, flags, row));
48
48
  }
49
- checkRows(method, data, opts, defaultValue, silentCheck) {
49
+ processRows(method, data, opts, defaultValue, silentCheck) {
50
50
  return this.iteratableRows.reduce((valid, row, rowIndex) => {
51
51
  if (!(opts === null || opts === void 0 ? void 0 : opts.rowIndex) || (opts === null || opts === void 0 ? void 0 : opts.rowIndex) === rowIndex) {
52
- return this.checkRow(method, data, opts, row.data, row.components, silentCheck) && valid;
52
+ return this.processRow(method, data, opts, row.data, row.components, silentCheck) && valid;
53
53
  }
54
54
  else {
55
55
  return valid;
56
56
  }
57
57
  }, defaultValue);
58
58
  }
59
- checkRow(method, data, opts, row, components, silentCheck) {
59
+ validate(data, flags = {}) {
60
+ data = data || this.data;
61
+ return this.validateComponents([this.component], data, flags);
62
+ }
63
+ processRow(method, data, opts, row, components, silentCheck) {
60
64
  if (opts === null || opts === void 0 ? void 0 : opts.isolateRow) {
61
65
  silentCheck = true;
62
66
  opts.noRefresh = true;
@@ -81,6 +85,15 @@ class NestedArrayComponent extends NestedDataComponent_1.default {
81
85
  }, 'show'));
82
86
  }
83
87
  getComponent(path, fn, originalPath) {
88
+ originalPath = originalPath || (0, utils_1.getStringFromComponentPath)(path);
89
+ if (this.componentsMap.hasOwnProperty(originalPath)) {
90
+ if (fn) {
91
+ return fn(this.componentsMap[originalPath]);
92
+ }
93
+ else {
94
+ return this.componentsMap[originalPath];
95
+ }
96
+ }
84
97
  path = Array.isArray(path) ? path : [path];
85
98
  let key = path.shift();
86
99
  const remainingPath = path;
@@ -42,7 +42,6 @@ const Tags_form_1 = __importDefault(require("./tags/Tags.form"));
42
42
  const TextArea_form_1 = __importDefault(require("./textarea/TextArea.form"));
43
43
  const TextField_form_1 = __importDefault(require("./textfield/TextField.form"));
44
44
  const Time_form_1 = __importDefault(require("./time/Time.form"));
45
- const Tree_form_1 = __importDefault(require("./tree/Tree.form"));
46
45
  const Unknown_form_1 = __importDefault(require("./unknown/Unknown.form"));
47
46
  const Url_form_1 = __importDefault(require("./url/Url.form"));
48
47
  const Well_form_1 = __importDefault(require("./well/Well.form"));
@@ -84,7 +83,6 @@ _1.default.tags.editForm = Tags_form_1.default;
84
83
  _1.default.textarea.editForm = TextArea_form_1.default;
85
84
  _1.default.textfield.editForm = TextField_form_1.default;
86
85
  _1.default.time.editForm = Time_form_1.default;
87
- _1.default.tree.editForm = Tree_form_1.default;
88
86
  _1.default.unknown.editForm = Unknown_form_1.default;
89
87
  _1.default.url.editForm = Url_form_1.default;
90
88
  _1.default.well.editForm = Well_form_1.default;
@@ -195,7 +195,7 @@ class ButtonComponent extends Field_1.default {
195
195
  const isSilent = flags && flags.silent;
196
196
  //check root validity only if disableOnInvalid is set and when it is not possible to make submission because of validation errors
197
197
  if (flags && flags.noValidate && (this.component.disableOnInvalid || this.hasError)) {
198
- isValid = flags.rootValidity || (this.root ? this.root.checkValidity(this.root.data, null, null, true) : true);
198
+ isValid = flags.rootValidity || (this.root ? (this.root.validate(this.root.data, { dirty: false, silentCheck: true }).length === 0) : true);
199
199
  flags.rootValidity = isValid;
200
200
  }
201
201
  this.isDisabledOnInvalid = this.component.disableOnInvalid && (isSilent || !isValid);
@@ -284,6 +284,7 @@ class ButtonComponent extends Field_1.default {
284
284
  event.stopPropagation();
285
285
  this.loading = true;
286
286
  this.emit('submitButton', {
287
+ noValidate: this.component.state === 'draft',
287
288
  state: this.component.state || 'submitted',
288
289
  component: this.component,
289
290
  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';
@@ -71,7 +71,7 @@ class ColumnsComponent extends NestedComponent_1.default {
71
71
  if (!column.size) {
72
72
  column.size = 'md';
73
73
  }
74
- column.currentWidth = column.width || 0;
74
+ column.currentWidth = this.options.condensedMode ? this.gridSize : column.width || 0;
75
75
  // Ensure there is a components array.
76
76
  if (!Array.isArray(column.components)) {
77
77
  column.components = [];
@@ -140,14 +140,13 @@ class ColumnsComponent extends NestedComponent_1.default {
140
140
  return lodash_1.default.concat(result.rows, [result.stack]);
141
141
  }
142
142
  checkData(data, flags, row, components) {
143
- const isValid = super.checkData(data, flags, row, components);
143
+ super.checkData(data, flags, row, components);
144
144
  if (this.component.autoAdjust && this.options.display !== 'pdf') {
145
145
  const redraw = this.justify();
146
146
  if (redraw) {
147
147
  this.redraw();
148
148
  }
149
149
  }
150
- return isValid;
151
150
  }
152
151
  detach(all) {
153
152
  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;
@@ -33,6 +33,24 @@ exports.default = [
33
33
  key: 'tableView',
34
34
  ignore: true
35
35
  },
36
+ {
37
+ key: 'hideLabel',
38
+ ignore: true
39
+ },
40
+ {
41
+ weight: 0,
42
+ type: 'textfield',
43
+ input: true,
44
+ key: 'label',
45
+ label: 'Label',
46
+ placeholder: 'Field Label',
47
+ tooltip: 'The label for this field.',
48
+ validate: {
49
+ required: true
50
+ },
51
+ autofocus: true,
52
+ overrideEditForm: true
53
+ },
36
54
  {
37
55
  weight: 150,
38
56
  type: 'datagrid',
@@ -96,5 +114,9 @@ exports.default = [
96
114
  tooltip: 'Will automatically adjust columns based on if nested components are hidden.',
97
115
  key: 'autoAdjust',
98
116
  input: true
99
- }
117
+ },
118
+ {
119
+ key: 'hideLabel',
120
+ ignore: true
121
+ },
100
122
  ];
@@ -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';
@@ -59,12 +59,8 @@ class ContainerComponent extends NestedDataComponent_1.default {
59
59
  flags = flags || {};
60
60
  row = row || this.data;
61
61
  components = components && lodash_1.default.isArray(components) ? components : this.getComponents();
62
- return components.reduce((valid, comp) => {
63
- return comp.checkData(data, flags, this.dataValue) && valid;
64
- }, Component_1.default.prototype.checkData.call(this, data, flags, row));
65
- }
66
- checkChildComponentsValidity(data, dirty, row, silentCheck, isParentValid) {
67
- return super.checkChildComponentsValidity(data, dirty, this.dataValue, silentCheck, isParentValid);
62
+ Component_1.default.prototype.checkData.call(this, data, flags, row);
63
+ components.forEach((comp) => comp.checkData(data, flags, this.dataValue));
68
64
  }
69
65
  focus() {
70
66
  const focusableElements = (0, utils_1.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;
@@ -21,6 +21,7 @@ class ContentComponent extends Component_1.default {
21
21
  group: 'layout',
22
22
  icon: 'html5',
23
23
  preview: false,
24
+ showPreview: false,
24
25
  documentation: '/userguide/form-building/layout-components#content',
25
26
  weight: 5,
26
27
  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;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const lodash_1 = __importDefault(require("lodash"));
7
7
  const NestedArrayComponent_1 = __importDefault(require("../_classes/nestedarray/NestedArrayComponent"));
8
8
  const utils_1 = require("../../utils/utils");
9
+ const Components_1 = require("../Components");
9
10
  class DataGridComponent extends NestedArrayComponent_1.default {
10
11
  static schema(...extend) {
11
12
  return NestedArrayComponent_1.default.schema({
@@ -346,10 +347,13 @@ class DataGridComponent extends NestedArrayComponent_1.default {
346
347
  }
347
348
  focusOnNewRowElement(row) {
348
349
  Object.keys(row).find((key) => {
349
- const focusableElements = (0, utils_1.getFocusableElements)(row[key].element);
350
- if (focusableElements && focusableElements[0]) {
351
- focusableElements[0].focus();
352
- return true;
350
+ const element = row[key].element;
351
+ if (element) {
352
+ const focusableElements = (0, utils_1.getFocusableElements)(element);
353
+ if (focusableElements && focusableElements[0]) {
354
+ focusableElements[0].focus();
355
+ return true;
356
+ }
353
357
  }
354
358
  return false;
355
359
  });
@@ -390,7 +394,7 @@ class DataGridComponent extends NestedArrayComponent_1.default {
390
394
  }
391
395
  component.rowIndex = rowIndex;
392
396
  component.row = `${rowIndex}-${colIndex}`;
393
- component.path = this.calculateComponentPath(component);
397
+ component.path = Components_1.Components.getComponentPath(component);
394
398
  });
395
399
  }
396
400
  updateRowsComponents(rowIndex) {
@@ -473,27 +477,6 @@ class DataGridComponent extends NestedArrayComponent_1.default {
473
477
  });
474
478
  return components;
475
479
  }
476
- /**
477
- * Checks the validity of this datagrid.
478
- *
479
- * @param data
480
- * @param dirty
481
- * @return {*}
482
- */
483
- checkValidity(data, dirty, row, silentCheck) {
484
- data = data || this.rootValue;
485
- row = row || this.data;
486
- if (!this.checkCondition(row, data)) {
487
- this.setCustomValidity('');
488
- return true;
489
- }
490
- if (!this.checkComponentValidity(data, dirty, row, { silentCheck })) {
491
- return false;
492
- }
493
- const isValid = this.checkRows('checkValidity', data, dirty, true, silentCheck);
494
- this.checkModal(isValid, dirty);
495
- return isValid;
496
- }
497
480
  checkColumns(data, flags = {}) {
498
481
  data = data || this.rootValue;
499
482
  let show = false;