dromo-uploader-js 1.3.16 → 2.0.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.
- package/README.md +2 -2
- package/dist/DromoUploader.js +1 -1
- package/dist/DromoUploader.js.map +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +287 -163
- package/package.json +2 -1
package/dist/interfaces.d.ts
CHANGED
|
@@ -1,166 +1,206 @@
|
|
|
1
|
-
declare type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export declare type
|
|
18
|
-
|
|
1
|
+
export declare type IRequiredValidator = {
|
|
2
|
+
errorMessage?: string | undefined;
|
|
3
|
+
level?: ("info" | "warning" | "error") | undefined;
|
|
4
|
+
validate: "required";
|
|
5
|
+
};
|
|
6
|
+
export declare type IUniqueValidator = {
|
|
7
|
+
errorMessage?: string | undefined;
|
|
8
|
+
level?: ("info" | "warning" | "error") | undefined;
|
|
9
|
+
validate: "unique" | "unique_case_insensitive";
|
|
10
|
+
};
|
|
11
|
+
export declare type IUniqueWithValidator = {
|
|
12
|
+
errorMessage?: string | undefined;
|
|
13
|
+
level?: ("info" | "warning" | "error") | undefined;
|
|
14
|
+
validate: "unique_with";
|
|
15
|
+
uniqueKey: string;
|
|
16
|
+
};
|
|
17
|
+
export declare 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 declare 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 declare 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 declare type IValidatorField = IRequiredValidator | IUniqueValidator | IUniqueWithValidator | IRegexValidator | IRequireWithValidator | IRequireWithValuesValidator;
|
|
44
|
+
export declare type IStringField = {
|
|
19
45
|
label: string;
|
|
20
46
|
key: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
alternateMatches?: string[];
|
|
47
|
+
description?: string | undefined;
|
|
48
|
+
alternateMatches?: string[] | undefined;
|
|
24
49
|
validators?: IValidatorField[];
|
|
25
|
-
invalidValueMessage?: string;
|
|
50
|
+
invalidValueMessage?: string | undefined;
|
|
26
51
|
readOnly?: boolean;
|
|
27
52
|
hidden?: boolean;
|
|
28
|
-
requireMapping?: boolean;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
declare type
|
|
34
|
-
|
|
35
|
-
|
|
53
|
+
requireMapping?: boolean | undefined;
|
|
54
|
+
type?: ("string" | ["string", {
|
|
55
|
+
[x: string]: never;
|
|
56
|
+
}]) | undefined;
|
|
57
|
+
};
|
|
58
|
+
export declare type ICheckboxField = {
|
|
59
|
+
label: string;
|
|
60
|
+
key: string;
|
|
61
|
+
description?: string | undefined;
|
|
62
|
+
alternateMatches?: string[] | undefined;
|
|
63
|
+
validators?: IValidatorField[];
|
|
64
|
+
invalidValueMessage?: string | undefined;
|
|
65
|
+
readOnly?: boolean;
|
|
66
|
+
hidden?: boolean;
|
|
67
|
+
requireMapping?: boolean | undefined;
|
|
68
|
+
type: "checkbox" | ["checkbox", {
|
|
69
|
+
[x: string]: never;
|
|
70
|
+
}];
|
|
71
|
+
};
|
|
72
|
+
export declare type IEmailField = {
|
|
73
|
+
label: string;
|
|
74
|
+
key: string;
|
|
75
|
+
description?: string | undefined;
|
|
76
|
+
alternateMatches?: string[] | undefined;
|
|
77
|
+
validators?: IValidatorField[];
|
|
78
|
+
invalidValueMessage?: string | undefined;
|
|
79
|
+
readOnly?: boolean;
|
|
80
|
+
hidden?: boolean;
|
|
81
|
+
requireMapping?: boolean | undefined;
|
|
82
|
+
type: "email" | ["email", {
|
|
83
|
+
[x: string]: never;
|
|
84
|
+
}];
|
|
85
|
+
};
|
|
86
|
+
export declare type IDeveloperSelectOption = {
|
|
36
87
|
label: string;
|
|
37
88
|
value: string;
|
|
38
|
-
alternateMatches?: string[];
|
|
39
|
-
}
|
|
40
|
-
export
|
|
89
|
+
alternateMatches?: string[] | undefined;
|
|
90
|
+
};
|
|
91
|
+
export declare type ISelectField = {
|
|
92
|
+
label: string;
|
|
93
|
+
key: string;
|
|
94
|
+
description?: string | undefined;
|
|
95
|
+
alternateMatches?: string[] | undefined;
|
|
96
|
+
validators?: IValidatorField[];
|
|
97
|
+
invalidValueMessage?: string | undefined;
|
|
98
|
+
readOnly?: boolean;
|
|
99
|
+
hidden?: boolean;
|
|
100
|
+
requireMapping?: boolean | undefined;
|
|
101
|
+
type: "select" | ["select", {
|
|
102
|
+
[x: string]: never;
|
|
103
|
+
}];
|
|
41
104
|
selectOptions: IDeveloperSelectOption[];
|
|
42
|
-
}
|
|
43
|
-
declare type
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
matchingStep?: {
|
|
142
|
-
helpText?: string;
|
|
143
|
-
headerRowOverride?: number | null;
|
|
144
|
-
fuzzyMatchHeaders?: boolean;
|
|
145
|
-
alwaysMatchSelectFields?: boolean;
|
|
146
|
-
};
|
|
147
|
-
reviewStep?: {
|
|
148
|
-
helpText?: string;
|
|
149
|
-
processingText?: string;
|
|
150
|
-
saveForLater?: boolean;
|
|
151
|
-
};
|
|
152
|
-
autoMapHeaders?: boolean;
|
|
153
|
-
delimiter?: string;
|
|
154
|
-
backendOverride?: {
|
|
155
|
-
url: string;
|
|
156
|
-
type: "AWS" | "AZURE";
|
|
157
|
-
} | null;
|
|
158
|
-
locale?: TLocaleShorthand;
|
|
159
|
-
templateDownloadFilename?: string;
|
|
160
|
-
browserExcelParsing?: boolean;
|
|
161
|
-
version?: string;
|
|
162
|
-
}
|
|
163
|
-
export interface IDeveloperStyleOverrides {
|
|
105
|
+
};
|
|
106
|
+
export declare type INumberField = {
|
|
107
|
+
label: string;
|
|
108
|
+
key: string;
|
|
109
|
+
description?: string | undefined;
|
|
110
|
+
alternateMatches?: string[] | undefined;
|
|
111
|
+
validators?: IValidatorField[];
|
|
112
|
+
invalidValueMessage?: string | undefined;
|
|
113
|
+
readOnly?: boolean;
|
|
114
|
+
hidden?: boolean;
|
|
115
|
+
requireMapping?: boolean | undefined;
|
|
116
|
+
type: "number" | ["number", (("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") | {
|
|
117
|
+
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;
|
|
118
|
+
round?: number | undefined;
|
|
119
|
+
displayFormat?: {
|
|
120
|
+
output?: ("currency" | "percent" | "byte" | "time" | "ordinal" | "number") | undefined;
|
|
121
|
+
base?: ("decimal" | "binary" | "general") | undefined;
|
|
122
|
+
characteristic?: number | undefined;
|
|
123
|
+
prefix?: string | undefined;
|
|
124
|
+
postfix?: string | undefined;
|
|
125
|
+
forceAverage?: ("trillion" | "billion" | "million" | "thousand") | undefined;
|
|
126
|
+
average?: boolean | undefined;
|
|
127
|
+
currencyPosition?: ("prefix" | "infix" | "postfix") | undefined;
|
|
128
|
+
currencySymbol?: string | undefined;
|
|
129
|
+
totalLength?: number | undefined;
|
|
130
|
+
mantissa?: number | undefined;
|
|
131
|
+
optionalMantissa?: boolean | undefined;
|
|
132
|
+
trimMantissa?: boolean | undefined;
|
|
133
|
+
optionalCharacteristic?: boolean | undefined;
|
|
134
|
+
thousandSeparated?: boolean | undefined;
|
|
135
|
+
abbreviations?: {
|
|
136
|
+
thousand?: string | undefined;
|
|
137
|
+
million?: string | undefined;
|
|
138
|
+
billion?: string | undefined;
|
|
139
|
+
trillion?: string | undefined;
|
|
140
|
+
} | undefined;
|
|
141
|
+
negative?: ("sign" | "parenthesis") | undefined;
|
|
142
|
+
forceSign?: boolean | undefined;
|
|
143
|
+
spaceSeparated?: boolean | undefined;
|
|
144
|
+
spaceSeparatedCurrency?: boolean | undefined;
|
|
145
|
+
spaceSeparatedAbbreviation?: boolean | undefined;
|
|
146
|
+
exponential?: boolean | undefined;
|
|
147
|
+
prefixSymbol?: boolean | undefined;
|
|
148
|
+
lowPrecision?: boolean | undefined;
|
|
149
|
+
roundingFunction?: ((args0: number, ...args1: unknown[]) => number) | undefined;
|
|
150
|
+
} | undefined;
|
|
151
|
+
outputFormat?: {
|
|
152
|
+
output?: ("currency" | "percent" | "byte" | "time" | "ordinal" | "number") | undefined;
|
|
153
|
+
base?: ("decimal" | "binary" | "general") | undefined;
|
|
154
|
+
characteristic?: number | undefined;
|
|
155
|
+
prefix?: string | undefined;
|
|
156
|
+
postfix?: string | undefined;
|
|
157
|
+
forceAverage?: ("trillion" | "billion" | "million" | "thousand") | undefined;
|
|
158
|
+
average?: boolean | undefined;
|
|
159
|
+
currencyPosition?: ("prefix" | "infix" | "postfix") | undefined;
|
|
160
|
+
currencySymbol?: string | undefined;
|
|
161
|
+
totalLength?: number | undefined;
|
|
162
|
+
mantissa?: number | undefined;
|
|
163
|
+
optionalMantissa?: boolean | undefined;
|
|
164
|
+
trimMantissa?: boolean | undefined;
|
|
165
|
+
optionalCharacteristic?: boolean | undefined;
|
|
166
|
+
thousandSeparated?: boolean | undefined;
|
|
167
|
+
abbreviations?: {
|
|
168
|
+
thousand?: string | undefined;
|
|
169
|
+
million?: string | undefined;
|
|
170
|
+
billion?: string | undefined;
|
|
171
|
+
trillion?: string | undefined;
|
|
172
|
+
} | undefined;
|
|
173
|
+
negative?: ("sign" | "parenthesis") | undefined;
|
|
174
|
+
forceSign?: boolean | undefined;
|
|
175
|
+
spaceSeparated?: boolean | undefined;
|
|
176
|
+
spaceSeparatedCurrency?: boolean | undefined;
|
|
177
|
+
spaceSeparatedAbbreviation?: boolean | undefined;
|
|
178
|
+
exponential?: boolean | undefined;
|
|
179
|
+
prefixSymbol?: boolean | undefined;
|
|
180
|
+
lowPrecision?: boolean | undefined;
|
|
181
|
+
roundingFunction?: ((args0: number, ...args1: unknown[]) => number) | undefined;
|
|
182
|
+
} | undefined;
|
|
183
|
+
})];
|
|
184
|
+
};
|
|
185
|
+
export declare type IDateTimeField = {
|
|
186
|
+
label: string;
|
|
187
|
+
key: string;
|
|
188
|
+
description?: string | undefined;
|
|
189
|
+
alternateMatches?: string[] | undefined;
|
|
190
|
+
validators?: IValidatorField[];
|
|
191
|
+
invalidValueMessage?: string | undefined;
|
|
192
|
+
readOnly?: boolean;
|
|
193
|
+
hidden?: boolean;
|
|
194
|
+
requireMapping?: boolean | undefined;
|
|
195
|
+
type: ("date" | "time" | "datetime") | ["date" | "time" | "datetime", {
|
|
196
|
+
displayFormat?: string | undefined;
|
|
197
|
+
outputFormat?: string | undefined;
|
|
198
|
+
locale?: string | undefined;
|
|
199
|
+
withSeconds?: boolean | undefined;
|
|
200
|
+
}];
|
|
201
|
+
};
|
|
202
|
+
export declare type IDeveloperField = IStringField | ICheckboxField | IEmailField | ISelectField | INumberField | IDateTimeField;
|
|
203
|
+
export declare type IDeveloperStyleOverrides = {
|
|
164
204
|
global?: {
|
|
165
205
|
textColor?: string;
|
|
166
206
|
primaryTextColor?: string;
|
|
@@ -170,6 +210,12 @@ export interface IDeveloperStyleOverrides {
|
|
|
170
210
|
customFontURL?: string | null;
|
|
171
211
|
customFontFamily?: string | null;
|
|
172
212
|
};
|
|
213
|
+
modal?: {
|
|
214
|
+
backgroundColor?: string;
|
|
215
|
+
borderRadius?: string;
|
|
216
|
+
headerBackgroundColor?: string;
|
|
217
|
+
headerBorderBottom?: string;
|
|
218
|
+
};
|
|
173
219
|
primaryButton?: {
|
|
174
220
|
borderRadius?: string;
|
|
175
221
|
backgroundColor?: string;
|
|
@@ -202,6 +248,7 @@ export interface IDeveloperStyleOverrides {
|
|
|
202
248
|
borderRadius?: number;
|
|
203
249
|
borderColor?: string;
|
|
204
250
|
borderStyle?: string;
|
|
251
|
+
backgroundColor?: string;
|
|
205
252
|
color?: string;
|
|
206
253
|
outline?: string;
|
|
207
254
|
};
|
|
@@ -213,15 +260,80 @@ export interface IDeveloperStyleOverrides {
|
|
|
213
260
|
completeColor?: string;
|
|
214
261
|
incompleteColor?: string;
|
|
215
262
|
currentColor?: string;
|
|
263
|
+
fontSize?: string;
|
|
264
|
+
completeFontWeight?: string;
|
|
265
|
+
incompleteFontWeight?: string;
|
|
266
|
+
currentFontWeight?: string;
|
|
216
267
|
};
|
|
217
|
-
}
|
|
218
|
-
export
|
|
268
|
+
};
|
|
269
|
+
export declare type TLocaleShorthand = "de" | "en" | "es" | "fr" | "id" | "in" | "it" | "ja" | "ko" | "pt" | "th" | "vi" | "zh_CN" | "zh_TW";
|
|
270
|
+
export declare type IDeveloperSettings = {
|
|
271
|
+
importIdentifier: string;
|
|
272
|
+
title?: string | undefined;
|
|
273
|
+
allowInvalidSubmit?: boolean | undefined;
|
|
274
|
+
invalidDataBehavior?: ("BLOCK_SUBMIT" | "INCLUDE_INVALID_ROWS" | "REMOVE_INVALID_ROWS") | undefined;
|
|
275
|
+
backendSync?: boolean | undefined;
|
|
276
|
+
backendSyncMode?: ("DISABLED" | "FULL_DATA" | "MAPPINGS_ONLY") | undefined;
|
|
277
|
+
manualInputDisabled?: boolean;
|
|
278
|
+
manualInputOnly?: boolean;
|
|
279
|
+
allowCustomFields?: boolean;
|
|
280
|
+
maxRecords?: number | null;
|
|
281
|
+
developmentMode?: boolean | undefined;
|
|
282
|
+
displayEncoding?: boolean;
|
|
283
|
+
styleOverrides?: IDeveloperStyleOverrides;
|
|
284
|
+
webhookUrl?: string | null;
|
|
285
|
+
initialData?: ({
|
|
286
|
+
[x: string]: any;
|
|
287
|
+
}[] | any[][]) | null;
|
|
288
|
+
uploadStep?: {
|
|
289
|
+
helpText?: string | null;
|
|
290
|
+
};
|
|
291
|
+
matchingStep?: {
|
|
292
|
+
helpText?: string | null;
|
|
293
|
+
headerRowOverride?: number | null;
|
|
294
|
+
fuzzyMatchHeaders?: boolean;
|
|
295
|
+
alwaysMatchSelectFields?: boolean;
|
|
296
|
+
};
|
|
297
|
+
reviewStep?: {
|
|
298
|
+
helpText?: string | null;
|
|
299
|
+
processingText?: string | null;
|
|
300
|
+
saveForLater?: boolean;
|
|
301
|
+
};
|
|
302
|
+
autoMapHeaders?: boolean;
|
|
303
|
+
delimiter?: string | undefined;
|
|
304
|
+
backendOverride?: {
|
|
305
|
+
url: string;
|
|
306
|
+
type: "AWS" | "AZURE";
|
|
307
|
+
};
|
|
308
|
+
locale?: TLocaleShorthand;
|
|
309
|
+
templateDownloadFilename?: string | null;
|
|
310
|
+
browserExcelParsing?: boolean;
|
|
311
|
+
version?: string;
|
|
312
|
+
};
|
|
313
|
+
export declare type IUser = {
|
|
219
314
|
id: string;
|
|
220
|
-
name?: string;
|
|
221
|
-
email?: string;
|
|
222
|
-
companyId?: string;
|
|
223
|
-
companyName?: string;
|
|
315
|
+
name?: string | undefined;
|
|
316
|
+
email?: string | undefined;
|
|
317
|
+
companyId?: string | undefined;
|
|
318
|
+
companyName?: string | undefined;
|
|
319
|
+
};
|
|
320
|
+
declare type MaybeAsync<T> = T | Promise<T>;
|
|
321
|
+
export interface IConnectionMethods {
|
|
322
|
+
init: (licenseKey: string, fields: IDeveloperField[], settings: IDeveloperSettings, user: IUser, appHost?: string) => void;
|
|
323
|
+
initFromSavedSchema: (licenseKey: string, schemaName: string, appHost: string, options?: IImporterOptions) => void;
|
|
324
|
+
setHeaderRowOverride: (headerRowOverride: number | null) => void;
|
|
325
|
+
setNumRegisteredColHooks: (numColHooks: number) => void;
|
|
326
|
+
setNumRegisteredRowHooks: (numRowHooks: number) => void;
|
|
327
|
+
setNumRegisteredRowDeleteHooks: (numRowDeleteHooks: number) => void;
|
|
328
|
+
setUser: (user: IUser) => void;
|
|
329
|
+
addField: (field: IDeveloperField, position?: IPositionSpec) => void;
|
|
330
|
+
removeField: (fieldKey: string) => void;
|
|
331
|
+
updateInfoMessages: (messages: IMessagesForCell[]) => void;
|
|
332
|
+
setDevelopmentMode: (developmentMode: boolean) => void;
|
|
333
|
+
rehydrate: (rehydrateState: any, headlessImportId?: string) => void;
|
|
224
334
|
}
|
|
335
|
+
export declare type IPublicConnectionMethods = Pick<IConnectionMethods, "addField" | "updateInfoMessages" | "setHeaderRowOverride" | "setUser" | "removeField" | "setDevelopmentMode">;
|
|
336
|
+
export declare type IDeveloperFieldType = "string" | "checkbox" | "select" | "number" | "date" | "datetime" | "time" | "email";
|
|
225
337
|
export interface ICellRef {
|
|
226
338
|
rowIndex: number;
|
|
227
339
|
fieldKey: string;
|
|
@@ -281,6 +393,11 @@ export declare type IFieldMetadata = Record<string, {
|
|
|
281
393
|
fileHeaderIndex: number | null;
|
|
282
394
|
isCustom: boolean;
|
|
283
395
|
}>;
|
|
396
|
+
export declare type IError = {
|
|
397
|
+
fieldKey: string;
|
|
398
|
+
rowIndex: number;
|
|
399
|
+
message: string;
|
|
400
|
+
};
|
|
284
401
|
export interface IResultMetadata {
|
|
285
402
|
id: string | null;
|
|
286
403
|
filename: string | null;
|
|
@@ -290,8 +407,8 @@ export interface IResultMetadata {
|
|
|
290
407
|
rawHeaders: string[] | null;
|
|
291
408
|
fields: IFieldMetadata;
|
|
292
409
|
saveForLater?: boolean;
|
|
410
|
+
errors: IError[];
|
|
293
411
|
}
|
|
294
|
-
export declare type TLocaleShorthand = "de" | "en" | "es" | "fr" | "id" | "in" | "it" | "ja" | "ko" | "pt" | "th" | "vi" | "zh_CN" | "zh_TW";
|
|
295
412
|
export declare enum EStepHook {
|
|
296
413
|
UPLOAD_STEP = "UPLOAD_STEP",
|
|
297
414
|
REVIEW_STEP = "REVIEW_STEP",
|
|
@@ -323,6 +440,14 @@ export declare type IBeforeFinishOutput = void | {
|
|
|
323
440
|
cancel: true;
|
|
324
441
|
message: string;
|
|
325
442
|
};
|
|
443
|
+
export interface IAllHooks {
|
|
444
|
+
rowHooks?: IRowHook[];
|
|
445
|
+
bulkRowHooks?: IBulkRowHook[];
|
|
446
|
+
columnHooks?: IColumnHook[];
|
|
447
|
+
stepHooks?: IStepHook[];
|
|
448
|
+
rowDeleteHooks?: IRowDeleteHook[];
|
|
449
|
+
beforeFinishCallback?: IBeforeFinishCallback;
|
|
450
|
+
}
|
|
326
451
|
export declare enum EInvalidDataBehavior {
|
|
327
452
|
BLOCK_SUBMIT = "BLOCK_SUBMIT",
|
|
328
453
|
REMOVE_INVALID_ROWS = "REMOVE_INVALID_ROWS",
|
|
@@ -342,6 +467,5 @@ export declare type IImporterOptions = {
|
|
|
342
467
|
user?: IUser;
|
|
343
468
|
developmentMode?: boolean;
|
|
344
469
|
headerRowOverride?: number | null;
|
|
345
|
-
version?: string;
|
|
346
470
|
};
|
|
347
471
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dromo-uploader-js",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Easy to use data (CSV, TSV, Excel) importer",
|
|
5
5
|
"author": "ankitgoyal100",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"start": "rollup -c -w",
|
|
11
|
+
"start-test-project": "cd sdk-test && npm install && npm run start",
|
|
11
12
|
"build": "rollup -c",
|
|
12
13
|
"serve": "serve -l 5050 dist"
|
|
13
14
|
},
|