dromo-uploader-js 2.0.9 → 2.0.11
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/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +44 -14
- package/package.json +1 -1
package/dist/interfaces.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export type IStringField = {
|
|
|
51
51
|
readOnly?: boolean;
|
|
52
52
|
hidden?: boolean;
|
|
53
53
|
requireMapping?: boolean | undefined;
|
|
54
|
+
manyToOne?: boolean | undefined;
|
|
54
55
|
type?: ("string" | [
|
|
55
56
|
"string",
|
|
56
57
|
{
|
|
@@ -68,6 +69,7 @@ export type ICheckboxField = {
|
|
|
68
69
|
readOnly?: boolean;
|
|
69
70
|
hidden?: boolean;
|
|
70
71
|
requireMapping?: boolean | undefined;
|
|
72
|
+
manyToOne?: boolean | undefined;
|
|
71
73
|
type: "checkbox" | [
|
|
72
74
|
"checkbox",
|
|
73
75
|
{
|
|
@@ -85,6 +87,7 @@ export type IEmailField = {
|
|
|
85
87
|
readOnly?: boolean;
|
|
86
88
|
hidden?: boolean;
|
|
87
89
|
requireMapping?: boolean | undefined;
|
|
90
|
+
manyToOne?: boolean | undefined;
|
|
88
91
|
type: "email" | [
|
|
89
92
|
"email",
|
|
90
93
|
{
|
|
@@ -107,6 +110,7 @@ export type ISelectField = {
|
|
|
107
110
|
readOnly?: boolean;
|
|
108
111
|
hidden?: boolean;
|
|
109
112
|
requireMapping?: boolean | undefined;
|
|
113
|
+
manyToOne?: boolean | undefined;
|
|
110
114
|
type: "select" | [
|
|
111
115
|
"select",
|
|
112
116
|
{
|
|
@@ -125,6 +129,7 @@ export type INumberField = {
|
|
|
125
129
|
readOnly?: boolean;
|
|
126
130
|
hidden?: boolean;
|
|
127
131
|
requireMapping?: boolean | undefined;
|
|
132
|
+
manyToOne?: boolean | undefined;
|
|
128
133
|
type: "number" | [
|
|
129
134
|
"number",
|
|
130
135
|
(("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") | {
|
|
@@ -207,6 +212,7 @@ export type IDateTimeField = {
|
|
|
207
212
|
readOnly?: boolean;
|
|
208
213
|
hidden?: boolean;
|
|
209
214
|
requireMapping?: boolean | undefined;
|
|
215
|
+
manyToOne?: boolean | undefined;
|
|
210
216
|
type: ("date" | "time" | "datetime") | [
|
|
211
217
|
"date" | "time" | "datetime",
|
|
212
218
|
{
|
|
@@ -373,6 +379,7 @@ export type IDeveloperFieldType = "string" | "checkbox" | "select" | "number" |
|
|
|
373
379
|
export interface ICellRef {
|
|
374
380
|
rowIndex: number;
|
|
375
381
|
fieldKey: string;
|
|
382
|
+
manyToOneIndex?: number;
|
|
376
383
|
}
|
|
377
384
|
export interface ITableMessage {
|
|
378
385
|
message: string;
|
|
@@ -402,27 +409,40 @@ export interface IColumnHookOutput {
|
|
|
402
409
|
value?: any;
|
|
403
410
|
info?: ITableMessage[];
|
|
404
411
|
}
|
|
412
|
+
export interface IRowHookCell extends IRowHookCellBasic {
|
|
413
|
+
manyToOne?: IRowHookCellBasic[];
|
|
414
|
+
}
|
|
415
|
+
export interface IRowHookCellBasic {
|
|
416
|
+
value: any;
|
|
417
|
+
resultValue: any;
|
|
418
|
+
info?: ITableMessage[];
|
|
419
|
+
selectOptions?: ISelectField["selectOptions"];
|
|
420
|
+
}
|
|
405
421
|
export interface IRowHookInput {
|
|
406
422
|
row: {
|
|
407
|
-
[key: string]:
|
|
408
|
-
value: any;
|
|
409
|
-
resultValue: any;
|
|
410
|
-
info?: ITableMessage[];
|
|
411
|
-
selectOptions?: ISelectField["selectOptions"];
|
|
412
|
-
};
|
|
423
|
+
[key: string]: IRowHookCell;
|
|
413
424
|
};
|
|
414
425
|
index: number;
|
|
415
426
|
rowId: string;
|
|
416
427
|
}
|
|
417
428
|
export interface IRowHookOutput {
|
|
418
|
-
row:
|
|
429
|
+
row: {
|
|
430
|
+
[key: string]: IRowCellBasic | IRowCellManyToOne;
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
export interface IRowCellBasic {
|
|
434
|
+
value?: any;
|
|
435
|
+
info?: ITableMessage[];
|
|
436
|
+
selectOptions?: ISelectField["selectOptions"];
|
|
437
|
+
}
|
|
438
|
+
export interface IRowCellManyToOne {
|
|
439
|
+
manyToOne: IRowCellBasic[];
|
|
440
|
+
}
|
|
441
|
+
export interface IRowCell extends IRowCellBasic {
|
|
442
|
+
manyToOne?: IRowCellBasic[];
|
|
419
443
|
}
|
|
420
444
|
export interface IRow {
|
|
421
|
-
[key: string]:
|
|
422
|
-
value?: any;
|
|
423
|
-
info?: ITableMessage[];
|
|
424
|
-
selectOptions?: ISelectField["selectOptions"];
|
|
425
|
-
};
|
|
445
|
+
[key: string]: IRowCell;
|
|
426
446
|
}
|
|
427
447
|
export interface IRowToAdd {
|
|
428
448
|
index?: number;
|
|
@@ -431,11 +451,21 @@ export interface IRowToAdd {
|
|
|
431
451
|
export interface IRowHookOutputInternal extends IRowHookOutput {
|
|
432
452
|
index: number;
|
|
433
453
|
}
|
|
434
|
-
export type
|
|
454
|
+
export type IFieldMetadataBasic = {
|
|
435
455
|
fileHeader: string | null;
|
|
436
456
|
fileHeaderIndex: number | null;
|
|
437
457
|
isCustom: boolean;
|
|
438
|
-
|
|
458
|
+
manyToOne: false;
|
|
459
|
+
};
|
|
460
|
+
export type IFieldMetadataManyToOne = {
|
|
461
|
+
fileHeader: null;
|
|
462
|
+
fileHeaders: (string | null)[];
|
|
463
|
+
fileHeaderIndex: null;
|
|
464
|
+
fileHeaderIndexes: (number | null)[];
|
|
465
|
+
isCustom: boolean;
|
|
466
|
+
manyToOne: true;
|
|
467
|
+
};
|
|
468
|
+
export type IFieldMetadata = Record<string, IFieldMetadataBasic | IFieldMetadataManyToOne>;
|
|
439
469
|
export type IError = {
|
|
440
470
|
fieldKey: string;
|
|
441
471
|
rowIndex: number;
|