generic-ui-core 1.5.1-rc3 → 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.
Files changed (3) hide show
  1. package/dist/index.d.ts +44 -11
  2. package/dist/main.js +10174 -307
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -52,29 +52,58 @@ declare module 'generic-ui-core' {
52
52
 
53
53
  export interface Element {
54
54
  properties_template: {
55
- layers: Record<string, {
56
- fields: Array<{
57
- type: string;
58
- value?: any;
59
- sub_fields?: Array<{
55
+ layers: Record<
56
+ string,
57
+ {
58
+ fields: Array<{
60
59
  type: string;
61
- value: string;
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(ontology: { iri: string; ontology_prefix: string; type: string } | null): string | null;
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> }): { 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[];
@@ -85,7 +114,11 @@ declare module 'generic-ui-core' {
85
114
  export function genUnit(type: string, unit: string): Record<string, string>;
86
115
  export function genUnits(type: string): Array<Record<string, string>>;
87
116
  export function unitConvertToBase(value: number, fromUnit: string): number;
88
- export function unitConversion(value: number, fromUnit: string, toUnit: string): number;
117
+ export function unitConversion(
118
+ value: number,
119
+ fromUnit: string,
120
+ toUnit: string
121
+ ): number;
89
122
  export function reUnit(value: string): string;
90
123
 
91
124
  // Workflow functions