dromo-uploader-js 2.0.17 → 2.0.19

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.
@@ -47,7 +47,12 @@ export type ILengthValidator = {
47
47
  min?: number | undefined;
48
48
  max?: number | undefined;
49
49
  };
50
- export type IValidatorField = IRequiredValidator | IUniqueValidator | IUniqueWithValidator | IRegexValidator | IRequireWithValidator | IRequireWithValuesValidator | ILengthValidator;
50
+ export type IAlphabeticalValidator = {
51
+ errorMessage?: string | undefined;
52
+ level?: ("info" | "warning" | "error") | undefined;
53
+ validate: "alphabetical";
54
+ };
55
+ export type IValidatorField = IRequiredValidator | IUniqueValidator | IUniqueWithValidator | IRegexValidator | IRequireWithValidator | IRequireWithValuesValidator | ILengthValidator | IAlphabeticalValidator;
51
56
  export type IStringField = {
52
57
  label: string;
53
58
  key: string;
@@ -122,6 +127,7 @@ export type ISelectField = {
122
127
  "select",
123
128
  {
124
129
  allowCustom?: boolean | undefined;
130
+ exactMatchOnly?: boolean | undefined;
125
131
  }
126
132
  ];
127
133
  selectOptions: IDeveloperSelectOption[];
@@ -232,7 +238,154 @@ export type IDateTimeField = {
232
238
  }
233
239
  ];
234
240
  };
235
- export type IDeveloperField = IStringField | ICheckboxField | IEmailField | ISelectField | INumberField | IDateTimeField;
241
+ export type IPhoneNumberField = {
242
+ label: string;
243
+ key: string;
244
+ description?: string | undefined;
245
+ alternateMatches?: string[] | undefined;
246
+ validators?: IValidatorField[];
247
+ invalidValueMessage?: string | undefined;
248
+ readOnly?: boolean;
249
+ hidden?: boolean;
250
+ requireMapping?: boolean | undefined;
251
+ manyToOne?: boolean | undefined;
252
+ type: "phone-number" | [
253
+ "phone-number",
254
+ {
255
+ country?: string | undefined;
256
+ format?: ("international" | "national") | undefined;
257
+ outputFormatted?: boolean | undefined;
258
+ }
259
+ ];
260
+ };
261
+ export type IUrlField = {
262
+ label: string;
263
+ key: string;
264
+ description?: string | undefined;
265
+ alternateMatches?: string[] | undefined;
266
+ validators?: IValidatorField[];
267
+ invalidValueMessage?: string | undefined;
268
+ readOnly?: boolean;
269
+ hidden?: boolean;
270
+ requireMapping?: boolean | undefined;
271
+ manyToOne?: boolean | undefined;
272
+ type: "url" | [
273
+ "url",
274
+ {
275
+ acceptedProtocols?: string[] | undefined;
276
+ acceptedDomains?: string[] | undefined;
277
+ }
278
+ ];
279
+ };
280
+ export type IUSZipCodeField = {
281
+ label: string;
282
+ key: string;
283
+ description?: string | undefined;
284
+ alternateMatches?: string[] | undefined;
285
+ validators?: IValidatorField[];
286
+ invalidValueMessage?: string | undefined;
287
+ readOnly?: boolean;
288
+ hidden?: boolean;
289
+ requireMapping?: boolean | undefined;
290
+ manyToOne?: boolean | undefined;
291
+ type: "us-zip-code" | [
292
+ "us-zip-code",
293
+ {
294
+ format?: ("5-digit" | "9-digit") | undefined;
295
+ outputDash?: boolean | undefined;
296
+ }
297
+ ];
298
+ };
299
+ export type ISSNField = {
300
+ label: string;
301
+ key: string;
302
+ description?: string | undefined;
303
+ alternateMatches?: string[] | undefined;
304
+ validators?: IValidatorField[];
305
+ invalidValueMessage?: string | undefined;
306
+ readOnly?: boolean;
307
+ hidden?: boolean;
308
+ requireMapping?: boolean | undefined;
309
+ manyToOne?: boolean | undefined;
310
+ type: "ssn" | [
311
+ "ssn",
312
+ {
313
+ outputDash?: boolean | undefined;
314
+ }
315
+ ];
316
+ };
317
+ export type ICountryField = {
318
+ label: string;
319
+ key: string;
320
+ description?: string | undefined;
321
+ alternateMatches?: string[] | undefined;
322
+ validators?: IValidatorField[];
323
+ invalidValueMessage?: string | undefined;
324
+ readOnly?: boolean;
325
+ hidden?: boolean;
326
+ requireMapping?: boolean | undefined;
327
+ manyToOne?: boolean | undefined;
328
+ type: "country" | [
329
+ "country",
330
+ {
331
+ format?: ("2-letter" | "3-letter") | undefined;
332
+ }
333
+ ];
334
+ };
335
+ export type IDomainField = {
336
+ label: string;
337
+ key: string;
338
+ description?: string | undefined;
339
+ alternateMatches?: string[] | undefined;
340
+ validators?: IValidatorField[];
341
+ invalidValueMessage?: string | undefined;
342
+ readOnly?: boolean;
343
+ hidden?: boolean;
344
+ requireMapping?: boolean | undefined;
345
+ manyToOne?: boolean | undefined;
346
+ type: "domain" | [
347
+ "domain",
348
+ {
349
+ allowSubdomains?: boolean | undefined;
350
+ }
351
+ ];
352
+ };
353
+ export type IUUIDField = {
354
+ label: string;
355
+ key: string;
356
+ description?: string | undefined;
357
+ alternateMatches?: string[] | undefined;
358
+ validators?: IValidatorField[];
359
+ invalidValueMessage?: string | undefined;
360
+ readOnly?: boolean;
361
+ hidden?: boolean;
362
+ requireMapping?: boolean | undefined;
363
+ manyToOne?: boolean | undefined;
364
+ type: "uuid" | [
365
+ "uuid",
366
+ {
367
+ version?: number | undefined;
368
+ }
369
+ ];
370
+ };
371
+ export type IDeveloperField = IStringField | ICheckboxField | IEmailField | ISelectField | INumberField | IDateTimeField | IDomainField | IPhoneNumberField | IUrlField | ISSNField | IUUIDField | IUSZipCodeField | {
372
+ label: string;
373
+ key: string;
374
+ description?: string | undefined;
375
+ alternateMatches?: string[] | undefined;
376
+ validators?: IValidatorField[];
377
+ invalidValueMessage?: string | undefined;
378
+ readOnly?: boolean;
379
+ hidden?: boolean;
380
+ requireMapping?: boolean | undefined;
381
+ manyToOne?: boolean | undefined;
382
+ type: "us-state-territory" | [
383
+ "us-state-territory",
384
+ {
385
+ [x: string]: never;
386
+ }
387
+ ];
388
+ } | ICountryField;
236
389
  export type IDeveloperStyleOverrides = {
237
390
  global?: {
238
391
  textColor?: string;
@@ -326,6 +479,7 @@ export type IDeveloperSettings = {
326
479
  }[] | any[][]) | null;
327
480
  uploadStep?: {
328
481
  helpText?: string | null;
482
+ sheetOverride?: string | null;
329
483
  };
330
484
  matchingStep?: {
331
485
  helpText?: string | null;
@@ -334,6 +488,9 @@ export type IDeveloperSettings = {
334
488
  alwaysMatchSelectFields?: boolean;
335
489
  matchToSchema?: boolean;
336
490
  };
491
+ matchValuesStep?: {
492
+ helpText?: string | null;
493
+ };
337
494
  reviewStep?: {
338
495
  helpText?: string | null;
339
496
  processingText?: string | null;
@@ -386,7 +543,7 @@ export interface IConnectionMethods {
386
543
  removeRows: (rowIds: string[]) => void;
387
544
  }
388
545
  export type IPublicConnectionMethods = Pick<IConnectionMethods, "addField" | "updateInfoMessages" | "setHeaderRowOverride" | "setUser" | "removeField" | "setDevelopmentMode" | "addRows" | "removeRows">;
389
- export type IDeveloperFieldType = "string" | "checkbox" | "select" | "number" | "date" | "datetime" | "time" | "email";
546
+ export type IDeveloperFieldType = "string" | "checkbox" | "select" | "number" | "domain" | "date" | "ssn" | "datetime" | "phone-number" | "time" | "url" | "us-zip-code" | "country" | "uuid" | "us-state-territory" | "email";
390
547
  export interface ICellRef {
391
548
  rowIndex: number;
392
549
  fieldKey: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dromo-uploader-js",
3
- "version": "2.0.17",
3
+ "version": "2.0.19",
4
4
  "description": "Easy to use data (CSV, TSV, Excel) importer",
5
5
  "author": "ankitgoyal100",
6
6
  "license": "MIT",