dromo-uploader-js 2.0.18 → 2.0.20

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;
@@ -314,6 +467,7 @@ export type IDeveloperSettings = {
314
467
  manualInputDisabled?: boolean;
315
468
  manualInputOnly?: boolean;
316
469
  allowCustomFields?: boolean;
470
+ passThroughUnmappedColumns?: boolean;
317
471
  maxRecords?: number | null;
318
472
  developmentMode?: boolean | undefined;
319
473
  displayEncoding?: boolean;
@@ -332,9 +486,12 @@ export type IDeveloperSettings = {
332
486
  helpText?: string | null;
333
487
  headerRowOverride?: number | null;
334
488
  fuzzyMatchHeaders?: boolean;
335
- alwaysMatchSelectFields?: boolean;
336
489
  matchToSchema?: boolean;
337
490
  };
491
+ matchValuesStep?: {
492
+ helpText?: string | null;
493
+ maxMappableSelectValues?: number;
494
+ };
338
495
  reviewStep?: {
339
496
  helpText?: string | null;
340
497
  processingText?: string | null;
@@ -387,7 +544,7 @@ export interface IConnectionMethods {
387
544
  removeRows: (rowIds: string[]) => void;
388
545
  }
389
546
  export type IPublicConnectionMethods = Pick<IConnectionMethods, "addField" | "updateInfoMessages" | "setHeaderRowOverride" | "setUser" | "removeField" | "setDevelopmentMode" | "addRows" | "removeRows">;
390
- export type IDeveloperFieldType = "string" | "checkbox" | "select" | "number" | "date" | "datetime" | "time" | "email";
547
+ export type IDeveloperFieldType = "string" | "checkbox" | "select" | "number" | "domain" | "date" | "ssn" | "datetime" | "phone-number" | "time" | "url" | "us-zip-code" | "country" | "uuid" | "us-state-territory" | "email";
391
548
  export interface ICellRef {
392
549
  rowIndex: number;
393
550
  fieldKey: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dromo-uploader-js",
3
- "version": "2.0.18",
3
+ "version": "2.0.20",
4
4
  "description": "Easy to use data (CSV, TSV, Excel) importer",
5
5
  "author": "ankitgoyal100",
6
6
  "license": "MIT",