@formio/js 5.2.3 → 5.2.4-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (510) hide show
  1. package/dist/formio.builder.css +161 -50
  2. package/dist/formio.builder.min.css +1 -1
  3. package/dist/formio.embed.js +1 -1
  4. package/dist/formio.embed.min.js +1 -1
  5. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  6. package/dist/formio.form.css +158 -49
  7. package/dist/formio.form.js +152 -108
  8. package/dist/formio.form.min.css +1 -1
  9. package/dist/formio.form.min.js +1 -1
  10. package/dist/formio.form.min.js.LICENSE.txt +1 -1
  11. package/dist/formio.full.css +161 -50
  12. package/dist/formio.full.js +401 -227
  13. package/dist/formio.full.min.css +1 -1
  14. package/dist/formio.full.min.js +1 -1
  15. package/dist/formio.full.min.js.LICENSE.txt +1 -1
  16. package/dist/formio.js +51 -18
  17. package/dist/formio.min.js +1 -1
  18. package/dist/formio.min.js.LICENSE.txt +1 -1
  19. package/dist/formio.utils.js +47 -14
  20. package/dist/formio.utils.min.js +1 -1
  21. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  22. package/lib/cjs/CDN.js +12 -12
  23. package/lib/cjs/Element.d.ts +3 -2
  24. package/lib/cjs/Element.js +27 -21
  25. package/lib/cjs/Embed.js +74 -40
  26. package/lib/cjs/EventEmitter.js +1 -1
  27. package/lib/cjs/Form.d.ts +371 -341
  28. package/lib/cjs/Form.js +153 -39
  29. package/lib/cjs/FormBuilder.d.ts +3 -3
  30. package/lib/cjs/FormBuilder.js +2 -3
  31. package/lib/cjs/Formio.js +26 -23
  32. package/lib/cjs/InlineEmbed.js +23 -17
  33. package/lib/cjs/PDF.d.ts +1 -0
  34. package/lib/cjs/PDF.js +18 -15
  35. package/lib/cjs/PDFBuilder.js +51 -36
  36. package/lib/cjs/Webform.d.ts +8 -366
  37. package/lib/cjs/Webform.js +176 -235
  38. package/lib/cjs/WebformBuilder.js +217 -144
  39. package/lib/cjs/Wizard.js +92 -62
  40. package/lib/cjs/WizardBuilder.js +27 -19
  41. package/lib/cjs/addons/FormioAddon.js +1 -1
  42. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +59 -57
  43. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +24 -16
  44. package/lib/cjs/addons/index.js +3 -3
  45. package/lib/cjs/components/Components.js +0 -4
  46. package/lib/cjs/components/_classes/component/Component.form.js +11 -11
  47. package/lib/cjs/components/_classes/component/Component.js +298 -179
  48. package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.js +2 -4
  49. package/lib/cjs/components/_classes/component/editForm/Component.edit.api.js +5 -5
  50. package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.js +9 -11
  51. package/lib/cjs/components/_classes/component/editForm/Component.edit.data.d.ts +37 -0
  52. package/lib/cjs/components/_classes/component/editForm/Component.edit.data.js +39 -25
  53. package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +47 -29
  54. package/lib/cjs/components/_classes/component/editForm/Component.edit.layout.js +9 -9
  55. package/lib/cjs/components/_classes/component/editForm/Component.edit.logic.js +5 -7
  56. package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +37 -34
  57. package/lib/cjs/components/_classes/component/editForm/utils.js +12 -16
  58. package/lib/cjs/components/_classes/componentModal/ComponentModal.js +6 -6
  59. package/lib/cjs/components/_classes/field/Field.js +7 -1
  60. package/lib/cjs/components/_classes/input/Input.js +30 -26
  61. package/lib/cjs/components/_classes/list/ListComponent.form.js +1 -1
  62. package/lib/cjs/components/_classes/list/ListComponent.js +27 -18
  63. package/lib/cjs/components/_classes/list/editForm/ListComponent.edit.data.js +36 -9
  64. package/lib/cjs/components/_classes/multivalue/Multivalue.js +32 -13
  65. package/lib/cjs/components/_classes/nested/NestedComponent.form.js +3 -3
  66. package/lib/cjs/components/_classes/nested/NestedComponent.js +36 -32
  67. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +19 -14
  68. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +19 -17
  69. package/lib/cjs/components/address/Address.js +52 -45
  70. package/lib/cjs/components/address/editForm/Address.edit.data.js +2 -2
  71. package/lib/cjs/components/address/editForm/Address.edit.display.js +2 -2
  72. package/lib/cjs/components/address/editForm/Address.edit.provider.js +53 -11
  73. package/lib/cjs/components/alert/Alert.js +21 -15
  74. package/lib/cjs/components/button/Button.form.js +1 -1
  75. package/lib/cjs/components/button/Button.js +50 -27
  76. package/lib/cjs/components/button/editForm/Button.edit.display.js +49 -9
  77. package/lib/cjs/components/checkbox/Checkbox.d.ts +1 -1
  78. package/lib/cjs/components/checkbox/Checkbox.form.js +3 -3
  79. package/lib/cjs/components/checkbox/Checkbox.js +28 -20
  80. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.data.js +1 -1
  81. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.display.js +13 -3
  82. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.validation.js +2 -2
  83. package/lib/cjs/components/columns/Columns.form.js +1 -1
  84. package/lib/cjs/components/columns/Columns.js +24 -12
  85. package/lib/cjs/components/columns/editForm/Columns.edit.display.js +17 -17
  86. package/lib/cjs/components/container/Container.form.js +2 -2
  87. package/lib/cjs/components/container/Container.js +6 -4
  88. package/lib/cjs/components/container/editForm/Container.edit.data.js +3 -3
  89. package/lib/cjs/components/container/editForm/Container.edit.display.js +4 -4
  90. package/lib/cjs/components/content/Content.form.js +4 -2
  91. package/lib/cjs/components/content/Content.js +10 -8
  92. package/lib/cjs/components/content/editForm/Content.edit.display.js +10 -10
  93. package/lib/cjs/components/currency/Currency.form.js +3 -3
  94. package/lib/cjs/components/currency/Currency.js +19 -10
  95. package/lib/cjs/components/currency/editForm/Currency.edit.data.js +5 -5
  96. package/lib/cjs/components/currency/editForm/Currency.edit.display.js +8 -8
  97. package/lib/cjs/components/datagrid/DataGrid.form.js +3 -3
  98. package/lib/cjs/components/datagrid/DataGrid.js +89 -38
  99. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.data.js +1 -1
  100. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.display.js +14 -14
  101. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.validation.js +3 -3
  102. package/lib/cjs/components/datamap/DataMap.form.js +2 -2
  103. package/lib/cjs/components/datamap/DataMap.js +44 -31
  104. package/lib/cjs/components/datamap/editForm/DataMap.edit.data.js +1 -1
  105. package/lib/cjs/components/datamap/editForm/DataMap.edit.display.js +8 -8
  106. package/lib/cjs/components/datetime/DateTime.form.js +5 -5
  107. package/lib/cjs/components/datetime/DateTime.js +30 -15
  108. package/lib/cjs/components/datetime/editForm/DateTime.edit.data.js +4 -3
  109. package/lib/cjs/components/datetime/editForm/DateTime.edit.date.js +10 -10
  110. package/lib/cjs/components/datetime/editForm/DateTime.edit.display.js +22 -17
  111. package/lib/cjs/components/datetime/editForm/DateTime.edit.time.js +5 -5
  112. package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.js +3 -3
  113. package/lib/cjs/components/day/Day.form.js +5 -5
  114. package/lib/cjs/components/day/Day.js +146 -56
  115. package/lib/cjs/components/day/editForm/Day.edit.day.js +13 -9
  116. package/lib/cjs/components/day/editForm/Day.edit.display.js +7 -7
  117. package/lib/cjs/components/day/editForm/Day.edit.month.js +12 -8
  118. package/lib/cjs/components/day/editForm/Day.edit.validation.js +7 -7
  119. package/lib/cjs/components/day/editForm/Day.edit.year.js +8 -8
  120. package/lib/cjs/components/editgrid/EditGrid.form.js +2 -2
  121. package/lib/cjs/components/editgrid/EditGrid.js +137 -89
  122. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.data.js +2 -2
  123. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +7 -2
  124. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.js +16 -16
  125. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.validation.js +3 -3
  126. package/lib/cjs/components/email/Email.js +4 -4
  127. package/lib/cjs/components/email/editForm/Email.edit.display.js +3 -3
  128. package/lib/cjs/components/email/editForm/Email.edit.validation.js +6 -6
  129. package/lib/cjs/components/fieldset/Fieldset.form.js +1 -1
  130. package/lib/cjs/components/fieldset/Fieldset.js +2 -2
  131. package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -8
  132. package/lib/cjs/components/file/File.form.js +4 -4
  133. package/lib/cjs/components/file/File.js +126 -80
  134. package/lib/cjs/components/file/editForm/File.edit.display.js +9 -5
  135. package/lib/cjs/components/file/editForm/File.edit.file.d.ts +37 -16
  136. package/lib/cjs/components/file/editForm/File.edit.file.js +169 -72
  137. package/lib/cjs/components/file/editForm/File.edit.validation.js +2 -2
  138. package/lib/cjs/components/form/Form.form.js +3 -3
  139. package/lib/cjs/components/form/Form.js +67 -51
  140. package/lib/cjs/components/form/editForm/Form.edit.data.js +1 -3
  141. package/lib/cjs/components/form/editForm/Form.edit.display.js +6 -7
  142. package/lib/cjs/components/form/editForm/Form.edit.form.js +11 -9
  143. package/lib/cjs/components/hidden/Hidden.form.js +4 -4
  144. package/lib/cjs/components/hidden/Hidden.js +2 -2
  145. package/lib/cjs/components/hidden/editForm/Hidden.edit.data.js +3 -3
  146. package/lib/cjs/components/hidden/editForm/Hidden.edit.display.js +10 -10
  147. package/lib/cjs/components/html/HTML.js +23 -17
  148. package/lib/cjs/components/html/editForm/HTML.edit.display.js +17 -17
  149. package/lib/cjs/components/html/editForm/HTML.edit.logic.js +2 -2
  150. package/lib/cjs/components/number/Number.form.js +3 -3
  151. package/lib/cjs/components/number/Number.js +27 -11
  152. package/lib/cjs/components/number/editForm/Number.edit.data.js +3 -3
  153. package/lib/cjs/components/number/editForm/Number.edit.display.js +4 -4
  154. package/lib/cjs/components/number/editForm/Number.edit.validation.js +9 -9
  155. package/lib/cjs/components/panel/Panel.form.js +1 -1
  156. package/lib/cjs/components/panel/Panel.js +2 -2
  157. package/lib/cjs/components/panel/editForm/Panel.edit.conditional.js +5 -7
  158. package/lib/cjs/components/panel/editForm/Panel.edit.display.js +55 -29
  159. package/lib/cjs/components/password/Password.form.js +3 -3
  160. package/lib/cjs/components/password/Password.js +5 -2
  161. package/lib/cjs/components/password/editForm/Password.edit.data.js +11 -11
  162. package/lib/cjs/components/password/editForm/Password.edit.display.js +3 -3
  163. package/lib/cjs/components/password/editForm/Password.edit.validation.js +3 -3
  164. package/lib/cjs/components/phonenumber/PhoneNumber.form.js +8 -8
  165. package/lib/cjs/components/phonenumber/PhoneNumber.js +3 -3
  166. package/lib/cjs/components/phonenumber/editForm/PhoneNumber.edit.validation.js +6 -6
  167. package/lib/cjs/components/radio/Radio.form.js +3 -3
  168. package/lib/cjs/components/radio/Radio.js +55 -26
  169. package/lib/cjs/components/radio/editForm/Radio.edit.data.js +23 -9
  170. package/lib/cjs/components/radio/editForm/Radio.edit.display.js +6 -6
  171. package/lib/cjs/components/radio/editForm/Radio.edit.validation.js +2 -2
  172. package/lib/cjs/components/recaptcha/ReCaptcha.form.js +5 -5
  173. package/lib/cjs/components/recaptcha/ReCaptcha.js +7 -5
  174. package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +24 -24
  175. package/lib/cjs/components/select/Select.form.js +3 -3
  176. package/lib/cjs/components/select/Select.js +235 -129
  177. package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +1 -1
  178. package/lib/cjs/components/select/editForm/Select.edit.data.js +191 -57
  179. package/lib/cjs/components/select/editForm/Select.edit.display.js +2 -2
  180. package/lib/cjs/components/select/editForm/Select.edit.validation.js +4 -4
  181. package/lib/cjs/components/selectboxes/SelectBoxes.form.js +3 -3
  182. package/lib/cjs/components/selectboxes/SelectBoxes.js +31 -15
  183. package/lib/cjs/components/selectboxes/editForm/SelectBoxes.edit.validation.js +5 -5
  184. package/lib/cjs/components/signature/Signature.form.js +3 -3
  185. package/lib/cjs/components/signature/Signature.js +25 -15
  186. package/lib/cjs/components/signature/editForm/Signature.edit.display.js +19 -10
  187. package/lib/cjs/components/survey/Survey.form.js +3 -3
  188. package/lib/cjs/components/survey/Survey.js +30 -17
  189. package/lib/cjs/components/survey/editForm/Survey.edit.data.js +23 -11
  190. package/lib/cjs/components/survey/editForm/Survey.edit.display.js +1 -1
  191. package/lib/cjs/components/survey/editForm/Survey.edit.validation.js +1 -1
  192. package/lib/cjs/components/table/Table.form.js +1 -1
  193. package/lib/cjs/components/table/Table.js +7 -5
  194. package/lib/cjs/components/table/editForm/Table.edit.display.js +22 -22
  195. package/lib/cjs/components/tabs/Tabs.form.js +1 -1
  196. package/lib/cjs/components/tabs/Tabs.js +26 -8
  197. package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +21 -17
  198. package/lib/cjs/components/tags/Tags.form.js +1 -1
  199. package/lib/cjs/components/tags/Tags.js +28 -12
  200. package/lib/cjs/components/tags/editForm/Tags.edit.data.js +7 -7
  201. package/lib/cjs/components/textarea/TextArea.form.js +2 -2
  202. package/lib/cjs/components/textarea/TextArea.js +63 -45
  203. package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +96 -72
  204. package/lib/cjs/components/textarea/editForm/TextArea.edit.validation.js +3 -3
  205. package/lib/cjs/components/textfield/TextField.form.js +3 -3
  206. package/lib/cjs/components/textfield/TextField.js +32 -21
  207. package/lib/cjs/components/textfield/editForm/TextField.edit.data.js +15 -13
  208. package/lib/cjs/components/textfield/editForm/TextField.edit.display.js +31 -21
  209. package/lib/cjs/components/textfield/editForm/TextField.edit.validation.js +6 -6
  210. package/lib/cjs/components/time/Time.js +17 -10
  211. package/lib/cjs/components/time/editForm/Time.edit.display.js +2 -2
  212. package/lib/cjs/components/unknown/Unknown.form.js +5 -5
  213. package/lib/cjs/components/unknown/Unknown.js +2 -2
  214. package/lib/cjs/components/unknown/editForm/Unknown.edit.display.js +3 -3
  215. package/lib/cjs/components/url/Url.form.js +3 -3
  216. package/lib/cjs/components/url/Url.js +2 -2
  217. package/lib/cjs/components/url/editForm/Url.edit.display.js +3 -3
  218. package/lib/cjs/components/url/editForm/Url.edit.validation.js +1 -1
  219. package/lib/cjs/components/well/Well.form.js +1 -1
  220. package/lib/cjs/components/well/Well.js +2 -2
  221. package/lib/cjs/components/well/editForm/Well.edit.display.js +10 -10
  222. package/lib/cjs/formio.form.d.ts +2 -1
  223. package/lib/cjs/formio.form.js +38 -12
  224. package/lib/cjs/i18n.d.ts +4 -0
  225. package/lib/cjs/i18n.js +7 -3
  226. package/lib/cjs/package.json +1 -1
  227. package/lib/cjs/providers/address/AddressProvider.js +8 -5
  228. package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +3 -3
  229. package/lib/cjs/providers/address/GoogleAddressProvider.js +24 -13
  230. package/lib/cjs/providers/processor/fileProcessor.js +3 -1
  231. package/lib/cjs/providers/storage/azure.js +5 -2
  232. package/lib/cjs/providers/storage/dropbox.js +4 -5
  233. package/lib/cjs/providers/storage/googleDrive.js +3 -4
  234. package/lib/cjs/providers/storage/index.js +1 -1
  235. package/lib/cjs/providers/storage/indexeddb.js +16 -6
  236. package/lib/cjs/providers/storage/s3.js +17 -6
  237. package/lib/cjs/providers/storage/uploadAdapter.js +17 -11
  238. package/lib/cjs/providers/storage/url.js +13 -11
  239. package/lib/cjs/providers/storage/xhr.js +17 -9
  240. package/lib/cjs/templates/index.js +1 -1
  241. package/lib/cjs/translations/de.d.ts +80 -0
  242. package/lib/cjs/translations/de.js +81 -0
  243. package/lib/cjs/translations/en.d.ts +0 -2
  244. package/lib/cjs/translations/en.js +7 -9
  245. package/lib/cjs/utils/ChoicesWrapper.js +2 -2
  246. package/lib/cjs/utils/builder.js +31 -7
  247. package/lib/cjs/utils/calendarUtils.js +7 -5
  248. package/lib/cjs/utils/conditionOperators/ConditionOperator.js +1 -1
  249. package/lib/cjs/utils/conditionOperators/DateGreaterThan.js +12 -4
  250. package/lib/cjs/utils/conditionOperators/IsEmptyValue.js +3 -1
  251. package/lib/cjs/utils/conditionOperators/IsEqualTo.js +10 -6
  252. package/lib/cjs/utils/conditionOperators/index.js +1 -1
  253. package/lib/cjs/utils/formUtils.js +1 -1
  254. package/lib/cjs/utils/i18n.js +7 -1
  255. package/lib/cjs/utils/index.d.ts +2 -1
  256. package/lib/cjs/utils/index.js +2 -2
  257. package/lib/cjs/utils/utils.d.ts +10 -1
  258. package/lib/cjs/utils/utils.js +175 -92
  259. package/lib/cjs/widgets/CalendarWidget.js +66 -49
  260. package/lib/cjs/widgets/InputWidget.js +6 -4
  261. package/lib/cjs/widgets/index.js +1 -1
  262. package/lib/mjs/CDN.js +12 -12
  263. package/lib/mjs/Element.d.ts +3 -2
  264. package/lib/mjs/Element.js +27 -21
  265. package/lib/mjs/Embed.js +76 -42
  266. package/lib/mjs/EventEmitter.js +1 -1
  267. package/lib/mjs/Form.d.ts +371 -341
  268. package/lib/mjs/Form.js +142 -126
  269. package/lib/mjs/FormBuilder.d.ts +3 -3
  270. package/lib/mjs/FormBuilder.js +2 -3
  271. package/lib/mjs/Formio.js +26 -23
  272. package/lib/mjs/InlineEmbed.js +23 -17
  273. package/lib/mjs/PDF.d.ts +1 -0
  274. package/lib/mjs/PDF.js +18 -15
  275. package/lib/mjs/PDFBuilder.js +51 -36
  276. package/lib/mjs/Webform.d.ts +8 -366
  277. package/lib/mjs/Webform.js +183 -250
  278. package/lib/mjs/WebformBuilder.js +220 -147
  279. package/lib/mjs/Wizard.js +93 -63
  280. package/lib/mjs/WizardBuilder.js +27 -19
  281. package/lib/mjs/addons/FormioAddon.js +1 -1
  282. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +59 -57
  283. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +24 -16
  284. package/lib/mjs/addons/index.js +3 -3
  285. package/lib/mjs/components/Components.js +0 -4
  286. package/lib/mjs/components/_classes/component/Component.form.js +11 -11
  287. package/lib/mjs/components/_classes/component/Component.js +303 -184
  288. package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.js +2 -4
  289. package/lib/mjs/components/_classes/component/editForm/Component.edit.api.js +5 -5
  290. package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.js +9 -11
  291. package/lib/mjs/components/_classes/component/editForm/Component.edit.data.d.ts +37 -0
  292. package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +39 -25
  293. package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +47 -29
  294. package/lib/mjs/components/_classes/component/editForm/Component.edit.layout.js +9 -9
  295. package/lib/mjs/components/_classes/component/editForm/Component.edit.logic.js +5 -7
  296. package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +37 -34
  297. package/lib/mjs/components/_classes/component/editForm/utils.js +12 -16
  298. package/lib/mjs/components/_classes/componentModal/ComponentModal.js +2 -2
  299. package/lib/mjs/components/_classes/field/Field.js +8 -2
  300. package/lib/mjs/components/_classes/input/Input.js +27 -23
  301. package/lib/mjs/components/_classes/list/ListComponent.form.js +1 -1
  302. package/lib/mjs/components/_classes/list/ListComponent.js +27 -18
  303. package/lib/mjs/components/_classes/list/editForm/ListComponent.edit.data.js +36 -9
  304. package/lib/mjs/components/_classes/multivalue/Multivalue.js +32 -13
  305. package/lib/mjs/components/_classes/nested/NestedComponent.form.js +3 -3
  306. package/lib/mjs/components/_classes/nested/NestedComponent.js +32 -28
  307. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +20 -15
  308. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +19 -17
  309. package/lib/mjs/components/address/Address.js +57 -46
  310. package/lib/mjs/components/address/editForm/Address.edit.data.js +2 -2
  311. package/lib/mjs/components/address/editForm/Address.edit.display.js +2 -2
  312. package/lib/mjs/components/address/editForm/Address.edit.provider.js +53 -11
  313. package/lib/mjs/components/alert/Alert.js +22 -16
  314. package/lib/mjs/components/button/Button.form.js +1 -1
  315. package/lib/mjs/components/button/Button.js +51 -28
  316. package/lib/mjs/components/button/editForm/Button.edit.display.js +49 -9
  317. package/lib/mjs/components/checkbox/Checkbox.d.ts +1 -1
  318. package/lib/mjs/components/checkbox/Checkbox.form.js +3 -3
  319. package/lib/mjs/components/checkbox/Checkbox.js +29 -21
  320. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.data.js +1 -1
  321. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.display.js +13 -3
  322. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.validation.js +2 -2
  323. package/lib/mjs/components/columns/Columns.form.js +1 -1
  324. package/lib/mjs/components/columns/Columns.js +24 -12
  325. package/lib/mjs/components/columns/editForm/Columns.edit.display.js +17 -17
  326. package/lib/mjs/components/container/Container.form.js +2 -2
  327. package/lib/mjs/components/container/Container.js +6 -4
  328. package/lib/mjs/components/container/editForm/Container.edit.data.js +3 -3
  329. package/lib/mjs/components/container/editForm/Container.edit.display.js +4 -4
  330. package/lib/mjs/components/content/Content.form.js +4 -2
  331. package/lib/mjs/components/content/Content.js +10 -8
  332. package/lib/mjs/components/content/editForm/Content.edit.display.js +10 -10
  333. package/lib/mjs/components/currency/Currency.form.js +3 -3
  334. package/lib/mjs/components/currency/Currency.js +19 -10
  335. package/lib/mjs/components/currency/editForm/Currency.edit.data.js +5 -5
  336. package/lib/mjs/components/currency/editForm/Currency.edit.display.js +8 -8
  337. package/lib/mjs/components/datagrid/DataGrid.form.js +3 -3
  338. package/lib/mjs/components/datagrid/DataGrid.js +90 -39
  339. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.data.js +1 -1
  340. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.display.js +14 -14
  341. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.validation.js +3 -3
  342. package/lib/mjs/components/datamap/DataMap.form.js +2 -2
  343. package/lib/mjs/components/datamap/DataMap.js +44 -31
  344. package/lib/mjs/components/datamap/editForm/DataMap.edit.data.js +1 -1
  345. package/lib/mjs/components/datamap/editForm/DataMap.edit.display.js +8 -8
  346. package/lib/mjs/components/datetime/DateTime.form.js +5 -5
  347. package/lib/mjs/components/datetime/DateTime.js +31 -16
  348. package/lib/mjs/components/datetime/editForm/DateTime.edit.data.js +4 -3
  349. package/lib/mjs/components/datetime/editForm/DateTime.edit.date.js +10 -10
  350. package/lib/mjs/components/datetime/editForm/DateTime.edit.display.js +22 -17
  351. package/lib/mjs/components/datetime/editForm/DateTime.edit.time.js +5 -5
  352. package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.js +3 -3
  353. package/lib/mjs/components/day/Day.form.js +5 -5
  354. package/lib/mjs/components/day/Day.js +147 -57
  355. package/lib/mjs/components/day/editForm/Day.edit.day.js +13 -9
  356. package/lib/mjs/components/day/editForm/Day.edit.display.js +7 -7
  357. package/lib/mjs/components/day/editForm/Day.edit.month.js +12 -8
  358. package/lib/mjs/components/day/editForm/Day.edit.validation.js +7 -7
  359. package/lib/mjs/components/day/editForm/Day.edit.year.js +8 -8
  360. package/lib/mjs/components/editgrid/EditGrid.form.js +2 -2
  361. package/lib/mjs/components/editgrid/EditGrid.js +138 -90
  362. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.data.js +2 -2
  363. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +7 -2
  364. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.js +16 -16
  365. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.validation.js +3 -3
  366. package/lib/mjs/components/email/Email.js +4 -4
  367. package/lib/mjs/components/email/editForm/Email.edit.display.js +3 -3
  368. package/lib/mjs/components/email/editForm/Email.edit.validation.js +6 -6
  369. package/lib/mjs/components/fieldset/Fieldset.form.js +1 -1
  370. package/lib/mjs/components/fieldset/Fieldset.js +2 -2
  371. package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -8
  372. package/lib/mjs/components/file/File.form.js +4 -4
  373. package/lib/mjs/components/file/File.js +131 -84
  374. package/lib/mjs/components/file/editForm/File.edit.display.js +9 -5
  375. package/lib/mjs/components/file/editForm/File.edit.file.d.ts +37 -16
  376. package/lib/mjs/components/file/editForm/File.edit.file.js +169 -72
  377. package/lib/mjs/components/file/editForm/File.edit.validation.js +2 -2
  378. package/lib/mjs/components/form/Form.form.js +3 -3
  379. package/lib/mjs/components/form/Form.js +67 -51
  380. package/lib/mjs/components/form/editForm/Form.edit.data.js +1 -3
  381. package/lib/mjs/components/form/editForm/Form.edit.display.js +6 -7
  382. package/lib/mjs/components/form/editForm/Form.edit.form.js +10 -8
  383. package/lib/mjs/components/hidden/Hidden.form.js +4 -4
  384. package/lib/mjs/components/hidden/Hidden.js +2 -2
  385. package/lib/mjs/components/hidden/editForm/Hidden.edit.data.js +3 -3
  386. package/lib/mjs/components/hidden/editForm/Hidden.edit.display.js +10 -10
  387. package/lib/mjs/components/html/HTML.js +23 -17
  388. package/lib/mjs/components/html/editForm/HTML.edit.display.js +17 -17
  389. package/lib/mjs/components/html/editForm/HTML.edit.logic.js +2 -2
  390. package/lib/mjs/components/number/Number.form.js +3 -3
  391. package/lib/mjs/components/number/Number.js +28 -12
  392. package/lib/mjs/components/number/editForm/Number.edit.data.js +3 -3
  393. package/lib/mjs/components/number/editForm/Number.edit.display.js +4 -4
  394. package/lib/mjs/components/number/editForm/Number.edit.validation.js +9 -9
  395. package/lib/mjs/components/panel/Panel.form.js +1 -1
  396. package/lib/mjs/components/panel/Panel.js +2 -2
  397. package/lib/mjs/components/panel/editForm/Panel.edit.conditional.js +6 -8
  398. package/lib/mjs/components/panel/editForm/Panel.edit.display.js +55 -29
  399. package/lib/mjs/components/password/Password.form.js +3 -3
  400. package/lib/mjs/components/password/Password.js +5 -2
  401. package/lib/mjs/components/password/editForm/Password.edit.data.js +11 -11
  402. package/lib/mjs/components/password/editForm/Password.edit.display.js +3 -3
  403. package/lib/mjs/components/password/editForm/Password.edit.validation.js +3 -3
  404. package/lib/mjs/components/phonenumber/PhoneNumber.form.js +8 -8
  405. package/lib/mjs/components/phonenumber/PhoneNumber.js +3 -3
  406. package/lib/mjs/components/phonenumber/editForm/PhoneNumber.edit.validation.js +6 -6
  407. package/lib/mjs/components/radio/Radio.form.js +3 -3
  408. package/lib/mjs/components/radio/Radio.js +56 -27
  409. package/lib/mjs/components/radio/editForm/Radio.edit.data.js +23 -9
  410. package/lib/mjs/components/radio/editForm/Radio.edit.display.js +6 -6
  411. package/lib/mjs/components/radio/editForm/Radio.edit.validation.js +2 -2
  412. package/lib/mjs/components/recaptcha/ReCaptcha.form.js +5 -5
  413. package/lib/mjs/components/recaptcha/ReCaptcha.js +7 -5
  414. package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +24 -24
  415. package/lib/mjs/components/select/Select.form.js +3 -3
  416. package/lib/mjs/components/select/Select.js +240 -134
  417. package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +1 -1
  418. package/lib/mjs/components/select/editForm/Select.edit.data.js +191 -57
  419. package/lib/mjs/components/select/editForm/Select.edit.display.js +2 -2
  420. package/lib/mjs/components/select/editForm/Select.edit.validation.js +4 -4
  421. package/lib/mjs/components/selectboxes/SelectBoxes.form.js +3 -3
  422. package/lib/mjs/components/selectboxes/SelectBoxes.js +32 -16
  423. package/lib/mjs/components/selectboxes/editForm/SelectBoxes.edit.validation.js +5 -5
  424. package/lib/mjs/components/signature/Signature.form.js +3 -3
  425. package/lib/mjs/components/signature/Signature.js +25 -15
  426. package/lib/mjs/components/signature/editForm/Signature.edit.display.js +19 -10
  427. package/lib/mjs/components/survey/Survey.form.js +3 -3
  428. package/lib/mjs/components/survey/Survey.js +30 -17
  429. package/lib/mjs/components/survey/editForm/Survey.edit.data.js +23 -11
  430. package/lib/mjs/components/survey/editForm/Survey.edit.display.js +1 -1
  431. package/lib/mjs/components/survey/editForm/Survey.edit.validation.js +1 -1
  432. package/lib/mjs/components/table/Table.form.js +1 -1
  433. package/lib/mjs/components/table/Table.js +7 -5
  434. package/lib/mjs/components/table/editForm/Table.edit.display.js +22 -22
  435. package/lib/mjs/components/tabs/Tabs.form.js +1 -1
  436. package/lib/mjs/components/tabs/Tabs.js +26 -8
  437. package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +21 -17
  438. package/lib/mjs/components/tags/Tags.form.js +1 -1
  439. package/lib/mjs/components/tags/Tags.js +28 -12
  440. package/lib/mjs/components/tags/editForm/Tags.edit.data.js +7 -7
  441. package/lib/mjs/components/textarea/TextArea.form.js +2 -2
  442. package/lib/mjs/components/textarea/TextArea.js +75 -51
  443. package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +96 -72
  444. package/lib/mjs/components/textarea/editForm/TextArea.edit.validation.js +3 -3
  445. package/lib/mjs/components/textfield/TextField.form.js +3 -3
  446. package/lib/mjs/components/textfield/TextField.js +34 -23
  447. package/lib/mjs/components/textfield/editForm/TextField.edit.data.js +15 -13
  448. package/lib/mjs/components/textfield/editForm/TextField.edit.display.js +31 -21
  449. package/lib/mjs/components/textfield/editForm/TextField.edit.validation.js +6 -6
  450. package/lib/mjs/components/time/Time.js +17 -10
  451. package/lib/mjs/components/time/editForm/Time.edit.display.js +2 -2
  452. package/lib/mjs/components/unknown/Unknown.form.js +5 -5
  453. package/lib/mjs/components/unknown/Unknown.js +2 -2
  454. package/lib/mjs/components/unknown/editForm/Unknown.edit.display.js +3 -3
  455. package/lib/mjs/components/url/Url.form.js +3 -3
  456. package/lib/mjs/components/url/Url.js +2 -2
  457. package/lib/mjs/components/url/editForm/Url.edit.display.js +3 -3
  458. package/lib/mjs/components/url/editForm/Url.edit.validation.js +1 -1
  459. package/lib/mjs/components/well/Well.form.js +1 -1
  460. package/lib/mjs/components/well/Well.js +2 -2
  461. package/lib/mjs/components/well/editForm/Well.edit.display.js +10 -10
  462. package/lib/mjs/formio.form.d.ts +2 -1
  463. package/lib/mjs/formio.form.js +10 -8
  464. package/lib/mjs/i18n.d.ts +4 -0
  465. package/lib/mjs/i18n.js +7 -3
  466. package/lib/mjs/package.json +1 -1
  467. package/lib/mjs/providers/address/AddressProvider.js +8 -5
  468. package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +3 -3
  469. package/lib/mjs/providers/address/GoogleAddressProvider.js +24 -13
  470. package/lib/mjs/providers/processor/fileProcessor.js +3 -1
  471. package/lib/mjs/providers/storage/azure.js +5 -2
  472. package/lib/mjs/providers/storage/dropbox.js +4 -5
  473. package/lib/mjs/providers/storage/googleDrive.js +3 -4
  474. package/lib/mjs/providers/storage/index.js +1 -1
  475. package/lib/mjs/providers/storage/indexeddb.js +16 -6
  476. package/lib/mjs/providers/storage/s3.js +19 -8
  477. package/lib/mjs/providers/storage/uploadAdapter.js +17 -11
  478. package/lib/mjs/providers/storage/url.js +13 -11
  479. package/lib/mjs/providers/storage/xhr.js +17 -9
  480. package/lib/mjs/templates/index.js +1 -1
  481. package/lib/mjs/translations/de.d.ts +80 -0
  482. package/lib/mjs/translations/de.js +79 -0
  483. package/lib/mjs/translations/en.d.ts +0 -2
  484. package/lib/mjs/translations/en.js +7 -9
  485. package/lib/mjs/utils/ChoicesWrapper.js +2 -2
  486. package/lib/mjs/utils/builder.js +31 -7
  487. package/lib/mjs/utils/calendarUtils.js +7 -5
  488. package/lib/mjs/utils/conditionOperators/ConditionOperator.js +1 -1
  489. package/lib/mjs/utils/conditionOperators/DateGreaterThan.js +16 -5
  490. package/lib/mjs/utils/conditionOperators/IsEmptyValue.js +3 -1
  491. package/lib/mjs/utils/conditionOperators/IsEqualTo.js +10 -6
  492. package/lib/mjs/utils/conditionOperators/index.js +1 -1
  493. package/lib/mjs/utils/formUtils.js +2 -2
  494. package/lib/mjs/utils/i18n.js +7 -1
  495. package/lib/mjs/utils/index.d.ts +2 -1
  496. package/lib/mjs/utils/index.js +3 -3
  497. package/lib/mjs/utils/utils.d.ts +10 -1
  498. package/lib/mjs/utils/utils.js +178 -91
  499. package/lib/mjs/widgets/CalendarWidget.js +67 -50
  500. package/lib/mjs/widgets/InputWidget.js +6 -4
  501. package/lib/mjs/widgets/index.js +1 -1
  502. package/package.json +3 -3
  503. package/lib/cjs/pdf.image.d.ts +0 -2
  504. package/lib/cjs/pdf.image.js +0 -94
  505. package/lib/cjs/utils/jsonlogic/operators.d.ts +0 -1
  506. package/lib/cjs/utils/jsonlogic/operators.js +0 -265
  507. package/lib/mjs/pdf.image.d.ts +0 -2
  508. package/lib/mjs/pdf.image.js +0 -94
  509. package/lib/mjs/utils/jsonlogic/operators.d.ts +0 -1
  510. package/lib/mjs/utils/jsonlogic/operators.js +0 -262
@@ -18,21 +18,21 @@ class DayComponent extends Field_1.default {
18
18
  day: {
19
19
  type: 'number',
20
20
  placeholder: '',
21
- required: false
21
+ required: false,
22
22
  },
23
23
  month: {
24
24
  type: 'select',
25
25
  placeholder: '',
26
- required: false
26
+ required: false,
27
27
  },
28
28
  year: {
29
29
  type: 'number',
30
30
  placeholder: '',
31
- required: false
32
- }
31
+ required: false,
32
+ },
33
33
  },
34
34
  dayFirst: false,
35
- defaultValue: ''
35
+ defaultValue: '',
36
36
  }, ...extend);
37
37
  }
38
38
  static get builderInfo() {
@@ -42,18 +42,29 @@ class DayComponent extends Field_1.default {
42
42
  icon: 'calendar',
43
43
  documentation: '/userguide/form-building/advanced-components#day',
44
44
  weight: 50,
45
- schema: DayComponent.schema()
45
+ schema: DayComponent.schema(),
46
46
  };
47
47
  }
48
48
  static get conditionOperatorsSettings() {
49
- return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { operators: ['isDateEqual', 'isNotDateEqual', 'isEmpty', 'isNotEmpty', 'dateLessThan', 'dateGreaterThan', 'dateLessThanOrEqual', 'dateGreaterThanOrEqual'] });
49
+ return Object.assign(Object.assign({}, super.conditionOperatorsSettings), { operators: [
50
+ 'isDateEqual',
51
+ 'isNotDateEqual',
52
+ 'isEmpty',
53
+ 'isNotEmpty',
54
+ 'dateLessThan',
55
+ 'dateGreaterThan',
56
+ 'dateLessThanOrEqual',
57
+ 'dateGreaterThanOrEqual',
58
+ ] });
50
59
  }
51
60
  static savedValueTypes(schema) {
52
61
  schema = schema || {};
53
- return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.string];
62
+ return ((0, utils_1.getComponentSavedTypes)(schema) || [
63
+ utils_1.componentValueTypes.string,
64
+ ]);
54
65
  }
55
66
  constructor(component, options, data) {
56
- if (!options.inFormBuilder && !options.building) {
67
+ if (options && !options.inFormBuilder && !options.building) {
57
68
  if (component.maxDate && component.maxDate.indexOf('moment(') === -1) {
58
69
  component.maxDate = (0, moment_1.default)(component.maxDate, 'YYYY-MM-DD').toISOString();
59
70
  }
@@ -138,7 +149,7 @@ class DayComponent extends Field_1.default {
138
149
  step: 1,
139
150
  min,
140
151
  max,
141
- }
152
+ },
142
153
  };
143
154
  }
144
155
  selectDefinition(name) {
@@ -150,8 +161,8 @@ class DayComponent extends Field_1.default {
150
161
  id: `${this.component.key}-${name}`,
151
162
  class: 'form-control',
152
163
  name,
153
- lang: this.options.language
154
- }
164
+ lang: this.options.language,
165
+ },
155
166
  };
156
167
  }
157
168
  get days() {
@@ -159,12 +170,12 @@ class DayComponent extends Field_1.default {
159
170
  return this._days;
160
171
  }
161
172
  this._days = [
162
- { value: '', label: lodash_1.default.get(this.component, 'fields.day.placeholder', '') }
173
+ { value: '', label: lodash_1.default.get(this.component, 'fields.day.placeholder', '') },
163
174
  ];
164
175
  for (let x = 1; x <= 31; x++) {
165
176
  this._days.push({
166
177
  value: x,
167
- label: x.toString()
178
+ label: x.toString(),
168
179
  });
169
180
  }
170
181
  return this._days;
@@ -176,7 +187,8 @@ class DayComponent extends Field_1.default {
176
187
  this._months = [
177
188
  {
178
189
  value: '',
179
- label: lodash_1.default.get(this.component, 'fields.month.placeholder') || (this.hideInputLabels ? this.t('Month') : '')
190
+ label: lodash_1.default.get(this.component, 'fields.month.placeholder') ||
191
+ (this.hideInputLabels ? this.t('Month') : ''),
180
192
  },
181
193
  { value: 1, label: 'January' },
182
194
  { value: 2, label: 'February' },
@@ -189,7 +201,7 @@ class DayComponent extends Field_1.default {
189
201
  { value: 9, label: 'September' },
190
202
  { value: 10, label: 'October' },
191
203
  { value: 11, label: 'November' },
192
- { value: 12, label: 'December' }
204
+ { value: 12, label: 'December' },
193
205
  ];
194
206
  return this._months;
195
207
  }
@@ -198,24 +210,32 @@ class DayComponent extends Field_1.default {
198
210
  return this._years;
199
211
  }
200
212
  this._years = [
201
- { value: '', label: lodash_1.default.get(this.component, 'fields.year.placeholder', '') }
213
+ { value: '', label: lodash_1.default.get(this.component, 'fields.year.placeholder', '') },
202
214
  ];
203
215
  const minYears = lodash_1.default.get(this.component, 'fields.year.minYear', 1900) || 1900;
204
216
  const maxYears = lodash_1.default.get(this.component, 'fields.year.maxYear', 2030) || 2030;
205
217
  for (let x = minYears; x <= maxYears; x++) {
206
218
  this._years.push({
207
219
  value: x,
208
- label: x.toString()
220
+ label: x.toString(),
209
221
  });
210
222
  }
211
223
  return this._years;
212
224
  }
213
225
  setErrorClasses(elements, dirty, hasError) {
214
226
  super.setErrorClasses(elements, dirty, hasError);
215
- super.setErrorClasses([this.refs.day, this.refs.month, this.refs.year], dirty, hasError);
227
+ super.setErrorClasses([
228
+ this.refs.day,
229
+ this.refs.month,
230
+ this.refs.year,
231
+ ], dirty, hasError);
216
232
  }
217
233
  removeInputError(elements) {
218
- super.removeInputError([this.refs.day, this.refs.month, this.refs.year]);
234
+ super.removeInputError([
235
+ this.refs.day,
236
+ this.refs.month,
237
+ this.refs.year,
238
+ ]);
219
239
  super.removeInputError(elements);
220
240
  }
221
241
  init() {
@@ -247,18 +267,19 @@ class DayComponent extends Field_1.default {
247
267
  if (this.component.fields[name].type === 'select') {
248
268
  return this.renderTemplate('select', {
249
269
  input: this.selectDefinition(name),
250
- selectOptions: this[`${name}s`].reduce((html, option) => html + this.renderTemplate('selectOption', {
251
- option,
252
- selected: false,
253
- attrs: {}
254
- }), ''),
270
+ selectOptions: this[`${name}s`].reduce((html, option) => html +
271
+ this.renderTemplate('selectOption', {
272
+ option,
273
+ selected: false,
274
+ attrs: {},
275
+ }), ''),
255
276
  });
256
277
  }
257
278
  else {
258
279
  return this.renderTemplate('input', {
259
280
  prefix: this.prefix,
260
281
  suffix: this.suffix,
261
- input: this.inputDefinition(name)
282
+ input: this.inputDefinition(name),
262
283
  });
263
284
  }
264
285
  }
@@ -289,7 +310,8 @@ class DayComponent extends Field_1.default {
289
310
  // TODO: Need to rework this to work with day select as well.
290
311
  // Change day max input when month changes.
291
312
  this.addEventListener(this.refs.month, 'input', () => {
292
- const maxDay = this.refs.year ? parseInt(new Date(this.refs.year.value, this.refs.month.value, 0).getDate(), 10)
313
+ const maxDay = this.refs.year
314
+ ? parseInt(new Date(this.refs.year.value, this.refs.month.value, 0).getDate(), 10)
293
315
  : '';
294
316
  const day = this.getFieldValue('day');
295
317
  if (!this.component.fields.day.hide && maxDay) {
@@ -302,9 +324,15 @@ class DayComponent extends Field_1.default {
302
324
  });
303
325
  this.addEventListener(this.refs.year, 'input', updateValueAndSaveFocus(this.refs.year, 'year'));
304
326
  this.addEventListener(this.refs.input, this.info.changeEvent, () => this.updateValue(null, {
305
- modified: true
327
+ modified: true,
306
328
  }));
307
- [this.refs.day, this.refs.month, this.refs.year].filter((element) => !!element).forEach((element) => {
329
+ [
330
+ this.refs.day,
331
+ this.refs.month,
332
+ this.refs.year,
333
+ ]
334
+ .filter((element) => !!element)
335
+ .forEach((element) => {
308
336
  super.addFocusBlurEvents(element);
309
337
  });
310
338
  }
@@ -355,16 +383,32 @@ class DayComponent extends Field_1.default {
355
383
  }
356
384
  const dateParts = [];
357
385
  const valueParts = value.split('/');
358
- const [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
386
+ const [DAY, MONTH, YEAR,] = this.component.dayFirst
387
+ ? [
388
+ 0,
389
+ 1,
390
+ 2,
391
+ ]
392
+ : [
393
+ 1,
394
+ 0,
395
+ 2,
396
+ ];
359
397
  const defaultValue = this.component.defaultValue ? this.component.defaultValue.split('/') : '';
360
398
  let defaultDay = '';
361
399
  let defaultMonth = '';
362
400
  let defaultYear = '';
363
401
  if (defaultValue) {
364
402
  const hasHiddenFields = defaultValue.length !== 3;
365
- defaultDay = hasHiddenFields ? this.getDayWithHiddenFields(defaultValue).day : defaultValue[DAY];
366
- defaultMonth = hasHiddenFields ? this.getDayWithHiddenFields(defaultValue).month : defaultValue[MONTH];
367
- defaultYear = hasHiddenFields ? this.getDayWithHiddenFields(defaultValue).year : defaultValue[YEAR];
403
+ defaultDay = hasHiddenFields
404
+ ? this.getDayWithHiddenFields(defaultValue).day
405
+ : defaultValue[DAY];
406
+ defaultMonth = hasHiddenFields
407
+ ? this.getDayWithHiddenFields(defaultValue).month
408
+ : defaultValue[MONTH];
409
+ defaultYear = hasHiddenFields
410
+ ? this.getDayWithHiddenFields(defaultValue).year
411
+ : defaultValue[YEAR];
368
412
  }
369
413
  if (this.options.building && defaultValue.length === 3) {
370
414
  return this.component.defaultValue;
@@ -426,7 +470,17 @@ class DayComponent extends Field_1.default {
426
470
  }
427
471
  }
428
472
  getDayWithHiddenFields(parts) {
429
- let [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
473
+ let [DAY, MONTH, YEAR,] = this.component.dayFirst
474
+ ? [
475
+ 0,
476
+ 1,
477
+ 2,
478
+ ]
479
+ : [
480
+ 1,
481
+ 0,
482
+ 2,
483
+ ];
430
484
  if (!this.showDay) {
431
485
  MONTH = MONTH === 0 ? 0 : MONTH - 1;
432
486
  YEAR = YEAR - 1;
@@ -463,7 +517,7 @@ class DayComponent extends Field_1.default {
463
517
  break;
464
518
  }
465
519
  val = parseInt(val, 10);
466
- return (!lodash_1.default.isNaN(val) && lodash_1.default.isNumber(val)) ? val : 0;
520
+ return !lodash_1.default.isNaN(val) && lodash_1.default.isNumber(val) ? val : 0;
467
521
  }
468
522
  get parts() {
469
523
  return {
@@ -487,36 +541,60 @@ class DayComponent extends Field_1.default {
487
541
  getDate(value) {
488
542
  let defaults = [], day, month, year;
489
543
  // Map positions to identifiers to get default values for each part of day
490
- const [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
544
+ const [DAY, MONTH, YEAR,] = this.component.dayFirst
545
+ ? [
546
+ 0,
547
+ 1,
548
+ 2,
549
+ ]
550
+ : [
551
+ 1,
552
+ 0,
553
+ 2,
554
+ ];
491
555
  const defaultValue = value || this.component.defaultValue;
492
556
  if (defaultValue) {
493
- defaults = defaultValue.split('/').map(x => parseInt(x, 10));
557
+ defaults = defaultValue.split('/').map((x) => parseInt(x, 10));
494
558
  }
495
559
  const isModalEditClosed = this.component.modalEdit && !this.componentModal.isOpened;
496
560
  if (this.showDay && this.refs.day) {
497
- day = (this.refs.day.value === '' && !isModalEditClosed) ? '' : parseInt(this.refs.day.value, 10);
561
+ day =
562
+ this.refs.day.value === '' && !isModalEditClosed ? '' : parseInt(this.refs.day.value, 10);
498
563
  }
499
564
  if (day === undefined || lodash_1.default.isNaN(day) || value) {
500
- day = (defaults.length !== 3)
501
- ? this.getDayWithHiddenFields(defaults).day
502
- : (defaults[DAY] && !lodash_1.default.isNaN(defaults[DAY]) ? defaults[DAY] : 0);
565
+ day =
566
+ defaults.length !== 3
567
+ ? this.getDayWithHiddenFields(defaults).day
568
+ : defaults[DAY] && !lodash_1.default.isNaN(defaults[DAY])
569
+ ? defaults[DAY]
570
+ : 0;
503
571
  }
504
572
  if (this.showMonth && this.refs.month) {
505
573
  // Months are 0 indexed.
506
- month = (this.refs.month.value === '' && !isModalEditClosed) ? '' : parseInt(this.refs.month.value, 10);
574
+ month =
575
+ this.refs.month.value === '' && !isModalEditClosed
576
+ ? ''
577
+ : parseInt(this.refs.month.value, 10);
507
578
  }
508
579
  if (month === undefined || lodash_1.default.isNaN(month) || value) {
509
- month = (defaults.length !== 3)
510
- ? this.getDayWithHiddenFields(defaults).month
511
- : (defaults[MONTH] && !lodash_1.default.isNaN(defaults[MONTH]) ? defaults[MONTH] : 0);
580
+ month =
581
+ defaults.length !== 3
582
+ ? this.getDayWithHiddenFields(defaults).month
583
+ : defaults[MONTH] && !lodash_1.default.isNaN(defaults[MONTH])
584
+ ? defaults[MONTH]
585
+ : 0;
512
586
  }
513
587
  if (this.showYear && this.refs.year) {
514
- year = (this.refs.year.value === '' && !isModalEditClosed) ? '' : parseInt(this.refs.year.value);
588
+ year =
589
+ this.refs.year.value === '' && !isModalEditClosed ? '' : parseInt(this.refs.year.value);
515
590
  }
516
591
  if (year === undefined || lodash_1.default.isNaN(year) || value) {
517
- year = (defaults.length !== 3)
518
- ? this.getDayWithHiddenFields(defaults).year
519
- : (defaults[YEAR] && !lodash_1.default.isNaN(defaults[YEAR]) ? defaults[YEAR] : 0);
592
+ year =
593
+ defaults.length !== 3
594
+ ? this.getDayWithHiddenFields(defaults).year
595
+ : defaults[YEAR] && !lodash_1.default.isNaN(defaults[YEAR])
596
+ ? defaults[YEAR]
597
+ : 0;
520
598
  }
521
599
  let result;
522
600
  if (!day && !month && !year) {
@@ -533,10 +611,10 @@ class DayComponent extends Field_1.default {
533
611
  month = this.showMonth ? month.toString().padStart(2, 0) : '';
534
612
  year = this.showYear ? year.toString().padStart(4, 0) : '';
535
613
  if (this.component.dayFirst) {
536
- result = `${day}${this.showDay && this.showMonth || this.showDay && this.showYear ? '/' : ''}${month}${this.showMonth && this.showYear ? '/' : ''}${year}`;
614
+ result = `${day}${(this.showDay && this.showMonth) || (this.showDay && this.showYear) ? '/' : ''}${month}${this.showMonth && this.showYear ? '/' : ''}${year}`;
537
615
  }
538
616
  else {
539
- result = `${month}${this.showDay && this.showMonth || this.showMonth && this.showYear ? '/' : ''}${day}${this.showDay && this.showYear ? '/' : ''}${year}`;
617
+ result = `${month}${(this.showDay && this.showMonth) || (this.showMonth && this.showYear) ? '/' : ''}${day}${this.showDay && this.showYear ? '/' : ''}${year}`;
540
618
  }
541
619
  return result;
542
620
  }
@@ -556,7 +634,7 @@ class DayComponent extends Field_1.default {
556
634
  }
557
635
  getValue() {
558
636
  const result = super.getValue();
559
- return (!result) ? this.dataValue : result;
637
+ return !result ? this.dataValue : result;
560
638
  }
561
639
  /**
562
640
  * Get the value at a specific index.
@@ -590,10 +668,12 @@ class DayComponent extends Field_1.default {
590
668
  if (field && typeof field === 'string' && this.refs[field]) {
591
669
  this.refs[field].focus();
592
670
  }
593
- else if (this.dayFirst && this.showDay || !this.dayFirst && !this.showMonth && this.showDay) {
671
+ else if ((this.dayFirst && this.showDay) ||
672
+ (!this.dayFirst && !this.showMonth && this.showDay)) {
594
673
  (_a = this.refs.day) === null || _a === void 0 ? void 0 : _a.focus();
595
674
  }
596
- else if (this.dayFirst && !this.showDay && this.showMonth || !this.dayFirst && this.showMonth) {
675
+ else if ((this.dayFirst && !this.showDay && this.showMonth) ||
676
+ (!this.dayFirst && this.showMonth)) {
597
677
  (_b = this.refs.month) === null || _b === void 0 ? void 0 : _b.focus();
598
678
  }
599
679
  else if (!this.showDay && !this.showDay && this.showYear) {
@@ -617,12 +697,22 @@ class DayComponent extends Field_1.default {
617
697
  if (!value) {
618
698
  return true;
619
699
  }
620
- const [DAY, MONTH, YEAR] = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2];
700
+ const [DAY, MONTH, YEAR,] = this.component.dayFirst
701
+ ? [
702
+ 0,
703
+ 1,
704
+ 2,
705
+ ]
706
+ : [
707
+ 1,
708
+ 0,
709
+ 2,
710
+ ];
621
711
  const values = value.split('/');
622
712
  if (values.length < 3) {
623
713
  return true;
624
714
  }
625
- return (values[DAY] === '00' || values[MONTH] === '00' || values[YEAR] === '0000');
715
+ return values[DAY] === '00' || values[MONTH] === '00' || values[YEAR] === '0000';
626
716
  }
627
717
  getValidationFormat() {
628
718
  var _a, _b, _c, _d, _e, _f;
@@ -15,14 +15,14 @@ exports.default = [
15
15
  values: [
16
16
  {
17
17
  label: 'Number',
18
- value: 'number'
18
+ value: 'number',
19
19
  },
20
20
  {
21
21
  label: 'Select',
22
- value: 'select'
22
+ value: 'select',
23
23
  },
24
- ]
25
- }
24
+ ],
25
+ },
26
26
  },
27
27
  {
28
28
  weight: 210,
@@ -31,7 +31,7 @@ exports.default = [
31
31
  key: 'fields.day.placeholder',
32
32
  label: 'Placeholder',
33
33
  placeholder: 'Day Placeholder',
34
- tooltip: 'The placeholder text that will appear when Day field is empty.'
34
+ tooltip: 'The placeholder text that will appear when Day field is empty.',
35
35
  },
36
36
  {
37
37
  weight: 215,
@@ -43,9 +43,13 @@ exports.default = [
43
43
  if (data.defaultValue) {
44
44
  const defaultValueParts = data.defaultValue.split('/');
45
45
  if (!data.fields.day.hide && defaultValueParts.length !== 3) {
46
- const newDefaultValue = ['00'];
46
+ const newDefaultValue = [
47
+ '00',
48
+ ];
47
49
  if (!data.fields.month.hide) {
48
- data.dayFirst ? newDefaultValue.push(defaultValueParts[0]) : newDefaultValue.unshift(defaultValueParts[0]);
50
+ data.dayFirst
51
+ ? newDefaultValue.push(defaultValueParts[0])
52
+ : newDefaultValue.unshift(defaultValueParts[0]);
49
53
  }
50
54
  if (!data.fields.year.hide) {
51
55
  newDefaultValue.push(defaultValueParts[1]);
@@ -54,7 +58,7 @@ exports.default = [
54
58
  }
55
59
  }
56
60
  },
57
- input: true
61
+ input: true,
58
62
  },
59
63
  {
60
64
  weight: 214,
@@ -62,6 +66,6 @@ exports.default = [
62
66
  label: 'Day First',
63
67
  tooltip: 'Display the Day field before the Month field.',
64
68
  key: 'dayFirst',
65
- input: true
69
+ input: true,
66
70
  },
67
71
  ];
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = [
4
4
  {
5
5
  key: 'labelPosition',
6
- ignore: true
6
+ ignore: true,
7
7
  },
8
8
  {
9
9
  weight: 15,
@@ -11,7 +11,7 @@ exports.default = [
11
11
  label: 'Hide Input Labels',
12
12
  tooltip: 'Hide the labels of component inputs. This allows you to show the labels in the form builder, but not when it is rendered.',
13
13
  key: 'hideInputLabels',
14
- input: true
14
+ input: true,
15
15
  },
16
16
  {
17
17
  type: 'select',
@@ -27,13 +27,13 @@ exports.default = [
27
27
  { label: 'Top', value: 'top' },
28
28
  { label: 'Left', value: 'left' },
29
29
  { label: 'Right', value: 'right' },
30
- { label: 'Bottom', value: 'bottom' }
31
- ]
32
- }
30
+ { label: 'Bottom', value: 'bottom' },
31
+ ],
32
+ },
33
33
  },
34
34
  {
35
35
  key: 'placeholder',
36
- ignore: true
36
+ ignore: true,
37
37
  },
38
38
  {
39
39
  weight: 213,
@@ -41,6 +41,6 @@ exports.default = [
41
41
  label: 'Use Locale Settings',
42
42
  tooltip: 'Use locale settings to display day.',
43
43
  key: 'useLocaleSettings',
44
- input: true
44
+ input: true,
45
45
  },
46
46
  ];
@@ -15,14 +15,14 @@ exports.default = [
15
15
  values: [
16
16
  {
17
17
  label: 'Number',
18
- value: 'number'
18
+ value: 'number',
19
19
  },
20
20
  {
21
21
  label: 'Select',
22
- value: 'select'
22
+ value: 'select',
23
23
  },
24
- ]
25
- }
24
+ ],
25
+ },
26
26
  },
27
27
  {
28
28
  weight: 210,
@@ -31,7 +31,7 @@ exports.default = [
31
31
  key: 'fields.month.placeholder',
32
32
  label: 'Placeholder',
33
33
  placeholder: 'Month Placeholder',
34
- tooltip: 'The placeholder text that will appear when Month field is empty.'
34
+ tooltip: 'The placeholder text that will appear when Month field is empty.',
35
35
  },
36
36
  {
37
37
  weight: 215,
@@ -43,9 +43,13 @@ exports.default = [
43
43
  if (data.defaultValue) {
44
44
  const defaultValueParts = data.defaultValue.split('/');
45
45
  if (!data.fields.month.hide && defaultValueParts.length !== 3) {
46
- const newDefaultValue = ['00'];
46
+ const newDefaultValue = [
47
+ '00',
48
+ ];
47
49
  if (!data.fields.day.hide) {
48
- data.dayFirst ? newDefaultValue.unshift(defaultValueParts[0]) : newDefaultValue.push(defaultValueParts[0]);
50
+ data.dayFirst
51
+ ? newDefaultValue.unshift(defaultValueParts[0])
52
+ : newDefaultValue.push(defaultValueParts[0]);
49
53
  }
50
54
  if (!data.fields.year.hide) {
51
55
  newDefaultValue.push(defaultValueParts[1]);
@@ -54,6 +58,6 @@ exports.default = [
54
58
  }
55
59
  }
56
60
  },
57
- input: true
61
+ input: true,
58
62
  },
59
63
  ];
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = [
4
4
  {
5
5
  key: 'validate.required',
6
- ignore: true
6
+ ignore: true,
7
7
  },
8
8
  {
9
9
  key: 'validate.unique',
10
- ignore: true
10
+ ignore: true,
11
11
  },
12
12
  {
13
13
  weight: 0,
@@ -15,7 +15,7 @@ exports.default = [
15
15
  label: 'Require Day',
16
16
  tooltip: 'A required field must be filled in before the form can be submitted.',
17
17
  key: 'fields.day.required',
18
- input: true
18
+ input: true,
19
19
  },
20
20
  {
21
21
  weight: 10,
@@ -23,7 +23,7 @@ exports.default = [
23
23
  label: 'Require Month',
24
24
  tooltip: 'A required field must be filled in before the form can be submitted.',
25
25
  key: 'fields.month.required',
26
- input: true
26
+ input: true,
27
27
  },
28
28
  {
29
29
  weight: 20,
@@ -31,14 +31,14 @@ exports.default = [
31
31
  label: 'Require Year',
32
32
  tooltip: 'A required field must be filled in before the form can be submitted.',
33
33
  key: 'fields.year.required',
34
- input: true
34
+ input: true,
35
35
  },
36
36
  {
37
37
  weight: 40,
38
38
  type: 'textfield',
39
39
  label: 'Minimum Day',
40
40
  placeholder: 'yyyy-MM-dd',
41
- tooltip: 'A minimum date that can be set. You can also use Moment.js functions. For example: \n \n moment().subtract(10, \'days\')',
41
+ tooltip: "A minimum date that can be set. You can also use Moment.js functions. For example: \n \n moment().subtract(10, 'days')",
42
42
  key: 'minDate',
43
43
  input: true,
44
44
  },
@@ -47,7 +47,7 @@ exports.default = [
47
47
  type: 'textfield',
48
48
  label: 'Maximum Day',
49
49
  placeholder: 'yyyy-MM-dd',
50
- tooltip: 'A maximum day that can be set. You can also use Moment.js functions. For example: \n \n moment().add(10, \'days\')',
50
+ tooltip: "A maximum day that can be set. You can also use Moment.js functions. For example: \n \n moment().add(10, 'days')",
51
51
  key: 'maxDate',
52
52
  input: true,
53
53
  },
@@ -15,14 +15,14 @@ exports.default = [
15
15
  values: [
16
16
  {
17
17
  label: 'Number',
18
- value: 'number'
18
+ value: 'number',
19
19
  },
20
20
  {
21
21
  label: 'Select',
22
- value: 'select'
22
+ value: 'select',
23
23
  },
24
- ]
25
- }
24
+ ],
25
+ },
26
26
  },
27
27
  {
28
28
  weight: 203,
@@ -31,7 +31,7 @@ exports.default = [
31
31
  key: 'fields.year.minYear',
32
32
  label: 'Minimum Year',
33
33
  placeholder: '1900',
34
- tooltip: 'The minimum year that can be entered.'
34
+ tooltip: 'The minimum year that can be entered.',
35
35
  },
36
36
  {
37
37
  weight: 204,
@@ -40,7 +40,7 @@ exports.default = [
40
40
  key: 'fields.year.maxYear',
41
41
  label: 'Maximum Year',
42
42
  placeholder: '2030',
43
- tooltip: 'The maximum year that can be entered.'
43
+ tooltip: 'The maximum year that can be entered.',
44
44
  },
45
45
  {
46
46
  weight: 210,
@@ -49,7 +49,7 @@ exports.default = [
49
49
  key: 'fields.year.placeholder',
50
50
  label: 'Placeholder',
51
51
  placeholder: 'Year Placeholder',
52
- tooltip: 'The placeholder text that will appear when Year field is empty.'
52
+ tooltip: 'The placeholder text that will appear when Year field is empty.',
53
53
  },
54
54
  {
55
55
  weight: 215,
@@ -66,6 +66,6 @@ exports.default = [
66
66
  }
67
67
  }
68
68
  },
69
- input: true
69
+ input: true,
70
70
  },
71
71
  ];