/
const.ts
694 lines (620 loc) · 19.1 KB
/
const.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
/** @enum {AGG} */
export enum AGG {
KEY = "key", // Special case= to be used in the 'group by' statement.
PIVOT = "pivot", // Special case= to be used as a pivot.
FIRST = "first",
TOTAL_COUNT = "count",
VALUE_COUNT = "values",
UNIQUE_COUNT = "unique",
MISSING_VALUE_COUNT = "nulls",
MIN = "min",
MAX = "max",
SUM = "sum",
MED = "med",
AVG = "avg",
STDEV = "stdev",
VARIANCE = "variance",
SKEW = "skew",
KURT = "kurt",
Q1 = "q1",
Q2 = "q2",
Q3 = "q3",
SELECTED_ROWS_COUNT = "#selected"
}
export enum STR_AGG {
CONCAT_ALL = 'concat all',
CONCAT_UNIQUE = 'concat unique',
LONGEST = 'longest',
SHORTEST = 'shortest',
MOST_FREQUENT = 'most frequent',
CONCAT_COUNTS = 'concat counts',
}
export enum STAT_COUNTS {
TOTAL_COUNT = 'count',
VALUE_COUNT = 'values',
UNIQUE_COUNT = 'unique',
MISSING_VALUE_COUNT = 'nulls',
}
/** @enum {SYNC_TYPE} */
export enum SYNC_TYPE {
CURRENT_ROW_TO_ROW = 'row to row',
CURRENT_ROW_TO_SELECTION = 'row to selection',
CURRENT_ROW_TO_FILTER = 'row to filter',
MOUSE_OVER_ROW_TO_SELECTION = 'mouse-over to selection',
MOUSE_OVER_ROW_TO_FILTER = 'mouse-over to filter',
FILTER_TO_FILTER = 'filter to filter',
FILTER_TO_SELECTION = 'filter to selection',
SELECTION_TO_FILTER = 'selection to filter',
SELECTION_TO_SELECTION = 'selection to selection',
}
export const INT_NULL = -2147483648;
export const FLOAT_NULL = 2.6789344063684636e-34;
/** @enum {JoinType} */
export enum JOIN_TYPE {
INNER = 'inner',
OUTER = 'outer',
LEFT = 'left',
RIGHT = 'right'
}
/** @enum {COLUMN_TYPE} */
export enum COLUMN_TYPE {
STRING = 'string',
INT = 'int',
FLOAT = 'double',
BOOL = 'bool',
BYTE_ARRAY = 'byte_array',
DATE_TIME = 'datetime',
BIG_INT = 'bigint',
QNUM = 'qnum',
DATA_FRAME = 'dataframe',
OBJECT = 'object',
}
/** @enum {TYPE} */
export enum TYPE {
INT = 'int',
BIG_INT = 'bigint',
FLOAT = 'double',
NUM = 'num',
QNUM = 'qnum',
BOOL = 'bool',
STRING = 'string',
STRING_LIST = 'string_list',
DATE_TIME = 'datetime',
OBJECT = 'object',
BYTE_ARRAY = 'byte_array',
DATA_FRAME = 'dataframe',
DATA_FRAME_LIST = 'dataframe_list',
CELL = 'cell',
COLUMN = 'column',
COLUMN_LIST = 'column_list',
GRAPHICS = 'graphics',
FILE = 'file',
ROW_FILTER = 'tablerowfiltercall',
COLUMN_FILTER = 'colfiltercall',
BIT_SET = 'bitset',
MAP = 'map',
DYNAMIC = 'dynamic',
VIEWER = 'viewer', // [ViewerBase] subclasses
LIST = 'list',
SEM_VALUE = 'semantic_value',
FUNC = 'func',
FUNC_CALL = 'funccall',
PROPERTY = 'property',
CATEGORICAL = 'categorical',
NUMERICAL = 'numerical',
GRID_CELL_RENDER_ARGS = 'GridCellRenderArgs',
ELEMENT = 'element',
VIEW = 'view',
TABLE_VIEW = 'TableView',
USER = 'User',
MENU = 'Menu',
PROJECT = 'Project',
SEMANTIC_VALUE = 'semantic_value',
EVENT_DATA = 'event_data',
PROGRESS_INDICATOR = 'progressindicator',
CREDENTIALS = 'Credentials',
SCRIPT_ENVIRONMENT = 'ScriptEnvironment',
NOTEBOOK = 'Notebook'
}
export enum GRID_COLUMN_TAGS {
}
/** Commonly used options on the function level */
export enum FUNC_OPTIONS {
DEMO_PATH = 'demoPath', // Demo path, such as 'Viewers | Radar'
IS_DEMO_SCRIPT = 'isDemoScript'
}
// export type FILTER_TYPE =
// 'histogram' | 'categorical' | 'multi-value' | 'bool-columns' |
// 'free-text' | 'column-free-text' | 'Chem:substructureFilter';
export enum FILTER_TYPE {
HISTOGRAM = 'histogram',
CATEGORICAL = 'categorical',
MULTI_VALUE = 'multi-value',
BOOL_COLUMNS = 'bool-columns',
FREE_TEXT = 'free-text',
COLUMN_FREE_TEXT = 'column-free-text',
SUBSTRUCTURE = 'Chem:substructureFilter'
}
export const TYPES_SCALAR = new Set([TYPE.INT, TYPE.BIG_INT, TYPE.FLOAT, TYPE.NUM, TYPE.BOOL, TYPE.STRING]);
/** @enum {VIEWER_PROPERTY_TYPE} */
export enum VIEWER_PROPERTY_TYPE {
STRING = 'string',
INT = 'int',
FLOAT = 'double',
BOOL = 'bool',
DATE_TIME = 'datetime',
BIG_INT = 'bigint',
COLUMN = 'column',
COLUMN_LIST = 'column_list',
DATA_FRAME = 'dataframe'
}
export enum VIEW_TYPE {
TABLE_VIEW = 'TableView'
}
///////
/** @enum {SEMTYPE} */
export const SEMTYPE = {
EMAIL: 'Email Address',
URL: 'URL',
PHONE_NUMBER: 'Phone Number',
CITY: 'City',
COUNTRY: 'Country',
GENDER: 'Gender',
STATE: 'State',
COUNTY: 'County',
PLACE_NAME: 'Place Name',
ZIP_CODE: 'Zip Code',
AREA_CODE: 'Area Code',
STREET_ADDRESS: 'Street Address',
TEXT: 'Text',
DURATION: 'Duration',
LATITUDE: 'Latitude',
LONGITUDE: 'Longitude',
IP_ADDRESS: 'IP Address',
MOLECULE: 'Molecule',
MACROMOLECULE: 'Macromolecule',
MOLECULE3D: 'Molecule3D',
PDB_ID: 'PDB_ID',
NEWICK: 'Newick',
HELM: 'HELM',
SUBSTRUCTURE: 'Substructure',
MONEY: 'Money',
IMAGE: 'Image',
FILE: 'File',
CHEMICAL_REACTION: 'ChemicalReaction'
}
export const UNITS = {
Molecule : {
SMILES: 'smiles',
MOLBLOCK: 'molblock',
V3K_MOLBLOCK: 'v3Kmolblock',
INCHI: 'inchi'
}
}
/////// Stats
/** @enum {STATS} */
export const STATS = {
TOTAL_COUNT: "count",
VALUE_COUNT: "values",
UNIQUE_COUNT: "unique",
MISSING_VALUE_COUNT: "nulls",
MIN: "min",
MAX: "max",
SUM: "sum",
MED: "med",
AVG: "avg",
STDEV: "stdev",
VARIANCE: "variance",
SKEW: "skew",
KURT: "kurt",
Q1: "q1",
Q2: "q2",
Q3: "q3"
}
/////// Tags
/** @enum {TAGS} */
export const TAGS = {
LAYOUT_ID: 'layout-id', // when set in a column tag, it gets used for layout column matching
DESCRIPTION: 'description',
TOOLTIP: '.tooltip',
/** JSON-encoded list of strings to be used in a cell editor. Applicable for string columns only. */
CHOICES: '.choices',
/** When set to 'true', switches the cell editor to a combo box that only allows to choose values
from a list of already existing values in the column.
Applicable for string columns only.
See also [TAGS_CHOICES]. */
AUTO_CHOICES: '.auto-choices',
ID: '.id',
COLOR_CODING_TYPE: '.color-coding-type',
COLOR_CODING_CONDITIONAL: '.color-coding-conditional',
COLOR_CODING_CATEGORICAL: '.color-coding-categorical',
COLOR_CODING_LINEAR: '.color-coding-linear',
COLOR_CODING_SCHEME_MAX: '.color-coding-scheme-max',
COLOR_CODING_SCHEME_MIN: '.color-coding-scheme-min',
MARKER_CODING: '.marker-coding',
FORMULA_LINES: '.formula-lines',
/** When a dataframe is loaded from a CSV, the maximum number of significant digits
in the fractional part for each numeric column is determined */
SOURCE_PRECISION: '.source-precision',
/** Set on a dataframe column; used to format column contents in grids, CSV export, passing to scripts */
FORMAT: 'format',
FORMULA: 'formula',
SEMTYPE: 'quality',
/** Separator used to parse a cell value into multiple values for filter categories. */
MULTI_VALUE_SEPARATOR: '.multi-value-separator',
/** Boolean flag to control custom filters visibility. */
IGNORE_CUSTOM_FILTER: '.ignore-custom-filter',
/** Filter type for molecular columns: "Sketch" | "Categorical". See [DG.STRUCTURE_FILTER_TYPE] */
STRUCTURE_FILTER_TYPE: '.structure-filter-type',
/** Custom filter type to be used by default for a column: "<PackageName\>:<FilterType\>".
* Takes precedence over [IGNORE_CUSTOM_FILTER] */
CUSTOM_FILTER_TYPE: '.custom-filter-type',
CELL_RENDERER: 'cell.renderer',
UNITS: 'units', // see DG.UNITS
FRIENDLY_NAME: 'friendlyName',
ALLOW_RENAME: '.allow-rename',
CHEM: {
SCAFFOLD: 'chem-scaffold'
},
LINK_CLICK_BEHAVIOR: '.linkClickBehavior',
}
export const FUNC_TYPES = {
/** An application that gets shown in the app store.
* Signature: app() */
APP: 'app',
/** Context-specific widget that appears on the context panel
* Signature: panel(x: any): Widget */
PANEL: 'panel',
/** Gets invoked when the containing package is initialized
* Signature: init() */
INIT: 'init',
/** Gets invoked at platform startup. Use it wisely as the whole package will get initialized.
* Signature: autostart() */
AUTOSTART: 'autostart',
/** Semantic type detector for a column. Gets invoked when a new dataframe is imported into the platform.
* Implementation should either set column.semType directly, or return the semantic type that will get assigned.
* Signature: semTypeDetector(Column): string */
SEM_TYPE_DETECTOR: 'semTypeDetector',
/** Creates a viewer (or editor) for a file with the specified extension.
* The extension is derived from the `fileViewer-<extension>` tag.
* Used in the file system browser.
* Signature: fileViewer(FileInfo): View */
FILE_VIEWER: 'fileViewer',
/** Exports a file. Gets added to the "export" menu at startup.
* Signature: fileExporter() */
FILE_EXPORTER: 'fileExporter',
/** Handles custom file formats.
* The `meta.ext` parameter should contain a comma-separated list of extensions.
* Signature: fileImporter(x: string | TypedArray): DataFrame[] */
FILE_IMPORTER: 'file-handler',
/** Creates a cell renderer that is used for rendering cells for specific semantic types.
* Semantic type is derived from the `cellRenderer-<semType>` tag.
* Signature: cellRenderer(): GridCellRenderer */
CELL_RENDERER: 'cellRenderer',
/** Edits package settings.
* Signature: packageSettingsEditor(): Widget */
PACKAGE_SETTINGS_EDITOR: 'packageSettingsEditor',
/** Makes a widget appear on the welcome screen
* Signature: dashboard(): DG.Widget */
DASHBOARD: 'dashboard',
/**
* Function analysis. Examples: sensitivity analysis, parameter editor
* Func => View */
FUNCTION_ANALYSIS: 'functionAnalysis',
/** Converts values. Has one input and one output */
CONVERTER: 'converter'
}
export interface FuncRoleDescription {
role: string;
description: string;
header: string;
signature?: string;
}
export const functionRoles: FuncRoleDescription[] = [
{
role: FUNC_TYPES.APP,
description: 'An application that gets shown in the app store.',
header: 'tags',
signature: 'app()'
},
{
role: FUNC_TYPES.PANEL,
description: 'Context-specific widget that appears on the context panel.',
header: 'tags',
signature: 'panel(x: any): Widget'
},
{
role: FUNC_TYPES.INIT,
description: 'Gets invoked when the containing package is initialized.',
header: 'tags',
signature: 'init()'
},
{
role: FUNC_TYPES.AUTOSTART,
description: 'Gets invoked at platform startup. Use it wisely as the whole package will get initialized.',
header: 'tags',
signature: 'autostart()'
},
{
role: FUNC_TYPES.SEM_TYPE_DETECTOR,
description: 'Semantic type detector for a column. Gets invoked when a new dataframe is imported into the platform.\n * Implementation should either set column.semType directly, or return the semantic type that will get assigned.',
header: 'tags',
signature: 'semTypeDetector(Column): string'
},
{
role: FUNC_TYPES.FILE_VIEWER,
header: 'tags',
description: 'Creates a viewer (or editor) for a file with the specified extension.\n * The extension is derived from the `fileViewer-[extension]` tag.\n * Used in the file system browser.',
signature: 'fileViewer(FileInfo): View'
},
{
role: FUNC_TYPES.FILE_EXPORTER,
header: 'tags',
description: 'Exports a file. Gets added to the "export" menu at startup.',
signature: 'fileExporter()'
},
{
role: FUNC_TYPES.FILE_IMPORTER,
header: 'tags',
description: 'andles custom file formats.\n * The `meta.ext` parameter should contain a comma-separated list of extensions',
signature: 'fileImporter(x: string | TypedArray): DataFrame[]'
},
{
role: FUNC_TYPES.CELL_RENDERER,
header: 'tags',
description: 'Creates a cell renderer that is used for rendering cells for specific semantic types.\n * Semantic type is derived from the `cellRenderer-[semType]` tag.',
signature: 'cellRenderer(): GridCellRenderer'
},
{
role: FUNC_TYPES.PACKAGE_SETTINGS_EDITOR,
header: 'tags',
description: 'Edits package settings.',
signature: 'packageSettingsEditor(): Widget'
},
{
role: FUNC_TYPES.DASHBOARD,
description: 'Makes a widget appear on the welcome screen.',
header: 'tags',
signature: 'dashboard(): DG.Widget'
},
{
role: FUNC_TYPES.FUNCTION_ANALYSIS,
description: 'Function analysis that gets added to the function view. Examples: sensitivity analysis, parameter editor',
header: 'tags',
signature: 'functionAnalysis(x:func):View'
},
{
role: FUNC_TYPES.CONVERTER,
description: 'Converts values. Has one input and one output',
header: 'role',
signature: 'converter(x: any): any'
},
]
export enum LOG_LEVEL {
DEBUG = 'debug',
INFO = 'info',
WARNING = 'warning',
ERROR = 'error',
AUDIT = 'audit',
USAGE= 'usage'
}
////// Viewers
/** @enum {VIEWER} */
export enum VIEWER {
HISTOGRAM = 'Histogram',
BAR_CHART = 'Bar chart',
BOX_PLOT = 'Box plot',
CALENDAR = 'Calendar',
CORR_PLOT = 'Correlation plot',
DENSITY_PLOT = 'Density plot',
FILTERS = 'Filters',
FORM = 'Form',
GLOBE = 'Globe',
GRID = 'Grid',
GOOGLE_MAP = 'Google map',
HEAT_MAP = 'Heat map',
LINE_CHART = 'Line chart',
SHAPE_MAP = 'Shape Map',
MARKUP = 'Markup',
MATRIX_PLOT = 'Matrix plot',
NETWORK_DIAGRAM = 'Network diagram',
PC_PLOT = 'PC Plot',
PIE_CHART = 'Pie chart',
SCATTER_PLOT = 'Scatter plot',
SCATTER_PLOT_3D = '3d scatter plot',
STATISTICS = 'Statistics',
TILE_VIEWER = 'Tile Viewer',
TREE_MAP = 'Tree map',
TRELLIS_PLOT = 'Trellis plot',
WORD_CLOUD = 'Word cloud',
TIMELINES = 'TimelinesViewer',
RADAR_VIEWER = 'RadarViewer',
SURFACE_PLOT = 'SurfacePlot',
SCAFFOLD_TREE = 'Scaffold Tree',
PIVOT_TABLE = 'Pivot table'
}
/** @enum {LINE_CHART_SERIES_TYPE} */
export enum LINE_CHART_SERIES_TYPE {
LINE = 'Line Chart',
AREA = 'Area Chart',
BAR = 'Bar Chart',
STACKED_BAR = 'Stacked Bar Chart',
STACKED_AREA = 'Stacked Area Chart'
}
/** @enum {SIMILARITY_METRIC} */
export enum SIMILARITY_METRIC {
TANIMOTO = 'tanimoto',
DICE = 'dice',
COSINE = 'cosine',
SOKAL = 'sokal',
RUSSEL = 'russel',
ROGOT_GOLDBERG = 'rogot-goldberg',
KULCZYNSKI = 'kulczynski',
MC_CONNAUGHEY = 'mc-connaughey',
ASYMMETRIC = 'asymmetric',
BRAUN_BLANQUET = 'braun-blanquet'
}
/** @enum {STRUCTURE_FILTER_TYPE} */
export enum STRUCTURE_FILTER_TYPE {
Sketch = 'Sketch',
Categorical = 'Categorical'
}
/** @enum {DEMO_DATASET} */
export enum DEMO_DATASET {
WELLS = 'wells',
DEMOG = 'demog',
BIOSENSOR = 'biosensor',
RANDOM_WALK = 'random walk',
GEO = 'geo',
MOLECULES = 'molecules',
DOSE_RESPONSE = 'dose-response',
}
/** @enum {DOCK_TYPE} */
export enum DOCK_TYPE {
LEFT = "left",
RIGHT = "right",
TOP = "up",
DOWN = "down",
FILL = "fill",
}
export enum LEGEND_POSITION {
LEFT = "left",
RIGHT = "right",
TOP = "top",
BOTTOM = "bottom",
}
export enum COLOR_CODING_TYPE {
CATEGORICAL = 'Categorical',
CONDITIONAL = 'Conditional',
LINEAR = 'Linear',
OFF = 'Off',
}
export enum SCRIPT_LANGUAGE {
JAVASCRIPT = 'javascript',
JULIA = 'julia',
OCTAVE = 'octave',
PYTHON = 'python',
R = 'r',
NODE = 'nodejs',
GROK = 'grok',
}
export enum NAMED_VALIDATORS {
CONTAINS_MISSING_VALUES = 'containsMissingValues',
COLUMN_NAME = 'columnName',
COLUMN_IS_NUMERICAL = 'columnIsNumerical',
COLUMN_IS_CATEGORICAL = 'columnIsCategorical',
NOT_EMPTY = 'notEmpty',
}
export enum MARKER_TYPE {
CIRCLE = "circle",
CIRCLE_BORDER = "circle border",
SQUARE = "square",
SQUARE_BORDER = "square border",
CROSS_BORDER = "cross border",
CROSS_X_BORDER = "cross x border",
OUTLIER = "outlier",
DIAMOND = "diamond",
DIAMOND_BORDER = "diamond border",
TRIANGLE_TOP = "triangle top",
TRIANGLE_RIGHT = "triangle right",
TRIANGLE_BOTTOM = "triangle bottom",
TRIANGLE_LEFT = "triangle left",
TRIANGLE_TOP_BORDER = "triangle top border",
TRIANGLE_RIGHT_BORDER = "triangle right border",
TRIANGLE_BOTTOM_BORDER = "triangle bottom border",
TRIANGLE_LEFT_BORDER = "triangle left border",
ASTERISK = "asterisk",
STAR = "star",
DOT = "dot",
GRADIENT = "gradient",
}
export enum USER_STATUS {
STATUS_NEW = "new",
STATUS_ACTIVE = "active",
STATUS_BLOCKED = "blocked",
STATUS_GUEST = "guest"
}
export enum PERMISSION {
EDIT = 'Edit',
VIEW = 'View',
SHARE = 'Share',
DELETE = 'Delete',
}
/**
* @typedef {string} AggregationType
* @typedef {string} SyncType
* @typedef {string} JoinType
* @typedef {string} ColumnType
* @typedef {string} ViewerType
* @typedef {string} ObjectType
* @typedef {string} ViewerPropertyType
* @typedef {string} Type
* @typedef {string} SemType
* @typedef {string} SimilarityMetric
* @typedef {string} ColorType
* @typedef {string} DockType
*
* @typedef {Object} ElementOptions
* @property {string} id
* @property {string} classes
* @property {Object} style
*
* @typedef {Object} CsvImportOptions
* @property {string} delimiter
* @property {string} decimalSeparator
* @property {string} thousandSeparator
*
* @typedef {function(number): boolean} IndexPredicate
* @typedef {function(String): boolean} StringPredicate
**/
export type AggregationType = `${AGG}`;
export type ColumnAggregationType = `${AGG}` | `${STR_AGG}` | string;
export type SyncType = `${SYNC_TYPE}`;
export type JoinType = `${JOIN_TYPE}`;
export type ColumnType = `${COLUMN_TYPE}`;
export type ViewerType = `${VIEWER}` | string;
export type ObjectType = string;
export type ViewerPropertyType = string;
export type Type = `${TYPE}`;
export type SemType = string;
export type SimilarityMetric = `${SIMILARITY_METRIC}`;
export type StructureFilterType = `${STRUCTURE_FILTER_TYPE}`;
export type ColorType = number;
export type ColorCodingType = `${COLOR_CODING_TYPE}`;
export type MarkerCodingType = `${MARKER_TYPE}`;
export type DemoDatasetName = `${DEMO_DATASET}`;
export type DockType = `${DOCK_TYPE}`;
export type LegendPosition = `${LEGEND_POSITION}`;
export type CsvImportColumnOptions = {name: string, type?: string, semType?: string};
export type CsvImportOptions = {
delimiter?: string, decimalSeparator?: string, thousandSeparator?: string, headerRow?: boolean,
columnFilterNames?: string[], columnFilterRegexp?: string, mergeDelimiters?: boolean, maxRows?: number,
rowFilterTop?: number, rowFilterProb?: number, nullStrings?: string[], columnImportOptions?: CsvImportColumnOptions[]};
export type IndexPredicate = (ind: number) => boolean;
export type StringPredicate = (str: string) => boolean;
export type ScriptLanguage = `${SCRIPT_LANGUAGE}`;
export type ElementOptions = {
id?: string;
classes?: string;
style?: object;
//tooltip?: string;
processNode?: (node: HTMLElement) => void;
onClick?: (event: PointerEvent) => void;
};
/** Metadata associated with the semantic type. */
export interface SemTypeInfo {
/** Semantic type id */
name: string;
/** Semantic type description (shown in tooltips, etc) */
description: string;
/** Specifies the value data type.
* For example, the `itemType` for semantic type `Molecule` is `String`.
* Used for the automatic detection of semantic data types. */
itemType?: ColumnType;
/** Regular expression to check against the column name
* Used for the automatic detection of semantic data types. */
columnNameRegexp?: string;
/** Regular expression to check against the values (only applies to strings)
* Used for the automatic detection of semantic data types. */
valueRegexp?: string;
}