generic-ui-core 1.5.1-rc3 → 1.5.1-rc5
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/index.d.ts +50 -11
- package/dist/main.js +10174 -307
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -52,40 +52,79 @@ declare module 'generic-ui-core' {
|
|
|
52
52
|
|
|
53
53
|
export interface Element {
|
|
54
54
|
properties_template: {
|
|
55
|
-
layers: Record<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
sub_fields?: Array<{
|
|
55
|
+
layers: Record<
|
|
56
|
+
string,
|
|
57
|
+
{
|
|
58
|
+
fields: Array<{
|
|
60
59
|
type: string;
|
|
61
|
-
value
|
|
60
|
+
value?: any;
|
|
61
|
+
sub_fields?: Array<{
|
|
62
|
+
type: string;
|
|
63
|
+
value: string;
|
|
64
|
+
}>;
|
|
62
65
|
}>;
|
|
63
|
-
}
|
|
64
|
-
|
|
66
|
+
}
|
|
67
|
+
>;
|
|
65
68
|
};
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
// Common functions
|
|
69
72
|
export function downloadFile(file: { contents: string; name: string }): void;
|
|
70
73
|
export function swapAryEls<T>(ary: T[], idx1: number, idx2: number): T[];
|
|
71
|
-
export function buildTS(
|
|
74
|
+
export function buildTS(
|
|
75
|
+
ontology: { iri: string; ontology_prefix: string; type: string } | null
|
|
76
|
+
): string | null;
|
|
72
77
|
export function buildTSS(q: string | null): string | null;
|
|
73
78
|
|
|
79
|
+
// Condition Operator types
|
|
80
|
+
export interface CondOperatorOption {
|
|
81
|
+
label: 'Match One' | 'Match All' | 'Match None';
|
|
82
|
+
value: 0 | 1 | 9;
|
|
83
|
+
}
|
|
84
|
+
export const defaultCondOperator: 1;
|
|
85
|
+
export const condOperatorOptions: CondOperatorOption[];
|
|
86
|
+
export const getCondOperator: Record<0 | 1 | 9, string>;
|
|
87
|
+
|
|
88
|
+
// Order utility functions
|
|
89
|
+
export function moveLayer(
|
|
90
|
+
layers: Record<string, { position: number; [key: string]: any }>,
|
|
91
|
+
sourceKey: string,
|
|
92
|
+
targetKey: string
|
|
93
|
+
): Record<string, { position: number; [key: string]: any }>;
|
|
94
|
+
|
|
95
|
+
export function moveField(
|
|
96
|
+
fields: Array<{ field: string; position: number; [key: string]: any }>,
|
|
97
|
+
sourceKey: string,
|
|
98
|
+
targetKey: string
|
|
99
|
+
): Array<{ field: string; position: number; [key: string]: any }>;
|
|
100
|
+
|
|
74
101
|
// Template functions
|
|
75
102
|
export function clsInputGroup(el: Element): Element;
|
|
76
103
|
export function replaceData(data: string, spec?: string): string;
|
|
77
|
-
export function resetProperties(props: { layers: Record<string, any> }): {
|
|
104
|
+
export function resetProperties(props: { layers: Record<string, any> }): {
|
|
105
|
+
layers: Record<string, any>;
|
|
106
|
+
};
|
|
78
107
|
export function absOlsTermId(val: string): string;
|
|
79
108
|
export function absOlsTermLabel(val: string): string;
|
|
80
109
|
export function showProperties(dataObj: any, layers: any): any[];
|
|
81
110
|
export function orgLayerObject(layers?: any[]): Record<string, any>;
|
|
111
|
+
export function isLayerVisible(
|
|
112
|
+
layer: {
|
|
113
|
+
cond_fields?: Array<any>;
|
|
114
|
+
},
|
|
115
|
+
layers: Record<string, any>
|
|
116
|
+
): boolean;
|
|
82
117
|
|
|
83
118
|
// Unit functions
|
|
84
119
|
export function getUnitSystem(externalUnits?: Record<string, any>): any[];
|
|
85
120
|
export function genUnit(type: string, unit: string): Record<string, string>;
|
|
86
121
|
export function genUnits(type: string): Array<Record<string, string>>;
|
|
87
122
|
export function unitConvertToBase(value: number, fromUnit: string): number;
|
|
88
|
-
export function unitConversion(
|
|
123
|
+
export function unitConversion(
|
|
124
|
+
value: number,
|
|
125
|
+
fromUnit: string,
|
|
126
|
+
toUnit: string
|
|
127
|
+
): number;
|
|
89
128
|
export function reUnit(value: string): string;
|
|
90
129
|
|
|
91
130
|
// Workflow functions
|