@formio/js 5.1.0-dev.6048.c77fe06 → 5.1.0-dev.6049.6110ca0

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 (230) hide show
  1. package/Changelog.md +99 -310
  2. package/README.md +7 -0
  3. package/dist/formio.builder.css +1 -0
  4. package/dist/formio.builder.min.css +1 -1
  5. package/dist/formio.form.css +1 -0
  6. package/dist/formio.form.js +658 -669
  7. package/dist/formio.form.min.css +1 -1
  8. package/dist/formio.form.min.js +1 -1
  9. package/dist/formio.form.min.js.LICENSE.txt +3 -1
  10. package/dist/formio.full.css +1 -0
  11. package/dist/formio.full.js +685 -696
  12. package/dist/formio.full.min.css +1 -1
  13. package/dist/formio.full.min.js +1 -1
  14. package/dist/formio.full.min.js.LICENSE.txt +3 -1
  15. package/dist/formio.js +90 -68
  16. package/dist/formio.min.js +1 -1
  17. package/dist/formio.utils.js +103 -81
  18. package/dist/formio.utils.min.js +1 -1
  19. package/dist/formio.utils.min.js.LICENSE.txt +3 -1
  20. package/lib/cjs/Element.d.ts +2 -1
  21. package/lib/cjs/Element.js +18 -39
  22. package/lib/cjs/EventEmitter.js +2 -25
  23. package/lib/cjs/Form.js +2 -25
  24. package/lib/cjs/PDF.js +1 -1
  25. package/lib/cjs/PDFBuilder.d.ts +1 -0
  26. package/lib/cjs/PDFBuilder.js +10 -11
  27. package/lib/cjs/Webform.d.ts +2 -2
  28. package/lib/cjs/Webform.js +14 -15
  29. package/lib/cjs/WebformBuilder.d.ts +2 -1
  30. package/lib/cjs/WebformBuilder.js +62 -20
  31. package/lib/cjs/Wizard.d.ts +2 -2
  32. package/lib/cjs/Wizard.js +35 -24
  33. package/lib/cjs/WizardBuilder.js +1 -1
  34. package/lib/cjs/components/_classes/component/Component.d.ts +44 -13
  35. package/lib/cjs/components/_classes/component/Component.js +156 -95
  36. package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.js +1 -1
  37. package/lib/cjs/components/_classes/component/editForm/Component.edit.data.js +19 -0
  38. package/lib/cjs/components/_classes/component/editForm/Component.edit.logic.js +1 -1
  39. package/lib/cjs/components/_classes/component/editForm/utils.js +1 -1
  40. package/lib/cjs/components/_classes/componentModal/ComponentModal.js +1 -1
  41. package/lib/cjs/components/_classes/input/Input.js +1 -1
  42. package/lib/cjs/components/_classes/list/ListComponent.js +3 -3
  43. package/lib/cjs/components/_classes/nested/NestedComponent.form.js +13 -0
  44. package/lib/cjs/components/_classes/nested/NestedComponent.js +15 -8
  45. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
  46. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +0 -2
  47. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +1 -12
  48. package/lib/cjs/components/address/Address.d.ts +8 -0
  49. package/lib/cjs/components/address/Address.js +32 -9
  50. package/lib/cjs/components/address/editForm/Address.edit.display.d.ts +4 -0
  51. package/lib/cjs/components/address/editForm/Address.edit.display.js +1 -0
  52. package/lib/cjs/components/address/editForm/Address.edit.provider.js +8 -8
  53. package/lib/cjs/components/alert/Alert.js +1 -1
  54. package/lib/cjs/components/button/Button.d.ts +1 -1
  55. package/lib/cjs/components/button/Button.js +7 -11
  56. package/lib/cjs/components/checkbox/Checkbox.js +1 -1
  57. package/lib/cjs/components/container/Container.js +1 -1
  58. package/lib/cjs/components/content/editForm/Content.edit.display.js +8 -0
  59. package/lib/cjs/components/currency/Currency.js +1 -1
  60. package/lib/cjs/components/currency/editForm/Currency.edit.display.js +12 -0
  61. package/lib/cjs/components/datagrid/DataGrid.js +5 -1
  62. package/lib/cjs/components/datetime/DateTime.d.ts +1 -1
  63. package/lib/cjs/components/datetime/DateTime.js +15 -13
  64. package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.d.ts +66 -15
  65. package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.js +68 -47
  66. package/lib/cjs/components/day/Day.js +2 -2
  67. package/lib/cjs/components/day/editForm/Day.edit.display.js +8 -0
  68. package/lib/cjs/components/editgrid/EditGrid.js +4 -2
  69. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -1
  70. package/lib/cjs/components/email/editForm/Email.edit.display.js +12 -0
  71. package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -0
  72. package/lib/cjs/components/file/File.js +6 -2
  73. package/lib/cjs/components/file/editForm/File.edit.file.d.ts +13 -0
  74. package/lib/cjs/components/file/editForm/File.edit.file.js +1 -0
  75. package/lib/cjs/components/form/Form.d.ts +0 -1
  76. package/lib/cjs/components/form/Form.js +31 -23
  77. package/lib/cjs/components/form/editForm/Form.edit.form.js +4 -3
  78. package/lib/cjs/components/hidden/editForm/Hidden.edit.display.js +8 -0
  79. package/lib/cjs/components/html/editForm/HTML.edit.display.js +8 -0
  80. package/lib/cjs/components/number/Number.js +1 -1
  81. package/lib/cjs/components/number/editForm/Number.edit.display.js +12 -0
  82. package/lib/cjs/components/panel/Panel.js +1 -1
  83. package/lib/cjs/components/password/editForm/Password.edit.display.js +13 -1
  84. package/lib/cjs/components/phonenumber/PhoneNumber.form.js +9 -1
  85. package/lib/cjs/components/radio/Radio.d.ts +8 -0
  86. package/lib/cjs/components/radio/Radio.js +16 -6
  87. package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +1 -1
  88. package/lib/cjs/components/select/Select.d.ts +1 -0
  89. package/lib/cjs/components/select/Select.js +21 -5
  90. package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +68 -110
  91. package/lib/cjs/components/select/editForm/Select.edit.data.js +2 -37
  92. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +6 -0
  93. package/lib/cjs/components/selectboxes/SelectBoxes.js +7 -1
  94. package/lib/cjs/components/signature/Signature.js +1 -1
  95. package/lib/cjs/components/survey/Survey.js +2 -2
  96. package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +8 -0
  97. package/lib/cjs/components/tags/Tags.js +1 -1
  98. package/lib/cjs/components/textarea/TextArea.js +10 -2
  99. package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +12 -0
  100. package/lib/cjs/components/textfield/TextField.js +9 -32
  101. package/lib/cjs/components/time/Time.js +1 -1
  102. package/lib/cjs/components/unknown/Unknown.form.d.ts +2 -1
  103. package/lib/cjs/components/unknown/Unknown.form.js +13 -9
  104. package/lib/cjs/components/url/editForm/Url.edit.display.js +12 -0
  105. package/lib/cjs/components/well/editForm/Well.edit.display.js +8 -0
  106. package/lib/cjs/formio.form.js +5 -5
  107. package/lib/cjs/providers/storage/uploadAdapter.js +8 -6
  108. package/lib/cjs/translations/en.d.ts +1 -234
  109. package/lib/cjs/translations/en.js +4 -2
  110. package/lib/cjs/utils/Evaluator.d.ts +20 -6
  111. package/lib/cjs/utils/Evaluator.js +38 -15
  112. package/lib/cjs/utils/builder.js +5 -5
  113. package/lib/cjs/utils/conditionOperators/IsEqualTo.js +3 -3
  114. package/lib/cjs/utils/formUtils.d.ts +2 -2
  115. package/lib/cjs/utils/index.d.ts +169 -2
  116. package/lib/cjs/utils/index.js +22 -2
  117. package/lib/cjs/utils/utils.d.ts +31 -37
  118. package/lib/cjs/utils/utils.js +80 -135
  119. package/lib/cjs/widgets/CalendarWidget.d.ts +1 -8
  120. package/lib/cjs/widgets/CalendarWidget.js +19 -40
  121. package/lib/mjs/Element.d.ts +2 -1
  122. package/lib/mjs/Element.js +11 -9
  123. package/lib/mjs/EventEmitter.js +2 -2
  124. package/lib/mjs/Form.js +1 -1
  125. package/lib/mjs/PDF.js +1 -1
  126. package/lib/mjs/PDFBuilder.d.ts +1 -0
  127. package/lib/mjs/PDFBuilder.js +9 -10
  128. package/lib/mjs/Webform.d.ts +2 -2
  129. package/lib/mjs/Webform.js +12 -13
  130. package/lib/mjs/WebformBuilder.d.ts +2 -1
  131. package/lib/mjs/WebformBuilder.js +53 -13
  132. package/lib/mjs/Wizard.d.ts +2 -2
  133. package/lib/mjs/Wizard.js +34 -23
  134. package/lib/mjs/WizardBuilder.js +1 -1
  135. package/lib/mjs/components/_classes/component/Component.d.ts +44 -13
  136. package/lib/mjs/components/_classes/component/Component.js +129 -45
  137. package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.js +1 -1
  138. package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +19 -0
  139. package/lib/mjs/components/_classes/component/editForm/Component.edit.logic.js +1 -1
  140. package/lib/mjs/components/_classes/component/editForm/utils.js +1 -1
  141. package/lib/mjs/components/_classes/componentModal/ComponentModal.js +1 -1
  142. package/lib/mjs/components/_classes/input/Input.js +1 -1
  143. package/lib/mjs/components/_classes/list/ListComponent.js +3 -3
  144. package/lib/mjs/components/_classes/nested/NestedComponent.form.js +13 -0
  145. package/lib/mjs/components/_classes/nested/NestedComponent.js +15 -8
  146. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
  147. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +0 -2
  148. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +1 -12
  149. package/lib/mjs/components/address/Address.d.ts +8 -0
  150. package/lib/mjs/components/address/Address.js +32 -9
  151. package/lib/mjs/components/address/editForm/Address.edit.display.d.ts +4 -0
  152. package/lib/mjs/components/address/editForm/Address.edit.display.js +1 -0
  153. package/lib/mjs/components/address/editForm/Address.edit.provider.js +8 -8
  154. package/lib/mjs/components/alert/Alert.js +1 -1
  155. package/lib/mjs/components/button/Button.d.ts +1 -1
  156. package/lib/mjs/components/button/Button.js +7 -10
  157. package/lib/mjs/components/checkbox/Checkbox.js +1 -1
  158. package/lib/mjs/components/container/Container.js +1 -1
  159. package/lib/mjs/components/content/editForm/Content.edit.display.js +8 -0
  160. package/lib/mjs/components/currency/Currency.js +1 -1
  161. package/lib/mjs/components/currency/editForm/Currency.edit.display.js +12 -0
  162. package/lib/mjs/components/datagrid/DataGrid.js +5 -1
  163. package/lib/mjs/components/datetime/DateTime.d.ts +1 -1
  164. package/lib/mjs/components/datetime/DateTime.js +15 -13
  165. package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.d.ts +66 -15
  166. package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.js +68 -47
  167. package/lib/mjs/components/day/Day.js +2 -2
  168. package/lib/mjs/components/day/editForm/Day.edit.display.js +8 -0
  169. package/lib/mjs/components/editgrid/EditGrid.js +4 -2
  170. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -1
  171. package/lib/mjs/components/email/editForm/Email.edit.display.js +12 -0
  172. package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -0
  173. package/lib/mjs/components/file/File.js +6 -2
  174. package/lib/mjs/components/file/editForm/File.edit.file.d.ts +13 -0
  175. package/lib/mjs/components/file/editForm/File.edit.file.js +1 -0
  176. package/lib/mjs/components/form/Form.d.ts +0 -1
  177. package/lib/mjs/components/form/Form.js +30 -23
  178. package/lib/mjs/components/form/editForm/Form.edit.form.js +3 -2
  179. package/lib/mjs/components/hidden/editForm/Hidden.edit.display.js +8 -0
  180. package/lib/mjs/components/html/editForm/HTML.edit.display.js +8 -0
  181. package/lib/mjs/components/number/Number.js +1 -1
  182. package/lib/mjs/components/number/editForm/Number.edit.display.js +12 -0
  183. package/lib/mjs/components/panel/Panel.js +1 -1
  184. package/lib/mjs/components/password/editForm/Password.edit.display.js +13 -1
  185. package/lib/mjs/components/phonenumber/PhoneNumber.form.js +9 -1
  186. package/lib/mjs/components/radio/Radio.d.ts +8 -0
  187. package/lib/mjs/components/radio/Radio.js +16 -6
  188. package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +1 -1
  189. package/lib/mjs/components/select/Select.d.ts +1 -0
  190. package/lib/mjs/components/select/Select.js +21 -5
  191. package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +68 -110
  192. package/lib/mjs/components/select/editForm/Select.edit.data.js +2 -37
  193. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +6 -0
  194. package/lib/mjs/components/selectboxes/SelectBoxes.js +7 -1
  195. package/lib/mjs/components/signature/Signature.js +1 -1
  196. package/lib/mjs/components/survey/Survey.js +2 -2
  197. package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +8 -0
  198. package/lib/mjs/components/tags/Tags.js +1 -1
  199. package/lib/mjs/components/textarea/TextArea.js +10 -2
  200. package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +12 -0
  201. package/lib/mjs/components/textfield/TextField.js +3 -3
  202. package/lib/mjs/components/time/Time.js +1 -1
  203. package/lib/mjs/components/unknown/Unknown.form.d.ts +2 -1
  204. package/lib/mjs/components/unknown/Unknown.form.js +13 -9
  205. package/lib/mjs/components/url/editForm/Url.edit.display.js +12 -0
  206. package/lib/mjs/components/well/editForm/Well.edit.display.js +8 -0
  207. package/lib/mjs/formio.form.js +3 -3
  208. package/lib/mjs/providers/storage/uploadAdapter.js +8 -6
  209. package/lib/mjs/translations/en.d.ts +1 -234
  210. package/lib/mjs/translations/en.js +6 -47
  211. package/lib/mjs/utils/Evaluator.d.ts +20 -6
  212. package/lib/mjs/utils/Evaluator.js +31 -13
  213. package/lib/mjs/utils/builder.js +1 -1
  214. package/lib/mjs/utils/conditionOperators/IsEqualTo.js +1 -1
  215. package/lib/mjs/utils/formUtils.d.ts +2 -2
  216. package/lib/mjs/utils/index.d.ts +169 -2
  217. package/lib/mjs/utils/index.js +18 -1
  218. package/lib/mjs/utils/utils.d.ts +31 -37
  219. package/lib/mjs/utils/utils.js +72 -109
  220. package/lib/mjs/widgets/CalendarWidget.d.ts +1 -8
  221. package/lib/mjs/widgets/CalendarWidget.js +19 -40
  222. package/package.json +8 -6
  223. package/lib/cjs/i18n.d.ts +0 -13
  224. package/lib/cjs/i18n.js +0 -19
  225. package/lib/cjs/utils/i18n.d.ts +0 -19
  226. package/lib/cjs/utils/i18n.js +0 -120
  227. package/lib/mjs/i18n.d.ts +0 -13
  228. package/lib/mjs/i18n.js +0 -14
  229. package/lib/mjs/utils/i18n.d.ts +0 -19
  230. package/lib/mjs/utils/i18n.js +0 -112
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const lodash_1 = __importDefault(require("lodash"));
7
- const utils_1 = require("../../utils/utils");
7
+ const utils_1 = require("../../utils");
8
8
  const Radio_1 = __importDefault(require("../radio/Radio"));
9
9
  class SelectBoxesComponent extends Radio_1.default {
10
10
  static schema(...extend) {
@@ -64,6 +64,9 @@ class SelectBoxesComponent extends Radio_1.default {
64
64
  info.attr.class = 'form-check-input';
65
65
  return info;
66
66
  }
67
+ get hasDefaultValue() {
68
+ return true;
69
+ }
67
70
  get emptyValue() {
68
71
  return this.component.values.reduce((prev, value) => {
69
72
  if (value.value) {
@@ -147,6 +150,9 @@ class SelectBoxesComponent extends Radio_1.default {
147
150
  }
148
151
  }
149
152
  }
153
+ else if (lodash_1.default.isEmpty(this.loadedOptions) && !checkedValues.length) {
154
+ value = {};
155
+ }
150
156
  return value;
151
157
  }
152
158
  /**
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const signature_pad_1 = __importDefault(require("signature_pad"));
7
7
  const Input_1 = __importDefault(require("../_classes/input/Input"));
8
8
  const lodash_1 = __importDefault(require("lodash"));
9
- const utils_1 = require("../../utils/utils");
9
+ const utils_1 = require("../../utils");
10
10
  class SignatureComponent extends Input_1.default {
11
11
  static schema(...extend) {
12
12
  return Input_1.default.schema({
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const lodash_1 = __importDefault(require("lodash"));
7
7
  const Field_1 = __importDefault(require("../_classes/field/Field"));
8
- const utils_1 = require("../../utils/utils");
8
+ const utils_1 = require("../../utils");
9
9
  class SurveyComponent extends Field_1.default {
10
10
  static schema(...extend) {
11
11
  return Field_1.default.schema({
@@ -120,7 +120,7 @@ class SurveyComponent extends Field_1.default {
120
120
  return this.component.questions.reduce((result, question) => result && Boolean(value[question.value]), true);
121
121
  }
122
122
  getInputName(question) {
123
- return `${this.options.name}[${question.value}]`;
123
+ return `${this.options.name}[${question.value}][${this.id}]`;
124
124
  }
125
125
  getValueAsString(value, options) {
126
126
  if (options === null || options === void 0 ? void 0 : options.email) {
@@ -5,6 +5,14 @@ exports.default = [
5
5
  key: 'labelPosition',
6
6
  ignore: true
7
7
  },
8
+ {
9
+ key: 'labelWidth',
10
+ ignore: true
11
+ },
12
+ {
13
+ key: 'labelMargin',
14
+ ignore: true
15
+ },
8
16
  {
9
17
  key: 'placeholder',
10
18
  ignore: true
@@ -3,7 +3,7 @@ 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
- const utils_1 = require("../../utils/utils");
6
+ const utils_1 = require("../../utils");
7
7
  const Input_1 = __importDefault(require("../_classes/input/Input"));
8
8
  const choices_js_1 = __importDefault(require("choices.js"));
9
9
  class TagsComponent extends Input_1.default {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  /* global Quill */
7
7
  const TextField_1 = __importDefault(require("../textfield/TextField"));
8
8
  const lodash_1 = __importDefault(require("lodash"));
9
- const utils_1 = require("../../utils/utils");
9
+ const utils_1 = require("../../utils");
10
10
  class TextAreaComponent extends TextField_1.default {
11
11
  static schema(...extend) {
12
12
  return TextField_1.default.schema({
@@ -62,7 +62,15 @@ class TextAreaComponent extends TextField_1.default {
62
62
  info.content = value;
63
63
  if ((this.options.readOnly || this.disabled) && !this.isHtmlRenderMode()) {
64
64
  const elementStyle = this.info.attr.style || '';
65
- const children = `<div ${this._referenceAttributeName}="input" class="formio-editor-read-only-content" ${elementStyle ? `style='${elementStyle}'` : ''}></div>`;
65
+ const children = `
66
+ <div ${this._referenceAttributeName}="input"
67
+ class="formio-editor-read-only-content"
68
+ ${elementStyle ? `style='${elementStyle}'` : ''}
69
+ role="textbox"
70
+ aria-multiline="true"
71
+ aria-readonly="true"
72
+ >
73
+ </div>`;
66
74
  return this.renderTemplate('well', {
67
75
  children,
68
76
  nestedKey: this.key,
@@ -14,10 +14,22 @@ exports.default = [
14
14
  key: 'allowMultipleMasks',
15
15
  ignore: true
16
16
  },
17
+ {
18
+ key: 'inputMasks',
19
+ ignore: true
20
+ },
17
21
  {
18
22
  key: 'mask',
19
23
  ignore: true
20
24
  },
25
+ {
26
+ key: 'widget.type',
27
+ ignore: true
28
+ },
29
+ {
30
+ key: 'widget',
31
+ ignore: true
32
+ },
21
33
  {
22
34
  type: 'number',
23
35
  input: true,
@@ -1,27 +1,4 @@
1
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
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
@@ -29,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
6
  const Input_1 = __importDefault(require("../_classes/input/Input"));
30
7
  const vanilla_text_mask_1 = require("@formio/vanilla-text-mask");
31
8
  const inputmask_1 = __importDefault(require("inputmask"));
32
- const FormioUtils = __importStar(require("../../utils/utils"));
9
+ const utils_1 = __importDefault(require("../../utils"));
33
10
  const lodash_1 = __importDefault(require("lodash"));
34
11
  class TextFieldComponent extends Input_1.default {
35
12
  static schema(...extend) {
@@ -71,7 +48,7 @@ class TextFieldComponent extends Input_1.default {
71
48
  } });
72
49
  }
73
50
  static savedValueTypes(schema) {
74
- return FormioUtils.getComponentSavedTypes(schema) || [FormioUtils.componentValueTypes.string];
51
+ return utils_1.default.getComponentSavedTypes(schema) || [utils_1.default.componentValueTypes.string];
75
52
  }
76
53
  get defaultSchema() {
77
54
  return TextFieldComponent.schema();
@@ -102,9 +79,9 @@ class TextFieldComponent extends Input_1.default {
102
79
  if (((_c = this.component.widget) === null || _c === void 0 ? void 0 : _c.type) === 'calendar') {
103
80
  this.component.widget = Object.assign(Object.assign({}, this.component.widget), { readOnly: this.options.readOnly, timezone,
104
81
  displayInTimezone, locale: this.component.widget.locale || this.options.language, saveAs: 'text' });
105
- // update originalComponent to include widget settings after component initialization
106
- // originalComponent is used to restore the component (and widget) after evaluating field logic
107
- this.originalComponent = FormioUtils.fastCloneDeep(this.component);
82
+ // update originalComponent to include widget settings after component initialization
83
+ // originalComponent is used to restore the component (and widget) after evaluating field logic
84
+ this.originalComponent = utils_1.default.fastCloneDeep(this.component);
108
85
  }
109
86
  }
110
87
  attach(element) {
@@ -175,7 +152,7 @@ class TextFieldComponent extends Input_1.default {
175
152
  }
176
153
  else {
177
154
  const placeholderChar = this.placeholderChar;
178
- textInput.value = (0, vanilla_text_mask_1.conformToMask)(textValue, FormioUtils.getInputMask(mask), { placeholderChar }).conformedValue;
155
+ textInput.value = (0, vanilla_text_mask_1.conformToMask)(textValue, utils_1.default.getInputMask(mask), { placeholderChar }).conformedValue;
179
156
  }
180
157
  }
181
158
  else {
@@ -183,8 +160,8 @@ class TextFieldComponent extends Input_1.default {
183
160
  }
184
161
  }
185
162
  unmaskValue(value, format = this.component.displayMask) {
186
- const mask = FormioUtils.getInputMask(format, this.placeholderChar);
187
- return FormioUtils.unmaskValue(value, mask, this.placeholderChar);
163
+ const mask = utils_1.default.getInputMask(format, this.placeholderChar);
164
+ return utils_1.default.unmaskValue(value, mask, this.placeholderChar);
188
165
  }
189
166
  /**
190
167
  * Returns the value at this index.
@@ -245,7 +222,7 @@ class TextFieldComponent extends Input_1.default {
245
222
  return;
246
223
  }
247
224
  inputMask = inputMask || this.component.displayMask || this.component.inputMask;
248
- const mask = FormioUtils.getInputMask(inputMask, this.placeholderChar);
225
+ const mask = utils_1.default.getInputMask(inputMask, this.placeholderChar);
249
226
  this.defaultMask = mask;
250
227
  if (input && inputMask) {
251
228
  try {
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const moment_1 = __importDefault(require("moment"));
7
7
  const TextField_1 = __importDefault(require("../textfield/TextField"));
8
- const utils_1 = require("../../utils/utils");
8
+ const utils_1 = require("../../utils");
9
9
  const defaultDataFormat = 'HH:mm:ss';
10
10
  class TimeComponent extends TextField_1.default {
11
11
  static schema(...extend) {
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * Unknown Component schema.
3
+ * @param {...any} extend
3
4
  * @returns {object} - The Unknown Component edit form.
4
5
  */
5
- export default function _default(): object;
6
+ export default function _default(...extend: any[]): object;
@@ -3,25 +3,29 @@ 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
+ const lodash_1 = require("lodash");
6
7
  const Unknown_edit_display_1 = __importDefault(require("./editForm/Unknown.edit.display"));
8
+ const utils_1 = __importDefault(require("../../components/_classes/component/editForm/utils"));
7
9
  /**
8
10
  * Unknown Component schema.
11
+ * @param {...any} extend
9
12
  * @returns {object} - The Unknown Component edit form.
10
13
  */
11
- function default_1() {
14
+ function default_1(...extend) {
15
+ const components = [
16
+ {
17
+ label: 'Custom',
18
+ key: 'display',
19
+ weight: 0,
20
+ components: Unknown_edit_display_1.default
21
+ }
22
+ ].concat(...extend);
12
23
  return {
13
24
  components: [
14
25
  {
15
26
  type: 'tabs',
16
27
  key: 'tabs',
17
- components: [
18
- {
19
- label: 'Custom',
20
- key: 'display',
21
- weight: 0,
22
- components: Unknown_edit_display_1.default
23
- }
24
- ]
28
+ components: (0, lodash_1.unionWith)(components, utils_1.default.unifyComponents)
25
29
  }
26
30
  ]
27
31
  };
@@ -9,6 +9,18 @@ exports.default = [
9
9
  key: 'allowMultipleMasks',
10
10
  ignore: true
11
11
  },
12
+ {
13
+ key: 'inputMasks',
14
+ ignore: true
15
+ },
16
+ {
17
+ key: 'widget.type',
18
+ ignore: true
19
+ },
20
+ {
21
+ key: 'widget',
22
+ ignore: true
23
+ },
12
24
  {
13
25
  key: 'showWordCount',
14
26
  ignore: true,
@@ -5,6 +5,14 @@ exports.default = [
5
5
  key: 'labelPosition',
6
6
  ignore: true
7
7
  },
8
+ {
9
+ key: 'labelWidth',
10
+ ignore: true
11
+ },
12
+ {
13
+ key: 'labelMargin',
14
+ ignore: true
15
+ },
8
16
  {
9
17
  key: 'placeholder',
10
18
  ignore: true
@@ -22,14 +22,14 @@ const Form_1 = __importDefault(require("./Form"));
22
22
  exports.Form = Form_1.default;
23
23
  const utils_1 = __importDefault(require("./utils"));
24
24
  exports.Utils = utils_1.default;
25
- const Evaluator_1 = require("./utils/Evaluator");
26
25
  const licenses_1 = __importDefault(require("./licenses"));
27
26
  exports.Licenses = licenses_1.default;
28
27
  const EventEmitter_1 = __importDefault(require("./EventEmitter"));
29
28
  exports.EventEmitter = EventEmitter_1.default;
30
29
  const Webform_1 = __importDefault(require("./Webform"));
31
30
  exports.Webform = Webform_1.default;
32
- const i18n_1 = require("./utils/i18n");
31
+ const core_1 = require("@formio/core");
32
+ const utils_2 = require("./utils");
33
33
  Formio_1.Formio.loadModules = (path = `${Formio_1.Formio.getApiUrl()}/externalModules.js`, name = 'externalModules') => {
34
34
  Formio_1.Formio.requireLibrary(name, name, path, true)
35
35
  .then((modules) => {
@@ -45,7 +45,7 @@ Formio_1.Formio.Form = Form_1.default;
45
45
  Formio_1.Formio.Displays = Displays_1.default;
46
46
  Formio_1.Formio.Providers = providers_1.default;
47
47
  Formio_1.Formio.Widgets = widgets_1.default;
48
- Formio_1.Formio.Evaluator = Evaluator_1.Evaluator;
48
+ Formio_1.Formio.Evaluator = utils_2.Evaluator;
49
49
  Formio_1.Formio.AllComponents = components_1.default;
50
50
  Formio_1.Formio.Licenses = licenses_1.default;
51
51
  // This is strange, but is needed for "premium" components to import correctly.
@@ -100,10 +100,10 @@ function registerModule(mod, defaultFn = null, options = {}) {
100
100
  Formio_1.Formio.Displays.addDisplays(mod.displays);
101
101
  break;
102
102
  case 'evaluator':
103
- Formio_1.Formio.Evaluator.registerEvaluator(mod.evaluator);
103
+ (0, utils_2.registerEvaluator)(mod.evaluator);
104
104
  break;
105
105
  case 'translations':
106
- i18n_1.I18n.setDefaultTranslations(mod.translations);
106
+ core_1.I18n.setDefaultTranslations(mod.translations);
107
107
  break;
108
108
  case 'library':
109
109
  options.license
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getFormioUploadAdapterPlugin = void 0;
4
- const utils_1 = require("../../utils/utils");
4
+ const utils_1 = require("../../utils");
5
5
  /**
6
6
  * UploadAdapter for CKEditor https://ckeditor.com/docs/ckeditor5/latest/framework/guides/deep-dive/upload-adapter.html
7
7
  */
@@ -27,7 +27,7 @@ class FormioUploadAdapter {
27
27
  null,
28
28
  null
29
29
  ];
30
- const uploadPromise = this.fileService.uploadFile(...uploadParams, () => this.component.emit('fileUploadingStart', uploadPromise)).then((result) => {
30
+ this.fileService.uploadFile(...uploadParams, () => this.component.emit('fileUploadingStart')).then((result) => {
31
31
  return this.fileService.downloadFile(result);
32
32
  }).then((result) => {
33
33
  return resolve({
@@ -37,7 +37,7 @@ class FormioUploadAdapter {
37
37
  console.warn('An Error occured while uploading file', err);
38
38
  reject(err);
39
39
  }).finally(() => {
40
- this.component.emit('fileUploadingEnd', uploadPromise);
40
+ this.component.emit('fileUploadingEnd');
41
41
  });
42
42
  }));
43
43
  }
@@ -49,9 +49,11 @@ class FormioUploadAdapter {
49
49
  }
50
50
  }
51
51
  }
52
- const getFormioUploadAdapterPlugin = (fileService, component) => (editor) => {
53
- editor.plugins.get('FileRepository').createUploadAdapter = (loader) => {
54
- return new FormioUploadAdapter(loader, fileService, component);
52
+ const getFormioUploadAdapterPlugin = (fileService, component) => {
53
+ return function (editor) {
54
+ editor.plugins.get('FileRepository').createUploadAdapter = (loader) => {
55
+ return new FormioUploadAdapter(loader, fileService, component);
56
+ };
55
57
  };
56
58
  };
57
59
  exports.getFormioUploadAdapterPlugin = getFormioUploadAdapterPlugin;
@@ -1,235 +1,2 @@
1
- declare const _default: {
2
- unsavedRowsError: string;
3
- invalidRowsError: string;
4
- invalidRowError: string;
5
- invalidOption: string;
6
- invalidDay: string;
7
- alertMessageWithLabel: string;
8
- alertMessage: string;
9
- complete: string;
10
- error: string;
11
- errorListHotkey: string;
12
- errorsListNavigationMessage: string;
13
- submitError: string;
14
- required: string;
15
- unique: string;
16
- array: string;
17
- array_nonempty: string;
18
- nonarray: string;
19
- select: string;
20
- pattern: string;
21
- minLength: string;
22
- maxLength: string;
23
- minWords: string;
24
- maxWords: string;
25
- min: string;
26
- max: string;
27
- maxDate: string;
28
- minDate: string;
29
- maxYear: string;
30
- minYear: string;
31
- minSelectedCount: string;
32
- maxSelectedCount: string;
33
- invalid_email: string;
34
- invalid_url: string;
35
- invalid_regex: string;
36
- invalid_date: string;
37
- invalid_day: string;
38
- invalidValueProperty: string;
39
- mask: string;
40
- valueIsNotAvailable: string;
41
- stripe: string;
42
- month: string;
43
- day: string;
44
- year: string;
45
- january: string;
46
- february: string;
47
- march: string;
48
- april: string;
49
- may: string;
50
- june: string;
51
- july: string;
52
- august: string;
53
- september: string;
54
- october: string;
55
- november: string;
56
- december: string;
57
- next: string;
58
- previous: string;
59
- cancel: string;
60
- submit: string;
61
- confirmCancel: string;
62
- saveDraftInstanceError: string;
63
- saveDraftAuthError: string;
64
- restoreDraftInstanceError: string;
65
- saveDraftError: string;
66
- restoreDraftError: string;
67
- time: string;
68
- cancelButtonAriaLabel: string;
69
- previousButtonAriaLabel: string;
70
- nextButtonAriaLabel: string;
71
- submitButtonAriaLabel: string;
72
- reCaptchaTokenValidationError: string;
73
- reCaptchaTokenNotSpecifiedError: string;
74
- apiKey: string;
75
- typeRemaining: string;
76
- typeCount: string;
77
- requiredDayField: string;
78
- requiredDayEmpty: string;
79
- requiredMonthField: string;
80
- requiredYearField: string;
81
- formNotReady: string;
82
- noFormElement: string;
83
- notUniqueKey: string;
84
- newFormSchema: string;
85
- missingUrl: string;
86
- urlNotAttachedToBtn: string;
87
- loadingProjectSettingsError: string;
88
- sessionStorageSupportError: string;
89
- builderUniqueError: string;
90
- pageNotFound: string;
91
- noDragInfoError: string;
92
- addonSupportTypeError: string;
93
- setPathError: string;
94
- calculatedPathDeprecation: string;
95
- unknownTemplate: string;
96
- unknownComponent: string;
97
- renderTemplateFunctionDeprecation: string;
98
- whenReadyDeprecation: string;
99
- loadResourcesError: string;
100
- noSelectDataConfiguration: string;
101
- indexedDBSupportError: string;
102
- caretPositionSavingError: string;
103
- iteratableRowsError: string;
104
- checkRowDeprecation: string;
105
- noOAuthBtn: string;
106
- noOAuthConfiguration: string;
107
- oAuthErrorsTitle: string;
108
- noOAuthFormUrl: string;
109
- oAuthStateError: string;
110
- componentInvalidRowValidation: string;
111
- videoPlayerNotFound: string;
112
- synchronizationFailed: string;
113
- fileWithDuplicatedNameInProgress: string;
114
- fileWithDuplicatedNameLoaded: string;
115
- nestedForm: string;
116
- noDataProvided: string;
117
- subformSubmissionLoadingError: string;
118
- noDelimiterSet: string;
119
- noSiteKey: string;
120
- failedToNormalize: string;
121
- failedToCompareItems: string;
122
- editorFocusError: string;
123
- quillImageUploadFailed: string;
124
- noFilesSelected: string;
125
- needConfigurationForQuill: string;
126
- waitPdfConverting: string;
127
- uploading: string;
128
- pasteBelow: string;
129
- copy: string;
130
- move: string;
131
- edit: string;
132
- editJson: string;
133
- remove: string;
134
- clickToSetValue: string;
135
- words: string;
136
- characters: string;
137
- addAnother: string;
138
- yes: string;
139
- no: string;
140
- wantToClearData: string;
141
- yesDelete: string;
142
- waitFileProcessing: string;
143
- wrongFileType: string;
144
- fileTooSmall: string;
145
- fileTooBig: string;
146
- noFileService: string;
147
- fileProcessingFailed: string;
148
- readyForUpload: string;
149
- readyForRemovingFromStorage: string;
150
- preparingFileToRemove: string;
151
- succefullyRemoved: string;
152
- succefullyUploaded: string;
153
- maxSelectItems: string;
154
- minSelectItems: string;
155
- clickToSign: string;
156
- surveyQuestion: string;
157
- surveyQuestionValue: string;
158
- success: string;
159
- noResultsFound: string;
160
- noChoices: string;
161
- typeToSearch: string;
162
- loading: string;
163
- help: string;
164
- component: string;
165
- save: string;
166
- preview: string;
167
- dragAndDropComponent: string;
168
- searchFields: string;
169
- noMatchesFound: string;
170
- fileName: string;
171
- size: string;
172
- type: string;
173
- gallery: string;
174
- camera: string;
175
- dropFilesToAttach: string;
176
- useCamera: string;
177
- browse: string;
178
- takePicture: string;
179
- switchToFileUpload: string;
180
- completeStatus: string;
181
- noStorageSet: string;
182
- noFileApiSupport: string;
183
- noFormDataSupport: string;
184
- noProgressSupport: string;
185
- close: string;
186
- addResource: string;
187
- autocomplete: string;
188
- showPreview: string;
189
- hidePreview: string;
190
- createPage: string;
191
- page: string;
192
- closeBtnDescription: string;
193
- cancelBtnDescription: string;
194
- saveBtnDescription: string;
195
- addOrRemove: string;
196
- anyFileTypesAllowed: string;
197
- allowedFileTypes: string;
198
- syncing: string;
199
- syncNow: string;
200
- pressToOpen: string;
201
- browseToAttachFileFor: string;
202
- or: string;
203
- numericOnly: string;
204
- uploadPdfFile: string;
205
- dropToStart: string;
206
- expand: string;
207
- collapse: string;
208
- add: string;
209
- delete: string;
210
- revert: string;
211
- removeBtnPressToRemove: string;
212
- file: string;
213
- captureVideo: string;
214
- captureAudio: string;
215
- captureImage: string;
216
- browseFiles: string;
217
- noComponentsSetInGrid: string;
218
- sortAscending: string;
219
- sortDescending: string;
220
- filter: string;
221
- clear: string;
222
- showItemsWithValue: string;
223
- gridItemsPerPage: string;
224
- gridAllItems: string;
225
- recordsSelectedOnPage: string;
226
- recordsSelectedInTable: string;
227
- gridSelectAll: string;
228
- itemsInTable: string;
229
- clearSelection: string;
230
- editGridRow: string;
231
- deleteGridRow: string;
232
- selected: string;
233
- actions: string;
234
- };
1
+ declare const _default: any;
235
2
  export default _default;