@formio/js 5.4.1 → 5.4.2

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 (215) hide show
  1. package/README.md +11 -5
  2. package/dist/formio.builder.css +1 -0
  3. package/dist/formio.builder.min.css +1 -1
  4. package/dist/formio.embed.js +1 -1
  5. package/dist/formio.embed.min.js +1 -1
  6. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  7. package/dist/formio.form.css +1 -0
  8. package/dist/formio.form.js +131 -109
  9. package/dist/formio.form.min.css +1 -1
  10. package/dist/formio.form.min.js +1 -1
  11. package/dist/formio.form.min.js.LICENSE.txt +2 -2
  12. package/dist/formio.full.css +1 -0
  13. package/dist/formio.full.js +155 -133
  14. package/dist/formio.full.min.css +1 -1
  15. package/dist/formio.full.min.js +1 -1
  16. package/dist/formio.full.min.js.LICENSE.txt +2 -2
  17. package/dist/formio.js +26 -26
  18. package/dist/formio.min.js +1 -1
  19. package/dist/formio.min.js.LICENSE.txt +2 -2
  20. package/dist/formio.utils.js +19 -19
  21. package/dist/formio.utils.min.js +1 -1
  22. package/dist/formio.utils.min.js.LICENSE.txt +2 -2
  23. package/lib/cjs/Embed.js +8 -16
  24. package/lib/cjs/Form.js +4 -4
  25. package/lib/cjs/Formio.js +2 -9
  26. package/lib/cjs/InlineEmbed.js +1 -4
  27. package/lib/cjs/PDF.js +28 -8
  28. package/lib/cjs/PDFBuilder.js +6 -10
  29. package/lib/cjs/Webform.d.ts +1 -0
  30. package/lib/cjs/Webform.js +19 -34
  31. package/lib/cjs/WebformBuilder.js +27 -68
  32. package/lib/cjs/Wizard.d.ts +1 -0
  33. package/lib/cjs/Wizard.js +44 -31
  34. package/lib/cjs/WizardBuilder.js +5 -15
  35. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +2 -6
  36. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +3 -9
  37. package/lib/cjs/addons/index.js +1 -3
  38. package/lib/cjs/components/_classes/component/Component.d.ts +5 -5
  39. package/lib/cjs/components/_classes/component/Component.js +60 -132
  40. package/lib/cjs/components/_classes/component/editForm/Component.edit.data.js +2 -4
  41. package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +4 -16
  42. package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +1 -4
  43. package/lib/cjs/components/_classes/field/Field.js +1 -4
  44. package/lib/cjs/components/_classes/input/Input.js +2 -2
  45. package/lib/cjs/components/_classes/list/ListComponent.js +4 -4
  46. package/lib/cjs/components/_classes/list/editForm/ListComponent.edit.data.js +6 -28
  47. package/lib/cjs/components/_classes/multivalue/Multivalue.js +8 -26
  48. package/lib/cjs/components/_classes/nested/NestedComponent.js +1 -4
  49. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +5 -9
  50. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +1 -3
  51. package/lib/cjs/components/address/Address.js +10 -30
  52. package/lib/cjs/components/address/editForm/Address.edit.provider.js +8 -32
  53. package/lib/cjs/components/alert/Alert.js +3 -6
  54. package/lib/cjs/components/button/Button.js +10 -17
  55. package/lib/cjs/components/button/editForm/Button.edit.display.js +8 -32
  56. package/lib/cjs/components/checkbox/Checkbox.js +4 -10
  57. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.display.js +2 -8
  58. package/lib/cjs/components/columns/Columns.js +5 -17
  59. package/lib/cjs/components/container/Container.js +1 -3
  60. package/lib/cjs/components/currency/Currency.js +2 -7
  61. package/lib/cjs/components/datagrid/DataGrid.js +23 -63
  62. package/lib/cjs/components/datamap/DataMap.js +4 -16
  63. package/lib/cjs/components/datetime/DateTime.js +2 -6
  64. package/lib/cjs/components/datetime/editForm/DateTime.edit.display.js +1 -4
  65. package/lib/cjs/components/day/Day.js +12 -70
  66. package/lib/cjs/components/day/editForm/Day.edit.day.js +1 -3
  67. package/lib/cjs/components/day/editForm/Day.edit.month.js +1 -3
  68. package/lib/cjs/components/editgrid/EditGrid.d.ts +1 -0
  69. package/lib/cjs/components/editgrid/EditGrid.js +18 -44
  70. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -4
  71. package/lib/cjs/components/file/File.js +40 -70
  72. package/lib/cjs/components/file/editForm/File.edit.display.js +1 -5
  73. package/lib/cjs/components/file/editForm/File.edit.file.js +8 -30
  74. package/lib/cjs/components/form/Form.js +5 -7
  75. package/lib/cjs/components/html/HTML.js +1 -5
  76. package/lib/cjs/components/number/Number.js +2 -4
  77. package/lib/cjs/components/panel/editForm/Panel.edit.display.js +3 -12
  78. package/lib/cjs/components/password/Password.js +1 -4
  79. package/lib/cjs/components/radio/Radio.js +7 -17
  80. package/lib/cjs/components/radio/editForm/Radio.edit.data.js +4 -14
  81. package/lib/cjs/components/recaptcha/ReCaptcha.js +3 -6
  82. package/lib/cjs/components/select/Select.js +48 -92
  83. package/lib/cjs/components/select/editForm/Select.edit.data.js +37 -182
  84. package/lib/cjs/components/select/editForm/Select.edit.validation.js +1 -9
  85. package/lib/cjs/components/selectboxes/SelectBoxes.js +3 -6
  86. package/lib/cjs/components/signature/Signature.d.ts +1 -1
  87. package/lib/cjs/components/signature/Signature.js +5 -10
  88. package/lib/cjs/components/signature/editForm/Signature.edit.display.js +2 -6
  89. package/lib/cjs/components/survey/Survey.js +6 -17
  90. package/lib/cjs/components/survey/editForm/Survey.edit.data.js +4 -12
  91. package/lib/cjs/components/table/editForm/Table.edit.display.js +3 -3
  92. package/lib/cjs/components/tabs/Tabs.js +4 -19
  93. package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +1 -3
  94. package/lib/cjs/components/tags/Tags.js +4 -14
  95. package/lib/cjs/components/textarea/TextArea.js +8 -15
  96. package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +14 -56
  97. package/lib/cjs/components/textfield/TextField.js +4 -4
  98. package/lib/cjs/components/textfield/editForm/TextField.edit.display.js +2 -8
  99. package/lib/cjs/components/time/Time.js +1 -4
  100. package/lib/cjs/components/time/editForm/Time.edit.display.js +1 -4
  101. package/lib/cjs/formio.form.js +5 -5
  102. package/lib/cjs/package.json +1 -1
  103. package/lib/cjs/providers/address/AddressProvider.js +1 -1
  104. package/lib/cjs/providers/address/GoogleAddressProvider.js +1 -3
  105. package/lib/cjs/providers/processor/fileProcessor.js +1 -3
  106. package/lib/cjs/providers/storage/azure.js +5 -6
  107. package/lib/cjs/providers/storage/indexeddb.js +5 -15
  108. package/lib/cjs/providers/storage/s3.js +3 -14
  109. package/lib/cjs/providers/storage/xhr.js +19 -28
  110. package/lib/cjs/templates/Templates.js +1 -0
  111. package/lib/cjs/translations/en.d.ts +237 -82
  112. package/lib/cjs/translations/en.js +9 -82
  113. package/lib/cjs/utils/ChoicesWrapper.js +1 -1
  114. package/lib/cjs/utils/builder.js +5 -26
  115. package/lib/cjs/utils/i18n.d.ts +5 -2
  116. package/lib/cjs/utils/i18n.js +33 -12
  117. package/lib/cjs/utils/utils.js +37 -47
  118. package/lib/cjs/widgets/CalendarWidget.js +2 -6
  119. package/lib/mjs/Embed.js +8 -16
  120. package/lib/mjs/Form.js +4 -4
  121. package/lib/mjs/Formio.js +2 -9
  122. package/lib/mjs/InlineEmbed.js +1 -4
  123. package/lib/mjs/PDF.js +27 -8
  124. package/lib/mjs/PDFBuilder.js +6 -10
  125. package/lib/mjs/Webform.d.ts +1 -0
  126. package/lib/mjs/Webform.js +19 -31
  127. package/lib/mjs/WebformBuilder.js +27 -68
  128. package/lib/mjs/Wizard.d.ts +1 -0
  129. package/lib/mjs/Wizard.js +39 -27
  130. package/lib/mjs/WizardBuilder.js +5 -15
  131. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +2 -6
  132. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +3 -9
  133. package/lib/mjs/addons/index.js +1 -3
  134. package/lib/mjs/components/_classes/component/Component.d.ts +5 -5
  135. package/lib/mjs/components/_classes/component/Component.js +59 -132
  136. package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +2 -4
  137. package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +4 -16
  138. package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +1 -4
  139. package/lib/mjs/components/_classes/field/Field.js +1 -4
  140. package/lib/mjs/components/_classes/input/Input.js +2 -2
  141. package/lib/mjs/components/_classes/list/ListComponent.js +4 -4
  142. package/lib/mjs/components/_classes/list/editForm/ListComponent.edit.data.js +6 -28
  143. package/lib/mjs/components/_classes/multivalue/Multivalue.js +8 -26
  144. package/lib/mjs/components/_classes/nested/NestedComponent.js +1 -4
  145. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +5 -9
  146. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +1 -3
  147. package/lib/mjs/components/address/Address.js +10 -30
  148. package/lib/mjs/components/address/editForm/Address.edit.provider.js +8 -32
  149. package/lib/mjs/components/alert/Alert.js +3 -6
  150. package/lib/mjs/components/button/Button.js +9 -16
  151. package/lib/mjs/components/button/editForm/Button.edit.display.js +8 -32
  152. package/lib/mjs/components/checkbox/Checkbox.js +4 -10
  153. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.display.js +2 -8
  154. package/lib/mjs/components/columns/Columns.js +5 -17
  155. package/lib/mjs/components/container/Container.js +1 -3
  156. package/lib/mjs/components/currency/Currency.js +2 -7
  157. package/lib/mjs/components/datagrid/DataGrid.js +23 -63
  158. package/lib/mjs/components/datamap/DataMap.js +12 -18
  159. package/lib/mjs/components/datetime/DateTime.js +2 -6
  160. package/lib/mjs/components/datetime/editForm/DateTime.edit.display.js +1 -4
  161. package/lib/mjs/components/day/Day.js +12 -70
  162. package/lib/mjs/components/day/editForm/Day.edit.day.js +1 -3
  163. package/lib/mjs/components/day/editForm/Day.edit.month.js +1 -3
  164. package/lib/mjs/components/editgrid/EditGrid.d.ts +1 -0
  165. package/lib/mjs/components/editgrid/EditGrid.js +18 -44
  166. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -4
  167. package/lib/mjs/components/file/File.js +40 -70
  168. package/lib/mjs/components/file/editForm/File.edit.display.js +1 -5
  169. package/lib/mjs/components/file/editForm/File.edit.file.js +8 -30
  170. package/lib/mjs/components/form/Form.js +5 -7
  171. package/lib/mjs/components/html/HTML.js +1 -5
  172. package/lib/mjs/components/number/Number.js +2 -4
  173. package/lib/mjs/components/panel/editForm/Panel.edit.display.js +3 -12
  174. package/lib/mjs/components/password/Password.js +1 -4
  175. package/lib/mjs/components/radio/Radio.js +7 -17
  176. package/lib/mjs/components/radio/editForm/Radio.edit.data.js +4 -14
  177. package/lib/mjs/components/recaptcha/ReCaptcha.js +3 -6
  178. package/lib/mjs/components/select/Select.js +51 -95
  179. package/lib/mjs/components/select/editForm/Select.edit.data.js +37 -182
  180. package/lib/mjs/components/select/editForm/Select.edit.validation.js +1 -9
  181. package/lib/mjs/components/selectboxes/SelectBoxes.js +3 -6
  182. package/lib/mjs/components/signature/Signature.d.ts +1 -1
  183. package/lib/mjs/components/signature/Signature.js +5 -10
  184. package/lib/mjs/components/signature/editForm/Signature.edit.display.js +2 -6
  185. package/lib/mjs/components/survey/Survey.js +6 -17
  186. package/lib/mjs/components/survey/editForm/Survey.edit.data.js +4 -12
  187. package/lib/mjs/components/table/editForm/Table.edit.display.js +3 -3
  188. package/lib/mjs/components/tabs/Tabs.js +4 -19
  189. package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +1 -3
  190. package/lib/mjs/components/tags/Tags.js +4 -14
  191. package/lib/mjs/components/textarea/TextArea.js +8 -15
  192. package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +14 -56
  193. package/lib/mjs/components/textfield/TextField.js +4 -4
  194. package/lib/mjs/components/textfield/editForm/TextField.edit.display.js +2 -8
  195. package/lib/mjs/components/time/Time.js +1 -4
  196. package/lib/mjs/components/time/editForm/Time.edit.display.js +1 -4
  197. package/lib/mjs/formio.form.js +6 -6
  198. package/lib/mjs/package.json +1 -1
  199. package/lib/mjs/providers/address/AddressProvider.js +1 -1
  200. package/lib/mjs/providers/address/GoogleAddressProvider.js +1 -3
  201. package/lib/mjs/providers/processor/fileProcessor.js +1 -3
  202. package/lib/mjs/providers/storage/azure.js +5 -6
  203. package/lib/mjs/providers/storage/indexeddb.js +5 -15
  204. package/lib/mjs/providers/storage/s3.js +3 -14
  205. package/lib/mjs/providers/storage/xhr.js +19 -32
  206. package/lib/mjs/templates/Templates.js +1 -0
  207. package/lib/mjs/translations/en.d.ts +237 -82
  208. package/lib/mjs/translations/en.js +88 -0
  209. package/lib/mjs/utils/ChoicesWrapper.js +1 -1
  210. package/lib/mjs/utils/builder.js +5 -26
  211. package/lib/mjs/utils/i18n.d.ts +5 -2
  212. package/lib/mjs/utils/i18n.js +33 -12
  213. package/lib/mjs/utils/utils.js +37 -47
  214. package/lib/mjs/widgets/CalendarWidget.js +2 -6
  215. package/package.json +6 -4
@@ -996,9 +996,7 @@ export function fieldData(data, component) {
996
996
  }
997
997
  // Convert old single field data in submissions to multiple
998
998
  if (key === parts[parts.length - 1] && component.multiple && !Array.isArray(value[key])) {
999
- value[key] = [
1000
- value[key],
1001
- ];
999
+ value[key] = [value[key]];
1002
1000
  }
1003
1001
  // Set the value of this key.
1004
1002
  value = value[key];
@@ -1008,9 +1006,7 @@ export function fieldData(data, component) {
1008
1006
  else {
1009
1007
  // Convert old single field data in submissions to multiple
1010
1008
  if (component.multiple && !Array.isArray(data[component.key])) {
1011
- data[component.key] = [
1012
- data[component.key],
1013
- ];
1009
+ data[component.key] = [data[component.key]];
1014
1010
  }
1015
1011
  // Fix for checkbox type radio submission values in tableView
1016
1012
  if (component.type === 'checkbox' && component.inputType === 'radio') {
@@ -1134,10 +1130,7 @@ export function withSwitch(a, b) {
1134
1130
  state = next;
1135
1131
  next = prev;
1136
1132
  }
1137
- return [
1138
- get,
1139
- toggle,
1140
- ];
1133
+ return [get, toggle];
1141
1134
  }
1142
1135
  /**
1143
1136
  * Create a function that will call the provided function only the provided limit.
@@ -1264,9 +1257,7 @@ function translateElemValue(elem, translate) {
1264
1257
  * @returns {void}
1265
1258
  */
1266
1259
  function translateDeepTag(tag, translate) {
1267
- const children = tag.children.length && [
1268
- ...tag.children,
1269
- ];
1260
+ const children = tag.children.length && [...tag.children];
1270
1261
  const shouldTranslateEntireContent = children &&
1271
1262
  children.every((child) => child.children.length === 0 && inTextTags.some((tag) => child.nodeName === tag));
1272
1263
  if (!children || shouldTranslateEntireContent) {
@@ -1307,10 +1298,7 @@ export function sanitize(string, options) {
1307
1298
  }
1308
1299
  // Dompurify configuration
1309
1300
  const sanitizeOptions = {
1310
- ADD_ATTR: [
1311
- 'ref',
1312
- 'target',
1313
- ],
1301
+ ADD_ATTR: ['ref', 'target'],
1314
1302
  USE_PROFILES: { html: true },
1315
1303
  };
1316
1304
  // Use profiles
@@ -1400,9 +1388,7 @@ export function isInputComponent(componentJson) {
1400
1388
  export function getArrayFromComponentPath(pathStr) {
1401
1389
  if (!pathStr || !_.isString(pathStr)) {
1402
1390
  if (!_.isArray(pathStr)) {
1403
- return [
1404
- pathStr,
1405
- ];
1391
+ return [pathStr];
1406
1392
  }
1407
1393
  return pathStr;
1408
1394
  }
@@ -1592,9 +1578,7 @@ export function getComponentSavedTypes(fullSchema) {
1592
1578
  return [];
1593
1579
  }
1594
1580
  if (schema.multiple) {
1595
- return [
1596
- componentValueTypes.array,
1597
- ];
1581
+ return [componentValueTypes.array];
1598
1582
  }
1599
1583
  return null;
1600
1584
  }
@@ -1636,11 +1620,17 @@ export function hasEncodedTimezone(value) {
1636
1620
  value.match(/[+|-][0-9]{2}:[0-9]{2}$/));
1637
1621
  }
1638
1622
  // Types for min max validation if value = string
1639
- const TYPES = new Map([["char", "Length"], ["word", "Words"]]);
1623
+ const TYPES = new Map([
1624
+ ['char', 'Length'],
1625
+ ['word', 'Words'],
1626
+ ]);
1640
1627
  // The number from which the remaining character(words) count message starts being read
1641
- const REMAIN_COUNT = new Map([["char", 10], ["word", 5]]);
1628
+ const REMAIN_COUNT = new Map([
1629
+ ['char', 10],
1630
+ ['word', 5],
1631
+ ]);
1642
1632
  function getWordOrCharacterLabel(isWordType, count) {
1643
- const base = isWordType ? "word" : "character";
1633
+ const base = isWordType ? 'word' : 'character';
1644
1634
  return Math.abs(count) === 1 ? base : `${base}s`;
1645
1635
  }
1646
1636
  /**
@@ -1652,17 +1642,17 @@ function getWordOrCharacterLabel(isWordType, count) {
1652
1642
  * @returns {string} - The messsage string
1653
1643
  */
1654
1644
  function getScreenReaderMessage(component, type, value) {
1655
- const isWordType = type === "word";
1656
- const maxKey = typeof value === "string" && (type === "char" || isWordType)
1645
+ const isWordType = type === 'word';
1646
+ const maxKey = typeof value === 'string' && (type === 'char' || isWordType)
1657
1647
  ? `validate.max${TYPES.get(type)}`
1658
- : "validate.max";
1659
- const minKey = typeof value === "string" && (type === "char" || isWordType)
1648
+ : 'validate.max';
1649
+ const minKey = typeof value === 'string' && (type === 'char' || isWordType)
1660
1650
  ? `validate.min${TYPES.get(type)}`
1661
- : "validate.min";
1651
+ : 'validate.min';
1662
1652
  const max = _.parseInt(_.get(component.component, maxKey), 10);
1663
1653
  const min = _.parseInt(_.get(component.component, minKey), 10);
1664
- let message = "";
1665
- if (typeof value === "string") {
1654
+ let message = '';
1655
+ if (typeof value === 'string') {
1666
1656
  const currentLength = isWordType ? component.getWordCount(value) : value.length;
1667
1657
  if (!isNaN(max)) {
1668
1658
  const remains = max - currentLength;
@@ -1698,8 +1688,8 @@ function getScreenReaderMessage(component, type, value) {
1698
1688
  }
1699
1689
  }
1700
1690
  }
1701
- else if (typeof value === "number" || value === null) {
1702
- if (value != null && value !== "") {
1691
+ else if (typeof value === 'number' || value === null) {
1692
+ if (value != null && value !== '') {
1703
1693
  if (!isNaN(max) && value > max) {
1704
1694
  message += `Number cannot be greater than ${max}. `;
1705
1695
  }
@@ -1725,11 +1715,11 @@ function getScreenReaderMessage(component, type, value) {
1725
1715
  * @returns {undefined}
1726
1716
  */
1727
1717
  export function announceScreenReaderMessage(component, value, index = 0, forFocus = false) {
1728
- if (typeof value !== "string" && typeof value !== "number" && value !== null) {
1718
+ if (typeof value !== 'string' && typeof value !== 'number' && value !== null) {
1729
1719
  return;
1730
1720
  }
1731
1721
  // The ref for announcing messages
1732
- const messageSpan = "announceMessage";
1722
+ const messageSpan = 'announceMessage';
1733
1723
  if (!component.refs[messageSpan])
1734
1724
  return;
1735
1725
  const el = component.refs[messageSpan][index];
@@ -1737,19 +1727,19 @@ export function announceScreenReaderMessage(component, value, index = 0, forFocu
1737
1727
  return;
1738
1728
  // Define types for validation
1739
1729
  const typesToCheck = [];
1740
- if (typeof value === "string")
1741
- typesToCheck.push("char", "word");
1742
- if (typeof value === "number" || value === null)
1743
- typesToCheck.push("number");
1730
+ if (typeof value === 'string')
1731
+ typesToCheck.push('char', 'word');
1732
+ if (typeof value === 'number' || value === null)
1733
+ typesToCheck.push('number');
1744
1734
  // Construct the combined message
1745
1735
  const combinedMessage = typesToCheck
1746
- .map(type => getScreenReaderMessage(component, type, value))
1747
- .filter(msg => msg)
1748
- .join(" ")
1736
+ .map((type) => getScreenReaderMessage(component, type, value))
1737
+ .filter((msg) => msg)
1738
+ .join(' ')
1749
1739
  .trim();
1750
1740
  if (forFocus) {
1751
1741
  setTimeout(() => {
1752
- el.textContent = "";
1742
+ el.textContent = '';
1753
1743
  setTimeout(() => {
1754
1744
  el.textContent = combinedMessage;
1755
1745
  }, 50);
@@ -1758,7 +1748,7 @@ export function announceScreenReaderMessage(component, value, index = 0, forFocu
1758
1748
  }
1759
1749
  clearTimeout(el._announceTimer);
1760
1750
  el._announceTimer = setTimeout(() => {
1761
- el.textContent = "";
1751
+ el.textContent = '';
1762
1752
  setTimeout(() => {
1763
1753
  el.textContent = combinedMessage;
1764
1754
  }, 50);
@@ -1770,7 +1760,7 @@ export function announceScreenReaderMessage(component, value, index = 0, forFocu
1770
1760
  */
1771
1761
  export function screenReaderSpeech(text) {
1772
1762
  const ariaSpeechElement = document.createElement('div');
1773
- ariaSpeechElement.setAttribute("style", "border: 0;clip: rect(0 0 0 0);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;white-space: nowrap;");
1763
+ ariaSpeechElement.setAttribute('style', 'border: 0;clip: rect(0 0 0 0);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;white-space: nowrap;');
1774
1764
  document.body.append(ariaSpeechElement);
1775
1765
  ariaSpeechElement.ariaLive = 'assertive';
1776
1766
  setTimeout(() => {
@@ -122,9 +122,7 @@ export default class CalendarWidget extends InputWidget {
122
122
  this.emit('blur');
123
123
  }
124
124
  };
125
- Formio.requireLibrary('flatpickr-css', 'flatpickr', [
126
- { type: 'styles', src: `${Formio.cdn['flatpickr-formio']}/flatpickr.min.css` },
127
- ], true);
125
+ Formio.requireLibrary('flatpickr-css', 'flatpickr', [{ type: 'styles', src: `${Formio.cdn['flatpickr-formio']}/flatpickr.min.css` }], true);
128
126
  if (this.component.shortcutButtons) {
129
127
  this.component.shortcutButtons = this.component.shortcutButtons.filter((btn) => btn.label && btn.onClick);
130
128
  }
@@ -381,9 +379,7 @@ export default class CalendarWidget extends InputWidget {
381
379
  this._input.removeAttribute('id');
382
380
  this._input.removeAttribute('aria-labelledby');
383
381
  this._input.removeAttribute('aria-required');
384
- const excludedFromMaskFormats = [
385
- 'MMMM',
386
- ];
382
+ const excludedFromMaskFormats = ['MMMM'];
387
383
  if (!this.settings.readOnly &&
388
384
  !_.some(excludedFromMaskFormats, (format) => _.includes(this.settings.format, format))) {
389
385
  // Enforce the input mask of the format.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.4.1",
3
+ "version": "5.4.2",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {
@@ -89,8 +89,8 @@
89
89
  "tippy.js": "^6.3.7",
90
90
  "uuid": "^9.0.0",
91
91
  "vanilla-picker": "^2.12.3",
92
- "@formio/core": "^2.7.1",
93
- "@formio/bootstrap": "^4.0.1"
92
+ "@formio/bootstrap": "^4.0.2",
93
+ "@formio/core": "^2.7.1"
94
94
  },
95
95
  "devDependencies": {
96
96
  "@types/node": "^22.15.19",
@@ -173,6 +173,8 @@
173
173
  "serve": "jekyll serve --config _config.yml,_config.dev.yml",
174
174
  "test": "mocha --config .mocharc.json test/unit/*.unit.js",
175
175
  "test:updateRenders": "npm run lib && cross-env TZ=UTC node --require jsdom-global/register test/updateRenders.cjs",
176
- "show-coverage": "open coverage/lcov-report/index.html"
176
+ "show-coverage": "open coverage/lcov-report/index.html",
177
+ "check-types": "tsc --noEmit",
178
+ "lint:fix": "eslint . --fix"
177
179
  }
178
180
  }