@formio/vpat 2.6.1

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 (274) hide show
  1. package/README.md +12 -0
  2. package/dist/vpat.js +1410 -0
  3. package/dist/vpat.min.js +1 -0
  4. package/lib/Webform.d.ts +2 -0
  5. package/lib/Webform.js +105 -0
  6. package/lib/WebformBuilder.d.ts +2 -0
  7. package/lib/WebformBuilder.js +145 -0
  8. package/lib/Wizard.d.ts +2 -0
  9. package/lib/Wizard.js +87 -0
  10. package/lib/builders/Builders.d.ts +4 -0
  11. package/lib/builders/Builders.js +9 -0
  12. package/lib/builders/index.d.ts +2 -0
  13. package/lib/builders/index.js +7 -0
  14. package/lib/components/address/Address.d.ts +5 -0
  15. package/lib/components/address/Address.js +10 -0
  16. package/lib/components/button/Button.d.ts +6 -0
  17. package/lib/components/button/Button.form.d.ts +1 -0
  18. package/lib/components/button/Button.form.js +25 -0
  19. package/lib/components/button/Button.js +12 -0
  20. package/lib/components/button/editForm/Button.edit.display.d.ts +5 -0
  21. package/lib/components/button/editForm/Button.edit.display.js +32 -0
  22. package/lib/components/checkbox/Checkbox.d.ts +17 -0
  23. package/lib/components/checkbox/Checkbox.form.d.ts +1 -0
  24. package/lib/components/checkbox/Checkbox.form.js +22 -0
  25. package/lib/components/checkbox/Checkbox.js +33 -0
  26. package/lib/components/checkbox/editForm/Checkbox.edit.data.d.ts +5 -0
  27. package/lib/components/checkbox/editForm/Checkbox.edit.data.js +12 -0
  28. package/lib/components/checkbox/editForm/Checkbox.edit.display.d.ts +5 -0
  29. package/lib/components/checkbox/editForm/Checkbox.edit.display.js +44 -0
  30. package/lib/components/columns/Columns.d.ts +6 -0
  31. package/lib/components/columns/Columns.form.d.ts +1 -0
  32. package/lib/components/columns/Columns.form.js +17 -0
  33. package/lib/components/columns/Columns.js +12 -0
  34. package/lib/components/columns/editForm/Columns.edit.display.d.ts +5 -0
  35. package/lib/components/columns/editForm/Columns.edit.display.js +16 -0
  36. package/lib/components/component/Component.d.ts +2 -0
  37. package/lib/components/component/Component.js +316 -0
  38. package/lib/components/componentmodal/ComponentModal.d.ts +2 -0
  39. package/lib/components/componentmodal/ComponentModal.js +217 -0
  40. package/lib/components/container/Container.d.ts +6 -0
  41. package/lib/components/container/Container.form.d.ts +1 -0
  42. package/lib/components/container/Container.form.js +22 -0
  43. package/lib/components/container/Container.js +12 -0
  44. package/lib/components/container/editForm/Container.edit.data.d.ts +5 -0
  45. package/lib/components/container/editForm/Container.edit.data.js +8 -0
  46. package/lib/components/container/editForm/Container.edit.display.d.ts +5 -0
  47. package/lib/components/container/editForm/Container.edit.display.js +12 -0
  48. package/lib/components/content/Content.d.ts +6 -0
  49. package/lib/components/content/Content.form.d.ts +1 -0
  50. package/lib/components/content/Content.form.js +8 -0
  51. package/lib/components/content/Content.js +12 -0
  52. package/lib/components/currency/Currency.d.ts +6 -0
  53. package/lib/components/currency/Currency.form.d.ts +1 -0
  54. package/lib/components/currency/Currency.form.js +26 -0
  55. package/lib/components/currency/Currency.js +12 -0
  56. package/lib/components/currency/editForm/Currency.edit.data.d.ts +17 -0
  57. package/lib/components/currency/editForm/Currency.edit.data.js +188 -0
  58. package/lib/components/currency/editForm/Currency.edit.display.d.ts +5 -0
  59. package/lib/components/currency/editForm/Currency.edit.display.js +8 -0
  60. package/lib/components/currency/editForm/Currency.edit.validation.d.ts +5 -0
  61. package/lib/components/currency/editForm/Currency.edit.validation.js +24 -0
  62. package/lib/components/datagrid/DataGrid.d.ts +5 -0
  63. package/lib/components/datagrid/DataGrid.js +10 -0
  64. package/lib/components/datamap/DataMap.d.ts +5 -0
  65. package/lib/components/datamap/DataMap.js +10 -0
  66. package/lib/components/datatable/DataTable.d.ts +3 -0
  67. package/lib/components/datatable/DataTable.js +8 -0
  68. package/lib/components/datetime/DateTime.d.ts +6 -0
  69. package/lib/components/datetime/DateTime.form.d.ts +1 -0
  70. package/lib/components/datetime/DateTime.form.js +27 -0
  71. package/lib/components/datetime/DateTime.js +12 -0
  72. package/lib/components/datetime/editForm/DateTime.edit.data.d.ts +5 -0
  73. package/lib/components/datetime/editForm/DateTime.edit.data.js +8 -0
  74. package/lib/components/datetime/editForm/DateTime.edit.display.d.ts +5 -0
  75. package/lib/components/datetime/editForm/DateTime.edit.display.js +32 -0
  76. package/lib/components/datetime/editForm/DateTime.edit.validation.d.ts +5 -0
  77. package/lib/components/datetime/editForm/DateTime.edit.validation.js +8 -0
  78. package/lib/components/day/Day.d.ts +13 -0
  79. package/lib/components/day/Day.form.d.ts +1 -0
  80. package/lib/components/day/Day.form.js +41 -0
  81. package/lib/components/day/Day.js +16 -0
  82. package/lib/components/day/editForm/Day.edit.data.d.ts +5 -0
  83. package/lib/components/day/editForm/Day.edit.data.js +16 -0
  84. package/lib/components/day/editForm/Day.edit.day.d.ts +40 -0
  85. package/lib/components/day/editForm/Day.edit.day.js +48 -0
  86. package/lib/components/day/editForm/Day.edit.display.d.ts +18 -0
  87. package/lib/components/day/editForm/Day.edit.display.js +36 -0
  88. package/lib/components/day/editForm/Day.edit.month.d.ts +40 -0
  89. package/lib/components/day/editForm/Day.edit.month.js +40 -0
  90. package/lib/components/day/editForm/Day.edit.validation.d.ts +29 -0
  91. package/lib/components/day/editForm/Day.edit.validation.js +58 -0
  92. package/lib/components/day/editForm/Day.edit.year.d.ts +10 -0
  93. package/lib/components/day/editForm/Day.edit.year.js +22 -0
  94. package/lib/components/dynamicwizard/DynamicWizard.d.ts +3 -0
  95. package/lib/components/dynamicwizard/DynamicWizard.js +8 -0
  96. package/lib/components/editgrid/EditGrid.d.ts +5 -0
  97. package/lib/components/editgrid/EditGrid.js +10 -0
  98. package/lib/components/email/Email.d.ts +6 -0
  99. package/lib/components/email/Email.form.d.ts +1 -0
  100. package/lib/components/email/Email.form.js +21 -0
  101. package/lib/components/email/Email.js +12 -0
  102. package/lib/components/email/editForm/Email.edit.display.d.ts +5 -0
  103. package/lib/components/email/editForm/Email.edit.display.js +8 -0
  104. package/lib/components/email/editForm/Email.edit.validation.d.ts +5 -0
  105. package/lib/components/email/editForm/Email.edit.validation.js +12 -0
  106. package/lib/components/fieldset/Fieldset.d.ts +6 -0
  107. package/lib/components/fieldset/Fieldset.form.d.ts +1 -0
  108. package/lib/components/fieldset/Fieldset.form.js +22 -0
  109. package/lib/components/fieldset/Fieldset.js +12 -0
  110. package/lib/components/file/File.d.ts +20 -0
  111. package/lib/components/file/File.form.d.ts +1 -0
  112. package/lib/components/file/File.form.js +17 -0
  113. package/lib/components/file/File.js +87 -0
  114. package/lib/components/file/editForm/File.edit.display.d.ts +5 -0
  115. package/lib/components/file/editForm/File.edit.display.js +24 -0
  116. package/lib/components/form/Form.d.ts +5 -0
  117. package/lib/components/form/Form.js +10 -0
  118. package/lib/components/hidden/Hidden.d.ts +6 -0
  119. package/lib/components/hidden/Hidden.form.d.ts +1 -0
  120. package/lib/components/hidden/Hidden.form.js +8 -0
  121. package/lib/components/hidden/Hidden.js +12 -0
  122. package/lib/components/html/HTML.d.ts +6 -0
  123. package/lib/components/html/HTML.form.d.ts +1 -0
  124. package/lib/components/html/HTML.form.js +8 -0
  125. package/lib/components/html/HTML.js +12 -0
  126. package/lib/components/index.d.ts +87 -0
  127. package/lib/components/index.js +95 -0
  128. package/lib/components/input/Input.d.ts +2 -0
  129. package/lib/components/input/Input.js +20 -0
  130. package/lib/components/nested/NestedComponent.d.ts +2 -0
  131. package/lib/components/nested/NestedComponent.js +18 -0
  132. package/lib/components/number/Number.d.ts +6 -0
  133. package/lib/components/number/Number.form.d.ts +1 -0
  134. package/lib/components/number/Number.form.js +26 -0
  135. package/lib/components/number/Number.js +12 -0
  136. package/lib/components/number/editForm/Number.edit.data.d.ts +18 -0
  137. package/lib/components/number/editForm/Number.edit.data.js +32 -0
  138. package/lib/components/number/editForm/Number.edit.display.d.ts +5 -0
  139. package/lib/components/number/editForm/Number.edit.display.js +12 -0
  140. package/lib/components/number/editForm/Number.edit.validation.d.ts +20 -0
  141. package/lib/components/number/editForm/Number.edit.validation.js +46 -0
  142. package/lib/components/panel/Panel.d.ts +6 -0
  143. package/lib/components/panel/Panel.form.d.ts +1 -0
  144. package/lib/components/panel/Panel.form.js +17 -0
  145. package/lib/components/panel/Panel.js +12 -0
  146. package/lib/components/panel/editForm/Panel.edit.display.d.ts +21 -0
  147. package/lib/components/panel/editForm/Panel.edit.display.js +29 -0
  148. package/lib/components/password/Password.d.ts +6 -0
  149. package/lib/components/password/Password.form.d.ts +1 -0
  150. package/lib/components/password/Password.form.js +26 -0
  151. package/lib/components/password/Password.js +12 -0
  152. package/lib/components/password/editForm/Password.edit.data.d.ts +18 -0
  153. package/lib/components/password/editForm/Password.edit.data.js +48 -0
  154. package/lib/components/password/editForm/Password.edit.display.d.ts +5 -0
  155. package/lib/components/password/editForm/Password.edit.display.js +8 -0
  156. package/lib/components/password/editForm/Password.edit.validation.d.ts +5 -0
  157. package/lib/components/password/editForm/Password.edit.validation.js +16 -0
  158. package/lib/components/phonenumber/PhoneNumber.d.ts +6 -0
  159. package/lib/components/phonenumber/PhoneNumber.form.d.ts +1 -0
  160. package/lib/components/phonenumber/PhoneNumber.form.js +21 -0
  161. package/lib/components/phonenumber/PhoneNumber.js +12 -0
  162. package/lib/components/phonenumber/editForm/PhoneNumber.edit.display.d.ts +5 -0
  163. package/lib/components/phonenumber/editForm/PhoneNumber.edit.display.js +8 -0
  164. package/lib/components/phonenumber/editForm/PhoneNumber.edit.validation.d.ts +5 -0
  165. package/lib/components/phonenumber/editForm/PhoneNumber.edit.validation.js +28 -0
  166. package/lib/components/radio/Radio.d.ts +2 -0
  167. package/lib/components/radio/Radio.form.d.ts +1 -0
  168. package/lib/components/radio/Radio.form.js +22 -0
  169. package/lib/components/radio/Radio.js +45 -0
  170. package/lib/components/radio/editForm/Radio.edit.data.d.ts +13 -0
  171. package/lib/components/radio/editForm/Radio.edit.data.js +25 -0
  172. package/lib/components/radio/editForm/Radio.edit.display.d.ts +5 -0
  173. package/lib/components/radio/editForm/Radio.edit.display.js +32 -0
  174. package/lib/components/recaptcha/ReCaptcha.d.ts +5 -0
  175. package/lib/components/recaptcha/ReCaptcha.js +10 -0
  176. package/lib/components/select/Select.d.ts +17 -0
  177. package/lib/components/select/Select.form.d.ts +1 -0
  178. package/lib/components/select/Select.form.js +27 -0
  179. package/lib/components/select/Select.js +39 -0
  180. package/lib/components/select/editForm/Select.edit.data.d.ts +5 -0
  181. package/lib/components/select/editForm/Select.edit.data.js +16 -0
  182. package/lib/components/select/editForm/Select.edit.display.d.ts +5 -0
  183. package/lib/components/select/editForm/Select.edit.display.js +32 -0
  184. package/lib/components/select/editForm/Select.edit.validation.d.ts +5 -0
  185. package/lib/components/select/editForm/Select.edit.validation.js +8 -0
  186. package/lib/components/selectboxes/SelectBoxes.d.ts +6 -0
  187. package/lib/components/selectboxes/SelectBoxes.form.d.ts +1 -0
  188. package/lib/components/selectboxes/SelectBoxes.form.js +25 -0
  189. package/lib/components/selectboxes/SelectBoxes.js +12 -0
  190. package/lib/components/selectboxes/editForm/SelectBoxes.edit.validation.d.ts +9 -0
  191. package/lib/components/selectboxes/editForm/SelectBoxes.edit.validation.js +36 -0
  192. package/lib/components/signature/Signature.d.ts +5 -0
  193. package/lib/components/signature/Signature.js +10 -0
  194. package/lib/components/sketchpad/Sketchpad.d.ts +3 -0
  195. package/lib/components/sketchpad/Sketchpad.js +8 -0
  196. package/lib/components/survey/Survey.d.ts +5 -0
  197. package/lib/components/survey/Survey.js +10 -0
  198. package/lib/components/table/Table.d.ts +6 -0
  199. package/lib/components/table/Table.form.d.ts +1 -0
  200. package/lib/components/table/Table.form.js +17 -0
  201. package/lib/components/table/Table.js +12 -0
  202. package/lib/components/table/editForm/Table.edit.display.d.ts +5 -0
  203. package/lib/components/table/editForm/Table.edit.display.js +24 -0
  204. package/lib/components/tabs/Tabs.d.ts +5 -0
  205. package/lib/components/tabs/Tabs.js +10 -0
  206. package/lib/components/tagpad/Tagpad.d.ts +3 -0
  207. package/lib/components/tagpad/Tagpad.js +8 -0
  208. package/lib/components/tags/Tags.d.ts +5 -0
  209. package/lib/components/tags/Tags.js +10 -0
  210. package/lib/components/textarea/TextArea.d.ts +6 -0
  211. package/lib/components/textarea/TextArea.form.d.ts +1 -0
  212. package/lib/components/textarea/TextArea.form.js +16 -0
  213. package/lib/components/textarea/TextArea.js +12 -0
  214. package/lib/components/textarea/editForm/TextArea.edit.display.d.ts +20 -0
  215. package/lib/components/textarea/editForm/TextArea.edit.display.js +20 -0
  216. package/lib/components/textfield/TextField.d.ts +7 -0
  217. package/lib/components/textfield/TextField.form.d.ts +1 -0
  218. package/lib/components/textfield/TextField.form.js +27 -0
  219. package/lib/components/textfield/TextField.js +16 -0
  220. package/lib/components/textfield/editForm/TextField.edit.data.d.ts +5 -0
  221. package/lib/components/textfield/editForm/TextField.edit.data.js +16 -0
  222. package/lib/components/textfield/editForm/TextField.edit.display.d.ts +5 -0
  223. package/lib/components/textfield/editForm/TextField.edit.display.js +52 -0
  224. package/lib/components/textfield/editForm/TextField.edit.validation.d.ts +5 -0
  225. package/lib/components/textfield/editForm/TextField.edit.validation.js +8 -0
  226. package/lib/components/time/Time.d.ts +10 -0
  227. package/lib/components/time/Time.form.d.ts +1 -0
  228. package/lib/components/time/Time.form.js +31 -0
  229. package/lib/components/time/Time.js +16 -0
  230. package/lib/components/time/editForm/Time.edit.data.d.ts +5 -0
  231. package/lib/components/time/editForm/Time.edit.data.js +16 -0
  232. package/lib/components/time/editForm/Time.edit.display.d.ts +5 -0
  233. package/lib/components/time/editForm/Time.edit.display.js +28 -0
  234. package/lib/components/tooltip/Tooltip.d.ts +35 -0
  235. package/lib/components/tooltip/Tooltip.js +259 -0
  236. package/lib/components/unknown/Unknown.d.ts +5 -0
  237. package/lib/components/unknown/Unknown.js +10 -0
  238. package/lib/components/url/Url.d.ts +6 -0
  239. package/lib/components/url/Url.form.d.ts +1 -0
  240. package/lib/components/url/Url.form.js +26 -0
  241. package/lib/components/url/Url.js +12 -0
  242. package/lib/components/url/editForm/Url.edit.data.d.ts +5 -0
  243. package/lib/components/url/editForm/Url.edit.data.js +8 -0
  244. package/lib/components/url/editForm/Url.edit.display.d.ts +5 -0
  245. package/lib/components/url/editForm/Url.edit.display.js +8 -0
  246. package/lib/components/url/editForm/Url.edit.validation.d.ts +5 -0
  247. package/lib/components/url/editForm/Url.edit.validation.js +12 -0
  248. package/lib/components/well/Well.d.ts +6 -0
  249. package/lib/components/well/Well.form.d.ts +1 -0
  250. package/lib/components/well/Well.form.js +18 -0
  251. package/lib/components/well/Well.js +12 -0
  252. package/lib/displays/index.d.ts +5 -0
  253. package/lib/displays/index.js +11 -0
  254. package/lib/index.d.ts +65 -0
  255. package/lib/index.js +21 -0
  256. package/lib/plugins/index.d.ts +2 -0
  257. package/lib/plugins/index.js +3 -0
  258. package/lib/providers/auth/index.d.ts +2 -0
  259. package/lib/providers/auth/index.js +3 -0
  260. package/lib/providers/index.d.ts +5 -0
  261. package/lib/providers/index.js +11 -0
  262. package/lib/providers/storage/index.d.ts +2 -0
  263. package/lib/providers/storage/index.js +3 -0
  264. package/lib/templates/index.d.ts +2 -0
  265. package/lib/templates/index.js +3 -0
  266. package/lib/util/index.d.ts +4 -0
  267. package/lib/util/index.js +23 -0
  268. package/lib/util/modalUtils.d.ts +3 -0
  269. package/lib/util/modalUtils.js +62 -0
  270. package/lib/widgets/CalendarWidget.d.ts +3 -0
  271. package/lib/widgets/CalendarWidget.js +116 -0
  272. package/lib/widgets/index.d.ts +4 -0
  273. package/lib/widgets/index.js +9 -0
  274. package/package.json +61 -0
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const Webform_1 = __importDefault(require("../Webform"));
7
+ const Wizard_1 = __importDefault(require("../Wizard"));
8
+ exports.default = {
9
+ webform: Webform_1.default,
10
+ wizard: Wizard_1.default,
11
+ };
package/lib/index.d.ts ADDED
@@ -0,0 +1,65 @@
1
+ declare const _default: {
2
+ builders: {
3
+ webform: any;
4
+ };
5
+ components: {
6
+ address: typeof import("./components/address/Address").default;
7
+ component: any;
8
+ button: typeof import("./components/button/Button").default;
9
+ checkbox: typeof import("./components/checkbox/Checkbox").default;
10
+ columns: typeof import("./components/columns/Columns").default;
11
+ container: typeof import("./components/container/Container").default;
12
+ content: typeof import("./components/content/Content").default;
13
+ currency: typeof import("./components/currency/Currency").default;
14
+ day: typeof import("./components/day/Day").default;
15
+ dynamicWizard: typeof import("./components/dynamicwizard/DynamicWizard").default;
16
+ datagrid: typeof import("./components/datagrid/DataGrid").default;
17
+ datamap: typeof import("./components/datamap/DataMap").default;
18
+ datatable: typeof import("./components/datatable/DataTable").default;
19
+ datetime: typeof import("./components/datetime/DateTime").default;
20
+ editgrid: typeof import("./components/editgrid/EditGrid").default;
21
+ email: typeof import("./components/email/Email").default;
22
+ fieldset: typeof import("./components/fieldset/Fieldset").default;
23
+ file: typeof import("./components/file/File").default;
24
+ form: typeof import("./components/form/Form").default;
25
+ hidden: typeof import("./components/hidden/Hidden").default;
26
+ htmlelement: typeof import("./components/html/HTML").default;
27
+ input: any;
28
+ nested: any;
29
+ number: typeof import("./components/number/Number").default;
30
+ panel: typeof import("./components/panel/Panel").default;
31
+ password: typeof import("./components/password/Password").default;
32
+ phoneNumber: typeof import("./components/phonenumber/PhoneNumber").default;
33
+ radio: any;
34
+ recaptcha: typeof import("./components/recaptcha/ReCaptcha").default;
35
+ select: typeof import("./components/select/Select").default;
36
+ selectboxes: typeof import("./components/selectboxes/SelectBoxes").default;
37
+ signature: typeof import("./components/signature/Signature").default;
38
+ sketchpad: typeof import("./components/sketchpad/Sketchpad").default;
39
+ survey: typeof import("./components/survey/Survey").default;
40
+ table: typeof import("./components/table/Table").default;
41
+ tabs: typeof import("./components/tabs/Tabs").default;
42
+ tagpad: typeof import("./components/tagpad/Tagpad").default;
43
+ tags: typeof import("./components/tags/Tags").default;
44
+ textarea: typeof import("./components/textarea/TextArea").default;
45
+ textfield: typeof import("./components/textfield/TextField").default;
46
+ time: typeof import("./components/time/Time").default;
47
+ unknown: typeof import("./components/unknown/Unknown").default;
48
+ url: typeof import("./components/url/Url").default;
49
+ well: typeof import("./components/well/Well").default;
50
+ };
51
+ displays: {
52
+ webform: any;
53
+ wizard: any;
54
+ };
55
+ plugins: {};
56
+ providers: {
57
+ auth: {};
58
+ storage: {};
59
+ };
60
+ templates: {};
61
+ widgets: {
62
+ calendar: typeof import("@formio/js/lib/cjs/widgets/CalendarWidget").default;
63
+ };
64
+ };
65
+ export default _default;
package/lib/index.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const builders_1 = __importDefault(require("./builders"));
7
+ const components_1 = __importDefault(require("./components"));
8
+ const displays_1 = __importDefault(require("./displays"));
9
+ const plugins_1 = __importDefault(require("./plugins"));
10
+ const providers_1 = __importDefault(require("./providers"));
11
+ const templates_1 = __importDefault(require("./templates"));
12
+ const widgets_1 = __importDefault(require("./widgets"));
13
+ exports.default = {
14
+ builders: builders_1.default,
15
+ components: components_1.default,
16
+ displays: displays_1.default,
17
+ plugins: plugins_1.default,
18
+ providers: providers_1.default,
19
+ templates: templates_1.default,
20
+ widgets: widgets_1.default,
21
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {};
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {};
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ auth: {};
3
+ storage: {};
4
+ };
5
+ export default _default;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const auth_1 = __importDefault(require("./auth"));
7
+ const storage_1 = __importDefault(require("./storage"));
8
+ exports.default = {
9
+ auth: auth_1.default,
10
+ storage: storage_1.default,
11
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {};
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {};
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ override(classObj: any, extenders: any): void;
3
+ };
4
+ export default _default;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ override(classObj, extenders) {
5
+ for (const key in extenders) {
6
+ if (extenders.hasOwnProperty(key)) {
7
+ const extender = extenders[key];
8
+ if (typeof extender === 'function') {
9
+ classObj.prototype[key] = extender;
10
+ }
11
+ else {
12
+ const prop = Object.getOwnPropertyDescriptor(classObj.prototype, key);
13
+ for (const attr in extender) {
14
+ if (extender.hasOwnProperty(attr)) {
15
+ prop[attr] = extender[attr](prop[attr]);
16
+ }
17
+ }
18
+ Object.defineProperty(classObj.prototype, key, prop);
19
+ }
20
+ }
21
+ }
22
+ }
23
+ };
@@ -0,0 +1,3 @@
1
+ export declare const toggleHideBackgroundElements: (element: any, flag: any) => void;
2
+ export declare const focusTrap: (focusableElements: any, event: any) => void;
3
+ export declare const getFocusableElements: (container: any) => any[];
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFocusableElements = exports.focusTrap = exports.toggleHideBackgroundElements = void 0;
4
+ const FOCUSABLE_SELECTOR = `button:not([disabled]), [href], [role="link"], input:not([disabled]),
5
+ select:not([disabled]), textarea:not([disabled]), [tabindex]:not([disabled]), iframe`;
6
+ const HEADER_SELECTOR = 'h1, h2, h3, h4, h5, h6';
7
+ const TAB_KEYCODE = 9;
8
+ const toggleHideBackgroundElements = (element, flag) => {
9
+ const documentFocusableElements = Array.prototype.slice.call(document.querySelectorAll(FOCUSABLE_SELECTOR));
10
+ const modalFocusableElements = Array.prototype.slice.call(element.querySelectorAll(FOCUSABLE_SELECTOR));
11
+ const elementsToHide = documentFocusableElements.filter(element => modalFocusableElements.indexOf(element) < 0);
12
+ const documentHeaders = Array.prototype.slice.call(document.querySelectorAll(HEADER_SELECTOR));
13
+ const modalHeaders = Array.prototype.slice.call(element.querySelectorAll(HEADER_SELECTOR));
14
+ const headersToHide = documentHeaders.filter(element => modalHeaders.indexOf(element) < 0);
15
+ elementsToHide.forEach(element => {
16
+ const tabIndex = element.getAttribute('tabindex');
17
+ if (flag) {
18
+ if (tabIndex !== null) {
19
+ element.dataset.tabindex = tabIndex;
20
+ }
21
+ element.tabIndex = -1;
22
+ element.setAttribute('aria-hidden', true);
23
+ }
24
+ else {
25
+ const dataTabIndex = element.dataset.tabindex;
26
+ if (dataTabIndex !== undefined) {
27
+ element.tabIndex = dataTabIndex;
28
+ element.removeAttribute('data-tabindex');
29
+ }
30
+ else if (tabIndex === '-1') {
31
+ element.removeAttribute('tabindex');
32
+ }
33
+ element.removeAttribute('aria-hidden');
34
+ }
35
+ });
36
+ headersToHide.forEach(element => {
37
+ if (flag) {
38
+ element.setAttribute('aria-hidden', true);
39
+ }
40
+ else {
41
+ element.removeAttribute('aria-hidden');
42
+ }
43
+ });
44
+ };
45
+ exports.toggleHideBackgroundElements = toggleHideBackgroundElements;
46
+ const focusTrap = (focusableElements, event) => {
47
+ const firstFocusableElement = focusableElements[0];
48
+ const lastFocusableElement = focusableElements[focusableElements.length - 1];
49
+ if (event.keyCode === TAB_KEYCODE) {
50
+ if (event.target === firstFocusableElement && event.shiftKey) {
51
+ event.preventDefault();
52
+ lastFocusableElement.focus();
53
+ }
54
+ if (event.target === lastFocusableElement && !event.shiftKey) {
55
+ event.preventDefault();
56
+ firstFocusableElement.focus();
57
+ }
58
+ }
59
+ };
60
+ exports.focusTrap = focusTrap;
61
+ const getFocusableElements = (container) => [...container.querySelectorAll(FOCUSABLE_SELECTOR)];
62
+ exports.getFocusableElements = getFocusableElements;
@@ -0,0 +1,3 @@
1
+ import { Widgets } from '@formio/js';
2
+ declare const Calendar: typeof Widgets.calendar;
3
+ export default Calendar;
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const js_1 = require("@formio/js");
7
+ const Calendar = js_1.Widgets.calendar;
8
+ const util_1 = __importDefault(require("../util"));
9
+ const transform = (type, value) => {
10
+ return js_1.Templates.current.hasOwnProperty('transform') ? js_1.Templates.current.transform(type, value) : value;
11
+ };
12
+ util_1.default.override(Calendar, {
13
+ attach: {
14
+ value: (_super) => {
15
+ return function attach(input) {
16
+ const widgetTitle = !this.settings.noCalendar
17
+ ? this.settings.enableTime
18
+ ? 'Date/Time widget'
19
+ : 'Calendar widget'
20
+ : 'Time widget';
21
+ const handleLiveRegion = (element, text) => {
22
+ if (element) {
23
+ element.innerHTML = text;
24
+ }
25
+ };
26
+ const liveRegion = document.getElementById(`${this.component.id}-liveRegion`);
27
+ this.settings.altInputClass = '';
28
+ this.settings.onDayCreate = (dObj, dStr, fp, dayElem) => {
29
+ const label = dayElem.getAttribute('aria-label');
30
+ const elementText = dayElem.innerHTML;
31
+ dayElem.innerHTML = `<span aria-hidden="true">${elementText}</span><span class="${transform('class', 'sr-only')}">${label}</span>`;
32
+ };
33
+ const labelledbyIds = input.getAttribute('aria-labelledby');
34
+ this.options.hooks = this.options.hooks || {};
35
+ this.options.hooks.onCalendarOpen = () => {
36
+ handleLiveRegion(liveRegion, '');
37
+ setTimeout(() => {
38
+ handleLiveRegion(liveRegion, `${widgetTitle} has been opened`);
39
+ }, 50);
40
+ };
41
+ this.options.hooks.onCalendarClose = () => {
42
+ handleLiveRegion(liveRegion, `${widgetTitle} has been closed`);
43
+ };
44
+ const superAttach = _super.call(this, input);
45
+ return superAttach.then(() => {
46
+ if (this._input && this.calendar.calendarContainer) {
47
+ const calendar = this.calendar;
48
+ calendar.calendarContainer.setAttribute('role', 'application');
49
+ calendar.altInput.id = this._input.id;
50
+ calendar.altInput.setAttribute('aria-labelledby', labelledbyIds);
51
+ this._input.removeAttribute('id');
52
+ this._input.removeAttribute('aria-labelledby');
53
+ const isRequired = this._input.getAttribute('aria-required');
54
+ if (isRequired) {
55
+ calendar.altInput.setAttribute('aria-required', isRequired);
56
+ }
57
+ const monthToStr = (monthNumber, locale) => locale.months.longhand[monthNumber];
58
+ const switchMonth = (e) => {
59
+ const prevMonthNav = calendar.prevMonthNav;
60
+ const nextMonthNav = calendar.nextMonthNav;
61
+ const isPrevMonth = prevMonthNav.contains(e.target);
62
+ const isNextMonth = nextMonthNav.contains(e.target);
63
+ const changeMonth = (value) => {
64
+ calendar.changeMonth.call(this, value);
65
+ handleLiveRegion(liveRegion, `Switched to ${monthToStr(calendar.currentMonth, calendar.l10n)}, ${calendar.currentYear}`);
66
+ };
67
+ if (e.type === 'keydown') {
68
+ if (e.keyCode === 32 || e.keyCode === 13) {
69
+ if (isPrevMonth || isNextMonth) {
70
+ e.preventDefault();
71
+ changeMonth(isPrevMonth ? -1 : 1);
72
+ }
73
+ }
74
+ }
75
+ if (e.type === 'click') {
76
+ if (isPrevMonth || isNextMonth) {
77
+ e.preventDefault();
78
+ handleLiveRegion(liveRegion, `Switched to ${monthToStr(calendar.currentMonth, calendar.l10n)}, ${calendar.currentYear}`);
79
+ }
80
+ }
81
+ };
82
+ const switchPeriod = (e) => {
83
+ const periodContainer = calendar.amPM;
84
+ const oppositePeriod = periodContainer.innerHTML === 'AM' ? 'PM' : 'AM';
85
+ if (e.type === 'click' || e.keyCode === 38 || e.keyCode === 40) {
86
+ periodContainer.setAttribute('aria-label', `${oppositePeriod}. Use arrow keys to switch period`);
87
+ handleLiveRegion(liveRegion, `Switched to ${oppositePeriod}`);
88
+ }
89
+ };
90
+ const monthNav = calendar.monthNav;
91
+ this.addEventListener(monthNav, 'keydown', switchMonth);
92
+ this.addEventListener(monthNav, 'click', switchMonth);
93
+ this.addEventListener(calendar.amPM, 'keydown', switchPeriod);
94
+ this.addEventListener(calendar.amPM, 'click', switchPeriod);
95
+ const setTabindexAndLabel = (element, label) => {
96
+ if (element) {
97
+ element.setAttribute('tabindex', '0');
98
+ element.setAttribute('aria-label', label);
99
+ element.removeAttribute('title');
100
+ }
101
+ };
102
+ setTabindexAndLabel(calendar.prevMonthNav, 'Previous month button. Click to select previous month');
103
+ setTabindexAndLabel(calendar.nextMonthNav, 'Next month button. Click to select next month');
104
+ setTabindexAndLabel(calendar.monthsDropdownContainer, 'Months dropdown');
105
+ setTabindexAndLabel(calendar.currentYearElement, 'Year spin button');
106
+ setTabindexAndLabel(calendar.daysContainer, 'Calendar grid. Use arrow keys to navigate dates.');
107
+ if (this.settings.enableTime && calendar.amPM) {
108
+ setTabindexAndLabel(calendar.amPM, `${calendar.amPM.innerHTML}. Use arrow keys to switch period`);
109
+ }
110
+ }
111
+ });
112
+ };
113
+ }
114
+ }
115
+ });
116
+ exports.default = Calendar;
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ calendar: typeof import("@formio/js/lib/cjs/widgets/CalendarWidget").default;
3
+ };
4
+ export default _default;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const CalendarWidget_1 = __importDefault(require("./CalendarWidget"));
7
+ exports.default = {
8
+ calendar: CalendarWidget_1.default,
9
+ };
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@formio/vpat",
3
+ "version": "2.6.1",
4
+ "description": "VPAT module for form.io",
5
+ "main": "lib/index.js",
6
+ "pre-commit": [
7
+ "lint"
8
+ ],
9
+ "files": [
10
+ "lib",
11
+ "dist"
12
+ ],
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/formio/vpat.git"
16
+ },
17
+ "keywords": [
18
+ "Form.io",
19
+ "components"
20
+ ],
21
+ "license": "UNLICENSED",
22
+ "bugs": {
23
+ "url": "https://github.com/formio/vpat/issues"
24
+ },
25
+ "homepage": "https://github.com/formio/vpat#readme",
26
+ "dependencies": {},
27
+ "peerDependencies": {
28
+ "@formio/js": "^5.2.3"
29
+ },
30
+ "devDependencies": {
31
+ "@types/chai": "^4.2.21",
32
+ "@types/ejs": "^3.1.0",
33
+ "@types/mocha": "^9.0.0",
34
+ "@types/node": "^16.7.10",
35
+ "@types/sinon": "^10.0.2",
36
+ "copy-webpack-plugin": "^13.0.0",
37
+ "chai": "^4.3.4",
38
+ "gulp": "^4.0.2",
39
+ "gulp-insert": "^0.5.0",
40
+ "gulp-rename": "^2.0.0",
41
+ "gulp-template": "^5.0.0",
42
+ "mocha": "^9.2.0",
43
+ "nyc": "^15.1.0",
44
+ "pre-commit": "^1.2.2",
45
+ "sinon": "^11.1.2",
46
+ "ts-node": "^10.2.1",
47
+ "ts-sinon": "^2.0.1",
48
+ "tslint": "^6.1.3",
49
+ "typescript": "^4.4.2",
50
+ "webpack": "^5.73.0",
51
+ "webpack-cli": "^5.1.4",
52
+ "@formio/js": "^5.2.3"
53
+ },
54
+ "scripts": {
55
+ "test:coverage": "nyc --reporter=text mocha --reporter spec './{,!(node_modules)/**/}*.spec.ts'",
56
+ "test": "mocha --require ts-node/register --reporter spec \"./{,!(node_modules)/**/}*.spec.ts\"",
57
+ "watch": "tsc -w",
58
+ "build": "tsc && gulp templates && webpack && webpack --config webpack.prod.js",
59
+ "lint": "tslint -p . --fix"
60
+ }
61
+ }