@formio/js 5.0.0-rc.51 → 5.0.0-rc.53
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.js +561 -721
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +3 -49
- package/dist/formio.full.js +563 -693
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +3 -49
- package/dist/formio.js +11 -11
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.js +34 -194
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +11 -49
- package/lib/cjs/Form.d.ts +281 -10
- package/lib/cjs/Form.js +22 -35
- package/lib/cjs/FormBuilder.d.ts +187 -2
- package/lib/cjs/FormBuilder.js +29 -6
- package/lib/cjs/PDF.d.ts +0 -1
- package/lib/cjs/Webform.d.ts +6 -6
- package/lib/cjs/Webform.js +2 -2
- package/lib/cjs/Wizard.d.ts +1 -1
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +8 -6
- package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +6 -4
- package/lib/cjs/components/_classes/field/Field.d.ts +11 -2
- package/lib/cjs/components/_classes/field/Field.js +13 -1
- package/lib/cjs/components/_classes/input/Input.d.ts +4 -3
- package/lib/cjs/components/_classes/input/Input.js +2 -2
- package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +4 -5
- package/lib/cjs/components/_classes/list/ListComponent.form.js +3 -2
- package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +42 -11
- package/lib/cjs/components/_classes/multivalue/Multivalue.js +37 -3
- package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +127 -33
- package/lib/cjs/components/_classes/nested/NestedComponent.js +133 -15
- package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +6 -0
- package/lib/cjs/components/address/Address.d.ts +2 -1
- package/lib/cjs/components/button/Button.d.ts +1 -1
- package/lib/cjs/components/checkbox/Checkbox.d.ts +1 -1
- package/lib/cjs/components/columns/Columns.d.ts +1 -1
- package/lib/cjs/components/container/Container.d.ts +1 -0
- package/lib/cjs/components/datagrid/DataGrid.d.ts +1 -1
- package/lib/cjs/components/day/Day.d.ts +1 -1
- package/lib/cjs/components/editgrid/EditGrid.d.ts +2 -0
- package/lib/cjs/components/file/File.d.ts +2 -2
- package/lib/cjs/components/number/Number.d.ts +1 -1
- package/lib/cjs/components/radio/Radio.d.ts +1 -1
- package/lib/cjs/components/radio/Radio.form.d.ts +1 -3
- package/lib/cjs/components/radio/Radio.js +3 -3
- package/lib/cjs/components/select/Select.d.ts +9 -14
- package/lib/cjs/components/select/Select.form.d.ts +1 -3
- package/lib/cjs/components/select/Select.js +11 -15
- package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +1 -3
- package/lib/cjs/components/survey/Survey.d.ts +1 -1
- package/lib/cjs/components/table/Table.d.ts +1 -1
- package/lib/cjs/components/tabs/Tabs.d.ts +1 -1
- package/lib/cjs/components/textfield/TextField.d.ts +1 -1
- package/lib/cjs/providers/address/NominatimAddressProvider.d.ts +1 -1
- package/lib/cjs/providers/address/NominatimAddressProvider.js +5 -1
- package/lib/cjs/providers/processor/fileProcessor.d.ts +7 -1
- package/lib/cjs/providers/processor/fileProcessor.js +6 -0
- package/lib/cjs/providers/storage/azure.d.ts +4 -15
- package/lib/cjs/providers/storage/azure.js +3 -2
- package/lib/cjs/providers/storage/base64.d.ts +3 -7
- package/lib/cjs/providers/storage/base64.js +2 -1
- package/lib/cjs/providers/storage/dropbox.d.ts +4 -6
- package/lib/cjs/providers/storage/dropbox.js +3 -2
- package/lib/cjs/providers/storage/googleDrive.d.ts +4 -6
- package/lib/cjs/providers/storage/googleDrive.js +3 -1
- package/lib/cjs/providers/storage/indexeddb.d.ts +3 -8
- package/lib/cjs/providers/storage/indexeddb.js +2 -1
- package/lib/cjs/providers/storage/s3.d.ts +4 -22
- package/lib/cjs/providers/storage/s3.js +3 -2
- package/lib/cjs/providers/storage/url.d.ts +3 -8
- package/lib/cjs/providers/storage/url.js +4 -3
- package/lib/cjs/providers/storage/util.d.ts +22 -6
- package/lib/cjs/providers/storage/util.js +16 -5
- package/lib/cjs/utils/builder.d.ts +9 -7
- package/lib/cjs/utils/builder.js +10 -5
- package/lib/cjs/utils/calendarUtils.d.ts +6 -10
- package/lib/cjs/utils/calendarUtils.js +7 -11
- package/lib/cjs/utils/formUtils.d.ts +4 -4
- package/lib/cjs/utils/formUtils.js +3 -3
- package/lib/cjs/utils/utils.d.ts +123 -121
- package/lib/cjs/utils/utils.js +99 -94
- package/lib/mjs/Form.d.ts +281 -10
- package/lib/mjs/Form.js +112 -28
- package/lib/mjs/FormBuilder.d.ts +187 -2
- package/lib/mjs/FormBuilder.js +31 -6
- package/lib/mjs/PDF.d.ts +0 -1
- package/lib/mjs/Webform.d.ts +6 -6
- package/lib/mjs/Webform.js +3 -3
- package/lib/mjs/Wizard.d.ts +1 -1
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +8 -6
- package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +6 -4
- package/lib/mjs/components/_classes/field/Field.d.ts +11 -2
- package/lib/mjs/components/_classes/field/Field.js +13 -1
- package/lib/mjs/components/_classes/input/Input.d.ts +4 -3
- package/lib/mjs/components/_classes/input/Input.js +2 -2
- package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +4 -5
- package/lib/mjs/components/_classes/list/ListComponent.form.js +3 -2
- package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +42 -11
- package/lib/mjs/components/_classes/multivalue/Multivalue.js +37 -3
- package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +127 -33
- package/lib/mjs/components/_classes/nested/NestedComponent.js +133 -15
- package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +6 -0
- package/lib/mjs/components/address/Address.d.ts +2 -1
- package/lib/mjs/components/button/Button.d.ts +1 -1
- package/lib/mjs/components/checkbox/Checkbox.d.ts +1 -1
- package/lib/mjs/components/columns/Columns.d.ts +1 -1
- package/lib/mjs/components/container/Container.d.ts +1 -0
- package/lib/mjs/components/datagrid/DataGrid.d.ts +1 -1
- package/lib/mjs/components/day/Day.d.ts +1 -1
- package/lib/mjs/components/editgrid/EditGrid.d.ts +2 -0
- package/lib/mjs/components/file/File.d.ts +2 -2
- package/lib/mjs/components/number/Number.d.ts +1 -1
- package/lib/mjs/components/radio/Radio.d.ts +1 -1
- package/lib/mjs/components/radio/Radio.form.d.ts +1 -3
- package/lib/mjs/components/radio/Radio.js +3 -3
- package/lib/mjs/components/select/Select.d.ts +9 -14
- package/lib/mjs/components/select/Select.form.d.ts +1 -3
- package/lib/mjs/components/select/Select.js +11 -15
- package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +1 -3
- package/lib/mjs/components/survey/Survey.d.ts +1 -1
- package/lib/mjs/components/table/Table.d.ts +1 -1
- package/lib/mjs/components/tabs/Tabs.d.ts +1 -1
- package/lib/mjs/components/textfield/TextField.d.ts +1 -1
- package/lib/mjs/providers/address/NominatimAddressProvider.d.ts +1 -1
- package/lib/mjs/providers/address/NominatimAddressProvider.js +5 -1
- package/lib/mjs/providers/processor/fileProcessor.d.ts +7 -1
- package/lib/mjs/providers/processor/fileProcessor.js +6 -0
- package/lib/mjs/providers/storage/azure.d.ts +4 -15
- package/lib/mjs/providers/storage/azure.js +3 -2
- package/lib/mjs/providers/storage/base64.d.ts +3 -7
- package/lib/mjs/providers/storage/base64.js +2 -1
- package/lib/mjs/providers/storage/dropbox.d.ts +4 -6
- package/lib/mjs/providers/storage/dropbox.js +3 -2
- package/lib/mjs/providers/storage/googleDrive.d.ts +4 -6
- package/lib/mjs/providers/storage/googleDrive.js +3 -1
- package/lib/mjs/providers/storage/indexeddb.d.ts +3 -8
- package/lib/mjs/providers/storage/indexeddb.js +2 -1
- package/lib/mjs/providers/storage/s3.d.ts +4 -22
- package/lib/mjs/providers/storage/s3.js +3 -2
- package/lib/mjs/providers/storage/url.d.ts +3 -8
- package/lib/mjs/providers/storage/url.js +4 -3
- package/lib/mjs/providers/storage/util.d.ts +22 -6
- package/lib/mjs/providers/storage/util.js +16 -5
- package/lib/mjs/utils/builder.d.ts +9 -7
- package/lib/mjs/utils/builder.js +10 -5
- package/lib/mjs/utils/calendarUtils.d.ts +6 -10
- package/lib/mjs/utils/calendarUtils.js +7 -11
- package/lib/mjs/utils/formUtils.d.ts +4 -4
- package/lib/mjs/utils/formUtils.js +3 -3
- package/lib/mjs/utils/utils.d.ts +123 -121
- package/lib/mjs/utils/utils.js +99 -94
- package/package.json +11 -11
package/lib/mjs/utils/utils.d.ts
CHANGED
@@ -103,149 +103,146 @@ export function checkJsonConditional(component: import('@formio/core').Component
|
|
103
103
|
export function checkCondition(component: import('@formio/core').Component, row: any, data: any, form: import('@formio/core').Form, instance: any): boolean;
|
104
104
|
/**
|
105
105
|
* Test a trigger on a component.
|
106
|
-
* @param component
|
107
|
-
* @param
|
108
|
-
* @param
|
109
|
-
* @param data
|
110
|
-
* @param
|
111
|
-
* @param
|
112
|
-
* @
|
113
|
-
* @returns {mixed}
|
106
|
+
* @param {import('@formio/core').Component} component - The component to test the trigger against.
|
107
|
+
* @param {import('@formio/core').LogicTrigger} trigger - The trigger configuration.
|
108
|
+
* @param {import('@formio/core').DataObject} row - The contextual row data.
|
109
|
+
* @param {import('@formio/core').DataObject} data - The root data object.
|
110
|
+
* @param {import('@formio/core').Form} form - The form object.
|
111
|
+
* @param {any} instance - The component that is performing the trigger.
|
112
|
+
* @returns {boolean} - TRUE if the trigger should fire; FALSE otherwise.
|
114
113
|
*/
|
115
|
-
export function checkTrigger(component:
|
114
|
+
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;
|
116
115
|
/**
|
117
|
-
*
|
118
|
-
* @param component
|
119
|
-
* @param action
|
120
|
-
* @param result
|
121
|
-
* @param row
|
122
|
-
* @param data
|
123
|
-
* @param instance
|
116
|
+
* Sets a property on a component via an executed Logic action.
|
117
|
+
* @param {import('@formio/core').Component} component - The component to set the property on.
|
118
|
+
* @param {import('@formio/core').LogicAction} action - The action to perform on the component.
|
119
|
+
* @param {string} result - The name of the variable in the evaulation to use as the result.
|
120
|
+
* @param {import('@formio/core').DataObject} row - The contextual row data.
|
121
|
+
* @param {import('@formio/core').DataObject} data - The full submission data.
|
122
|
+
* @param {any} instance - The component instance.
|
123
|
+
* @returns {import('@formio/core').Component} - The modified component.
|
124
124
|
*/
|
125
|
-
export function setActionProperty(component:
|
125
|
+
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;
|
126
126
|
/**
|
127
127
|
* Unescape HTML characters like <, >, & and etc.
|
128
|
-
* @param str
|
129
|
-
* @returns {string}
|
128
|
+
* @param {string} str - The string to unescape.
|
129
|
+
* @returns {string} - The unescaped string.
|
130
130
|
*/
|
131
|
-
export function unescapeHTML(str:
|
131
|
+
export function unescapeHTML(str: string): string;
|
132
132
|
/**
|
133
133
|
* Make HTML element from string
|
134
|
-
* @param str
|
135
|
-
* @param selector
|
136
|
-
* @returns {HTMLElement}
|
134
|
+
* @param {string} str - The string to convert to an HTML element.
|
135
|
+
* @param {string} selector - The selector to use to get the element once it is created.
|
136
|
+
* @returns {HTMLElement} - The HTML element that was created.
|
137
137
|
*/
|
138
|
-
|
139
|
-
*
|
140
|
-
* @param str
|
141
|
-
* @param selector
|
142
|
-
*/
|
143
|
-
export function convertStringToHTMLElement(str: any, selector: any): any;
|
138
|
+
export function convertStringToHTMLElement(str: string, selector: string): HTMLElement;
|
144
139
|
/**
|
145
140
|
* Make a filename guaranteed to be unique.
|
146
|
-
* @param name
|
147
|
-
* @param template
|
148
|
-
* @param evalContext
|
149
|
-
* @returns {string}
|
141
|
+
* @param {string} name - The original name of the file.
|
142
|
+
* @param {string} template - The template to use for the unique name.
|
143
|
+
* @param {object} evalContext - The context to use for the evaluation.
|
144
|
+
* @returns {string} - A unique filename.
|
150
145
|
*/
|
151
|
-
export function uniqueName(name:
|
146
|
+
export function uniqueName(name: string, template: string, evalContext: object): string;
|
152
147
|
/**
|
153
|
-
*
|
148
|
+
* Returns a GUID
|
149
|
+
* @returns {string} - A GUID.
|
154
150
|
*/
|
155
151
|
export function guid(): string;
|
156
152
|
/**
|
157
153
|
* Return a translated date setting.
|
158
|
-
* @param date
|
159
|
-
* @returns {(null|Date)}
|
154
|
+
* @param {string|Date} date - The date to translate.
|
155
|
+
* @returns {(null|Date)} - The translated date.
|
160
156
|
*/
|
161
|
-
export function getDateSetting(date:
|
157
|
+
export function getDateSetting(date: string | Date): (null | Date);
|
162
158
|
/**
|
163
|
-
*
|
164
|
-
* @param date
|
159
|
+
* Returns true if the date is a valid date. False otherwise.
|
160
|
+
* @param {Date|string} date - The date to check for validity.
|
161
|
+
* @returns {boolean} - TRUE if the date is valid; FALSE otherwise.
|
165
162
|
*/
|
166
|
-
export function isValidDate(date:
|
163
|
+
export function isValidDate(date: Date | string): boolean;
|
167
164
|
/**
|
168
165
|
* Get the current timezone string.
|
169
|
-
* @returns {string}
|
166
|
+
* @returns {string} - The current timezone.
|
170
167
|
*/
|
171
168
|
export function currentTimezone(): string;
|
172
169
|
/**
|
173
170
|
* Get an offset date provided a date object and timezone object.
|
174
|
-
* @param date
|
175
|
-
* @param timezone
|
176
|
-
* @returns {Date}
|
171
|
+
* @param {Date} date - The date to offset.
|
172
|
+
* @param {string} timezone - The timezone to offset the date to.
|
173
|
+
* @returns {Date} - The offset date.
|
177
174
|
*/
|
178
|
-
export function offsetDate(date:
|
175
|
+
export function offsetDate(date: Date, timezone: string): Date;
|
179
176
|
/**
|
180
177
|
* Returns if the zones are loaded.
|
181
|
-
* @returns {boolean}
|
178
|
+
* @returns {boolean} - TRUE if the zones are loaded; FALSE otherwise.
|
182
179
|
*/
|
183
180
|
export function zonesLoaded(): boolean;
|
184
181
|
/**
|
185
182
|
* Returns if we should load the zones.
|
186
|
-
* @param timezone
|
187
|
-
* @returns {boolean}
|
183
|
+
* @param {string} timezone - The timezone to check if we should load the zones.
|
184
|
+
* @returns {boolean} - TRUE if we should load the zones; FALSE otherwise.
|
188
185
|
*/
|
189
|
-
export function shouldLoadZones(timezone:
|
186
|
+
export function shouldLoadZones(timezone: string): boolean;
|
190
187
|
/**
|
191
188
|
* Externally load the timezone data.
|
192
|
-
* @param url
|
193
|
-
* @param timezone
|
194
|
-
* @returns {Promise<any> | *}
|
189
|
+
* @param {string} url - The URL to load the timezone data from.
|
190
|
+
* @param {string} timezone - The timezone to load.
|
191
|
+
* @returns {Promise<any> | *} - Resolves when the zones for this timezone are loaded.
|
195
192
|
*/
|
196
|
-
export function loadZones(url:
|
193
|
+
export function loadZones(url: string, timezone: string): Promise<any> | any;
|
197
194
|
/**
|
198
195
|
* Get the moment date object for translating dates with timezones.
|
199
|
-
* @param value
|
200
|
-
* @param format
|
201
|
-
* @param timezone
|
202
|
-
* @returns {
|
196
|
+
* @param {string|Date} value - The value to convert into a moment date.
|
197
|
+
* @param {string} format - The format to convert the date to.
|
198
|
+
* @param {string} timezone - The timezone to convert the date to.
|
199
|
+
* @returns {Date} - The moment date object.
|
203
200
|
*/
|
204
|
-
export function momentDate(value:
|
201
|
+
export function momentDate(value: string | Date, format: string, timezone: string): Date;
|
205
202
|
/**
|
206
203
|
* Format a date provided a value, format, and timezone object.
|
207
|
-
* @param timezonesUrl
|
208
|
-
* @param value
|
209
|
-
* @param format
|
210
|
-
* @param timezone
|
211
|
-
* @param flatPickrInputFormat
|
212
|
-
* @returns {string}
|
204
|
+
* @param {string} timezonesUrl - The URL to load the timezone data from.
|
205
|
+
* @param {string|Date} value - The value to format.
|
206
|
+
* @param {string} format - The format to format the date to.
|
207
|
+
* @param {string} timezone - The timezone to format the date to.
|
208
|
+
* @param {string} flatPickrInputFormat - The format to use for flatpickr input.
|
209
|
+
* @returns {string} - The formatted date.
|
213
210
|
*/
|
214
|
-
export function formatDate(timezonesUrl:
|
211
|
+
export function formatDate(timezonesUrl: string, value: string | Date, format: string, timezone: string, flatPickrInputFormat: string): string;
|
215
212
|
/**
|
216
213
|
* Pass a format function to format within a timezone.
|
217
|
-
* @param timezonesUrl
|
218
|
-
* @param formatFn
|
219
|
-
* @param date
|
220
|
-
* @param format
|
221
|
-
* @param timezone
|
222
|
-
* @returns {string}
|
214
|
+
* @param {string} timezonesUrl - The URL to load the timezone data from.
|
215
|
+
* @param {Function} formatFn - The format function to use.
|
216
|
+
* @param {Date|string} date - The date to format.
|
217
|
+
* @param {string} format - The format to format the date to.
|
218
|
+
* @param {string} timezone - The timezone to format the date to.
|
219
|
+
* @returns {string} - The formatted date.
|
223
220
|
*/
|
224
|
-
export function formatOffset(timezonesUrl:
|
221
|
+
export function formatOffset(timezonesUrl: string, formatFn: Function, date: Date | string, format: string, timezone: string): string;
|
225
222
|
/**
|
226
|
-
*
|
227
|
-
* @param locale
|
223
|
+
* Returns the local date format information.
|
224
|
+
* @param {Intl.LocalesArgument} locale - The locale to get the date format for.
|
225
|
+
* @returns {object} - The local date format information.
|
228
226
|
*/
|
229
|
-
export function getLocaleDateFormatInfo(locale:
|
230
|
-
dayFirst: boolean;
|
231
|
-
};
|
227
|
+
export function getLocaleDateFormatInfo(locale: Intl.LocalesArgument): object;
|
232
228
|
/**
|
233
229
|
* Convert the format from the angular-datepicker module to flatpickr format.
|
234
|
-
* @param format
|
235
|
-
* @returns {string}
|
230
|
+
* @param {string} format - The format to convert.
|
231
|
+
* @returns {string} - The converted format.
|
236
232
|
*/
|
237
|
-
export function convertFormatToFlatpickr(format:
|
233
|
+
export function convertFormatToFlatpickr(format: string): string;
|
238
234
|
/**
|
239
235
|
* Convert the format from the angular-datepicker module to moment format.
|
240
|
-
* @param format
|
241
|
-
* @returns {string}
|
236
|
+
* @param {string} format - The format to convert.
|
237
|
+
* @returns {string} - The converted format.
|
242
238
|
*/
|
243
|
-
export function convertFormatToMoment(format:
|
239
|
+
export function convertFormatToMoment(format: string): string;
|
244
240
|
/**
|
245
|
-
*
|
246
|
-
* @param format
|
241
|
+
* Convert the format from the angular-datepicker module to mask format.
|
242
|
+
* @param {string} format - The format to convert.
|
243
|
+
* @returns {string} - The converted format.
|
247
244
|
*/
|
248
|
-
export function convertFormatToMask(format:
|
245
|
+
export function convertFormatToMask(format: string): string;
|
249
246
|
/**
|
250
247
|
* Returns an input mask that is compatible with the input mask library.
|
251
248
|
* @param {string} mask - The Form.io input mask.
|
@@ -254,64 +251,69 @@ export function convertFormatToMask(format: any): any;
|
|
254
251
|
*/
|
255
252
|
export function getInputMask(mask: string, placeholderChar: string): any[];
|
256
253
|
/**
|
257
|
-
*
|
258
|
-
* @param value
|
259
|
-
* @param mask
|
260
|
-
* @param placeholderChar
|
254
|
+
* Unmasks a value using the provided mask and placeholder characters.
|
255
|
+
* @param {string} value - The value to unmask.
|
256
|
+
* @param {string} mask - The mask to use for unmasking.
|
257
|
+
* @param {string} placeholderChar - The placeholder character to use for unmasking.
|
258
|
+
* @returns {string} - The unmasked value.
|
261
259
|
*/
|
262
|
-
export function unmaskValue(value:
|
260
|
+
export function unmaskValue(value: string, mask: string, placeholderChar: string): string;
|
263
261
|
/**
|
264
|
-
*
|
265
|
-
* @param value
|
266
|
-
* @param inputMask
|
262
|
+
* Returns true if the value matches the input mask format.
|
263
|
+
* @param {string} value - The value to check.
|
264
|
+
* @param {string} inputMask - The input mask to check against.
|
265
|
+
* @returns {boolean} - TRUE if the value matches the input mask; FALSE otherwise.
|
267
266
|
*/
|
268
|
-
export function matchInputMask(value:
|
267
|
+
export function matchInputMask(value: string, inputMask: string): boolean;
|
269
268
|
/**
|
270
|
-
*
|
271
|
-
* @param lang
|
269
|
+
* Returns the number separators (i.e. 1,000) for the provided language.
|
270
|
+
* @param {string} lang - The language code to get the number separators for.
|
271
|
+
* @returns {{delimiter: string, decimalSeparator: string}} - The number separators.
|
272
272
|
*/
|
273
273
|
export function getNumberSeparators(lang?: string): {
|
274
274
|
delimiter: string;
|
275
275
|
decimalSeparator: string;
|
276
276
|
};
|
277
277
|
/**
|
278
|
-
*
|
279
|
-
* @param component
|
280
|
-
* @param defaultLimit
|
278
|
+
* Returns the number for the maximum amount of decimal places for a number.
|
279
|
+
* @param {import('@formio/core').Component} component - The component to check for decimal limits.
|
280
|
+
* @param {number} defaultLimit - The default limit to use if none is provided in the component.
|
281
|
+
* @returns {number} - The number of decimal places allowed.
|
281
282
|
*/
|
282
|
-
export function getNumberDecimalLimit(component:
|
283
|
+
export function getNumberDecimalLimit(component: import('@formio/core').Component, defaultLimit: number): number;
|
283
284
|
/**
|
284
|
-
*
|
285
|
-
* @param
|
286
|
-
* @param
|
287
|
-
* @param
|
288
|
-
* @param
|
289
|
-
* @param
|
285
|
+
* Returns the currency affixes for a specific language.
|
286
|
+
* @param {object} arg0 - The arguments object.
|
287
|
+
* @param {string} arg0.currency - The currency code to get the affixes for.
|
288
|
+
* @param {number} arg0.decimalLimit - The number of decimal places to use.
|
289
|
+
* @param {string} arg0.decimalSeparator - The decimal separator to use.
|
290
|
+
* @param {string} arg0.lang - The language code to use.
|
291
|
+
* @returns {{prefix: string, suffix: string}} - The currency affixes.
|
290
292
|
*/
|
291
293
|
export function getCurrencyAffixes({ currency, decimalLimit, decimalSeparator, lang, }: {
|
292
|
-
currency:
|
293
|
-
decimalLimit:
|
294
|
-
decimalSeparator:
|
295
|
-
lang:
|
294
|
+
currency: string;
|
295
|
+
decimalLimit: number;
|
296
|
+
decimalSeparator: string;
|
297
|
+
lang: string;
|
296
298
|
}): {
|
297
299
|
prefix: string;
|
298
300
|
suffix: string;
|
299
301
|
};
|
300
302
|
/**
|
301
303
|
* Fetch the field data provided a component.
|
302
|
-
* @param data
|
303
|
-
* @param component
|
304
|
-
* @returns {*}
|
304
|
+
* @param {import('@formio/core').DataObject} data - The data object to fetch the field data from.
|
305
|
+
* @param {import('@formio/core').Component} component - The component to fetch the field data for.
|
306
|
+
* @returns {*} - The field data.
|
305
307
|
*/
|
306
|
-
export function fieldData(data:
|
308
|
+
export function fieldData(data: import('@formio/core').DataObject, component: import('@formio/core').Component): any;
|
307
309
|
/**
|
308
310
|
* Delays function execution with possibility to execute function synchronously or cancel it.
|
309
|
-
* @param fn Function to delay
|
310
|
-
* @param delay Delay time
|
311
|
-
* @param {...any} args
|
312
|
-
* @returns {*}
|
311
|
+
* @param {Function} fn - Function to delay
|
312
|
+
* @param {number} delay - Delay time
|
313
|
+
* @param {...any} args - Arguments to pass to the function
|
314
|
+
* @returns {*} - Function to cancel the delay
|
313
315
|
*/
|
314
|
-
export function delay(fn:
|
316
|
+
export function delay(fn: Function, delay?: number, ...args: any[]): any;
|
315
317
|
/**
|
316
318
|
* Iterate the given key to make it unique.
|
317
319
|
* @param {string} key
|