@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,12 @@
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 Button_form_1 = __importDefault(require("./Button.form"));
8
+ const Button = js_1.Components.components.button;
9
+ class ButtonComponent extends Button {
10
+ }
11
+ exports.default = ButtonComponent;
12
+ ButtonComponent.editForm = Button_form_1.default;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ key: string;
3
+ ignore: boolean;
4
+ }[];
5
+ export default _default;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [
4
+ {
5
+ key: 'labelPosition',
6
+ ignore: true,
7
+ },
8
+ {
9
+ key: 'placeholder',
10
+ ignore: true,
11
+ },
12
+ {
13
+ key: 'tabindex',
14
+ ignore: true,
15
+ },
16
+ {
17
+ key: 'hidden',
18
+ ignore: true,
19
+ },
20
+ {
21
+ key: 'autofocus',
22
+ ignore: true,
23
+ },
24
+ {
25
+ key: 'hideLabel',
26
+ ignore: true,
27
+ },
28
+ {
29
+ key: 'tooltip',
30
+ ignore: true,
31
+ },
32
+ ];
@@ -0,0 +1,17 @@
1
+ import editForm from './Checkbox.form';
2
+ declare const Checkbox: any;
3
+ interface ICheckboxRefs {
4
+ label: HTMLElement;
5
+ input: HTMLElement;
6
+ }
7
+ export default class CheckboxComponent extends Checkbox {
8
+ static editForm: typeof editForm;
9
+ refs: ICheckboxRefs;
10
+ isIE: any;
11
+ addHiddenMessage: any;
12
+ noField: any;
13
+ render(element: any): any;
14
+ clearErrorClasses(elements: any[]): void;
15
+ setErrorClasses(elements: any[], dirty: boolean, hasErrors: boolean, hasMessages: boolean): void;
16
+ }
17
+ export {};
@@ -0,0 +1 @@
1
+ export default function (...extend: any[]): any;
@@ -0,0 +1,22 @@
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 baseEditForm = js_1.Components.components.checkbox.editForm;
8
+ const Checkbox_edit_data_1 = __importDefault(require("./editForm/Checkbox.edit.data"));
9
+ const Checkbox_edit_display_1 = __importDefault(require("./editForm/Checkbox.edit.display"));
10
+ function default_1(...extend) {
11
+ return baseEditForm([
12
+ {
13
+ key: 'display',
14
+ components: Checkbox_edit_display_1.default,
15
+ },
16
+ {
17
+ key: 'data',
18
+ components: Checkbox_edit_data_1.default,
19
+ },
20
+ ], ...extend);
21
+ }
22
+ exports.default = default_1;
@@ -0,0 +1,33 @@
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 Checkbox_form_1 = __importDefault(require("./Checkbox.form"));
8
+ const Checkbox = js_1.Components.components.checkbox;
9
+ class CheckboxComponent extends Checkbox {
10
+ render(element) {
11
+ this.noField = true;
12
+ return super.render(element);
13
+ }
14
+ clearErrorClasses(elements) {
15
+ const hiddentInvalidEntryMessage = document.getElementById(`invalid-entry-${this.id}`);
16
+ if (hiddentInvalidEntryMessage) {
17
+ this.refs.label.removeChild(hiddentInvalidEntryMessage);
18
+ }
19
+ // @ts-ignore
20
+ super.clearErrorClasses(elements);
21
+ }
22
+ setErrorClasses(elements, dirty, hasErrors, hasMessages) {
23
+ // @ts-ignore
24
+ super.setErrorClasses(elements, dirty, hasErrors, hasMessages);
25
+ elements.forEach((input) => input.removeAttribute('aria-invalid'));
26
+ const hiddentInvalidEntryMessage = document.getElementById(`invalid-entry-${this.id}`);
27
+ if (hasErrors && !hiddentInvalidEntryMessage) {
28
+ this.addHiddenMessage(', invalid entry, ', this.refs.label);
29
+ }
30
+ }
31
+ }
32
+ exports.default = CheckboxComponent;
33
+ CheckboxComponent.editForm = Checkbox_form_1.default;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ key: string;
3
+ ignore: boolean;
4
+ }[];
5
+ export default _default;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [
4
+ {
5
+ key: 'clearOnHide',
6
+ ignore: true,
7
+ },
8
+ {
9
+ key: 'redrawOn',
10
+ ignore: true,
11
+ },
12
+ ];
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ key: string;
3
+ ignore: boolean;
4
+ }[];
5
+ export default _default;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [
4
+ {
5
+ key: 'labelPosition',
6
+ ignore: true,
7
+ },
8
+ {
9
+ key: 'placeholder',
10
+ ignore: true,
11
+ },
12
+ {
13
+ key: 'autofocus',
14
+ ignore: true,
15
+ },
16
+ {
17
+ key: 'tabindex',
18
+ ignore: true,
19
+ },
20
+ {
21
+ key: 'hidden',
22
+ ignore: true,
23
+ },
24
+ {
25
+ key: 'hideLabel',
26
+ ignore: true,
27
+ },
28
+ {
29
+ key: 'labelWidth',
30
+ ignore: true,
31
+ },
32
+ {
33
+ key: 'labelMargin',
34
+ ignore: true,
35
+ },
36
+ {
37
+ key: 'shortcut',
38
+ ignore: true,
39
+ },
40
+ {
41
+ key: 'inputType',
42
+ ignore: true,
43
+ },
44
+ ];
@@ -0,0 +1,6 @@
1
+ import editForm from './Columns.form';
2
+ declare const Columns: any;
3
+ export default class ColumnsComponent extends Columns {
4
+ static editForm: typeof editForm;
5
+ }
6
+ export {};
@@ -0,0 +1 @@
1
+ export default function (...extend: any[]): any;
@@ -0,0 +1,17 @@
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 columnsEditForm = js_1.Components.components.columns.editForm;
8
+ const Columns_edit_display_1 = __importDefault(require("./editForm/Columns.edit.display"));
9
+ function default_1(...extend) {
10
+ return columnsEditForm([
11
+ {
12
+ key: 'display',
13
+ components: Columns_edit_display_1.default,
14
+ },
15
+ ], ...extend);
16
+ }
17
+ exports.default = default_1;
@@ -0,0 +1,12 @@
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 Columns_form_1 = __importDefault(require("./Columns.form"));
8
+ const Columns = js_1.Components.components.columns;
9
+ class ColumnsComponent extends Columns {
10
+ }
11
+ exports.default = ColumnsComponent;
12
+ ColumnsComponent.editForm = Columns_form_1.default;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ key: string;
3
+ ignore: boolean;
4
+ }[];
5
+ export default _default;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [
4
+ {
5
+ key: 'hideLabel',
6
+ ignore: true,
7
+ },
8
+ {
9
+ key: 'hidden',
10
+ ignore: true,
11
+ },
12
+ {
13
+ key: 'hideOnChildrenHidden',
14
+ ignore: true,
15
+ },
16
+ ];
@@ -0,0 +1,2 @@
1
+ declare const Component: any;
2
+ export default Component;
@@ -0,0 +1,316 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const js_1 = require("@formio/js");
30
+ const ComponentModal_1 = __importDefault(require("../componentmodal/ComponentModal"));
31
+ const Tooltip_1 = __importDefault(require("../tooltip/Tooltip"));
32
+ const ModalUtils = __importStar(require("../../util/modalUtils"));
33
+ const Component = js_1.Components.components.component;
34
+ const attach = Component.prototype.attach;
35
+ Component.prototype.isIE = () => {
36
+ const userAgent = window.navigator.userAgent;
37
+ const msie = userAgent.indexOf('MSIE ');
38
+ if (msie > 0) {
39
+ // IE 10 or older => return version number
40
+ return parseInt(userAgent.substring(msie + 5, userAgent.indexOf('.', msie)), 10);
41
+ }
42
+ const trident = userAgent.indexOf('Trident/');
43
+ if (trident > 0) {
44
+ // IE 11 => return version number
45
+ const rv = userAgent.indexOf('rv:');
46
+ return parseInt(userAgent.substring(rv + 3, userAgent.indexOf('.', rv)), 10);
47
+ }
48
+ const edge = userAgent.indexOf('Edge/');
49
+ if (edge > 0) {
50
+ // IE 12 (aka Edge) => return version number
51
+ return parseInt(userAgent.substring(edge + 5, userAgent.indexOf('.', edge)), 10);
52
+ }
53
+ // other browser
54
+ return false;
55
+ };
56
+ Component.prototype.isFirefox = () => {
57
+ const userAgent = window.navigator.userAgent;
58
+ const firefox = userAgent.indexOf('Firefox');
59
+ const seamonkey = userAgent.indexOf('Seamonkey');
60
+ if (firefox > 0 && seamonkey === -1) {
61
+ // returns version number
62
+ return parseInt(userAgent.substring(firefox + 8, userAgent.indexOf('.', firefox)), 10);
63
+ }
64
+ // other browser
65
+ return false;
66
+ };
67
+ Component.prototype.addMessages = function (messages) {
68
+ if (!messages) {
69
+ return;
70
+ }
71
+ // Standardize on array of objects for message.
72
+ if (typeof messages === 'string') {
73
+ messages = {
74
+ messages,
75
+ level: 'error',
76
+ };
77
+ }
78
+ if (!Array.isArray(messages)) {
79
+ messages = [messages];
80
+ }
81
+ const renderMessageContainer = (messageContainer) => {
82
+ this.setContent(messageContainer, messages.map((message, index) => {
83
+ const key = this.component.key + index;
84
+ return this.renderTemplate('message', Object.assign(Object.assign({}, message), { key }));
85
+ }).join(''));
86
+ };
87
+ if (this.refs.messageContainer) {
88
+ renderMessageContainer(this.refs.messageContainer);
89
+ if (this.refs.modalMessageContainer) {
90
+ renderMessageContainer(this.refs.modalMessageContainer);
91
+ }
92
+ }
93
+ };
94
+ Component.prototype.createComponentModal = function (element, modalShouldBeOpened, currentValue) {
95
+ return new ComponentModal_1.default(this, element, modalShouldBeOpened, currentValue);
96
+ };
97
+ Component.prototype.attach = function (element) {
98
+ const superAttach = attach.call(this, element);
99
+ this.loadRefs(element, {
100
+ modalMessageContainer: 'single',
101
+ messageContainer: 'single',
102
+ tooltip: 'multiple',
103
+ label: 'single',
104
+ component: 'single',
105
+ });
106
+ return superAttach;
107
+ };
108
+ Component.prototype.attachTooltips = function (toolTipsRefs) {
109
+ const tooltip = toolTipsRefs && toolTipsRefs[0];
110
+ if (tooltip) {
111
+ const title = this.interpolate(tooltip.getAttribute('data-title') || tooltip.getAttribute('data-tooltip')).replace(/(?:\r\n|\r|\n)/g, '<br />');
112
+ this.tooltips[0] = new Tooltip_1.default(tooltip, {
113
+ position: 'right',
114
+ title,
115
+ });
116
+ }
117
+ };
118
+ Component.prototype.addHiddenMessage = function (message, parent) {
119
+ if (parent) {
120
+ const hiddenMessage = this.ce('span', { class: this.transform('class', 'sr-only'), id: `invalid-entry-${this.id}` });
121
+ this.setContent(hiddenMessage, this.t(message, {}));
122
+ parent.appendChild(hiddenMessage);
123
+ }
124
+ };
125
+ Component.prototype.addHiddenMessageBeforeChild = function (parent, child, message, params) {
126
+ const hiddenMessage = this.ce('span', Object.assign({ class: this.transform('class', 'sr-only') }, params));
127
+ this.setContent(hiddenMessage, this.t(message, {}));
128
+ parent.insertBefore(hiddenMessage, child);
129
+ };
130
+ Component.prototype.hiddenMessageRemovalByID = function (elemIDs) {
131
+ elemIDs.forEach((elemID) => {
132
+ const elem = document.getElementById(elemID);
133
+ if (elem) {
134
+ if (this.isIE()) {
135
+ const parentElement = elem.parentElement;
136
+ if (parentElement) {
137
+ parentElement.removeChild(elem);
138
+ }
139
+ }
140
+ else {
141
+ elem.remove();
142
+ }
143
+ }
144
+ });
145
+ };
146
+ Component.prototype.clearErrorID = (attributeName, element) => {
147
+ const descRefs = element && element.getAttribute(attributeName);
148
+ // Removes an error message elem id
149
+ if (descRefs) {
150
+ const updatedDescRefs = descRefs.replace(/\b(e-\w*-\w*)/g, '').trim();
151
+ if (updatedDescRefs) {
152
+ element.setAttribute(attributeName, updatedDescRefs);
153
+ }
154
+ else {
155
+ element.removeAttribute(attributeName);
156
+ }
157
+ }
158
+ };
159
+ const createModal = Component.prototype.createModal;
160
+ Component.prototype.createModal = function (element, attr, confirm) {
161
+ const dialog = createModal.call(this, element, attr, confirm);
162
+ const dialogClose = dialog.close;
163
+ const focusableElements = ModalUtils.getFocusableElements(dialog.refs.dialogContents);
164
+ const focusTrapHandler = ModalUtils.focusTrap.bind(this, focusableElements);
165
+ ModalUtils.toggleHideBackgroundElements(dialog.refs.dialogContents, true);
166
+ this.addEventListener(dialog.refs.dialogContents, 'keydown', focusTrapHandler);
167
+ focusableElements[0].focus();
168
+ dialog.close = () => {
169
+ this.removeEventListener(dialog.refs.dialogContents, 'keydown', focusTrapHandler);
170
+ ModalUtils.toggleHideBackgroundElements(dialog.refs.dialogContents, false);
171
+ dialogClose();
172
+ };
173
+ return dialog;
174
+ };
175
+ Component.prototype.addErrorID = function (attributeName, element) {
176
+ if (element) {
177
+ let descRefs = element.getAttribute(attributeName);
178
+ if (!descRefs || descRefs.search(/\b(e-\w*-\w*)/g) === -1) {
179
+ this.errors.forEach((error, index) => {
180
+ const errorID = `e-${this.id}-${this.component.key}${index}`;
181
+ element.setAttribute(attributeName, `${descRefs || ''} ${errorID}`);
182
+ descRefs = element.getAttribute(attributeName);
183
+ });
184
+ }
185
+ }
186
+ };
187
+ Component.prototype.setDescribingAttribute = (attributeName, element, values) => {
188
+ let descRefs = element.getAttribute(attributeName) || '';
189
+ values.forEach((value) => descRefs = descRefs.replace(value, '').trim());
190
+ values.forEach((value) => descRefs += ` ${value}`);
191
+ descRefs.trim();
192
+ element.setAttribute(attributeName, descRefs);
193
+ };
194
+ Component.prototype.clearDescribingAttribute = (attributeName, element, values) => {
195
+ let descRefs = element.getAttribute(attributeName) || '';
196
+ values.forEach((value) => descRefs = descRefs.replace(value, '').trim());
197
+ element.setAttribute(attributeName, descRefs);
198
+ };
199
+ Component.prototype.clearErrorClasses = function (elements) {
200
+ var _a;
201
+ this.removeClass(this.refs.label, this.transform('class', 'formio-label-error'));
202
+ this.removeClass(this.element, this.transform('class', 'formio-form-error'));
203
+ const fields = this.refs.input
204
+ ? this.refs.input
205
+ : elements instanceof Array
206
+ ? elements
207
+ : [elements];
208
+ if (fields) {
209
+ fields.forEach((element) => {
210
+ if (element) {
211
+ this.removeClass(element, this.transform('class', 'formio-input-error'));
212
+ element.setAttribute('aria-invalid', false);
213
+ if (element.type === 'textarea') {
214
+ this.clearErrorID('aria-labelledby', element);
215
+ return;
216
+ }
217
+ this.clearErrorID('aria-describedby', element);
218
+ }
219
+ });
220
+ if (this.refs.input &&
221
+ (this.component.type === 'datetime' || ((_a = this.component.widget) === null || _a === void 0 ? void 0 : _a.type) === 'calendar')) {
222
+ const input = this.refs.input[0];
223
+ if (input === null || input === void 0 ? void 0 : input.widget.calendar) {
224
+ const element = input.nextSibling;
225
+ this.removeClass(element, this.transform('class', 'formio-input-error'));
226
+ element.removeAttribute('aria-invalid');
227
+ this.clearErrorID('aria-describedby', element);
228
+ }
229
+ }
230
+ if (this.component.modalEdit && this.refs.openModal) {
231
+ if (this.refs.component) {
232
+ this.removeClass(this.refs.component, this.transform('class', 'formio-form-error'));
233
+ }
234
+ const openModalButton = this.refs.openModal;
235
+ this.clearErrorID('aria-describedby', openModalButton);
236
+ openModalButton.removeAttribute('aria-invalid');
237
+ }
238
+ }
239
+ };
240
+ Component.prototype.checkModal = () => {
241
+ return;
242
+ };
243
+ Component.prototype.setErrorClasses = function (elements, dirty, hasErrors, hasMessages) {
244
+ this.clearErrorClasses(elements);
245
+ this.setSuccessClasses(false);
246
+ const handleInvalidFields = (element) => {
247
+ this.addClass(element, this.transform('class', 'formio-input-error'));
248
+ element.setAttribute('aria-invalid', 'true');
249
+ if (element.type === 'textarea') {
250
+ this.addErrorID('aria-labelledby', element);
251
+ }
252
+ else {
253
+ this.addErrorID('aria-describedby', element);
254
+ }
255
+ };
256
+ if (hasErrors) {
257
+ this.addClass(this.refs.label, this.transform('class', 'formio-label-error'));
258
+ this.addClass(this.element, this.transform('class', 'formio-form-error'));
259
+ elements.forEach((input) => {
260
+ var _a;
261
+ if (input) {
262
+ if (this.type === 'datetime' || ((_a = this.component.widget) === null || _a === void 0 ? void 0 : _a.type) === 'calendar') {
263
+ handleInvalidFields(input.nextSibling);
264
+ }
265
+ else {
266
+ handleInvalidFields(input);
267
+ }
268
+ }
269
+ });
270
+ if (this.component.modalEdit && this.refs.openModal) {
271
+ if (!this.component.components && this.refs.component) {
272
+ this.addClass(this.refs.component, this.transform('class', 'formio-form-error'));
273
+ }
274
+ const openModalButton = this.refs.openModal;
275
+ this.addErrorID('aria-describedby', openModalButton);
276
+ openModalButton.setAttribute('aria-invalid', 'true');
277
+ }
278
+ }
279
+ };
280
+ Component.prototype.setComponentValidity = function (messages, dirty, silentCheck) {
281
+ const hasErrors = !!messages.filter(message => message.level === 'error').length;
282
+ if (messages.length && (!silentCheck || this.error) && (dirty || !this.pristine)) {
283
+ this.setCustomValidity(messages, dirty);
284
+ this.setSuccessClasses(false);
285
+ }
286
+ else if (!silentCheck) {
287
+ this.setCustomValidity('');
288
+ if ((dirty || !this.pristine) && !this.component.disabled) {
289
+ this.setSuccessClasses(true);
290
+ }
291
+ }
292
+ return !hasErrors;
293
+ };
294
+ Component.prototype.setSuccessClasses = function (isSuccess) {
295
+ var _a;
296
+ const handleSuccessClass = (element, isSuccess) => {
297
+ isSuccess
298
+ ? this.addClass(element, this.transform('class', 'formio-input-success'))
299
+ : this.removeClass(element, this.transform('class', 'formio-input-success'));
300
+ };
301
+ if (this.refs.input && this.refs.input[0]) {
302
+ handleSuccessClass(this.refs.input[0], isSuccess);
303
+ if (this.component.type === 'datetime' || ((_a = this.component.widget) === null || _a === void 0 ? void 0 : _a.type) === 'calendar') {
304
+ handleSuccessClass(this.refs.input[0].nextSibling, isSuccess);
305
+ }
306
+ }
307
+ if (this.refs.selectContainer) {
308
+ handleSuccessClass(this.refs.selectContainer, isSuccess);
309
+ }
310
+ if (this.component.type === 'day') {
311
+ handleSuccessClass(this.refs.day, isSuccess);
312
+ handleSuccessClass(this.refs.month, isSuccess);
313
+ handleSuccessClass(this.refs.year, isSuccess);
314
+ }
315
+ };
316
+ exports.default = Component;
@@ -0,0 +1,2 @@
1
+ declare const ComponentModal: any;
2
+ export default ComponentModal;