@formio/js 5.0.0-dev.5672.279701a → 5.0.0-dev.5673.ae99c16

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 (279) hide show
  1. package/Changelog.md +63 -1
  2. package/dist/formio.builder.css +0 -1
  3. package/dist/formio.builder.min.css +1 -1
  4. package/dist/formio.embed.js +1 -1
  5. package/dist/formio.embed.min.js +1 -1
  6. package/dist/formio.form.css +0 -1
  7. package/dist/formio.form.js +648 -596
  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 -9
  11. package/dist/formio.full.css +0 -1
  12. package/dist/formio.full.js +635 -603
  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 -9
  16. package/dist/formio.js +4 -4
  17. package/dist/formio.min.js +1 -1
  18. package/dist/formio.utils.js +102 -40
  19. package/dist/formio.utils.min.js +1 -1
  20. package/dist/formio.utils.min.js.LICENSE.txt +5 -3
  21. package/lib/cjs/CDN.d.ts +1 -0
  22. package/lib/cjs/CDN.js +2 -2
  23. package/lib/cjs/Form.d.ts +2 -2
  24. package/lib/cjs/Form.js +11 -5
  25. package/lib/cjs/Formio.js +1 -0
  26. package/lib/cjs/PDF.js +1 -1
  27. package/lib/cjs/PDFBuilder.js +2 -1
  28. package/lib/cjs/Webform.d.ts +1 -1
  29. package/lib/cjs/Webform.js +11 -6
  30. package/lib/cjs/WebformBuilder.js +13 -3
  31. package/lib/cjs/Wizard.js +1 -1
  32. package/lib/cjs/components/_classes/component/Component.d.ts +4 -3
  33. package/lib/cjs/components/_classes/component/Component.js +31 -8
  34. package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +8 -0
  35. package/lib/cjs/components/_classes/component/fixtures/comp7.d.ts +84 -0
  36. package/lib/cjs/components/_classes/component/fixtures/comp7.js +86 -0
  37. package/lib/cjs/components/_classes/component/fixtures/index.d.ts +2 -1
  38. package/lib/cjs/components/_classes/component/fixtures/index.js +3 -1
  39. package/lib/cjs/components/_classes/input/Input.js +23 -1
  40. package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +8 -1
  41. package/lib/cjs/components/_classes/multivalue/Multivalue.js +45 -25
  42. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +2 -1
  43. package/lib/cjs/components/_classes/nested/NestedComponent.js +5 -1
  44. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +3 -0
  45. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +56 -29
  46. package/lib/cjs/components/address/Address.d.ts +6 -0
  47. package/lib/cjs/components/address/Address.js +11 -1
  48. package/lib/cjs/components/address/editForm/Address.edit.provider.js +1 -1
  49. package/lib/cjs/components/checkbox/Checkbox.d.ts +1 -1
  50. package/lib/cjs/components/checkbox/Checkbox.js +1 -1
  51. package/lib/cjs/components/checkbox/fixtures/comp6.d.ts +32 -0
  52. package/lib/cjs/components/checkbox/fixtures/comp6.js +30 -0
  53. package/lib/cjs/components/checkbox/fixtures/index.d.ts +2 -1
  54. package/lib/cjs/components/checkbox/fixtures/index.js +3 -1
  55. package/lib/cjs/components/currency/Currency.d.ts +2 -0
  56. package/lib/cjs/components/datagrid/DataGrid.d.ts +11 -1
  57. package/lib/cjs/components/datagrid/DataGrid.js +59 -36
  58. package/lib/cjs/components/datagrid/fixtures/comp-with-reorder.d.ts +100 -0
  59. package/lib/cjs/components/datagrid/fixtures/comp-with-reorder.js +139 -0
  60. package/lib/cjs/components/datagrid/fixtures/comp10.d.ts +81 -0
  61. package/lib/cjs/components/datagrid/fixtures/comp10.js +87 -0
  62. package/lib/cjs/components/datagrid/fixtures/comp11.d.ts +50 -0
  63. package/lib/cjs/components/datagrid/fixtures/comp11.js +55 -0
  64. package/lib/cjs/components/datagrid/fixtures/comp9.d.ts +41 -0
  65. package/lib/cjs/components/datagrid/fixtures/comp9.js +44 -0
  66. package/lib/cjs/components/datagrid/fixtures/index.d.ts +5 -1
  67. package/lib/cjs/components/datagrid/fixtures/index.js +9 -1
  68. package/lib/cjs/components/datamap/DataMap.js +2 -2
  69. package/lib/cjs/components/datetime/fixtures/comp14.d.ts +35 -0
  70. package/lib/cjs/components/datetime/fixtures/comp14.js +38 -0
  71. package/lib/cjs/components/datetime/fixtures/index.d.ts +6 -5
  72. package/lib/cjs/components/datetime/fixtures/index.js +3 -1
  73. package/lib/cjs/components/day/Day.d.ts +3 -4
  74. package/lib/cjs/components/day/Day.js +31 -10
  75. package/lib/cjs/components/day/fixtures/comp8.d.ts +41 -0
  76. package/lib/cjs/components/day/fixtures/comp8.js +40 -0
  77. package/lib/cjs/components/day/fixtures/index.d.ts +2 -1
  78. package/lib/cjs/components/day/fixtures/index.js +3 -1
  79. package/lib/cjs/components/editgrid/EditGrid.js +16 -8
  80. package/lib/cjs/components/editgrid/fixtures/comp-test-events.d.ts +54 -0
  81. package/lib/cjs/components/editgrid/fixtures/comp-test-events.js +54 -0
  82. package/lib/cjs/components/editgrid/fixtures/comp16.d.ts +52 -0
  83. package/lib/cjs/components/editgrid/fixtures/comp16.js +71 -0
  84. package/lib/cjs/components/editgrid/fixtures/comp17.d.ts +80 -0
  85. package/lib/cjs/components/editgrid/fixtures/comp17.js +99 -0
  86. package/lib/cjs/components/editgrid/fixtures/index.d.ts +10 -7
  87. package/lib/cjs/components/editgrid/fixtures/index.js +7 -1
  88. package/lib/cjs/components/file/File.d.ts +2 -2
  89. package/lib/cjs/components/file/File.js +13 -2
  90. package/lib/cjs/components/file/editForm/File.edit.display.js +1 -1
  91. package/lib/cjs/components/form/Form.d.ts +1 -1
  92. package/lib/cjs/components/form/Form.js +1 -1
  93. package/lib/cjs/components/form/editForm/Form.edit.form.js +1 -1
  94. package/lib/cjs/components/form/fixtures/index.d.ts +2 -1
  95. package/lib/cjs/components/form/fixtures/index.js +3 -1
  96. package/lib/cjs/components/form/fixtures/nestedWizardForm.d.ts +771 -0
  97. package/lib/cjs/components/form/fixtures/nestedWizardForm.js +765 -0
  98. package/lib/cjs/components/html/HTML.js +1 -1
  99. package/lib/cjs/components/number/Number.d.ts +17 -2
  100. package/lib/cjs/components/number/Number.js +27 -7
  101. package/lib/cjs/components/number/fixtures/comp10.d.ts +18 -0
  102. package/lib/cjs/components/number/fixtures/comp10.js +21 -0
  103. package/lib/cjs/components/number/fixtures/comp8.d.ts +32 -0
  104. package/lib/cjs/components/number/fixtures/comp8.js +28 -0
  105. package/lib/cjs/components/number/fixtures/comp9.d.ts +18 -0
  106. package/lib/cjs/components/number/fixtures/comp9.js +21 -0
  107. package/lib/cjs/components/number/fixtures/index.d.ts +4 -1
  108. package/lib/cjs/components/number/fixtures/index.js +7 -1
  109. package/lib/cjs/components/panel/Panel.d.ts +1 -0
  110. package/lib/cjs/components/panel/Panel.js +1 -0
  111. package/lib/cjs/components/radio/Radio.d.ts +2 -18
  112. package/lib/cjs/components/radio/Radio.js +29 -27
  113. package/lib/cjs/components/radio/fixtures/comp12.d.ts +29 -0
  114. package/lib/cjs/components/radio/fixtures/comp12.js +36 -0
  115. package/lib/cjs/components/radio/fixtures/index.d.ts +2 -1
  116. package/lib/cjs/components/radio/fixtures/index.js +3 -1
  117. package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +6 -0
  118. package/lib/cjs/components/recaptcha/ReCaptcha.js +6 -0
  119. package/lib/cjs/components/select/Select.d.ts +38 -0
  120. package/lib/cjs/components/select/Select.js +14 -5
  121. package/lib/cjs/components/select/fixtures/comp25.d.ts +59 -0
  122. package/lib/cjs/components/select/fixtures/comp25.js +66 -0
  123. package/lib/cjs/components/select/fixtures/comp26.d.ts +44 -0
  124. package/lib/cjs/components/select/fixtures/comp26.js +59 -0
  125. package/lib/cjs/components/select/fixtures/index.d.ts +3 -1
  126. package/lib/cjs/components/select/fixtures/index.js +5 -1
  127. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +0 -22
  128. package/lib/cjs/components/selectboxes/SelectBoxes.js +12 -9
  129. package/lib/cjs/components/signature/editForm/Signature.edit.display.d.ts +0 -6
  130. package/lib/cjs/components/signature/editForm/Signature.edit.display.js +0 -1
  131. package/lib/cjs/components/tags/Tags.js +3 -3
  132. package/lib/cjs/components/time/Time.d.ts +2 -2
  133. package/lib/cjs/components/time/Time.form.js +2 -2
  134. package/lib/cjs/components/time/Time.js +3 -7
  135. package/lib/cjs/components/time/fixtures/comp4.d.ts +166 -0
  136. package/lib/cjs/components/time/fixtures/comp4.js +171 -0
  137. package/lib/cjs/components/time/fixtures/index.d.ts +2 -1
  138. package/lib/cjs/components/time/fixtures/index.js +3 -1
  139. package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +5 -0
  140. package/lib/cjs/providers/address/GoogleAddressProvider.js +23 -1
  141. package/lib/cjs/templates/Templates.js +1 -1
  142. package/lib/cjs/translations/en.d.ts +4 -0
  143. package/lib/cjs/translations/en.js +5 -1
  144. package/lib/cjs/utils/conditionOperators/DateGreaterThan.js +2 -1
  145. package/lib/cjs/utils/conditionOperators/IsEmptyValue.js +4 -3
  146. package/lib/cjs/utils/conditionOperators/IsEqualTo.js +3 -3
  147. package/lib/cjs/utils/utils.d.ts +2 -11
  148. package/lib/cjs/utils/utils.js +60 -24
  149. package/lib/cjs/widgets/CalendarWidget.js +24 -10
  150. package/lib/mjs/CDN.d.ts +1 -0
  151. package/lib/mjs/CDN.js +2 -2
  152. package/lib/mjs/Form.d.ts +2 -2
  153. package/lib/mjs/Form.js +11 -5
  154. package/lib/mjs/Formio.js +1 -0
  155. package/lib/mjs/PDF.js +1 -1
  156. package/lib/mjs/PDFBuilder.js +1 -1
  157. package/lib/mjs/Webform.d.ts +1 -1
  158. package/lib/mjs/Webform.js +15 -6
  159. package/lib/mjs/WebformBuilder.js +12 -3
  160. package/lib/mjs/Wizard.js +1 -1
  161. package/lib/mjs/components/_classes/component/Component.d.ts +4 -3
  162. package/lib/mjs/components/_classes/component/Component.js +17 -5
  163. package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +8 -0
  164. package/lib/mjs/components/_classes/component/fixtures/comp7.d.ts +84 -0
  165. package/lib/mjs/components/_classes/component/fixtures/comp7.js +84 -0
  166. package/lib/mjs/components/_classes/component/fixtures/index.d.ts +2 -1
  167. package/lib/mjs/components/_classes/component/fixtures/index.js +2 -1
  168. package/lib/mjs/components/_classes/input/Input.js +22 -1
  169. package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +8 -1
  170. package/lib/mjs/components/_classes/multivalue/Multivalue.js +45 -25
  171. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +2 -1
  172. package/lib/mjs/components/_classes/nested/NestedComponent.js +5 -1
  173. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +3 -0
  174. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +57 -29
  175. package/lib/mjs/components/address/Address.d.ts +6 -0
  176. package/lib/mjs/components/address/Address.js +14 -1
  177. package/lib/mjs/components/address/editForm/Address.edit.provider.js +1 -1
  178. package/lib/mjs/components/checkbox/Checkbox.d.ts +1 -1
  179. package/lib/mjs/components/checkbox/Checkbox.js +1 -1
  180. package/lib/mjs/components/checkbox/fixtures/comp6.d.ts +32 -0
  181. package/lib/mjs/components/checkbox/fixtures/comp6.js +28 -0
  182. package/lib/mjs/components/checkbox/fixtures/index.d.ts +2 -1
  183. package/lib/mjs/components/checkbox/fixtures/index.js +2 -1
  184. package/lib/mjs/components/currency/Currency.d.ts +2 -0
  185. package/lib/mjs/components/datagrid/DataGrid.d.ts +11 -1
  186. package/lib/mjs/components/datagrid/DataGrid.js +58 -35
  187. package/lib/mjs/components/datagrid/fixtures/comp-with-reorder.d.ts +100 -0
  188. package/lib/mjs/components/datagrid/fixtures/comp-with-reorder.js +137 -0
  189. package/lib/mjs/components/datagrid/fixtures/comp10.d.ts +81 -0
  190. package/lib/mjs/components/datagrid/fixtures/comp10.js +85 -0
  191. package/lib/mjs/components/datagrid/fixtures/comp11.d.ts +50 -0
  192. package/lib/mjs/components/datagrid/fixtures/comp11.js +53 -0
  193. package/lib/mjs/components/datagrid/fixtures/comp9.d.ts +41 -0
  194. package/lib/mjs/components/datagrid/fixtures/comp9.js +42 -0
  195. package/lib/mjs/components/datagrid/fixtures/index.d.ts +5 -1
  196. package/lib/mjs/components/datagrid/fixtures/index.js +5 -1
  197. package/lib/mjs/components/datamap/DataMap.js +2 -2
  198. package/lib/mjs/components/datetime/fixtures/comp14.d.ts +35 -0
  199. package/lib/mjs/components/datetime/fixtures/comp14.js +36 -0
  200. package/lib/mjs/components/datetime/fixtures/index.d.ts +6 -5
  201. package/lib/mjs/components/datetime/fixtures/index.js +2 -1
  202. package/lib/mjs/components/day/Day.d.ts +3 -4
  203. package/lib/mjs/components/day/Day.js +30 -10
  204. package/lib/mjs/components/day/fixtures/comp8.d.ts +41 -0
  205. package/lib/mjs/components/day/fixtures/comp8.js +38 -0
  206. package/lib/mjs/components/day/fixtures/index.d.ts +2 -1
  207. package/lib/mjs/components/day/fixtures/index.js +2 -1
  208. package/lib/mjs/components/editgrid/EditGrid.js +16 -8
  209. package/lib/mjs/components/editgrid/fixtures/comp-test-events.d.ts +54 -0
  210. package/lib/mjs/components/editgrid/fixtures/comp-test-events.js +52 -0
  211. package/lib/mjs/components/editgrid/fixtures/comp16.d.ts +52 -0
  212. package/lib/mjs/components/editgrid/fixtures/comp16.js +69 -0
  213. package/lib/mjs/components/editgrid/fixtures/comp17.d.ts +80 -0
  214. package/lib/mjs/components/editgrid/fixtures/comp17.js +97 -0
  215. package/lib/mjs/components/editgrid/fixtures/index.d.ts +10 -7
  216. package/lib/mjs/components/editgrid/fixtures/index.js +4 -1
  217. package/lib/mjs/components/file/File.d.ts +2 -2
  218. package/lib/mjs/components/file/File.js +13 -2
  219. package/lib/mjs/components/file/editForm/File.edit.display.js +1 -1
  220. package/lib/mjs/components/form/Form.d.ts +1 -1
  221. package/lib/mjs/components/form/Form.js +1 -1
  222. package/lib/mjs/components/form/editForm/Form.edit.form.js +1 -1
  223. package/lib/mjs/components/form/fixtures/index.d.ts +2 -1
  224. package/lib/mjs/components/form/fixtures/index.js +2 -1
  225. package/lib/mjs/components/form/fixtures/nestedWizardForm.d.ts +771 -0
  226. package/lib/mjs/components/form/fixtures/nestedWizardForm.js +763 -0
  227. package/lib/mjs/components/html/HTML.js +1 -1
  228. package/lib/mjs/components/number/Number.d.ts +17 -2
  229. package/lib/mjs/components/number/Number.js +26 -6
  230. package/lib/mjs/components/number/fixtures/comp10.d.ts +18 -0
  231. package/lib/mjs/components/number/fixtures/comp10.js +19 -0
  232. package/lib/mjs/components/number/fixtures/comp8.d.ts +32 -0
  233. package/lib/mjs/components/number/fixtures/comp8.js +26 -0
  234. package/lib/mjs/components/number/fixtures/comp9.d.ts +18 -0
  235. package/lib/mjs/components/number/fixtures/comp9.js +19 -0
  236. package/lib/mjs/components/number/fixtures/index.d.ts +4 -1
  237. package/lib/mjs/components/number/fixtures/index.js +4 -1
  238. package/lib/mjs/components/panel/Panel.d.ts +1 -0
  239. package/lib/mjs/components/panel/Panel.js +1 -0
  240. package/lib/mjs/components/radio/Radio.d.ts +2 -18
  241. package/lib/mjs/components/radio/Radio.js +32 -30
  242. package/lib/mjs/components/radio/fixtures/comp12.d.ts +29 -0
  243. package/lib/mjs/components/radio/fixtures/comp12.js +34 -0
  244. package/lib/mjs/components/radio/fixtures/index.d.ts +2 -1
  245. package/lib/mjs/components/radio/fixtures/index.js +2 -1
  246. package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +6 -0
  247. package/lib/mjs/components/recaptcha/ReCaptcha.js +9 -0
  248. package/lib/mjs/components/select/Select.d.ts +38 -0
  249. package/lib/mjs/components/select/Select.js +17 -6
  250. package/lib/mjs/components/select/fixtures/comp25.d.ts +59 -0
  251. package/lib/mjs/components/select/fixtures/comp25.js +64 -0
  252. package/lib/mjs/components/select/fixtures/comp26.d.ts +44 -0
  253. package/lib/mjs/components/select/fixtures/comp26.js +57 -0
  254. package/lib/mjs/components/select/fixtures/index.d.ts +3 -1
  255. package/lib/mjs/components/select/fixtures/index.js +3 -1
  256. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +0 -22
  257. package/lib/mjs/components/selectboxes/SelectBoxes.js +16 -9
  258. package/lib/mjs/components/signature/editForm/Signature.edit.display.d.ts +0 -6
  259. package/lib/mjs/components/signature/editForm/Signature.edit.display.js +0 -1
  260. package/lib/mjs/components/tags/Tags.js +3 -3
  261. package/lib/mjs/components/time/Time.d.ts +2 -2
  262. package/lib/mjs/components/time/Time.form.js +2 -2
  263. package/lib/mjs/components/time/Time.js +3 -13
  264. package/lib/mjs/components/time/fixtures/comp4.d.ts +166 -0
  265. package/lib/mjs/components/time/fixtures/comp4.js +169 -0
  266. package/lib/mjs/components/time/fixtures/index.d.ts +2 -1
  267. package/lib/mjs/components/time/fixtures/index.js +2 -1
  268. package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +5 -0
  269. package/lib/mjs/providers/address/GoogleAddressProvider.js +22 -1
  270. package/lib/mjs/templates/Templates.js +1 -1
  271. package/lib/mjs/translations/en.d.ts +4 -0
  272. package/lib/mjs/translations/en.js +5 -1
  273. package/lib/mjs/utils/conditionOperators/DateGreaterThan.js +1 -1
  274. package/lib/mjs/utils/conditionOperators/IsEmptyValue.js +3 -3
  275. package/lib/mjs/utils/conditionOperators/IsEqualTo.js +1 -1
  276. package/lib/mjs/utils/utils.d.ts +2 -11
  277. package/lib/mjs/utils/utils.js +59 -13
  278. package/lib/mjs/widgets/CalendarWidget.js +24 -10
  279. package/package.json +5 -6
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ "type": "form",
5
+ "display": "wizard",
6
+ "components": [
7
+ {
8
+ "title": "Page 1",
9
+ "breadcrumbClickable": true,
10
+ "buttonSettings": {
11
+ "previous": true,
12
+ "cancel": true,
13
+ "next": true
14
+ },
15
+ "navigateOnEnter": false,
16
+ "saveOnEnter": false,
17
+ "scrollToTop": false,
18
+ "collapsible": false,
19
+ "key": "page1",
20
+ "type": "panel",
21
+ "label": "Page 1",
22
+ "components": [
23
+ {
24
+ "label": "Time",
25
+ "disabled": true,
26
+ "alwaysEnabled": false,
27
+ "tableView": true,
28
+ "defaultValue": "03:03 PM",
29
+ "key": "time1",
30
+ "type": "time",
31
+ "input": true,
32
+ "inputMask": "99:99",
33
+ "hideOnChildrenHidden": false,
34
+ "id": "efw9yyq",
35
+ "placeholder": "",
36
+ "prefix": "",
37
+ "customClass": "",
38
+ "suffix": "",
39
+ "multiple": false,
40
+ "protected": false,
41
+ "unique": false,
42
+ "persistent": true,
43
+ "hidden": false,
44
+ "clearOnHide": true,
45
+ "refreshOn": "",
46
+ "redrawOn": "",
47
+ "modalEdit": false,
48
+ "dataGridLabel": false,
49
+ "labelPosition": "top",
50
+ "description": "",
51
+ "errorLabel": "",
52
+ "tooltip": "",
53
+ "hideLabel": false,
54
+ "tabindex": "",
55
+ "autofocus": false,
56
+ "dbIndex": false,
57
+ "customDefaultValue": "",
58
+ "calculateValue": "",
59
+ "calculateServer": false,
60
+ "widget": {
61
+ "type": "input"
62
+ },
63
+ "attributes": {},
64
+ "validateOn": "change",
65
+ "validate": {
66
+ "required": false,
67
+ "custom": "",
68
+ "customPrivate": false,
69
+ "strictDateValidation": false,
70
+ "multiple": false,
71
+ "unique": false,
72
+ "minLength": "",
73
+ "maxLength": "",
74
+ "pattern": ""
75
+ },
76
+ "conditional": {
77
+ "show": null,
78
+ "when": null,
79
+ "eq": ""
80
+ },
81
+ "overlay": {
82
+ "style": "",
83
+ "left": "",
84
+ "top": "",
85
+ "width": "",
86
+ "height": ""
87
+ },
88
+ "allowCalculateOverride": false,
89
+ "encrypted": false,
90
+ "showCharCount": false,
91
+ "showWordCount": false,
92
+ "properties": {},
93
+ "allowMultipleMasks": false,
94
+ "addons": [],
95
+ "mask": false,
96
+ "inputType": "time",
97
+ "inputFormat": "plain",
98
+ "displayMask": "",
99
+ "spellcheck": true,
100
+ "truncateMultipleSpaces": false,
101
+ "format": "HH:mm",
102
+ "dataFormat": "HH:mm:ss"
103
+ }
104
+ ],
105
+ "input": false,
106
+ "tableView": false,
107
+ "id": "e7vej1d",
108
+ "placeholder": "",
109
+ "prefix": "",
110
+ "customClass": "",
111
+ "suffix": "",
112
+ "multiple": false,
113
+ "defaultValue": null,
114
+ "protected": false,
115
+ "unique": false,
116
+ "persistent": false,
117
+ "hidden": false,
118
+ "clearOnHide": false,
119
+ "refreshOn": "",
120
+ "redrawOn": "",
121
+ "modalEdit": false,
122
+ "dataGridLabel": false,
123
+ "labelPosition": "top",
124
+ "description": "",
125
+ "errorLabel": "",
126
+ "tooltip": "",
127
+ "hideLabel": false,
128
+ "tabindex": "",
129
+ "disabled": false,
130
+ "autofocus": false,
131
+ "dbIndex": false,
132
+ "customDefaultValue": "",
133
+ "calculateValue": "",
134
+ "calculateServer": false,
135
+ "widget": null,
136
+ "attributes": {},
137
+ "validateOn": "change",
138
+ "validate": {
139
+ "required": false,
140
+ "custom": "",
141
+ "customPrivate": false,
142
+ "strictDateValidation": false,
143
+ "multiple": false,
144
+ "unique": false
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
+ "tree": false,
166
+ "lazyLoad": false,
167
+ "theme": "default",
168
+ "breadcrumb": "default"
169
+ }
170
+ ],
171
+ };
@@ -1,6 +1,7 @@
1
1
  import comp1 from './comp1';
2
2
  import comp2 from './comp2';
3
3
  import comp3 from './comp3';
4
+ import comp4 from './comp4';
4
5
  import timeForm from './timeForm';
5
6
  import timeForm2 from './timeForm2';
6
- export { comp1, comp2, comp3, timeForm, timeForm2 };
7
+ export { comp1, comp2, comp3, comp4, timeForm, timeForm2 };
@@ -3,13 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.timeForm2 = exports.timeForm = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
6
+ exports.timeForm2 = exports.timeForm = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
7
7
  const comp1_1 = __importDefault(require("./comp1"));
8
8
  exports.comp1 = comp1_1.default;
9
9
  const comp2_1 = __importDefault(require("./comp2"));
10
10
  exports.comp2 = comp2_1.default;
11
11
  const comp3_1 = __importDefault(require("./comp3"));
12
12
  exports.comp3 = comp3_1.default;
13
+ const comp4_1 = __importDefault(require("./comp4"));
14
+ exports.comp4 = comp4_1.default;
13
15
  const timeForm_1 = __importDefault(require("./timeForm"));
14
16
  exports.timeForm = timeForm_1.default;
15
17
  const timeForm2_1 = __importDefault(require("./timeForm2"));
@@ -82,6 +82,11 @@ export class GoogleAddressProvider extends AddressProvider {
82
82
  search(): Promise<void>;
83
83
  makeRequest(): Promise<void>;
84
84
  getDisplayValue(address: any): any;
85
+ /**
86
+ * Tries to remove the library if api key for loaded script is different.
87
+ * @param {ProviderOptions} options - The options for the provider.
88
+ */
89
+ tryRemoveLibrary(options?: ProviderOptions): void;
85
90
  }
86
91
  export type AutocompleteOptions = {
87
92
  /**
@@ -8,6 +8,9 @@ exports.GoogleAddressProvider = void 0;
8
8
  const Formio_1 = require("../../Formio");
9
9
  const lodash_1 = __importDefault(require("lodash"));
10
10
  const AddressProvider_1 = require("./AddressProvider");
11
+ const GOOGLE_MAPS_BASE_URL = 'https://maps.googleapis.com';
12
+ const GOOGLE_MAPS_JS_URL = `${GOOGLE_MAPS_BASE_URL}/maps/api/js`;
13
+ const GOOGLE_MAPS_JS_WITH_PARAMS_URL = `${GOOGLE_MAPS_JS_URL}?v=quarterly&libraries=places&loading=async&callback=googleMapsCallback`;
11
14
  /**
12
15
  * @typedef {object} AutocompleteOptions
13
16
  * @property {string[]} fields - The fields to include in the autocomplete response.
@@ -55,10 +58,11 @@ class GoogleAddressProvider extends AddressProvider_1.AddressProvider {
55
58
  var _a;
56
59
  super(options);
57
60
  this.setAutocompleteOptions();
58
- let src = 'https://maps.googleapis.com/maps/api/js?v=quarterly&libraries=places&loading=async&callback=googleMapsCallback';
61
+ let src = GOOGLE_MAPS_JS_WITH_PARAMS_URL;
59
62
  if ((_a = options.params) === null || _a === void 0 ? void 0 : _a.key) {
60
63
  src += `&key=${options.params.key}`;
61
64
  }
65
+ this.tryRemoveLibrary(options);
62
66
  Formio_1.Formio.requireLibrary(this.getLibraryName(), 'google.maps.places', src);
63
67
  }
64
68
  /**
@@ -185,5 +189,23 @@ class GoogleAddressProvider extends AddressProvider_1.AddressProvider {
185
189
  : this.alternativeDisplayValueProperty;
186
190
  return lodash_1.default.get(address, displayedProperty, '');
187
191
  }
192
+ /**
193
+ * Tries to remove the library if api key for loaded script is different.
194
+ * @param {ProviderOptions} options - The options for the provider.
195
+ */
196
+ tryRemoveLibrary(options = {}) {
197
+ var _a, _b, _c;
198
+ if (!Formio_1.Formio.libraries[this.getLibraryName()]) {
199
+ return;
200
+ }
201
+ const existingScript = document.querySelector(`script[src^="${GOOGLE_MAPS_JS_URL}"]`);
202
+ if (existingScript && ((_a = options.params) === null || _a === void 0 ? void 0 : _a.key) && !existingScript.attributes.src.value.endsWith(options.params.key)) {
203
+ const googleMapsScripts = (_b = document.querySelectorAll(`script[src^="${GOOGLE_MAPS_BASE_URL}"]`)) !== null && _b !== void 0 ? _b : [];
204
+ googleMapsScripts.forEach(script => script.parentNode.removeChild(script));
205
+ delete Formio_1.Formio.libraries[this.getLibraryName()];
206
+ (_c = global === null || global === void 0 ? void 0 : global.google) === null || _c === void 0 ? true : delete _c.maps;
207
+ delete global[`${this.getLibraryName()}Callback`];
208
+ }
209
+ }
188
210
  }
189
211
  exports.GoogleAddressProvider = GoogleAddressProvider;
@@ -6,5 +6,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const index_1 = __importDefault(require("./index"));
7
7
  const experimental_1 = require("@formio/core/experimental");
8
8
  experimental_1.Template.addTemplates(index_1.default);
9
- experimental_1.Template.defaultTemplates = index_1.default.bootstrap;
9
+ experimental_1.Template.defaultTemplates = experimental_1.Template.templates.bootstrap;
10
10
  exports.default = experimental_1.Template;
@@ -74,5 +74,9 @@ declare namespace _default {
74
74
  let apiKey: string;
75
75
  let typeRemaining: string;
76
76
  let typeCount: string;
77
+ let requiredDayField: string;
78
+ let requiredDayEmpty: string;
79
+ let requiredMonthField: string;
80
+ let requiredYearField: string;
77
81
  }
78
82
  export default _default;
@@ -75,5 +75,9 @@ exports.default = {
75
75
  reCaptchaTokenNotSpecifiedError: 'ReCAPTCHA: Token is not specified in submission',
76
76
  apiKey: 'API Key is not unique: {{key}}',
77
77
  typeRemaining: '{{ remaining }} {{ type }} remaining.',
78
- typeCount: '{{ count }} {{ type }}'
78
+ typeCount: '{{ count }} {{ type }}',
79
+ requiredDayField: '{{ field }} is required',
80
+ requiredDayEmpty: '{{ field }} is required',
81
+ requiredMonthField: '{{ field }} is required',
82
+ requiredYearField: '{{ field }} is required'
79
83
  };
@@ -19,12 +19,13 @@ class DateGeaterThan extends ConditionOperator_1.default {
19
19
  return { date, comparedDate };
20
20
  }
21
21
  execute(options, functionName = 'isAfter') {
22
+ var _a;
22
23
  const { value, instance, conditionComponentPath } = options;
23
24
  if (!value) {
24
25
  return false;
25
26
  }
26
27
  let conditionTriggerComponent = null;
27
- if (instance && instance.root) {
28
+ if ((_a = instance === null || instance === void 0 ? void 0 : instance.root) === null || _a === void 0 ? void 0 : _a.getComponent) {
28
29
  conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);
29
30
  }
30
31
  if (conditionTriggerComponent && conditionTriggerComponent.isPartialDay && conditionTriggerComponent.isPartialDay(value)) {
@@ -16,10 +16,11 @@ class IsEmptyValue extends ConditionOperator_1.default {
16
16
  return false;
17
17
  }
18
18
  execute({ value, instance, conditionComponentPath }) {
19
- const isEmptyValue = lodash_1.default.isEmpty(value);
20
- if (instance && instance.root) {
19
+ var _a;
20
+ const isEmptyValue = lodash_1.default.isEmpty(lodash_1.default.isNumber(value) ? String(value) : value);
21
+ if ((_a = instance === null || instance === void 0 ? void 0 : instance.root) === null || _a === void 0 ? void 0 : _a.getComponent) {
21
22
  const conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);
22
- return conditionTriggerComponent ? conditionTriggerComponent.isEmpty() : isEmptyValue;
23
+ return (conditionTriggerComponent === null || conditionTriggerComponent === void 0 ? void 0 : conditionTriggerComponent.isEmpty) ? conditionTriggerComponent.isEmpty() : isEmptyValue;
23
24
  }
24
25
  return isEmptyValue;
25
26
  }
@@ -14,7 +14,7 @@ class IsEqualTo extends ConditionOperator_1.default {
14
14
  return 'Is Equal To';
15
15
  }
16
16
  execute({ value, comparedValue, instance, conditionComponentPath }) {
17
- var _a;
17
+ var _a, _b;
18
18
  if ((value || value === false) && comparedValue && typeof value !== typeof comparedValue && lodash_1.default.isString(comparedValue)) {
19
19
  try {
20
20
  comparedValue = JSON.parse(comparedValue);
@@ -22,11 +22,11 @@ class IsEqualTo extends ConditionOperator_1.default {
22
22
  // eslint-disable-next-line no-empty
23
23
  catch (e) { }
24
24
  }
25
- if (instance && instance.root) {
25
+ if ((_a = instance === null || instance === void 0 ? void 0 : instance.root) === null || _a === void 0 ? void 0 : _a.getComponent) {
26
26
  const conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);
27
27
  if (conditionTriggerComponent
28
28
  && (0, utils_1.isSelectResourceWithObjectValue)(conditionTriggerComponent.component)
29
- && ((_a = conditionTriggerComponent.component) === null || _a === void 0 ? void 0 : _a.template)) {
29
+ && ((_b = conditionTriggerComponent.component) === null || _b === void 0 ? void 0 : _b.template)) {
30
30
  if (!value || !lodash_1.default.isPlainObject(value)) {
31
31
  return false;
32
32
  }
@@ -56,16 +56,7 @@ export function isMongoId(text: string): boolean;
56
56
  * @param {*} rowData - The contextual row data for the component.
57
57
  */
58
58
  export function checkCalculated(component: import('@formio/core').Component, submission: import('@formio/core').Submission, rowData: any): void;
59
- /**
60
- * Check if a simple conditional evaluates to true.
61
- * @param {import('@formio/core').Component} component - The component to check for the conditional.
62
- * @param {import('@formio/core').SimpleConditional} condition - The condition to check.
63
- * @param {*} row - The row data for the component.
64
- * @param {*} data - The full submission data.
65
- * @param {import('../../src/components/_classes/component/Component').Component} instance - The instance of the component.
66
- * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.
67
- */
68
- export function checkSimpleConditional(component: import('@formio/core').Component, condition: import('@formio/core').SimpleConditional, row: any, data: any, instance: any): boolean;
59
+ export function checkSimpleConditional(component: any, condition: any, row: any, data: any, instance: any): boolean;
69
60
  /**
70
61
  * Returns a components normalized value.
71
62
  * @param {string} compPath - The full path to the component.
@@ -532,4 +523,4 @@ import jsonLogic from 'json-logic-js';
532
523
  import ConditionOperators from './conditionOperators';
533
524
  import { Evaluator } from './Evaluator';
534
525
  export const interpolate: typeof Evaluator.interpolate;
535
- export { jsonLogic, ConditionOperators, Evaluator, _ };
526
+ export { jsonLogic, ConditionOperators, moment, Evaluator, _ };
@@ -11,21 +11,9 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
11
11
  if (k2 === undefined) k2 = k;
12
12
  o[k2] = m[k];
13
13
  }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
14
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
15
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
16
  };
22
- var __importStar = (this && this.__importStar) || function (mod) {
23
- if (mod && mod.__esModule) return mod;
24
- var result = {};
25
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
- __setModuleDefault(result, mod);
27
- return result;
28
- };
29
17
  var __importDefault = (this && this.__importDefault) || function (mod) {
30
18
  return (mod && mod.__esModule) ? mod : { "default": mod };
31
19
  };
@@ -34,10 +22,10 @@ exports.firstNonNil = exports.unfold = exports.bootstrapVersion = exports.unique
34
22
  exports.isSelectResourceWithObjectValue = exports.getItemTemplateKeys = exports.interpolateErrors = exports.getComponentSavedTypes = exports.componentValueTypes = exports._ = exports.getFocusableElements = exports.isInsideScopingComponent = exports.isPromise = exports.getDataParentComponent = exports.getComponentPath = exports.getComponentPathWithoutIndicies = exports.getBrowserInfo = exports.getIEBrowserVersion = exports.round = exports.getStringFromComponentPath = exports.isChildOf = exports.getArrayFromComponentPath = exports.isInputComponent = exports.interpolate = exports.Evaluator = exports.fastCloneDeep = exports.sanitize = exports.translateHTMLTemplate = exports.getContextButtons = exports.getContextComponents = exports.observeOverload = exports.withSwitch = void 0;
35
23
  const lodash_1 = __importDefault(require("lodash"));
36
24
  exports._ = lodash_1.default;
37
- const fetch_ponyfill_1 = __importDefault(require("fetch-ponyfill"));
38
25
  const json_logic_js_1 = __importDefault(require("json-logic-js"));
39
26
  exports.jsonLogic = json_logic_js_1.default;
40
27
  const moment_timezone_1 = __importDefault(require("moment-timezone/moment-timezone"));
28
+ exports.moment = moment_timezone_1.default;
41
29
  const jstimezonedetect_1 = __importDefault(require("jstimezonedetect"));
42
30
  const operators_1 = require("./jsonlogic/operators");
43
31
  const dompurify_1 = __importDefault(require("dompurify"));
@@ -48,9 +36,6 @@ const conditionOperators_1 = __importDefault(require("./conditionOperators"));
48
36
  exports.ConditionOperators = conditionOperators_1.default;
49
37
  const interpolate = Evaluator_1.Evaluator.interpolate;
50
38
  exports.interpolate = interpolate;
51
- const { fetch } = (0, fetch_ponyfill_1.default)({
52
- Promise: Promise
53
- });
54
39
  __exportStar(require("./formUtils"), exports);
55
40
  // Configure JsonLogic
56
41
  operators_1.lodashOperators.forEach((name) => json_logic_js_1.default.add_operation(`_${name}`, lodash_1.default[name]));
@@ -66,7 +51,6 @@ json_logic_js_1.default.add_operation('relativeMinDate', (relativeMinDate) => {
66
51
  json_logic_js_1.default.add_operation('relativeMaxDate', (relativeMaxDate) => {
67
52
  return (0, moment_timezone_1.default)().add(relativeMaxDate, 'days').toISOString();
68
53
  });
69
- exports.moment = __importStar(require("moment-timezone/moment-timezone"));
70
54
  /**
71
55
  * Sets the path to the component and parent schema.
72
56
  * @param {import('@formio/core').Component} component - The component to set the path for.
@@ -194,6 +178,44 @@ exports.checkCalculated = checkCalculated;
194
178
  * @param {import('../../src/components/_classes/component/Component').Component} instance - The instance of the component.
195
179
  * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.
196
180
  */
181
+ function getConditionalPathsRecursive(conditionPaths, data) {
182
+ let currentGlobalIndex = 0;
183
+ const conditionalPathsArray = [];
184
+ const getConditionalPaths = (data, currentPath = '', localIndex = 0) => {
185
+ currentPath = currentPath.replace(/^\.+|\.+$/g, '');
186
+ const currentLocalIndex = localIndex;
187
+ const currentData = lodash_1.default.get(data, currentPath);
188
+ if (Array.isArray(currentData) && currentData.filter(Boolean).length > 0) {
189
+ if (currentData.some(element => typeof element !== 'object')) {
190
+ return;
191
+ }
192
+ const hasInnerDataArray = currentData.find(x => Array.isArray(x[conditionPaths[currentLocalIndex]]));
193
+ if (hasInnerDataArray) {
194
+ currentData.forEach((_, indexOutside) => {
195
+ const innerCompDataPath = `${currentPath}[${indexOutside}].${conditionPaths[currentLocalIndex]}`;
196
+ getConditionalPaths(data, innerCompDataPath, currentLocalIndex + 1);
197
+ });
198
+ }
199
+ else {
200
+ currentData.forEach((x, index) => {
201
+ if (!lodash_1.default.isNil(x[conditionPaths[currentLocalIndex]])) {
202
+ const compDataPath = `${currentPath}[${index}].${conditionPaths[currentLocalIndex]}`;
203
+ conditionalPathsArray.push(compDataPath);
204
+ }
205
+ });
206
+ }
207
+ }
208
+ else {
209
+ if (!conditionPaths[currentGlobalIndex]) {
210
+ return;
211
+ }
212
+ currentGlobalIndex = currentGlobalIndex + 1;
213
+ getConditionalPaths(data, `${currentPath}.${conditionPaths[currentGlobalIndex - 1]}`, currentGlobalIndex);
214
+ }
215
+ };
216
+ getConditionalPaths(data);
217
+ return conditionalPathsArray;
218
+ }
197
219
  function checkSimpleConditional(component, condition, row, data, instance) {
198
220
  if (condition.when) {
199
221
  const value = getComponentActualValue(condition.when, data, row);
@@ -215,23 +237,37 @@ function checkSimpleConditional(component, condition, row, data, instance) {
215
237
  return true;
216
238
  }
217
239
  const conditionsResult = lodash_1.default.map(conditions, (cond) => {
240
+ var _a, _b;
218
241
  const { value: comparedValue, operator, component: conditionComponentPath } = cond;
219
242
  if (!conditionComponentPath) {
220
243
  return true;
221
244
  }
222
- const value = getComponentActualValue(conditionComponentPath, data, row);
223
- const ConditionOperator = conditionOperators_1.default[operator];
224
- return ConditionOperator
225
- ? new ConditionOperator().getResult({ value, comparedValue, instance, component, conditionComponentPath })
226
- : true;
245
+ const splittedConditionPath = conditionComponentPath.split('.');
246
+ const conditionalPaths = ((_a = instance === null || instance === void 0 ? void 0 : instance.parent) === null || _a === void 0 ? void 0 : _a.type) === 'datagrid' || ((_b = instance === null || instance === void 0 ? void 0 : instance.parent) === null || _b === void 0 ? void 0 : _b.type) === 'editgrid' ? [] : getConditionalPathsRecursive(splittedConditionPath, data);
247
+ if (conditionalPaths.length > 0) {
248
+ return conditionalPaths.map((path) => {
249
+ const value = getComponentActualValue(path, data, row);
250
+ const ConditionOperator = conditionOperators_1.default[operator];
251
+ return ConditionOperator
252
+ ? new ConditionOperator().getResult({ value, comparedValue, instance, component, conditionComponentPath })
253
+ : true;
254
+ });
255
+ }
256
+ else {
257
+ const value = getComponentActualValue(conditionComponentPath, data, row);
258
+ const СonditionOperator = conditionOperators_1.default[operator];
259
+ return СonditionOperator
260
+ ? new СonditionOperator().getResult({ value, comparedValue, instance, component, conditionComponentPath })
261
+ : true;
262
+ }
227
263
  });
228
264
  let result = false;
229
265
  switch (conjunction) {
230
266
  case 'any':
231
- result = lodash_1.default.some(conditionsResult, res => !!res);
267
+ result = lodash_1.default.some(conditionsResult.flat(), res => !!res);
232
268
  break;
233
269
  default:
234
- result = lodash_1.default.every(conditionsResult, res => !!res);
270
+ result = lodash_1.default.every(conditionsResult.flat(), res => !!res);
235
271
  }
236
272
  return show ? result : !result;
237
273
  }
@@ -102,14 +102,8 @@ class CalendarWidget extends InputWidget_1.default {
102
102
  this.settings.dateFormat = (0, utils_1.convertFormatToFlatpickr)(this.settings.dateFormat);
103
103
  this.settings.position = 'auto center';
104
104
  this.settings.onChange = () => {
105
- if (this.settings.allowInput) {
106
- if (this.settings.isManuallyOverriddenValue && this.settings.enableTime) {
107
- this.calendar._input.value = this.settings.manualInputValue;
108
- }
109
- else {
110
- this.settings.manualInputValue = '';
111
- }
112
- this.settings.isManuallyOverriddenValue = false;
105
+ if (this.settings.allowInput && this.settings.enableTime) {
106
+ this.calendar._input.value = this.settings.isManuallyOverriddenValue ? this.settings.manualInputValue : this.calendar.altInput.value;
113
107
  }
114
108
  this.emit('update');
115
109
  };
@@ -118,8 +112,7 @@ class CalendarWidget extends InputWidget_1.default {
118
112
  this.hook('onCalendarClose');
119
113
  this.closedOn = Date.now();
120
114
  if (this.settings.allowInput && this.settings.enableTime) {
121
- this.calendar._input.value = this.settings.manualInputValue || this.calendar._input.value;
122
- this.settings.isManuallyOverriddenValue = false;
115
+ this.calendar._input.value = this.settings.isManuallyOverriddenValue ? this.settings.manualInputValue : this.calendar.altInput.value;
123
116
  this.emit('update');
124
117
  }
125
118
  if (this.settings.wasDefaultValueChanged) {
@@ -358,9 +351,14 @@ class CalendarWidget extends InputWidget_1.default {
358
351
  this.calendar = new Flatpickr(this._input, Object.assign(Object.assign({}, this.settings), { disableMobile: true }));
359
352
  this.addEventListener(this.calendar.altInput, 'input', (event) => {
360
353
  if (this.settings.allowInput && this.settings.currentValue !== event.target.value) {
354
+ if (event.target.mask) {
355
+ event.target.mask.textMaskInputElement.update();
356
+ }
361
357
  this.settings.manualInputValue = event.target.value;
358
+ this._input.value = this.settings.manualInputValue;
362
359
  this.settings.isManuallyOverriddenValue = true;
363
360
  this.settings.currentValue = event.target.value;
361
+ this.emit('update');
364
362
  }
365
363
  if (event.target.value === '' && this.calendar.selectedDates.length > 0) {
366
364
  this.settings.wasDefaultValueChanged = true;
@@ -371,6 +369,18 @@ class CalendarWidget extends InputWidget_1.default {
371
369
  this.settings.wasDefaultValueChanged = false;
372
370
  }
373
371
  });
372
+ if (this.calendar.daysContainer) {
373
+ this.calendar.daysContainer.addEventListener('click', () => {
374
+ this.settings.isManuallyOverriddenValue = false;
375
+ this.calendar.updateValue(false);
376
+ });
377
+ }
378
+ if (this.calendar.timeContainer) {
379
+ this.calendar.timeContainer.addEventListener('click', () => {
380
+ this.settings.isManuallyOverriddenValue = false;
381
+ this.calendar.updateValue(false);
382
+ });
383
+ }
374
384
  const excludedFromMaskFormats = ['MMMM'];
375
385
  if (!this.settings.readOnly && !lodash_1.default.some(excludedFromMaskFormats, format => lodash_1.default.includes(this.settings.format, format))) {
376
386
  // Enforce the input mask of the format.
@@ -397,6 +407,10 @@ class CalendarWidget extends InputWidget_1.default {
397
407
  // Make sure we commit the value after a blur event occurs.
398
408
  this.addEventListener(this.calendar._input, 'blur', (event) => {
399
409
  var _a, _b, _c, _d;
410
+ // If we have manually overridden the value then we shouldn't call setDate because this will fill the input mask
411
+ if (this.settings.isManuallyOverriddenValue) {
412
+ return;
413
+ }
400
414
  const activeElement = this.settings.shadowRoot ? this.settings.shadowRoot.activeElement : document.activeElement;
401
415
  const relatedTarget = event.relatedTarget ? event.relatedTarget : activeElement;
402
416
  if (!(isIEBrowser && !relatedTarget) && !this.isCalendarElement(relatedTarget)) {
package/lib/mjs/CDN.d.ts CHANGED
@@ -13,6 +13,7 @@ declare class CDN {
13
13
  bootswatch: string;
14
14
  'bootstrap-icons': string;
15
15
  ckeditor: string;
16
+ dragula: string;
16
17
  flatpickr: string;
17
18
  'flatpickr-formio': string;
18
19
  'font-awesome': string;
package/lib/mjs/CDN.js CHANGED
@@ -16,6 +16,7 @@ class CDN {
16
16
  'bootswatch': '5.3.3',
17
17
  'bootstrap-icons': '1.11.1',
18
18
  'ckeditor': '19.0.0',
19
+ 'dragula': '3.7.3',
19
20
  'flatpickr': '4.6.8',
20
21
  'flatpickr-formio': '4.6.13-formio.3',
21
22
  'font-awesome': '4.7.0',
@@ -62,8 +63,7 @@ class CDN {
62
63
  url += `/${lib}`;
63
64
  }
64
65
  // Only attach the version if this is the hosted cdn.
65
- if (cdnUrl.includes('form.io') &&
66
- version && version !== 'latest') {
66
+ if (cdnUrl.match(/cdn\.(test-)?form.io/) && version && version !== 'latest') {
67
67
  url += `/${version}`;
68
68
  }
69
69
  return url;
package/lib/mjs/Form.d.ts CHANGED
@@ -398,10 +398,10 @@ export default class Form extends Element {
398
398
  getFormInitOptions(url: string, form: import('@formio/core').Form): object;
399
399
  /**
400
400
  * Sets the form to the JSON schema of a form.
401
- * @param {import('@formio/core').Form} formParam - The form JSON to set this form to.
401
+ * @param {import('@formio/core').Form | string} formParam - The form JSON to set this form to.
402
402
  * @returns {Promise<Webform|Wizard|PDF>} - The webform instance that was created.
403
403
  */
404
- setForm(formParam: import('@formio/core').Form): Promise<Webform | Wizard | PDF>;
404
+ setForm(formParam: import('@formio/core').Form | string): Promise<Webform | Wizard | PDF>;
405
405
  _form: any;
406
406
  getSubmission(formio: any, opts: any): any;
407
407
  /**