dromo-uploader-js 2.0.8 → 2.0.9
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.
- package/dist/DromoUploader.js +1 -1
- package/dist/DromoUploader.js.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/index.d.ts +120 -124
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +514 -484
- package/package.json +4 -4
package/dist/interfaces.d.ts
CHANGED
|
@@ -1,484 +1,514 @@
|
|
|
1
|
-
export
|
|
2
|
-
errorMessage?: string | undefined;
|
|
3
|
-
level?: ("info" | "warning" | "error") | undefined;
|
|
4
|
-
validate: "required";
|
|
5
|
-
};
|
|
6
|
-
export
|
|
7
|
-
errorMessage?: string | undefined;
|
|
8
|
-
level?: ("info" | "warning" | "error") | undefined;
|
|
9
|
-
validate: "unique" | "unique_case_insensitive";
|
|
10
|
-
};
|
|
11
|
-
export
|
|
12
|
-
errorMessage?: string | undefined;
|
|
13
|
-
level?: ("info" | "warning" | "error") | undefined;
|
|
14
|
-
validate: "unique_with";
|
|
15
|
-
uniqueKey: string;
|
|
16
|
-
};
|
|
17
|
-
export
|
|
18
|
-
errorMessage?: string | undefined;
|
|
19
|
-
level?: ("info" | "warning" | "error") | undefined;
|
|
20
|
-
validate: "regex_match" | "regex_exclude";
|
|
21
|
-
regex: string | RegExp;
|
|
22
|
-
regexOptions?: {
|
|
23
|
-
ignoreCase?: boolean | undefined;
|
|
24
|
-
dotAll?: boolean | undefined;
|
|
25
|
-
multiline?: boolean | undefined;
|
|
26
|
-
unicode?: boolean | undefined;
|
|
27
|
-
} | undefined;
|
|
28
|
-
};
|
|
29
|
-
export
|
|
30
|
-
errorMessage?: string | undefined;
|
|
31
|
-
level?: ("info" | "warning" | "error") | undefined;
|
|
32
|
-
validate: "require_with" | "require_without" | "require_with_all" | "require_without_all";
|
|
33
|
-
fields: string[];
|
|
34
|
-
};
|
|
35
|
-
export
|
|
36
|
-
errorMessage?: string | undefined;
|
|
37
|
-
level?: ("info" | "warning" | "error") | undefined;
|
|
38
|
-
validate: "require_with_values" | "require_without_values" | "require_with_all_values" | "require_without_all_values";
|
|
39
|
-
fieldValues: {
|
|
40
|
-
[x: string]: any;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
label: string;
|
|
46
|
-
key: string;
|
|
47
|
-
description?: string | undefined;
|
|
48
|
-
alternateMatches?: string[] | undefined;
|
|
49
|
-
validators?: IValidatorField[];
|
|
50
|
-
invalidValueMessage?: string | undefined;
|
|
51
|
-
readOnly?: boolean;
|
|
52
|
-
hidden?: boolean;
|
|
53
|
-
requireMapping?: boolean | undefined;
|
|
54
|
-
type?: ("string" | [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
backgroundColor?: string;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
(
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
};
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
}
|
|
434
|
-
export
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
export
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
1
|
+
export type IRequiredValidator = {
|
|
2
|
+
errorMessage?: string | undefined;
|
|
3
|
+
level?: ("info" | "warning" | "error") | undefined;
|
|
4
|
+
validate: "required";
|
|
5
|
+
};
|
|
6
|
+
export type IUniqueValidator = {
|
|
7
|
+
errorMessage?: string | undefined;
|
|
8
|
+
level?: ("info" | "warning" | "error") | undefined;
|
|
9
|
+
validate: "unique" | "unique_case_insensitive";
|
|
10
|
+
};
|
|
11
|
+
export type IUniqueWithValidator = {
|
|
12
|
+
errorMessage?: string | undefined;
|
|
13
|
+
level?: ("info" | "warning" | "error") | undefined;
|
|
14
|
+
validate: "unique_with";
|
|
15
|
+
uniqueKey: string;
|
|
16
|
+
};
|
|
17
|
+
export type IRegexValidator = {
|
|
18
|
+
errorMessage?: string | undefined;
|
|
19
|
+
level?: ("info" | "warning" | "error") | undefined;
|
|
20
|
+
validate: "regex_match" | "regex_exclude";
|
|
21
|
+
regex: string | RegExp;
|
|
22
|
+
regexOptions?: {
|
|
23
|
+
ignoreCase?: boolean | undefined;
|
|
24
|
+
dotAll?: boolean | undefined;
|
|
25
|
+
multiline?: boolean | undefined;
|
|
26
|
+
unicode?: boolean | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
};
|
|
29
|
+
export type IRequireWithValidator = {
|
|
30
|
+
errorMessage?: string | undefined;
|
|
31
|
+
level?: ("info" | "warning" | "error") | undefined;
|
|
32
|
+
validate: "require_with" | "require_without" | "require_with_all" | "require_without_all";
|
|
33
|
+
fields: string[];
|
|
34
|
+
};
|
|
35
|
+
export type IRequireWithValuesValidator = {
|
|
36
|
+
errorMessage?: string | undefined;
|
|
37
|
+
level?: ("info" | "warning" | "error") | undefined;
|
|
38
|
+
validate: "require_with_values" | "require_without_values" | "require_with_all_values" | "require_without_all_values";
|
|
39
|
+
fieldValues: {
|
|
40
|
+
[x: string]: any;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export type IValidatorField = IRequiredValidator | IUniqueValidator | IUniqueWithValidator | IRegexValidator | IRequireWithValidator | IRequireWithValuesValidator;
|
|
44
|
+
export type IStringField = {
|
|
45
|
+
label: string;
|
|
46
|
+
key: string;
|
|
47
|
+
description?: string | undefined;
|
|
48
|
+
alternateMatches?: string[] | undefined;
|
|
49
|
+
validators?: IValidatorField[];
|
|
50
|
+
invalidValueMessage?: string | undefined;
|
|
51
|
+
readOnly?: boolean;
|
|
52
|
+
hidden?: boolean;
|
|
53
|
+
requireMapping?: boolean | undefined;
|
|
54
|
+
type?: ("string" | [
|
|
55
|
+
"string",
|
|
56
|
+
{
|
|
57
|
+
[x: string]: never;
|
|
58
|
+
}
|
|
59
|
+
]) | undefined;
|
|
60
|
+
};
|
|
61
|
+
export type ICheckboxField = {
|
|
62
|
+
label: string;
|
|
63
|
+
key: string;
|
|
64
|
+
description?: string | undefined;
|
|
65
|
+
alternateMatches?: string[] | undefined;
|
|
66
|
+
validators?: IValidatorField[];
|
|
67
|
+
invalidValueMessage?: string | undefined;
|
|
68
|
+
readOnly?: boolean;
|
|
69
|
+
hidden?: boolean;
|
|
70
|
+
requireMapping?: boolean | undefined;
|
|
71
|
+
type: "checkbox" | [
|
|
72
|
+
"checkbox",
|
|
73
|
+
{
|
|
74
|
+
[x: string]: never;
|
|
75
|
+
}
|
|
76
|
+
];
|
|
77
|
+
};
|
|
78
|
+
export type IEmailField = {
|
|
79
|
+
label: string;
|
|
80
|
+
key: string;
|
|
81
|
+
description?: string | undefined;
|
|
82
|
+
alternateMatches?: string[] | undefined;
|
|
83
|
+
validators?: IValidatorField[];
|
|
84
|
+
invalidValueMessage?: string | undefined;
|
|
85
|
+
readOnly?: boolean;
|
|
86
|
+
hidden?: boolean;
|
|
87
|
+
requireMapping?: boolean | undefined;
|
|
88
|
+
type: "email" | [
|
|
89
|
+
"email",
|
|
90
|
+
{
|
|
91
|
+
[x: string]: never;
|
|
92
|
+
}
|
|
93
|
+
];
|
|
94
|
+
};
|
|
95
|
+
export type IDeveloperSelectOption = {
|
|
96
|
+
label: string;
|
|
97
|
+
value: string;
|
|
98
|
+
alternateMatches?: string[] | undefined;
|
|
99
|
+
};
|
|
100
|
+
export type ISelectField = {
|
|
101
|
+
label: string;
|
|
102
|
+
key: string;
|
|
103
|
+
description?: string | undefined;
|
|
104
|
+
alternateMatches?: string[] | undefined;
|
|
105
|
+
validators?: IValidatorField[];
|
|
106
|
+
invalidValueMessage?: string | undefined;
|
|
107
|
+
readOnly?: boolean;
|
|
108
|
+
hidden?: boolean;
|
|
109
|
+
requireMapping?: boolean | undefined;
|
|
110
|
+
type: "select" | [
|
|
111
|
+
"select",
|
|
112
|
+
{
|
|
113
|
+
[x: string]: never;
|
|
114
|
+
}
|
|
115
|
+
];
|
|
116
|
+
selectOptions: IDeveloperSelectOption[];
|
|
117
|
+
};
|
|
118
|
+
export type INumberField = {
|
|
119
|
+
label: string;
|
|
120
|
+
key: string;
|
|
121
|
+
description?: string | undefined;
|
|
122
|
+
alternateMatches?: string[] | undefined;
|
|
123
|
+
validators?: IValidatorField[];
|
|
124
|
+
invalidValueMessage?: string | undefined;
|
|
125
|
+
readOnly?: boolean;
|
|
126
|
+
hidden?: boolean;
|
|
127
|
+
requireMapping?: boolean | undefined;
|
|
128
|
+
type: "number" | [
|
|
129
|
+
"number",
|
|
130
|
+
(("default" | "percent" | "percent_0" | "percent_1" | "percent_2" | "percent_3" | "percent_4" | "decimal_0" | "decimal_1" | "decimal_2" | "decimal_3" | "decimal_4" | "integer" | "plain" | "usd" | "usd_accounting" | "eur" | "gbp") | {
|
|
131
|
+
preset?: ("default" | "percent" | "percent_0" | "percent_1" | "percent_2" | "percent_3" | "percent_4" | "decimal_0" | "decimal_1" | "decimal_2" | "decimal_3" | "decimal_4" | "integer" | "plain" | "usd" | "usd_accounting" | "eur" | "gbp") | undefined;
|
|
132
|
+
round?: number | undefined;
|
|
133
|
+
displayFormat?: {
|
|
134
|
+
output?: ("currency" | "percent" | "byte" | "time" | "ordinal" | "number") | undefined;
|
|
135
|
+
base?: ("decimal" | "binary" | "general") | undefined;
|
|
136
|
+
characteristic?: number | undefined;
|
|
137
|
+
prefix?: string | undefined;
|
|
138
|
+
postfix?: string | undefined;
|
|
139
|
+
forceAverage?: ("trillion" | "billion" | "million" | "thousand") | undefined;
|
|
140
|
+
average?: boolean | undefined;
|
|
141
|
+
currencyPosition?: ("prefix" | "infix" | "postfix") | undefined;
|
|
142
|
+
currencySymbol?: string | undefined;
|
|
143
|
+
totalLength?: number | undefined;
|
|
144
|
+
mantissa?: number | undefined;
|
|
145
|
+
optionalMantissa?: boolean | undefined;
|
|
146
|
+
trimMantissa?: boolean | undefined;
|
|
147
|
+
optionalCharacteristic?: boolean | undefined;
|
|
148
|
+
thousandSeparated?: boolean | undefined;
|
|
149
|
+
abbreviations?: {
|
|
150
|
+
thousand?: string | undefined;
|
|
151
|
+
million?: string | undefined;
|
|
152
|
+
billion?: string | undefined;
|
|
153
|
+
trillion?: string | undefined;
|
|
154
|
+
} | undefined;
|
|
155
|
+
negative?: ("sign" | "parenthesis") | undefined;
|
|
156
|
+
forceSign?: boolean | undefined;
|
|
157
|
+
spaceSeparated?: boolean | undefined;
|
|
158
|
+
spaceSeparatedCurrency?: boolean | undefined;
|
|
159
|
+
spaceSeparatedAbbreviation?: boolean | undefined;
|
|
160
|
+
exponential?: boolean | undefined;
|
|
161
|
+
prefixSymbol?: boolean | undefined;
|
|
162
|
+
lowPrecision?: boolean | undefined;
|
|
163
|
+
roundingFunction?: ((args0: number, ...args1: unknown[]) => number) | undefined;
|
|
164
|
+
} | undefined;
|
|
165
|
+
outputFormat?: {
|
|
166
|
+
output?: ("currency" | "percent" | "byte" | "time" | "ordinal" | "number") | undefined;
|
|
167
|
+
base?: ("decimal" | "binary" | "general") | undefined;
|
|
168
|
+
characteristic?: number | undefined;
|
|
169
|
+
prefix?: string | undefined;
|
|
170
|
+
postfix?: string | undefined;
|
|
171
|
+
forceAverage?: ("trillion" | "billion" | "million" | "thousand") | undefined;
|
|
172
|
+
average?: boolean | undefined;
|
|
173
|
+
currencyPosition?: ("prefix" | "infix" | "postfix") | undefined;
|
|
174
|
+
currencySymbol?: string | undefined;
|
|
175
|
+
totalLength?: number | undefined;
|
|
176
|
+
mantissa?: number | undefined;
|
|
177
|
+
optionalMantissa?: boolean | undefined;
|
|
178
|
+
trimMantissa?: boolean | undefined;
|
|
179
|
+
optionalCharacteristic?: boolean | undefined;
|
|
180
|
+
thousandSeparated?: boolean | undefined;
|
|
181
|
+
abbreviations?: {
|
|
182
|
+
thousand?: string | undefined;
|
|
183
|
+
million?: string | undefined;
|
|
184
|
+
billion?: string | undefined;
|
|
185
|
+
trillion?: string | undefined;
|
|
186
|
+
} | undefined;
|
|
187
|
+
negative?: ("sign" | "parenthesis") | undefined;
|
|
188
|
+
forceSign?: boolean | undefined;
|
|
189
|
+
spaceSeparated?: boolean | undefined;
|
|
190
|
+
spaceSeparatedCurrency?: boolean | undefined;
|
|
191
|
+
spaceSeparatedAbbreviation?: boolean | undefined;
|
|
192
|
+
exponential?: boolean | undefined;
|
|
193
|
+
prefixSymbol?: boolean | undefined;
|
|
194
|
+
lowPrecision?: boolean | undefined;
|
|
195
|
+
roundingFunction?: ((args0: number, ...args1: unknown[]) => number) | undefined;
|
|
196
|
+
} | undefined;
|
|
197
|
+
})
|
|
198
|
+
];
|
|
199
|
+
};
|
|
200
|
+
export type IDateTimeField = {
|
|
201
|
+
label: string;
|
|
202
|
+
key: string;
|
|
203
|
+
description?: string | undefined;
|
|
204
|
+
alternateMatches?: string[] | undefined;
|
|
205
|
+
validators?: IValidatorField[];
|
|
206
|
+
invalidValueMessage?: string | undefined;
|
|
207
|
+
readOnly?: boolean;
|
|
208
|
+
hidden?: boolean;
|
|
209
|
+
requireMapping?: boolean | undefined;
|
|
210
|
+
type: ("date" | "time" | "datetime") | [
|
|
211
|
+
"date" | "time" | "datetime",
|
|
212
|
+
{
|
|
213
|
+
displayFormat?: string | undefined;
|
|
214
|
+
outputFormat?: string | undefined;
|
|
215
|
+
locale?: string | undefined;
|
|
216
|
+
withSeconds?: boolean | undefined;
|
|
217
|
+
}
|
|
218
|
+
];
|
|
219
|
+
};
|
|
220
|
+
export type IDeveloperField = IStringField | ICheckboxField | IEmailField | ISelectField | INumberField | IDateTimeField;
|
|
221
|
+
export type IDeveloperStyleOverrides = {
|
|
222
|
+
global?: {
|
|
223
|
+
textColor?: string;
|
|
224
|
+
primaryTextColor?: string;
|
|
225
|
+
secondaryTextColor?: string;
|
|
226
|
+
successColor?: string;
|
|
227
|
+
warningColor?: string;
|
|
228
|
+
customFontURL?: string | null;
|
|
229
|
+
customFontFamily?: string | null;
|
|
230
|
+
backgroundColor?: string;
|
|
231
|
+
borderRadius?: string;
|
|
232
|
+
borderWidth?: string;
|
|
233
|
+
borderColor?: string;
|
|
234
|
+
borderStyle?: string;
|
|
235
|
+
};
|
|
236
|
+
primaryButton?: {
|
|
237
|
+
borderRadius?: string;
|
|
238
|
+
backgroundColor?: string;
|
|
239
|
+
textColor?: string;
|
|
240
|
+
border?: string;
|
|
241
|
+
hoverBackgroundColor?: string;
|
|
242
|
+
hoverTextColor?: string;
|
|
243
|
+
hoverBorder?: string;
|
|
244
|
+
};
|
|
245
|
+
secondaryButton?: {
|
|
246
|
+
borderRadius?: string;
|
|
247
|
+
backgroundColor?: string;
|
|
248
|
+
textColor?: string;
|
|
249
|
+
border?: string;
|
|
250
|
+
hoverBackgroundColor?: string;
|
|
251
|
+
hoverTextColor?: string;
|
|
252
|
+
hoverBorder?: string;
|
|
253
|
+
};
|
|
254
|
+
tertiaryButton?: {
|
|
255
|
+
borderRadius?: string;
|
|
256
|
+
backgroundColor?: string;
|
|
257
|
+
textColor?: string;
|
|
258
|
+
border?: string;
|
|
259
|
+
hoverBackgroundColor?: string;
|
|
260
|
+
hoverTextColor?: string;
|
|
261
|
+
hoverBorder?: string;
|
|
262
|
+
};
|
|
263
|
+
dropzone?: {
|
|
264
|
+
borderWidth?: number;
|
|
265
|
+
borderRadius?: number;
|
|
266
|
+
borderColor?: string;
|
|
267
|
+
borderStyle?: string;
|
|
268
|
+
backgroundColor?: string;
|
|
269
|
+
color?: string;
|
|
270
|
+
outline?: string;
|
|
271
|
+
};
|
|
272
|
+
helpText?: {
|
|
273
|
+
textColor?: string;
|
|
274
|
+
backgroundColor?: string;
|
|
275
|
+
};
|
|
276
|
+
stepperBar?: {
|
|
277
|
+
completeColor?: string;
|
|
278
|
+
incompleteColor?: string;
|
|
279
|
+
currentColor?: string;
|
|
280
|
+
fontSize?: string;
|
|
281
|
+
completeFontWeight?: string;
|
|
282
|
+
incompleteFontWeight?: string;
|
|
283
|
+
currentFontWeight?: string;
|
|
284
|
+
backgroundColor?: string;
|
|
285
|
+
borderBottom?: string;
|
|
286
|
+
};
|
|
287
|
+
dataTable?: {
|
|
288
|
+
headerFontWeight?: string;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
export type TLocaleShorthand = "bn" | "en" | "hr" | "ja" | "nl" | "ru" | "uk" | "cs" | "es" | "hu" | "ko" | "no" | "sv" | "vi" | "da" | "fi" | "id" | "lt" | "pl" | "sw" | "zh_CN" | "de" | "fr" | "is" | "lv" | "pt" | "th" | "zh_TW" | "el" | "hi" | "it" | "ms" | "ro" | "tr";
|
|
292
|
+
export type IDeveloperSettings = {
|
|
293
|
+
importIdentifier: string;
|
|
294
|
+
title?: string | undefined;
|
|
295
|
+
allowInvalidSubmit?: boolean | undefined;
|
|
296
|
+
invalidDataBehavior?: ("BLOCK_SUBMIT" | "INCLUDE_INVALID_ROWS" | "REMOVE_INVALID_ROWS") | undefined;
|
|
297
|
+
backendSync?: boolean | undefined;
|
|
298
|
+
backendSyncMode?: ("DISABLED" | "FULL_DATA" | "MAPPINGS_ONLY") | undefined;
|
|
299
|
+
manualInputDisabled?: boolean;
|
|
300
|
+
manualInputOnly?: boolean;
|
|
301
|
+
allowCustomFields?: boolean;
|
|
302
|
+
maxRecords?: number | null;
|
|
303
|
+
developmentMode?: boolean | undefined;
|
|
304
|
+
displayEncoding?: boolean;
|
|
305
|
+
styleOverrides?: IDeveloperStyleOverrides;
|
|
306
|
+
maxFileSize?: number;
|
|
307
|
+
webhookUrl?: string | null;
|
|
308
|
+
needsReviewWebhookUrl?: string | null;
|
|
309
|
+
initialData?: ({
|
|
310
|
+
[x: string]: any;
|
|
311
|
+
}[] | any[][]) | null;
|
|
312
|
+
uploadStep?: {
|
|
313
|
+
helpText?: string | null;
|
|
314
|
+
};
|
|
315
|
+
matchingStep?: {
|
|
316
|
+
helpText?: string | null;
|
|
317
|
+
headerRowOverride?: number | null;
|
|
318
|
+
fuzzyMatchHeaders?: boolean;
|
|
319
|
+
alwaysMatchSelectFields?: boolean;
|
|
320
|
+
matchToSchema?: boolean;
|
|
321
|
+
};
|
|
322
|
+
reviewStep?: {
|
|
323
|
+
helpText?: string | null;
|
|
324
|
+
processingText?: string | null;
|
|
325
|
+
};
|
|
326
|
+
autoMapHeaders?: boolean;
|
|
327
|
+
delimiter?: string | undefined;
|
|
328
|
+
backendOverride?: {
|
|
329
|
+
url: string;
|
|
330
|
+
type: "AWS" | "AZURE";
|
|
331
|
+
};
|
|
332
|
+
locale?: TLocaleShorthand;
|
|
333
|
+
templateDownloadFilename?: string | null;
|
|
334
|
+
browserExcelParsing?: boolean;
|
|
335
|
+
version?: string;
|
|
336
|
+
};
|
|
337
|
+
export type IUser = {
|
|
338
|
+
id: string;
|
|
339
|
+
name?: string | undefined;
|
|
340
|
+
email?: string | undefined;
|
|
341
|
+
companyId?: string | undefined;
|
|
342
|
+
companyName?: string | undefined;
|
|
343
|
+
};
|
|
344
|
+
type MaybeAsync<T> = T | Promise<T>;
|
|
345
|
+
export interface IParentConnectionMethods {
|
|
346
|
+
handleColumnHooks: (fieldName: string, data: IColumnHookInput[]) => Promise<IColumnHookOutput[]>;
|
|
347
|
+
handleRowHooks: (data: IRowHookInput[], mode: "init" | "update") => Promise<IRowHookOutputInternal[]>;
|
|
348
|
+
handleStepHook: (step: EStepHook, data: IUploadStepData | IReviewStepData) => void;
|
|
349
|
+
handleRowDeleteHooks: (deletedRows: IRowHookInput[]) => Promise<void>;
|
|
350
|
+
handleBeforeFinishCallback: (data: Record<string, any>[], metadata: IResultMetadata) => Promise<IBeforeFinishOutput>;
|
|
351
|
+
handleResults: (data: any, metadata: IResultMetadata) => Promise<void>;
|
|
352
|
+
handleCloseModal: () => void;
|
|
353
|
+
handleCancel: () => void;
|
|
354
|
+
}
|
|
355
|
+
export interface IConnectionMethods {
|
|
356
|
+
init: (licenseKey: string, fields: IDeveloperField[], settings: IDeveloperSettings, user: IUser, appHost?: string) => void;
|
|
357
|
+
initFromSavedSchema: (licenseKey: string, schemaName: string, appHost: string, options?: IImporterOptions) => void;
|
|
358
|
+
setHeaderRowOverride: (headerRowOverride: number | null) => void;
|
|
359
|
+
setNumRegisteredColHooks: (numColHooks: number) => void;
|
|
360
|
+
setNumRegisteredRowHooks: (numRowHooks: number) => void;
|
|
361
|
+
setNumRegisteredRowDeleteHooks: (numRowDeleteHooks: number) => void;
|
|
362
|
+
setUser: (user: IUser) => void;
|
|
363
|
+
addField: (field: IDeveloperField, position?: IPositionSpec) => void;
|
|
364
|
+
removeField: (fieldKey: string) => void;
|
|
365
|
+
updateInfoMessages: (messages: IMessagesForCell[]) => void;
|
|
366
|
+
setDevelopmentMode: (developmentMode: boolean) => void;
|
|
367
|
+
rehydrate: (rehydrateState: any, headlessImportId?: string) => void;
|
|
368
|
+
addRows: (rows: IRowToAdd[]) => void;
|
|
369
|
+
removeRows: (rowIds: string[]) => void;
|
|
370
|
+
}
|
|
371
|
+
export type IPublicConnectionMethods = Pick<IConnectionMethods, "addField" | "updateInfoMessages" | "setHeaderRowOverride" | "setUser" | "removeField" | "setDevelopmentMode" | "addRows" | "removeRows">;
|
|
372
|
+
export type IDeveloperFieldType = "string" | "checkbox" | "select" | "number" | "date" | "datetime" | "time" | "email";
|
|
373
|
+
export interface ICellRef {
|
|
374
|
+
rowIndex: number;
|
|
375
|
+
fieldKey: string;
|
|
376
|
+
}
|
|
377
|
+
export interface ITableMessage {
|
|
378
|
+
message: string;
|
|
379
|
+
level: "info" | "warning" | "error";
|
|
380
|
+
}
|
|
381
|
+
export interface IMessagesForCell extends ICellRef {
|
|
382
|
+
messages: ITableMessage[];
|
|
383
|
+
}
|
|
384
|
+
export interface IColumnHook {
|
|
385
|
+
fieldName: string;
|
|
386
|
+
callback: (values: IColumnHookInput[]) => MaybeAsync<IColumnHookOutput[]>;
|
|
387
|
+
}
|
|
388
|
+
export interface IRowHook {
|
|
389
|
+
(data: IRowHookInput, mode: "init" | "update"): MaybeAsync<IRowHookOutput>;
|
|
390
|
+
}
|
|
391
|
+
export type IBulkRowHook = (data: IRowHookInput[], mode: "init" | "update") => IRowHookOutputInternal[] | Promise<IRowHookOutputInternal[]>;
|
|
392
|
+
export interface IRowDeleteHook {
|
|
393
|
+
(data: IRowHookInput): MaybeAsync<void>;
|
|
394
|
+
}
|
|
395
|
+
export interface IColumnHookInput {
|
|
396
|
+
index: number;
|
|
397
|
+
value: any;
|
|
398
|
+
rowId: string;
|
|
399
|
+
}
|
|
400
|
+
export interface IColumnHookOutput {
|
|
401
|
+
index: number;
|
|
402
|
+
value?: any;
|
|
403
|
+
info?: ITableMessage[];
|
|
404
|
+
}
|
|
405
|
+
export interface IRowHookInput {
|
|
406
|
+
row: {
|
|
407
|
+
[key: string]: {
|
|
408
|
+
value: any;
|
|
409
|
+
resultValue: any;
|
|
410
|
+
info?: ITableMessage[];
|
|
411
|
+
selectOptions?: ISelectField["selectOptions"];
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
index: number;
|
|
415
|
+
rowId: string;
|
|
416
|
+
}
|
|
417
|
+
export interface IRowHookOutput {
|
|
418
|
+
row: IRow;
|
|
419
|
+
}
|
|
420
|
+
export interface IRow {
|
|
421
|
+
[key: string]: {
|
|
422
|
+
value?: any;
|
|
423
|
+
info?: ITableMessage[];
|
|
424
|
+
selectOptions?: ISelectField["selectOptions"];
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
export interface IRowToAdd {
|
|
428
|
+
index?: number;
|
|
429
|
+
row: IRow;
|
|
430
|
+
}
|
|
431
|
+
export interface IRowHookOutputInternal extends IRowHookOutput {
|
|
432
|
+
index: number;
|
|
433
|
+
}
|
|
434
|
+
export type IFieldMetadata = Record<string, {
|
|
435
|
+
fileHeader: string | null;
|
|
436
|
+
fileHeaderIndex: number | null;
|
|
437
|
+
isCustom: boolean;
|
|
438
|
+
}>;
|
|
439
|
+
export type IError = {
|
|
440
|
+
fieldKey: string;
|
|
441
|
+
rowIndex: number;
|
|
442
|
+
message: string;
|
|
443
|
+
};
|
|
444
|
+
export interface IResultMetadata {
|
|
445
|
+
id: string | null;
|
|
446
|
+
filename: string | null;
|
|
447
|
+
importIdentifier: string;
|
|
448
|
+
user: IUser;
|
|
449
|
+
rowsWithError: number[];
|
|
450
|
+
rawHeaders: string[] | null;
|
|
451
|
+
fields: IFieldMetadata;
|
|
452
|
+
saveForLater?: boolean;
|
|
453
|
+
errors: IError[];
|
|
454
|
+
}
|
|
455
|
+
export declare enum EStepHook {
|
|
456
|
+
UPLOAD_STEP = "UPLOAD_STEP",
|
|
457
|
+
REVIEW_STEP = "REVIEW_STEP",
|
|
458
|
+
REVIEW_STEP_POST_HOOKS = "REVIEW_STEP_POST_HOOKS"
|
|
459
|
+
}
|
|
460
|
+
export interface IUploadStepData {
|
|
461
|
+
filename: string | null;
|
|
462
|
+
dataPreview: any[][];
|
|
463
|
+
}
|
|
464
|
+
export interface IReviewStepData {
|
|
465
|
+
rawHeaders: string[] | null;
|
|
466
|
+
headerMapping: {
|
|
467
|
+
[header: string]: string | undefined;
|
|
468
|
+
};
|
|
469
|
+
fields: IFieldMetadata;
|
|
470
|
+
}
|
|
471
|
+
export interface IReviewStepPostHooksData {
|
|
472
|
+
headerMapping: {
|
|
473
|
+
[header: string]: string | undefined;
|
|
474
|
+
};
|
|
475
|
+
fields: IFieldMetadata;
|
|
476
|
+
}
|
|
477
|
+
export interface IStepHook {
|
|
478
|
+
type: keyof typeof EStepHook;
|
|
479
|
+
callback: (uploader: IPublicConnectionMethods, data: IUploadStepData | IReviewStepData | IReviewStepPostHooksData) => MaybeAsync<void>;
|
|
480
|
+
}
|
|
481
|
+
export type IBeforeFinishCallback = (data: Record<string, any>[], metadata: IResultMetadata, instance: IPublicConnectionMethods) => MaybeAsync<IBeforeFinishOutput>;
|
|
482
|
+
export type IBeforeFinishOutput = void | {
|
|
483
|
+
cancel: true;
|
|
484
|
+
message: string;
|
|
485
|
+
};
|
|
486
|
+
export interface IAllHooks {
|
|
487
|
+
rowHooks?: IRowHook[];
|
|
488
|
+
bulkRowHooks?: IBulkRowHook[];
|
|
489
|
+
columnHooks?: IColumnHook[];
|
|
490
|
+
stepHooks?: IStepHook[];
|
|
491
|
+
rowDeleteHooks?: IRowDeleteHook[];
|
|
492
|
+
beforeFinishCallback?: IBeforeFinishCallback;
|
|
493
|
+
}
|
|
494
|
+
export declare enum EInvalidDataBehavior {
|
|
495
|
+
BLOCK_SUBMIT = "BLOCK_SUBMIT",
|
|
496
|
+
REMOVE_INVALID_ROWS = "REMOVE_INVALID_ROWS",
|
|
497
|
+
INCLUDE_INVALID_ROWS = "INCLUDE_INVALID_ROWS"
|
|
498
|
+
}
|
|
499
|
+
export declare enum EBackendSyncMode {
|
|
500
|
+
DISABLED = "DISABLED",
|
|
501
|
+
MAPPINGS_ONLY = "MAPPINGS_ONLY",
|
|
502
|
+
FULL_DATA = "FULL_DATA"
|
|
503
|
+
}
|
|
504
|
+
export type IPositionSpec = {
|
|
505
|
+
before: string;
|
|
506
|
+
} | {
|
|
507
|
+
after: string;
|
|
508
|
+
};
|
|
509
|
+
export type IImporterOptions = {
|
|
510
|
+
user?: IUser;
|
|
511
|
+
developmentMode?: boolean;
|
|
512
|
+
headerRowOverride?: number | null;
|
|
513
|
+
};
|
|
514
|
+
export {};
|