dromo-uploader-js 1.3.2 → 1.3.3
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/interfaces.d.ts +62 -5
- package/package.json +1 -1
package/dist/interfaces.d.ts
CHANGED
|
@@ -12,20 +12,77 @@ export interface IConnectionMethods {
|
|
|
12
12
|
}
|
|
13
13
|
export declare type IPublicConnectionMethods = Pick<IConnectionMethods, "addField" | "updateInfoMessages" | "setHeaderRowOverride" | "setUser">;
|
|
14
14
|
export declare type IDeveloperFieldType = "string" | "checkbox" | "select" | "number" | "date" | "datetime" | "time" | "email";
|
|
15
|
-
export interface
|
|
15
|
+
export interface IAbstractDeveloperFieldUntyped {
|
|
16
16
|
label: string;
|
|
17
17
|
key: string;
|
|
18
|
-
type?:
|
|
18
|
+
type?: never;
|
|
19
19
|
description?: string;
|
|
20
20
|
alternateMatches?: string[];
|
|
21
21
|
validators?: IValidatorField[];
|
|
22
|
-
|
|
22
|
+
invalidValueMessage?: string;
|
|
23
|
+
readOnly?: boolean;
|
|
24
|
+
hidden?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface IAbstractDeveloperField<FieldType extends IDeveloperFieldType, FieldOpts = Record<string, never>> extends Omit<IAbstractDeveloperFieldUntyped, "type"> {
|
|
27
|
+
type: FieldType | [FieldType, FieldOpts];
|
|
28
|
+
}
|
|
29
|
+
declare type IStringField = IAbstractDeveloperFieldUntyped | IAbstractDeveloperField<"string">;
|
|
30
|
+
declare type ICheckboxField = IAbstractDeveloperField<"checkbox">;
|
|
31
|
+
export interface ISelectField extends IAbstractDeveloperField<"select"> {
|
|
32
|
+
selectOptions: {
|
|
23
33
|
label: string;
|
|
24
34
|
value: string;
|
|
25
35
|
}[];
|
|
26
|
-
invalidValueMessage?: string;
|
|
27
|
-
readOnly?: boolean;
|
|
28
36
|
}
|
|
37
|
+
declare type INumberPreset = "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";
|
|
38
|
+
interface INumbroFormat {
|
|
39
|
+
output?: "currency" | "percent" | "byte" | "time" | "ordinal" | "number";
|
|
40
|
+
base?: "decimal" | "binary" | "general";
|
|
41
|
+
characteristic?: number;
|
|
42
|
+
prefix?: string;
|
|
43
|
+
postfix?: string;
|
|
44
|
+
forceAverage?: "trillion" | "billion" | "million" | "thousand";
|
|
45
|
+
average?: boolean;
|
|
46
|
+
currencyPosition?: "prefix" | "infix" | "postfix";
|
|
47
|
+
currencySymbol?: string;
|
|
48
|
+
totalLength?: number;
|
|
49
|
+
mantissa?: number;
|
|
50
|
+
optionalMantissa?: boolean;
|
|
51
|
+
trimMantissa?: boolean;
|
|
52
|
+
optionalCharacteristic?: boolean;
|
|
53
|
+
thousandSeparated?: boolean;
|
|
54
|
+
abbreviations?: {
|
|
55
|
+
thousand?: string;
|
|
56
|
+
million?: string;
|
|
57
|
+
billion?: string;
|
|
58
|
+
trillion?: string;
|
|
59
|
+
};
|
|
60
|
+
negative?: "sign" | "parenthesis";
|
|
61
|
+
forceSign?: boolean;
|
|
62
|
+
spaceSeparated?: boolean;
|
|
63
|
+
spaceSeparatedCurrency?: boolean;
|
|
64
|
+
spaceSeparatedAbbreviation?: boolean;
|
|
65
|
+
exponential?: boolean;
|
|
66
|
+
prefixSymbol?: boolean;
|
|
67
|
+
lowPrecision?: boolean;
|
|
68
|
+
roundingFunction?: (num: number) => number;
|
|
69
|
+
}
|
|
70
|
+
interface INumberOpts {
|
|
71
|
+
preset?: INumberPreset;
|
|
72
|
+
round?: number;
|
|
73
|
+
displayFormat?: INumbroFormat;
|
|
74
|
+
outputFormat?: INumbroFormat;
|
|
75
|
+
}
|
|
76
|
+
declare type INumberField = IAbstractDeveloperField<"number", INumberPreset | INumberOpts>;
|
|
77
|
+
interface IDateTimeOpts {
|
|
78
|
+
displayFormat?: string;
|
|
79
|
+
outputFormat?: string;
|
|
80
|
+
locale?: string;
|
|
81
|
+
withSeconds?: boolean;
|
|
82
|
+
}
|
|
83
|
+
declare type IDateTimeField = IAbstractDeveloperField<"date" | "time" | "datetime", IDateTimeOpts>;
|
|
84
|
+
declare type IEmailField = IAbstractDeveloperField<"email">;
|
|
85
|
+
export declare type IDeveloperField = IStringField | ICheckboxField | ISelectField | INumberField | IDateTimeField | IEmailField;
|
|
29
86
|
interface IAbstractValidator<ValidateKey> {
|
|
30
87
|
validate: ValidateKey;
|
|
31
88
|
errorMessage?: string;
|