generic-ui-core 1.5.1-rc2 → 1.5.1-rc4
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 +132 -0
- package/dist/main.js +11326 -0
- package/package.json +5 -4
- package/dist/bundle.js +0 -1463
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
declare module 'generic-ui-core' {
|
|
2
|
+
export interface FieldTypes {
|
|
3
|
+
DEL_LAYER: 'Layer';
|
|
4
|
+
DEL_FIELD: 'Field';
|
|
5
|
+
DEL_SELECT: 'Select';
|
|
6
|
+
DEL_OPTION: 'Option';
|
|
7
|
+
F_CHECKBOX: 'checkbox';
|
|
8
|
+
F_DATE: 'date';
|
|
9
|
+
F_DATETIME: 'datetime';
|
|
10
|
+
F_DATETIME_RANGE: 'datetime-range';
|
|
11
|
+
F_DRAG: 'drag';
|
|
12
|
+
F_DRAG_ELEMENT: 'drag_element';
|
|
13
|
+
F_DRAG_MOLECULE: 'drag_molecule';
|
|
14
|
+
F_DRAG_SAMPLE: 'drag_sample';
|
|
15
|
+
F_DRAG_REACTION: 'drag_reaction';
|
|
16
|
+
F_DUMMY: 'dummy';
|
|
17
|
+
F_FORMULA_FIELD: 'formula-field';
|
|
18
|
+
F_INPUT_GROUP: 'input-group';
|
|
19
|
+
F_INTEGER: 'integer';
|
|
20
|
+
F_LABEL: 'label';
|
|
21
|
+
F_NUMBER: 'number';
|
|
22
|
+
F_ONTOLOGY_SELECT: 'ontology-select';
|
|
23
|
+
F_SELECT: 'select';
|
|
24
|
+
F_SYS_REACTION: 'sys-reaction';
|
|
25
|
+
F_SYSTEM_DEFINED: 'system-defined';
|
|
26
|
+
F_TABLE: 'table';
|
|
27
|
+
F_TEXT: 'text';
|
|
28
|
+
F_TEXTAREA: 'textarea';
|
|
29
|
+
F_TEXT_FORMULA: 'text-formula';
|
|
30
|
+
F_UPLOAD: 'upload';
|
|
31
|
+
F_WF_NEXT: 'wf-next';
|
|
32
|
+
V_BOOLEAN: 'boolean';
|
|
33
|
+
V_UNDEFINED: 'undefined';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface OptionMaps {
|
|
37
|
+
TBL_OPTS_MOLECULE: Array<{
|
|
38
|
+
label: 'InChiKey' | 'SMILES' | 'IUPAC' | 'Mass';
|
|
39
|
+
value: 'inchikey' | 'smiles' | 'iupac' | 'molecular_weight';
|
|
40
|
+
}>;
|
|
41
|
+
TBL_OPTS_SAMPLE: Array<{
|
|
42
|
+
label: 'Name' | 'Ext. Label' | 'Mass';
|
|
43
|
+
value: 'name' | 'external_label' | 'molecular_weight';
|
|
44
|
+
}>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface WorkflowTypes {
|
|
48
|
+
ND_INPUT: 'input';
|
|
49
|
+
ND_OUTPUT: 'output';
|
|
50
|
+
ND_DEFAULT: 'default';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface Element {
|
|
54
|
+
properties_template: {
|
|
55
|
+
layers: Record<
|
|
56
|
+
string,
|
|
57
|
+
{
|
|
58
|
+
fields: Array<{
|
|
59
|
+
type: string;
|
|
60
|
+
value?: any;
|
|
61
|
+
sub_fields?: Array<{
|
|
62
|
+
type: string;
|
|
63
|
+
value: string;
|
|
64
|
+
}>;
|
|
65
|
+
}>;
|
|
66
|
+
}
|
|
67
|
+
>;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Common functions
|
|
72
|
+
export function downloadFile(file: { contents: string; name: string }): void;
|
|
73
|
+
export function swapAryEls<T>(ary: T[], idx1: number, idx2: number): T[];
|
|
74
|
+
export function buildTS(
|
|
75
|
+
ontology: { iri: string; ontology_prefix: string; type: string } | null
|
|
76
|
+
): string | null;
|
|
77
|
+
export function buildTSS(q: string | null): string | null;
|
|
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
|
+
|
|
101
|
+
// Template functions
|
|
102
|
+
export function clsInputGroup(el: Element): Element;
|
|
103
|
+
export function replaceData(data: string, spec?: string): string;
|
|
104
|
+
export function resetProperties(props: { layers: Record<string, any> }): {
|
|
105
|
+
layers: Record<string, any>;
|
|
106
|
+
};
|
|
107
|
+
export function absOlsTermId(val: string): string;
|
|
108
|
+
export function absOlsTermLabel(val: string): string;
|
|
109
|
+
export function showProperties(dataObj: any, layers: any): any[];
|
|
110
|
+
export function orgLayerObject(layers?: any[]): Record<string, any>;
|
|
111
|
+
|
|
112
|
+
// Unit functions
|
|
113
|
+
export function getUnitSystem(externalUnits?: Record<string, any>): any[];
|
|
114
|
+
export function genUnit(type: string, unit: string): Record<string, string>;
|
|
115
|
+
export function genUnits(type: string): Array<Record<string, string>>;
|
|
116
|
+
export function unitConvertToBase(value: number, fromUnit: string): number;
|
|
117
|
+
export function unitConversion(
|
|
118
|
+
value: number,
|
|
119
|
+
fromUnit: string,
|
|
120
|
+
toUnit: string
|
|
121
|
+
): number;
|
|
122
|
+
export function reUnit(value: string): string;
|
|
123
|
+
|
|
124
|
+
// Workflow functions
|
|
125
|
+
export function isLayerInWF(element: Element, layerKey: string): boolean;
|
|
126
|
+
export function storeFlow(props: { elements: Element[] }): any[];
|
|
127
|
+
|
|
128
|
+
// Constants
|
|
129
|
+
export const FieldTypes: FieldTypes;
|
|
130
|
+
export const OptionMaps: OptionMaps;
|
|
131
|
+
export const WorkflowTypes: WorkflowTypes;
|
|
132
|
+
}
|