@formio/js 5.0.0-rc.59 → 5.0.0-rc.60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) hide show
  1. package/dist/formio.builder.css +8 -8
  2. package/dist/formio.builder.min.css +1 -1
  3. package/dist/formio.embed.js +1 -1
  4. package/dist/formio.embed.min.js +1 -1
  5. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  6. package/dist/formio.form.css +8 -8
  7. package/dist/formio.form.js +24 -24
  8. package/dist/formio.form.min.css +1 -1
  9. package/dist/formio.form.min.js +1 -1
  10. package/dist/formio.form.min.js.LICENSE.txt +1 -1
  11. package/dist/formio.full.css +8 -8
  12. package/dist/formio.full.js +64 -64
  13. package/dist/formio.full.min.css +1 -1
  14. package/dist/formio.full.min.js +1 -1
  15. package/dist/formio.full.min.js.LICENSE.txt +1 -1
  16. package/dist/formio.js +4 -4
  17. package/dist/formio.min.js +1 -1
  18. package/dist/formio.min.js.LICENSE.txt +1 -1
  19. package/dist/formio.utils.js +2 -2
  20. package/dist/formio.utils.min.js +1 -1
  21. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  22. package/lib/cjs/Element.d.ts +1 -1
  23. package/lib/cjs/Embed.d.ts +2 -2
  24. package/lib/cjs/Embed.js +10 -10
  25. package/lib/cjs/Form.d.ts +3 -3
  26. package/lib/cjs/FormBuilder.d.ts +42 -3
  27. package/lib/cjs/InlineEmbed.js +2 -2
  28. package/lib/cjs/PDF.d.ts +1 -1
  29. package/lib/cjs/Webform.d.ts +4 -3
  30. package/lib/cjs/Webform.js +2 -1
  31. package/lib/cjs/WebformBuilder.d.ts +1 -1
  32. package/lib/cjs/WebformBuilder.js +8 -2
  33. package/lib/cjs/components/_classes/component/Component.form.d.ts +1 -1
  34. package/lib/cjs/components/_classes/component/Component.form.js +1 -1
  35. package/lib/cjs/components/_classes/component/Component.js +2 -5
  36. package/lib/cjs/components/_classes/component/fixtures/comp6.d.ts +77 -0
  37. package/lib/cjs/components/_classes/component/fixtures/comp6.js +59 -0
  38. package/lib/cjs/components/_classes/component/fixtures/index.d.ts +2 -1
  39. package/lib/cjs/components/_classes/component/fixtures/index.js +3 -1
  40. package/lib/cjs/components/_classes/input/Input.js +6 -4
  41. package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +1 -1
  42. package/lib/cjs/components/_classes/list/ListComponent.form.js +1 -1
  43. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +7 -7
  44. package/lib/cjs/components/_classes/nested/NestedComponent.form.d.ts +1 -1
  45. package/lib/cjs/components/_classes/nested/NestedComponent.form.js +1 -1
  46. package/lib/cjs/components/address/Address.form.d.ts +1 -1
  47. package/lib/cjs/components/address/Address.form.js +1 -1
  48. package/lib/cjs/components/button/Button.form.d.ts +1 -1
  49. package/lib/cjs/components/button/Button.form.js +1 -1
  50. package/lib/cjs/components/checkbox/Checkbox.form.d.ts +1 -1
  51. package/lib/cjs/components/checkbox/Checkbox.form.js +1 -1
  52. package/lib/cjs/components/columns/Columns.form.d.ts +1 -1
  53. package/lib/cjs/components/columns/Columns.form.js +1 -1
  54. package/lib/cjs/components/container/Container.form.d.ts +1 -1
  55. package/lib/cjs/components/container/Container.form.js +1 -1
  56. package/lib/cjs/components/content/Content.form.d.ts +1 -1
  57. package/lib/cjs/components/content/Content.form.js +1 -1
  58. package/lib/cjs/components/currency/Currency.form.d.ts +1 -1
  59. package/lib/cjs/components/currency/Currency.form.js +1 -1
  60. package/lib/cjs/components/datagrid/DataGrid.form.d.ts +1 -1
  61. package/lib/cjs/components/datagrid/DataGrid.form.js +1 -1
  62. package/lib/cjs/components/datagrid/fixtures/comp-with-checkboxes.d.ts +29 -0
  63. package/lib/cjs/components/datagrid/fixtures/comp-with-checkboxes.js +36 -0
  64. package/lib/cjs/components/datagrid/fixtures/index.d.ts +2 -1
  65. package/lib/cjs/components/datagrid/fixtures/index.js +3 -1
  66. package/lib/cjs/components/datamap/DataMap.form.d.ts +1 -1
  67. package/lib/cjs/components/datamap/DataMap.form.js +1 -1
  68. package/lib/cjs/components/datetime/DateTime.form.d.ts +1 -1
  69. package/lib/cjs/components/datetime/DateTime.form.js +1 -1
  70. package/lib/cjs/components/day/Day.d.ts +1 -1
  71. package/lib/cjs/components/day/Day.form.d.ts +1 -1
  72. package/lib/cjs/components/day/Day.form.js +1 -1
  73. package/lib/cjs/components/day/Day.js +1 -1
  74. package/lib/cjs/components/day/fixtures/comp7.d.ts +109 -0
  75. package/lib/cjs/components/day/fixtures/comp7.js +109 -0
  76. package/lib/cjs/components/day/fixtures/index.d.ts +2 -1
  77. package/lib/cjs/components/day/fixtures/index.js +3 -1
  78. package/lib/cjs/components/editgrid/EditGrid.form.d.ts +1 -1
  79. package/lib/cjs/components/editgrid/EditGrid.form.js +1 -1
  80. package/lib/cjs/components/email/Email.form.d.ts +1 -1
  81. package/lib/cjs/components/email/Email.form.js +1 -1
  82. package/lib/cjs/components/fieldset/Fieldset.form.d.ts +1 -1
  83. package/lib/cjs/components/fieldset/Fieldset.form.js +1 -1
  84. package/lib/cjs/components/file/File.form.d.ts +1 -1
  85. package/lib/cjs/components/file/File.form.js +1 -1
  86. package/lib/cjs/components/file/File.js +1 -2
  87. package/lib/cjs/components/form/Form.form.d.ts +1 -1
  88. package/lib/cjs/components/form/Form.form.js +1 -1
  89. package/lib/cjs/components/form/Form.js +7 -6
  90. package/lib/cjs/components/hidden/Hidden.form.d.ts +1 -1
  91. package/lib/cjs/components/hidden/Hidden.form.js +1 -1
  92. package/lib/cjs/components/html/HTML.form.d.ts +1 -1
  93. package/lib/cjs/components/html/HTML.form.js +1 -1
  94. package/lib/cjs/components/number/Number.form.d.ts +1 -1
  95. package/lib/cjs/components/number/Number.form.js +1 -1
  96. package/lib/cjs/components/panel/Panel.form.d.ts +1 -1
  97. package/lib/cjs/components/panel/Panel.form.js +1 -1
  98. package/lib/cjs/components/password/Password.form.d.ts +1 -1
  99. package/lib/cjs/components/password/Password.form.js +1 -1
  100. package/lib/cjs/components/phonenumber/PhoneNumber.form.d.ts +1 -1
  101. package/lib/cjs/components/phonenumber/PhoneNumber.form.js +1 -1
  102. package/lib/cjs/components/radio/Radio.form.d.ts +1 -1
  103. package/lib/cjs/components/radio/Radio.form.js +1 -1
  104. package/lib/cjs/components/radio/Radio.js +3 -2
  105. package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +1 -1
  106. package/lib/cjs/components/recaptcha/ReCaptcha.form.js +1 -1
  107. package/lib/cjs/components/select/Select.form.d.ts +1 -1
  108. package/lib/cjs/components/select/Select.form.js +1 -1
  109. package/lib/cjs/components/select/Select.js +1 -1
  110. package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +1 -1
  111. package/lib/cjs/components/selectboxes/SelectBoxes.form.js +1 -1
  112. package/lib/cjs/components/signature/Signature.form.d.ts +1 -1
  113. package/lib/cjs/components/signature/Signature.form.js +1 -1
  114. package/lib/cjs/components/survey/Survey.form.d.ts +1 -1
  115. package/lib/cjs/components/survey/Survey.form.js +1 -1
  116. package/lib/cjs/components/table/Table.form.d.ts +1 -1
  117. package/lib/cjs/components/table/Table.form.js +1 -1
  118. package/lib/cjs/components/tabs/Tabs.form.d.ts +1 -1
  119. package/lib/cjs/components/tabs/Tabs.form.js +1 -1
  120. package/lib/cjs/components/tags/Tags.form.d.ts +1 -1
  121. package/lib/cjs/components/tags/Tags.form.js +1 -1
  122. package/lib/cjs/components/textarea/TextArea.form.d.ts +1 -1
  123. package/lib/cjs/components/textarea/TextArea.form.js +1 -1
  124. package/lib/cjs/components/textfield/TextField.form.d.ts +1 -1
  125. package/lib/cjs/components/textfield/TextField.form.js +1 -1
  126. package/lib/cjs/components/textfield/TextField.js +3 -1
  127. package/lib/cjs/components/time/Time.form.d.ts +1 -1
  128. package/lib/cjs/components/time/Time.form.js +1 -1
  129. package/lib/cjs/components/unknown/Unknown.form.js +1 -1
  130. package/lib/cjs/components/url/Url.form.d.ts +1 -1
  131. package/lib/cjs/components/url/Url.form.js +1 -1
  132. package/lib/cjs/components/well/Well.form.d.ts +1 -1
  133. package/lib/cjs/components/well/Well.form.js +1 -1
  134. package/lib/cjs/formio.form.js +3 -3
  135. package/lib/cjs/providers/address/AzureAddressProvider.d.ts +1 -1
  136. package/lib/cjs/providers/address/GoogleAddressProvider.js +1 -1
  137. package/lib/cjs/providers/storage/util.js +3 -4
  138. package/lib/cjs/templates/index.d.ts +14 -14
  139. package/lib/cjs/translations/en.d.ts +2 -0
  140. package/lib/cjs/translations/en.js +3 -1
  141. package/lib/cjs/utils/ChoicesWrapper.d.ts +1 -1
  142. package/lib/cjs/utils/ChoicesWrapper.js +13 -2
  143. package/lib/cjs/utils/calendarUtils.js +3 -3
  144. package/lib/cjs/utils/formUtils.d.ts +3 -3
  145. package/lib/cjs/utils/formUtils.js +2 -2
  146. package/lib/cjs/utils/utils.d.ts +20 -14
  147. package/lib/cjs/utils/utils.js +82 -72
  148. package/lib/mjs/Element.d.ts +1 -1
  149. package/lib/mjs/Embed.d.ts +2 -2
  150. package/lib/mjs/Form.d.ts +3 -3
  151. package/lib/mjs/FormBuilder.d.ts +42 -3
  152. package/lib/mjs/PDF.d.ts +1 -1
  153. package/lib/mjs/Webform.d.ts +4 -3
  154. package/lib/mjs/Webform.js +2 -1
  155. package/lib/mjs/WebformBuilder.d.ts +1 -1
  156. package/lib/mjs/WebformBuilder.js +8 -2
  157. package/lib/mjs/components/_classes/component/Component.form.d.ts +1 -1
  158. package/lib/mjs/components/_classes/component/Component.js +2 -5
  159. package/lib/mjs/components/_classes/component/fixtures/comp6.d.ts +77 -0
  160. package/lib/mjs/components/_classes/component/fixtures/comp6.js +57 -0
  161. package/lib/mjs/components/_classes/component/fixtures/index.d.ts +2 -1
  162. package/lib/mjs/components/_classes/component/fixtures/index.js +2 -1
  163. package/lib/mjs/components/_classes/input/Input.js +6 -4
  164. package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +1 -1
  165. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +7 -7
  166. package/lib/mjs/components/_classes/nested/NestedComponent.form.d.ts +1 -1
  167. package/lib/mjs/components/address/Address.form.d.ts +1 -1
  168. package/lib/mjs/components/button/Button.form.d.ts +1 -1
  169. package/lib/mjs/components/checkbox/Checkbox.form.d.ts +1 -1
  170. package/lib/mjs/components/columns/Columns.form.d.ts +1 -1
  171. package/lib/mjs/components/container/Container.form.d.ts +1 -1
  172. package/lib/mjs/components/content/Content.form.d.ts +1 -1
  173. package/lib/mjs/components/currency/Currency.form.d.ts +1 -1
  174. package/lib/mjs/components/datagrid/DataGrid.form.d.ts +1 -1
  175. package/lib/mjs/components/datagrid/fixtures/comp-with-checkboxes.d.ts +29 -0
  176. package/lib/mjs/components/datagrid/fixtures/comp-with-checkboxes.js +34 -0
  177. package/lib/mjs/components/datagrid/fixtures/index.d.ts +2 -1
  178. package/lib/mjs/components/datagrid/fixtures/index.js +2 -1
  179. package/lib/mjs/components/datamap/DataMap.form.d.ts +1 -1
  180. package/lib/mjs/components/datetime/DateTime.form.d.ts +1 -1
  181. package/lib/mjs/components/day/Day.d.ts +1 -1
  182. package/lib/mjs/components/day/Day.form.d.ts +1 -1
  183. package/lib/mjs/components/day/Day.js +1 -1
  184. package/lib/mjs/components/day/fixtures/comp7.d.ts +109 -0
  185. package/lib/mjs/components/day/fixtures/comp7.js +107 -0
  186. package/lib/mjs/components/day/fixtures/index.d.ts +2 -1
  187. package/lib/mjs/components/day/fixtures/index.js +2 -1
  188. package/lib/mjs/components/editgrid/EditGrid.form.d.ts +1 -1
  189. package/lib/mjs/components/email/Email.form.d.ts +1 -1
  190. package/lib/mjs/components/fieldset/Fieldset.form.d.ts +1 -1
  191. package/lib/mjs/components/file/File.form.d.ts +1 -1
  192. package/lib/mjs/components/file/File.js +1 -2
  193. package/lib/mjs/components/form/Form.form.d.ts +1 -1
  194. package/lib/mjs/components/form/Form.js +5 -4
  195. package/lib/mjs/components/hidden/Hidden.form.d.ts +1 -1
  196. package/lib/mjs/components/html/HTML.form.d.ts +1 -1
  197. package/lib/mjs/components/number/Number.form.d.ts +1 -1
  198. package/lib/mjs/components/panel/Panel.form.d.ts +1 -1
  199. package/lib/mjs/components/password/Password.form.d.ts +1 -1
  200. package/lib/mjs/components/phonenumber/PhoneNumber.form.d.ts +1 -1
  201. package/lib/mjs/components/radio/Radio.form.d.ts +1 -1
  202. package/lib/mjs/components/radio/Radio.js +3 -2
  203. package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +1 -1
  204. package/lib/mjs/components/select/Select.form.d.ts +1 -1
  205. package/lib/mjs/components/select/Select.js +2 -2
  206. package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +1 -1
  207. package/lib/mjs/components/signature/Signature.form.d.ts +1 -1
  208. package/lib/mjs/components/survey/Survey.form.d.ts +1 -1
  209. package/lib/mjs/components/table/Table.form.d.ts +1 -1
  210. package/lib/mjs/components/tabs/Tabs.form.d.ts +1 -1
  211. package/lib/mjs/components/tags/Tags.form.d.ts +1 -1
  212. package/lib/mjs/components/textarea/TextArea.form.d.ts +1 -1
  213. package/lib/mjs/components/textfield/TextField.form.d.ts +1 -1
  214. package/lib/mjs/components/textfield/TextField.js +3 -1
  215. package/lib/mjs/components/time/Time.form.d.ts +1 -1
  216. package/lib/mjs/components/url/Url.form.d.ts +1 -1
  217. package/lib/mjs/components/well/Well.form.d.ts +1 -1
  218. package/lib/mjs/providers/address/AzureAddressProvider.d.ts +1 -1
  219. package/lib/mjs/providers/address/GoogleAddressProvider.js +1 -1
  220. package/lib/mjs/templates/index.d.ts +14 -14
  221. package/lib/mjs/translations/en.d.ts +2 -0
  222. package/lib/mjs/translations/en.js +3 -1
  223. package/lib/mjs/utils/ChoicesWrapper.d.ts +1 -1
  224. package/lib/mjs/utils/ChoicesWrapper.js +13 -2
  225. package/lib/mjs/utils/formUtils.d.ts +3 -3
  226. package/lib/mjs/utils/utils.d.ts +20 -14
  227. package/lib/mjs/utils/utils.js +12 -2
  228. package/package.json +11 -11
@@ -99,10 +99,21 @@ class ChoicesWrapper extends Choices {
99
99
  this._selectHighlightedChoice(activeItems);
100
100
  }
101
101
  }
102
- _selectHighlightedChoice(activeItems) {
102
+ _selectHighlightedChoice() {
103
103
  const highlightedChoice = this.dropdown.getChild(`.${this.config.classNames.highlightedState}`);
104
104
  if (highlightedChoice) {
105
- this._handleChoiceAction(activeItems, highlightedChoice);
105
+ const id = highlightedChoice.dataset.id;
106
+ const choice = id && this._store.getChoiceById(id);
107
+ this._addItem({
108
+ value: choice.value,
109
+ label: choice.label,
110
+ choiceId: choice.id,
111
+ groupId: choice.groupId,
112
+ customProperties: choice.customProperties,
113
+ placeholder: choice.placeholder,
114
+ keyCode: choice.keyCode
115
+ });
116
+ this._triggerChange(choice.value);
106
117
  }
107
118
  event.preventDefault();
108
119
  }
@@ -4,7 +4,7 @@
4
4
  * @param {object} query - The query to use when searching for the components.
5
5
  * @returns {import('@formio/core').Component[]} - The result of the component that is found.
6
6
  */
7
- export function findComponents(components: import('@formio/core').Component[], query: object): import('@formio/core').Component[];
7
+ export function findComponents(components: import("@formio/core").Component[], query: object): import("@formio/core").Component[];
8
8
  export const flattenComponents: typeof Utils.flattenComponents;
9
9
  export const guid: typeof Utils.guid;
10
10
  export const uniqueName: typeof Utils.uniqueName;
@@ -16,8 +16,8 @@ export const isComponentModelType: typeof Utils.isComponentModelType;
16
16
  export const isComponentNestedDataType: typeof Utils.isComponentNestedDataType;
17
17
  export const componentPath: typeof Utils.componentPath;
18
18
  export const componentChildPath: any;
19
- export const eachComponentDataAsync: (components: Component[], data: DataObject, fn: AsyncComponentDataCallback, path?: string | undefined, index?: number | undefined, parent?: any, includeAll?: boolean | undefined) => Promise<void>;
20
- export const eachComponentData: (components: Component[], data: DataObject, fn: ComponentDataCallback, path?: string | undefined, index?: number | undefined, parent?: any, includeAll?: boolean | undefined) => void;
19
+ export const eachComponentDataAsync: (components: Component[], data: DataObject, fn: AsyncComponentDataCallback, path?: string, index?: number, parent?: any, includeAll?: boolean) => Promise<void>;
20
+ export const eachComponentData: (components: Component[], data: DataObject, fn: ComponentDataCallback, path?: string, index?: number, parent?: any, includeAll?: boolean) => void;
21
21
  export const getComponentKey: typeof Utils.getComponentKey;
22
22
  export const getContextualRowPath: typeof Utils.getContextualRowPath;
23
23
  export const getContextualRowData: typeof Utils.getContextualRowData;
@@ -7,7 +7,7 @@
7
7
  * @param {import('@formio/core').EvaluatorOptions} options - The evaluator options.
8
8
  * @returns {*} - The result of the evaluation.
9
9
  */
10
- export function evaluate(func: Function | string | object, args: any, ret: string, interpolate: boolean, options?: import('@formio/core').EvaluatorOptions): any;
10
+ export function evaluate(func: Function | string | object, args: any, ret: string, interpolate: boolean, options?: import("@formio/core").EvaluatorOptions): any;
11
11
  /**
12
12
  * Returns a random compoennt ID.
13
13
  * @returns {string} - A random component ID.
@@ -55,7 +55,7 @@ export function isMongoId(text: string): boolean;
55
55
  * @param {import('@formio/core').Submission} submission - A submission object.
56
56
  * @param {*} rowData - The contextual row data for the component.
57
57
  */
58
- export function checkCalculated(component: import('@formio/core').Component, submission: import('@formio/core').Submission, rowData: any): void;
58
+ export function checkCalculated(component: import("@formio/core").Component, submission: import("@formio/core").Submission, rowData: any): void;
59
59
  /**
60
60
  * Check if a simple conditional evaluates to true.
61
61
  * @param {import('@formio/core').Component} component - The component to check for the conditional.
@@ -65,7 +65,7 @@ export function checkCalculated(component: import('@formio/core').Component, sub
65
65
  * @param {import('../../src/components/_classes/component/Component').Component} instance - The instance of the component.
66
66
  * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.
67
67
  */
68
- export function checkSimpleConditional(component: import('@formio/core').Component, condition: import('@formio/core').SimpleConditional, row: any, data: any, instance: any): boolean;
68
+ export function checkSimpleConditional(component: import("@formio/core").Component, condition: import("@formio/core").SimpleConditional, row: any, data: any, instance: import("../../src/components/_classes/component/Component").Component): boolean;
69
69
  /**
70
70
  * Returns a components normalized value.
71
71
  * @param {string} compPath - The full path to the component.
@@ -86,7 +86,7 @@ export function getComponentActualValue(compPath: string, data: any, row: any):
86
86
  * @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.
87
87
  * @returns {*} - The result of the evaulation.
88
88
  */
89
- export function checkCustomConditional(component: import('@formio/core').Component, custom: string, row: any, data: any, form: import('@formio/core').Form, variable: string, onError: any, instance: any): any;
89
+ export function checkCustomConditional(component: import("@formio/core").Component, custom: string, row: any, data: any, form: import("@formio/core").Form, variable: string, onError: any, instance: import("../../src/components/_classes/component/Component").Component): any;
90
90
  /**
91
91
  * Check a component for JSON conditionals.
92
92
  * @param {import('@formio/core').Component} component - The component
@@ -97,7 +97,7 @@ export function checkCustomConditional(component: import('@formio/core').Compone
97
97
  * @param {*} onError - Custom return value if there is an error.
98
98
  * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.
99
99
  */
100
- export function checkJsonConditional(component: import('@formio/core').Component, json: import('@formio/core').JSONConditional, row: any, data: any, form: import('@formio/core').Form, onError: any): boolean;
100
+ export function checkJsonConditional(component: import("@formio/core").Component, json: import("@formio/core").JSONConditional, row: any, data: any, form: import("@formio/core").Form, onError: any): boolean;
101
101
  /**
102
102
  * Checks the conditions for a provided component and data.
103
103
  * @param {import('@formio/core').Component} component - The component to check for the condition.
@@ -107,7 +107,7 @@ export function checkJsonConditional(component: import('@formio/core').Component
107
107
  * @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.
108
108
  * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.
109
109
  */
110
- export function checkCondition(component: import('@formio/core').Component, row: any, data: any, form: import('@formio/core').Form, instance: any): boolean;
110
+ export function checkCondition(component: import("@formio/core").Component, row: any, data: any, form: import("@formio/core").Form, instance: import("../../src/components/_classes/component/Component").Component): boolean;
111
111
  /**
112
112
  * Test a trigger on a component.
113
113
  * @param {import('@formio/core').Component} component - The component to test the trigger against.
@@ -118,7 +118,7 @@ export function checkCondition(component: import('@formio/core').Component, row:
118
118
  * @param {any} instance - The component that is performing the trigger.
119
119
  * @returns {boolean} - TRUE if the trigger should fire; FALSE otherwise.
120
120
  */
121
- export function checkTrigger(component: import('@formio/core').Component, trigger: any, row: import('@formio/core').DataObject, data: import('@formio/core').DataObject, form: import('@formio/core').Form, instance: any): boolean;
121
+ export function checkTrigger(component: import("@formio/core").Component, trigger: import("@formio/core").LogicTrigger, row: import("@formio/core").DataObject, data: import("@formio/core").DataObject, form: import("@formio/core").Form, instance: any): boolean;
122
122
  /**
123
123
  * Sets a property on a component via an executed Logic action.
124
124
  * @param {import('@formio/core').Component} component - The component to set the property on.
@@ -129,7 +129,13 @@ export function checkTrigger(component: import('@formio/core').Component, trigge
129
129
  * @param {any} instance - The component instance.
130
130
  * @returns {import('@formio/core').Component} - The modified component.
131
131
  */
132
- export function setActionProperty(component: import('@formio/core').Component, action: any, result: string, row: import('@formio/core').DataObject, data: import('@formio/core').DataObject, instance: any): import('@formio/core').Component;
132
+ export function setActionProperty(component: import("@formio/core").Component, action: import("@formio/core").LogicAction, result: string, row: import("@formio/core").DataObject, data: import("@formio/core").DataObject, instance: any): import("@formio/core").Component;
133
+ /**
134
+ * Removes HTML tags from string e.g. <div>Hello World</div> => Hello World
135
+ * @param {string} str - The string to remove HTML tags from.
136
+ * @returns {string} - The string without HTML tags.
137
+ */
138
+ export function removeHTML(str: string): string;
133
139
  /**
134
140
  * Unescape HTML characters like &lt, &gt, &amp and etc.
135
141
  * @param {string} str - The string to unescape.
@@ -287,7 +293,7 @@ export function getNumberSeparators(lang?: string): {
287
293
  * @param {number} defaultLimit - The default limit to use if none is provided in the component.
288
294
  * @returns {number} - The number of decimal places allowed.
289
295
  */
290
- export function getNumberDecimalLimit(component: import('@formio/core').Component, defaultLimit: number): number;
296
+ export function getNumberDecimalLimit(component: import("@formio/core").Component, defaultLimit: number): number;
291
297
  /**
292
298
  * Returns the currency affixes for a specific language.
293
299
  * @param {object} arg0 - The arguments object.
@@ -312,7 +318,7 @@ export function getCurrencyAffixes({ currency, decimalLimit, decimalSeparator, l
312
318
  * @param {import('@formio/core').Component} component - The component to fetch the field data for.
313
319
  * @returns {*} - The field data.
314
320
  */
315
- export function fieldData(data: import('@formio/core').DataObject, component: import('@formio/core').Component): any;
321
+ export function fieldData(data: import("@formio/core").DataObject, component: import("@formio/core").Component): any;
316
322
  /**
317
323
  * Delays function execution with possibility to execute function synchronously or cancel it.
318
324
  * @param {Function} fn - Function to delay
@@ -410,7 +416,7 @@ export function fastCloneDeep(obj: any): any;
410
416
  * @param {import('@formio/core').Component} componentJson - The JSON of a component.
411
417
  * @returns {bool} - TRUE if the component is an input component; FALSE otherwise.
412
418
  */
413
- export function isInputComponent(componentJson: import('@formio/core').Component): bool;
419
+ export function isInputComponent(componentJson: import("@formio/core").Component): bool;
414
420
  /**
415
421
  * Takes a component path, and returns a component path array.
416
422
  * @param {string} pathStr - The path string to convert to an array.
@@ -460,7 +466,7 @@ export function getComponentPathWithoutIndicies(path?: string): string;
460
466
  * @param {string} path - Path to the component
461
467
  * @returns {string} - Path to the component
462
468
  */
463
- export function getComponentPath(component: import('@formio/core').Component, path?: string): string;
469
+ export function getComponentPath(component: import("@formio/core").Component, path?: string): string;
464
470
  /**
465
471
  * Returns a parent component of the passed component instance skipping all the Layout components
466
472
  * @param {Component} componentInstance - The component to check for the parent.
@@ -492,7 +498,7 @@ export function getFocusableElements(element: HTMLElement): NodeList<HTMLElement
492
498
  * @param {import('@formio/core').Component} fullSchema - The component schema
493
499
  * @returns {Array<string>|null} - The saved types for the component
494
500
  */
495
- export function getComponentSavedTypes(fullSchema: import('@formio/core').Component): Array<string> | null;
501
+ export function getComponentSavedTypes(fullSchema: import("@formio/core").Component): Array<string> | null;
496
502
  /**
497
503
  * Returns the template keys inside the template code.
498
504
  * @param {string} template - The template to get the keys from.
@@ -504,7 +510,7 @@ export function getItemTemplateKeys(template: string): Array<string>;
504
510
  * @param {import('@formio/core').Component} comp - The component to check.
505
511
  * @returns {boolean} - TRUE if the component is a select resource with an object for its value; FALSE otherwise.
506
512
  */
507
- export function isSelectResourceWithObjectValue(comp?: import('@formio/core').Component): boolean;
513
+ export function isSelectResourceWithObjectValue(comp?: import("@formio/core").Component): boolean;
508
514
  export * from "./formUtils";
509
515
  /**
510
516
  * Map values through unfold and return first non-nil value.
@@ -379,6 +379,15 @@ export function setActionProperty(component, action, result, row, data, instance
379
379
  }
380
380
  return component;
381
381
  }
382
+ /**
383
+ * Removes HTML tags from string e.g. <div>Hello World</div> => Hello World
384
+ * @param {string} str - The string to remove HTML tags from.
385
+ * @returns {string} - The string without HTML tags.
386
+ */
387
+ export function removeHTML(str) {
388
+ const doc = new window.DOMParser().parseFromString(str, 'text/html');
389
+ return (doc.body.textContent || '').trim();
390
+ }
382
391
  /**
383
392
  * Unescape HTML characters like &lt, &gt, &amp and etc.
384
393
  * @param {string} str - The string to unescape.
@@ -388,8 +397,9 @@ export function unescapeHTML(str) {
388
397
  if (typeof window === 'undefined' || !('DOMParser' in window)) {
389
398
  return str;
390
399
  }
391
- const doc = new window.DOMParser().parseFromString(str, 'text/html');
392
- return doc.documentElement.textContent;
400
+ const elem = document.createElement('textarea');
401
+ elem.innerHTML = str;
402
+ return elem.value;
393
403
  }
394
404
  /**
395
405
  * Make HTML element from string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-rc.59",
3
+ "version": "5.0.0-rc.60",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {
@@ -79,9 +79,9 @@
79
79
  },
80
80
  "homepage": "https://github.com/formio/formio.js#readme",
81
81
  "dependencies": {
82
- "@formio/bootstrap": "^3.0.0-rc.25",
82
+ "@formio/bootstrap": "3.0.0-dev.98.17ba6ea",
83
83
  "@formio/choices.js": "^10.2.1",
84
- "@formio/core": "^2.1.0-dev.tt.13",
84
+ "@formio/core": "2.1.0-dev.104.42720ba",
85
85
  "@formio/text-mask-addons": "^3.8.0-formio.2",
86
86
  "@formio/vanilla-text-mask": "^5.1.1-formio.1",
87
87
  "abortcontroller-polyfill": "^1.7.5",
@@ -117,9 +117,9 @@
117
117
  "vanilla-picker": "^2.12.3"
118
118
  },
119
119
  "devDependencies": {
120
- "@typescript-eslint/eslint-plugin": "^7.9.0",
121
- "@typescript-eslint/parser": "^7.9.0",
122
- "ace-builds": "1.34.2",
120
+ "@typescript-eslint/eslint-plugin": "^7.14.1",
121
+ "@typescript-eslint/parser": "^7.14.1",
122
+ "ace-builds": "1.35.1",
123
123
  "async-limiter": "^2.0.0",
124
124
  "bootstrap-icons": "^1.10.5",
125
125
  "bootswatch": "^5.3.3",
@@ -129,7 +129,7 @@
129
129
  "ejs-loader": "^0.5.0",
130
130
  "escape-string-regexp": "^5.0.0",
131
131
  "eslint": "^8.57.0",
132
- "eslint-plugin-jsdoc": "^48.2.5",
132
+ "eslint-plugin-jsdoc": "^48.5.0",
133
133
  "fetch-mock": "^9.11.0",
134
134
  "file-loader": "^6.2.0",
135
135
  "flatpickr": "^4.6.13",
@@ -153,7 +153,7 @@
153
153
  "karma-mocha-reporter": "^2.2.5",
154
154
  "karma-phantomjs-launcher": "^1.0.4",
155
155
  "karma-webpack": "^5.0.1",
156
- "mocha": "^10.3.0",
156
+ "mocha": "^10.5.2",
157
157
  "mock-local-storage": "^1.1.24",
158
158
  "natives": "^1.1.6",
159
159
  "power-assert": "^1.6.1",
@@ -161,7 +161,7 @@
161
161
  "pretty": "^2.0.0",
162
162
  "pygments-css": "^1.0.0",
163
163
  "raw-loader": "^4.0.2",
164
- "sass": "^1.77.1",
164
+ "sass": "^1.77.6",
165
165
  "shortcut-buttons-flatpickr": "^0.4.0",
166
166
  "sinon": "^17.0.1",
167
167
  "string-replace-loader": "^3.1.0",
@@ -169,8 +169,8 @@
169
169
  "ts-node": "^10.9.1",
170
170
  "tsc": "^2.0.4",
171
171
  "typedoc": "^0.25.13",
172
- "typescript": "5.3.2",
173
- "webpack": "^5.90.3",
172
+ "typescript": "5.5.2",
173
+ "webpack": "^5.92.1",
174
174
  "webpack-bundle-analyzer": "^4.10.2",
175
175
  "webpack-cli": "^5.1.1",
176
176
  "webpack-node-externals": "^3.0.0",