datagrok-api
Advanced tools
Comparing version 1.21.3 to 1.22.0-rc.a4a142af00.32f8dca7d4b
{ | ||
"name": "datagrok-api", | ||
"version": "1.21.3", | ||
"version": "1.22.0-rc.a4a142af00.32f8dca7d4b", | ||
"description": "", | ||
"dependencies": { | ||
"@datagrok-libraries/chem-meta": "^1.0.12", | ||
"@types/react": "latest", | ||
"@types/wu": "latest", | ||
"@types/react": "^18.3.11", | ||
"@types/wu": "^2.1.44", | ||
"cash-dom": "^8.0.0", | ||
"dayjs": "^1.11.10", | ||
"openchemlib": "^7.2.3", | ||
"react": "latest", | ||
"react": "^18.3.1", | ||
"rxjs": "^6.5.5", | ||
"wu": "latest", | ||
"wu": "^2.1.0", | ||
"typeahead-standalone": "4.14.1" | ||
@@ -16,0 +16,0 @@ }, |
@@ -130,2 +130,9 @@ export declare function histogram(col: any, bitset: any, flag: boolean, options?: { | ||
static ViewerPosition: string; | ||
static ScriptHandlerLanguage: string; | ||
static ScriptHandlerExtensions: string; | ||
static ScriptHandlerName: string; | ||
static ScriptHandlerComment: string; | ||
static ScriptHandlerVectorization: string; | ||
static ScriptHandlerTemplate: string; | ||
static ScriptHandlerEditorMode: string; | ||
} | ||
@@ -132,0 +139,0 @@ export declare class FuncParamOptions { |
@@ -176,3 +176,3 @@ /// this file was generated automatically from ddt classes declarations | ||
FuncOptions.InspectorPanel = 'inspectorPanel'; | ||
/// Function that returns a Widget that gets added as a tab to the "Inspector" window | ||
/// Function that should be cached | ||
FuncOptions.Cache = 'cache'; | ||
@@ -183,2 +183,23 @@ /// Cron string that specifies when the cache is invalidated | ||
FuncOptions.ViewerPosition = 'viewerPosition'; | ||
/// Specifies language of this [FuncTypes.ScriptHandler]. | ||
/// Mandatory options if tag [FuncTypes.ScriptHandler] is present. | ||
FuncOptions.ScriptHandlerLanguage = 'scriptHandler.language'; | ||
/// Specifies comma separated extensions that this [FuncTypes.ScriptHandler] supports. | ||
/// Mandatory options if tag [FuncTypes.ScriptHandler] is present. | ||
FuncOptions.ScriptHandlerExtensions = 'scriptHandler.extensions'; | ||
/// Specifies friendlyName of this [FuncTypes.ScriptHandler] to be used in UI. | ||
/// Defaults to language | ||
FuncOptions.ScriptHandlerName = 'scriptHandler.friendlyName'; | ||
/// Specifies comment start sign for this [FuncTypes.ScriptHandler]. Default: # | ||
FuncOptions.ScriptHandlerComment = 'scriptHandler.commentStart'; | ||
/// Specifies function that will handle vectorizations of scripts for this [FuncTypes.ScriptHandler]. | ||
/// The function should accept Script and return String with code that is vectorized. | ||
/// Scalar script inputs in this case are corresponding to dataframe column names. Dataframe that has [VectorScript.vecInputTableName] | ||
/// name should be used as target. | ||
FuncOptions.ScriptHandlerVectorization = 'scriptHandler.vectorizationFunction'; | ||
/// Specifies template script for this [FuncTypes.ScriptHandler]. | ||
FuncOptions.ScriptHandlerTemplate = 'scriptHandler.templateScript'; | ||
/// Specifies code editor mode that will be used in CodeMirror for this [FuncTypes.ScriptHandler]. | ||
/// Defaults to language. | ||
FuncOptions.ScriptHandlerEditorMode = 'scriptHandler.codeEditorMode'; | ||
export class FuncParamOptions { | ||
@@ -185,0 +206,0 @@ } |
@@ -46,2 +46,12 @@ export declare class DataSourceType { | ||
} | ||
export declare class ScriptLanguage { | ||
static Grok: string; | ||
static Julia: string; | ||
static Python: string; | ||
static Pyodide: string; | ||
static R: string; | ||
static NodeJs: string; | ||
static JavaScript: string; | ||
static Octave: string; | ||
} | ||
import { Entity } from '../entities'; | ||
@@ -48,0 +58,0 @@ export declare class DockerImage extends Entity { |
@@ -17,3 +17,3 @@ /// this file was generated automatically from grok_shared classes declarations | ||
DataSourceType.MariaDB = 'MariaDB'; | ||
DataSourceType.MlFlow = 'MlFlow'; | ||
DataSourceType.MlFlow = 'MLFlow'; | ||
DataSourceType.MongoDB = 'MongoDB'; | ||
@@ -50,2 +50,12 @@ DataSourceType.MsSql = 'MS SQL'; | ||
DataSourceType.systemDataSources = ['AWS', 'PostgresDart']; | ||
export class ScriptLanguage { | ||
} | ||
ScriptLanguage.Grok = 'grok'; | ||
ScriptLanguage.Julia = 'julia'; | ||
ScriptLanguage.Python = 'python'; | ||
ScriptLanguage.Pyodide = 'pyodide'; | ||
ScriptLanguage.R = 'r'; | ||
ScriptLanguage.NodeJs = 'nodejs'; | ||
ScriptLanguage.JavaScript = 'javascript'; | ||
ScriptLanguage.Octave = 'octave'; | ||
import { Entity } from '../entities'; | ||
@@ -52,0 +62,0 @@ export class DockerImage extends Entity { |
@@ -92,2 +92,3 @@ /** @enum {AGG} */ | ||
FILE = "file", | ||
BLOB = "blob", | ||
ROW_FILTER = "tablerowfiltercall", | ||
@@ -384,3 +385,4 @@ COLUMN_FILTER = "colfiltercall", | ||
SCAFFOLD_TREE = "Scaffold Tree", | ||
PIVOT_TABLE = "Pivot table" | ||
PIVOT_TABLE = "Pivot table", | ||
CONFUSION_MATRIX = "Confusion matrix" | ||
} | ||
@@ -450,3 +452,4 @@ /** @enum {LINE_CHART_SERIES_TYPE} */ | ||
NODE = "nodejs", | ||
GROK = "grok" | ||
GROK = "grok", | ||
PYODIDE = "pyodide" | ||
} | ||
@@ -561,3 +564,3 @@ export declare enum NAMED_VALIDATORS { | ||
export declare type StringPredicate = (str: string) => boolean; | ||
export declare type ScriptLanguage = `${SCRIPT_LANGUAGE}`; | ||
export declare type ScriptingLanguage = `${SCRIPT_LANGUAGE}`; | ||
export declare type ElementOptions = { | ||
@@ -564,0 +567,0 @@ id?: string; |
@@ -99,2 +99,3 @@ /** @enum {AGG} */ | ||
TYPE['FILE'] = 'file'; | ||
TYPE['BLOB'] = 'blob'; | ||
TYPE['ROW_FILTER'] = 'tablerowfiltercall'; | ||
@@ -480,2 +481,3 @@ TYPE['COLUMN_FILTER'] = 'colfiltercall'; | ||
VIEWER['PIVOT_TABLE'] = 'Pivot table'; | ||
VIEWER['CONFUSION_MATRIX'] = 'Confusion matrix'; | ||
})(VIEWER || (VIEWER = {})); | ||
@@ -554,2 +556,3 @@ /** @enum {LINE_CHART_SERIES_TYPE} */ | ||
SCRIPT_LANGUAGE['GROK'] = 'grok'; | ||
SCRIPT_LANGUAGE['PYODIDE'] = 'pyodide'; | ||
})(SCRIPT_LANGUAGE || (SCRIPT_LANGUAGE = {})); | ||
@@ -556,0 +559,0 @@ export var NAMED_VALIDATORS; |
@@ -78,3 +78,3 @@ import { DataFrame } from "./dataframe"; | ||
get environments(): HttpDataSource<ScriptEnvironment>; | ||
docker: DockerDataSource; | ||
get docker(): DockerDataSource; | ||
/** | ||
@@ -332,2 +332,3 @@ * @deprecated The UserDataStorage should not be used. Use {@link UserSettingsStorage} instead | ||
getSchema(e: DataConnection, schemaName?: string | null): Promise<TableInfo[]>; | ||
getUniqueColumnsNames(c: DataConnection, schema: string, table: string): Promise<string[]>; | ||
} | ||
@@ -498,2 +499,4 @@ /** | ||
get dockerContainers(): DockerContainersDataSource; | ||
getServiceLogs(serviceName: string, limit: number): Promise<DataFrame>; | ||
getAvailableServices(): Promise<string[]>; | ||
} | ||
@@ -500,0 +503,0 @@ /** Functionality to work with Docker images. See also {@link DockerContainersDataSource}. |
@@ -31,3 +31,2 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
constructor() { | ||
this.docker = new DockerDataSource(); | ||
this.stickyMeta = new StickyMeta(); | ||
@@ -132,2 +131,5 @@ } | ||
} | ||
get docker() { | ||
return new DockerDataSource(); | ||
} | ||
/** | ||
@@ -528,2 +530,7 @@ * @deprecated The UserDataStorage should not be used. Use {@link UserSettingsStorage} instead | ||
} | ||
getUniqueColumnsNames(c, schema, table) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return toJs(yield api.grok_DataConnectionsDataSource_Get_Unique_Columns(this.dart, c.dart, schema, table)); | ||
}); | ||
} | ||
} | ||
@@ -762,2 +769,8 @@ /** | ||
} | ||
getServiceLogs(serviceName, limit) { | ||
return api.grok_Dapi_DockersDataSource_GetServiceLogs(serviceName, limit); | ||
} | ||
getAvailableServices() { | ||
return api.grok_Dapi_DockersDataSource_GetAvailableServices(); | ||
} | ||
} | ||
@@ -764,0 +777,0 @@ /** Functionality to work with Docker images. See also {@link DockerContainersDataSource}. |
@@ -1,2 +0,2 @@ | ||
import { ColumnType, ScriptLanguage, SemType, Type, TYPE, USER_STATUS } from "./const"; | ||
import { ColumnType, ScriptingLanguage, SemType, Type, TYPE, USER_STATUS } from "./const"; | ||
import { FuncCall } from "./functions"; | ||
@@ -536,2 +536,4 @@ import { FileSource } from "./dapi"; | ||
export declare class Script extends Func { | ||
static readonly vecInputTableName = "in_vec_table"; | ||
static readonly vecOutputTableName = "out_vec_table"; | ||
/** @constructs Script */ | ||
@@ -543,5 +545,7 @@ constructor(dart: any); | ||
set script(s: string); | ||
/** Script */ | ||
get clientCode(): string; | ||
/** Script language. See also: https://datagrok.ai/help/datagrok/functions/func-params-annotation */ | ||
get language(): ScriptLanguage; | ||
set language(s: ScriptLanguage); | ||
get language(): ScriptingLanguage; | ||
set language(s: ScriptingLanguage); | ||
/** Environment name. See also: https://datagrok.ai/help/datagrok/functions/func-params-annotation */ | ||
@@ -688,3 +692,3 @@ get environment(): string; | ||
/** Returns settings for a package. */ | ||
getSettings(): Promise<any>; | ||
getSettings(): Promise<Map<string, any>>; | ||
/** Updates settings for a package. */ | ||
@@ -695,2 +699,3 @@ setSettings(props: Map<string, any>, group: Group): Promise<void>; | ||
get files(): FileSource; | ||
getTests(core?: boolean): Promise<any>; | ||
} | ||
@@ -781,2 +786,4 @@ export declare class DockerContainer extends Entity { | ||
set propertyType(s: TYPE); | ||
/** Property subtype */ | ||
get propertySubType(): TYPE; | ||
/** Applies to viewers properties whether to include the property in the layout or not. */ | ||
@@ -821,2 +828,4 @@ get includeInLayout(): boolean; | ||
set choices(x: string[]); | ||
get isVectorizable(): boolean; | ||
get vectorName(): string; | ||
/** Column type filter */ | ||
@@ -823,0 +832,0 @@ get columnFilter(): ColumnType | 'numerical' | 'categorical' | null; |
@@ -631,2 +631,4 @@ // noinspection JSUnusedGlobalSymbols | ||
set script(s) { api.grok_Script_SetScript(this.dart, s); } | ||
/** Script */ | ||
get clientCode() { return api.grok_Script_ClientCode(this.dart); } | ||
/** Script language. See also: https://datagrok.ai/help/datagrok/functions/func-params-annotation */ | ||
@@ -648,2 +650,4 @@ get language() { return api.grok_Script_GetLanguage(this.dart); } | ||
} | ||
Script.vecInputTableName = 'in_vec_table'; | ||
Script.vecOutputTableName = 'out_vec_table'; | ||
/** Represents connection credentials | ||
@@ -861,2 +865,18 @@ * Usually it is a login and a password pair | ||
} | ||
getTests(core = false) { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
try { | ||
yield this.load({ file: 'package-test.js' }); | ||
let module = this.getModule('package-test.js'); | ||
if (core && module.initAutoTests) | ||
yield module.initAutoTests(); | ||
return module.tests; | ||
} | ||
catch (e) { | ||
this.logger.error((_a = e === null || e === void 0 ? void 0 : e.msg) !== null && _a !== void 0 ? _a : 'get module error'); | ||
return undefined; | ||
} | ||
}); | ||
} | ||
} | ||
@@ -907,2 +927,4 @@ // export class DockerImage extends Entity { | ||
set propertyType(s) { api.grok_Property_Set_PropertyType(this.dart, s); } | ||
/** Property subtype */ | ||
get propertySubType() { return api.grok_Property_Get_PropertySubType(this.dart); } | ||
/** Applies to viewers properties whether to include the property in the layout or not. */ | ||
@@ -947,2 +969,4 @@ get includeInLayout() { return api.grok_Property_Get_IncludeInLayout(this.dart); } | ||
set choices(x) { api.grok_Property_Set_Choices(this.dart, x); } | ||
get isVectorizable() { return api.grok_Property_Get_IsVectorizable(this.dart); } | ||
get vectorName() { return api.grok_Property_Get_VectorName(this.dart); } | ||
/** Column type filter */ | ||
@@ -949,0 +973,0 @@ get columnFilter() { |
@@ -78,2 +78,3 @@ import * as rxjs from 'rxjs'; | ||
get onPackageLoaded(): rxjs.Observable<Package>; | ||
get onFileImportRequest(): rxjs.Observable<FileImportArgs>; | ||
get onGridCellLinkClicked(): rxjs.Observable<EventData<GridCellArgs>>; | ||
@@ -124,2 +125,7 @@ get onBrowseNodeCreated(): rxjs.Observable<TreeViewNode>; | ||
} | ||
export declare type FileImportArgs = { | ||
file: File; | ||
tables: DataFrame[]; | ||
preventDefault: () => void; | ||
}; | ||
export interface ViewArgs { | ||
@@ -126,0 +132,0 @@ view: View; |
@@ -110,2 +110,3 @@ import * as rxjs from 'rxjs'; | ||
get onPackageLoaded() { return __obs('d4-package-loaded'); } | ||
get onFileImportRequest() { return __obs('d4-file-import-request'); } | ||
get onGridCellLinkClicked() { return __obs('d4-grid-cell-link-clicked-global'); } | ||
@@ -112,0 +113,0 @@ get onBrowseNodeCreated() { |
@@ -7,2 +7,3 @@ import { Type } from "./const"; | ||
import { ViewBase } from "./views/view"; | ||
import { Logger } from "./logger"; | ||
export interface IFunctionRegistrationData { | ||
@@ -37,2 +38,3 @@ signature: string; | ||
parse(command: string, safe?: boolean): any; | ||
handleOuterBracketsInColName(name: string, escape: boolean): string; | ||
/** Returns a function with the specified name, or throws an error if | ||
@@ -124,2 +126,3 @@ * there is no such function. See also {@link find}. */ | ||
get author(): User; | ||
get debugLogger(): Logger; | ||
/** Returns function call parameter value | ||
@@ -126,0 +129,0 @@ * @param {string} name |
@@ -16,2 +16,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
import dayjs from 'dayjs'; | ||
import { Logger } from './logger'; | ||
const api = window; | ||
@@ -124,2 +125,5 @@ const FuncCallParamMapProxy = new Proxy(class { | ||
} | ||
handleOuterBracketsInColName(name, escape) { | ||
return api.grok_ColumnName_HandleOuterBrackets(name, escape); | ||
} | ||
/** Returns a function with the specified name, or throws an error if | ||
@@ -243,2 +247,3 @@ * there is no such function. See also {@link find}. */ | ||
get author() { return toJs(api.grok_FuncCall_Get_Author(this.dart)); } | ||
get debugLogger() { return new Logger(undefined, { dartLogger: api.grok_FuncCall_Get_DebugLogger(this.dart) }); } | ||
/** Returns function call parameter value | ||
@@ -245,0 +250,0 @@ * @param {string} name |
@@ -290,2 +290,6 @@ import { Cell, Column, DataFrame, Row } from './dataframe'; | ||
get renderer(): GridCellRenderer; | ||
render(options?: { | ||
context?: CanvasRenderingContext2D; | ||
bounds?: Rect; | ||
}): void; | ||
/** Gets or sets HTML element for this grid cell. */ | ||
@@ -292,0 +296,0 @@ get element(): HTMLElement; |
@@ -464,2 +464,6 @@ import { Cell, Column, DataFrame, Row } from './dataframe'; | ||
} | ||
render(options) { | ||
var _a; | ||
api.grok_GridCell_Render(this.dart, options === null || options === void 0 ? void 0 : options.context, (_a = options === null || options === void 0 ? void 0 : options.bounds) === null || _a === void 0 ? void 0 : _a.toDart()); | ||
} | ||
/** Gets or sets HTML element for this grid cell. */ | ||
@@ -466,0 +470,0 @@ get element() { return api.grok_GridCell_Get_Element(this.dart); } |
@@ -247,10 +247,12 @@ export interface IScatterPlot3dSettings { | ||
markerMaxSize: number; | ||
labels: string; | ||
labelsColumnName: string; | ||
linesOrder: string; | ||
linesOrderColumnName: string; | ||
linesWidth: number; | ||
labelFormColumnNames: Array<string>; | ||
showLabelsFor: keyof typeof RowSet; | ||
labelColorAsMarker: boolean; | ||
showMarkerLabels: keyof typeof VisibilityMode; | ||
showLabelsMode: keyof typeof VisibilityMode; | ||
useLabelAsMarker: boolean; | ||
labelCircleRadius: number; | ||
extraLabels: string; | ||
extraLabelsColumnName: string; | ||
labelCircleContentSize: number; | ||
showRegressionLine: boolean; | ||
@@ -269,2 +271,3 @@ showRegressionLineEquation: boolean; | ||
allowZoom: boolean; | ||
useGPUComputing: boolean; | ||
autoLayout: boolean; | ||
@@ -534,3 +537,3 @@ backColor: number; | ||
axisFont: string; | ||
showNumericalLegend: boolean; | ||
showColorScale: boolean; | ||
invertColorScheme: boolean; | ||
@@ -545,6 +548,8 @@ colorTransformType: keyof typeof AxisType; | ||
invertYAxis: boolean; | ||
showXSelector: boolean; | ||
showYSelector: boolean; | ||
bins: number; | ||
allowZoom: boolean; | ||
binToRange: boolean; | ||
xBins: number; | ||
yBins: number; | ||
showBinSelector: boolean; | ||
backColor: number; | ||
@@ -1063,2 +1068,21 @@ rowSource: keyof typeof RowSet; | ||
} | ||
export interface IConfusionMatrixSettings { | ||
x: string; | ||
xColumnName: string; | ||
y: string; | ||
yColumnName: string; | ||
rowSource: keyof typeof RowSet; | ||
filter: string; | ||
allowDynamicMenus: boolean; | ||
showContextMenu: boolean; | ||
title: string; | ||
showTitle: boolean; | ||
table: string; | ||
description: string; | ||
help: string; | ||
initializationFunction: string; | ||
onInitializedScript: string; | ||
descriptionPosition: keyof typeof FlexPosition; | ||
descriptionVisibilityMode: keyof typeof VisibilityMode; | ||
} | ||
export interface IFormSettings { | ||
@@ -1065,0 +1089,0 @@ syncMode: string; |
@@ -11,3 +11,2 @@ export interface IUserReport { | ||
/** Property description. It will be shown in the UI where possible. */ | ||
/** Property description. It will be shown in the UI where possible. */ | ||
description: string; | ||
@@ -27,3 +26,2 @@ reporter: any; | ||
/** Property name. */ | ||
/** Property name. */ | ||
name: string; | ||
@@ -34,2 +32,4 @@ id: string; | ||
isDeleted: boolean; | ||
bindId: string; | ||
bid: string; | ||
namespace: string; | ||
@@ -36,0 +36,0 @@ isOnServer: boolean; |
@@ -18,2 +18,3 @@ import { LOG_LEVEL } from './const'; | ||
params?: object; | ||
dartLogger?: any; | ||
}); | ||
@@ -20,0 +21,0 @@ static create(options?: { |
@@ -7,5 +7,6 @@ import { LOG_LEVEL } from './const'; | ||
constructor(putCallback, options) { | ||
var _a; | ||
this.putCallback = putCallback; | ||
if ((options === null || options === void 0 ? void 0 : options.staticLogger) != true) | ||
this.dart = api.grok_GetLogger(toDart(options === null || options === void 0 ? void 0 : options.params)); | ||
this.dart = (_a = options === null || options === void 0 ? void 0 : options.dartLogger) !== null && _a !== void 0 ? _a : api.grok_GetLogger(toDart(options === null || options === void 0 ? void 0 : options.params)); | ||
} | ||
@@ -57,3 +58,4 @@ static create(options) { | ||
this.putCallback(msg); | ||
(_a = msg.stackTrace) !== null && _a !== void 0 ? _a : (msg.stackTrace = new Error().stack); | ||
if (msg.level === LOG_LEVEL.ERROR) | ||
(_a = msg.stackTrace) !== null && _a !== void 0 ? _a : (msg.stackTrace = new Error().stack); | ||
api.grok_Log(this.dart, msg.level, msg.message, toDart(msg.params), msg.type, msg.stackTrace); | ||
@@ -60,0 +62,0 @@ } |
@@ -57,2 +57,6 @@ import { MARKER_TYPE, ViewerType } from './const'; | ||
static streamToObservable<T = any>(dartStream: any): rxjs.Observable<T>; | ||
static executeTests(testsParams: { | ||
package: any; | ||
params: any; | ||
}[]): Promise<any>; | ||
} | ||
@@ -59,0 +63,0 @@ /** A proxy to a Dart `List<T>`. */ |
@@ -185,2 +185,76 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
} | ||
static executeTests(testsParams) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
let failed = false; | ||
let csv = ''; | ||
let verbosePassed = ''; | ||
let verboseSkipped = ''; | ||
let verboseFailed = ''; | ||
let countPassed = 0; | ||
let countSkipped = 0; | ||
let countFailed = 0; | ||
let resultDF = undefined; | ||
for (let testParam of testsParams) { | ||
let df = yield grok.functions.call(testParam.package + ':test', testParam.params); | ||
if (df.rowCount === 0) { | ||
verboseFailed += `Test result : Invocation Fail : ${testParam.params.category}: ${testParam.params.test}\n`; | ||
countFailed += 1; | ||
failed = true; | ||
continue; | ||
} | ||
let row = df.rows.get(0); | ||
if (df.rowCount > 1) { | ||
let unhandledErrorRow = df.rows.get(1); | ||
if (!unhandledErrorRow.get('success')) { | ||
unhandledErrorRow['category'] = row.get('category'); | ||
unhandledErrorRow['name'] = row.get('name'); | ||
row = unhandledErrorRow; | ||
} | ||
} | ||
const category = row.get('category'); | ||
const testName = row.get('name'); | ||
const time = row.get('ms'); | ||
const result = row.get('result'); | ||
if (resultDF === undefined) | ||
resultDF = df; | ||
else | ||
resultDF = resultDF.append(df); | ||
if (row['skipped']) { | ||
verboseSkipped += `Test result : Skipped : ${time} : ${category}: ${testName} : ${result}\n`; | ||
countSkipped += 1; | ||
} | ||
else if (row['success']) { | ||
verbosePassed += `Test result : Success : ${time} : ${category}: ${testName} : ${result}\n`; | ||
countPassed += 1; | ||
} | ||
else { | ||
verboseFailed += `Test result : Failed : ${time} : ${category}: ${testName} : ${result}\n`; | ||
countFailed += 1; | ||
failed = true; | ||
} | ||
} | ||
if (resultDF) { | ||
const bs = DG.BitSet.create(resultDF.rowCount); | ||
bs.setAll(true); | ||
for (let i = 0; i < resultDF.rowCount; i++) { | ||
if (resultDF.rows.get(i).get('category') === 'Unhandled exceptions') { | ||
bs.set(i, false); | ||
} | ||
} | ||
resultDF = resultDF.clone(bs); | ||
csv = resultDF.toCsv(); | ||
} | ||
return { | ||
failed: failed, | ||
verbosePassed: verbosePassed, | ||
verboseSkipped: verboseSkipped, | ||
verboseFailed: verboseFailed, | ||
passedAmount: countPassed, | ||
skippedAmount: countSkipped, | ||
failedAmount: countFailed, | ||
csv: csv | ||
// df: resultDF?.toJson() | ||
}; | ||
}); | ||
} | ||
} | ||
@@ -187,0 +261,0 @@ /** A proxy to a Dart `List<T>`. */ |
@@ -33,5 +33,8 @@ /** A viewer that is typically docked inside a [TableView]. */ | ||
private _meta; | ||
filter: BitSet; | ||
private _filter; | ||
/** @constructs Viewer */ | ||
constructor(dart: any, root?: HTMLElement); | ||
/** combined filter of the viewer */ | ||
get filter(): BitSet; | ||
set filter(f: BitSet); | ||
get onDataEvent(): rxjs.Observable<ViewerEvent>; | ||
@@ -265,3 +268,6 @@ get onTooltipCreated(): rxjs.Observable<ViewerEvent>; | ||
getMarkerSize(rowIdx: number): number; | ||
getMarkerSizes(): Float32Array; | ||
getMarkerType(rowIdx: number): string; | ||
getMarkerColor(rowIdx: number): number; | ||
getMarkerColors(): Uint32Array; | ||
get onZoomed(): rxjs.Observable<Rect>; | ||
@@ -310,2 +316,5 @@ get onResetView(): rxjs.Observable<null>; | ||
} | ||
export declare class ConfusionMatrix extends Viewer<interfaces.IConfusionMatrixSettings> { | ||
constructor(dart: any); | ||
} | ||
export declare class CalendarViewer extends Viewer<interfaces.ICalendarSettings> { | ||
@@ -312,0 +321,0 @@ constructor(dart: any); |
@@ -32,5 +32,13 @@ /** A viewer that is typically docked inside a [TableView]. */ | ||
super(root !== null && root !== void 0 ? root : api.grok_Viewer_Root(dart)); | ||
this.filter = BitSet.create(0); | ||
this._filter = null; | ||
this.initDartObject(dart); | ||
} | ||
/** combined filter of the viewer */ | ||
get filter() { | ||
var _a; | ||
return (_a = this._filter) !== null && _a !== void 0 ? _a : (this._filter = this.dart ? toJs(api.grok_Viewer_Get_Filter(this.dart)) : BitSet.create(0)); | ||
} | ||
set filter(f) { | ||
this._filter = f; | ||
} | ||
get onDataEvent() { return this.onEvent('d4-data-event'); } | ||
@@ -395,3 +403,6 @@ get onTooltipCreated() { return this.onEvent('d4-data-event').pipe(filter((e) => e.type == 'd4-tooltip')); } | ||
getMarkerSize(rowIdx) { return api.grok_ScatterPlotViewer_GetMarkerSize(this.dart, rowIdx); } | ||
getMarkerSizes() { return api.grok_ScatterPlotViewer_GetMarkerSizes(this.dart); } | ||
getMarkerType(rowIdx) { return api.grok_ScatterPlotViewer_GetMarkerType(this.dart, rowIdx); } | ||
getMarkerColor(rowIdx) { return api.grok_ScatterPlotViewer_GetMarkerColor(this.dart, rowIdx); } | ||
getMarkerColors() { return api.grok_ScatterPlotViewer_GetMarkerColors(this.dart); } | ||
get onZoomed() { return this.onEvent('d4-scatterplot-zoomed'); } | ||
@@ -456,2 +467,7 @@ get onResetView() { return this.onEvent('d4-scatterplot-reset-view'); } | ||
} | ||
export class ConfusionMatrix extends Viewer { | ||
constructor(dart) { | ||
super(dart); | ||
} | ||
} | ||
export class CalendarViewer extends Viewer { | ||
@@ -458,0 +474,0 @@ constructor(dart) { |
@@ -118,2 +118,3 @@ import { ViewerType, ViewType } from '../const'; | ||
static createByType(viewType: ViewType | string, options?: any): View; | ||
static fromViewAsync(getViewAsync: () => Promise<View>, ribbon?: boolean): any; | ||
get root(): HTMLElement; | ||
@@ -120,0 +121,0 @@ get type(): string; |
@@ -180,2 +180,5 @@ import { VIEW_TYPE, VIEWER } from '../const'; | ||
} | ||
static fromViewAsync(getViewAsync, ribbon = true) { | ||
return toJs(api.grok_View_FromViewAsync(getViewAsync, ribbon)); | ||
} | ||
get root() { | ||
@@ -521,2 +524,3 @@ return api.grok_View_Get_Root(this.dart); | ||
} | ||
// TODO: add static method to return browse view | ||
get localTree() { return api.grok_BrowseView_Get_LocalTree(this.dart); } | ||
@@ -523,0 +527,0 @@ get mainTree() { return api.grok_BrowseView_Get_MainTree(this.dart); } |
@@ -705,5 +705,10 @@ import { EventData, InputArgs, StreamSubscription } from "./events"; | ||
static toRgb(color: number): string; | ||
/** For RDKit molecule substruct highlight */ | ||
static hexToPercentRgb(hex: string): number[] | null; | ||
/** Returns the standard palette of the categorical colors used across all visualizations in Datagrok. */ | ||
static get categoricalPalette(): number[]; | ||
static get categoricalPalettes(): Array<number[]>; | ||
/** Returns the map of existing palettes used in Datagrok. */ | ||
static get categoricalPalettes(): { | ||
[key: string]: any; | ||
}; | ||
static scaleColor(x: number, min: number, max: number, alpha?: number, colorScheme?: number[]): number; | ||
@@ -710,0 +715,0 @@ static highlight(color: number): number; |
@@ -140,5 +140,9 @@ /** | ||
/** | ||
* Sets an update indicator on the specified element. | ||
* Example: {@link https://public.datagrok.ai/js/samples/ui/components/update-indicator} | ||
* @param {HTMLElement} element | ||
* @param {boolean} updating - whether the indicator should be shown | ||
* @param {string} message | ||
*/ | ||
export declare function setUpdateIndicator(element: HTMLElement, updating?: boolean): void; | ||
export declare function setUpdateIndicator(element: HTMLElement, updating?: boolean, message?: string): void; | ||
/** | ||
@@ -511,3 +515,3 @@ * Creates a button with the specified text, click handler, and tooltip. | ||
/** Renders preview list for the item. */ | ||
renderPreview(x: any, context?: any): Promise<View>; | ||
renderPreview(x: any, context?: any): View; | ||
/** Renders view for the item. */ | ||
@@ -514,0 +518,0 @@ renderView(x: any, context?: any): HTMLElement; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1967700
27802
2
Updated@types/react@^18.3.11
Updated@types/wu@^2.1.44
Updatedreact@^18.3.1
Updatedwu@^2.1.0