@digo-org/digo-api 1.0.31 → 1.0.33
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/package.json +1 -1
- package/src/constants.ts +0 -2
- package/src/index.ts +5 -5
- package/src/types-common.ts +13 -7
- package/src/types-data.ts +8 -8
package/package.json
CHANGED
package/src/constants.ts
CHANGED
package/src/index.ts
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
export * from '@digo-org/digo-api/src/constants';
|
2
2
|
|
3
|
+
export * from '@digo-org/digo-api/src/digo-asset';
|
4
|
+
|
3
5
|
export * from '@digo-org/digo-api/src/types-common';
|
4
6
|
|
5
|
-
export * from '@digo-org/digo-api/src/types-
|
7
|
+
export * from '@digo-org/digo-api/src/types-data';
|
6
8
|
|
7
|
-
export * from '@digo-org/digo-api/src/types-
|
9
|
+
export * from '@digo-org/digo-api/src/types-misc';
|
8
10
|
|
9
11
|
export * from '@digo-org/digo-api/src/types-viz-files';
|
10
12
|
|
11
|
-
export * from '@digo-org/digo-api/src/types-
|
12
|
-
|
13
|
-
export * from '@digo-org/digo-api/src/digo-asset';
|
13
|
+
export * from '@digo-org/digo-api/src/types-viz';
|
package/src/types-common.ts
CHANGED
@@ -10,13 +10,14 @@ export const PARAMETER_TYPES: ParameterType[] = Object.values(ParameterType);
|
|
10
10
|
|
11
11
|
export interface Parameter {
|
12
12
|
type: ParameterType;
|
13
|
+
definition: ParameterDefinition;
|
13
14
|
isArray?: boolean;
|
14
15
|
arrayValues?: ParameterValueArray;
|
15
16
|
}
|
16
17
|
|
17
18
|
export type ParameterDefinition = ParameterNumber | ParameterBoolean | ParameterColor | ParameterText | ParameterGradient;
|
18
19
|
|
19
|
-
export interface ParameterNumber
|
20
|
+
export interface ParameterNumber {
|
20
21
|
defaultValue: number;
|
21
22
|
min?: number;
|
22
23
|
max?: number;
|
@@ -26,25 +27,24 @@ export interface ParameterNumber extends Parameter {
|
|
26
27
|
units?: string;
|
27
28
|
};
|
28
29
|
|
29
|
-
export interface ParameterGradient
|
30
|
+
export interface ParameterGradient {
|
30
31
|
defaultValue: GradientStop[];
|
31
32
|
};
|
32
33
|
|
33
|
-
export interface ParameterText
|
34
|
+
export interface ParameterText {
|
34
35
|
defaultValue: string;
|
35
36
|
placeholder?: string;
|
37
|
+
autofocus?: boolean;
|
36
38
|
};
|
37
39
|
|
38
|
-
export interface ParameterColor
|
40
|
+
export interface ParameterColor {
|
39
41
|
defaultValue: string;
|
40
42
|
};
|
41
43
|
|
42
|
-
export interface ParameterBoolean
|
44
|
+
export interface ParameterBoolean {
|
43
45
|
defaultValue: boolean;
|
44
46
|
};
|
45
47
|
|
46
|
-
// VALUE
|
47
|
-
|
48
48
|
export type ParameterValue = ParameterValueSingle | ParameterValueArray;
|
49
49
|
|
50
50
|
export type ParameterValueSingle = number | boolean | string | GradientStop[];
|
@@ -55,3 +55,9 @@ export interface GradientStop {
|
|
55
55
|
color: string; // hex
|
56
56
|
percent: number;
|
57
57
|
}
|
58
|
+
|
59
|
+
export interface Option {
|
60
|
+
id: string;
|
61
|
+
value: string;
|
62
|
+
icon?: string;
|
63
|
+
}
|
package/src/types-data.ts
CHANGED
@@ -2,18 +2,18 @@ import { Parameter, ParameterValue } from '@digo-org/digo-api';
|
|
2
2
|
|
3
3
|
export interface DataAssetDefinition {
|
4
4
|
timeArray: string[];
|
5
|
-
|
6
|
-
|
5
|
+
columns: Column[];
|
6
|
+
rows: Row[];
|
7
7
|
}
|
8
8
|
|
9
|
-
export interface
|
10
|
-
id:
|
11
|
-
name:
|
12
|
-
hidden:
|
13
|
-
[
|
9
|
+
export interface Row {
|
10
|
+
id: string;
|
11
|
+
name: string;
|
12
|
+
hidden: boolean;
|
13
|
+
[columnId: string]: ParameterValue;
|
14
14
|
}
|
15
15
|
|
16
|
-
export interface
|
16
|
+
export interface Column extends Parameter {
|
17
17
|
id: string;
|
18
18
|
name: string;
|
19
19
|
}
|