@formio/js 5.0.0-rc.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2238) hide show
  1. package/LICENSE.txt +19 -0
  2. package/README.md +195 -0
  3. package/dist/fonts/bootstrap-icons.woff +0 -0
  4. package/dist/fonts/bootstrap-icons.woff2 +0 -0
  5. package/dist/formio.builder.css +2295 -0
  6. package/dist/formio.builder.min.css +1 -0
  7. package/dist/formio.embed.css +40 -0
  8. package/dist/formio.embed.js +90 -0
  9. package/dist/formio.embed.min.css +1 -0
  10. package/dist/formio.embed.min.js +2 -0
  11. package/dist/formio.embed.min.js.LICENSE.txt +1 -0
  12. package/dist/formio.form.css +2014 -0
  13. package/dist/formio.form.js +8300 -0
  14. package/dist/formio.form.min.css +1 -0
  15. package/dist/formio.form.min.js +2 -0
  16. package/dist/formio.form.min.js.LICENSE.txt +48 -0
  17. package/dist/formio.full.css +3937 -0
  18. package/dist/formio.full.js +10276 -0
  19. package/dist/formio.full.min.css +5 -0
  20. package/dist/formio.full.min.js +2 -0
  21. package/dist/formio.full.min.js.LICENSE.txt +48 -0
  22. package/dist/formio.js +2722 -0
  23. package/dist/formio.min.js +2 -0
  24. package/dist/formio.min.js.LICENSE.txt +17 -0
  25. package/dist/formio.utils.js +2103 -0
  26. package/dist/formio.utils.min.js +2 -0
  27. package/dist/formio.utils.min.js.LICENSE.txt +41 -0
  28. package/index.d.ts +1 -0
  29. package/lib/cjs/CDN.d.ts +28 -0
  30. package/lib/cjs/CDN.js +76 -0
  31. package/lib/cjs/Element.d.ts +255 -0
  32. package/lib/cjs/Element.js +593 -0
  33. package/lib/cjs/Embed.d.ts +1 -0
  34. package/lib/cjs/Embed.js +355 -0
  35. package/lib/cjs/EventEmitter.d.ts +7 -0
  36. package/lib/cjs/EventEmitter.js +52 -0
  37. package/lib/cjs/Form.d.ts +90 -0
  38. package/lib/cjs/Form.js +337 -0
  39. package/lib/cjs/FormBuilder.d.ts +6 -0
  40. package/lib/cjs/FormBuilder.js +39 -0
  41. package/lib/cjs/Formio.d.ts +2 -0
  42. package/lib/cjs/Formio.js +95 -0
  43. package/lib/cjs/PDF.d.ts +32 -0
  44. package/lib/cjs/PDF.js +292 -0
  45. package/lib/cjs/PDFBuilder.d.ts +55 -0
  46. package/lib/cjs/PDFBuilder.js +481 -0
  47. package/lib/cjs/Webform.d.ts +408 -0
  48. package/lib/cjs/Webform.js +1515 -0
  49. package/lib/cjs/WebformBuilder.d.ts +120 -0
  50. package/lib/cjs/WebformBuilder.js +1537 -0
  51. package/lib/cjs/Wizard.d.ts +93 -0
  52. package/lib/cjs/Wizard.js +917 -0
  53. package/lib/cjs/WizardBuilder.d.ts +46 -0
  54. package/lib/cjs/WizardBuilder.js +257 -0
  55. package/lib/cjs/addons/FormioAddon.d.ts +19 -0
  56. package/lib/cjs/addons/FormioAddon.js +37 -0
  57. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +717 -0
  58. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.form.d.ts +590 -0
  59. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +316 -0
  60. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +397 -0
  61. package/lib/cjs/addons/index.d.ts +625 -0
  62. package/lib/cjs/addons/index.js +25 -0
  63. package/lib/cjs/builders/Builders.d.ts +18 -0
  64. package/lib/cjs/builders/Builders.js +29 -0
  65. package/lib/cjs/builders/index.d.ts +2 -0
  66. package/lib/cjs/builders/index.js +7 -0
  67. package/lib/cjs/components/Components.d.ts +258 -0
  68. package/lib/cjs/components/Components.js +80 -0
  69. package/lib/cjs/components/_classes/component/Component.d.ts +779 -0
  70. package/lib/cjs/components/_classes/component/Component.form.d.ts +3 -0
  71. package/lib/cjs/components/_classes/component/Component.form.js +77 -0
  72. package/lib/cjs/components/_classes/component/Component.js +3146 -0
  73. package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.d.ts +645 -0
  74. package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.js +46 -0
  75. package/lib/cjs/components/_classes/component/editForm/Component.edit.api.d.ts +42 -0
  76. package/lib/cjs/components/_classes/component/editForm/Component.edit.api.js +40 -0
  77. package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.d.ts +113 -0
  78. package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.js +55 -0
  79. package/lib/cjs/components/_classes/component/editForm/Component.edit.data.d.ts +219 -0
  80. package/lib/cjs/components/_classes/component/editForm/Component.edit.data.js +161 -0
  81. package/lib/cjs/components/_classes/component/editForm/Component.edit.display.d.ts +160 -0
  82. package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +202 -0
  83. package/lib/cjs/components/_classes/component/editForm/Component.edit.layout.d.ts +44 -0
  84. package/lib/cjs/components/_classes/component/editForm/Component.edit.layout.js +79 -0
  85. package/lib/cjs/components/_classes/component/editForm/Component.edit.logic.d.ts +368 -0
  86. package/lib/cjs/components/_classes/component/editForm/Component.edit.logic.js +415 -0
  87. package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.d.ts +140 -0
  88. package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +209 -0
  89. package/lib/cjs/components/_classes/component/editForm/utils.d.ts +83 -0
  90. package/lib/cjs/components/_classes/component/editForm/utils.js +137 -0
  91. package/lib/cjs/components/_classes/component/fixtures/comp1.d.ts +33 -0
  92. package/lib/cjs/components/_classes/component/fixtures/comp1.js +33 -0
  93. package/lib/cjs/components/_classes/component/fixtures/comp2.d.ts +33 -0
  94. package/lib/cjs/components/_classes/component/fixtures/comp2.js +33 -0
  95. package/lib/cjs/components/_classes/component/fixtures/comp3.d.ts +14 -0
  96. package/lib/cjs/components/_classes/component/fixtures/comp3.js +14 -0
  97. package/lib/cjs/components/_classes/component/fixtures/comp4.d.ts +17 -0
  98. package/lib/cjs/components/_classes/component/fixtures/comp4.js +18 -0
  99. package/lib/cjs/components/_classes/component/fixtures/index.d.ts +5 -0
  100. package/lib/cjs/components/_classes/component/fixtures/index.js +14 -0
  101. package/lib/cjs/components/_classes/componentModal/ComponentModal.d.ts +46 -0
  102. package/lib/cjs/components/_classes/componentModal/ComponentModal.js +183 -0
  103. package/lib/cjs/components/_classes/field/Field.d.ts +4 -0
  104. package/lib/cjs/components/_classes/field/Field.js +23 -0
  105. package/lib/cjs/components/_classes/input/Input.d.ts +42 -0
  106. package/lib/cjs/components/_classes/input/Input.js +304 -0
  107. package/lib/cjs/components/_classes/list/ListComponent.d.ts +14 -0
  108. package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +3 -0
  109. package/lib/cjs/components/_classes/list/ListComponent.form.js +16 -0
  110. package/lib/cjs/components/_classes/list/ListComponent.js +215 -0
  111. package/lib/cjs/components/_classes/list/editForm/ListComponent.edit.data.d.ts +183 -0
  112. package/lib/cjs/components/_classes/list/editForm/ListComponent.edit.data.js +119 -0
  113. package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +29 -0
  114. package/lib/cjs/components/_classes/multivalue/Multivalue.js +263 -0
  115. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +130 -0
  116. package/lib/cjs/components/_classes/nested/NestedComponent.form.d.ts +3 -0
  117. package/lib/cjs/components/_classes/nested/NestedComponent.form.js +19 -0
  118. package/lib/cjs/components/_classes/nested/NestedComponent.js +693 -0
  119. package/lib/cjs/components/_classes/nested/fixtures/comp1.d.ts +8 -0
  120. package/lib/cjs/components/_classes/nested/fixtures/comp1.js +16 -0
  121. package/lib/cjs/components/_classes/nested/fixtures/comp2.d.ts +236 -0
  122. package/lib/cjs/components/_classes/nested/fixtures/comp2.js +227 -0
  123. package/lib/cjs/components/_classes/nested/fixtures/comp3.d.ts +26 -0
  124. package/lib/cjs/components/_classes/nested/fixtures/comp3.js +29 -0
  125. package/lib/cjs/components/_classes/nested/fixtures/index.d.ts +3 -0
  126. package/lib/cjs/components/_classes/nested/fixtures/index.js +12 -0
  127. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +14 -0
  128. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +180 -0
  129. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +11 -0
  130. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +123 -0
  131. package/lib/cjs/components/address/Address.d.ts +58 -0
  132. package/lib/cjs/components/address/Address.form.d.ts +3 -0
  133. package/lib/cjs/components/address/Address.form.js +28 -0
  134. package/lib/cjs/components/address/Address.js +547 -0
  135. package/lib/cjs/components/address/editForm/Address.edit.data.d.ts +31 -0
  136. package/lib/cjs/components/address/editForm/Address.edit.data.js +23 -0
  137. package/lib/cjs/components/address/editForm/Address.edit.display.d.ts +49 -0
  138. package/lib/cjs/components/address/editForm/Address.edit.display.js +44 -0
  139. package/lib/cjs/components/address/editForm/Address.edit.provider.d.ts +164 -0
  140. package/lib/cjs/components/address/editForm/Address.edit.provider.js +156 -0
  141. package/lib/cjs/components/address/fixtures/comp1.d.ts +34 -0
  142. package/lib/cjs/components/address/fixtures/comp1.js +71 -0
  143. package/lib/cjs/components/address/fixtures/comp2.d.ts +62 -0
  144. package/lib/cjs/components/address/fixtures/comp2.js +103 -0
  145. package/lib/cjs/components/address/fixtures/comp3.d.ts +44 -0
  146. package/lib/cjs/components/address/fixtures/comp3.js +85 -0
  147. package/lib/cjs/components/address/fixtures/comp4.d.ts +56 -0
  148. package/lib/cjs/components/address/fixtures/comp4.js +93 -0
  149. package/lib/cjs/components/address/fixtures/index.d.ts +5 -0
  150. package/lib/cjs/components/address/fixtures/index.js +14 -0
  151. package/lib/cjs/components/address/fixtures/values.d.ts +22 -0
  152. package/lib/cjs/components/address/fixtures/values.js +19 -0
  153. package/lib/cjs/components/alert/Alert.d.ts +30 -0
  154. package/lib/cjs/components/alert/Alert.js +183 -0
  155. package/lib/cjs/components/builder.d.ts +2 -0
  156. package/lib/cjs/components/builder.js +91 -0
  157. package/lib/cjs/components/button/Button.d.ts +44 -0
  158. package/lib/cjs/components/button/Button.form.d.ts +3 -0
  159. package/lib/cjs/components/button/Button.form.js +24 -0
  160. package/lib/cjs/components/button/Button.js +465 -0
  161. package/lib/cjs/components/button/editForm/Button.edit.display.d.ts +360 -0
  162. package/lib/cjs/components/button/editForm/Button.edit.display.js +253 -0
  163. package/lib/cjs/components/button/fixtures/comp1.d.ts +15 -0
  164. package/lib/cjs/components/button/fixtures/comp1.js +16 -0
  165. package/lib/cjs/components/button/fixtures/comp2.d.ts +25 -0
  166. package/lib/cjs/components/button/fixtures/comp2.js +57 -0
  167. package/lib/cjs/components/button/fixtures/comp3.d.ts +113 -0
  168. package/lib/cjs/components/button/fixtures/comp3.js +84 -0
  169. package/lib/cjs/components/button/fixtures/index.d.ts +4 -0
  170. package/lib/cjs/components/button/fixtures/index.js +12 -0
  171. package/lib/cjs/components/button/fixtures/values.d.ts +2 -0
  172. package/lib/cjs/components/button/fixtures/values.js +6 -0
  173. package/lib/cjs/components/checkbox/Checkbox.d.ts +36 -0
  174. package/lib/cjs/components/checkbox/Checkbox.form.d.ts +3 -0
  175. package/lib/cjs/components/checkbox/Checkbox.form.js +26 -0
  176. package/lib/cjs/components/checkbox/Checkbox.js +194 -0
  177. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.data.d.ts +5 -0
  178. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.data.js +8 -0
  179. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.display.d.ts +75 -0
  180. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.display.js +79 -0
  181. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.validation.d.ts +5 -0
  182. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.validation.js +12 -0
  183. package/lib/cjs/components/checkbox/fixtures/comp1.d.ts +24 -0
  184. package/lib/cjs/components/checkbox/fixtures/comp1.js +24 -0
  185. package/lib/cjs/components/checkbox/fixtures/comp2.d.ts +12 -0
  186. package/lib/cjs/components/checkbox/fixtures/comp2.js +13 -0
  187. package/lib/cjs/components/checkbox/fixtures/comp3.d.ts +15 -0
  188. package/lib/cjs/components/checkbox/fixtures/comp3.js +16 -0
  189. package/lib/cjs/components/checkbox/fixtures/comp4.d.ts +46 -0
  190. package/lib/cjs/components/checkbox/fixtures/comp4.js +39 -0
  191. package/lib/cjs/components/checkbox/fixtures/customDefaultComponent.d.ts +25 -0
  192. package/lib/cjs/components/checkbox/fixtures/customDefaultComponent.js +25 -0
  193. package/lib/cjs/components/checkbox/fixtures/index.d.ts +6 -0
  194. package/lib/cjs/components/checkbox/fixtures/index.js +16 -0
  195. package/lib/cjs/components/checkbox/fixtures/values.d.ts +2 -0
  196. package/lib/cjs/components/checkbox/fixtures/values.js +6 -0
  197. package/lib/cjs/components/columns/Columns.d.ts +25 -0
  198. package/lib/cjs/components/columns/Columns.form.d.ts +3 -0
  199. package/lib/cjs/components/columns/Columns.form.js +16 -0
  200. package/lib/cjs/components/columns/Columns.js +156 -0
  201. package/lib/cjs/components/columns/editForm/Columns.edit.display.d.ts +58 -0
  202. package/lib/cjs/components/columns/editForm/Columns.edit.display.js +100 -0
  203. package/lib/cjs/components/columns/fixtures/comp1.d.ts +45 -0
  204. package/lib/cjs/components/columns/fixtures/comp1.js +85 -0
  205. package/lib/cjs/components/columns/fixtures/comp2.d.ts +24 -0
  206. package/lib/cjs/components/columns/fixtures/comp2.js +127 -0
  207. package/lib/cjs/components/columns/fixtures/comp3.d.ts +45 -0
  208. package/lib/cjs/components/columns/fixtures/comp3.js +53 -0
  209. package/lib/cjs/components/columns/fixtures/index.d.ts +4 -0
  210. package/lib/cjs/components/columns/fixtures/index.js +12 -0
  211. package/lib/cjs/components/container/Container.d.ts +14 -0
  212. package/lib/cjs/components/container/Container.form.d.ts +3 -0
  213. package/lib/cjs/components/container/Container.form.js +21 -0
  214. package/lib/cjs/components/container/Container.js +78 -0
  215. package/lib/cjs/components/container/editForm/Container.edit.data.d.ts +5 -0
  216. package/lib/cjs/components/container/editForm/Container.edit.data.js +16 -0
  217. package/lib/cjs/components/container/editForm/Container.edit.display.d.ts +5 -0
  218. package/lib/cjs/components/container/editForm/Container.edit.display.js +20 -0
  219. package/lib/cjs/components/container/fixtures/comp1.d.ts +49 -0
  220. package/lib/cjs/components/container/fixtures/comp1.js +82 -0
  221. package/lib/cjs/components/container/fixtures/comp2.d.ts +30 -0
  222. package/lib/cjs/components/container/fixtures/comp2.js +34 -0
  223. package/lib/cjs/components/container/fixtures/comp3.d.ts +77 -0
  224. package/lib/cjs/components/container/fixtures/comp3.js +57 -0
  225. package/lib/cjs/components/container/fixtures/index.d.ts +4 -0
  226. package/lib/cjs/components/container/fixtures/index.js +12 -0
  227. package/lib/cjs/components/content/Content.d.ts +15 -0
  228. package/lib/cjs/components/content/Content.form.d.ts +3 -0
  229. package/lib/cjs/components/content/Content.form.js +43 -0
  230. package/lib/cjs/components/content/Content.js +76 -0
  231. package/lib/cjs/components/content/editForm/Content.edit.display.d.ts +18 -0
  232. package/lib/cjs/components/content/editForm/Content.edit.display.js +48 -0
  233. package/lib/cjs/components/content/editForm/Content.edit.logic.d.ts +48 -0
  234. package/lib/cjs/components/content/editForm/Content.edit.logic.js +100 -0
  235. package/lib/cjs/components/content/fixtures/comp1.d.ts +13 -0
  236. package/lib/cjs/components/content/fixtures/comp1.js +14 -0
  237. package/lib/cjs/components/content/fixtures/index.d.ts +2 -0
  238. package/lib/cjs/components/content/fixtures/index.js +8 -0
  239. package/lib/cjs/components/currency/Currency.d.ts +8 -0
  240. package/lib/cjs/components/currency/Currency.form.d.ts +3 -0
  241. package/lib/cjs/components/currency/Currency.form.js +46 -0
  242. package/lib/cjs/components/currency/Currency.js +180 -0
  243. package/lib/cjs/components/currency/editForm/Currency.edit.data.d.ts +17 -0
  244. package/lib/cjs/components/currency/editForm/Currency.edit.data.js +188 -0
  245. package/lib/cjs/components/currency/editForm/Currency.edit.display.d.ts +18 -0
  246. package/lib/cjs/components/currency/editForm/Currency.edit.display.js +36 -0
  247. package/lib/cjs/components/currency/fixtures/comp1.d.ts +31 -0
  248. package/lib/cjs/components/currency/fixtures/comp1.js +31 -0
  249. package/lib/cjs/components/currency/fixtures/comp2.d.ts +20 -0
  250. package/lib/cjs/components/currency/fixtures/comp2.js +20 -0
  251. package/lib/cjs/components/currency/fixtures/comp3.d.ts +13 -0
  252. package/lib/cjs/components/currency/fixtures/comp3.js +14 -0
  253. package/lib/cjs/components/currency/fixtures/comp4.d.ts +17 -0
  254. package/lib/cjs/components/currency/fixtures/comp4.js +20 -0
  255. package/lib/cjs/components/currency/fixtures/index.d.ts +5 -0
  256. package/lib/cjs/components/currency/fixtures/index.js +14 -0
  257. package/lib/cjs/components/currency/fixtures/values.d.ts +2 -0
  258. package/lib/cjs/components/currency/fixtures/values.js +8 -0
  259. package/lib/cjs/components/datagrid/DataGrid.d.ts +87 -0
  260. package/lib/cjs/components/datagrid/DataGrid.form.d.ts +3 -0
  261. package/lib/cjs/components/datagrid/DataGrid.form.js +26 -0
  262. package/lib/cjs/components/datagrid/DataGrid.js +646 -0
  263. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.data.d.ts +5 -0
  264. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.data.js +8 -0
  265. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.display.d.ts +283 -0
  266. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.display.js +149 -0
  267. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.validation.d.ts +20 -0
  268. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.validation.js +26 -0
  269. package/lib/cjs/components/datagrid/fixtures/comp-modal-with-required-fields.d.ts +37 -0
  270. package/lib/cjs/components/datagrid/fixtures/comp-modal-with-required-fields.js +42 -0
  271. package/lib/cjs/components/datagrid/fixtures/comp-on-blur-validation.d.ts +0 -0
  272. package/lib/cjs/components/datagrid/fixtures/comp-on-blur-validation.js +1 -0
  273. package/lib/cjs/components/datagrid/fixtures/comp-row-groups-with-def-value.d.ts +63 -0
  274. package/lib/cjs/components/datagrid/fixtures/comp-row-groups-with-def-value.js +81 -0
  275. package/lib/cjs/components/datagrid/fixtures/comp-with-collapsible-groups.d.ts +76 -0
  276. package/lib/cjs/components/datagrid/fixtures/comp-with-collapsible-groups.js +75 -0
  277. package/lib/cjs/components/datagrid/fixtures/comp-with-conditional-components-and-validations.d.ts +197 -0
  278. package/lib/cjs/components/datagrid/fixtures/comp-with-conditional-components-and-validations.js +178 -0
  279. package/lib/cjs/components/datagrid/fixtures/comp-with-def-value.d.ts +61 -0
  280. package/lib/cjs/components/datagrid/fixtures/comp-with-def-value.js +69 -0
  281. package/lib/cjs/components/datagrid/fixtures/comp-with-logic.d.ts +165 -0
  282. package/lib/cjs/components/datagrid/fixtures/comp-with-logic.js +180 -0
  283. package/lib/cjs/components/datagrid/fixtures/comp1.d.ts +93 -0
  284. package/lib/cjs/components/datagrid/fixtures/comp1.js +115 -0
  285. package/lib/cjs/components/datagrid/fixtures/comp2.d.ts +18 -0
  286. package/lib/cjs/components/datagrid/fixtures/comp2.js +29 -0
  287. package/lib/cjs/components/datagrid/fixtures/comp3.d.ts +14 -0
  288. package/lib/cjs/components/datagrid/fixtures/comp3.js +23 -0
  289. package/lib/cjs/components/datagrid/fixtures/comp4.d.ts +27 -0
  290. package/lib/cjs/components/datagrid/fixtures/comp4.js +28 -0
  291. package/lib/cjs/components/datagrid/fixtures/comp5.d.ts +67 -0
  292. package/lib/cjs/components/datagrid/fixtures/comp5.js +77 -0
  293. package/lib/cjs/components/datagrid/fixtures/comp6.d.ts +567 -0
  294. package/lib/cjs/components/datagrid/fixtures/comp6.js +296 -0
  295. package/lib/cjs/components/datagrid/fixtures/comp7.d.ts +28 -0
  296. package/lib/cjs/components/datagrid/fixtures/comp7.js +35 -0
  297. package/lib/cjs/components/datagrid/fixtures/comp8.d.ts +35 -0
  298. package/lib/cjs/components/datagrid/fixtures/comp8.js +37 -0
  299. package/lib/cjs/components/datagrid/fixtures/index.d.ts +15 -0
  300. package/lib/cjs/components/datagrid/fixtures/index.js +34 -0
  301. package/lib/cjs/components/datamap/DataMap.d.ts +35 -0
  302. package/lib/cjs/components/datamap/DataMap.form.d.ts +3 -0
  303. package/lib/cjs/components/datamap/DataMap.form.js +21 -0
  304. package/lib/cjs/components/datamap/DataMap.js +297 -0
  305. package/lib/cjs/components/datamap/editForm/DataMap.edit.data.d.ts +5 -0
  306. package/lib/cjs/components/datamap/editForm/DataMap.edit.data.js +12 -0
  307. package/lib/cjs/components/datamap/editForm/DataMap.edit.display.d.ts +30 -0
  308. package/lib/cjs/components/datamap/editForm/DataMap.edit.display.js +48 -0
  309. package/lib/cjs/components/datamap/fixtures/comp1.d.ts +18 -0
  310. package/lib/cjs/components/datamap/fixtures/comp1.js +15 -0
  311. package/lib/cjs/components/datamap/fixtures/formWithConditionalPanel.d.ts +87 -0
  312. package/lib/cjs/components/datamap/fixtures/formWithConditionalPanel.js +85 -0
  313. package/lib/cjs/components/datamap/fixtures/index.d.ts +3 -0
  314. package/lib/cjs/components/datamap/fixtures/index.js +10 -0
  315. package/lib/cjs/components/datetime/DateTime.d.ts +16 -0
  316. package/lib/cjs/components/datetime/DateTime.form.d.ts +3 -0
  317. package/lib/cjs/components/datetime/DateTime.form.js +40 -0
  318. package/lib/cjs/components/datetime/DateTime.js +145 -0
  319. package/lib/cjs/components/datetime/editForm/DateTime.edit.data.d.ts +24 -0
  320. package/lib/cjs/components/datetime/editForm/DateTime.edit.data.js +23 -0
  321. package/lib/cjs/components/datetime/editForm/DateTime.edit.date.d.ts +61 -0
  322. package/lib/cjs/components/datetime/editForm/DateTime.edit.date.js +75 -0
  323. package/lib/cjs/components/datetime/editForm/DateTime.edit.display.d.ts +128 -0
  324. package/lib/cjs/components/datetime/editForm/DateTime.edit.display.js +100 -0
  325. package/lib/cjs/components/datetime/editForm/DateTime.edit.time.d.ts +9 -0
  326. package/lib/cjs/components/datetime/editForm/DateTime.edit.time.js +36 -0
  327. package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.d.ts +40 -0
  328. package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.js +84 -0
  329. package/lib/cjs/components/datetime/fixtures/comp1.d.ts +45 -0
  330. package/lib/cjs/components/datetime/fixtures/comp1.js +44 -0
  331. package/lib/cjs/components/datetime/fixtures/comp10.d.ts +102 -0
  332. package/lib/cjs/components/datetime/fixtures/comp10.js +86 -0
  333. package/lib/cjs/components/datetime/fixtures/comp11.d.ts +58 -0
  334. package/lib/cjs/components/datetime/fixtures/comp11.js +55 -0
  335. package/lib/cjs/components/datetime/fixtures/comp12.d.ts +57 -0
  336. package/lib/cjs/components/datetime/fixtures/comp12.js +55 -0
  337. package/lib/cjs/components/datetime/fixtures/comp2.d.ts +42 -0
  338. package/lib/cjs/components/datetime/fixtures/comp2.js +43 -0
  339. package/lib/cjs/components/datetime/fixtures/comp3.d.ts +51 -0
  340. package/lib/cjs/components/datetime/fixtures/comp3.js +40 -0
  341. package/lib/cjs/components/datetime/fixtures/comp5.d.ts +57 -0
  342. package/lib/cjs/components/datetime/fixtures/comp5.js +48 -0
  343. package/lib/cjs/components/datetime/fixtures/comp6.d.ts +55 -0
  344. package/lib/cjs/components/datetime/fixtures/comp6.js +49 -0
  345. package/lib/cjs/components/datetime/fixtures/comp7.d.ts +59 -0
  346. package/lib/cjs/components/datetime/fixtures/comp7.js +53 -0
  347. package/lib/cjs/components/datetime/fixtures/comp8.d.ts +59 -0
  348. package/lib/cjs/components/datetime/fixtures/comp8.js +52 -0
  349. package/lib/cjs/components/datetime/fixtures/comp9.d.ts +64 -0
  350. package/lib/cjs/components/datetime/fixtures/comp9.js +95 -0
  351. package/lib/cjs/components/datetime/fixtures/index.d.ts +12 -0
  352. package/lib/cjs/components/datetime/fixtures/index.js +28 -0
  353. package/lib/cjs/components/datetime/fixtures/values.d.ts +2 -0
  354. package/lib/cjs/components/datetime/fixtures/values.js +6 -0
  355. package/lib/cjs/components/day/Day.d.ts +143 -0
  356. package/lib/cjs/components/day/Day.form.d.ts +3 -0
  357. package/lib/cjs/components/day/Day.form.js +47 -0
  358. package/lib/cjs/components/day/Day.js +535 -0
  359. package/lib/cjs/components/day/editForm/Day.edit.data.d.ts +5 -0
  360. package/lib/cjs/components/day/editForm/Day.edit.data.js +8 -0
  361. package/lib/cjs/components/day/editForm/Day.edit.day.d.ts +40 -0
  362. package/lib/cjs/components/day/editForm/Day.edit.day.js +48 -0
  363. package/lib/cjs/components/day/editForm/Day.edit.display.d.ts +40 -0
  364. package/lib/cjs/components/day/editForm/Day.edit.display.js +46 -0
  365. package/lib/cjs/components/day/editForm/Day.edit.month.d.ts +40 -0
  366. package/lib/cjs/components/day/editForm/Day.edit.month.js +40 -0
  367. package/lib/cjs/components/day/editForm/Day.edit.validation.d.ts +29 -0
  368. package/lib/cjs/components/day/editForm/Day.edit.validation.js +54 -0
  369. package/lib/cjs/components/day/editForm/Day.edit.year.d.ts +40 -0
  370. package/lib/cjs/components/day/editForm/Day.edit.year.js +58 -0
  371. package/lib/cjs/components/day/fixtures/comp1.d.ts +46 -0
  372. package/lib/cjs/components/day/fixtures/comp1.js +39 -0
  373. package/lib/cjs/components/day/fixtures/comp2.d.ts +46 -0
  374. package/lib/cjs/components/day/fixtures/comp2.js +39 -0
  375. package/lib/cjs/components/day/fixtures/comp3.d.ts +48 -0
  376. package/lib/cjs/components/day/fixtures/comp3.js +41 -0
  377. package/lib/cjs/components/day/fixtures/comp4.d.ts +53 -0
  378. package/lib/cjs/components/day/fixtures/comp4.js +56 -0
  379. package/lib/cjs/components/day/fixtures/index.d.ts +5 -0
  380. package/lib/cjs/components/day/fixtures/index.js +14 -0
  381. package/lib/cjs/components/day/fixtures/values.d.ts +2 -0
  382. package/lib/cjs/components/day/fixtures/values.js +6 -0
  383. package/lib/cjs/components/editgrid/EditGrid.d.ts +98 -0
  384. package/lib/cjs/components/editgrid/EditGrid.form.d.ts +3 -0
  385. package/lib/cjs/components/editgrid/EditGrid.form.js +33 -0
  386. package/lib/cjs/components/editgrid/EditGrid.js +1162 -0
  387. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.data.d.ts +18 -0
  388. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.data.js +20 -0
  389. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.d.ts +82 -0
  390. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +58 -0
  391. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.d.ts +58 -0
  392. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.js +131 -0
  393. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.validation.d.ts +29 -0
  394. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.validation.js +34 -0
  395. package/lib/cjs/components/editgrid/fixtures/comp-openWhenEmpty.d.ts +34 -0
  396. package/lib/cjs/components/editgrid/fixtures/comp-openWhenEmpty.js +36 -0
  397. package/lib/cjs/components/editgrid/fixtures/comp-with-basic-components.d.ts +327 -0
  398. package/lib/cjs/components/editgrid/fixtures/comp-with-basic-components.js +220 -0
  399. package/lib/cjs/components/editgrid/fixtures/comp-with-conditions-and-openWhenEmpty.d.ts +77 -0
  400. package/lib/cjs/components/editgrid/fixtures/comp-with-conditions-and-openWhenEmpty.js +84 -0
  401. package/lib/cjs/components/editgrid/fixtures/comp1.d.ts +89 -0
  402. package/lib/cjs/components/editgrid/fixtures/comp1.js +128 -0
  403. package/lib/cjs/components/editgrid/fixtures/comp10.d.ts +49 -0
  404. package/lib/cjs/components/editgrid/fixtures/comp10.js +48 -0
  405. package/lib/cjs/components/editgrid/fixtures/comp11.d.ts +53 -0
  406. package/lib/cjs/components/editgrid/fixtures/comp11.js +50 -0
  407. package/lib/cjs/components/editgrid/fixtures/comp12.d.ts +57 -0
  408. package/lib/cjs/components/editgrid/fixtures/comp12.js +50 -0
  409. package/lib/cjs/components/editgrid/fixtures/comp13.d.ts +64 -0
  410. package/lib/cjs/components/editgrid/fixtures/comp13.js +64 -0
  411. package/lib/cjs/components/editgrid/fixtures/comp14.d.ts +88 -0
  412. package/lib/cjs/components/editgrid/fixtures/comp14.js +84 -0
  413. package/lib/cjs/components/editgrid/fixtures/comp2.d.ts +112 -0
  414. package/lib/cjs/components/editgrid/fixtures/comp2.js +114 -0
  415. package/lib/cjs/components/editgrid/fixtures/comp3.d.ts +27 -0
  416. package/lib/cjs/components/editgrid/fixtures/comp3.js +28 -0
  417. package/lib/cjs/components/editgrid/fixtures/comp4.d.ts +23 -0
  418. package/lib/cjs/components/editgrid/fixtures/comp4.js +24 -0
  419. package/lib/cjs/components/editgrid/fixtures/comp5.d.ts +19 -0
  420. package/lib/cjs/components/editgrid/fixtures/comp5.js +22 -0
  421. package/lib/cjs/components/editgrid/fixtures/comp6.d.ts +50 -0
  422. package/lib/cjs/components/editgrid/fixtures/comp6.js +58 -0
  423. package/lib/cjs/components/editgrid/fixtures/comp7.d.ts +129 -0
  424. package/lib/cjs/components/editgrid/fixtures/comp7.js +123 -0
  425. package/lib/cjs/components/editgrid/fixtures/comp8.d.ts +148 -0
  426. package/lib/cjs/components/editgrid/fixtures/comp8.js +156 -0
  427. package/lib/cjs/components/editgrid/fixtures/comp9.d.ts +86 -0
  428. package/lib/cjs/components/editgrid/fixtures/comp9.js +62 -0
  429. package/lib/cjs/components/editgrid/fixtures/index.d.ts +17 -0
  430. package/lib/cjs/components/editgrid/fixtures/index.js +38 -0
  431. package/lib/cjs/components/email/Email.d.ts +4 -0
  432. package/lib/cjs/components/email/Email.form.d.ts +3 -0
  433. package/lib/cjs/components/email/Email.form.js +21 -0
  434. package/lib/cjs/components/email/Email.js +54 -0
  435. package/lib/cjs/components/email/editForm/Email.edit.display.d.ts +5 -0
  436. package/lib/cjs/components/email/editForm/Email.edit.display.js +20 -0
  437. package/lib/cjs/components/email/editForm/Email.edit.validation.d.ts +24 -0
  438. package/lib/cjs/components/email/editForm/Email.edit.validation.js +28 -0
  439. package/lib/cjs/components/email/fixtures/comp1.d.ts +26 -0
  440. package/lib/cjs/components/email/fixtures/comp1.js +26 -0
  441. package/lib/cjs/components/email/fixtures/comp2.d.ts +23 -0
  442. package/lib/cjs/components/email/fixtures/comp2.js +13 -0
  443. package/lib/cjs/components/email/fixtures/index.d.ts +3 -0
  444. package/lib/cjs/components/email/fixtures/index.js +10 -0
  445. package/lib/cjs/components/email/fixtures/values.d.ts +2 -0
  446. package/lib/cjs/components/email/fixtures/values.js +6 -0
  447. package/lib/cjs/components/fieldset/Fieldset.d.ts +13 -0
  448. package/lib/cjs/components/fieldset/Fieldset.form.d.ts +3 -0
  449. package/lib/cjs/components/fieldset/Fieldset.form.js +16 -0
  450. package/lib/cjs/components/fieldset/Fieldset.js +43 -0
  451. package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.d.ts +33 -0
  452. package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.js +44 -0
  453. package/lib/cjs/components/fieldset/fixtures/comp1.d.ts +46 -0
  454. package/lib/cjs/components/fieldset/fixtures/comp1.js +81 -0
  455. package/lib/cjs/components/fieldset/fixtures/index.d.ts +2 -0
  456. package/lib/cjs/components/fieldset/fixtures/index.js +8 -0
  457. package/lib/cjs/components/file/File.d.ts +59 -0
  458. package/lib/cjs/components/file/File.form.d.ts +3 -0
  459. package/lib/cjs/components/file/File.form.js +33 -0
  460. package/lib/cjs/components/file/File.js +752 -0
  461. package/lib/cjs/components/file/editForm/File.edit.data.d.ts +5 -0
  462. package/lib/cjs/components/file/editForm/File.edit.data.js +8 -0
  463. package/lib/cjs/components/file/editForm/File.edit.display.d.ts +5 -0
  464. package/lib/cjs/components/file/editForm/File.edit.display.js +8 -0
  465. package/lib/cjs/components/file/editForm/File.edit.file.d.ts +213 -0
  466. package/lib/cjs/components/file/editForm/File.edit.file.js +261 -0
  467. package/lib/cjs/components/file/editForm/File.edit.validation.d.ts +5 -0
  468. package/lib/cjs/components/file/editForm/File.edit.validation.js +12 -0
  469. package/lib/cjs/components/file/fixtures/comp1.d.ts +15 -0
  470. package/lib/cjs/components/file/fixtures/comp1.js +18 -0
  471. package/lib/cjs/components/file/fixtures/comp2.d.ts +35 -0
  472. package/lib/cjs/components/file/fixtures/comp2.js +31 -0
  473. package/lib/cjs/components/file/fixtures/index.d.ts +3 -0
  474. package/lib/cjs/components/file/fixtures/index.js +10 -0
  475. package/lib/cjs/components/file/fixtures/values.d.ts +10 -0
  476. package/lib/cjs/components/file/fixtures/values.js +15 -0
  477. package/lib/cjs/components/form/Form.d.ts +94 -0
  478. package/lib/cjs/components/form/Form.form.d.ts +3 -0
  479. package/lib/cjs/components/form/Form.form.js +30 -0
  480. package/lib/cjs/components/form/Form.js +727 -0
  481. package/lib/cjs/components/form/editForm/Form.edit.data.d.ts +82 -0
  482. package/lib/cjs/components/form/editForm/Form.edit.data.js +21 -0
  483. package/lib/cjs/components/form/editForm/Form.edit.display.d.ts +5 -0
  484. package/lib/cjs/components/form/editForm/Form.edit.display.js +29 -0
  485. package/lib/cjs/components/form/editForm/Form.edit.form.d.ts +89 -0
  486. package/lib/cjs/components/form/editForm/Form.edit.form.js +75 -0
  487. package/lib/cjs/components/form/fixtures/comp1.d.ts +45 -0
  488. package/lib/cjs/components/form/fixtures/comp1.js +80 -0
  489. package/lib/cjs/components/form/fixtures/comp2.d.ts +14 -0
  490. package/lib/cjs/components/form/fixtures/comp2.js +15 -0
  491. package/lib/cjs/components/form/fixtures/comp3.d.ts +187 -0
  492. package/lib/cjs/components/form/fixtures/comp3.js +170 -0
  493. package/lib/cjs/components/form/fixtures/comp4.d.ts +107 -0
  494. package/lib/cjs/components/form/fixtures/comp4.js +91 -0
  495. package/lib/cjs/components/form/fixtures/comp5.d.ts +42 -0
  496. package/lib/cjs/components/form/fixtures/comp5.js +45 -0
  497. package/lib/cjs/components/form/fixtures/comp6.d.ts +74 -0
  498. package/lib/cjs/components/form/fixtures/comp6.js +94 -0
  499. package/lib/cjs/components/form/fixtures/formModalEdit.d.ts +42 -0
  500. package/lib/cjs/components/form/fixtures/formModalEdit.js +51 -0
  501. package/lib/cjs/components/form/fixtures/index.d.ts +8 -0
  502. package/lib/cjs/components/form/fixtures/index.js +20 -0
  503. package/lib/cjs/components/form/fixtures/values.d.ts +6 -0
  504. package/lib/cjs/components/form/fixtures/values.js +9 -0
  505. package/lib/cjs/components/hidden/Hidden.d.ts +25 -0
  506. package/lib/cjs/components/hidden/Hidden.form.d.ts +3 -0
  507. package/lib/cjs/components/hidden/Hidden.form.js +29 -0
  508. package/lib/cjs/components/hidden/Hidden.js +60 -0
  509. package/lib/cjs/components/hidden/editForm/Hidden.edit.data.d.ts +5 -0
  510. package/lib/cjs/components/hidden/editForm/Hidden.edit.data.js +16 -0
  511. package/lib/cjs/components/hidden/editForm/Hidden.edit.display.d.ts +5 -0
  512. package/lib/cjs/components/hidden/editForm/Hidden.edit.display.js +44 -0
  513. package/lib/cjs/components/hidden/fixtures/comp1.d.ts +18 -0
  514. package/lib/cjs/components/hidden/fixtures/comp1.js +18 -0
  515. package/lib/cjs/components/hidden/fixtures/index.d.ts +2 -0
  516. package/lib/cjs/components/hidden/fixtures/index.js +8 -0
  517. package/lib/cjs/components/hidden/fixtures/values.d.ts +2 -0
  518. package/lib/cjs/components/hidden/fixtures/values.js +6 -0
  519. package/lib/cjs/components/html/HTML.d.ts +16 -0
  520. package/lib/cjs/components/html/HTML.form.d.ts +3 -0
  521. package/lib/cjs/components/html/HTML.form.js +29 -0
  522. package/lib/cjs/components/html/HTML.js +89 -0
  523. package/lib/cjs/components/html/editForm/HTML.edit.display.d.ts +77 -0
  524. package/lib/cjs/components/html/editForm/HTML.edit.display.js +100 -0
  525. package/lib/cjs/components/html/editForm/HTML.edit.logic.d.ts +48 -0
  526. package/lib/cjs/components/html/editForm/HTML.edit.logic.js +100 -0
  527. package/lib/cjs/components/html/fixtures/comp1.d.ts +19 -0
  528. package/lib/cjs/components/html/fixtures/comp1.js +22 -0
  529. package/lib/cjs/components/html/fixtures/comp2.d.ts +21 -0
  530. package/lib/cjs/components/html/fixtures/comp2.js +24 -0
  531. package/lib/cjs/components/html/fixtures/index.d.ts +3 -0
  532. package/lib/cjs/components/html/fixtures/index.js +10 -0
  533. package/lib/cjs/components/index.d.ts +100 -0
  534. package/lib/cjs/components/index.js +104 -0
  535. package/lib/cjs/components/number/Number.d.ts +31 -0
  536. package/lib/cjs/components/number/Number.form.d.ts +3 -0
  537. package/lib/cjs/components/number/Number.form.js +26 -0
  538. package/lib/cjs/components/number/Number.js +192 -0
  539. package/lib/cjs/components/number/editForm/Number.edit.data.d.ts +18 -0
  540. package/lib/cjs/components/number/editForm/Number.edit.data.js +32 -0
  541. package/lib/cjs/components/number/editForm/Number.edit.display.d.ts +5 -0
  542. package/lib/cjs/components/number/editForm/Number.edit.display.js +24 -0
  543. package/lib/cjs/components/number/editForm/Number.edit.validation.d.ts +20 -0
  544. package/lib/cjs/components/number/editForm/Number.edit.validation.js +46 -0
  545. package/lib/cjs/components/number/fixtures/comp1.d.ts +33 -0
  546. package/lib/cjs/components/number/fixtures/comp1.js +32 -0
  547. package/lib/cjs/components/number/fixtures/comp2.d.ts +32 -0
  548. package/lib/cjs/components/number/fixtures/comp2.js +31 -0
  549. package/lib/cjs/components/number/fixtures/comp3.d.ts +14 -0
  550. package/lib/cjs/components/number/fixtures/comp3.js +15 -0
  551. package/lib/cjs/components/number/fixtures/comp4.d.ts +14 -0
  552. package/lib/cjs/components/number/fixtures/comp4.js +15 -0
  553. package/lib/cjs/components/number/fixtures/comp5.d.ts +20 -0
  554. package/lib/cjs/components/number/fixtures/comp5.js +20 -0
  555. package/lib/cjs/components/number/fixtures/comp6.d.ts +40 -0
  556. package/lib/cjs/components/number/fixtures/comp6.js +27 -0
  557. package/lib/cjs/components/number/fixtures/comp7.d.ts +15 -0
  558. package/lib/cjs/components/number/fixtures/comp7.js +16 -0
  559. package/lib/cjs/components/number/fixtures/index.d.ts +8 -0
  560. package/lib/cjs/components/number/fixtures/index.js +20 -0
  561. package/lib/cjs/components/number/fixtures/values.d.ts +2 -0
  562. package/lib/cjs/components/number/fixtures/values.js +11 -0
  563. package/lib/cjs/components/panel/Panel.d.ts +14 -0
  564. package/lib/cjs/components/panel/Panel.form.d.ts +3 -0
  565. package/lib/cjs/components/panel/Panel.form.js +21 -0
  566. package/lib/cjs/components/panel/Panel.js +59 -0
  567. package/lib/cjs/components/panel/editForm/Panel.edit.conditional.d.ts +75 -0
  568. package/lib/cjs/components/panel/editForm/Panel.edit.conditional.js +42 -0
  569. package/lib/cjs/components/panel/editForm/Panel.edit.display.d.ts +228 -0
  570. package/lib/cjs/components/panel/editForm/Panel.edit.display.js +213 -0
  571. package/lib/cjs/components/panel/fixtures/comp1.d.ts +46 -0
  572. package/lib/cjs/components/panel/fixtures/comp1.js +80 -0
  573. package/lib/cjs/components/panel/fixtures/comp2.d.ts +80 -0
  574. package/lib/cjs/components/panel/fixtures/comp2.js +69 -0
  575. package/lib/cjs/components/panel/fixtures/index.d.ts +3 -0
  576. package/lib/cjs/components/panel/fixtures/index.js +10 -0
  577. package/lib/cjs/components/password/Password.d.ts +3 -0
  578. package/lib/cjs/components/password/Password.form.d.ts +3 -0
  579. package/lib/cjs/components/password/Password.form.js +26 -0
  580. package/lib/cjs/components/password/Password.js +40 -0
  581. package/lib/cjs/components/password/editForm/Password.edit.data.d.ts +18 -0
  582. package/lib/cjs/components/password/editForm/Password.edit.data.js +48 -0
  583. package/lib/cjs/components/password/editForm/Password.edit.display.d.ts +5 -0
  584. package/lib/cjs/components/password/editForm/Password.edit.display.js +16 -0
  585. package/lib/cjs/components/password/editForm/Password.edit.validation.d.ts +5 -0
  586. package/lib/cjs/components/password/editForm/Password.edit.validation.js +16 -0
  587. package/lib/cjs/components/password/fixtures/comp1.d.ts +22 -0
  588. package/lib/cjs/components/password/fixtures/comp1.js +22 -0
  589. package/lib/cjs/components/password/fixtures/comp2.d.ts +27 -0
  590. package/lib/cjs/components/password/fixtures/comp2.js +29 -0
  591. package/lib/cjs/components/password/fixtures/index.d.ts +3 -0
  592. package/lib/cjs/components/password/fixtures/index.js +10 -0
  593. package/lib/cjs/components/password/fixtures/values.d.ts +2 -0
  594. package/lib/cjs/components/password/fixtures/values.js +6 -0
  595. package/lib/cjs/components/phonenumber/PhoneNumber.d.ts +3 -0
  596. package/lib/cjs/components/phonenumber/PhoneNumber.form.d.ts +3 -0
  597. package/lib/cjs/components/phonenumber/PhoneNumber.form.js +29 -0
  598. package/lib/cjs/components/phonenumber/PhoneNumber.js +33 -0
  599. package/lib/cjs/components/phonenumber/editForm/PhoneNumber.edit.validation.d.ts +5 -0
  600. package/lib/cjs/components/phonenumber/editForm/PhoneNumber.edit.validation.js +24 -0
  601. package/lib/cjs/components/phonenumber/fixtures/comp1.d.ts +27 -0
  602. package/lib/cjs/components/phonenumber/fixtures/comp1.js +27 -0
  603. package/lib/cjs/components/phonenumber/fixtures/index.d.ts +2 -0
  604. package/lib/cjs/components/phonenumber/fixtures/index.js +8 -0
  605. package/lib/cjs/components/phonenumber/fixtures/values.d.ts +2 -0
  606. package/lib/cjs/components/phonenumber/fixtures/values.js +6 -0
  607. package/lib/cjs/components/radio/Radio.d.ts +44 -0
  608. package/lib/cjs/components/radio/Radio.form.d.ts +3 -0
  609. package/lib/cjs/components/radio/Radio.form.js +26 -0
  610. package/lib/cjs/components/radio/Radio.js +295 -0
  611. package/lib/cjs/components/radio/editForm/Radio.edit.data.d.ts +134 -0
  612. package/lib/cjs/components/radio/editForm/Radio.edit.data.js +85 -0
  613. package/lib/cjs/components/radio/editForm/Radio.edit.display.d.ts +40 -0
  614. package/lib/cjs/components/radio/editForm/Radio.edit.display.js +34 -0
  615. package/lib/cjs/components/radio/editForm/Radio.edit.validation.d.ts +18 -0
  616. package/lib/cjs/components/radio/editForm/Radio.edit.validation.js +20 -0
  617. package/lib/cjs/components/radio/fixtures/comp1.d.ts +28 -0
  618. package/lib/cjs/components/radio/fixtures/comp1.js +42 -0
  619. package/lib/cjs/components/radio/fixtures/comp2.d.ts +85 -0
  620. package/lib/cjs/components/radio/fixtures/comp2.js +86 -0
  621. package/lib/cjs/components/radio/fixtures/comp3.d.ts +85 -0
  622. package/lib/cjs/components/radio/fixtures/comp3.js +90 -0
  623. package/lib/cjs/components/radio/fixtures/comp4.d.ts +19 -0
  624. package/lib/cjs/components/radio/fixtures/comp4.js +27 -0
  625. package/lib/cjs/components/radio/fixtures/comp5.d.ts +39 -0
  626. package/lib/cjs/components/radio/fixtures/comp5.js +35 -0
  627. package/lib/cjs/components/radio/fixtures/comp6.d.ts +38 -0
  628. package/lib/cjs/components/radio/fixtures/comp6.js +33 -0
  629. package/lib/cjs/components/radio/fixtures/comp7.d.ts +23 -0
  630. package/lib/cjs/components/radio/fixtures/comp7.js +21 -0
  631. package/lib/cjs/components/radio/fixtures/comp8.d.ts +118 -0
  632. package/lib/cjs/components/radio/fixtures/comp8.js +113 -0
  633. package/lib/cjs/components/radio/fixtures/comp9.d.ts +35 -0
  634. package/lib/cjs/components/radio/fixtures/comp9.js +32 -0
  635. package/lib/cjs/components/radio/fixtures/index.d.ts +10 -0
  636. package/lib/cjs/components/radio/fixtures/index.js +24 -0
  637. package/lib/cjs/components/radio/fixtures/values.d.ts +2 -0
  638. package/lib/cjs/components/radio/fixtures/values.js +7 -0
  639. package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +22 -0
  640. package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +3 -0
  641. package/lib/cjs/components/recaptcha/ReCaptcha.form.js +32 -0
  642. package/lib/cjs/components/recaptcha/ReCaptcha.js +140 -0
  643. package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +44 -0
  644. package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +108 -0
  645. package/lib/cjs/components/recaptcha/fixtures/comp1.d.ts +8 -0
  646. package/lib/cjs/components/recaptcha/fixtures/comp1.js +9 -0
  647. package/lib/cjs/components/recaptcha/fixtures/index.d.ts +2 -0
  648. package/lib/cjs/components/recaptcha/fixtures/index.js +8 -0
  649. package/lib/cjs/components/resource/Resource.d.ts +3 -0
  650. package/lib/cjs/components/resource/Resource.form.d.ts +3 -0
  651. package/lib/cjs/components/resource/Resource.form.js +16 -0
  652. package/lib/cjs/components/resource/Resource.js +40 -0
  653. package/lib/cjs/components/resource/editForm/Resource.edit.display.d.ts +173 -0
  654. package/lib/cjs/components/resource/editForm/Resource.edit.display.js +102 -0
  655. package/lib/cjs/components/resource/fixtures/comp1.d.ts +30 -0
  656. package/lib/cjs/components/resource/fixtures/comp1.js +30 -0
  657. package/lib/cjs/components/resource/fixtures/comp2.d.ts +35 -0
  658. package/lib/cjs/components/resource/fixtures/comp2.js +31 -0
  659. package/lib/cjs/components/resource/fixtures/index.d.ts +3 -0
  660. package/lib/cjs/components/resource/fixtures/index.js +10 -0
  661. package/lib/cjs/components/select/Select.d.ts +122 -0
  662. package/lib/cjs/components/select/Select.form.d.ts +3 -0
  663. package/lib/cjs/components/select/Select.form.js +26 -0
  664. package/lib/cjs/components/select/Select.js +1463 -0
  665. package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +1039 -0
  666. package/lib/cjs/components/select/editForm/Select.edit.data.js +629 -0
  667. package/lib/cjs/components/select/editForm/Select.edit.display.d.ts +27 -0
  668. package/lib/cjs/components/select/editForm/Select.edit.display.js +28 -0
  669. package/lib/cjs/components/select/editForm/Select.edit.validation.d.ts +30 -0
  670. package/lib/cjs/components/select/editForm/Select.edit.validation.js +35 -0
  671. package/lib/cjs/components/select/fixtures/comp1.d.ts +40 -0
  672. package/lib/cjs/components/select/fixtures/comp1.js +66 -0
  673. package/lib/cjs/components/select/fixtures/comp10.d.ts +41 -0
  674. package/lib/cjs/components/select/fixtures/comp10.js +32 -0
  675. package/lib/cjs/components/select/fixtures/comp11.d.ts +28 -0
  676. package/lib/cjs/components/select/fixtures/comp11.js +24 -0
  677. package/lib/cjs/components/select/fixtures/comp12.d.ts +53 -0
  678. package/lib/cjs/components/select/fixtures/comp12.js +29 -0
  679. package/lib/cjs/components/select/fixtures/comp13.d.ts +28 -0
  680. package/lib/cjs/components/select/fixtures/comp13.js +31 -0
  681. package/lib/cjs/components/select/fixtures/comp14.d.ts +40 -0
  682. package/lib/cjs/components/select/fixtures/comp14.js +27 -0
  683. package/lib/cjs/components/select/fixtures/comp15.d.ts +50 -0
  684. package/lib/cjs/components/select/fixtures/comp15.js +41 -0
  685. package/lib/cjs/components/select/fixtures/comp16.d.ts +34 -0
  686. package/lib/cjs/components/select/fixtures/comp16.js +33 -0
  687. package/lib/cjs/components/select/fixtures/comp17.d.ts +51 -0
  688. package/lib/cjs/components/select/fixtures/comp17.js +43 -0
  689. package/lib/cjs/components/select/fixtures/comp18.d.ts +49 -0
  690. package/lib/cjs/components/select/fixtures/comp18.js +42 -0
  691. package/lib/cjs/components/select/fixtures/comp2.d.ts +41 -0
  692. package/lib/cjs/components/select/fixtures/comp2.js +67 -0
  693. package/lib/cjs/components/select/fixtures/comp3.d.ts +35 -0
  694. package/lib/cjs/components/select/fixtures/comp3.js +209 -0
  695. package/lib/cjs/components/select/fixtures/comp4.d.ts +103 -0
  696. package/lib/cjs/components/select/fixtures/comp4.js +106 -0
  697. package/lib/cjs/components/select/fixtures/comp5.d.ts +21 -0
  698. package/lib/cjs/components/select/fixtures/comp5.js +28 -0
  699. package/lib/cjs/components/select/fixtures/comp6.d.ts +20 -0
  700. package/lib/cjs/components/select/fixtures/comp6.js +30 -0
  701. package/lib/cjs/components/select/fixtures/comp7.d.ts +63 -0
  702. package/lib/cjs/components/select/fixtures/comp7.js +46 -0
  703. package/lib/cjs/components/select/fixtures/comp8.d.ts +72 -0
  704. package/lib/cjs/components/select/fixtures/comp8.js +37 -0
  705. package/lib/cjs/components/select/fixtures/comp9.d.ts +88 -0
  706. package/lib/cjs/components/select/fixtures/comp9.js +67 -0
  707. package/lib/cjs/components/select/fixtures/index.d.ts +19 -0
  708. package/lib/cjs/components/select/fixtures/index.js +43 -0
  709. package/lib/cjs/components/select/fixtures/values.d.ts +2 -0
  710. package/lib/cjs/components/select/fixtures/values.js +7 -0
  711. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +15 -0
  712. package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +3 -0
  713. package/lib/cjs/components/selectboxes/SelectBoxes.form.js +25 -0
  714. package/lib/cjs/components/selectboxes/SelectBoxes.js +214 -0
  715. package/lib/cjs/components/selectboxes/editForm/SelectBoxes.edit.validation.d.ts +9 -0
  716. package/lib/cjs/components/selectboxes/editForm/SelectBoxes.edit.validation.js +36 -0
  717. package/lib/cjs/components/selectboxes/fixtures/comp1.d.ts +24 -0
  718. package/lib/cjs/components/selectboxes/fixtures/comp1.js +54 -0
  719. package/lib/cjs/components/selectboxes/fixtures/comp2.d.ts +24 -0
  720. package/lib/cjs/components/selectboxes/fixtures/comp2.js +54 -0
  721. package/lib/cjs/components/selectboxes/fixtures/comp3.d.ts +23 -0
  722. package/lib/cjs/components/selectboxes/fixtures/comp3.js +21 -0
  723. package/lib/cjs/components/selectboxes/fixtures/comp4.d.ts +63 -0
  724. package/lib/cjs/components/selectboxes/fixtures/comp4.js +66 -0
  725. package/lib/cjs/components/selectboxes/fixtures/comp5.d.ts +37 -0
  726. package/lib/cjs/components/selectboxes/fixtures/comp5.js +33 -0
  727. package/lib/cjs/components/selectboxes/fixtures/index.d.ts +6 -0
  728. package/lib/cjs/components/selectboxes/fixtures/index.js +16 -0
  729. package/lib/cjs/components/selectboxes/fixtures/values.d.ts +6 -0
  730. package/lib/cjs/components/selectboxes/fixtures/values.js +24 -0
  731. package/lib/cjs/components/signature/Signature.d.ts +26 -0
  732. package/lib/cjs/components/signature/Signature.form.d.ts +3 -0
  733. package/lib/cjs/components/signature/Signature.form.js +26 -0
  734. package/lib/cjs/components/signature/Signature.js +247 -0
  735. package/lib/cjs/components/signature/editForm/Signature.edit.data.d.ts +5 -0
  736. package/lib/cjs/components/signature/editForm/Signature.edit.data.js +16 -0
  737. package/lib/cjs/components/signature/editForm/Signature.edit.display.d.ts +51 -0
  738. package/lib/cjs/components/signature/editForm/Signature.edit.display.js +71 -0
  739. package/lib/cjs/components/signature/editForm/Signature.edit.validation.d.ts +5 -0
  740. package/lib/cjs/components/signature/editForm/Signature.edit.validation.js +12 -0
  741. package/lib/cjs/components/signature/fixtures/comp1.d.ts +30 -0
  742. package/lib/cjs/components/signature/fixtures/comp1.js +30 -0
  743. package/lib/cjs/components/signature/fixtures/index.d.ts +2 -0
  744. package/lib/cjs/components/signature/fixtures/index.js +8 -0
  745. package/lib/cjs/components/signature/fixtures/values.d.ts +2 -0
  746. package/lib/cjs/components/signature/fixtures/values.js +7 -0
  747. package/lib/cjs/components/survey/Survey.d.ts +16 -0
  748. package/lib/cjs/components/survey/Survey.form.d.ts +3 -0
  749. package/lib/cjs/components/survey/Survey.form.js +26 -0
  750. package/lib/cjs/components/survey/Survey.js +147 -0
  751. package/lib/cjs/components/survey/editForm/Survey.edit.data.d.ts +44 -0
  752. package/lib/cjs/components/survey/editForm/Survey.edit.data.js +72 -0
  753. package/lib/cjs/components/survey/editForm/Survey.edit.display.d.ts +5 -0
  754. package/lib/cjs/components/survey/editForm/Survey.edit.display.js +8 -0
  755. package/lib/cjs/components/survey/editForm/Survey.edit.validation.d.ts +5 -0
  756. package/lib/cjs/components/survey/editForm/Survey.edit.validation.js +8 -0
  757. package/lib/cjs/components/survey/fixtures/comp1.d.ts +31 -0
  758. package/lib/cjs/components/survey/fixtures/comp1.js +55 -0
  759. package/lib/cjs/components/survey/fixtures/comp2.d.ts +31 -0
  760. package/lib/cjs/components/survey/fixtures/comp2.js +55 -0
  761. package/lib/cjs/components/survey/fixtures/index.d.ts +3 -0
  762. package/lib/cjs/components/survey/fixtures/index.js +10 -0
  763. package/lib/cjs/components/survey/fixtures/values.d.ts +5 -0
  764. package/lib/cjs/components/survey/fixtures/values.js +12 -0
  765. package/lib/cjs/components/table/Table.d.ts +21 -0
  766. package/lib/cjs/components/table/Table.form.d.ts +3 -0
  767. package/lib/cjs/components/table/Table.form.js +16 -0
  768. package/lib/cjs/components/table/Table.js +171 -0
  769. package/lib/cjs/components/table/editForm/Table.edit.display.d.ts +55 -0
  770. package/lib/cjs/components/table/editForm/Table.edit.display.js +111 -0
  771. package/lib/cjs/components/table/fixtures/comp1.d.ts +53 -0
  772. package/lib/cjs/components/table/fixtures/comp1.js +237 -0
  773. package/lib/cjs/components/table/fixtures/index.d.ts +2 -0
  774. package/lib/cjs/components/table/fixtures/index.js +8 -0
  775. package/lib/cjs/components/tabs/Tabs.d.ts +28 -0
  776. package/lib/cjs/components/tabs/Tabs.form.d.ts +3 -0
  777. package/lib/cjs/components/tabs/Tabs.form.js +16 -0
  778. package/lib/cjs/components/tabs/Tabs.js +203 -0
  779. package/lib/cjs/components/tabs/editForm/Tabs.edit.display.d.ts +49 -0
  780. package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +68 -0
  781. package/lib/cjs/components/tabs/fixtures/comp1.d.ts +23 -0
  782. package/lib/cjs/components/tabs/fixtures/comp1.js +33 -0
  783. package/lib/cjs/components/tabs/fixtures/index.d.ts +2 -0
  784. package/lib/cjs/components/tabs/fixtures/index.js +8 -0
  785. package/lib/cjs/components/tags/Tags.d.ts +19 -0
  786. package/lib/cjs/components/tags/Tags.form.d.ts +3 -0
  787. package/lib/cjs/components/tags/Tags.form.js +16 -0
  788. package/lib/cjs/components/tags/Tags.js +164 -0
  789. package/lib/cjs/components/tags/editForm/Tags.edit.data.d.ts +51 -0
  790. package/lib/cjs/components/tags/editForm/Tags.edit.data.js +39 -0
  791. package/lib/cjs/components/tags/fixtures/comp1.d.ts +20 -0
  792. package/lib/cjs/components/tags/fixtures/comp1.js +20 -0
  793. package/lib/cjs/components/tags/fixtures/comp2.d.ts +10 -0
  794. package/lib/cjs/components/tags/fixtures/comp2.js +11 -0
  795. package/lib/cjs/components/tags/fixtures/comp3.d.ts +23 -0
  796. package/lib/cjs/components/tags/fixtures/comp3.js +20 -0
  797. package/lib/cjs/components/tags/fixtures/comp4.d.ts +9 -0
  798. package/lib/cjs/components/tags/fixtures/comp4.js +10 -0
  799. package/lib/cjs/components/tags/fixtures/comp5.d.ts +24 -0
  800. package/lib/cjs/components/tags/fixtures/comp5.js +24 -0
  801. package/lib/cjs/components/tags/fixtures/index.d.ts +6 -0
  802. package/lib/cjs/components/tags/fixtures/index.js +16 -0
  803. package/lib/cjs/components/tags/fixtures/values.d.ts +2 -0
  804. package/lib/cjs/components/tags/fixtures/values.js +6 -0
  805. package/lib/cjs/components/textarea/TextArea.d.ts +36 -0
  806. package/lib/cjs/components/textarea/TextArea.form.d.ts +3 -0
  807. package/lib/cjs/components/textarea/TextArea.form.js +21 -0
  808. package/lib/cjs/components/textarea/TextArea.js +538 -0
  809. package/lib/cjs/components/textarea/editForm/TextArea.edit.display.d.ts +355 -0
  810. package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +263 -0
  811. package/lib/cjs/components/textarea/editForm/TextArea.edit.validation.d.ts +10 -0
  812. package/lib/cjs/components/textarea/editForm/TextArea.edit.validation.js +22 -0
  813. package/lib/cjs/components/textarea/fixtures/comp1.d.ts +31 -0
  814. package/lib/cjs/components/textarea/fixtures/comp1.js +31 -0
  815. package/lib/cjs/components/textarea/fixtures/comp2.d.ts +29 -0
  816. package/lib/cjs/components/textarea/fixtures/comp2.js +29 -0
  817. package/lib/cjs/components/textarea/fixtures/comp3.d.ts +27 -0
  818. package/lib/cjs/components/textarea/fixtures/comp3.js +29 -0
  819. package/lib/cjs/components/textarea/fixtures/index.d.ts +4 -0
  820. package/lib/cjs/components/textarea/fixtures/index.js +12 -0
  821. package/lib/cjs/components/textarea/fixtures/values.d.ts +2 -0
  822. package/lib/cjs/components/textarea/fixtures/values.js +6 -0
  823. package/lib/cjs/components/textfield/TextField.d.ts +38 -0
  824. package/lib/cjs/components/textfield/TextField.form.d.ts +3 -0
  825. package/lib/cjs/components/textfield/TextField.form.js +26 -0
  826. package/lib/cjs/components/textfield/TextField.js +243 -0
  827. package/lib/cjs/components/textfield/editForm/TextField.edit.data.d.ts +46 -0
  828. package/lib/cjs/components/textfield/editForm/TextField.edit.data.js +58 -0
  829. package/lib/cjs/components/textfield/editForm/TextField.edit.display.d.ts +248 -0
  830. package/lib/cjs/components/textfield/editForm/TextField.edit.display.js +208 -0
  831. package/lib/cjs/components/textfield/editForm/TextField.edit.validation.d.ts +10 -0
  832. package/lib/cjs/components/textfield/editForm/TextField.edit.validation.js +49 -0
  833. package/lib/cjs/components/textfield/fixtures/comp-with-display-and-value-masks.d.ts +47 -0
  834. package/lib/cjs/components/textfield/fixtures/comp-with-display-and-value-masks.js +48 -0
  835. package/lib/cjs/components/textfield/fixtures/comp1.d.ts +33 -0
  836. package/lib/cjs/components/textfield/fixtures/comp1.js +33 -0
  837. package/lib/cjs/components/textfield/fixtures/comp2.d.ts +33 -0
  838. package/lib/cjs/components/textfield/fixtures/comp2.js +33 -0
  839. package/lib/cjs/components/textfield/fixtures/comp3.d.ts +33 -0
  840. package/lib/cjs/components/textfield/fixtures/comp3.js +33 -0
  841. package/lib/cjs/components/textfield/fixtures/comp4.d.ts +23 -0
  842. package/lib/cjs/components/textfield/fixtures/comp4.js +27 -0
  843. package/lib/cjs/components/textfield/fixtures/comp5.d.ts +12 -0
  844. package/lib/cjs/components/textfield/fixtures/comp5.js +13 -0
  845. package/lib/cjs/components/textfield/fixtures/comp6.d.ts +25 -0
  846. package/lib/cjs/components/textfield/fixtures/comp6.js +21 -0
  847. package/lib/cjs/components/textfield/fixtures/comp7.d.ts +37 -0
  848. package/lib/cjs/components/textfield/fixtures/comp7.js +38 -0
  849. package/lib/cjs/components/textfield/fixtures/index.d.ts +9 -0
  850. package/lib/cjs/components/textfield/fixtures/index.js +22 -0
  851. package/lib/cjs/components/textfield/fixtures/values.d.ts +2 -0
  852. package/lib/cjs/components/textfield/fixtures/values.js +7 -0
  853. package/lib/cjs/components/time/Time.d.ts +16 -0
  854. package/lib/cjs/components/time/Time.form.d.ts +3 -0
  855. package/lib/cjs/components/time/Time.form.js +21 -0
  856. package/lib/cjs/components/time/Time.js +148 -0
  857. package/lib/cjs/components/time/editForm/Time.edit.data.d.ts +10 -0
  858. package/lib/cjs/components/time/editForm/Time.edit.data.js +13 -0
  859. package/lib/cjs/components/time/editForm/Time.edit.display.d.ts +52 -0
  860. package/lib/cjs/components/time/editForm/Time.edit.display.js +42 -0
  861. package/lib/cjs/components/time/fixtures/comp1.d.ts +24 -0
  862. package/lib/cjs/components/time/fixtures/comp1.js +24 -0
  863. package/lib/cjs/components/time/fixtures/comp2.d.ts +10 -0
  864. package/lib/cjs/components/time/fixtures/comp2.js +11 -0
  865. package/lib/cjs/components/time/fixtures/comp3.d.ts +15 -0
  866. package/lib/cjs/components/time/fixtures/comp3.js +18 -0
  867. package/lib/cjs/components/time/fixtures/index.d.ts +6 -0
  868. package/lib/cjs/components/time/fixtures/index.js +16 -0
  869. package/lib/cjs/components/time/fixtures/timeForm.d.ts +47 -0
  870. package/lib/cjs/components/time/fixtures/timeForm.js +52 -0
  871. package/lib/cjs/components/time/fixtures/timeForm2.d.ts +38 -0
  872. package/lib/cjs/components/time/fixtures/timeForm2.js +44 -0
  873. package/lib/cjs/components/time/fixtures/values.d.ts +2 -0
  874. package/lib/cjs/components/time/fixtures/values.js +7 -0
  875. package/lib/cjs/components/tree/Node.d.ts +55 -0
  876. package/lib/cjs/components/tree/Node.js +185 -0
  877. package/lib/cjs/components/tree/Tree.d.ts +47 -0
  878. package/lib/cjs/components/tree/Tree.form.d.ts +3 -0
  879. package/lib/cjs/components/tree/Tree.form.js +16 -0
  880. package/lib/cjs/components/tree/Tree.js +384 -0
  881. package/lib/cjs/components/tree/editForm/Tree.edit.data.d.ts +5 -0
  882. package/lib/cjs/components/tree/editForm/Tree.edit.data.js +9 -0
  883. package/lib/cjs/components/tree/fixtures/comp1.d.ts +23 -0
  884. package/lib/cjs/components/tree/fixtures/comp1.js +24 -0
  885. package/lib/cjs/components/tree/fixtures/comp2.d.ts +116 -0
  886. package/lib/cjs/components/tree/fixtures/comp2.js +82 -0
  887. package/lib/cjs/components/tree/fixtures/comp3.d.ts +24 -0
  888. package/lib/cjs/components/tree/fixtures/comp3.js +25 -0
  889. package/lib/cjs/components/tree/fixtures/comp4.d.ts +42 -0
  890. package/lib/cjs/components/tree/fixtures/comp4.js +47 -0
  891. package/lib/cjs/components/tree/fixtures/index.d.ts +5 -0
  892. package/lib/cjs/components/tree/fixtures/index.js +14 -0
  893. package/lib/cjs/components/unknown/Unknown.d.ts +28 -0
  894. package/lib/cjs/components/unknown/Unknown.form.d.ts +34 -0
  895. package/lib/cjs/components/unknown/Unknown.form.js +25 -0
  896. package/lib/cjs/components/unknown/Unknown.js +30 -0
  897. package/lib/cjs/components/unknown/editForm/Unknown.edit.display.d.ts +24 -0
  898. package/lib/cjs/components/unknown/editForm/Unknown.edit.display.js +27 -0
  899. package/lib/cjs/components/unknown/fixtures/comp1.d.ts +7 -0
  900. package/lib/cjs/components/unknown/fixtures/comp1.js +8 -0
  901. package/lib/cjs/components/unknown/fixtures/index.d.ts +2 -0
  902. package/lib/cjs/components/unknown/fixtures/index.js +8 -0
  903. package/lib/cjs/components/url/Url.d.ts +3 -0
  904. package/lib/cjs/components/url/Url.form.d.ts +3 -0
  905. package/lib/cjs/components/url/Url.form.js +26 -0
  906. package/lib/cjs/components/url/Url.js +39 -0
  907. package/lib/cjs/components/url/editForm/Url.edit.data.d.ts +5 -0
  908. package/lib/cjs/components/url/editForm/Url.edit.data.js +8 -0
  909. package/lib/cjs/components/url/editForm/Url.edit.display.d.ts +5 -0
  910. package/lib/cjs/components/url/editForm/Url.edit.display.js +20 -0
  911. package/lib/cjs/components/url/editForm/Url.edit.validation.d.ts +5 -0
  912. package/lib/cjs/components/url/editForm/Url.edit.validation.js +12 -0
  913. package/lib/cjs/components/url/fixtures/comp1.d.ts +26 -0
  914. package/lib/cjs/components/url/fixtures/comp1.js +26 -0
  915. package/lib/cjs/components/url/fixtures/comp2.d.ts +26 -0
  916. package/lib/cjs/components/url/fixtures/comp2.js +23 -0
  917. package/lib/cjs/components/url/fixtures/index.d.ts +3 -0
  918. package/lib/cjs/components/url/fixtures/index.js +10 -0
  919. package/lib/cjs/components/url/fixtures/values.d.ts +2 -0
  920. package/lib/cjs/components/url/fixtures/values.js +6 -0
  921. package/lib/cjs/components/well/Well.d.ts +13 -0
  922. package/lib/cjs/components/well/Well.form.d.ts +3 -0
  923. package/lib/cjs/components/well/Well.form.js +16 -0
  924. package/lib/cjs/components/well/Well.js +41 -0
  925. package/lib/cjs/components/well/editForm/Well.edit.display.d.ts +5 -0
  926. package/lib/cjs/components/well/editForm/Well.edit.display.js +32 -0
  927. package/lib/cjs/components/well/fixtures/comp1.d.ts +43 -0
  928. package/lib/cjs/components/well/fixtures/comp1.js +77 -0
  929. package/lib/cjs/components/well/fixtures/index.d.ts +2 -0
  930. package/lib/cjs/components/well/fixtures/index.js +8 -0
  931. package/lib/cjs/displays/Displays.d.ts +18 -0
  932. package/lib/cjs/displays/Displays.js +29 -0
  933. package/lib/cjs/displays/index.d.ts +2 -0
  934. package/lib/cjs/displays/index.js +7 -0
  935. package/lib/cjs/formio.embed.d.ts +1 -0
  936. package/lib/cjs/formio.embed.js +4 -0
  937. package/lib/cjs/formio.form.d.ts +22 -0
  938. package/lib/cjs/formio.form.js +158 -0
  939. package/lib/cjs/i18n.d.ts +13 -0
  940. package/lib/cjs/i18n.js +19 -0
  941. package/lib/cjs/index.d.ts +4 -0
  942. package/lib/cjs/index.js +34 -0
  943. package/lib/cjs/package.json +3 -0
  944. package/lib/cjs/pdf.image.d.ts +2 -0
  945. package/lib/cjs/pdf.image.js +94 -0
  946. package/lib/cjs/polyfills/ElementPolyfill.d.ts +0 -0
  947. package/lib/cjs/polyfills/ElementPolyfill.js +338 -0
  948. package/lib/cjs/polyfills/index.d.ts +1 -0
  949. package/lib/cjs/polyfills/index.js +4 -0
  950. package/lib/cjs/providers/Providers.d.ts +64 -0
  951. package/lib/cjs/providers/Providers.js +34 -0
  952. package/lib/cjs/providers/address/AddressProvider.d.ts +17 -0
  953. package/lib/cjs/providers/address/AddressProvider.js +61 -0
  954. package/lib/cjs/providers/address/AzureAddressProvider.d.ts +12 -0
  955. package/lib/cjs/providers/address/AzureAddressProvider.js +31 -0
  956. package/lib/cjs/providers/address/CustomAddressProvider.d.ts +7 -0
  957. package/lib/cjs/providers/address/CustomAddressProvider.js +26 -0
  958. package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +18 -0
  959. package/lib/cjs/providers/address/GoogleAddressProvider.js +118 -0
  960. package/lib/cjs/providers/address/NominatimAddressProvider.d.ts +11 -0
  961. package/lib/cjs/providers/address/NominatimAddressProvider.js +31 -0
  962. package/lib/cjs/providers/address/index.d.ts +6 -0
  963. package/lib/cjs/providers/address/index.js +12 -0
  964. package/lib/cjs/providers/auth/index.d.ts +2 -0
  965. package/lib/cjs/providers/auth/index.js +3 -0
  966. package/lib/cjs/providers/index.d.ts +2 -0
  967. package/lib/cjs/providers/index.js +7 -0
  968. package/lib/cjs/providers/processor/fileProcessor.d.ts +2 -0
  969. package/lib/cjs/providers/processor/fileProcessor.js +44 -0
  970. package/lib/cjs/providers/storage/azure.d.ts +8 -0
  971. package/lib/cjs/providers/storage/azure.js +30 -0
  972. package/lib/cjs/providers/storage/base64.d.ts +10 -0
  973. package/lib/cjs/providers/storage/base64.js +35 -0
  974. package/lib/cjs/providers/storage/dropbox.d.ts +8 -0
  975. package/lib/cjs/providers/storage/dropbox.js +61 -0
  976. package/lib/cjs/providers/storage/googleDrive.d.ts +8 -0
  977. package/lib/cjs/providers/storage/googleDrive.js +60 -0
  978. package/lib/cjs/providers/storage/index.d.ts +15 -0
  979. package/lib/cjs/providers/storage/index.js +19 -0
  980. package/lib/cjs/providers/storage/indexeddb.d.ts +11 -0
  981. package/lib/cjs/providers/storage/indexeddb.js +124 -0
  982. package/lib/cjs/providers/storage/s3.d.ts +8 -0
  983. package/lib/cjs/providers/storage/s3.js +50 -0
  984. package/lib/cjs/providers/storage/uploadAdapter.d.ts +1 -0
  985. package/lib/cjs/providers/storage/uploadAdapter.js +61 -0
  986. package/lib/cjs/providers/storage/url.d.ts +11 -0
  987. package/lib/cjs/providers/storage/url.js +138 -0
  988. package/lib/cjs/providers/storage/xhr.d.ts +7 -0
  989. package/lib/cjs/providers/storage/xhr.js +101 -0
  990. package/lib/cjs/templates/Templates.d.ts +11 -0
  991. package/lib/cjs/templates/Templates.js +47 -0
  992. package/lib/cjs/templates/index.d.ts +4 -0
  993. package/lib/cjs/templates/index.js +9 -0
  994. package/lib/cjs/translations/en.d.ts +66 -0
  995. package/lib/cjs/translations/en.js +67 -0
  996. package/lib/cjs/utils/ChoicesWrapper.d.ts +37 -0
  997. package/lib/cjs/utils/ChoicesWrapper.js +175 -0
  998. package/lib/cjs/utils/Evaluator.d.ts +4 -0
  999. package/lib/cjs/utils/Evaluator.js +98 -0
  1000. package/lib/cjs/utils/builder.d.ts +22 -0
  1001. package/lib/cjs/utils/builder.js +84 -0
  1002. package/lib/cjs/utils/calendarUtils.d.ts +41 -0
  1003. package/lib/cjs/utils/calendarUtils.js +136 -0
  1004. package/lib/cjs/utils/conditionOperators/ConditionOperator.d.ts +7 -0
  1005. package/lib/cjs/utils/conditionOperators/ConditionOperator.js +29 -0
  1006. package/lib/cjs/utils/conditionOperators/DateGreaterThan.d.ts +13 -0
  1007. package/lib/cjs/utils/conditionOperators/DateGreaterThan.js +37 -0
  1008. package/lib/cjs/utils/conditionOperators/DateGreaterThanOrEqual.d.ts +4 -0
  1009. package/lib/cjs/utils/conditionOperators/DateGreaterThanOrEqual.js +18 -0
  1010. package/lib/cjs/utils/conditionOperators/DateLessThan.d.ts +4 -0
  1011. package/lib/cjs/utils/conditionOperators/DateLessThan.js +18 -0
  1012. package/lib/cjs/utils/conditionOperators/DateLessThanOrEqual.d.ts +4 -0
  1013. package/lib/cjs/utils/conditionOperators/DateLessThanOrEqual.js +18 -0
  1014. package/lib/cjs/utils/conditionOperators/EndsWith.d.ts +7 -0
  1015. package/lib/cjs/utils/conditionOperators/EndsWith.js +19 -0
  1016. package/lib/cjs/utils/conditionOperators/GreaterThan.d.ts +7 -0
  1017. package/lib/cjs/utils/conditionOperators/GreaterThan.js +19 -0
  1018. package/lib/cjs/utils/conditionOperators/GreaterThanOrEqual.d.ts +7 -0
  1019. package/lib/cjs/utils/conditionOperators/GreaterThanOrEqual.js +19 -0
  1020. package/lib/cjs/utils/conditionOperators/Includes.d.ts +7 -0
  1021. package/lib/cjs/utils/conditionOperators/Includes.js +19 -0
  1022. package/lib/cjs/utils/conditionOperators/IsDateEqual.d.ts +4 -0
  1023. package/lib/cjs/utils/conditionOperators/IsDateEqual.js +18 -0
  1024. package/lib/cjs/utils/conditionOperators/IsEmptyValue.d.ts +9 -0
  1025. package/lib/cjs/utils/conditionOperators/IsEmptyValue.js +30 -0
  1026. package/lib/cjs/utils/conditionOperators/IsEqualTo.d.ts +7 -0
  1027. package/lib/cjs/utils/conditionOperators/IsEqualTo.js +30 -0
  1028. package/lib/cjs/utils/conditionOperators/IsNotDateEqual.d.ts +4 -0
  1029. package/lib/cjs/utils/conditionOperators/IsNotDateEqual.js +18 -0
  1030. package/lib/cjs/utils/conditionOperators/IsNotEmptyValue.d.ts +4 -0
  1031. package/lib/cjs/utils/conditionOperators/IsNotEmptyValue.js +18 -0
  1032. package/lib/cjs/utils/conditionOperators/IsNotEqualTo.d.ts +7 -0
  1033. package/lib/cjs/utils/conditionOperators/IsNotEqualTo.js +19 -0
  1034. package/lib/cjs/utils/conditionOperators/LessThan.d.ts +7 -0
  1035. package/lib/cjs/utils/conditionOperators/LessThan.js +19 -0
  1036. package/lib/cjs/utils/conditionOperators/LessThanOrEqual.d.ts +7 -0
  1037. package/lib/cjs/utils/conditionOperators/LessThanOrEqual.js +19 -0
  1038. package/lib/cjs/utils/conditionOperators/NotIncludes.d.ts +4 -0
  1039. package/lib/cjs/utils/conditionOperators/NotIncludes.js +18 -0
  1040. package/lib/cjs/utils/conditionOperators/StartsWith.d.ts +7 -0
  1041. package/lib/cjs/utils/conditionOperators/StartsWith.js +19 -0
  1042. package/lib/cjs/utils/conditionOperators/index.d.ts +7 -0
  1043. package/lib/cjs/utils/conditionOperators/index.js +44 -0
  1044. package/lib/cjs/utils/formUtils.d.ts +173 -0
  1045. package/lib/cjs/utils/formUtils.js +583 -0
  1046. package/lib/cjs/utils/index.d.ts +2 -0
  1047. package/lib/cjs/utils/index.js +30 -0
  1048. package/lib/cjs/utils/jsonlogic/operators.d.ts +1 -0
  1049. package/lib/cjs/utils/jsonlogic/operators.js +265 -0
  1050. package/lib/cjs/utils/utils.d.ts +364 -0
  1051. package/lib/cjs/utils/utils.js +1468 -0
  1052. package/lib/cjs/validator/Rules.d.ts +8 -0
  1053. package/lib/cjs/validator/Rules.js +22 -0
  1054. package/lib/cjs/validator/Validator.d.ts +200 -0
  1055. package/lib/cjs/validator/Validator.js +1090 -0
  1056. package/lib/cjs/validator/conjunctions/index.d.ts +7 -0
  1057. package/lib/cjs/validator/conjunctions/index.js +18 -0
  1058. package/lib/cjs/validator/operators/index.d.ts +7 -0
  1059. package/lib/cjs/validator/operators/index.js +18 -0
  1060. package/lib/cjs/validator/quickRules/index.d.ts +7 -0
  1061. package/lib/cjs/validator/quickRules/index.js +18 -0
  1062. package/lib/cjs/validator/rules/Custom.d.ts +6 -0
  1063. package/lib/cjs/validator/rules/Custom.js +25 -0
  1064. package/lib/cjs/validator/rules/Date.d.ts +6 -0
  1065. package/lib/cjs/validator/rules/Date.js +20 -0
  1066. package/lib/cjs/validator/rules/Day.d.ts +6 -0
  1067. package/lib/cjs/validator/rules/Day.js +53 -0
  1068. package/lib/cjs/validator/rules/Email.d.ts +6 -0
  1069. package/lib/cjs/validator/rules/Email.js +19 -0
  1070. package/lib/cjs/validator/rules/JSON.d.ts +6 -0
  1071. package/lib/cjs/validator/rules/JSON.js +24 -0
  1072. package/lib/cjs/validator/rules/Mask.d.ts +1 -0
  1073. package/lib/cjs/validator/rules/Mask.js +28 -0
  1074. package/lib/cjs/validator/rules/Max.d.ts +6 -0
  1075. package/lib/cjs/validator/rules/Max.js +16 -0
  1076. package/lib/cjs/validator/rules/MaxDate.d.ts +1 -0
  1077. package/lib/cjs/validator/rules/MaxDate.js +33 -0
  1078. package/lib/cjs/validator/rules/MaxLength.d.ts +6 -0
  1079. package/lib/cjs/validator/rules/MaxLength.js +15 -0
  1080. package/lib/cjs/validator/rules/MaxWords.d.ts +6 -0
  1081. package/lib/cjs/validator/rules/MaxWords.js +15 -0
  1082. package/lib/cjs/validator/rules/MaxYear.d.ts +6 -0
  1083. package/lib/cjs/validator/rules/MaxYear.js +17 -0
  1084. package/lib/cjs/validator/rules/Min.d.ts +6 -0
  1085. package/lib/cjs/validator/rules/Min.js +16 -0
  1086. package/lib/cjs/validator/rules/MinDate.d.ts +1 -0
  1087. package/lib/cjs/validator/rules/MinDate.js +29 -0
  1088. package/lib/cjs/validator/rules/MinLength.d.ts +6 -0
  1089. package/lib/cjs/validator/rules/MinLength.js +15 -0
  1090. package/lib/cjs/validator/rules/MinWords.d.ts +6 -0
  1091. package/lib/cjs/validator/rules/MinWords.js +15 -0
  1092. package/lib/cjs/validator/rules/MinYear.d.ts +6 -0
  1093. package/lib/cjs/validator/rules/MinYear.js +17 -0
  1094. package/lib/cjs/validator/rules/Pattern.d.ts +6 -0
  1095. package/lib/cjs/validator/rules/Pattern.js +15 -0
  1096. package/lib/cjs/validator/rules/Required.d.ts +6 -0
  1097. package/lib/cjs/validator/rules/Required.js +12 -0
  1098. package/lib/cjs/validator/rules/Rule.d.ts +8 -0
  1099. package/lib/cjs/validator/rules/Rule.js +10 -0
  1100. package/lib/cjs/validator/rules/Select.d.ts +1 -0
  1101. package/lib/cjs/validator/rules/Select.js +95 -0
  1102. package/lib/cjs/validator/rules/Time.d.ts +1 -0
  1103. package/lib/cjs/validator/rules/Time.js +18 -0
  1104. package/lib/cjs/validator/rules/Unique.d.ts +1 -0
  1105. package/lib/cjs/validator/rules/Unique.js +69 -0
  1106. package/lib/cjs/validator/rules/Url.d.ts +6 -0
  1107. package/lib/cjs/validator/rules/Url.js +18 -0
  1108. package/lib/cjs/validator/rules/index.d.ts +23 -0
  1109. package/lib/cjs/validator/rules/index.js +47 -0
  1110. package/lib/cjs/validator/transformers/index.d.ts +7 -0
  1111. package/lib/cjs/validator/transformers/index.js +18 -0
  1112. package/lib/cjs/validator/valueSources/index.d.ts +7 -0
  1113. package/lib/cjs/validator/valueSources/index.js +18 -0
  1114. package/lib/cjs/widgets/CalendarWidget.d.ts +96 -0
  1115. package/lib/cjs/widgets/CalendarWidget.js +468 -0
  1116. package/lib/cjs/widgets/InputWidget.d.ts +24 -0
  1117. package/lib/cjs/widgets/InputWidget.js +75 -0
  1118. package/lib/cjs/widgets/index.d.ts +7 -0
  1119. package/lib/cjs/widgets/index.js +11 -0
  1120. package/lib/mjs/CDN.d.ts +28 -0
  1121. package/lib/mjs/CDN.js +74 -0
  1122. package/lib/mjs/Element.d.ts +255 -0
  1123. package/lib/mjs/Element.js +562 -0
  1124. package/lib/mjs/Embed.d.ts +1 -0
  1125. package/lib/mjs/Embed.js +348 -0
  1126. package/lib/mjs/EventEmitter.d.ts +7 -0
  1127. package/lib/mjs/EventEmitter.js +26 -0
  1128. package/lib/mjs/Form.d.ts +90 -0
  1129. package/lib/mjs/Form.js +308 -0
  1130. package/lib/mjs/FormBuilder.d.ts +6 -0
  1131. package/lib/mjs/FormBuilder.js +34 -0
  1132. package/lib/mjs/Formio.d.ts +2 -0
  1133. package/lib/mjs/Formio.js +89 -0
  1134. package/lib/mjs/PDF.d.ts +32 -0
  1135. package/lib/mjs/PDF.js +285 -0
  1136. package/lib/mjs/PDFBuilder.d.ts +55 -0
  1137. package/lib/mjs/PDFBuilder.js +474 -0
  1138. package/lib/mjs/Webform.d.ts +408 -0
  1139. package/lib/mjs/Webform.js +1513 -0
  1140. package/lib/mjs/WebformBuilder.d.ts +120 -0
  1141. package/lib/mjs/WebformBuilder.js +1537 -0
  1142. package/lib/mjs/Wizard.d.ts +93 -0
  1143. package/lib/mjs/Wizard.js +905 -0
  1144. package/lib/mjs/WizardBuilder.d.ts +46 -0
  1145. package/lib/mjs/WizardBuilder.js +250 -0
  1146. package/lib/mjs/addons/FormioAddon.d.ts +19 -0
  1147. package/lib/mjs/addons/FormioAddon.js +31 -0
  1148. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +717 -0
  1149. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.form.d.ts +590 -0
  1150. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +311 -0
  1151. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +388 -0
  1152. package/lib/mjs/addons/index.d.ts +625 -0
  1153. package/lib/mjs/addons/index.js +19 -0
  1154. package/lib/mjs/builders/Builders.d.ts +18 -0
  1155. package/lib/mjs/builders/Builders.js +24 -0
  1156. package/lib/mjs/builders/index.d.ts +2 -0
  1157. package/lib/mjs/builders/index.js +2 -0
  1158. package/lib/mjs/components/Components.d.ts +258 -0
  1159. package/lib/mjs/components/Components.js +75 -0
  1160. package/lib/mjs/components/_classes/component/Component.d.ts +779 -0
  1161. package/lib/mjs/components/_classes/component/Component.form.d.ts +3 -0
  1162. package/lib/mjs/components/_classes/component/Component.form.js +71 -0
  1163. package/lib/mjs/components/_classes/component/Component.js +3110 -0
  1164. package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.d.ts +645 -0
  1165. package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.js +39 -0
  1166. package/lib/mjs/components/_classes/component/editForm/Component.edit.api.d.ts +42 -0
  1167. package/lib/mjs/components/_classes/component/editForm/Component.edit.api.js +38 -0
  1168. package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.d.ts +113 -0
  1169. package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.js +50 -0
  1170. package/lib/mjs/components/_classes/component/editForm/Component.edit.data.d.ts +219 -0
  1171. package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +156 -0
  1172. package/lib/mjs/components/_classes/component/editForm/Component.edit.display.d.ts +160 -0
  1173. package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +199 -0
  1174. package/lib/mjs/components/_classes/component/editForm/Component.edit.layout.d.ts +44 -0
  1175. package/lib/mjs/components/_classes/component/editForm/Component.edit.layout.js +77 -0
  1176. package/lib/mjs/components/_classes/component/editForm/Component.edit.logic.d.ts +368 -0
  1177. package/lib/mjs/components/_classes/component/editForm/Component.edit.logic.js +410 -0
  1178. package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.d.ts +140 -0
  1179. package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +204 -0
  1180. package/lib/mjs/components/_classes/component/editForm/utils.d.ts +83 -0
  1181. package/lib/mjs/components/_classes/component/editForm/utils.js +132 -0
  1182. package/lib/mjs/components/_classes/component/fixtures/comp1.d.ts +33 -0
  1183. package/lib/mjs/components/_classes/component/fixtures/comp1.js +31 -0
  1184. package/lib/mjs/components/_classes/component/fixtures/comp2.d.ts +33 -0
  1185. package/lib/mjs/components/_classes/component/fixtures/comp2.js +31 -0
  1186. package/lib/mjs/components/_classes/component/fixtures/comp3.d.ts +14 -0
  1187. package/lib/mjs/components/_classes/component/fixtures/comp3.js +12 -0
  1188. package/lib/mjs/components/_classes/component/fixtures/comp4.d.ts +17 -0
  1189. package/lib/mjs/components/_classes/component/fixtures/comp4.js +16 -0
  1190. package/lib/mjs/components/_classes/component/fixtures/index.d.ts +5 -0
  1191. package/lib/mjs/components/_classes/component/fixtures/index.js +5 -0
  1192. package/lib/mjs/components/_classes/componentModal/ComponentModal.d.ts +46 -0
  1193. package/lib/mjs/components/_classes/componentModal/ComponentModal.js +177 -0
  1194. package/lib/mjs/components/_classes/field/Field.d.ts +4 -0
  1195. package/lib/mjs/components/_classes/field/Field.js +21 -0
  1196. package/lib/mjs/components/_classes/input/Input.d.ts +42 -0
  1197. package/lib/mjs/components/_classes/input/Input.js +297 -0
  1198. package/lib/mjs/components/_classes/list/ListComponent.d.ts +14 -0
  1199. package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +3 -0
  1200. package/lib/mjs/components/_classes/list/ListComponent.form.js +10 -0
  1201. package/lib/mjs/components/_classes/list/ListComponent.js +208 -0
  1202. package/lib/mjs/components/_classes/list/editForm/ListComponent.edit.data.d.ts +183 -0
  1203. package/lib/mjs/components/_classes/list/editForm/ListComponent.edit.data.js +117 -0
  1204. package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +29 -0
  1205. package/lib/mjs/components/_classes/multivalue/Multivalue.js +256 -0
  1206. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +130 -0
  1207. package/lib/mjs/components/_classes/nested/NestedComponent.form.d.ts +3 -0
  1208. package/lib/mjs/components/_classes/nested/NestedComponent.form.js +13 -0
  1209. package/lib/mjs/components/_classes/nested/NestedComponent.js +687 -0
  1210. package/lib/mjs/components/_classes/nested/fixtures/comp1.d.ts +8 -0
  1211. package/lib/mjs/components/_classes/nested/fixtures/comp1.js +14 -0
  1212. package/lib/mjs/components/_classes/nested/fixtures/comp2.d.ts +236 -0
  1213. package/lib/mjs/components/_classes/nested/fixtures/comp2.js +225 -0
  1214. package/lib/mjs/components/_classes/nested/fixtures/comp3.d.ts +26 -0
  1215. package/lib/mjs/components/_classes/nested/fixtures/comp3.js +27 -0
  1216. package/lib/mjs/components/_classes/nested/fixtures/index.d.ts +3 -0
  1217. package/lib/mjs/components/_classes/nested/fixtures/index.js +3 -0
  1218. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +14 -0
  1219. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +174 -0
  1220. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +11 -0
  1221. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +124 -0
  1222. package/lib/mjs/components/address/Address.d.ts +58 -0
  1223. package/lib/mjs/components/address/Address.form.d.ts +3 -0
  1224. package/lib/mjs/components/address/Address.form.js +22 -0
  1225. package/lib/mjs/components/address/Address.js +536 -0
  1226. package/lib/mjs/components/address/editForm/Address.edit.data.d.ts +31 -0
  1227. package/lib/mjs/components/address/editForm/Address.edit.data.js +21 -0
  1228. package/lib/mjs/components/address/editForm/Address.edit.display.d.ts +49 -0
  1229. package/lib/mjs/components/address/editForm/Address.edit.display.js +42 -0
  1230. package/lib/mjs/components/address/editForm/Address.edit.provider.d.ts +164 -0
  1231. package/lib/mjs/components/address/editForm/Address.edit.provider.js +151 -0
  1232. package/lib/mjs/components/address/fixtures/comp1.d.ts +34 -0
  1233. package/lib/mjs/components/address/fixtures/comp1.js +69 -0
  1234. package/lib/mjs/components/address/fixtures/comp2.d.ts +62 -0
  1235. package/lib/mjs/components/address/fixtures/comp2.js +101 -0
  1236. package/lib/mjs/components/address/fixtures/comp3.d.ts +44 -0
  1237. package/lib/mjs/components/address/fixtures/comp3.js +83 -0
  1238. package/lib/mjs/components/address/fixtures/comp4.d.ts +56 -0
  1239. package/lib/mjs/components/address/fixtures/comp4.js +91 -0
  1240. package/lib/mjs/components/address/fixtures/index.d.ts +5 -0
  1241. package/lib/mjs/components/address/fixtures/index.js +5 -0
  1242. package/lib/mjs/components/address/fixtures/values.d.ts +22 -0
  1243. package/lib/mjs/components/address/fixtures/values.js +17 -0
  1244. package/lib/mjs/components/alert/Alert.d.ts +30 -0
  1245. package/lib/mjs/components/alert/Alert.js +176 -0
  1246. package/lib/mjs/components/builder.d.ts +2 -0
  1247. package/lib/mjs/components/builder.js +86 -0
  1248. package/lib/mjs/components/button/Button.d.ts +44 -0
  1249. package/lib/mjs/components/button/Button.form.d.ts +3 -0
  1250. package/lib/mjs/components/button/Button.form.js +18 -0
  1251. package/lib/mjs/components/button/Button.js +458 -0
  1252. package/lib/mjs/components/button/editForm/Button.edit.display.d.ts +360 -0
  1253. package/lib/mjs/components/button/editForm/Button.edit.display.js +247 -0
  1254. package/lib/mjs/components/button/fixtures/comp1.d.ts +15 -0
  1255. package/lib/mjs/components/button/fixtures/comp1.js +14 -0
  1256. package/lib/mjs/components/button/fixtures/comp2.d.ts +25 -0
  1257. package/lib/mjs/components/button/fixtures/comp2.js +55 -0
  1258. package/lib/mjs/components/button/fixtures/comp3.d.ts +113 -0
  1259. package/lib/mjs/components/button/fixtures/comp3.js +82 -0
  1260. package/lib/mjs/components/button/fixtures/index.d.ts +4 -0
  1261. package/lib/mjs/components/button/fixtures/index.js +4 -0
  1262. package/lib/mjs/components/button/fixtures/values.d.ts +2 -0
  1263. package/lib/mjs/components/button/fixtures/values.js +4 -0
  1264. package/lib/mjs/components/checkbox/Checkbox.d.ts +36 -0
  1265. package/lib/mjs/components/checkbox/Checkbox.form.d.ts +3 -0
  1266. package/lib/mjs/components/checkbox/Checkbox.form.js +20 -0
  1267. package/lib/mjs/components/checkbox/Checkbox.js +188 -0
  1268. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.data.d.ts +5 -0
  1269. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.data.js +6 -0
  1270. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.display.d.ts +75 -0
  1271. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.display.js +74 -0
  1272. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.validation.d.ts +5 -0
  1273. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.validation.js +10 -0
  1274. package/lib/mjs/components/checkbox/fixtures/comp1.d.ts +24 -0
  1275. package/lib/mjs/components/checkbox/fixtures/comp1.js +22 -0
  1276. package/lib/mjs/components/checkbox/fixtures/comp2.d.ts +12 -0
  1277. package/lib/mjs/components/checkbox/fixtures/comp2.js +11 -0
  1278. package/lib/mjs/components/checkbox/fixtures/comp3.d.ts +15 -0
  1279. package/lib/mjs/components/checkbox/fixtures/comp3.js +14 -0
  1280. package/lib/mjs/components/checkbox/fixtures/comp4.d.ts +46 -0
  1281. package/lib/mjs/components/checkbox/fixtures/comp4.js +37 -0
  1282. package/lib/mjs/components/checkbox/fixtures/customDefaultComponent.d.ts +25 -0
  1283. package/lib/mjs/components/checkbox/fixtures/customDefaultComponent.js +23 -0
  1284. package/lib/mjs/components/checkbox/fixtures/index.d.ts +6 -0
  1285. package/lib/mjs/components/checkbox/fixtures/index.js +6 -0
  1286. package/lib/mjs/components/checkbox/fixtures/values.d.ts +2 -0
  1287. package/lib/mjs/components/checkbox/fixtures/values.js +4 -0
  1288. package/lib/mjs/components/columns/Columns.d.ts +25 -0
  1289. package/lib/mjs/components/columns/Columns.form.d.ts +3 -0
  1290. package/lib/mjs/components/columns/Columns.form.js +10 -0
  1291. package/lib/mjs/components/columns/Columns.js +149 -0
  1292. package/lib/mjs/components/columns/editForm/Columns.edit.display.d.ts +58 -0
  1293. package/lib/mjs/components/columns/editForm/Columns.edit.display.js +98 -0
  1294. package/lib/mjs/components/columns/fixtures/comp1.d.ts +45 -0
  1295. package/lib/mjs/components/columns/fixtures/comp1.js +83 -0
  1296. package/lib/mjs/components/columns/fixtures/comp2.d.ts +24 -0
  1297. package/lib/mjs/components/columns/fixtures/comp2.js +125 -0
  1298. package/lib/mjs/components/columns/fixtures/comp3.d.ts +45 -0
  1299. package/lib/mjs/components/columns/fixtures/comp3.js +51 -0
  1300. package/lib/mjs/components/columns/fixtures/index.d.ts +4 -0
  1301. package/lib/mjs/components/columns/fixtures/index.js +4 -0
  1302. package/lib/mjs/components/container/Container.d.ts +14 -0
  1303. package/lib/mjs/components/container/Container.form.d.ts +3 -0
  1304. package/lib/mjs/components/container/Container.form.js +15 -0
  1305. package/lib/mjs/components/container/Container.js +72 -0
  1306. package/lib/mjs/components/container/editForm/Container.edit.data.d.ts +5 -0
  1307. package/lib/mjs/components/container/editForm/Container.edit.data.js +14 -0
  1308. package/lib/mjs/components/container/editForm/Container.edit.display.d.ts +5 -0
  1309. package/lib/mjs/components/container/editForm/Container.edit.display.js +18 -0
  1310. package/lib/mjs/components/container/fixtures/comp1.d.ts +49 -0
  1311. package/lib/mjs/components/container/fixtures/comp1.js +80 -0
  1312. package/lib/mjs/components/container/fixtures/comp2.d.ts +30 -0
  1313. package/lib/mjs/components/container/fixtures/comp2.js +32 -0
  1314. package/lib/mjs/components/container/fixtures/comp3.d.ts +77 -0
  1315. package/lib/mjs/components/container/fixtures/comp3.js +55 -0
  1316. package/lib/mjs/components/container/fixtures/index.d.ts +4 -0
  1317. package/lib/mjs/components/container/fixtures/index.js +4 -0
  1318. package/lib/mjs/components/content/Content.d.ts +15 -0
  1319. package/lib/mjs/components/content/Content.form.d.ts +3 -0
  1320. package/lib/mjs/components/content/Content.form.js +37 -0
  1321. package/lib/mjs/components/content/Content.js +69 -0
  1322. package/lib/mjs/components/content/editForm/Content.edit.display.d.ts +18 -0
  1323. package/lib/mjs/components/content/editForm/Content.edit.display.js +46 -0
  1324. package/lib/mjs/components/content/editForm/Content.edit.logic.d.ts +48 -0
  1325. package/lib/mjs/components/content/editForm/Content.edit.logic.js +98 -0
  1326. package/lib/mjs/components/content/fixtures/comp1.d.ts +13 -0
  1327. package/lib/mjs/components/content/fixtures/comp1.js +12 -0
  1328. package/lib/mjs/components/content/fixtures/index.d.ts +2 -0
  1329. package/lib/mjs/components/content/fixtures/index.js +2 -0
  1330. package/lib/mjs/components/currency/Currency.d.ts +8 -0
  1331. package/lib/mjs/components/currency/Currency.form.d.ts +3 -0
  1332. package/lib/mjs/components/currency/Currency.form.js +40 -0
  1333. package/lib/mjs/components/currency/Currency.js +174 -0
  1334. package/lib/mjs/components/currency/editForm/Currency.edit.data.d.ts +17 -0
  1335. package/lib/mjs/components/currency/editForm/Currency.edit.data.js +186 -0
  1336. package/lib/mjs/components/currency/editForm/Currency.edit.display.d.ts +18 -0
  1337. package/lib/mjs/components/currency/editForm/Currency.edit.display.js +34 -0
  1338. package/lib/mjs/components/currency/fixtures/comp1.d.ts +31 -0
  1339. package/lib/mjs/components/currency/fixtures/comp1.js +29 -0
  1340. package/lib/mjs/components/currency/fixtures/comp2.d.ts +20 -0
  1341. package/lib/mjs/components/currency/fixtures/comp2.js +18 -0
  1342. package/lib/mjs/components/currency/fixtures/comp3.d.ts +13 -0
  1343. package/lib/mjs/components/currency/fixtures/comp3.js +12 -0
  1344. package/lib/mjs/components/currency/fixtures/comp4.d.ts +17 -0
  1345. package/lib/mjs/components/currency/fixtures/comp4.js +18 -0
  1346. package/lib/mjs/components/currency/fixtures/index.d.ts +5 -0
  1347. package/lib/mjs/components/currency/fixtures/index.js +5 -0
  1348. package/lib/mjs/components/currency/fixtures/values.d.ts +2 -0
  1349. package/lib/mjs/components/currency/fixtures/values.js +6 -0
  1350. package/lib/mjs/components/datagrid/DataGrid.d.ts +87 -0
  1351. package/lib/mjs/components/datagrid/DataGrid.form.d.ts +3 -0
  1352. package/lib/mjs/components/datagrid/DataGrid.form.js +20 -0
  1353. package/lib/mjs/components/datagrid/DataGrid.js +642 -0
  1354. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.data.d.ts +5 -0
  1355. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.data.js +6 -0
  1356. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.display.d.ts +283 -0
  1357. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.display.js +147 -0
  1358. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.validation.d.ts +20 -0
  1359. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.validation.js +24 -0
  1360. package/lib/mjs/components/datagrid/fixtures/comp-modal-with-required-fields.d.ts +37 -0
  1361. package/lib/mjs/components/datagrid/fixtures/comp-modal-with-required-fields.js +40 -0
  1362. package/lib/mjs/components/datagrid/fixtures/comp-on-blur-validation.d.ts +0 -0
  1363. package/lib/mjs/components/datagrid/fixtures/comp-on-blur-validation.js +1 -0
  1364. package/lib/mjs/components/datagrid/fixtures/comp-row-groups-with-def-value.d.ts +63 -0
  1365. package/lib/mjs/components/datagrid/fixtures/comp-row-groups-with-def-value.js +79 -0
  1366. package/lib/mjs/components/datagrid/fixtures/comp-with-collapsible-groups.d.ts +76 -0
  1367. package/lib/mjs/components/datagrid/fixtures/comp-with-collapsible-groups.js +73 -0
  1368. package/lib/mjs/components/datagrid/fixtures/comp-with-conditional-components-and-validations.d.ts +197 -0
  1369. package/lib/mjs/components/datagrid/fixtures/comp-with-conditional-components-and-validations.js +176 -0
  1370. package/lib/mjs/components/datagrid/fixtures/comp-with-def-value.d.ts +61 -0
  1371. package/lib/mjs/components/datagrid/fixtures/comp-with-def-value.js +67 -0
  1372. package/lib/mjs/components/datagrid/fixtures/comp-with-logic.d.ts +165 -0
  1373. package/lib/mjs/components/datagrid/fixtures/comp-with-logic.js +178 -0
  1374. package/lib/mjs/components/datagrid/fixtures/comp1.d.ts +93 -0
  1375. package/lib/mjs/components/datagrid/fixtures/comp1.js +113 -0
  1376. package/lib/mjs/components/datagrid/fixtures/comp2.d.ts +18 -0
  1377. package/lib/mjs/components/datagrid/fixtures/comp2.js +27 -0
  1378. package/lib/mjs/components/datagrid/fixtures/comp3.d.ts +14 -0
  1379. package/lib/mjs/components/datagrid/fixtures/comp3.js +21 -0
  1380. package/lib/mjs/components/datagrid/fixtures/comp4.d.ts +27 -0
  1381. package/lib/mjs/components/datagrid/fixtures/comp4.js +26 -0
  1382. package/lib/mjs/components/datagrid/fixtures/comp5.d.ts +67 -0
  1383. package/lib/mjs/components/datagrid/fixtures/comp5.js +75 -0
  1384. package/lib/mjs/components/datagrid/fixtures/comp6.d.ts +567 -0
  1385. package/lib/mjs/components/datagrid/fixtures/comp6.js +294 -0
  1386. package/lib/mjs/components/datagrid/fixtures/comp7.d.ts +28 -0
  1387. package/lib/mjs/components/datagrid/fixtures/comp7.js +33 -0
  1388. package/lib/mjs/components/datagrid/fixtures/comp8.d.ts +35 -0
  1389. package/lib/mjs/components/datagrid/fixtures/comp8.js +35 -0
  1390. package/lib/mjs/components/datagrid/fixtures/index.d.ts +15 -0
  1391. package/lib/mjs/components/datagrid/fixtures/index.js +15 -0
  1392. package/lib/mjs/components/datamap/DataMap.d.ts +35 -0
  1393. package/lib/mjs/components/datamap/DataMap.form.d.ts +3 -0
  1394. package/lib/mjs/components/datamap/DataMap.form.js +15 -0
  1395. package/lib/mjs/components/datamap/DataMap.js +291 -0
  1396. package/lib/mjs/components/datamap/editForm/DataMap.edit.data.d.ts +5 -0
  1397. package/lib/mjs/components/datamap/editForm/DataMap.edit.data.js +10 -0
  1398. package/lib/mjs/components/datamap/editForm/DataMap.edit.display.d.ts +30 -0
  1399. package/lib/mjs/components/datamap/editForm/DataMap.edit.display.js +46 -0
  1400. package/lib/mjs/components/datamap/fixtures/comp1.d.ts +18 -0
  1401. package/lib/mjs/components/datamap/fixtures/comp1.js +13 -0
  1402. package/lib/mjs/components/datamap/fixtures/formWithConditionalPanel.d.ts +87 -0
  1403. package/lib/mjs/components/datamap/fixtures/formWithConditionalPanel.js +83 -0
  1404. package/lib/mjs/components/datamap/fixtures/index.d.ts +3 -0
  1405. package/lib/mjs/components/datamap/fixtures/index.js +3 -0
  1406. package/lib/mjs/components/datetime/DateTime.d.ts +16 -0
  1407. package/lib/mjs/components/datetime/DateTime.form.d.ts +3 -0
  1408. package/lib/mjs/components/datetime/DateTime.form.js +34 -0
  1409. package/lib/mjs/components/datetime/DateTime.js +161 -0
  1410. package/lib/mjs/components/datetime/editForm/DateTime.edit.data.d.ts +24 -0
  1411. package/lib/mjs/components/datetime/editForm/DateTime.edit.data.js +21 -0
  1412. package/lib/mjs/components/datetime/editForm/DateTime.edit.date.d.ts +61 -0
  1413. package/lib/mjs/components/datetime/editForm/DateTime.edit.date.js +70 -0
  1414. package/lib/mjs/components/datetime/editForm/DateTime.edit.display.d.ts +128 -0
  1415. package/lib/mjs/components/datetime/editForm/DateTime.edit.display.js +98 -0
  1416. package/lib/mjs/components/datetime/editForm/DateTime.edit.time.d.ts +9 -0
  1417. package/lib/mjs/components/datetime/editForm/DateTime.edit.time.js +34 -0
  1418. package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.d.ts +40 -0
  1419. package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.js +82 -0
  1420. package/lib/mjs/components/datetime/fixtures/comp1.d.ts +45 -0
  1421. package/lib/mjs/components/datetime/fixtures/comp1.js +42 -0
  1422. package/lib/mjs/components/datetime/fixtures/comp10.d.ts +102 -0
  1423. package/lib/mjs/components/datetime/fixtures/comp10.js +84 -0
  1424. package/lib/mjs/components/datetime/fixtures/comp11.d.ts +58 -0
  1425. package/lib/mjs/components/datetime/fixtures/comp11.js +53 -0
  1426. package/lib/mjs/components/datetime/fixtures/comp12.d.ts +57 -0
  1427. package/lib/mjs/components/datetime/fixtures/comp12.js +53 -0
  1428. package/lib/mjs/components/datetime/fixtures/comp2.d.ts +42 -0
  1429. package/lib/mjs/components/datetime/fixtures/comp2.js +41 -0
  1430. package/lib/mjs/components/datetime/fixtures/comp3.d.ts +51 -0
  1431. package/lib/mjs/components/datetime/fixtures/comp3.js +38 -0
  1432. package/lib/mjs/components/datetime/fixtures/comp5.d.ts +57 -0
  1433. package/lib/mjs/components/datetime/fixtures/comp5.js +46 -0
  1434. package/lib/mjs/components/datetime/fixtures/comp6.d.ts +55 -0
  1435. package/lib/mjs/components/datetime/fixtures/comp6.js +47 -0
  1436. package/lib/mjs/components/datetime/fixtures/comp7.d.ts +59 -0
  1437. package/lib/mjs/components/datetime/fixtures/comp7.js +51 -0
  1438. package/lib/mjs/components/datetime/fixtures/comp8.d.ts +59 -0
  1439. package/lib/mjs/components/datetime/fixtures/comp8.js +50 -0
  1440. package/lib/mjs/components/datetime/fixtures/comp9.d.ts +64 -0
  1441. package/lib/mjs/components/datetime/fixtures/comp9.js +93 -0
  1442. package/lib/mjs/components/datetime/fixtures/index.d.ts +12 -0
  1443. package/lib/mjs/components/datetime/fixtures/index.js +12 -0
  1444. package/lib/mjs/components/datetime/fixtures/values.d.ts +2 -0
  1445. package/lib/mjs/components/datetime/fixtures/values.js +4 -0
  1446. package/lib/mjs/components/day/Day.d.ts +143 -0
  1447. package/lib/mjs/components/day/Day.form.d.ts +3 -0
  1448. package/lib/mjs/components/day/Day.form.js +41 -0
  1449. package/lib/mjs/components/day/Day.js +528 -0
  1450. package/lib/mjs/components/day/editForm/Day.edit.data.d.ts +5 -0
  1451. package/lib/mjs/components/day/editForm/Day.edit.data.js +6 -0
  1452. package/lib/mjs/components/day/editForm/Day.edit.day.d.ts +40 -0
  1453. package/lib/mjs/components/day/editForm/Day.edit.day.js +46 -0
  1454. package/lib/mjs/components/day/editForm/Day.edit.display.d.ts +40 -0
  1455. package/lib/mjs/components/day/editForm/Day.edit.display.js +44 -0
  1456. package/lib/mjs/components/day/editForm/Day.edit.month.d.ts +40 -0
  1457. package/lib/mjs/components/day/editForm/Day.edit.month.js +38 -0
  1458. package/lib/mjs/components/day/editForm/Day.edit.validation.d.ts +29 -0
  1459. package/lib/mjs/components/day/editForm/Day.edit.validation.js +52 -0
  1460. package/lib/mjs/components/day/editForm/Day.edit.year.d.ts +40 -0
  1461. package/lib/mjs/components/day/editForm/Day.edit.year.js +56 -0
  1462. package/lib/mjs/components/day/fixtures/comp1.d.ts +46 -0
  1463. package/lib/mjs/components/day/fixtures/comp1.js +37 -0
  1464. package/lib/mjs/components/day/fixtures/comp2.d.ts +46 -0
  1465. package/lib/mjs/components/day/fixtures/comp2.js +37 -0
  1466. package/lib/mjs/components/day/fixtures/comp3.d.ts +48 -0
  1467. package/lib/mjs/components/day/fixtures/comp3.js +39 -0
  1468. package/lib/mjs/components/day/fixtures/comp4.d.ts +53 -0
  1469. package/lib/mjs/components/day/fixtures/comp4.js +54 -0
  1470. package/lib/mjs/components/day/fixtures/index.d.ts +5 -0
  1471. package/lib/mjs/components/day/fixtures/index.js +5 -0
  1472. package/lib/mjs/components/day/fixtures/values.d.ts +2 -0
  1473. package/lib/mjs/components/day/fixtures/values.js +4 -0
  1474. package/lib/mjs/components/editgrid/EditGrid.d.ts +98 -0
  1475. package/lib/mjs/components/editgrid/EditGrid.form.d.ts +3 -0
  1476. package/lib/mjs/components/editgrid/EditGrid.form.js +27 -0
  1477. package/lib/mjs/components/editgrid/EditGrid.js +1151 -0
  1478. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.data.d.ts +18 -0
  1479. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.data.js +18 -0
  1480. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.d.ts +82 -0
  1481. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +53 -0
  1482. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.d.ts +58 -0
  1483. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.js +126 -0
  1484. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.validation.d.ts +29 -0
  1485. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.validation.js +32 -0
  1486. package/lib/mjs/components/editgrid/fixtures/comp-openWhenEmpty.d.ts +34 -0
  1487. package/lib/mjs/components/editgrid/fixtures/comp-openWhenEmpty.js +34 -0
  1488. package/lib/mjs/components/editgrid/fixtures/comp-with-basic-components.d.ts +327 -0
  1489. package/lib/mjs/components/editgrid/fixtures/comp-with-basic-components.js +218 -0
  1490. package/lib/mjs/components/editgrid/fixtures/comp-with-conditions-and-openWhenEmpty.d.ts +77 -0
  1491. package/lib/mjs/components/editgrid/fixtures/comp-with-conditions-and-openWhenEmpty.js +82 -0
  1492. package/lib/mjs/components/editgrid/fixtures/comp1.d.ts +89 -0
  1493. package/lib/mjs/components/editgrid/fixtures/comp1.js +126 -0
  1494. package/lib/mjs/components/editgrid/fixtures/comp10.d.ts +49 -0
  1495. package/lib/mjs/components/editgrid/fixtures/comp10.js +46 -0
  1496. package/lib/mjs/components/editgrid/fixtures/comp11.d.ts +53 -0
  1497. package/lib/mjs/components/editgrid/fixtures/comp11.js +48 -0
  1498. package/lib/mjs/components/editgrid/fixtures/comp12.d.ts +57 -0
  1499. package/lib/mjs/components/editgrid/fixtures/comp12.js +48 -0
  1500. package/lib/mjs/components/editgrid/fixtures/comp13.d.ts +64 -0
  1501. package/lib/mjs/components/editgrid/fixtures/comp13.js +62 -0
  1502. package/lib/mjs/components/editgrid/fixtures/comp14.d.ts +88 -0
  1503. package/lib/mjs/components/editgrid/fixtures/comp14.js +82 -0
  1504. package/lib/mjs/components/editgrid/fixtures/comp2.d.ts +112 -0
  1505. package/lib/mjs/components/editgrid/fixtures/comp2.js +112 -0
  1506. package/lib/mjs/components/editgrid/fixtures/comp3.d.ts +27 -0
  1507. package/lib/mjs/components/editgrid/fixtures/comp3.js +26 -0
  1508. package/lib/mjs/components/editgrid/fixtures/comp4.d.ts +23 -0
  1509. package/lib/mjs/components/editgrid/fixtures/comp4.js +22 -0
  1510. package/lib/mjs/components/editgrid/fixtures/comp5.d.ts +19 -0
  1511. package/lib/mjs/components/editgrid/fixtures/comp5.js +20 -0
  1512. package/lib/mjs/components/editgrid/fixtures/comp6.d.ts +50 -0
  1513. package/lib/mjs/components/editgrid/fixtures/comp6.js +56 -0
  1514. package/lib/mjs/components/editgrid/fixtures/comp7.d.ts +129 -0
  1515. package/lib/mjs/components/editgrid/fixtures/comp7.js +121 -0
  1516. package/lib/mjs/components/editgrid/fixtures/comp8.d.ts +148 -0
  1517. package/lib/mjs/components/editgrid/fixtures/comp8.js +154 -0
  1518. package/lib/mjs/components/editgrid/fixtures/comp9.d.ts +86 -0
  1519. package/lib/mjs/components/editgrid/fixtures/comp9.js +60 -0
  1520. package/lib/mjs/components/editgrid/fixtures/index.d.ts +17 -0
  1521. package/lib/mjs/components/editgrid/fixtures/index.js +17 -0
  1522. package/lib/mjs/components/email/Email.d.ts +4 -0
  1523. package/lib/mjs/components/email/Email.form.d.ts +3 -0
  1524. package/lib/mjs/components/email/Email.form.js +15 -0
  1525. package/lib/mjs/components/email/Email.js +48 -0
  1526. package/lib/mjs/components/email/editForm/Email.edit.display.d.ts +5 -0
  1527. package/lib/mjs/components/email/editForm/Email.edit.display.js +18 -0
  1528. package/lib/mjs/components/email/editForm/Email.edit.validation.d.ts +24 -0
  1529. package/lib/mjs/components/email/editForm/Email.edit.validation.js +26 -0
  1530. package/lib/mjs/components/email/fixtures/comp1.d.ts +26 -0
  1531. package/lib/mjs/components/email/fixtures/comp1.js +24 -0
  1532. package/lib/mjs/components/email/fixtures/comp2.d.ts +23 -0
  1533. package/lib/mjs/components/email/fixtures/comp2.js +11 -0
  1534. package/lib/mjs/components/email/fixtures/index.d.ts +3 -0
  1535. package/lib/mjs/components/email/fixtures/index.js +3 -0
  1536. package/lib/mjs/components/email/fixtures/values.d.ts +2 -0
  1537. package/lib/mjs/components/email/fixtures/values.js +4 -0
  1538. package/lib/mjs/components/fieldset/Fieldset.d.ts +13 -0
  1539. package/lib/mjs/components/fieldset/Fieldset.form.d.ts +3 -0
  1540. package/lib/mjs/components/fieldset/Fieldset.form.js +10 -0
  1541. package/lib/mjs/components/fieldset/Fieldset.js +37 -0
  1542. package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.d.ts +33 -0
  1543. package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.js +42 -0
  1544. package/lib/mjs/components/fieldset/fixtures/comp1.d.ts +46 -0
  1545. package/lib/mjs/components/fieldset/fixtures/comp1.js +79 -0
  1546. package/lib/mjs/components/fieldset/fixtures/index.d.ts +2 -0
  1547. package/lib/mjs/components/fieldset/fixtures/index.js +2 -0
  1548. package/lib/mjs/components/file/File.d.ts +59 -0
  1549. package/lib/mjs/components/file/File.form.d.ts +3 -0
  1550. package/lib/mjs/components/file/File.form.js +27 -0
  1551. package/lib/mjs/components/file/File.js +746 -0
  1552. package/lib/mjs/components/file/editForm/File.edit.data.d.ts +5 -0
  1553. package/lib/mjs/components/file/editForm/File.edit.data.js +6 -0
  1554. package/lib/mjs/components/file/editForm/File.edit.display.d.ts +5 -0
  1555. package/lib/mjs/components/file/editForm/File.edit.display.js +6 -0
  1556. package/lib/mjs/components/file/editForm/File.edit.file.d.ts +213 -0
  1557. package/lib/mjs/components/file/editForm/File.edit.file.js +256 -0
  1558. package/lib/mjs/components/file/editForm/File.edit.validation.d.ts +5 -0
  1559. package/lib/mjs/components/file/editForm/File.edit.validation.js +10 -0
  1560. package/lib/mjs/components/file/fixtures/comp1.d.ts +15 -0
  1561. package/lib/mjs/components/file/fixtures/comp1.js +16 -0
  1562. package/lib/mjs/components/file/fixtures/comp2.d.ts +35 -0
  1563. package/lib/mjs/components/file/fixtures/comp2.js +29 -0
  1564. package/lib/mjs/components/file/fixtures/index.d.ts +3 -0
  1565. package/lib/mjs/components/file/fixtures/index.js +3 -0
  1566. package/lib/mjs/components/file/fixtures/values.d.ts +10 -0
  1567. package/lib/mjs/components/file/fixtures/values.js +13 -0
  1568. package/lib/mjs/components/form/Form.d.ts +94 -0
  1569. package/lib/mjs/components/form/Form.form.d.ts +3 -0
  1570. package/lib/mjs/components/form/Form.form.js +24 -0
  1571. package/lib/mjs/components/form/Form.js +714 -0
  1572. package/lib/mjs/components/form/editForm/Form.edit.data.d.ts +82 -0
  1573. package/lib/mjs/components/form/editForm/Form.edit.data.js +16 -0
  1574. package/lib/mjs/components/form/editForm/Form.edit.display.d.ts +5 -0
  1575. package/lib/mjs/components/form/editForm/Form.edit.display.js +27 -0
  1576. package/lib/mjs/components/form/editForm/Form.edit.form.d.ts +89 -0
  1577. package/lib/mjs/components/form/editForm/Form.edit.form.js +72 -0
  1578. package/lib/mjs/components/form/fixtures/comp1.d.ts +45 -0
  1579. package/lib/mjs/components/form/fixtures/comp1.js +78 -0
  1580. package/lib/mjs/components/form/fixtures/comp2.d.ts +14 -0
  1581. package/lib/mjs/components/form/fixtures/comp2.js +13 -0
  1582. package/lib/mjs/components/form/fixtures/comp3.d.ts +187 -0
  1583. package/lib/mjs/components/form/fixtures/comp3.js +168 -0
  1584. package/lib/mjs/components/form/fixtures/comp4.d.ts +107 -0
  1585. package/lib/mjs/components/form/fixtures/comp4.js +89 -0
  1586. package/lib/mjs/components/form/fixtures/comp5.d.ts +42 -0
  1587. package/lib/mjs/components/form/fixtures/comp5.js +43 -0
  1588. package/lib/mjs/components/form/fixtures/comp6.d.ts +74 -0
  1589. package/lib/mjs/components/form/fixtures/comp6.js +92 -0
  1590. package/lib/mjs/components/form/fixtures/formModalEdit.d.ts +42 -0
  1591. package/lib/mjs/components/form/fixtures/formModalEdit.js +49 -0
  1592. package/lib/mjs/components/form/fixtures/index.d.ts +8 -0
  1593. package/lib/mjs/components/form/fixtures/index.js +8 -0
  1594. package/lib/mjs/components/form/fixtures/values.d.ts +6 -0
  1595. package/lib/mjs/components/form/fixtures/values.js +7 -0
  1596. package/lib/mjs/components/hidden/Hidden.d.ts +25 -0
  1597. package/lib/mjs/components/hidden/Hidden.form.d.ts +3 -0
  1598. package/lib/mjs/components/hidden/Hidden.form.js +23 -0
  1599. package/lib/mjs/components/hidden/Hidden.js +54 -0
  1600. package/lib/mjs/components/hidden/editForm/Hidden.edit.data.d.ts +5 -0
  1601. package/lib/mjs/components/hidden/editForm/Hidden.edit.data.js +14 -0
  1602. package/lib/mjs/components/hidden/editForm/Hidden.edit.display.d.ts +5 -0
  1603. package/lib/mjs/components/hidden/editForm/Hidden.edit.display.js +42 -0
  1604. package/lib/mjs/components/hidden/fixtures/comp1.d.ts +18 -0
  1605. package/lib/mjs/components/hidden/fixtures/comp1.js +16 -0
  1606. package/lib/mjs/components/hidden/fixtures/index.d.ts +2 -0
  1607. package/lib/mjs/components/hidden/fixtures/index.js +2 -0
  1608. package/lib/mjs/components/hidden/fixtures/values.d.ts +2 -0
  1609. package/lib/mjs/components/hidden/fixtures/values.js +4 -0
  1610. package/lib/mjs/components/html/HTML.d.ts +16 -0
  1611. package/lib/mjs/components/html/HTML.form.d.ts +3 -0
  1612. package/lib/mjs/components/html/HTML.form.js +23 -0
  1613. package/lib/mjs/components/html/HTML.js +83 -0
  1614. package/lib/mjs/components/html/editForm/HTML.edit.display.d.ts +77 -0
  1615. package/lib/mjs/components/html/editForm/HTML.edit.display.js +98 -0
  1616. package/lib/mjs/components/html/editForm/HTML.edit.logic.d.ts +48 -0
  1617. package/lib/mjs/components/html/editForm/HTML.edit.logic.js +98 -0
  1618. package/lib/mjs/components/html/fixtures/comp1.d.ts +19 -0
  1619. package/lib/mjs/components/html/fixtures/comp1.js +20 -0
  1620. package/lib/mjs/components/html/fixtures/comp2.d.ts +21 -0
  1621. package/lib/mjs/components/html/fixtures/comp2.js +22 -0
  1622. package/lib/mjs/components/html/fixtures/index.d.ts +3 -0
  1623. package/lib/mjs/components/html/fixtures/index.js +3 -0
  1624. package/lib/mjs/components/index.d.ts +100 -0
  1625. package/lib/mjs/components/index.js +99 -0
  1626. package/lib/mjs/components/number/Number.d.ts +31 -0
  1627. package/lib/mjs/components/number/Number.form.d.ts +3 -0
  1628. package/lib/mjs/components/number/Number.form.js +20 -0
  1629. package/lib/mjs/components/number/Number.js +185 -0
  1630. package/lib/mjs/components/number/editForm/Number.edit.data.d.ts +18 -0
  1631. package/lib/mjs/components/number/editForm/Number.edit.data.js +30 -0
  1632. package/lib/mjs/components/number/editForm/Number.edit.display.d.ts +5 -0
  1633. package/lib/mjs/components/number/editForm/Number.edit.display.js +22 -0
  1634. package/lib/mjs/components/number/editForm/Number.edit.validation.d.ts +20 -0
  1635. package/lib/mjs/components/number/editForm/Number.edit.validation.js +44 -0
  1636. package/lib/mjs/components/number/fixtures/comp1.d.ts +33 -0
  1637. package/lib/mjs/components/number/fixtures/comp1.js +30 -0
  1638. package/lib/mjs/components/number/fixtures/comp2.d.ts +32 -0
  1639. package/lib/mjs/components/number/fixtures/comp2.js +29 -0
  1640. package/lib/mjs/components/number/fixtures/comp3.d.ts +14 -0
  1641. package/lib/mjs/components/number/fixtures/comp3.js +13 -0
  1642. package/lib/mjs/components/number/fixtures/comp4.d.ts +14 -0
  1643. package/lib/mjs/components/number/fixtures/comp4.js +13 -0
  1644. package/lib/mjs/components/number/fixtures/comp5.d.ts +20 -0
  1645. package/lib/mjs/components/number/fixtures/comp5.js +18 -0
  1646. package/lib/mjs/components/number/fixtures/comp6.d.ts +40 -0
  1647. package/lib/mjs/components/number/fixtures/comp6.js +25 -0
  1648. package/lib/mjs/components/number/fixtures/comp7.d.ts +15 -0
  1649. package/lib/mjs/components/number/fixtures/comp7.js +14 -0
  1650. package/lib/mjs/components/number/fixtures/index.d.ts +8 -0
  1651. package/lib/mjs/components/number/fixtures/index.js +8 -0
  1652. package/lib/mjs/components/number/fixtures/values.d.ts +2 -0
  1653. package/lib/mjs/components/number/fixtures/values.js +9 -0
  1654. package/lib/mjs/components/panel/Panel.d.ts +14 -0
  1655. package/lib/mjs/components/panel/Panel.form.d.ts +3 -0
  1656. package/lib/mjs/components/panel/Panel.form.js +15 -0
  1657. package/lib/mjs/components/panel/Panel.js +52 -0
  1658. package/lib/mjs/components/panel/editForm/Panel.edit.conditional.d.ts +75 -0
  1659. package/lib/mjs/components/panel/editForm/Panel.edit.conditional.js +40 -0
  1660. package/lib/mjs/components/panel/editForm/Panel.edit.display.d.ts +228 -0
  1661. package/lib/mjs/components/panel/editForm/Panel.edit.display.js +208 -0
  1662. package/lib/mjs/components/panel/fixtures/comp1.d.ts +46 -0
  1663. package/lib/mjs/components/panel/fixtures/comp1.js +78 -0
  1664. package/lib/mjs/components/panel/fixtures/comp2.d.ts +80 -0
  1665. package/lib/mjs/components/panel/fixtures/comp2.js +67 -0
  1666. package/lib/mjs/components/panel/fixtures/index.d.ts +3 -0
  1667. package/lib/mjs/components/panel/fixtures/index.js +3 -0
  1668. package/lib/mjs/components/password/Password.d.ts +3 -0
  1669. package/lib/mjs/components/password/Password.form.d.ts +3 -0
  1670. package/lib/mjs/components/password/Password.form.js +20 -0
  1671. package/lib/mjs/components/password/Password.js +34 -0
  1672. package/lib/mjs/components/password/editForm/Password.edit.data.d.ts +18 -0
  1673. package/lib/mjs/components/password/editForm/Password.edit.data.js +46 -0
  1674. package/lib/mjs/components/password/editForm/Password.edit.display.d.ts +5 -0
  1675. package/lib/mjs/components/password/editForm/Password.edit.display.js +14 -0
  1676. package/lib/mjs/components/password/editForm/Password.edit.validation.d.ts +5 -0
  1677. package/lib/mjs/components/password/editForm/Password.edit.validation.js +14 -0
  1678. package/lib/mjs/components/password/fixtures/comp1.d.ts +22 -0
  1679. package/lib/mjs/components/password/fixtures/comp1.js +20 -0
  1680. package/lib/mjs/components/password/fixtures/comp2.d.ts +27 -0
  1681. package/lib/mjs/components/password/fixtures/comp2.js +27 -0
  1682. package/lib/mjs/components/password/fixtures/index.d.ts +3 -0
  1683. package/lib/mjs/components/password/fixtures/index.js +3 -0
  1684. package/lib/mjs/components/password/fixtures/values.d.ts +2 -0
  1685. package/lib/mjs/components/password/fixtures/values.js +4 -0
  1686. package/lib/mjs/components/phonenumber/PhoneNumber.d.ts +3 -0
  1687. package/lib/mjs/components/phonenumber/PhoneNumber.form.d.ts +3 -0
  1688. package/lib/mjs/components/phonenumber/PhoneNumber.form.js +23 -0
  1689. package/lib/mjs/components/phonenumber/PhoneNumber.js +27 -0
  1690. package/lib/mjs/components/phonenumber/editForm/PhoneNumber.edit.validation.d.ts +5 -0
  1691. package/lib/mjs/components/phonenumber/editForm/PhoneNumber.edit.validation.js +22 -0
  1692. package/lib/mjs/components/phonenumber/fixtures/comp1.d.ts +27 -0
  1693. package/lib/mjs/components/phonenumber/fixtures/comp1.js +25 -0
  1694. package/lib/mjs/components/phonenumber/fixtures/index.d.ts +2 -0
  1695. package/lib/mjs/components/phonenumber/fixtures/index.js +2 -0
  1696. package/lib/mjs/components/phonenumber/fixtures/values.d.ts +2 -0
  1697. package/lib/mjs/components/phonenumber/fixtures/values.js +4 -0
  1698. package/lib/mjs/components/radio/Radio.d.ts +44 -0
  1699. package/lib/mjs/components/radio/Radio.form.d.ts +3 -0
  1700. package/lib/mjs/components/radio/Radio.form.js +20 -0
  1701. package/lib/mjs/components/radio/Radio.js +288 -0
  1702. package/lib/mjs/components/radio/editForm/Radio.edit.data.d.ts +134 -0
  1703. package/lib/mjs/components/radio/editForm/Radio.edit.data.js +80 -0
  1704. package/lib/mjs/components/radio/editForm/Radio.edit.display.d.ts +40 -0
  1705. package/lib/mjs/components/radio/editForm/Radio.edit.display.js +32 -0
  1706. package/lib/mjs/components/radio/editForm/Radio.edit.validation.d.ts +18 -0
  1707. package/lib/mjs/components/radio/editForm/Radio.edit.validation.js +18 -0
  1708. package/lib/mjs/components/radio/fixtures/comp1.d.ts +28 -0
  1709. package/lib/mjs/components/radio/fixtures/comp1.js +40 -0
  1710. package/lib/mjs/components/radio/fixtures/comp2.d.ts +85 -0
  1711. package/lib/mjs/components/radio/fixtures/comp2.js +84 -0
  1712. package/lib/mjs/components/radio/fixtures/comp3.d.ts +85 -0
  1713. package/lib/mjs/components/radio/fixtures/comp3.js +88 -0
  1714. package/lib/mjs/components/radio/fixtures/comp4.d.ts +19 -0
  1715. package/lib/mjs/components/radio/fixtures/comp4.js +25 -0
  1716. package/lib/mjs/components/radio/fixtures/comp5.d.ts +39 -0
  1717. package/lib/mjs/components/radio/fixtures/comp5.js +33 -0
  1718. package/lib/mjs/components/radio/fixtures/comp6.d.ts +38 -0
  1719. package/lib/mjs/components/radio/fixtures/comp6.js +31 -0
  1720. package/lib/mjs/components/radio/fixtures/comp7.d.ts +23 -0
  1721. package/lib/mjs/components/radio/fixtures/comp7.js +19 -0
  1722. package/lib/mjs/components/radio/fixtures/comp8.d.ts +118 -0
  1723. package/lib/mjs/components/radio/fixtures/comp8.js +111 -0
  1724. package/lib/mjs/components/radio/fixtures/comp9.d.ts +35 -0
  1725. package/lib/mjs/components/radio/fixtures/comp9.js +30 -0
  1726. package/lib/mjs/components/radio/fixtures/index.d.ts +10 -0
  1727. package/lib/mjs/components/radio/fixtures/index.js +10 -0
  1728. package/lib/mjs/components/radio/fixtures/values.d.ts +2 -0
  1729. package/lib/mjs/components/radio/fixtures/values.js +5 -0
  1730. package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +22 -0
  1731. package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +3 -0
  1732. package/lib/mjs/components/recaptcha/ReCaptcha.form.js +26 -0
  1733. package/lib/mjs/components/recaptcha/ReCaptcha.js +137 -0
  1734. package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +44 -0
  1735. package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +106 -0
  1736. package/lib/mjs/components/recaptcha/fixtures/comp1.d.ts +8 -0
  1737. package/lib/mjs/components/recaptcha/fixtures/comp1.js +7 -0
  1738. package/lib/mjs/components/recaptcha/fixtures/index.d.ts +2 -0
  1739. package/lib/mjs/components/recaptcha/fixtures/index.js +2 -0
  1740. package/lib/mjs/components/resource/Resource.d.ts +3 -0
  1741. package/lib/mjs/components/resource/Resource.form.d.ts +3 -0
  1742. package/lib/mjs/components/resource/Resource.form.js +10 -0
  1743. package/lib/mjs/components/resource/Resource.js +34 -0
  1744. package/lib/mjs/components/resource/editForm/Resource.edit.display.d.ts +173 -0
  1745. package/lib/mjs/components/resource/editForm/Resource.edit.display.js +100 -0
  1746. package/lib/mjs/components/resource/fixtures/comp1.d.ts +30 -0
  1747. package/lib/mjs/components/resource/fixtures/comp1.js +28 -0
  1748. package/lib/mjs/components/resource/fixtures/comp2.d.ts +35 -0
  1749. package/lib/mjs/components/resource/fixtures/comp2.js +29 -0
  1750. package/lib/mjs/components/resource/fixtures/index.d.ts +3 -0
  1751. package/lib/mjs/components/resource/fixtures/index.js +3 -0
  1752. package/lib/mjs/components/select/Select.d.ts +122 -0
  1753. package/lib/mjs/components/select/Select.form.d.ts +3 -0
  1754. package/lib/mjs/components/select/Select.form.js +20 -0
  1755. package/lib/mjs/components/select/Select.js +1485 -0
  1756. package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +1039 -0
  1757. package/lib/mjs/components/select/editForm/Select.edit.data.js +627 -0
  1758. package/lib/mjs/components/select/editForm/Select.edit.display.d.ts +27 -0
  1759. package/lib/mjs/components/select/editForm/Select.edit.display.js +26 -0
  1760. package/lib/mjs/components/select/editForm/Select.edit.validation.d.ts +30 -0
  1761. package/lib/mjs/components/select/editForm/Select.edit.validation.js +33 -0
  1762. package/lib/mjs/components/select/fixtures/comp1.d.ts +40 -0
  1763. package/lib/mjs/components/select/fixtures/comp1.js +64 -0
  1764. package/lib/mjs/components/select/fixtures/comp10.d.ts +41 -0
  1765. package/lib/mjs/components/select/fixtures/comp10.js +30 -0
  1766. package/lib/mjs/components/select/fixtures/comp11.d.ts +28 -0
  1767. package/lib/mjs/components/select/fixtures/comp11.js +22 -0
  1768. package/lib/mjs/components/select/fixtures/comp12.d.ts +53 -0
  1769. package/lib/mjs/components/select/fixtures/comp12.js +27 -0
  1770. package/lib/mjs/components/select/fixtures/comp13.d.ts +28 -0
  1771. package/lib/mjs/components/select/fixtures/comp13.js +29 -0
  1772. package/lib/mjs/components/select/fixtures/comp14.d.ts +40 -0
  1773. package/lib/mjs/components/select/fixtures/comp14.js +25 -0
  1774. package/lib/mjs/components/select/fixtures/comp15.d.ts +50 -0
  1775. package/lib/mjs/components/select/fixtures/comp15.js +39 -0
  1776. package/lib/mjs/components/select/fixtures/comp16.d.ts +34 -0
  1777. package/lib/mjs/components/select/fixtures/comp16.js +31 -0
  1778. package/lib/mjs/components/select/fixtures/comp17.d.ts +51 -0
  1779. package/lib/mjs/components/select/fixtures/comp17.js +41 -0
  1780. package/lib/mjs/components/select/fixtures/comp18.d.ts +49 -0
  1781. package/lib/mjs/components/select/fixtures/comp18.js +40 -0
  1782. package/lib/mjs/components/select/fixtures/comp2.d.ts +41 -0
  1783. package/lib/mjs/components/select/fixtures/comp2.js +65 -0
  1784. package/lib/mjs/components/select/fixtures/comp3.d.ts +35 -0
  1785. package/lib/mjs/components/select/fixtures/comp3.js +206 -0
  1786. package/lib/mjs/components/select/fixtures/comp4.d.ts +103 -0
  1787. package/lib/mjs/components/select/fixtures/comp4.js +104 -0
  1788. package/lib/mjs/components/select/fixtures/comp5.d.ts +21 -0
  1789. package/lib/mjs/components/select/fixtures/comp5.js +26 -0
  1790. package/lib/mjs/components/select/fixtures/comp6.d.ts +20 -0
  1791. package/lib/mjs/components/select/fixtures/comp6.js +28 -0
  1792. package/lib/mjs/components/select/fixtures/comp7.d.ts +63 -0
  1793. package/lib/mjs/components/select/fixtures/comp7.js +44 -0
  1794. package/lib/mjs/components/select/fixtures/comp8.d.ts +72 -0
  1795. package/lib/mjs/components/select/fixtures/comp8.js +35 -0
  1796. package/lib/mjs/components/select/fixtures/comp9.d.ts +88 -0
  1797. package/lib/mjs/components/select/fixtures/comp9.js +65 -0
  1798. package/lib/mjs/components/select/fixtures/index.d.ts +19 -0
  1799. package/lib/mjs/components/select/fixtures/index.js +19 -0
  1800. package/lib/mjs/components/select/fixtures/values.d.ts +2 -0
  1801. package/lib/mjs/components/select/fixtures/values.js +5 -0
  1802. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +15 -0
  1803. package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +3 -0
  1804. package/lib/mjs/components/selectboxes/SelectBoxes.form.js +19 -0
  1805. package/lib/mjs/components/selectboxes/SelectBoxes.js +208 -0
  1806. package/lib/mjs/components/selectboxes/editForm/SelectBoxes.edit.validation.d.ts +9 -0
  1807. package/lib/mjs/components/selectboxes/editForm/SelectBoxes.edit.validation.js +34 -0
  1808. package/lib/mjs/components/selectboxes/fixtures/comp1.d.ts +24 -0
  1809. package/lib/mjs/components/selectboxes/fixtures/comp1.js +52 -0
  1810. package/lib/mjs/components/selectboxes/fixtures/comp2.d.ts +24 -0
  1811. package/lib/mjs/components/selectboxes/fixtures/comp2.js +52 -0
  1812. package/lib/mjs/components/selectboxes/fixtures/comp3.d.ts +23 -0
  1813. package/lib/mjs/components/selectboxes/fixtures/comp3.js +19 -0
  1814. package/lib/mjs/components/selectboxes/fixtures/comp4.d.ts +63 -0
  1815. package/lib/mjs/components/selectboxes/fixtures/comp4.js +64 -0
  1816. package/lib/mjs/components/selectboxes/fixtures/comp5.d.ts +37 -0
  1817. package/lib/mjs/components/selectboxes/fixtures/comp5.js +31 -0
  1818. package/lib/mjs/components/selectboxes/fixtures/index.d.ts +6 -0
  1819. package/lib/mjs/components/selectboxes/fixtures/index.js +6 -0
  1820. package/lib/mjs/components/selectboxes/fixtures/values.d.ts +6 -0
  1821. package/lib/mjs/components/selectboxes/fixtures/values.js +22 -0
  1822. package/lib/mjs/components/signature/Signature.d.ts +26 -0
  1823. package/lib/mjs/components/signature/Signature.form.d.ts +3 -0
  1824. package/lib/mjs/components/signature/Signature.form.js +20 -0
  1825. package/lib/mjs/components/signature/Signature.js +240 -0
  1826. package/lib/mjs/components/signature/editForm/Signature.edit.data.d.ts +5 -0
  1827. package/lib/mjs/components/signature/editForm/Signature.edit.data.js +14 -0
  1828. package/lib/mjs/components/signature/editForm/Signature.edit.display.d.ts +51 -0
  1829. package/lib/mjs/components/signature/editForm/Signature.edit.display.js +69 -0
  1830. package/lib/mjs/components/signature/editForm/Signature.edit.validation.d.ts +5 -0
  1831. package/lib/mjs/components/signature/editForm/Signature.edit.validation.js +10 -0
  1832. package/lib/mjs/components/signature/fixtures/comp1.d.ts +30 -0
  1833. package/lib/mjs/components/signature/fixtures/comp1.js +28 -0
  1834. package/lib/mjs/components/signature/fixtures/index.d.ts +2 -0
  1835. package/lib/mjs/components/signature/fixtures/index.js +2 -0
  1836. package/lib/mjs/components/signature/fixtures/values.d.ts +2 -0
  1837. package/lib/mjs/components/signature/fixtures/values.js +5 -0
  1838. package/lib/mjs/components/survey/Survey.d.ts +16 -0
  1839. package/lib/mjs/components/survey/Survey.form.d.ts +3 -0
  1840. package/lib/mjs/components/survey/Survey.form.js +20 -0
  1841. package/lib/mjs/components/survey/Survey.js +141 -0
  1842. package/lib/mjs/components/survey/editForm/Survey.edit.data.d.ts +44 -0
  1843. package/lib/mjs/components/survey/editForm/Survey.edit.data.js +70 -0
  1844. package/lib/mjs/components/survey/editForm/Survey.edit.display.d.ts +5 -0
  1845. package/lib/mjs/components/survey/editForm/Survey.edit.display.js +6 -0
  1846. package/lib/mjs/components/survey/editForm/Survey.edit.validation.d.ts +5 -0
  1847. package/lib/mjs/components/survey/editForm/Survey.edit.validation.js +6 -0
  1848. package/lib/mjs/components/survey/fixtures/comp1.d.ts +31 -0
  1849. package/lib/mjs/components/survey/fixtures/comp1.js +53 -0
  1850. package/lib/mjs/components/survey/fixtures/comp2.d.ts +31 -0
  1851. package/lib/mjs/components/survey/fixtures/comp2.js +53 -0
  1852. package/lib/mjs/components/survey/fixtures/index.d.ts +3 -0
  1853. package/lib/mjs/components/survey/fixtures/index.js +3 -0
  1854. package/lib/mjs/components/survey/fixtures/values.d.ts +5 -0
  1855. package/lib/mjs/components/survey/fixtures/values.js +10 -0
  1856. package/lib/mjs/components/table/Table.d.ts +21 -0
  1857. package/lib/mjs/components/table/Table.form.d.ts +3 -0
  1858. package/lib/mjs/components/table/Table.form.js +10 -0
  1859. package/lib/mjs/components/table/Table.js +165 -0
  1860. package/lib/mjs/components/table/editForm/Table.edit.display.d.ts +55 -0
  1861. package/lib/mjs/components/table/editForm/Table.edit.display.js +109 -0
  1862. package/lib/mjs/components/table/fixtures/comp1.d.ts +53 -0
  1863. package/lib/mjs/components/table/fixtures/comp1.js +235 -0
  1864. package/lib/mjs/components/table/fixtures/index.d.ts +2 -0
  1865. package/lib/mjs/components/table/fixtures/index.js +2 -0
  1866. package/lib/mjs/components/tabs/Tabs.d.ts +28 -0
  1867. package/lib/mjs/components/tabs/Tabs.form.d.ts +3 -0
  1868. package/lib/mjs/components/tabs/Tabs.form.js +10 -0
  1869. package/lib/mjs/components/tabs/Tabs.js +197 -0
  1870. package/lib/mjs/components/tabs/editForm/Tabs.edit.display.d.ts +49 -0
  1871. package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +66 -0
  1872. package/lib/mjs/components/tabs/fixtures/comp1.d.ts +23 -0
  1873. package/lib/mjs/components/tabs/fixtures/comp1.js +31 -0
  1874. package/lib/mjs/components/tabs/fixtures/index.d.ts +2 -0
  1875. package/lib/mjs/components/tabs/fixtures/index.js +2 -0
  1876. package/lib/mjs/components/tags/Tags.d.ts +19 -0
  1877. package/lib/mjs/components/tags/Tags.form.d.ts +3 -0
  1878. package/lib/mjs/components/tags/Tags.form.js +10 -0
  1879. package/lib/mjs/components/tags/Tags.js +158 -0
  1880. package/lib/mjs/components/tags/editForm/Tags.edit.data.d.ts +51 -0
  1881. package/lib/mjs/components/tags/editForm/Tags.edit.data.js +37 -0
  1882. package/lib/mjs/components/tags/fixtures/comp1.d.ts +20 -0
  1883. package/lib/mjs/components/tags/fixtures/comp1.js +18 -0
  1884. package/lib/mjs/components/tags/fixtures/comp2.d.ts +10 -0
  1885. package/lib/mjs/components/tags/fixtures/comp2.js +9 -0
  1886. package/lib/mjs/components/tags/fixtures/comp3.d.ts +23 -0
  1887. package/lib/mjs/components/tags/fixtures/comp3.js +18 -0
  1888. package/lib/mjs/components/tags/fixtures/comp4.d.ts +9 -0
  1889. package/lib/mjs/components/tags/fixtures/comp4.js +8 -0
  1890. package/lib/mjs/components/tags/fixtures/comp5.d.ts +24 -0
  1891. package/lib/mjs/components/tags/fixtures/comp5.js +22 -0
  1892. package/lib/mjs/components/tags/fixtures/index.d.ts +6 -0
  1893. package/lib/mjs/components/tags/fixtures/index.js +6 -0
  1894. package/lib/mjs/components/tags/fixtures/values.d.ts +2 -0
  1895. package/lib/mjs/components/tags/fixtures/values.js +4 -0
  1896. package/lib/mjs/components/textarea/TextArea.d.ts +36 -0
  1897. package/lib/mjs/components/textarea/TextArea.form.d.ts +3 -0
  1898. package/lib/mjs/components/textarea/TextArea.form.js +15 -0
  1899. package/lib/mjs/components/textarea/TextArea.js +530 -0
  1900. package/lib/mjs/components/textarea/editForm/TextArea.edit.display.d.ts +355 -0
  1901. package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +258 -0
  1902. package/lib/mjs/components/textarea/editForm/TextArea.edit.validation.d.ts +10 -0
  1903. package/lib/mjs/components/textarea/editForm/TextArea.edit.validation.js +20 -0
  1904. package/lib/mjs/components/textarea/fixtures/comp1.d.ts +31 -0
  1905. package/lib/mjs/components/textarea/fixtures/comp1.js +29 -0
  1906. package/lib/mjs/components/textarea/fixtures/comp2.d.ts +29 -0
  1907. package/lib/mjs/components/textarea/fixtures/comp2.js +27 -0
  1908. package/lib/mjs/components/textarea/fixtures/comp3.d.ts +27 -0
  1909. package/lib/mjs/components/textarea/fixtures/comp3.js +27 -0
  1910. package/lib/mjs/components/textarea/fixtures/index.d.ts +4 -0
  1911. package/lib/mjs/components/textarea/fixtures/index.js +4 -0
  1912. package/lib/mjs/components/textarea/fixtures/values.d.ts +2 -0
  1913. package/lib/mjs/components/textarea/fixtures/values.js +4 -0
  1914. package/lib/mjs/components/textfield/TextField.d.ts +38 -0
  1915. package/lib/mjs/components/textfield/TextField.form.d.ts +3 -0
  1916. package/lib/mjs/components/textfield/TextField.form.js +20 -0
  1917. package/lib/mjs/components/textfield/TextField.js +218 -0
  1918. package/lib/mjs/components/textfield/editForm/TextField.edit.data.d.ts +46 -0
  1919. package/lib/mjs/components/textfield/editForm/TextField.edit.data.js +56 -0
  1920. package/lib/mjs/components/textfield/editForm/TextField.edit.display.d.ts +248 -0
  1921. package/lib/mjs/components/textfield/editForm/TextField.edit.display.js +203 -0
  1922. package/lib/mjs/components/textfield/editForm/TextField.edit.validation.d.ts +10 -0
  1923. package/lib/mjs/components/textfield/editForm/TextField.edit.validation.js +47 -0
  1924. package/lib/mjs/components/textfield/fixtures/comp-with-display-and-value-masks.d.ts +47 -0
  1925. package/lib/mjs/components/textfield/fixtures/comp-with-display-and-value-masks.js +46 -0
  1926. package/lib/mjs/components/textfield/fixtures/comp1.d.ts +33 -0
  1927. package/lib/mjs/components/textfield/fixtures/comp1.js +31 -0
  1928. package/lib/mjs/components/textfield/fixtures/comp2.d.ts +33 -0
  1929. package/lib/mjs/components/textfield/fixtures/comp2.js +31 -0
  1930. package/lib/mjs/components/textfield/fixtures/comp3.d.ts +33 -0
  1931. package/lib/mjs/components/textfield/fixtures/comp3.js +31 -0
  1932. package/lib/mjs/components/textfield/fixtures/comp4.d.ts +23 -0
  1933. package/lib/mjs/components/textfield/fixtures/comp4.js +25 -0
  1934. package/lib/mjs/components/textfield/fixtures/comp5.d.ts +12 -0
  1935. package/lib/mjs/components/textfield/fixtures/comp5.js +11 -0
  1936. package/lib/mjs/components/textfield/fixtures/comp6.d.ts +25 -0
  1937. package/lib/mjs/components/textfield/fixtures/comp6.js +19 -0
  1938. package/lib/mjs/components/textfield/fixtures/comp7.d.ts +37 -0
  1939. package/lib/mjs/components/textfield/fixtures/comp7.js +36 -0
  1940. package/lib/mjs/components/textfield/fixtures/index.d.ts +9 -0
  1941. package/lib/mjs/components/textfield/fixtures/index.js +9 -0
  1942. package/lib/mjs/components/textfield/fixtures/values.d.ts +2 -0
  1943. package/lib/mjs/components/textfield/fixtures/values.js +5 -0
  1944. package/lib/mjs/components/time/Time.d.ts +16 -0
  1945. package/lib/mjs/components/time/Time.form.d.ts +3 -0
  1946. package/lib/mjs/components/time/Time.form.js +15 -0
  1947. package/lib/mjs/components/time/Time.js +142 -0
  1948. package/lib/mjs/components/time/editForm/Time.edit.data.d.ts +10 -0
  1949. package/lib/mjs/components/time/editForm/Time.edit.data.js +11 -0
  1950. package/lib/mjs/components/time/editForm/Time.edit.display.d.ts +52 -0
  1951. package/lib/mjs/components/time/editForm/Time.edit.display.js +40 -0
  1952. package/lib/mjs/components/time/fixtures/comp1.d.ts +24 -0
  1953. package/lib/mjs/components/time/fixtures/comp1.js +22 -0
  1954. package/lib/mjs/components/time/fixtures/comp2.d.ts +10 -0
  1955. package/lib/mjs/components/time/fixtures/comp2.js +9 -0
  1956. package/lib/mjs/components/time/fixtures/comp3.d.ts +15 -0
  1957. package/lib/mjs/components/time/fixtures/comp3.js +16 -0
  1958. package/lib/mjs/components/time/fixtures/index.d.ts +6 -0
  1959. package/lib/mjs/components/time/fixtures/index.js +6 -0
  1960. package/lib/mjs/components/time/fixtures/timeForm.d.ts +47 -0
  1961. package/lib/mjs/components/time/fixtures/timeForm.js +50 -0
  1962. package/lib/mjs/components/time/fixtures/timeForm2.d.ts +38 -0
  1963. package/lib/mjs/components/time/fixtures/timeForm2.js +42 -0
  1964. package/lib/mjs/components/time/fixtures/values.d.ts +2 -0
  1965. package/lib/mjs/components/time/fixtures/values.js +5 -0
  1966. package/lib/mjs/components/tree/Node.d.ts +55 -0
  1967. package/lib/mjs/components/tree/Node.js +179 -0
  1968. package/lib/mjs/components/tree/Tree.d.ts +47 -0
  1969. package/lib/mjs/components/tree/Tree.form.d.ts +3 -0
  1970. package/lib/mjs/components/tree/Tree.form.js +10 -0
  1971. package/lib/mjs/components/tree/Tree.js +385 -0
  1972. package/lib/mjs/components/tree/editForm/Tree.edit.data.d.ts +5 -0
  1973. package/lib/mjs/components/tree/editForm/Tree.edit.data.js +7 -0
  1974. package/lib/mjs/components/tree/fixtures/comp1.d.ts +23 -0
  1975. package/lib/mjs/components/tree/fixtures/comp1.js +22 -0
  1976. package/lib/mjs/components/tree/fixtures/comp2.d.ts +116 -0
  1977. package/lib/mjs/components/tree/fixtures/comp2.js +80 -0
  1978. package/lib/mjs/components/tree/fixtures/comp3.d.ts +24 -0
  1979. package/lib/mjs/components/tree/fixtures/comp3.js +23 -0
  1980. package/lib/mjs/components/tree/fixtures/comp4.d.ts +42 -0
  1981. package/lib/mjs/components/tree/fixtures/comp4.js +45 -0
  1982. package/lib/mjs/components/tree/fixtures/index.d.ts +5 -0
  1983. package/lib/mjs/components/tree/fixtures/index.js +5 -0
  1984. package/lib/mjs/components/unknown/Unknown.d.ts +28 -0
  1985. package/lib/mjs/components/unknown/Unknown.form.d.ts +34 -0
  1986. package/lib/mjs/components/unknown/Unknown.form.js +19 -0
  1987. package/lib/mjs/components/unknown/Unknown.js +24 -0
  1988. package/lib/mjs/components/unknown/editForm/Unknown.edit.display.d.ts +24 -0
  1989. package/lib/mjs/components/unknown/editForm/Unknown.edit.display.js +25 -0
  1990. package/lib/mjs/components/unknown/fixtures/comp1.d.ts +7 -0
  1991. package/lib/mjs/components/unknown/fixtures/comp1.js +6 -0
  1992. package/lib/mjs/components/unknown/fixtures/index.d.ts +2 -0
  1993. package/lib/mjs/components/unknown/fixtures/index.js +2 -0
  1994. package/lib/mjs/components/url/Url.d.ts +3 -0
  1995. package/lib/mjs/components/url/Url.form.d.ts +3 -0
  1996. package/lib/mjs/components/url/Url.form.js +20 -0
  1997. package/lib/mjs/components/url/Url.js +33 -0
  1998. package/lib/mjs/components/url/editForm/Url.edit.data.d.ts +5 -0
  1999. package/lib/mjs/components/url/editForm/Url.edit.data.js +6 -0
  2000. package/lib/mjs/components/url/editForm/Url.edit.display.d.ts +5 -0
  2001. package/lib/mjs/components/url/editForm/Url.edit.display.js +18 -0
  2002. package/lib/mjs/components/url/editForm/Url.edit.validation.d.ts +5 -0
  2003. package/lib/mjs/components/url/editForm/Url.edit.validation.js +10 -0
  2004. package/lib/mjs/components/url/fixtures/comp1.d.ts +26 -0
  2005. package/lib/mjs/components/url/fixtures/comp1.js +24 -0
  2006. package/lib/mjs/components/url/fixtures/comp2.d.ts +26 -0
  2007. package/lib/mjs/components/url/fixtures/comp2.js +21 -0
  2008. package/lib/mjs/components/url/fixtures/index.d.ts +3 -0
  2009. package/lib/mjs/components/url/fixtures/index.js +3 -0
  2010. package/lib/mjs/components/url/fixtures/values.d.ts +2 -0
  2011. package/lib/mjs/components/url/fixtures/values.js +4 -0
  2012. package/lib/mjs/components/well/Well.d.ts +13 -0
  2013. package/lib/mjs/components/well/Well.form.d.ts +3 -0
  2014. package/lib/mjs/components/well/Well.form.js +10 -0
  2015. package/lib/mjs/components/well/Well.js +35 -0
  2016. package/lib/mjs/components/well/editForm/Well.edit.display.d.ts +5 -0
  2017. package/lib/mjs/components/well/editForm/Well.edit.display.js +30 -0
  2018. package/lib/mjs/components/well/fixtures/comp1.d.ts +43 -0
  2019. package/lib/mjs/components/well/fixtures/comp1.js +75 -0
  2020. package/lib/mjs/components/well/fixtures/index.d.ts +2 -0
  2021. package/lib/mjs/components/well/fixtures/index.js +2 -0
  2022. package/lib/mjs/displays/Displays.d.ts +18 -0
  2023. package/lib/mjs/displays/Displays.js +24 -0
  2024. package/lib/mjs/displays/index.d.ts +2 -0
  2025. package/lib/mjs/displays/index.js +2 -0
  2026. package/lib/mjs/formio.embed.d.ts +1 -0
  2027. package/lib/mjs/formio.embed.js +2 -0
  2028. package/lib/mjs/formio.form.d.ts +22 -0
  2029. package/lib/mjs/formio.form.js +138 -0
  2030. package/lib/mjs/i18n.d.ts +13 -0
  2031. package/lib/mjs/i18n.js +14 -0
  2032. package/lib/mjs/index.d.ts +4 -0
  2033. package/lib/mjs/index.js +13 -0
  2034. package/lib/mjs/package.json +3 -0
  2035. package/lib/mjs/pdf.image.d.ts +2 -0
  2036. package/lib/mjs/pdf.image.js +94 -0
  2037. package/lib/mjs/polyfills/ElementPolyfill.d.ts +0 -0
  2038. package/lib/mjs/polyfills/ElementPolyfill.js +338 -0
  2039. package/lib/mjs/polyfills/index.d.ts +1 -0
  2040. package/lib/mjs/polyfills/index.js +2 -0
  2041. package/lib/mjs/providers/Providers.d.ts +64 -0
  2042. package/lib/mjs/providers/Providers.js +29 -0
  2043. package/lib/mjs/providers/address/AddressProvider.d.ts +17 -0
  2044. package/lib/mjs/providers/address/AddressProvider.js +54 -0
  2045. package/lib/mjs/providers/address/AzureAddressProvider.d.ts +12 -0
  2046. package/lib/mjs/providers/address/AzureAddressProvider.js +27 -0
  2047. package/lib/mjs/providers/address/CustomAddressProvider.d.ts +7 -0
  2048. package/lib/mjs/providers/address/CustomAddressProvider.js +22 -0
  2049. package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +18 -0
  2050. package/lib/mjs/providers/address/GoogleAddressProvider.js +110 -0
  2051. package/lib/mjs/providers/address/NominatimAddressProvider.d.ts +11 -0
  2052. package/lib/mjs/providers/address/NominatimAddressProvider.js +27 -0
  2053. package/lib/mjs/providers/address/index.d.ts +6 -0
  2054. package/lib/mjs/providers/address/index.js +10 -0
  2055. package/lib/mjs/providers/auth/index.d.ts +2 -0
  2056. package/lib/mjs/providers/auth/index.js +1 -0
  2057. package/lib/mjs/providers/index.d.ts +2 -0
  2058. package/lib/mjs/providers/index.js +2 -0
  2059. package/lib/mjs/providers/processor/fileProcessor.d.ts +2 -0
  2060. package/lib/mjs/providers/processor/fileProcessor.js +39 -0
  2061. package/lib/mjs/providers/storage/azure.d.ts +8 -0
  2062. package/lib/mjs/providers/storage/azure.js +25 -0
  2063. package/lib/mjs/providers/storage/base64.d.ts +10 -0
  2064. package/lib/mjs/providers/storage/base64.js +30 -0
  2065. package/lib/mjs/providers/storage/dropbox.d.ts +8 -0
  2066. package/lib/mjs/providers/storage/dropbox.js +56 -0
  2067. package/lib/mjs/providers/storage/googleDrive.d.ts +8 -0
  2068. package/lib/mjs/providers/storage/googleDrive.js +55 -0
  2069. package/lib/mjs/providers/storage/index.d.ts +15 -0
  2070. package/lib/mjs/providers/storage/index.js +14 -0
  2071. package/lib/mjs/providers/storage/indexeddb.d.ts +11 -0
  2072. package/lib/mjs/providers/storage/indexeddb.js +119 -0
  2073. package/lib/mjs/providers/storage/s3.d.ts +8 -0
  2074. package/lib/mjs/providers/storage/s3.js +45 -0
  2075. package/lib/mjs/providers/storage/uploadAdapter.d.ts +1 -0
  2076. package/lib/mjs/providers/storage/uploadAdapter.js +55 -0
  2077. package/lib/mjs/providers/storage/url.d.ts +11 -0
  2078. package/lib/mjs/providers/storage/url.js +133 -0
  2079. package/lib/mjs/providers/storage/xhr.d.ts +7 -0
  2080. package/lib/mjs/providers/storage/xhr.js +94 -0
  2081. package/lib/mjs/templates/Templates.d.ts +11 -0
  2082. package/lib/mjs/templates/Templates.js +41 -0
  2083. package/lib/mjs/templates/index.d.ts +4 -0
  2084. package/lib/mjs/templates/index.js +4 -0
  2085. package/lib/mjs/translations/en.d.ts +66 -0
  2086. package/lib/mjs/translations/en.js +65 -0
  2087. package/lib/mjs/utils/ChoicesWrapper.d.ts +37 -0
  2088. package/lib/mjs/utils/ChoicesWrapper.js +169 -0
  2089. package/lib/mjs/utils/Evaluator.d.ts +4 -0
  2090. package/lib/mjs/utils/Evaluator.js +93 -0
  2091. package/lib/mjs/utils/builder.d.ts +22 -0
  2092. package/lib/mjs/utils/builder.js +79 -0
  2093. package/lib/mjs/utils/calendarUtils.d.ts +41 -0
  2094. package/lib/mjs/utils/calendarUtils.js +128 -0
  2095. package/lib/mjs/utils/conditionOperators/ConditionOperator.d.ts +7 -0
  2096. package/lib/mjs/utils/conditionOperators/ConditionOperator.js +23 -0
  2097. package/lib/mjs/utils/conditionOperators/DateGreaterThan.d.ts +13 -0
  2098. package/lib/mjs/utils/conditionOperators/DateGreaterThan.js +31 -0
  2099. package/lib/mjs/utils/conditionOperators/DateGreaterThanOrEqual.d.ts +4 -0
  2100. package/lib/mjs/utils/conditionOperators/DateGreaterThanOrEqual.js +12 -0
  2101. package/lib/mjs/utils/conditionOperators/DateLessThan.d.ts +4 -0
  2102. package/lib/mjs/utils/conditionOperators/DateLessThan.js +12 -0
  2103. package/lib/mjs/utils/conditionOperators/DateLessThanOrEqual.d.ts +4 -0
  2104. package/lib/mjs/utils/conditionOperators/DateLessThanOrEqual.js +12 -0
  2105. package/lib/mjs/utils/conditionOperators/EndsWith.d.ts +7 -0
  2106. package/lib/mjs/utils/conditionOperators/EndsWith.js +13 -0
  2107. package/lib/mjs/utils/conditionOperators/GreaterThan.d.ts +7 -0
  2108. package/lib/mjs/utils/conditionOperators/GreaterThan.js +13 -0
  2109. package/lib/mjs/utils/conditionOperators/GreaterThanOrEqual.d.ts +7 -0
  2110. package/lib/mjs/utils/conditionOperators/GreaterThanOrEqual.js +13 -0
  2111. package/lib/mjs/utils/conditionOperators/Includes.d.ts +7 -0
  2112. package/lib/mjs/utils/conditionOperators/Includes.js +13 -0
  2113. package/lib/mjs/utils/conditionOperators/IsDateEqual.d.ts +4 -0
  2114. package/lib/mjs/utils/conditionOperators/IsDateEqual.js +12 -0
  2115. package/lib/mjs/utils/conditionOperators/IsEmptyValue.d.ts +9 -0
  2116. package/lib/mjs/utils/conditionOperators/IsEmptyValue.js +24 -0
  2117. package/lib/mjs/utils/conditionOperators/IsEqualTo.d.ts +7 -0
  2118. package/lib/mjs/utils/conditionOperators/IsEqualTo.js +24 -0
  2119. package/lib/mjs/utils/conditionOperators/IsNotDateEqual.d.ts +4 -0
  2120. package/lib/mjs/utils/conditionOperators/IsNotDateEqual.js +12 -0
  2121. package/lib/mjs/utils/conditionOperators/IsNotEmptyValue.d.ts +4 -0
  2122. package/lib/mjs/utils/conditionOperators/IsNotEmptyValue.js +12 -0
  2123. package/lib/mjs/utils/conditionOperators/IsNotEqualTo.d.ts +7 -0
  2124. package/lib/mjs/utils/conditionOperators/IsNotEqualTo.js +13 -0
  2125. package/lib/mjs/utils/conditionOperators/LessThan.d.ts +7 -0
  2126. package/lib/mjs/utils/conditionOperators/LessThan.js +13 -0
  2127. package/lib/mjs/utils/conditionOperators/LessThanOrEqual.d.ts +7 -0
  2128. package/lib/mjs/utils/conditionOperators/LessThanOrEqual.js +13 -0
  2129. package/lib/mjs/utils/conditionOperators/NotIncludes.d.ts +4 -0
  2130. package/lib/mjs/utils/conditionOperators/NotIncludes.js +12 -0
  2131. package/lib/mjs/utils/conditionOperators/StartsWith.d.ts +7 -0
  2132. package/lib/mjs/utils/conditionOperators/StartsWith.js +13 -0
  2133. package/lib/mjs/utils/conditionOperators/index.d.ts +7 -0
  2134. package/lib/mjs/utils/conditionOperators/index.js +39 -0
  2135. package/lib/mjs/utils/formUtils.d.ts +173 -0
  2136. package/lib/mjs/utils/formUtils.js +560 -0
  2137. package/lib/mjs/utils/index.d.ts +2 -0
  2138. package/lib/mjs/utils/index.js +5 -0
  2139. package/lib/mjs/utils/jsonlogic/operators.d.ts +1 -0
  2140. package/lib/mjs/utils/jsonlogic/operators.js +262 -0
  2141. package/lib/mjs/utils/utils.d.ts +364 -0
  2142. package/lib/mjs/utils/utils.js +1368 -0
  2143. package/lib/mjs/validator/Rules.d.ts +8 -0
  2144. package/lib/mjs/validator/Rules.js +17 -0
  2145. package/lib/mjs/validator/Validator.d.ts +200 -0
  2146. package/lib/mjs/validator/Validator.js +1081 -0
  2147. package/lib/mjs/validator/conjunctions/index.d.ts +7 -0
  2148. package/lib/mjs/validator/conjunctions/index.js +16 -0
  2149. package/lib/mjs/validator/operators/index.d.ts +7 -0
  2150. package/lib/mjs/validator/operators/index.js +16 -0
  2151. package/lib/mjs/validator/quickRules/index.d.ts +7 -0
  2152. package/lib/mjs/validator/quickRules/index.js +16 -0
  2153. package/lib/mjs/validator/rules/Custom.d.ts +6 -0
  2154. package/lib/mjs/validator/rules/Custom.js +22 -0
  2155. package/lib/mjs/validator/rules/Date.d.ts +6 -0
  2156. package/lib/mjs/validator/rules/Date.js +17 -0
  2157. package/lib/mjs/validator/rules/Day.d.ts +6 -0
  2158. package/lib/mjs/validator/rules/Day.js +50 -0
  2159. package/lib/mjs/validator/rules/Email.d.ts +6 -0
  2160. package/lib/mjs/validator/rules/Email.js +16 -0
  2161. package/lib/mjs/validator/rules/JSON.d.ts +6 -0
  2162. package/lib/mjs/validator/rules/JSON.js +21 -0
  2163. package/lib/mjs/validator/rules/Mask.d.ts +1 -0
  2164. package/lib/mjs/validator/rules/Mask.js +23 -0
  2165. package/lib/mjs/validator/rules/Max.d.ts +6 -0
  2166. package/lib/mjs/validator/rules/Max.js +13 -0
  2167. package/lib/mjs/validator/rules/MaxDate.d.ts +1 -0
  2168. package/lib/mjs/validator/rules/MaxDate.js +25 -0
  2169. package/lib/mjs/validator/rules/MaxLength.d.ts +6 -0
  2170. package/lib/mjs/validator/rules/MaxLength.js +12 -0
  2171. package/lib/mjs/validator/rules/MaxWords.d.ts +6 -0
  2172. package/lib/mjs/validator/rules/MaxWords.js +12 -0
  2173. package/lib/mjs/validator/rules/MaxYear.d.ts +6 -0
  2174. package/lib/mjs/validator/rules/MaxYear.js +14 -0
  2175. package/lib/mjs/validator/rules/Min.d.ts +6 -0
  2176. package/lib/mjs/validator/rules/Min.js +13 -0
  2177. package/lib/mjs/validator/rules/MinDate.d.ts +1 -0
  2178. package/lib/mjs/validator/rules/MinDate.js +21 -0
  2179. package/lib/mjs/validator/rules/MinLength.d.ts +6 -0
  2180. package/lib/mjs/validator/rules/MinLength.js +12 -0
  2181. package/lib/mjs/validator/rules/MinWords.d.ts +6 -0
  2182. package/lib/mjs/validator/rules/MinWords.js +12 -0
  2183. package/lib/mjs/validator/rules/MinYear.d.ts +6 -0
  2184. package/lib/mjs/validator/rules/MinYear.js +14 -0
  2185. package/lib/mjs/validator/rules/Pattern.d.ts +6 -0
  2186. package/lib/mjs/validator/rules/Pattern.js +12 -0
  2187. package/lib/mjs/validator/rules/Required.d.ts +6 -0
  2188. package/lib/mjs/validator/rules/Required.js +9 -0
  2189. package/lib/mjs/validator/rules/Rule.d.ts +8 -0
  2190. package/lib/mjs/validator/rules/Rule.js +10 -0
  2191. package/lib/mjs/validator/rules/Select.d.ts +1 -0
  2192. package/lib/mjs/validator/rules/Select.js +87 -0
  2193. package/lib/mjs/validator/rules/Time.d.ts +1 -0
  2194. package/lib/mjs/validator/rules/Time.js +10 -0
  2195. package/lib/mjs/validator/rules/Unique.d.ts +1 -0
  2196. package/lib/mjs/validator/rules/Unique.js +61 -0
  2197. package/lib/mjs/validator/rules/Url.d.ts +6 -0
  2198. package/lib/mjs/validator/rules/Url.js +15 -0
  2199. package/lib/mjs/validator/rules/index.d.ts +23 -0
  2200. package/lib/mjs/validator/rules/index.js +47 -0
  2201. package/lib/mjs/validator/transformers/index.d.ts +7 -0
  2202. package/lib/mjs/validator/transformers/index.js +16 -0
  2203. package/lib/mjs/validator/valueSources/index.d.ts +7 -0
  2204. package/lib/mjs/validator/valueSources/index.js +16 -0
  2205. package/lib/mjs/widgets/CalendarWidget.d.ts +96 -0
  2206. package/lib/mjs/widgets/CalendarWidget.js +457 -0
  2207. package/lib/mjs/widgets/InputWidget.d.ts +24 -0
  2208. package/lib/mjs/widgets/InputWidget.js +69 -0
  2209. package/lib/mjs/widgets/index.d.ts +7 -0
  2210. package/lib/mjs/widgets/index.js +6 -0
  2211. package/package.json +178 -0
  2212. package/types/builders.d.ts +7 -0
  2213. package/types/components/_classes/component/component.d.ts +174 -0
  2214. package/types/components/_classes/componentmodal/componentmodal.d.ts +31 -0
  2215. package/types/components/_classes/field/field.d.ts +5 -0
  2216. package/types/components/_classes/input/input.d.ts +30 -0
  2217. package/types/components/_classes/multivalue/multivalue.d.ts +16 -0
  2218. package/types/components/_classes/nested/nestedComponent.d.ts +61 -0
  2219. package/types/components/_classes/widgetcomponent/widgetComponent.d.ts +6 -0
  2220. package/types/components/components.d.ts +69 -0
  2221. package/types/components/schema.d.ts +240 -0
  2222. package/types/displays.d.ts +7 -0
  2223. package/types/element.d.ts +45 -0
  2224. package/types/eventEmitter.d.ts +3 -0
  2225. package/types/form.d.ts +18 -0
  2226. package/types/formbuilder.d.ts +6 -0
  2227. package/types/formio.d.ts +119 -0
  2228. package/types/index.d.ts +17 -0
  2229. package/types/providers.d.ts +8 -0
  2230. package/types/rulesEngine/conjunctions.d.ts +7 -0
  2231. package/types/rulesEngine/operators.d.ts +7 -0
  2232. package/types/rulesEngine/quckRules.d.ts +7 -0
  2233. package/types/rulesEngine/rules.d.ts +7 -0
  2234. package/types/rulesEngine/transformers.d.ts +7 -0
  2235. package/types/rulesEngine/valueSources.d.ts +7 -0
  2236. package/types/templates.d.ts +8 -0
  2237. package/types/utils.d.ts +154 -0
  2238. package/types/widgets.d.ts +4 -0
@@ -0,0 +1,3110 @@
1
+ /* globals Quill, ClassicEditor, CKEDITOR */
2
+ import { conformToMask } from '@formio/vanilla-text-mask';
3
+ import NativePromise from 'native-promise-only';
4
+ import tippy from 'tippy.js';
5
+ import _ from 'lodash';
6
+ import isMobile from 'ismobilejs';
7
+ import { Formio } from '../../../Formio';
8
+ import * as FormioUtils from '../../../utils/utils';
9
+ import Validator from '../../../validator/Validator';
10
+ import { fastCloneDeep, boolValue, getComponentPath, isInsideScopingComponent, currentTimezone } from '../../../utils/utils';
11
+ import Element from '../../../Element';
12
+ import ComponentModal from '../componentModal/ComponentModal';
13
+ import Widgets from '../../../widgets';
14
+ import Addons from '../../../addons';
15
+ import { getFormioUploadAdapterPlugin } from '../../../providers/storage/uploadAdapter';
16
+ import enTranslation from '../../../translations/en';
17
+ import Templates from '../../../templates/Templates';
18
+ const isIEBrowser = FormioUtils.getBrowserInfo().ie;
19
+ /**
20
+ * This is the Component class
21
+ which all elements within the FormioForm derive from.
22
+ */
23
+ export default class Component extends Element {
24
+ static schema(...sources) {
25
+ return _.merge({
26
+ /**
27
+ * Determines if this component provides an input.
28
+ */
29
+ input: true,
30
+ /**
31
+ * The data key for this component (how the data is stored in the database).
32
+ */
33
+ key: '',
34
+ /**
35
+ * The input placeholder for this component.
36
+ */
37
+ placeholder: '',
38
+ /**
39
+ * The input prefix
40
+ */
41
+ prefix: '',
42
+ /**
43
+ * The custom CSS class to provide to this component.
44
+ */
45
+ customClass: '',
46
+ /**
47
+ * The input suffix.
48
+ */
49
+ suffix: '',
50
+ /**
51
+ * If this component should allow an array of values to be captured.
52
+ */
53
+ multiple: false,
54
+ /**
55
+ * The default value of this component.
56
+ */
57
+ defaultValue: null,
58
+ /**
59
+ * If the data of this component should be protected (no GET api requests can see the data)
60
+ */
61
+ protected: false,
62
+ /**
63
+ * Validate if the value of this component should be unique within the form.
64
+ */
65
+ unique: false,
66
+ /**
67
+ * If the value of this component should be persisted within the backend api database.
68
+ */
69
+ persistent: true,
70
+ /**
71
+ * Determines if the component should be within the form, but not visible.
72
+ */
73
+ hidden: false,
74
+ /**
75
+ * If the component should be cleared when hidden.
76
+ */
77
+ clearOnHide: true,
78
+ /**
79
+ * This will refresh this component options when this field changes.
80
+ */
81
+ refreshOn: '',
82
+ /**
83
+ * This will redraw the component when this field changes.
84
+ */
85
+ redrawOn: '',
86
+ /**
87
+ * If this component should be included as a column within a submission table.
88
+ */
89
+ tableView: false,
90
+ /**
91
+ * If this component should be rendering in modal.
92
+ */
93
+ modalEdit: false,
94
+ /**
95
+ * The input label provided to this component.
96
+ */
97
+ label: '',
98
+ dataGridLabel: false,
99
+ labelPosition: 'top',
100
+ description: '',
101
+ errorLabel: '',
102
+ tooltip: '',
103
+ hideLabel: false,
104
+ tabindex: '',
105
+ disabled: false,
106
+ autofocus: false,
107
+ dbIndex: false,
108
+ customDefaultValue: '',
109
+ calculateValue: '',
110
+ calculateServer: false,
111
+ widget: null,
112
+ /**
113
+ * Attributes that will be assigned to the input elements of this component.
114
+ */
115
+ attributes: {},
116
+ /**
117
+ * This will perform the validation on either "change" or "blur" of the input element.
118
+ */
119
+ validateOn: 'change',
120
+ /**
121
+ * The validation criteria for this component.
122
+ */
123
+ validate: {
124
+ /**
125
+ * If this component is required.
126
+ */
127
+ required: false,
128
+ /**
129
+ * Custom JavaScript validation.
130
+ */
131
+ custom: '',
132
+ /**
133
+ * If the custom validation should remain private (only the backend will see it and execute it).
134
+ */
135
+ customPrivate: false,
136
+ /**
137
+ * If this component should implement a strict date validation if the Calendar widget is implemented.
138
+ */
139
+ strictDateValidation: false,
140
+ multiple: false,
141
+ unique: false
142
+ },
143
+ /**
144
+ * The simple conditional settings for a component.
145
+ */
146
+ conditional: {
147
+ show: null,
148
+ when: null,
149
+ eq: ''
150
+ },
151
+ overlay: {
152
+ style: '',
153
+ left: '',
154
+ top: '',
155
+ width: '',
156
+ height: '',
157
+ },
158
+ allowCalculateOverride: false,
159
+ encrypted: false,
160
+ showCharCount: false,
161
+ showWordCount: false,
162
+ properties: {},
163
+ allowMultipleMasks: false,
164
+ addons: [],
165
+ }, ...sources);
166
+ }
167
+ /**
168
+ * Return the validator as part of the component.
169
+ *
170
+ * @return {ValidationChecker}
171
+ * @constructor
172
+ */
173
+ static get Validator() {
174
+ return Validator;
175
+ }
176
+ /**
177
+ * Provides a table view for this component. Override if you wish to do something different than using getView
178
+ * method of your instance.
179
+ *
180
+ * @param value
181
+ * @param options
182
+ */
183
+ /* eslint-disable no-unused-vars */
184
+ static tableView(value, options) { }
185
+ /* eslint-enable no-unused-vars */
186
+ /**
187
+ * Initialize a new Component.
188
+ *
189
+ * @param {Object} component - The component JSON you wish to initialize.
190
+ * @param {Object} options - The options for this component.
191
+ * @param {Object} data - The global data submission object this component will belong.
192
+ */
193
+ /* eslint-disable max-statements */
194
+ constructor(component, options, data) {
195
+ super(Object.assign({
196
+ renderMode: 'form',
197
+ attachMode: 'full',
198
+ noDefaults: false
199
+ }, options || {}));
200
+ // Restore the component id.
201
+ if (component && component.id) {
202
+ this.id = component.id;
203
+ }
204
+ /**
205
+ * Determines if this component has a condition assigned to it.
206
+ * @type {null}
207
+ * @private
208
+ */
209
+ this._hasCondition = null;
210
+ /**
211
+ * References to dom elements
212
+ */
213
+ this.refs = {};
214
+ // Allow global override for any component JSON.
215
+ if (component &&
216
+ this.options.components &&
217
+ this.options.components[component.type]) {
218
+ _.merge(component, this.options.components[component.type]);
219
+ }
220
+ /**
221
+ * Set the validator instance.
222
+ */
223
+ this.validator = Validator;
224
+ /**
225
+ * The data path to this specific component instance.
226
+ *
227
+ * @type {string}
228
+ */
229
+ this.path = '';
230
+ /**
231
+ * The Form.io component JSON schema.
232
+ * @type {*}
233
+ */
234
+ this.component = this.mergeSchema(component || {});
235
+ // Add the id to the component.
236
+ this.component.id = this.id;
237
+ this.afterComponentAssign();
238
+ // Save off the original component to be used in logic.
239
+ this.originalComponent = fastCloneDeep(this.component);
240
+ /**
241
+ * If the component has been attached
242
+ */
243
+ this.attached = false;
244
+ /**
245
+ * If the component has been rendered
246
+ */
247
+ this.rendered = false;
248
+ /**
249
+ * The data object in which this component resides.
250
+ * @type {*}
251
+ */
252
+ this._data = data || {};
253
+ /**
254
+ * The existing error that this component has.
255
+ * @type {string}
256
+ */
257
+ this.error = '';
258
+ /**
259
+ * Tool tip text after processing
260
+ * @type {string}
261
+ */
262
+ this.tooltip = '';
263
+ /**
264
+ * The row path of this component.
265
+ * @type {number}
266
+ */
267
+ this.row = this.options.row;
268
+ /**
269
+ * Determines if this component is disabled, or not.
270
+ *
271
+ * @type {boolean}
272
+ */
273
+ this._disabled = boolValue(this.component.disabled) ? this.component.disabled : false;
274
+ /**
275
+ * Points to the root component, usually the FormComponent.
276
+ *
277
+ * @type {Component}
278
+ */
279
+ this.root = this.options.root;
280
+ this.localRoot = this.options.localRoot;
281
+ /**
282
+ * If this input has been input and provided value.
283
+ *
284
+ * @type {boolean}
285
+ */
286
+ this.pristine = true;
287
+ /**
288
+ * Points to the parent component.
289
+ *
290
+ * @type {Component}
291
+ */
292
+ this.parent = this.options.parent;
293
+ this.options.name = this.options.name || 'data';
294
+ /**
295
+ * The validators that are assigned to this component.
296
+ * @type {[string]}
297
+ */
298
+ this.validators = ['required', 'minLength', 'maxLength', 'minWords', 'maxWords', 'custom', 'pattern', 'json', 'mask'];
299
+ this._path = '';
300
+ // Nested forms don't have parents so we need to pass their path in.
301
+ this._parentPath = this.options.parentPath || '';
302
+ // Needs for Nextgen Rules Engine
303
+ this.resetCaches();
304
+ /**
305
+ * Determines if this component is visible, or not.
306
+ */
307
+ this._parentVisible = this.options.hasOwnProperty('parentVisible') ? this.options.parentVisible : true;
308
+ this._visible = this._parentVisible && this.conditionallyVisible(null, data);
309
+ this._parentDisabled = false;
310
+ /**
311
+ * Used to trigger a new change in this component.
312
+ * @type {function} - Call to trigger a change in this component.
313
+ */
314
+ let changes = [];
315
+ let lastChanged = null;
316
+ let triggerArgs = [];
317
+ const _triggerChange = _.debounce((...args) => {
318
+ if (this.root) {
319
+ this.root.changing = false;
320
+ }
321
+ triggerArgs = [];
322
+ if (!args[1] && lastChanged) {
323
+ // Set the changed component if one isn't provided.
324
+ args[1] = lastChanged;
325
+ }
326
+ if (_.isEmpty(args[0]) && lastChanged) {
327
+ // Set the flags if it is empty and lastChanged exists.
328
+ args[0] = lastChanged.flags;
329
+ }
330
+ lastChanged = null;
331
+ args[3] = changes;
332
+ const retVal = this.onChange(...args);
333
+ changes = [];
334
+ return retVal;
335
+ }, 100);
336
+ this.triggerChange = (...args) => {
337
+ if (args[1]) {
338
+ // Make sure that during the debounce that we always track lastChanged component, even if they
339
+ // don't provide one later.
340
+ lastChanged = args[1];
341
+ changes.push(lastChanged);
342
+ }
343
+ if (this.root) {
344
+ this.root.changing = true;
345
+ }
346
+ if (args.length) {
347
+ triggerArgs = args;
348
+ }
349
+ return _triggerChange(...triggerArgs);
350
+ };
351
+ /**
352
+ * Used to trigger a redraw event within this component.
353
+ *
354
+ * @type {Function}
355
+ */
356
+ this.triggerRedraw = _.debounce(this.redraw.bind(this), 100);
357
+ /**
358
+ * list of attached tooltips
359
+ * @type {Array}
360
+ */
361
+ this.tooltips = [];
362
+ /**
363
+ * List of attached addons
364
+ * @type {Array}
365
+ */
366
+ this.addons = [];
367
+ // To force this component to be invalid.
368
+ this.invalid = false;
369
+ if (this.component) {
370
+ this.type = this.component.type;
371
+ if (this.allowData && this.key) {
372
+ this.options.name += `[${this.key}]`;
373
+ // If component is visible or not set to clear on hide, set the default value.
374
+ if (this.visible || !this.component.clearOnHide) {
375
+ if (!this.hasValue()) {
376
+ if (this.shouldAddDefaultValue) {
377
+ this.dataValue = this.defaultValue;
378
+ }
379
+ }
380
+ else {
381
+ // Ensure the dataValue is set.
382
+ /* eslint-disable no-self-assign */
383
+ this.dataValue = this.dataValue;
384
+ /* eslint-enable no-self-assign */
385
+ }
386
+ }
387
+ }
388
+ /**
389
+ * The element information for creating the input element.
390
+ * @type {*}
391
+ */
392
+ this.info = this.elementInfo();
393
+ }
394
+ // Allow anyone to hook into the component creation.
395
+ this.hook('component');
396
+ if (!this.options.skipInit) {
397
+ this.init();
398
+ }
399
+ }
400
+ /* eslint-enable max-statements */
401
+ get data() {
402
+ return this._data;
403
+ }
404
+ set data(value) {
405
+ this._data = value;
406
+ }
407
+ mergeSchema(component = {}) {
408
+ return _.defaultsDeep(component, this.defaultSchema);
409
+ }
410
+ // Allow componets to notify when ready.
411
+ get ready() {
412
+ return NativePromise.resolve(this);
413
+ }
414
+ get isPDFReadOnlyMode() {
415
+ return this.parent &&
416
+ this.parent.form &&
417
+ (this.parent.form.display === 'pdf') &&
418
+ this.options.readOnly;
419
+ }
420
+ get labelInfo() {
421
+ const label = {};
422
+ label.hidden = this.labelIsHidden();
423
+ label.className = '';
424
+ label.labelPosition = this.component.labelPosition;
425
+ label.tooltipClass = `${this.iconClass('question-sign')} text-muted`;
426
+ const isPDFReadOnlyMode = this.isPDFReadOnlyMode;
427
+ if (this.hasInput && this.component.validate && boolValue(this.component.validate.required) && !isPDFReadOnlyMode) {
428
+ label.className += ' field-required';
429
+ }
430
+ if (label.hidden) {
431
+ label.className += ' control-label--hidden';
432
+ }
433
+ if (this.info.attr.id) {
434
+ label.for = this.info.attr.id;
435
+ }
436
+ return label;
437
+ }
438
+ init() {
439
+ this.disabled = this.shouldDisabled;
440
+ this._visible = this.conditionallyVisible(null, null);
441
+ if (this.component.addons?.length) {
442
+ this.component.addons.forEach((addon) => this.createAddon(addon));
443
+ }
444
+ }
445
+ afterComponentAssign() {
446
+ //implement in extended classes
447
+ }
448
+ createAddon(addonConfiguration) {
449
+ const name = addonConfiguration.name;
450
+ if (!name) {
451
+ return;
452
+ }
453
+ const settings = addonConfiguration.settings?.data || {};
454
+ const Addon = Addons[name.value];
455
+ let addon = null;
456
+ if (Addon) {
457
+ const supportedComponents = Addon.info.supportedComponents;
458
+ const supportsThisComponentType = !supportedComponents?.length ||
459
+ supportedComponents.indexOf(this.component.type) !== -1;
460
+ if (supportsThisComponentType) {
461
+ addon = new Addon(settings, this);
462
+ this.addons.push(addon);
463
+ }
464
+ else {
465
+ console.warn(`Addon ${name.label} does not support component of type ${this.component.type}.`);
466
+ }
467
+ }
468
+ return addon;
469
+ }
470
+ teardown() {
471
+ if (this.element) {
472
+ delete this.element.component;
473
+ delete this.element;
474
+ }
475
+ delete this._currentForm;
476
+ delete this.parent;
477
+ delete this.root;
478
+ delete this.triggerChange;
479
+ delete this.triggerRedraw;
480
+ if (this.options) {
481
+ delete this.options.root;
482
+ delete this.options.parent;
483
+ delete this.options.i18next;
484
+ }
485
+ super.teardown();
486
+ }
487
+ destroy(all = false) {
488
+ super.destroy(all);
489
+ this.detach();
490
+ this.addons.forEach((addon) => addon.destroy());
491
+ if (all) {
492
+ this.teardown();
493
+ }
494
+ }
495
+ get shouldDisabled() {
496
+ return this.options.readOnly || this.component.disabled || (this.options.hasOwnProperty('disabled') && this.options.disabled[this.key]);
497
+ }
498
+ get isInputComponent() {
499
+ return !this.component.hasOwnProperty('input') || this.component.input;
500
+ }
501
+ get allowData() {
502
+ return this.hasInput;
503
+ }
504
+ get hasInput() {
505
+ return this.isInputComponent || (this.refs.input && this.refs.input.length);
506
+ }
507
+ get defaultSchema() {
508
+ return Component.schema();
509
+ }
510
+ get key() {
511
+ return _.get(this.component, 'key', '');
512
+ }
513
+ set parentVisible(value) {
514
+ this._parentVisible = value;
515
+ }
516
+ get parentVisible() {
517
+ return this._parentVisible;
518
+ }
519
+ set parentDisabled(value) {
520
+ this._parentDisabled = value;
521
+ }
522
+ get parentDisabled() {
523
+ return this._parentDisabled;
524
+ }
525
+ /**
526
+ *
527
+ * @param value {boolean}
528
+ */
529
+ set visible(value) {
530
+ if (this._visible !== value) {
531
+ this._visible = value;
532
+ this.clearOnHide();
533
+ this.redraw();
534
+ }
535
+ }
536
+ /**
537
+ *
538
+ * @returns {boolean}
539
+ */
540
+ get visible() {
541
+ // Show only if visibility changes or if we are in builder mode or if hidden fields should be shown.
542
+ if (this.builderMode || this.previewMode || this.options.showHiddenFields) {
543
+ return true;
544
+ }
545
+ if (this.options.hide &&
546
+ this.options.hide[this.component.key]) {
547
+ return false;
548
+ }
549
+ if (this.options.show &&
550
+ this.options.show[this.component.key]) {
551
+ return true;
552
+ }
553
+ return this._visible && this._parentVisible;
554
+ }
555
+ get currentForm() {
556
+ return this._currentForm;
557
+ }
558
+ set currentForm(instance) {
559
+ this._currentForm = instance;
560
+ }
561
+ get fullMode() {
562
+ return this.options.attachMode === 'full';
563
+ }
564
+ get builderMode() {
565
+ return this.options.attachMode === 'builder';
566
+ }
567
+ get calculatedPath() {
568
+ console.error('component.calculatedPath was deprecated, use component.path instead.');
569
+ return this.path;
570
+ }
571
+ get labelPosition() {
572
+ return this.component.labelPosition;
573
+ }
574
+ get labelWidth() {
575
+ const width = this.component.labelWidth;
576
+ return width >= 0 ? width : 30;
577
+ }
578
+ get labelMargin() {
579
+ const margin = this.component.labelMargin;
580
+ return margin >= 0 ? margin : 3;
581
+ }
582
+ get isAdvancedLabel() {
583
+ return [
584
+ 'left-left',
585
+ 'left-right',
586
+ 'right-left',
587
+ 'right-right'
588
+ ].includes(this.labelPosition);
589
+ }
590
+ get labelPositions() {
591
+ return this.labelPosition.split('-');
592
+ }
593
+ get skipInEmail() {
594
+ return false;
595
+ }
596
+ rightDirection(direction) {
597
+ if (this.options.condensedMode) {
598
+ return false;
599
+ }
600
+ return direction === 'right';
601
+ }
602
+ getLabelInfo(isCondensed = false) {
603
+ const isRightPosition = this.rightDirection(this.labelPositions[0]);
604
+ const isLeftPosition = this.labelPositions[0] === 'left' || isCondensed;
605
+ const isRightAlign = this.rightDirection(this.labelPositions[1]);
606
+ let contentMargin = '';
607
+ if (this.component.hideLabel) {
608
+ const margin = this.labelWidth + this.labelMargin;
609
+ contentMargin = isRightPosition ? `margin-right: ${margin}%` : '';
610
+ contentMargin = isLeftPosition ? `margin-left: ${margin}%` : '';
611
+ }
612
+ const labelStyles = `
613
+ flex: ${this.labelWidth};
614
+ ${isRightPosition ? 'margin-left' : 'margin-right'}: ${this.labelMargin}%;
615
+ `;
616
+ const contentStyles = `
617
+ flex: ${100 - this.labelWidth - this.labelMargin};
618
+ ${contentMargin};
619
+ ${this.component.hideLabel ? `max-width: ${100 - this.labelWidth - this.labelMargin}` : ''};
620
+ `;
621
+ return {
622
+ isRightPosition,
623
+ isRightAlign,
624
+ labelStyles,
625
+ contentStyles
626
+ };
627
+ }
628
+ /**
629
+ * Returns only the schema that is different from the default.
630
+ *
631
+ * @param schema
632
+ * @param defaultSchema
633
+ */
634
+ getModifiedSchema(schema, defaultSchema, recursion) {
635
+ const modified = {};
636
+ if (!defaultSchema) {
637
+ return schema;
638
+ }
639
+ _.each(schema, (val, key) => {
640
+ if (!_.isArray(val) && _.isObject(val) && defaultSchema.hasOwnProperty(key)) {
641
+ const subModified = this.getModifiedSchema(val, defaultSchema[key], true);
642
+ if (!_.isEmpty(subModified)) {
643
+ modified[key] = subModified;
644
+ }
645
+ }
646
+ else if (_.isArray(val)) {
647
+ if (val.length !== 0 && !_.isEqual(val, defaultSchema[key])) {
648
+ modified[key] = val;
649
+ }
650
+ }
651
+ else if ((!recursion && (key === 'type')) ||
652
+ (!recursion && (key === 'key')) ||
653
+ (!recursion && (key === 'label')) ||
654
+ (!recursion && (key === 'input')) ||
655
+ (!recursion && (key === 'tableView')) ||
656
+ (val !== '' && !defaultSchema.hasOwnProperty(key)) ||
657
+ (val !== '' && val !== defaultSchema[key]) ||
658
+ (defaultSchema[key] && val !== defaultSchema[key])) {
659
+ modified[key] = val;
660
+ }
661
+ });
662
+ return modified;
663
+ }
664
+ /**
665
+ * Returns the JSON schema for this component.
666
+ */
667
+ get schema() {
668
+ return fastCloneDeep(this.getModifiedSchema(_.omit(this.component, 'id'), this.defaultSchema));
669
+ }
670
+ /**
671
+ * Returns true if component is inside DataGrid
672
+ */
673
+ get isInDataGrid() {
674
+ return this.inDataGrid;
675
+ }
676
+ /**
677
+ * Translate a text using the i18n system.
678
+ *
679
+ * @param {string} text - The i18n identifier.
680
+ * @param {Object} params - The i18n parameters to use for translation.
681
+ */
682
+ t(text, params = {}, ...args) {
683
+ if (!text) {
684
+ return '';
685
+ }
686
+ // Use _userInput: true to ignore translations from defaults
687
+ if (text in enTranslation && params._userInput) {
688
+ return text;
689
+ }
690
+ params.data = this.rootValue;
691
+ params.row = this.data;
692
+ params.component = this.component;
693
+ return super.t(text, params, ...args);
694
+ }
695
+ labelIsHidden() {
696
+ return !this.component.label ||
697
+ ((!this.isInDataGrid && this.component.hideLabel) ||
698
+ (this.isInDataGrid && !this.component.dataGridLabel) ||
699
+ this.options.inputsOnly) && !this.builderMode;
700
+ }
701
+ transform(type, value) {
702
+ const frameworkTemplates = this.options.template ? Templates.templates[this.options.template] : Templates.current;
703
+ return frameworkTemplates.hasOwnProperty('transform')
704
+ ? frameworkTemplates.transform(type, value, this)
705
+ : (type, value) => value;
706
+ }
707
+ getTemplate(names, modes) {
708
+ modes = Array.isArray(modes) ? modes : [modes];
709
+ names = Array.isArray(names) ? names : [names];
710
+ if (!modes.includes('form')) {
711
+ modes.push('form');
712
+ }
713
+ let result = null;
714
+ if (this.options.templates) {
715
+ result = this.checkTemplate(this.options.templates, names, modes);
716
+ if (result) {
717
+ return result;
718
+ }
719
+ }
720
+ const frameworkTemplates = this.options.template ? Templates.templates[this.options.template] : Templates.current;
721
+ result = this.checkTemplate(frameworkTemplates, names, modes);
722
+ if (result) {
723
+ return result;
724
+ }
725
+ // Default back to bootstrap if not defined.
726
+ const name = names[names.length - 1];
727
+ const templatesByName = Templates.defaultTemplates[name];
728
+ if (!templatesByName) {
729
+ return `Unknown template: ${name}`;
730
+ }
731
+ const templateByMode = this.checkTemplateMode(templatesByName, modes);
732
+ if (templateByMode) {
733
+ return templateByMode;
734
+ }
735
+ return templatesByName.form;
736
+ }
737
+ checkTemplate(templates, names, modes) {
738
+ for (const name of names) {
739
+ const templatesByName = templates[name];
740
+ if (templatesByName) {
741
+ const templateByMode = this.checkTemplateMode(templatesByName, modes);
742
+ if (templateByMode) {
743
+ return templateByMode;
744
+ }
745
+ }
746
+ }
747
+ return null;
748
+ }
749
+ checkTemplateMode(templatesByName, modes) {
750
+ for (const mode of modes) {
751
+ const templateByMode = templatesByName[mode];
752
+ if (templateByMode) {
753
+ return templateByMode;
754
+ }
755
+ }
756
+ return null;
757
+ }
758
+ getFormattedAttribute(attr) {
759
+ return attr ? this.t(attr, { _userInput: true }).replace(/"/g, '"') : '';
760
+ }
761
+ getFormattedTooltip(tooltipValue) {
762
+ const tooltip = this.interpolate(tooltipValue || '').replace(/(?:\r\n|\r|\n)/g, '<br />');
763
+ return this.getFormattedAttribute(tooltip);
764
+ }
765
+ isHtmlRenderMode() {
766
+ return this.options.renderMode === 'html';
767
+ }
768
+ renderTemplate(name, data = {}, modeOption) {
769
+ // Need to make this fall back to form if renderMode is not found similar to how we search templates.
770
+ const mode = modeOption || this.options.renderMode || 'form';
771
+ data.component = this.component;
772
+ data.self = this;
773
+ data.options = this.options;
774
+ data.readOnly = this.options.readOnly;
775
+ data.iconClass = this.iconClass.bind(this);
776
+ data.size = this.size.bind(this);
777
+ data.t = this.t.bind(this);
778
+ data.transform = this.transform.bind(this);
779
+ data.id = data.id || this.id;
780
+ data.key = data.key || this.key;
781
+ data.value = data.value || this.dataValue;
782
+ data.disabled = this.disabled;
783
+ data.builder = this.builderMode;
784
+ data.render = (...args) => {
785
+ console.warn(`Form.io 'render' template function is deprecated.
786
+ If you need to render template (template A) inside of another template (template B),
787
+ pass pre-compiled template A (use this.renderTemplate('template_A_name') as template context variable for template B`);
788
+ return this.renderTemplate(...args);
789
+ };
790
+ data.label = data.labelInfo || this.labelInfo;
791
+ data.tooltip = this.getFormattedTooltip(this.component.tooltip);
792
+ // Allow more specific template names
793
+ const names = [
794
+ `${name}-${this.component.type}-${this.key}`,
795
+ `${name}-${this.component.type}`,
796
+ `${name}-${this.key}`,
797
+ `${name}`,
798
+ ];
799
+ // Allow template alters.
800
+ return this.hook(`render${name.charAt(0).toUpperCase() + name.substring(1, name.length)}`, this.interpolate(this.getTemplate(names, mode), data), data, mode);
801
+ }
802
+ /**
803
+ * Sanitize an html string.
804
+ *
805
+ * @param string
806
+ * @returns {*}
807
+ */
808
+ sanitize(dirty, forceSanitize, options) {
809
+ // No need to sanitize when generating PDF'S since no users interact with the form.
810
+ if ((!this.shouldSanitizeValue && !forceSanitize) || ((this.options.pdf) && !forceSanitize)) {
811
+ return dirty;
812
+ }
813
+ return FormioUtils.sanitize(dirty, {
814
+ sanitizeConfig: _.merge(this.options?.sanitizeConfig || {}, options || {}),
815
+ });
816
+ }
817
+ /**
818
+ * Render a template string into html.
819
+ *
820
+ * @param template
821
+ * @param data
822
+ * @param actions
823
+ *
824
+ * @return {HTMLElement|String} - The created element or an empty string if template is not specified.
825
+ */
826
+ renderString(template, data) {
827
+ if (!template) {
828
+ return '';
829
+ }
830
+ // Interpolate the template and populate
831
+ return this.interpolate(template, data);
832
+ }
833
+ performInputMapping(input) {
834
+ return input;
835
+ }
836
+ get widget() {
837
+ const settings = this.component.widget;
838
+ if (settings && this.root?.shadowRoot) {
839
+ settings.shadowRoot = this.root.shadowRoot;
840
+ }
841
+ const widget = settings && Widgets[settings.type] ? new Widgets[settings.type](settings, this.component, this) : null;
842
+ return widget;
843
+ }
844
+ getBrowserLanguage() {
845
+ const nav = window.navigator;
846
+ const browserLanguagePropertyKeys = ['language', 'browserLanguage', 'systemLanguage', 'userLanguage'];
847
+ let language;
848
+ // support for HTML 5.1 "navigator.languages"
849
+ if (Array.isArray(nav.languages)) {
850
+ for (let i = 0; i < nav.languages.length; i++) {
851
+ language = nav.languages[i];
852
+ if (language && language.length) {
853
+ return language.split(';')[0];
854
+ }
855
+ }
856
+ }
857
+ // support for other well known properties in browsers
858
+ for (let i = 0; i < browserLanguagePropertyKeys.length; i++) {
859
+ language = nav[browserLanguagePropertyKeys[i]];
860
+ if (language && language.length) {
861
+ return language.split(';')[0];
862
+ }
863
+ }
864
+ return null;
865
+ }
866
+ /**
867
+ * Called before a next and previous page is triggered allowing the components
868
+ * to perform special functions.
869
+ *
870
+ * @return {*}
871
+ */
872
+ beforePage() {
873
+ return NativePromise.resolve(true);
874
+ }
875
+ beforeNext() {
876
+ return this.beforePage(true);
877
+ }
878
+ /**
879
+ * Called before a submission is triggered allowing the components
880
+ * to perform special async functions.
881
+ *
882
+ * @return {*}
883
+ */
884
+ beforeSubmit() {
885
+ return NativePromise.resolve(true);
886
+ }
887
+ /**
888
+ * Return the submission timezone.
889
+ *
890
+ * @return {*}
891
+ */
892
+ get submissionTimezone() {
893
+ this.options.submissionTimezone = this.options.submissionTimezone || _.get(this.root, 'options.submissionTimezone');
894
+ return this.options.submissionTimezone;
895
+ }
896
+ get timezone() {
897
+ return this.getTimezone(this.component);
898
+ }
899
+ getTimezone(settings) {
900
+ if (settings.timezone) {
901
+ return settings.timezone;
902
+ }
903
+ if (settings.displayInTimezone === 'utc') {
904
+ return 'UTC';
905
+ }
906
+ const submissionTimezone = this.submissionTimezone;
907
+ if (submissionTimezone &&
908
+ ((settings.displayInTimezone === 'submission') ||
909
+ ((this.options.pdf || this.options.server) && (settings.displayInTimezone === 'viewer')))) {
910
+ return submissionTimezone;
911
+ }
912
+ // Return current timezone if none are provided.
913
+ return currentTimezone();
914
+ }
915
+ loadRefs(element, refs) {
916
+ for (const ref in refs) {
917
+ const refType = refs[ref];
918
+ const isString = typeof refType === 'string';
919
+ const selector = isString && refType.includes('scope') ? `:scope > [ref="${ref}"]` : `[ref="${ref}"]`;
920
+ if (isString && refType.startsWith('single')) {
921
+ this.refs[ref] = element.querySelector(selector);
922
+ }
923
+ else {
924
+ this.refs[ref] = element.querySelectorAll(selector);
925
+ }
926
+ }
927
+ }
928
+ setOpenModalElement(template) {
929
+ this.componentModal.setOpenModalElement(template || this.getModalPreviewTemplate());
930
+ }
931
+ getModalPreviewTemplate() {
932
+ const dataValue = this.component.type === 'password' ? this.dataValue.replace(/./g, '•') : this.dataValue;
933
+ const message = this.error ? {
934
+ level: 'error',
935
+ message: this.error.message,
936
+ } : '';
937
+ let modalLabel;
938
+ if (this.hasInput && this.component.validate?.required && !this.isPDFReadOnlyMode) {
939
+ modalLabel = { className: 'field-required' };
940
+ }
941
+ return this.renderTemplate('modalPreview', {
942
+ previewText: this.getValueAsString(dataValue, { modalPreview: true }) || this.t('Click to set value'),
943
+ messages: message && this.renderTemplate('message', message),
944
+ labelInfo: modalLabel,
945
+ });
946
+ }
947
+ build(element) {
948
+ element = element || this.element;
949
+ this.empty(element);
950
+ this.setContent(element, this.render());
951
+ return this.attach(element);
952
+ }
953
+ get hasModalSaveButton() {
954
+ return true;
955
+ }
956
+ render(children = `Unknown component: ${this.component.type}`, topLevel = false) {
957
+ const isVisible = this.visible;
958
+ this.rendered = true;
959
+ if (!this.builderMode && !this.previewMode && this.component.modalEdit) {
960
+ return ComponentModal.render(this, {
961
+ visible: isVisible,
962
+ showSaveButton: this.hasModalSaveButton,
963
+ id: this.id,
964
+ classes: this.className,
965
+ styles: this.customStyle,
966
+ children
967
+ }, topLevel);
968
+ }
969
+ else {
970
+ return this.renderTemplate('component', {
971
+ visible: isVisible,
972
+ id: this.id,
973
+ classes: this.className,
974
+ styles: this.customStyle,
975
+ children
976
+ }, topLevel);
977
+ }
978
+ }
979
+ attachTooltips(toolTipsRefs) {
980
+ toolTipsRefs?.forEach((tooltip, index) => {
981
+ if (tooltip) {
982
+ const tooltipAttribute = tooltip.getAttribute('data-tooltip');
983
+ const tooltipDataTitle = tooltip.getAttribute('data-title');
984
+ const tooltipText = this.interpolate(tooltipDataTitle || tooltipAttribute)
985
+ .replace(/(?:\r\n|\r|\n)/g, '<br />');
986
+ this.tooltips[index] = tippy(tooltip, {
987
+ allowHTML: true,
988
+ trigger: 'mouseenter click focus',
989
+ placement: 'right',
990
+ zIndex: 10000,
991
+ interactive: true,
992
+ content: this.t(tooltipText, { _userInput: true }),
993
+ });
994
+ }
995
+ });
996
+ }
997
+ createComponentModal(element, modalShouldBeOpened, currentValue) {
998
+ return new ComponentModal(this, element, modalShouldBeOpened, currentValue);
999
+ }
1000
+ attach(element) {
1001
+ if (!this.builderMode && !this.previewMode && this.component.modalEdit) {
1002
+ const modalShouldBeOpened = this.componentModal ? this.componentModal.isOpened : false;
1003
+ const currentValue = modalShouldBeOpened ? this.componentModal.currentValue : this.dataValue;
1004
+ const openModalTemplate = this.componentModal && modalShouldBeOpened
1005
+ ? this.componentModal.openModalTemplate
1006
+ : null;
1007
+ this.componentModal = this.createComponentModal(element, modalShouldBeOpened, currentValue);
1008
+ this.setOpenModalElement(openModalTemplate);
1009
+ }
1010
+ this.attached = true;
1011
+ this.setElement(element);
1012
+ element.component = this;
1013
+ // If this already has an id, get it from the dom. If SSR, it could be different from the initiated id.
1014
+ if (this.element.id) {
1015
+ this.id = this.element.id;
1016
+ this.component.id = this.id;
1017
+ }
1018
+ this.loadRefs(element, {
1019
+ messageContainer: 'single',
1020
+ tooltip: 'multiple'
1021
+ });
1022
+ this.attachTooltips(this.refs.tooltip);
1023
+ // Attach logic.
1024
+ this.attachLogic();
1025
+ this.autofocus();
1026
+ // Allow global attach.
1027
+ this.hook('attachComponent', element, this);
1028
+ // Allow attach per component type.
1029
+ const type = this.component.type;
1030
+ if (type) {
1031
+ this.hook(`attach${type.charAt(0).toUpperCase() + type.substring(1, type.length)}`, element, this);
1032
+ }
1033
+ this.restoreFocus();
1034
+ this.addons.forEach((addon) => addon.attach(element));
1035
+ return NativePromise.resolve();
1036
+ }
1037
+ restoreFocus() {
1038
+ const isFocused = this.root?.focusedComponent?.path === this.path;
1039
+ if (isFocused) {
1040
+ this.loadRefs(this.element, { input: 'multiple' });
1041
+ this.focus(this.root.currentSelection?.index);
1042
+ this.restoreCaretPosition();
1043
+ }
1044
+ }
1045
+ addShortcut(element, shortcut) {
1046
+ // Avoid infinite recursion.
1047
+ if (!element || !this.root || (this.root === this)) {
1048
+ return;
1049
+ }
1050
+ if (!shortcut) {
1051
+ shortcut = this.component.shortcut;
1052
+ }
1053
+ this.root.addShortcut(element, shortcut);
1054
+ }
1055
+ removeShortcut(element, shortcut) {
1056
+ // Avoid infinite recursion.
1057
+ if (!element || (this.root === this)) {
1058
+ return;
1059
+ }
1060
+ if (!shortcut) {
1061
+ shortcut = this.component.shortcut;
1062
+ }
1063
+ this.root.removeShortcut(element, shortcut);
1064
+ }
1065
+ /**
1066
+ * Remove all event handlers.
1067
+ */
1068
+ detach() {
1069
+ // First iterate through each ref and delete the component so there are no dangling component references.
1070
+ _.each(this.refs, (ref) => {
1071
+ if (typeof ref === NodeList) {
1072
+ ref.forEach((elem) => {
1073
+ delete elem.component;
1074
+ });
1075
+ }
1076
+ else if (ref) {
1077
+ delete ref.component;
1078
+ }
1079
+ });
1080
+ this.refs = {};
1081
+ this.removeEventListeners();
1082
+ this.detachLogic();
1083
+ if (this.tooltip) {
1084
+ this.tooltip.destroy();
1085
+ }
1086
+ }
1087
+ checkRefresh(refreshData, changed, flags) {
1088
+ const changePath = _.get(changed, 'instance.path', false);
1089
+ // Don't let components change themselves.
1090
+ if (changePath && this.path === changePath) {
1091
+ return;
1092
+ }
1093
+ if (refreshData === 'data') {
1094
+ this.refresh(this.data, changed, flags);
1095
+ }
1096
+ else if ((changePath && getComponentPath(changed.instance) === refreshData) && changed && changed.instance &&
1097
+ // Make sure the changed component is not in a different "context". Solves issues where refreshOn being set
1098
+ // in fields inside EditGrids could alter their state from other rows (which is bad).
1099
+ this.inContext(changed.instance)) {
1100
+ this.refresh(changed.value, changed, flags);
1101
+ }
1102
+ }
1103
+ checkRefreshOn(changes, flags = {}) {
1104
+ changes = changes || [];
1105
+ if (flags.noRefresh) {
1106
+ return;
1107
+ }
1108
+ if (!changes.length && flags.changed) {
1109
+ changes = [flags.changed];
1110
+ }
1111
+ const refreshOn = flags.fromBlur ? this.component.refreshOnBlur : this.component.refreshOn || this.component.redrawOn;
1112
+ // If they wish to refresh on a value, then add that here.
1113
+ if (refreshOn) {
1114
+ if (Array.isArray(refreshOn)) {
1115
+ refreshOn.forEach(refreshData => changes.forEach(changed => this.checkRefresh(refreshData, changed, flags)));
1116
+ }
1117
+ else {
1118
+ changes.forEach(changed => this.checkRefresh(refreshOn, changed, flags));
1119
+ }
1120
+ }
1121
+ }
1122
+ /**
1123
+ * Refreshes the component with a new value.
1124
+ *
1125
+ * @param value
1126
+ */
1127
+ refresh(value) {
1128
+ if (this.hasOwnProperty('refreshOnValue')) {
1129
+ this.refreshOnChanged = !_.isEqual(value, this.refreshOnValue);
1130
+ }
1131
+ else {
1132
+ this.refreshOnChanged = true;
1133
+ }
1134
+ this.refreshOnValue = fastCloneDeep(value);
1135
+ if (this.refreshOnChanged) {
1136
+ if (this.component.clearOnRefresh) {
1137
+ this.setValue(null);
1138
+ }
1139
+ this.triggerRedraw();
1140
+ }
1141
+ }
1142
+ /**
1143
+ * Checks to see if a separate component is in the "context" of this component. This is determined by first checking
1144
+ * if they share the same "data" object. It will then walk up the parent tree and compare its parents data objects
1145
+ * with the components data and returns true if they are in the same context.
1146
+ *
1147
+ * Different rows of the same EditGrid, for example, are in different contexts.
1148
+ *
1149
+ * @param component
1150
+ */
1151
+ inContext(component) {
1152
+ if (component.data === this.data) {
1153
+ return true;
1154
+ }
1155
+ let parent = this.parent;
1156
+ while (parent) {
1157
+ if (parent.data === component.data) {
1158
+ return true;
1159
+ }
1160
+ parent = parent.parent;
1161
+ }
1162
+ return false;
1163
+ }
1164
+ get viewOnly() {
1165
+ return this.options.readOnly && this.options.viewAsHtml;
1166
+ }
1167
+ setElement(element) {
1168
+ if (this.element) {
1169
+ delete this.element.component;
1170
+ delete this.element;
1171
+ }
1172
+ this.element = element;
1173
+ }
1174
+ createViewOnlyElement() {
1175
+ this.setElement(this.ce('dl', {
1176
+ id: this.id
1177
+ }));
1178
+ if (this.element) {
1179
+ // Ensure you can get the component info from the element.
1180
+ this.element.component = this;
1181
+ }
1182
+ return this.element;
1183
+ }
1184
+ get defaultViewOnlyValue() {
1185
+ return '-';
1186
+ }
1187
+ /**
1188
+ * Uses the widget to determine the output string.
1189
+ *
1190
+ * @param value
1191
+ * @return {*}
1192
+ */
1193
+ getWidgetValueAsString(value, options) {
1194
+ const noInputWidget = !this.refs.input || !this.refs.input[0] || !this.refs.input[0].widget;
1195
+ if (!value || noInputWidget) {
1196
+ if (!this.widget || !value) {
1197
+ return value;
1198
+ }
1199
+ else {
1200
+ return this.widget.getValueAsString(value);
1201
+ }
1202
+ }
1203
+ if (Array.isArray(value)) {
1204
+ const values = [];
1205
+ value.forEach((val, index) => {
1206
+ const widget = this.refs.input[index] && this.refs.input[index].widget;
1207
+ if (widget) {
1208
+ values.push(widget.getValueAsString(val, options));
1209
+ }
1210
+ });
1211
+ return values;
1212
+ }
1213
+ const widget = this.refs.input[0].widget;
1214
+ return widget.getValueAsString(value, options);
1215
+ }
1216
+ getValueAsString(value, options) {
1217
+ if (!value) {
1218
+ return '';
1219
+ }
1220
+ value = this.getWidgetValueAsString(value, options);
1221
+ if (Array.isArray(value)) {
1222
+ return value.join(', ');
1223
+ }
1224
+ if (_.isPlainObject(value)) {
1225
+ return JSON.stringify(value);
1226
+ }
1227
+ if (value === null || value === undefined) {
1228
+ return '';
1229
+ }
1230
+ const stringValue = value.toString();
1231
+ return this.sanitize(stringValue);
1232
+ }
1233
+ getView(value, options) {
1234
+ if (this.component.protected) {
1235
+ return '--- PROTECTED ---';
1236
+ }
1237
+ return this.getValueAsString(value, options);
1238
+ }
1239
+ updateItems(...args) {
1240
+ this.restoreValue();
1241
+ this.onChange(...args);
1242
+ }
1243
+ /**
1244
+ * @param {*} data
1245
+ * @param {boolean} [forceUseValue=false] - if true, return 'value' property of the data
1246
+ * @return {*}
1247
+ */
1248
+ itemValue(data, forceUseValue = false) {
1249
+ if (_.isObject(data) && !_.isArray(data)) {
1250
+ if (this.valueProperty) {
1251
+ return _.get(data, this.valueProperty);
1252
+ }
1253
+ if (forceUseValue) {
1254
+ return data.value;
1255
+ }
1256
+ }
1257
+ return data;
1258
+ }
1259
+ itemValueForHTMLMode(value) {
1260
+ if (Array.isArray(value)) {
1261
+ const values = value.map(item => Array.isArray(item) ? this.itemValueForHTMLMode(item) : this.itemValue(item));
1262
+ return values.join(', ');
1263
+ }
1264
+ return this.itemValue(value);
1265
+ }
1266
+ createModal(element, attr, confirm) {
1267
+ const dialog = this.ce('div', attr || {});
1268
+ this.setContent(dialog, this.renderTemplate('dialog'));
1269
+ // Add refs to dialog, not "this".
1270
+ dialog.refs = {};
1271
+ this.loadRefs.call(dialog, dialog, {
1272
+ dialogOverlay: 'single',
1273
+ dialogContents: 'single',
1274
+ dialogClose: 'single',
1275
+ });
1276
+ dialog.refs.dialogContents.appendChild(element);
1277
+ document.body.appendChild(dialog);
1278
+ document.body.classList.add('modal-open');
1279
+ dialog.close = () => {
1280
+ document.body.classList.remove('modal-open');
1281
+ dialog.dispatchEvent(new CustomEvent('close'));
1282
+ };
1283
+ this.addEventListener(dialog, 'close', () => this.removeChildFrom(dialog, document.body));
1284
+ const close = (event) => {
1285
+ event.preventDefault();
1286
+ dialog.close();
1287
+ };
1288
+ const handleCloseClick = (e) => {
1289
+ if (confirm) {
1290
+ confirm().then(() => close(e))
1291
+ .catch(() => { });
1292
+ }
1293
+ else {
1294
+ close(e);
1295
+ }
1296
+ };
1297
+ this.addEventListener(dialog.refs.dialogOverlay, 'click', handleCloseClick);
1298
+ this.addEventListener(dialog.refs.dialogClose, 'click', handleCloseClick);
1299
+ return dialog;
1300
+ }
1301
+ get optimizeRedraw() {
1302
+ if (this.options.optimizeRedraw && this.element && !this.visible) {
1303
+ this.addClass(this.element, 'formio-removed');
1304
+ return true;
1305
+ }
1306
+ return false;
1307
+ }
1308
+ /**
1309
+ * Retrieves the CSS class name of this component.
1310
+ * @returns {string} - The class name of this component.
1311
+ */
1312
+ get className() {
1313
+ let className = this.hasInput ? `${this.transform('class', 'form-group')} has-feedback ` : '';
1314
+ className += `formio-component formio-component-${this.component.type} `;
1315
+ // TODO: find proper way to avoid overriding of default type-based component styles
1316
+ if (this.key && this.key !== 'form') {
1317
+ className += `formio-component-${this.key} `;
1318
+ }
1319
+ if (this.component.multiple) {
1320
+ className += 'formio-component-multiple ';
1321
+ }
1322
+ if (this.component.customClass) {
1323
+ className += this.component.customClass;
1324
+ }
1325
+ if (this.hasInput && this.component.validate && boolValue(this.component.validate.required)) {
1326
+ className += ' required';
1327
+ }
1328
+ if (this.labelIsHidden()) {
1329
+ className += ' formio-component-label-hidden';
1330
+ }
1331
+ if (!this.visible) {
1332
+ className += ' formio-hidden';
1333
+ }
1334
+ return className;
1335
+ }
1336
+ /**
1337
+ * Build the custom style from the layout values
1338
+ * @return {string} - The custom style
1339
+ */
1340
+ get customStyle() {
1341
+ let customCSS = '';
1342
+ _.each(this.component.style, (value, key) => {
1343
+ if (value !== '') {
1344
+ customCSS += `${key}:${value};`;
1345
+ }
1346
+ });
1347
+ return customCSS;
1348
+ }
1349
+ get isMobile() {
1350
+ return isMobile();
1351
+ }
1352
+ /**
1353
+ * Returns the outside wrapping element of this component.
1354
+ * @returns {HTMLElement}
1355
+ */
1356
+ getElement() {
1357
+ return this.element;
1358
+ }
1359
+ /**
1360
+ * Create an evaluation context for all script executions and interpolations.
1361
+ *
1362
+ * @param additional
1363
+ * @return {*}
1364
+ */
1365
+ evalContext(additional) {
1366
+ return super.evalContext(Object.assign({
1367
+ component: this.component,
1368
+ row: this.data,
1369
+ rowIndex: this.rowIndex,
1370
+ data: this.rootValue,
1371
+ iconClass: this.iconClass.bind(this),
1372
+ // Bind the translate function to the data context of any interpolated string.
1373
+ // It is useful to translate strings in different scenarions (eg: custom edit grid templates, custom error messages etc.)
1374
+ // and desirable to be publicly available rather than calling the internal {instance.t} function in the template string.
1375
+ t: this.t.bind(this),
1376
+ submission: (this.root ? this.root._submission : {
1377
+ data: this.rootValue
1378
+ }),
1379
+ form: this.root ? this.root._form : {},
1380
+ options: this.options,
1381
+ }, additional));
1382
+ }
1383
+ /**
1384
+ * Sets the pristine flag for this component.
1385
+ *
1386
+ * @param pristine {boolean} - TRUE to make pristine, FALSE not pristine.
1387
+ */
1388
+ setPristine(pristine) {
1389
+ this.pristine = pristine;
1390
+ }
1391
+ get isPristine() {
1392
+ return this.pristine;
1393
+ }
1394
+ setDirty(dirty) {
1395
+ this.dirty = dirty;
1396
+ }
1397
+ get isDirty() {
1398
+ return this.dirty;
1399
+ }
1400
+ /**
1401
+ * Removes a value out of the data array and rebuild the rows.
1402
+ * @param {number} index - The index of the data element to remove.
1403
+ */
1404
+ removeValue(index) {
1405
+ this.splice(index);
1406
+ this.redraw();
1407
+ this.restoreValue();
1408
+ this.triggerRootChange();
1409
+ }
1410
+ iconClass(name, spinning) {
1411
+ const iconset = this.options.iconset || Templates.current.defaultIconset || 'fa';
1412
+ return Templates.current.hasOwnProperty('iconClass')
1413
+ ? Templates.current.iconClass(iconset, name, spinning)
1414
+ : this.options.iconset === 'fa' ? Templates.defaultTemplates.iconClass(iconset, name, spinning) : name;
1415
+ }
1416
+ size(size) {
1417
+ return Templates.current.hasOwnProperty('size')
1418
+ ? Templates.current.size(size)
1419
+ : size;
1420
+ }
1421
+ /**
1422
+ * The readible name for this component.
1423
+ * @returns {string} - The name of the component.
1424
+ */
1425
+ get name() {
1426
+ return this.t(this.component.label || this.component.placeholder || this.key, { _userInput: true });
1427
+ }
1428
+ /**
1429
+ * Returns the error label for this component.
1430
+ * @return {*}
1431
+ */
1432
+ get errorLabel() {
1433
+ return this.t(this.component.errorLabel
1434
+ || this.component.label
1435
+ || this.component.placeholder
1436
+ || this.key);
1437
+ }
1438
+ /**
1439
+ * Get the error message provided a certain type of error.
1440
+ * @param type
1441
+ * @return {*}
1442
+ */
1443
+ errorMessage(type) {
1444
+ return (this.component.errors && this.component.errors[type]) ? this.component.errors[type] : type;
1445
+ }
1446
+ setContent(element, content, forceSanitize, sanitizeOptions) {
1447
+ if (element instanceof HTMLElement) {
1448
+ element.innerHTML = this.sanitize(content, forceSanitize, sanitizeOptions);
1449
+ return true;
1450
+ }
1451
+ return false;
1452
+ }
1453
+ restoreCaretPosition() {
1454
+ if (this.root?.currentSelection) {
1455
+ if (this.refs.input?.length) {
1456
+ const { selection, index } = this.root.currentSelection;
1457
+ let input = this.refs.input[index];
1458
+ const isInputRangeSelectable = /text|search|password|tel|url/i.test(input.type || '');
1459
+ if (input) {
1460
+ if (isInputRangeSelectable) {
1461
+ input.setSelectionRange(...selection);
1462
+ }
1463
+ }
1464
+ else {
1465
+ input = this.refs.input[this.refs.input.length];
1466
+ const lastCharacter = input.value?.length || 0;
1467
+ if (isInputRangeSelectable) {
1468
+ input.setSelectionRange(lastCharacter, lastCharacter);
1469
+ }
1470
+ }
1471
+ }
1472
+ }
1473
+ }
1474
+ redraw() {
1475
+ // Don't bother if we have not built yet.
1476
+ if (!this.element || !this.element.parentNode || this.optimizeRedraw) {
1477
+ // Return a non-resolving promise.
1478
+ return NativePromise.resolve();
1479
+ }
1480
+ this.detach();
1481
+ this.emit('redraw');
1482
+ // Since we are going to replace the element, we need to know it's position so we can find it in the parent's children.
1483
+ const parent = this.element.parentNode;
1484
+ const index = Array.prototype.indexOf.call(parent.children, this.element);
1485
+ this.element.outerHTML = this.sanitize(this.render());
1486
+ this.setElement(parent.children[index]);
1487
+ return this.attach(this.element);
1488
+ }
1489
+ rebuild() {
1490
+ this.destroy();
1491
+ this.init();
1492
+ this.visible = this.conditionallyVisible(null, null);
1493
+ return this.redraw();
1494
+ }
1495
+ removeEventListeners() {
1496
+ super.removeEventListeners();
1497
+ this.tooltips.forEach(tooltip => tooltip.destroy());
1498
+ this.tooltips = [];
1499
+ }
1500
+ hasClass(element, className) {
1501
+ if (!element) {
1502
+ return;
1503
+ }
1504
+ return super.hasClass(element, this.transform('class', className));
1505
+ }
1506
+ addClass(element, className) {
1507
+ if (!element) {
1508
+ return;
1509
+ }
1510
+ return super.addClass(element, this.transform('class', className));
1511
+ }
1512
+ removeClass(element, className) {
1513
+ if (!element) {
1514
+ return;
1515
+ }
1516
+ return super.removeClass(element, this.transform('class', className));
1517
+ }
1518
+ /**
1519
+ * Determines if this component has a condition defined.
1520
+ *
1521
+ * @return {null}
1522
+ */
1523
+ hasCondition() {
1524
+ if (this._hasCondition !== null) {
1525
+ return this._hasCondition;
1526
+ }
1527
+ this._hasCondition = FormioUtils.hasCondition(this.component);
1528
+ return this._hasCondition;
1529
+ }
1530
+ /**
1531
+ * Check if this component is conditionally visible.
1532
+ *
1533
+ * @param data
1534
+ * @return {boolean}
1535
+ */
1536
+ conditionallyVisible(data, row) {
1537
+ data = data || this.rootValue;
1538
+ row = row || this.data;
1539
+ if (this.builderMode || this.previewMode || !this.hasCondition()) {
1540
+ return !this.component.hidden;
1541
+ }
1542
+ data = data || (this.root ? this.root.data : {});
1543
+ return this.checkCondition(row, data);
1544
+ }
1545
+ /**
1546
+ * Checks the condition of this component.
1547
+ *
1548
+ * TODO: Switch row and data parameters to be consistent with other methods.
1549
+ *
1550
+ * @param row - The row contextual data.
1551
+ * @param data - The global data object.
1552
+ * @return {boolean} - True if the condition applies to this component.
1553
+ */
1554
+ checkCondition(row, data) {
1555
+ return FormioUtils.checkCondition(this.component, row || this.data, data || this.rootValue, this.root ? this.root._form : {}, this);
1556
+ }
1557
+ /**
1558
+ * Check for conditionals and hide/show the element based on those conditions.
1559
+ */
1560
+ checkComponentConditions(data, flags, row) {
1561
+ data = data || this.rootValue;
1562
+ flags = flags || {};
1563
+ row = row || this.data;
1564
+ if (!this.builderMode & !this.previewMode && this.fieldLogic(data, row)) {
1565
+ this.redraw();
1566
+ }
1567
+ // Check advanced conditions
1568
+ const visible = this.conditionallyVisible(data, row);
1569
+ if (this.visible !== visible) {
1570
+ this.visible = visible;
1571
+ }
1572
+ return visible;
1573
+ }
1574
+ /**
1575
+ * Checks conditions for this component and any sub components.
1576
+ * @param args
1577
+ * @return {boolean}
1578
+ */
1579
+ checkConditions(data, flags, row) {
1580
+ data = data || this.rootValue;
1581
+ flags = flags || {};
1582
+ row = row || this.data;
1583
+ return this.checkComponentConditions(data, flags, row);
1584
+ }
1585
+ get logic() {
1586
+ return this.component.logic || [];
1587
+ }
1588
+ /**
1589
+ * Check all triggers and apply necessary actions.
1590
+ *
1591
+ * @param data
1592
+ */
1593
+ fieldLogic(data, row) {
1594
+ data = data || this.rootValue;
1595
+ row = row || this.data;
1596
+ const logics = this.logic;
1597
+ // If there aren't logic, don't go further.
1598
+ if (logics.length === 0) {
1599
+ return;
1600
+ }
1601
+ const newComponent = fastCloneDeep(this.originalComponent);
1602
+ let changed = logics.reduce((changed, logic) => {
1603
+ const result = FormioUtils.checkTrigger(newComponent, logic.trigger, row, data, this.root ? this.root._form : {}, this);
1604
+ return (result ? this.applyActions(newComponent, logic.actions, result, row, data) : false) || changed;
1605
+ }, false);
1606
+ // If component definition changed, replace and mark as changed.
1607
+ if (!_.isEqual(this.component, newComponent)) {
1608
+ this.component = newComponent;
1609
+ changed = true;
1610
+ const disabled = this.shouldDisabled;
1611
+ // Change disabled state if it has changed
1612
+ if (this.disabled !== disabled) {
1613
+ this.disabled = disabled;
1614
+ }
1615
+ }
1616
+ return changed;
1617
+ }
1618
+ isIE() {
1619
+ if (typeof window === 'undefined') {
1620
+ return false;
1621
+ }
1622
+ const userAgent = window.navigator.userAgent;
1623
+ const msie = userAgent.indexOf('MSIE ');
1624
+ if (msie > 0) {
1625
+ // IE 10 or older => return version number
1626
+ return parseInt(userAgent.substring(msie + 5, userAgent.indexOf('.', msie)), 10);
1627
+ }
1628
+ const trident = userAgent.indexOf('Trident/');
1629
+ if (trident > 0) {
1630
+ // IE 11 => return version number
1631
+ const rv = userAgent.indexOf('rv:');
1632
+ return parseInt(userAgent.substring(rv + 3, userAgent.indexOf('.', rv)), 10);
1633
+ }
1634
+ const edge = userAgent.indexOf('Edge/');
1635
+ if (edge > 0) {
1636
+ // IE 12 (aka Edge) => return version number
1637
+ return parseInt(userAgent.substring(edge + 5, userAgent.indexOf('.', edge)), 10);
1638
+ }
1639
+ // other browser
1640
+ return false;
1641
+ }
1642
+ defineActionValue(action, argsObject) {
1643
+ return this.evaluate(action.value, argsObject, 'value');
1644
+ }
1645
+ applyActions(newComponent, actions, result, row, data) {
1646
+ data = data || this.rootValue;
1647
+ row = row || this.data;
1648
+ return actions.reduce((changed, action) => {
1649
+ switch (action.type) {
1650
+ case 'property': {
1651
+ FormioUtils.setActionProperty(newComponent, action, result, row, data, this);
1652
+ const property = action.property.value;
1653
+ if (!_.isEqual(_.get(this.component, property), _.get(newComponent, property))) {
1654
+ changed = true;
1655
+ }
1656
+ break;
1657
+ }
1658
+ case 'value': {
1659
+ const oldValue = this.getValue();
1660
+ const newValue = this.defineActionValue(action, {
1661
+ value: _.clone(oldValue),
1662
+ data,
1663
+ row,
1664
+ component: newComponent,
1665
+ result,
1666
+ });
1667
+ if (!_.isEqual(oldValue, newValue) && !(this.component.clearOnHide && !this.visible)) {
1668
+ this.setValue(newValue);
1669
+ if (this.viewOnly) {
1670
+ this.dataValue = newValue;
1671
+ }
1672
+ changed = true;
1673
+ }
1674
+ break;
1675
+ }
1676
+ case 'mergeComponentSchema': {
1677
+ const schema = this.evaluate(action.schemaDefinition, {
1678
+ value: _.clone(this.getValue()),
1679
+ data,
1680
+ row,
1681
+ component: newComponent,
1682
+ result,
1683
+ }, 'schema');
1684
+ _.assign(newComponent, schema);
1685
+ if (!_.isEqual(this.component, newComponent)) {
1686
+ changed = true;
1687
+ }
1688
+ break;
1689
+ }
1690
+ case 'customAction': {
1691
+ const oldValue = this.getValue();
1692
+ const newValue = this.evaluate(action.customAction, {
1693
+ value: _.clone(oldValue),
1694
+ data,
1695
+ row,
1696
+ input: oldValue,
1697
+ component: newComponent,
1698
+ result,
1699
+ }, 'value');
1700
+ if (!_.isEqual(oldValue, newValue) && !(this.component.clearOnHide && !this.visible)) {
1701
+ this.setValue(newValue);
1702
+ if (this.viewOnly) {
1703
+ this.dataValue = newValue;
1704
+ }
1705
+ changed = true;
1706
+ }
1707
+ break;
1708
+ }
1709
+ }
1710
+ return changed;
1711
+ }, false);
1712
+ }
1713
+ // Deprecated
1714
+ addInputError(message, dirty, elements) {
1715
+ this.addMessages(message);
1716
+ this.setErrorClasses(elements, dirty, !!message);
1717
+ }
1718
+ // Deprecated
1719
+ removeInputError(elements) {
1720
+ this.setErrorClasses(elements, true, false);
1721
+ }
1722
+ /**
1723
+ * Add a new input error to this element.
1724
+ *
1725
+ * @param message
1726
+ * @param dirty
1727
+ */
1728
+ addMessages(messages) {
1729
+ if (!messages) {
1730
+ return;
1731
+ }
1732
+ // Standardize on array of objects for message.
1733
+ if (typeof messages === 'string') {
1734
+ messages = {
1735
+ messages,
1736
+ level: 'error',
1737
+ };
1738
+ }
1739
+ if (!Array.isArray(messages)) {
1740
+ messages = [messages];
1741
+ }
1742
+ messages = _.uniqBy(messages, message => message.message);
1743
+ if (this.refs.messageContainer) {
1744
+ this.setContent(this.refs.messageContainer, messages.map((message) => {
1745
+ if (message.message && typeof message.message === 'string') {
1746
+ message.message = message.message.replaceAll('<', '&lt;').replaceAll('>', '&gt;');
1747
+ }
1748
+ return this.renderTemplate('message', message);
1749
+ }).join(''));
1750
+ }
1751
+ }
1752
+ setErrorClasses(elements, dirty, hasErrors, hasMessages, element = this.element) {
1753
+ this.clearErrorClasses();
1754
+ elements.forEach((element) => {
1755
+ this.setElementInvalid(this.performInputMapping(element), false);
1756
+ });
1757
+ this.setInputWidgetErrorClasses(elements, hasErrors);
1758
+ if (hasErrors) {
1759
+ // Add error classes
1760
+ elements.forEach((input) => {
1761
+ this.setElementInvalid(this.performInputMapping(input), true);
1762
+ });
1763
+ if (dirty && this.options.highlightErrors) {
1764
+ this.addClass(element, this.options.componentErrorClass);
1765
+ }
1766
+ else {
1767
+ this.addClass(element, 'has-error');
1768
+ }
1769
+ }
1770
+ if (hasMessages) {
1771
+ this.addClass(element, 'has-message');
1772
+ }
1773
+ }
1774
+ setElementInvalid(element, invalid) {
1775
+ if (!element)
1776
+ return;
1777
+ if (invalid) {
1778
+ this.addClass(element, 'is-invalid');
1779
+ }
1780
+ else {
1781
+ this.removeClass(element, 'is-invalid');
1782
+ }
1783
+ element.setAttribute('aria-invalid', invalid ? 'true' : 'false');
1784
+ }
1785
+ clearOnHide() {
1786
+ // clearOnHide defaults to true for old forms (without the value set) so only trigger if the value is false.
1787
+ if (
1788
+ // if change happens inside EditGrid's row, it doesn't trigger change on the root level, so rootPristine will be true
1789
+ (!this.rootPristine || this.options.server || isInsideScopingComponent(this)) &&
1790
+ this.component.clearOnHide !== false &&
1791
+ !this.options.readOnly &&
1792
+ !this.options.showHiddenFields) {
1793
+ if (!this.visible) {
1794
+ this.deleteValue();
1795
+ }
1796
+ else if (!this.hasValue() && this.shouldAddDefaultValue) {
1797
+ // If shown, ensure the default is set.
1798
+ this.setValue(this.defaultValue, {
1799
+ noUpdateEvent: true
1800
+ });
1801
+ }
1802
+ }
1803
+ }
1804
+ triggerRootChange(...args) {
1805
+ if (this.options.onChange) {
1806
+ this.options.onChange(...args);
1807
+ }
1808
+ else if (this.root) {
1809
+ this.root.triggerChange(...args);
1810
+ }
1811
+ }
1812
+ onChange(flags, fromRoot) {
1813
+ flags = flags || {};
1814
+ if (flags.modified) {
1815
+ if (!flags.noPristineChangeOnModified) {
1816
+ this.pristine = false;
1817
+ }
1818
+ this.addClass(this.getElement(), 'formio-modified');
1819
+ }
1820
+ // If we are supposed to validate on blur, then don't trigger validation yet.
1821
+ if (this.component.validateOn === 'blur' && !this.errors.length) {
1822
+ flags.noValidate = true;
1823
+ }
1824
+ if (this.component.onChange) {
1825
+ this.evaluate(this.component.onChange, {
1826
+ flags
1827
+ });
1828
+ }
1829
+ // Set the changed variable.
1830
+ const changed = {
1831
+ instance: this,
1832
+ component: this.component,
1833
+ value: this.dataValue,
1834
+ flags: flags
1835
+ };
1836
+ // Emit the change.
1837
+ this.emit('componentChange', changed);
1838
+ // Do not propogate the modified flag.
1839
+ let modified = false;
1840
+ if (flags.modified) {
1841
+ modified = true;
1842
+ delete flags.modified;
1843
+ }
1844
+ // Bubble this change up to the top.
1845
+ if (!fromRoot) {
1846
+ this.triggerRootChange(flags, changed, modified);
1847
+ }
1848
+ return changed;
1849
+ }
1850
+ get wysiwygDefault() {
1851
+ return {
1852
+ quill: {
1853
+ theme: 'snow',
1854
+ placeholder: this.t(this.component.placeholder, { _userInput: true }),
1855
+ modules: {
1856
+ toolbar: [
1857
+ [{ 'size': ['small', false, 'large', 'huge'] }],
1858
+ [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
1859
+ [{ 'font': [] }],
1860
+ ['bold', 'italic', 'underline', 'strike', { 'script': 'sub' }, { 'script': 'super' }, 'clean'],
1861
+ [{ 'color': [] }, { 'background': [] }],
1862
+ [{ 'list': 'ordered' }, { 'list': 'bullet' }, { 'indent': '-1' }, { 'indent': '+1' }, { 'align': [] }],
1863
+ ['blockquote', 'code-block'],
1864
+ ['link', 'image', 'video', 'formula', 'source']
1865
+ ]
1866
+ }
1867
+ },
1868
+ ace: {
1869
+ theme: 'ace/theme/xcode',
1870
+ maxLines: 12,
1871
+ minLines: 12,
1872
+ tabSize: 2,
1873
+ mode: 'ace/mode/javascript',
1874
+ placeholder: this.t(this.component.placeholder, { _userInput: true })
1875
+ },
1876
+ ckeditor: {
1877
+ image: {
1878
+ toolbar: [
1879
+ 'imageTextAlternative',
1880
+ '|',
1881
+ 'imageStyle:full',
1882
+ 'imageStyle:alignLeft',
1883
+ 'imageStyle:alignCenter',
1884
+ 'imageStyle:alignRight'
1885
+ ],
1886
+ styles: [
1887
+ 'full',
1888
+ 'alignLeft',
1889
+ 'alignCenter',
1890
+ 'alignRight'
1891
+ ]
1892
+ },
1893
+ extraPlugins: []
1894
+ },
1895
+ default: {}
1896
+ };
1897
+ }
1898
+ addCKE(element, settings, onChange) {
1899
+ settings = _.isEmpty(settings) ? {} : settings;
1900
+ settings.base64Upload = this.component.isUploadEnabled ? false : true;
1901
+ settings.mediaEmbed = { previewsInData: true };
1902
+ settings = _.merge(this.wysiwygDefault.ckeditor, _.get(this.options, 'editors.ckeditor.settings', {}), settings);
1903
+ if (this.component.isUploadEnabled) {
1904
+ settings.extraPlugins.push(getFormioUploadAdapterPlugin(this.fileService, this));
1905
+ }
1906
+ return Formio.requireLibrary('ckeditor', isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', _.get(this.options, 'editors.ckeditor.src', `${Formio.cdn.ckeditor}/ckeditor.js`), true)
1907
+ .then(() => {
1908
+ if (!element.parentNode) {
1909
+ return NativePromise.reject();
1910
+ }
1911
+ if (isIEBrowser) {
1912
+ const editor = CKEDITOR.replace(element);
1913
+ editor.on('change', () => onChange(editor.getData()));
1914
+ return NativePromise.resolve(editor);
1915
+ }
1916
+ else {
1917
+ return ClassicEditor.create(element, settings).then(editor => {
1918
+ editor.model.document.on('change', () => onChange(editor.data.get()));
1919
+ return editor;
1920
+ });
1921
+ }
1922
+ });
1923
+ }
1924
+ addQuill(element, settings, onChange) {
1925
+ settings = _.isEmpty(settings) ? this.wysiwygDefault.quill : settings;
1926
+ settings = _.merge(this.wysiwygDefault.quill, _.get(this.options, 'editors.quill.settings', {}), settings);
1927
+ settings = {
1928
+ ...settings,
1929
+ modules: {
1930
+ table: true,
1931
+ ...settings.modules
1932
+ }
1933
+ };
1934
+ // Lazy load the quill css.
1935
+ Formio.requireLibrary(`quill-css-${settings.theme}`, 'Quill', [
1936
+ { type: 'styles', src: `${Formio.cdn.quill}/quill.${settings.theme}.css` }
1937
+ ], true);
1938
+ // Lazy load the quill library.
1939
+ return Formio.requireLibrary('quill', 'Quill', _.get(this.options, 'editors.quill.src', `${Formio.cdn.quill}/quill.min.js`), true)
1940
+ .then(() => {
1941
+ return Formio.requireLibrary('quill-table', 'Quill', `${Formio.cdn.baseUrl}/quill/quill-table.js`, true)
1942
+ .then(() => {
1943
+ if (!element.parentNode) {
1944
+ return NativePromise.reject();
1945
+ }
1946
+ this.quill = new Quill(element, isIEBrowser ? { ...settings, modules: {} } : settings);
1947
+ /** This block of code adds the [source] capabilities. See https://codepen.io/anon/pen/ZyEjrQ **/
1948
+ const txtArea = document.createElement('textarea');
1949
+ txtArea.setAttribute('class', 'quill-source-code');
1950
+ this.quill.addContainer('ql-custom').appendChild(txtArea);
1951
+ const qlSource = element.parentNode.querySelector('.ql-source');
1952
+ if (qlSource) {
1953
+ this.addEventListener(qlSource, 'click', (event) => {
1954
+ event.preventDefault();
1955
+ if (txtArea.style.display === 'inherit') {
1956
+ this.quill.setContents(this.quill.clipboard.convert({ html: txtArea.value }));
1957
+ }
1958
+ txtArea.style.display = (txtArea.style.display === 'none') ? 'inherit' : 'none';
1959
+ });
1960
+ }
1961
+ /** END CODEBLOCK **/
1962
+ // Make sure to select cursor when they click on the element.
1963
+ this.addEventListener(element, 'click', () => this.quill.focus());
1964
+ // Allows users to skip toolbar items when tabbing though form
1965
+ const elm = document.querySelectorAll('.ql-formats > button');
1966
+ for (let i = 0; i < elm.length; i++) {
1967
+ elm[i].setAttribute('tabindex', '-1');
1968
+ }
1969
+ this.quill.on('text-change', () => {
1970
+ txtArea.value = this.quill.root.innerHTML;
1971
+ onChange(txtArea);
1972
+ });
1973
+ return this.quill;
1974
+ });
1975
+ });
1976
+ }
1977
+ get shouldSanitizeValue() {
1978
+ // Sanitize value if sanitizing for thw whole content is turned off
1979
+ return (this.options?.sanitize !== false);
1980
+ }
1981
+ addAce(element, settings, onChange) {
1982
+ if (!settings || (settings.theme === 'snow')) {
1983
+ const mode = settings ? settings.mode : '';
1984
+ settings = {};
1985
+ if (mode) {
1986
+ settings.mode = mode;
1987
+ }
1988
+ }
1989
+ settings = _.merge(this.wysiwygDefault.ace, _.get(this.options, 'editors.ace.settings', {}), settings || {});
1990
+ return Formio.requireLibrary('ace', 'ace', _.get(this.options, 'editors.ace.src', `${Formio.cdn.ace}/ace.js`), true)
1991
+ .then((editor) => {
1992
+ editor = editor.edit(element);
1993
+ editor.removeAllListeners('change');
1994
+ editor.setOptions(settings);
1995
+ editor.getSession().setMode(settings.mode);
1996
+ editor.on('change', () => onChange(editor.getValue()));
1997
+ if (settings.isUseWorkerDisabled) {
1998
+ editor.session.setUseWorker(false);
1999
+ }
2000
+ return editor;
2001
+ });
2002
+ }
2003
+ get tree() {
2004
+ return this.component.tree || false;
2005
+ }
2006
+ /**
2007
+ * The empty value for this component.
2008
+ *
2009
+ * @return {null}
2010
+ */
2011
+ get emptyValue() {
2012
+ return null;
2013
+ }
2014
+ /**
2015
+ * Returns if this component has a value set.
2016
+ *
2017
+ */
2018
+ hasValue(data) {
2019
+ return !_.isUndefined(_.get(data || this.data, this.key));
2020
+ }
2021
+ /**
2022
+ * Get the data value at the root level.
2023
+ *
2024
+ * @return {*}
2025
+ */
2026
+ get rootValue() {
2027
+ return this.root ? this.root.data : this.data;
2028
+ }
2029
+ get rootPristine() {
2030
+ return _.get(this, 'root.pristine', false);
2031
+ }
2032
+ /**
2033
+ * Get the static value of this component.
2034
+ * @return {*}
2035
+ */
2036
+ get dataValue() {
2037
+ if (!this.key ||
2038
+ (!this.visible && this.component.clearOnHide && !this.rootPristine)) {
2039
+ return this.emptyValue;
2040
+ }
2041
+ if (!this.hasValue() && this.shouldAddDefaultValue) {
2042
+ const empty = this.component.multiple ? [] : this.emptyValue;
2043
+ if (!this.rootPristine) {
2044
+ this.dataValue = empty;
2045
+ }
2046
+ return empty;
2047
+ }
2048
+ return _.get(this._data, this.key);
2049
+ }
2050
+ /**
2051
+ * Sets the static value of this component.
2052
+ *
2053
+ * @param value
2054
+ */
2055
+ set dataValue(value) {
2056
+ if (!this.allowData ||
2057
+ !this.key ||
2058
+ (!this.visible && this.component.clearOnHide && !this.rootPristine)) {
2059
+ return;
2060
+ }
2061
+ if ((value !== null) && (value !== undefined)) {
2062
+ value = this.hook('setDataValue', value, this.key, this._data);
2063
+ }
2064
+ if ((value === null) || (value === undefined)) {
2065
+ this.unset();
2066
+ return;
2067
+ }
2068
+ _.set(this._data, this.key, value);
2069
+ return;
2070
+ }
2071
+ /**
2072
+ * Splice a value from the dataValue.
2073
+ *
2074
+ * @param index
2075
+ */
2076
+ splice(index, flags = {}) {
2077
+ if (this.hasValue()) {
2078
+ const dataValue = this.dataValue || [];
2079
+ if (_.isArray(dataValue) && dataValue.hasOwnProperty(index)) {
2080
+ dataValue.splice(index, 1);
2081
+ this.dataValue = dataValue;
2082
+ this.triggerChange(flags);
2083
+ }
2084
+ }
2085
+ }
2086
+ unset() {
2087
+ _.unset(this._data, this.key);
2088
+ }
2089
+ /**
2090
+ * Deletes the value of the component.
2091
+ */
2092
+ deleteValue() {
2093
+ this.setValue(null, {
2094
+ noUpdateEvent: true,
2095
+ noDefault: true
2096
+ });
2097
+ this.unset();
2098
+ }
2099
+ getCustomDefaultValue(defaultValue) {
2100
+ if (this.component.customDefaultValue && !this.options.preview) {
2101
+ defaultValue = this.evaluate(this.component.customDefaultValue, { value: '' }, 'value');
2102
+ }
2103
+ return defaultValue;
2104
+ }
2105
+ get shouldAddDefaultValue() {
2106
+ return !this.options.noDefaults || (this.component.defaultValue && !this.isEmpty(this.component.defaultValue)) || this.component.customDefaultValue;
2107
+ }
2108
+ get defaultValue() {
2109
+ let defaultValue = this.emptyValue;
2110
+ if (this.component.defaultValue) {
2111
+ defaultValue = this.component.defaultValue;
2112
+ }
2113
+ defaultValue = this.getCustomDefaultValue(defaultValue);
2114
+ const checkMask = (value) => {
2115
+ if (typeof value === 'string') {
2116
+ const placeholderChar = this.placeholderChar;
2117
+ value = conformToMask(value, this.defaultMask, { placeholderChar }).conformedValue;
2118
+ if (!FormioUtils.matchInputMask(value, this.defaultMask)) {
2119
+ value = '';
2120
+ }
2121
+ }
2122
+ else {
2123
+ value = '';
2124
+ }
2125
+ return value;
2126
+ };
2127
+ if (this.defaultMask) {
2128
+ if (Array.isArray(defaultValue)) {
2129
+ defaultValue = defaultValue.map(checkMask);
2130
+ }
2131
+ else {
2132
+ defaultValue = checkMask(defaultValue);
2133
+ }
2134
+ }
2135
+ // Clone so that it creates a new instance.
2136
+ return _.cloneDeep(defaultValue);
2137
+ }
2138
+ /**
2139
+ * Get the input value of this component.
2140
+ *
2141
+ * @return {*}
2142
+ */
2143
+ getValue() {
2144
+ if (!this.hasInput || this.viewOnly || !this.refs.input || !this.refs.input.length) {
2145
+ return this.dataValue;
2146
+ }
2147
+ const values = [];
2148
+ for (const i in this.refs.input) {
2149
+ if (this.refs.input.hasOwnProperty(i)) {
2150
+ if (!this.component.multiple) {
2151
+ return this.getValueAt(i);
2152
+ }
2153
+ values.push(this.getValueAt(i));
2154
+ }
2155
+ }
2156
+ if (values.length === 0 && !this.component.multiple) {
2157
+ return '';
2158
+ }
2159
+ return values;
2160
+ }
2161
+ /**
2162
+ * Get the value at a specific index.
2163
+ *
2164
+ * @param index
2165
+ * @returns {*}
2166
+ */
2167
+ getValueAt(index) {
2168
+ const input = this.performInputMapping(this.refs.input[index]);
2169
+ return input ? input.value : undefined;
2170
+ }
2171
+ /**
2172
+ * Set the value of this component.
2173
+ *
2174
+ * @param value
2175
+ * @param flags
2176
+ *
2177
+ * @return {boolean} - If the value changed.
2178
+ */
2179
+ setValue(value, flags = {}) {
2180
+ const changed = this.updateValue(value, flags);
2181
+ value = this.dataValue;
2182
+ if (!this.hasInput) {
2183
+ return changed;
2184
+ }
2185
+ const isArray = Array.isArray(value);
2186
+ const valueInput = this.refs.fileLink || this.refs.input;
2187
+ if (isArray &&
2188
+ Array.isArray(this.defaultValue) &&
2189
+ this.refs.hasOwnProperty('input') &&
2190
+ valueInput &&
2191
+ (valueInput.length !== value.length) &&
2192
+ this.visible) {
2193
+ this.redraw();
2194
+ }
2195
+ if (this.isHtmlRenderMode() && flags && flags.fromSubmission && changed) {
2196
+ this.redraw();
2197
+ return changed;
2198
+ }
2199
+ for (const i in this.refs.input) {
2200
+ if (this.refs.input.hasOwnProperty(i)) {
2201
+ this.setValueAt(i, isArray ? value[i] : value, flags);
2202
+ }
2203
+ }
2204
+ return changed;
2205
+ }
2206
+ /**
2207
+ * Set the value at a specific index.
2208
+ *
2209
+ * @param index
2210
+ * @param value
2211
+ */
2212
+ setValueAt(index, value, flags = {}) {
2213
+ if (!flags.noDefault && (value === null || value === undefined) && !this.component.multiple) {
2214
+ value = this.defaultValue;
2215
+ }
2216
+ const input = this.performInputMapping(this.refs.input[index]);
2217
+ const valueMaskInput = this.refs.valueMaskInput;
2218
+ if (valueMaskInput?.mask) {
2219
+ valueMaskInput.mask.textMaskInputElement.update(value);
2220
+ }
2221
+ if (input.mask) {
2222
+ input.mask.textMaskInputElement.update(value);
2223
+ }
2224
+ else if (input.widget && input.widget.setValue) {
2225
+ input.widget.setValue(value);
2226
+ }
2227
+ else {
2228
+ input.value = value;
2229
+ }
2230
+ }
2231
+ get hasSetValue() {
2232
+ return this.hasValue() && !this.isEmpty(this.dataValue);
2233
+ }
2234
+ setDefaultValue() {
2235
+ if (this.defaultValue && this.shouldAddDefaultValue) {
2236
+ const defaultValue = (this.component.multiple && !this.dataValue.length) ? [] : this.defaultValue;
2237
+ this.setValue(defaultValue, {
2238
+ noUpdateEvent: true
2239
+ });
2240
+ }
2241
+ }
2242
+ /**
2243
+ * Restore the value of a control.
2244
+ */
2245
+ restoreValue() {
2246
+ if (this.hasSetValue) {
2247
+ this.setValue(this.dataValue, {
2248
+ noUpdateEvent: true
2249
+ });
2250
+ }
2251
+ else {
2252
+ this.setDefaultValue();
2253
+ }
2254
+ }
2255
+ /**
2256
+ * Normalize values coming into updateValue.
2257
+ *
2258
+ * @param value
2259
+ * @return {*}
2260
+ */
2261
+ normalizeValue(value) {
2262
+ if (this.component.multiple && !Array.isArray(value)) {
2263
+ value = value ? [value] : [];
2264
+ }
2265
+ return value;
2266
+ }
2267
+ /**
2268
+ * Update a value of this component.
2269
+ *
2270
+ * @param flags
2271
+ */
2272
+ updateComponentValue(value, flags = {}) {
2273
+ let newValue = (!flags.resetValue && (value === undefined || value === null)) ? this.getValue() : value;
2274
+ newValue = this.normalizeValue(newValue, flags);
2275
+ const oldValue = this.dataValue;
2276
+ let changed = ((newValue !== undefined) ? this.hasChanged(newValue, oldValue) : false);
2277
+ if (changed) {
2278
+ this.dataValue = newValue;
2279
+ changed = this.dataValue !== oldValue;
2280
+ this.updateOnChange(flags, changed);
2281
+ }
2282
+ if (this.componentModal && flags && flags.fromSubmission) {
2283
+ this.componentModal.setValue(value);
2284
+ }
2285
+ return changed;
2286
+ }
2287
+ /**
2288
+ * Updates the value of this component plus all sub-components.
2289
+ *
2290
+ * @param args
2291
+ * @return {boolean}
2292
+ */
2293
+ updateValue(...args) {
2294
+ return this.updateComponentValue(...args);
2295
+ }
2296
+ getIcon(name, content, styles, ref = 'icon') {
2297
+ return this.renderTemplate('icon', {
2298
+ className: this.iconClass(name),
2299
+ ref,
2300
+ styles,
2301
+ content
2302
+ });
2303
+ }
2304
+ /**
2305
+ * Resets the value of this component.
2306
+ */
2307
+ resetValue() {
2308
+ this.unset();
2309
+ this.setValue(this.emptyValue, {
2310
+ noUpdateEvent: true,
2311
+ noValidate: true,
2312
+ resetValue: true
2313
+ });
2314
+ }
2315
+ /**
2316
+ * Determine if the value of this component has changed.
2317
+ *
2318
+ * @param newValue
2319
+ * @param oldValue
2320
+ * @return {boolean}
2321
+ */
2322
+ hasChanged(newValue, oldValue) {
2323
+ if (((newValue === undefined) || (newValue === null)) &&
2324
+ ((oldValue === undefined) || (oldValue === null) || this.isEmpty(oldValue))) {
2325
+ return false;
2326
+ }
2327
+ // If we do not have a value and are getting set to anything other than undefined or null, then we changed.
2328
+ if (newValue !== undefined &&
2329
+ newValue !== null &&
2330
+ this.allowData &&
2331
+ !this.hasValue()) {
2332
+ return true;
2333
+ }
2334
+ return !_.isEqual(newValue, oldValue);
2335
+ }
2336
+ /**
2337
+ * Update the value on change.
2338
+ *
2339
+ * @param flags
2340
+ */
2341
+ updateOnChange(flags = {}, changed = false) {
2342
+ if (!flags.noUpdateEvent && changed) {
2343
+ this.triggerChange(flags);
2344
+ return true;
2345
+ }
2346
+ return false;
2347
+ }
2348
+ /**
2349
+ * Perform a calculated value operation.
2350
+ *
2351
+ * @param data - The global data object.
2352
+ *
2353
+ * @return {boolean} - If the value changed during calculation.
2354
+ */
2355
+ convertNumberOrBoolToString(value) {
2356
+ if (typeof value === 'number' || typeof value === 'boolean') {
2357
+ return value.toString();
2358
+ }
2359
+ return value;
2360
+ }
2361
+ doValueCalculation(dataValue, data, row) {
2362
+ return this.evaluate(this.component.calculateValue, {
2363
+ value: dataValue,
2364
+ data,
2365
+ row: row || this.data,
2366
+ submission: this.root?._submission || {
2367
+ data: this.rootValue
2368
+ }
2369
+ }, 'value');
2370
+ }
2371
+ /* eslint-disable max-statements */
2372
+ calculateComponentValue(data, flags, row) {
2373
+ // Skip value calculation for the component if we don't have entire form data set
2374
+ if (_.isUndefined(_.get(this, 'root.data'))) {
2375
+ return false;
2376
+ }
2377
+ // If no calculated value or
2378
+ // hidden and set to clearOnHide (Don't calculate a value for a hidden field set to clear when hidden)
2379
+ const { clearOnHide } = this.component;
2380
+ const shouldBeCleared = !this.visible && clearOnHide;
2381
+ const allowOverride = _.get(this.component, 'allowCalculateOverride', false);
2382
+ // Handle all cases when calculated values should not fire.
2383
+ if ((this.options.readOnly && !this.options.pdf && !this.component.calculateValue) ||
2384
+ !(this.component.calculateValue || this.component.calculateValueVariable) ||
2385
+ shouldBeCleared ||
2386
+ (this.options.server && !this.component.calculateServer) ||
2387
+ (flags.dataSourceInitialLoading && allowOverride)) {
2388
+ return false;
2389
+ }
2390
+ const dataValue = this.dataValue;
2391
+ // Calculate the new value.
2392
+ let calculatedValue = this.doValueCalculation(dataValue, data, row, flags);
2393
+ if (_.isNil(calculatedValue)) {
2394
+ calculatedValue = this.emptyValue;
2395
+ }
2396
+ const changed = !_.isEqual(dataValue, calculatedValue);
2397
+ // Do not override calculations on server if they have calculateServer set.
2398
+ if (allowOverride) {
2399
+ // The value is considered locked if it is not empty and comes from a submission value.
2400
+ const fromSubmission = (flags.fromSubmission && this.component.persistent === true);
2401
+ if (this.isEmpty(dataValue)) {
2402
+ // Reset the calculation lock if ever the data is cleared.
2403
+ this.calculationLocked = false;
2404
+ }
2405
+ else if (this.calculationLocked || fromSubmission) {
2406
+ this.calculationLocked = true;
2407
+ return false;
2408
+ }
2409
+ const firstPass = (this.calculatedValue === undefined);
2410
+ if (firstPass) {
2411
+ this.calculatedValue = null;
2412
+ }
2413
+ const newCalculatedValue = this.normalizeValue(this.convertNumberOrBoolToString(calculatedValue));
2414
+ const previousCalculatedValue = this.normalizeValue(this.convertNumberOrBoolToString(this.calculatedValue));
2415
+ const normalizedDataValue = this.normalizeValue(this.convertNumberOrBoolToString(dataValue));
2416
+ const calculationChanged = !_.isEqual(previousCalculatedValue, newCalculatedValue);
2417
+ const previousChanged = !_.isEqual(normalizedDataValue, previousCalculatedValue);
2418
+ if (calculationChanged && previousChanged && !firstPass) {
2419
+ return false;
2420
+ }
2421
+ // Check to ensure that the calculated value is different than the previously calculated value.
2422
+ if (previousCalculatedValue && previousChanged && !calculationChanged) {
2423
+ return false;
2424
+ }
2425
+ if (flags.isReordered || !calculationChanged) {
2426
+ return false;
2427
+ }
2428
+ if (fromSubmission) {
2429
+ // If we set value from submission and it differs from calculated one, set the calculated value to prevent overriding dataValue in the next pass
2430
+ this.calculatedValue = calculatedValue;
2431
+ return false;
2432
+ }
2433
+ // If this is the firstPass, and the dataValue is different than to the calculatedValue.
2434
+ if (firstPass && !this.isEmpty(dataValue) && changed && calculationChanged) {
2435
+ // Return that we have a change so it will perform another pass.
2436
+ return true;
2437
+ }
2438
+ }
2439
+ this.calculatedValue = calculatedValue;
2440
+ if (changed) {
2441
+ if (!flags.noPristineChangeOnModified) {
2442
+ this.pristine = false;
2443
+ }
2444
+ flags.triggeredComponentId = this.id;
2445
+ return this.setValue(calculatedValue, flags);
2446
+ }
2447
+ return false;
2448
+ }
2449
+ /* eslint-enable max-statements */
2450
+ /**
2451
+ * Performs calculations in this component plus any child components.
2452
+ *
2453
+ * @param args
2454
+ * @return {boolean}
2455
+ */
2456
+ calculateValue(data, flags, row) {
2457
+ data = data || this.rootValue;
2458
+ flags = flags || {};
2459
+ row = row || this.data;
2460
+ return this.calculateComponentValue(data, flags, row);
2461
+ }
2462
+ /**
2463
+ * Get this component's label text.
2464
+ *
2465
+ */
2466
+ get label() {
2467
+ return this.component.label;
2468
+ }
2469
+ /**
2470
+ * Set this component's label text and render it.
2471
+ *
2472
+ * @param value - The new label text.
2473
+ */
2474
+ set label(value) {
2475
+ this.component.label = value;
2476
+ if (this.labelElement) {
2477
+ this.labelElement.innerText = value;
2478
+ }
2479
+ }
2480
+ /**
2481
+ * Get FormioForm element at the root of this component tree.
2482
+ *
2483
+ */
2484
+ getRoot() {
2485
+ return this.root;
2486
+ }
2487
+ /**
2488
+ * Returns the invalid message, or empty string if the component is valid.
2489
+ *
2490
+ * @param data
2491
+ * @param dirty
2492
+ * @return {*}
2493
+ */
2494
+ invalidMessage(data, dirty, ignoreCondition, row) {
2495
+ if (!ignoreCondition && !this.checkCondition(row, data)) {
2496
+ return '';
2497
+ }
2498
+ // See if this is forced invalid.
2499
+ if (this.invalid) {
2500
+ return this.invalid;
2501
+ }
2502
+ // No need to check for errors if there is no input or if it is pristine.
2503
+ if (!this.hasInput || (!dirty && this.pristine)) {
2504
+ return '';
2505
+ }
2506
+ return _.map(Validator.checkComponent(this, data), 'message').join('\n\n');
2507
+ }
2508
+ /**
2509
+ * Returns if the component is valid or not.
2510
+ *
2511
+ * @param data
2512
+ * @param dirty
2513
+ * @return {boolean}
2514
+ */
2515
+ isValid(data, dirty) {
2516
+ return !this.invalidMessage(data, dirty);
2517
+ }
2518
+ setComponentValidity(messages, dirty, silentCheck) {
2519
+ const hasErrors = !!messages.filter(message => message.level === 'error' && !message.fromServer).length;
2520
+ if (messages.length && (!silentCheck || this.error) && (!this.isEmpty(this.defaultValue) || dirty || !this.pristine)) {
2521
+ this.setCustomValidity(messages, dirty);
2522
+ }
2523
+ else if (!silentCheck) {
2524
+ this.setCustomValidity('');
2525
+ }
2526
+ return !hasErrors;
2527
+ }
2528
+ /**
2529
+ * Checks the validity of this component and sets the error message if it is invalid.
2530
+ *
2531
+ * @param data
2532
+ * @param dirty
2533
+ * @param row
2534
+ * @return {boolean}
2535
+ */
2536
+ checkComponentValidity(data, dirty, row, options = {}) {
2537
+ data = data || this.rootValue;
2538
+ row = row || this.data;
2539
+ const { async = false, silentCheck = false } = options;
2540
+ if (this.shouldSkipValidation(data, dirty, row)) {
2541
+ this.setCustomValidity('');
2542
+ return async ? NativePromise.resolve(true) : true;
2543
+ }
2544
+ const check = Validator.checkComponent(this, data, row, true, async);
2545
+ let validations = check;
2546
+ if (this.serverErrors?.length) {
2547
+ validations = check.concat(this.serverErrors);
2548
+ }
2549
+ return async ?
2550
+ validations.then((messages) => this.setComponentValidity(messages, dirty, silentCheck)) :
2551
+ this.setComponentValidity(validations, dirty, silentCheck);
2552
+ }
2553
+ checkValidity(data, dirty, row, silentCheck) {
2554
+ data = data || this.rootValue;
2555
+ row = row || this.data;
2556
+ const isValid = this.checkComponentValidity(data, dirty, row, { silentCheck });
2557
+ this.checkModal();
2558
+ return isValid;
2559
+ }
2560
+ checkAsyncValidity(data, dirty, row, silentCheck) {
2561
+ return NativePromise.resolve(this.checkComponentValidity(data, dirty, row, { async: true, silentCheck }));
2562
+ }
2563
+ /**
2564
+ * Check the conditions, calculations, and validity of a single component and triggers an update if
2565
+ * something changed.
2566
+ *
2567
+ * @param data - The root data of the change event.
2568
+ * @param flags - The flags from this change event.
2569
+ *
2570
+ * @return boolean - If component is valid or not.
2571
+ */
2572
+ checkData(data, flags, row) {
2573
+ data = data || this.rootValue;
2574
+ flags = flags || {};
2575
+ row = row || this.data;
2576
+ // Needs for Nextgen Rules Engine
2577
+ this.resetCaches();
2578
+ // Do not trigger refresh if change was triggered on blur event since components with Refresh on Blur have their own listeners
2579
+ if (!flags.fromBlur) {
2580
+ this.checkRefreshOn(flags.changes, flags);
2581
+ }
2582
+ if (flags.noCheck) {
2583
+ return true;
2584
+ }
2585
+ this.checkComponentConditions(data, flags, row);
2586
+ if (this.id !== flags.triggeredComponentId) {
2587
+ this.calculateComponentValue(data, flags, row);
2588
+ }
2589
+ if (flags.noValidate && !flags.validateOnInit && !flags.fromIframe) {
2590
+ if (flags.fromSubmission && this.rootPristine && this.pristine && this.error && flags.changed) {
2591
+ this.checkComponentValidity(data, !!this.options.alwaysDirty, row, true);
2592
+ }
2593
+ return true;
2594
+ }
2595
+ let isDirty = false;
2596
+ // We need to set dirty if they explicitly set noValidate to false.
2597
+ if (this.options.alwaysDirty || flags.dirty) {
2598
+ isDirty = true;
2599
+ }
2600
+ // See if they explicitely set the values with setSubmission.
2601
+ if (flags.fromSubmission && this.hasValue(data)) {
2602
+ isDirty = true;
2603
+ }
2604
+ this.setDirty(isDirty);
2605
+ if (this.component.validateOn === 'blur' && flags.fromSubmission) {
2606
+ return true;
2607
+ }
2608
+ const isValid = this.checkComponentValidity(data, isDirty, row, flags);
2609
+ this.checkModal();
2610
+ return isValid;
2611
+ }
2612
+ checkModal(isValid = true, dirty = false) {
2613
+ if (!this.component.modalEdit || !this.componentModal) {
2614
+ return;
2615
+ }
2616
+ if (dirty && !isValid) {
2617
+ this.setErrorClasses([this.refs.openModal], dirty, !isValid, !!this.errors.length, this.refs.openModalWrapper);
2618
+ }
2619
+ else {
2620
+ this.clearErrorClasses(this.refs.openModalWrapper);
2621
+ }
2622
+ }
2623
+ get validationValue() {
2624
+ return this.dataValue;
2625
+ }
2626
+ isEmpty(value = this.dataValue) {
2627
+ const isEmptyArray = (_.isArray(value) && value.length === 1) ? _.isEqual(value[0], this.emptyValue) : false;
2628
+ return value == null || value.length === 0 || _.isEqual(value, this.emptyValue) || isEmptyArray;
2629
+ }
2630
+ isEqual(valueA, valueB = this.dataValue) {
2631
+ return (this.isEmpty(valueA) && this.isEmpty(valueB)) || _.isEqual(valueA, valueB);
2632
+ }
2633
+ /**
2634
+ * Check if a component is eligible for multiple validation
2635
+ *
2636
+ * @return {boolean}
2637
+ */
2638
+ validateMultiple() {
2639
+ return true;
2640
+ }
2641
+ get errors() {
2642
+ return this.error ? [this.error] : [];
2643
+ }
2644
+ clearErrorClasses(element = this.element) {
2645
+ this.removeClass(element, this.options.componentErrorClass);
2646
+ this.removeClass(element, 'alert alert-danger');
2647
+ this.removeClass(element, 'has-error');
2648
+ this.removeClass(element, 'has-message');
2649
+ }
2650
+ setInputWidgetErrorClasses(inputRefs, hasErrors) {
2651
+ if (!this.isInputComponent || !this.component.widget || !inputRefs?.length) {
2652
+ return;
2653
+ }
2654
+ inputRefs.forEach((input) => {
2655
+ if (input?.widget && input.widget.setErrorClasses) {
2656
+ input.widget.setErrorClasses(hasErrors);
2657
+ }
2658
+ });
2659
+ }
2660
+ addFocusBlurEvents(element) {
2661
+ this.addEventListener(element, 'focus', () => {
2662
+ if (this.root.focusedComponent !== this) {
2663
+ if (this.root.pendingBlur) {
2664
+ this.root.pendingBlur();
2665
+ }
2666
+ this.root.focusedComponent = this;
2667
+ this.emit('focus', this);
2668
+ }
2669
+ else if (this.root.focusedComponent === this && this.root.pendingBlur) {
2670
+ this.root.pendingBlur.cancel();
2671
+ this.root.pendingBlur = null;
2672
+ }
2673
+ });
2674
+ this.addEventListener(element, 'blur', () => {
2675
+ this.root.pendingBlur = FormioUtils.delay(() => {
2676
+ this.emit('blur', this);
2677
+ if (this.component.validateOn === 'blur') {
2678
+ this.root.triggerChange({ fromBlur: true }, {
2679
+ instance: this,
2680
+ component: this.component,
2681
+ value: this.dataValue,
2682
+ flags: { fromBlur: true }
2683
+ });
2684
+ }
2685
+ this.root.focusedComponent = null;
2686
+ this.root.pendingBlur = null;
2687
+ });
2688
+ });
2689
+ }
2690
+ setCustomValidity(messages, dirty, external) {
2691
+ const inputRefs = this.isInputComponent ? this.refs.input || [] : null;
2692
+ if (typeof messages === 'string' && messages) {
2693
+ messages = {
2694
+ level: 'error',
2695
+ message: messages,
2696
+ };
2697
+ }
2698
+ if (!Array.isArray(messages)) {
2699
+ if (messages) {
2700
+ messages = [messages];
2701
+ }
2702
+ else {
2703
+ messages = [];
2704
+ }
2705
+ }
2706
+ const hasErrors = !!messages.filter(message => message.level === 'error').length;
2707
+ let invalidInputRefs = inputRefs;
2708
+ if (this.component.multiple) {
2709
+ const inputRefsArray = Array.from(inputRefs);
2710
+ inputRefsArray.forEach((input) => {
2711
+ this.setElementInvalid(this.performInputMapping(input), false);
2712
+ });
2713
+ this.setInputWidgetErrorClasses(inputRefsArray, false);
2714
+ invalidInputRefs = inputRefsArray.filter((ref) => {
2715
+ return messages.some?.((msg) => {
2716
+ return msg?.context?.input === ref;
2717
+ });
2718
+ });
2719
+ }
2720
+ if (messages.length) {
2721
+ if (this.refs.messageContainer) {
2722
+ this.empty(this.refs.messageContainer);
2723
+ }
2724
+ this.error = {
2725
+ component: this.component,
2726
+ message: messages[0].message,
2727
+ messages,
2728
+ external: !!external,
2729
+ };
2730
+ this.emit('componentError', this.error);
2731
+ this.addMessages(messages, dirty, invalidInputRefs);
2732
+ if (invalidInputRefs) {
2733
+ this.setErrorClasses(invalidInputRefs, dirty, hasErrors, !!messages.length);
2734
+ }
2735
+ }
2736
+ else if (!this.error || (this.error && this.error.external === !!external)) {
2737
+ if (this.refs.messageContainer) {
2738
+ this.empty(this.refs.messageContainer);
2739
+ }
2740
+ if (this.refs.modalMessageContainer) {
2741
+ this.empty(this.refs.modalMessageContainer);
2742
+ }
2743
+ this.error = null;
2744
+ if (invalidInputRefs) {
2745
+ this.setErrorClasses(invalidInputRefs, dirty, hasErrors, !!messages.length);
2746
+ }
2747
+ this.clearErrorClasses();
2748
+ }
2749
+ // if (!this.refs.input) {
2750
+ // return;
2751
+ // }
2752
+ // this.refs.input.forEach(input => {
2753
+ // input = this.performInputMapping(input);
2754
+ // if (typeof input.setCustomValidity === 'function') {
2755
+ // input.setCustomValidity(message, dirty);
2756
+ // }
2757
+ // });
2758
+ }
2759
+ /**
2760
+ * Determines if the value of this component is hidden from the user as if it is coming from the server, but is
2761
+ * protected.
2762
+ *
2763
+ * @return {boolean|*}
2764
+ */
2765
+ isValueHidden() {
2766
+ if (this.component.protected && this.root.editing) {
2767
+ return false;
2768
+ }
2769
+ if (!this.root || !this.root.hasOwnProperty('editing')) {
2770
+ return false;
2771
+ }
2772
+ if (!this.root || !this.root.editing) {
2773
+ return false;
2774
+ }
2775
+ return (this.component.protected || !this.component.persistent || (this.component.persistent === 'client-only'));
2776
+ }
2777
+ shouldSkipValidation(data, dirty, row) {
2778
+ const rules = [
2779
+ // Do not check custom validation for empty data if it is not required
2780
+ () => this.component.validate.custom && !this.dataValue && !this.component.validate.required,
2781
+ // Force valid if component is read-only
2782
+ () => this.options.readOnly,
2783
+ // Do not check validations if component is not an input component.
2784
+ () => !this.hasInput,
2785
+ // Check to see if we are editing and if so, check component persistence.
2786
+ () => this.isValueHidden(),
2787
+ // Force valid if component is hidden.
2788
+ () => !this.visible,
2789
+ // Force valid if component is conditionally hidden.
2790
+ () => !this.checkCondition(row, data)
2791
+ ];
2792
+ return rules.some(pred => pred());
2793
+ }
2794
+ // Maintain reverse compatibility.
2795
+ whenReady() {
2796
+ console.warn('The whenReady() method has been deprecated. Please use the dataReady property instead.');
2797
+ return this.dataReady;
2798
+ }
2799
+ get dataReady() {
2800
+ return NativePromise.resolve();
2801
+ }
2802
+ /**
2803
+ * Prints out the value of this component as a string value.
2804
+ */
2805
+ asString(value) {
2806
+ value = value || this.getValue();
2807
+ return (Array.isArray(value) ? value : [value]).map(_.toString).join(', ');
2808
+ }
2809
+ /**
2810
+ * Return if the component is disabled.
2811
+ * @return {boolean}
2812
+ */
2813
+ get disabled() {
2814
+ return this._disabled || this.parentDisabled;
2815
+ }
2816
+ /**
2817
+ * Disable this component.
2818
+ *
2819
+ * @param {boolean} disabled
2820
+ */
2821
+ set disabled(disabled) {
2822
+ this._disabled = disabled;
2823
+ }
2824
+ setDisabled(element, disabled) {
2825
+ if (!element) {
2826
+ return;
2827
+ }
2828
+ element.disabled = disabled;
2829
+ if (disabled) {
2830
+ element.setAttribute('disabled', 'disabled');
2831
+ }
2832
+ else {
2833
+ element.removeAttribute('disabled');
2834
+ }
2835
+ }
2836
+ setLoading(element, loading) {
2837
+ if (!element || (element.loading === loading)) {
2838
+ return;
2839
+ }
2840
+ element.loading = loading;
2841
+ if (!element.loader && loading) {
2842
+ element.loader = this.ce('i', {
2843
+ class: `${this.iconClass('refresh', true)} button-icon-right`
2844
+ });
2845
+ }
2846
+ if (element.loader) {
2847
+ if (loading) {
2848
+ this.appendTo(element.loader, element);
2849
+ }
2850
+ else {
2851
+ this.removeChildFrom(element.loader, element);
2852
+ }
2853
+ }
2854
+ }
2855
+ selectOptions(select, tag, options, defaultValue) {
2856
+ _.each(options, (option) => {
2857
+ const attrs = {
2858
+ value: option.value
2859
+ };
2860
+ if (defaultValue !== undefined && (option.value === defaultValue)) {
2861
+ attrs.selected = 'selected';
2862
+ }
2863
+ const optionElement = this.ce('option', attrs);
2864
+ optionElement.appendChild(this.text(option.label));
2865
+ select.appendChild(optionElement);
2866
+ });
2867
+ }
2868
+ setSelectValue(select, value) {
2869
+ const options = select.querySelectorAll('option');
2870
+ _.each(options, (option) => {
2871
+ if (option.value === value) {
2872
+ option.setAttribute('selected', 'selected');
2873
+ }
2874
+ else {
2875
+ option.removeAttribute('selected');
2876
+ }
2877
+ });
2878
+ if (select.onchange) {
2879
+ select.onchange();
2880
+ }
2881
+ if (select.onselect) {
2882
+ select.onselect();
2883
+ }
2884
+ }
2885
+ getRelativePath(path) {
2886
+ const keyPart = `.${this.key}`;
2887
+ const thisPath = this.isInputComponent ? this.path
2888
+ : this.path.slice(0).replace(keyPart, '');
2889
+ return path.replace(thisPath, '');
2890
+ }
2891
+ clear() {
2892
+ this.detach();
2893
+ this.empty(this.getElement());
2894
+ }
2895
+ append(element) {
2896
+ this.appendTo(element, this.element);
2897
+ }
2898
+ prepend(element) {
2899
+ this.prependTo(element, this.element);
2900
+ }
2901
+ removeChild(element) {
2902
+ this.removeChildFrom(element, this.element);
2903
+ }
2904
+ detachLogic() {
2905
+ this.logic.forEach(logic => {
2906
+ if (logic.trigger.type === 'event') {
2907
+ const event = this.interpolate(logic.trigger.event);
2908
+ this.off(event); // only applies to callbacks on this component
2909
+ }
2910
+ });
2911
+ }
2912
+ attachLogic() {
2913
+ // Do not attach logic during builder mode.
2914
+ if (this.builderMode) {
2915
+ return;
2916
+ }
2917
+ this.logic.forEach((logic) => {
2918
+ if (logic.trigger.type === 'event') {
2919
+ const event = this.interpolate(logic.trigger.event);
2920
+ this.on(event, (...args) => {
2921
+ const newComponent = fastCloneDeep(this.originalComponent);
2922
+ if (this.applyActions(newComponent, logic.actions, args)) {
2923
+ // If component definition changed, replace it.
2924
+ if (!_.isEqual(this.component, newComponent)) {
2925
+ this.component = newComponent;
2926
+ const visible = this.conditionallyVisible(null, null);
2927
+ const disabled = this.shouldDisabled;
2928
+ // Change states which won't be recalculated during redrawing
2929
+ if (this.visible !== visible) {
2930
+ this.visible = visible;
2931
+ }
2932
+ if (this.disabled !== disabled) {
2933
+ this.disabled = disabled;
2934
+ }
2935
+ this.redraw();
2936
+ }
2937
+ }
2938
+ }, true);
2939
+ }
2940
+ });
2941
+ }
2942
+ /**
2943
+ * Get the element information.
2944
+ */
2945
+ elementInfo() {
2946
+ const attributes = {
2947
+ name: this.options.name,
2948
+ type: this.component.inputType || 'text',
2949
+ class: 'form-control',
2950
+ lang: this.options.language
2951
+ };
2952
+ if (this.component.placeholder) {
2953
+ attributes.placeholder = this.t(this.component.placeholder, { _userInput: true });
2954
+ }
2955
+ if (this.component.tabindex) {
2956
+ attributes.tabindex = this.component.tabindex;
2957
+ }
2958
+ if (this.disabled) {
2959
+ attributes.disabled = 'disabled';
2960
+ }
2961
+ _.defaults(attributes, this.component.attributes);
2962
+ return {
2963
+ type: 'input',
2964
+ component: this.component,
2965
+ changeEvent: 'change',
2966
+ attr: attributes
2967
+ };
2968
+ }
2969
+ autofocus() {
2970
+ const hasAutofocus = this.component.autofocus && !this.builderMode && !this.options.preview;
2971
+ if (hasAutofocus) {
2972
+ this.on('render', () => this.focus(), true);
2973
+ }
2974
+ }
2975
+ scrollIntoView(element = this.element) {
2976
+ if (!element) {
2977
+ return;
2978
+ }
2979
+ const { left, top } = element.getBoundingClientRect();
2980
+ window.scrollTo(left + window.scrollX, top + window.scrollY);
2981
+ }
2982
+ focus(index) {
2983
+ if ('beforeFocus' in this.parent) {
2984
+ this.parent.beforeFocus(this);
2985
+ }
2986
+ if (this.refs.input?.length) {
2987
+ const focusingInput = typeof index === 'number' && this.refs.input[index]
2988
+ ? this.refs.input[index]
2989
+ : this.refs.input[this.refs.input.length - 1];
2990
+ if (this.component.widget?.type === 'calendar') {
2991
+ const sibling = focusingInput.nextSibling;
2992
+ if (sibling) {
2993
+ sibling.focus();
2994
+ }
2995
+ }
2996
+ else {
2997
+ focusingInput.focus();
2998
+ }
2999
+ }
3000
+ if (this.refs.openModal) {
3001
+ this.refs.openModal.focus();
3002
+ }
3003
+ if (this.parent.refs.openModal) {
3004
+ this.parent.refs.openModal.focus();
3005
+ }
3006
+ }
3007
+ /**
3008
+ * Get `Formio` instance for working with files
3009
+ */
3010
+ get fileService() {
3011
+ if (this.options.fileService) {
3012
+ return this.options.fileService;
3013
+ }
3014
+ if (this.options.formio) {
3015
+ return this.options.formio;
3016
+ }
3017
+ if (this.root && this.root.formio) {
3018
+ return this.root.formio;
3019
+ }
3020
+ const formio = new Formio();
3021
+ // If a form is loaded, then make sure to set the correct formUrl.
3022
+ if (this.root && this.root._form && this.root._form._id) {
3023
+ formio.formUrl = `${formio.projectUrl}/form/${this.root._form._id}`;
3024
+ }
3025
+ return formio;
3026
+ }
3027
+ resetCaches() { }
3028
+ get previewMode() {
3029
+ return false;
3030
+ }
3031
+ }
3032
+ Component.externalLibraries = {};
3033
+ Component.requireLibrary = function (name, property, src, polling) {
3034
+ if (!Component.externalLibraries.hasOwnProperty(name)) {
3035
+ Component.externalLibraries[name] = {};
3036
+ Component.externalLibraries[name].ready = new NativePromise((resolve, reject) => {
3037
+ Component.externalLibraries[name].resolve = resolve;
3038
+ Component.externalLibraries[name].reject = reject;
3039
+ });
3040
+ const callbackName = `${name}Callback`;
3041
+ if (!polling && !window[callbackName]) {
3042
+ window[callbackName] = function () {
3043
+ this.resolve();
3044
+ }.bind(Component.externalLibraries[name]);
3045
+ }
3046
+ // See if the plugin already exists.
3047
+ const plugin = _.get(window, property);
3048
+ if (plugin) {
3049
+ Component.externalLibraries[name].resolve(plugin);
3050
+ }
3051
+ else {
3052
+ src = Array.isArray(src) ? src : [src];
3053
+ src.forEach((lib) => {
3054
+ let attrs = {};
3055
+ let elementType = '';
3056
+ if (typeof lib === 'string') {
3057
+ lib = {
3058
+ type: 'script',
3059
+ src: lib
3060
+ };
3061
+ }
3062
+ switch (lib.type) {
3063
+ case 'script':
3064
+ elementType = 'script';
3065
+ attrs = {
3066
+ src: lib.src,
3067
+ type: 'text/javascript',
3068
+ defer: true,
3069
+ async: true
3070
+ };
3071
+ break;
3072
+ case 'styles':
3073
+ elementType = 'link';
3074
+ attrs = {
3075
+ href: lib.src,
3076
+ rel: 'stylesheet'
3077
+ };
3078
+ break;
3079
+ }
3080
+ // Add the script to the top page.
3081
+ const script = document.createElement(elementType);
3082
+ for (const attr in attrs) {
3083
+ script.setAttribute(attr, attrs[attr]);
3084
+ }
3085
+ document.getElementsByTagName('head')[0].appendChild(script);
3086
+ });
3087
+ // if no callback is provided, then check periodically for the script.
3088
+ if (polling) {
3089
+ setTimeout(function checkLibrary() {
3090
+ const plugin = _.get(window, property);
3091
+ if (plugin) {
3092
+ Component.externalLibraries[name].resolve(plugin);
3093
+ }
3094
+ else {
3095
+ // check again after 200 ms.
3096
+ setTimeout(checkLibrary, 200);
3097
+ }
3098
+ }, 200);
3099
+ }
3100
+ }
3101
+ }
3102
+ return Component.externalLibraries[name].ready;
3103
+ };
3104
+ Component.libraryReady = function (name) {
3105
+ if (Component.externalLibraries.hasOwnProperty(name) &&
3106
+ Component.externalLibraries[name].ready) {
3107
+ return Component.externalLibraries[name].ready;
3108
+ }
3109
+ return NativePromise.reject(`${name} library was not required.`);
3110
+ };