Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

datagrok-api

Package Overview
Dependencies
Maintainers
5
Versions
485
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datagrok-api - npm Package Compare versions

Comparing version 1.19.2 to 1.20.0-rc.7b0ca2ddc7e.a78a03929a1

8

package.json
{
"name": "datagrok-api",
"version": "1.19.2",
"version": "1.20.0-rc.7b0ca2ddc7e.a78a03929a1",
"description": "",
"dependencies": {
"dependencies": {
"@datagrok-libraries/chem-meta": "^1.0.12",

@@ -18,3 +18,3 @@ "@types/react": "latest",

},
"devDependencies": {
"devDependencies": {
"@types/node": "^18.11.18",

@@ -35,3 +35,3 @@ "@typescript-eslint/eslint-plugin": "^4.20.0",

},
"scripts": {
"scripts": {
"link": "npm link",

@@ -38,0 +38,0 @@ "link-all": "npm link @datagrok-libraries/chem-meta",

@@ -26,2 +26,4 @@ export declare class UsageType {

set row(x: number);
get mouseEvent(): any;
set mouseEvent(x: any);
get bitset(): any;

@@ -28,0 +30,0 @@ }

@@ -33,2 +33,5 @@ /// this file was generated automatically from d4 classes declarations

set row(x) { api.grok_ViewerEvent_Set_row(this.dart, toDart(x)); }
get mouseEvent() { return api.grok_ViewerEvent_Get_mouseEvent(this.dart); }
;
set mouseEvent(x) { api.grok_ViewerEvent_Set_mouseEvent(this.dart, toDart(x)); }
get bitset() { return api.grok_ViewerEvent_Get_bitset(this.dart); }

@@ -35,0 +38,0 @@ ;

@@ -24,2 +24,4 @@ export declare function histogram(col: any, bitset: any, flag: boolean, options?: {

static ColorCodingSchemeMin: string;
static ColorCodingMatchType: string;
static ColorCodingFallbackColor: string;
static ShowMarkersAlways: string;

@@ -38,2 +40,3 @@ static DefaultAxisType: string;

static Format: string;
static FormatFormula: string;
static TooltipType: string;

@@ -148,2 +151,4 @@ static Markup: string;

static Separators: string;
static Layout: string;
static EditorParam: string;
static Columns: string;

@@ -150,0 +155,0 @@ static Viewer: string;

@@ -26,2 +26,4 @@ /// this file was generated automatically from ddt classes declarations

Tags.ColorCodingSchemeMin = '.color-coding-scheme-min';
Tags.ColorCodingMatchType = '.color-coding-match-type';
Tags.ColorCodingFallbackColor = '.color-coding-fallback-color';
Tags.ShowMarkersAlways = '.show-markers-always';

@@ -41,2 +43,3 @@ Tags.DefaultAxisType = '.default-axis-type';

Tags.Format = 'format';
Tags.FormatFormula = '%formatFormula';
Tags.TooltipType = '.tooltip-type';

@@ -106,3 +109,5 @@ Tags.Markup = 'markup';

Tags.MultiValueSeparator = '.multi-value-separator';
/// Name to be shown in the UI
Tags.FriendlyName = 'friendlyName';
/// Whether users can rename this table from the UI
Tags.AllowRename = '.allow-rename';

@@ -196,2 +201,4 @@ /// Applies to columns or dataframes.

FuncParamOptions.Separators = 'separators';
FuncParamOptions.Layout = 'layout';
FuncParamOptions.EditorParam = 'editorParam';
/// Column filter.

@@ -198,0 +205,0 @@ /// Applies to dataframes and columns

@@ -13,2 +13,3 @@ export declare class DataSourceType {

static MariaDB: string;
static MlFlow: string;
static MongoDB: string;

@@ -43,4 +44,4 @@ static MsSql: string;

static CoreWeave: string;
static get fileDataSources(): Array<string>;
static get systemDataSources(): Array<string>;
static fileDataSources: string[];
static systemDataSources: string[];
}

@@ -47,0 +48,0 @@ import { Entity } from '../entities';

@@ -5,6 +5,2 @@ /// this file was generated automatically from grok_shared classes declarations

export class DataSourceType {
static get fileDataSources() { return api.grok_DataSourceType_Get_fileDataSources(); }
;
static get systemDataSources() { return api.grok_DataSourceType_Get_systemDataSources(); }
;
}

@@ -22,2 +18,3 @@ DataSourceType.Access = 'Access';

DataSourceType.MariaDB = 'MariaDB';
DataSourceType.MlFlow = 'MlFlow';
DataSourceType.MongoDB = 'MongoDB';

@@ -52,2 +49,4 @@ DataSourceType.MsSql = 'MS SQL';

DataSourceType.CoreWeave = 'CoreWeave';
DataSourceType.fileDataSources = ['Azure Blob', 'Dropbox', 'Files', 'GitHub', 'GoogleCloud', 'S3', 'CoreWeave', 'SharePoint'];
DataSourceType.systemDataSources = ['AWS', 'PostgresDart'];
import { Entity } from '../entities';

@@ -54,0 +53,0 @@ export class DockerImage extends Entity {

@@ -40,4 +40,4 @@ export interface SettingsInterface {

allowEventScripts: boolean;
enableStickyMeta: boolean;
autoReportExtendedLogs: boolean;
enableConnectionIndexFiles: boolean;
dateFormat: string;

@@ -52,8 +52,7 @@ integerNumberFormat: string;

apiUrl: string;
jupyterGatewayToken: string;
jupyterNotebookToken: string;
helpBaseUrl: string;
clientFuncCacheEnabled: boolean;
clientFilesCacheEnabled: boolean;
dataFrameBatchSize: number;
}
//# sourceMappingURL=xamgle.api.g.d.ts.map

@@ -130,3 +130,3 @@ /**

constructor(mode?: SKETCHER_MODE, validationFunc?: (s: string) => string | null);
createAlignHighlightInputs(key: string, inputName: string, callback: () => void): InputBase<boolean | null>;
createAlignHighlightInputs(key: string, inputName: string, callback: () => void): InputBase<boolean>;
/** In case sketcher is opened in filter panel use EXTERNAL mode*/

@@ -133,0 +133,0 @@ setExternalModeForSubstrFilter(): void;

@@ -310,3 +310,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

});
const input = ui.boolInput(inputName, true, callback);
const input = ui.input.bool(inputName, { value: true, onValueChanged: callback });
return input;

@@ -313,0 +313,0 @@ }

@@ -228,2 +228,4 @@ /** @enum {AGG} */

COLOR_CODING_SCHEME_MIN: string;
COLOR_CODING_MATCH_TYPE: string;
COLOR_CODING_FALLBACK_COLOR: string;
MARKER_CODING: string;

@@ -256,2 +258,7 @@ FORMULA_LINES: string;

};
export declare enum LINK_CLICK_BEHAVIOR {
OPEN_IN_NEW_TAB = "Open in new tab",
OPEN_IN_CONTEXT_PANEL = "Open in context panel",
CUSTOM = "Custom"
}
export declare const FUNC_TYPES: {

@@ -470,3 +477,2 @@ /** An application that gets shown in the app store.

* @typedef {string} SimilarityMetric
* @typedef {string} ColorType
* @typedef {string} DockType

@@ -499,3 +505,2 @@ *

export declare type StructureFilterType = `${STRUCTURE_FILTER_TYPE}`;
export declare type ColorType = number;
export declare type ColorCodingType = `${COLOR_CODING_TYPE}`;

@@ -502,0 +507,0 @@ export declare type MarkerCodingType = `${MARKER_TYPE}`;

@@ -246,2 +246,4 @@ /** @enum {AGG} */

COLOR_CODING_SCHEME_MIN: '.color-coding-scheme-min',
COLOR_CODING_MATCH_TYPE: '.color-coding-match-type',
COLOR_CODING_FALLBACK_COLOR: '.color-coding-fallback-color',
MARKER_CODING: '.marker-coding',

@@ -274,2 +276,8 @@ FORMULA_LINES: '.formula-lines',

};
export var LINK_CLICK_BEHAVIOR;
(function (LINK_CLICK_BEHAVIOR) {
LINK_CLICK_BEHAVIOR['OPEN_IN_NEW_TAB'] = 'Open in new tab';
LINK_CLICK_BEHAVIOR['OPEN_IN_CONTEXT_PANEL'] = 'Open in context panel';
LINK_CLICK_BEHAVIOR['CUSTOM'] = 'Custom';
})(LINK_CLICK_BEHAVIOR || (LINK_CLICK_BEHAVIOR = {}));
export const FUNC_TYPES = {

@@ -276,0 +284,0 @@ /** An application that gets shown in the app store.

@@ -34,4 +34,13 @@ import { Column, DataFrame } from "./dataframe";

randomWalk(rows?: number, columns?: number): DataFrame;
/** Demographics
* @returns {DataFrame}*/
/** Demographics:
* - subj: int
* - study: string
* - site: string
* - age: int
* - sex: string
* - race: string
* - disease: string
* - started: date
* - height: float
* - weight: float */
demog(rows?: number): DataFrame;

@@ -38,0 +47,0 @@ /** Demographics

@@ -55,9 +55,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

}
/** Demographics:
* - subj: int
* - study: string
* - site: string
* - age: int
* - sex: string
* - race: string
* - disease: string
* - started: date
* - height: float
* - weight: float */
demog(rows = 10000) { return this.getDemoTable('demog', rows); }
/** Demographics
* @returns {DataFrame}*/
demog(rows = 10000) {
return this.getDemoTable('demog', rows);
}
/** Demographics
* @returns {DataFrame}*/
molecules(rows = 10000) {

@@ -64,0 +71,0 @@ return this.getDemoTable('molecules', rows);

@@ -1,2 +0,2 @@

import { TYPE, JoinType, SemType, ColumnType, SimilarityMetric, AggregationType, CsvImportOptions, IndexPredicate, ViewerType, ColorCodingType, MarkerCodingType, ColorType, ColumnAggregationType } from "./const";
import { TYPE, JoinType, SemType, ColumnType, SimilarityMetric, AggregationType, CsvImportOptions, IndexPredicate, ViewerType, ColorCodingType, MarkerCodingType, ColumnAggregationType, LINK_CLICK_BEHAVIOR } from "./const";
import { EventData, MapChangeArgs } from "./events";

@@ -15,2 +15,3 @@ import { DartList } from "./utils";

declare type ColumnId = number | string | Column;
declare type MatchType = 'contains' | 'starts with' | 'ends with' | 'equals' | 'regex';
/** Column name -> format */

@@ -327,3 +328,2 @@ export interface ColumnsFormatCsvExportOptions {

tags: any;
private _dialogs;
private _meta;

@@ -418,2 +418,8 @@ constructor(dart: any);

static qnum(name: string, length?: number, values?: number[], exact?: boolean): Column<number>;
/** Is the column numerical (float, int, bigint, qnum)
* @type {boolean}*/
get isNumerical(): boolean;
/** Is the column categorical (string, boolean)
* @type {boolean}*/
get isCategorical(): boolean;
/** Column data type.

@@ -506,5 +512,3 @@ * @type {string} */

isNone(i: number): boolean;
/** Gets the value of the specified tag.
* @param {string} tag
* @returns {string} */
/** Returns the value of the specified tag, or null if the tag is not present. */
getTag(tag: string): string;

@@ -624,2 +628,6 @@ /** Sets a tag to the specified value.

get numerical(): Iterable<Column>;
get dateTime(): Iterable<Column>;
get numericalNoDateTime(): Iterable<Column>;
get boolean(): Iterable<Column>;
get selected(): Iterable<Column>;
/** Array containing column names. */

@@ -1262,14 +1270,18 @@ names(): string[];

/** Enables linear color-coding on a column.
* @param range - list of palette colors.
* @param range - list of palette colors (ARGB integers; see {@link Color}).
* @param options - list of additional parameters, such as the minimum/maximum value to be used for scaling.
* Use the same numeric representation as [Column.min] and [Column.max].
*/
setLinear(range?: ColorType[] | null, options?: {
setLinear(range?: number[] | null, options?: {
min?: number;
max?: number;
} | null): void;
setCategorical(colorMap?: {} | null): void;
setCategorical(colorMap?: {} | null, options?: {
fallbackColor: string | number;
matchType?: MatchType;
} | null): void;
setConditional(rules?: {
[index: string]: number | string;
} | null): void;
setDisabled(): void;
getColor(i: number): number;

@@ -1283,20 +1295,54 @@ getColors(): Uint32Array;

default(marker: MarkerCodingType): ColumnMarkerHelper;
setMarkerCoding(category: string, marker: MarkerCodingType): void;
setAll(categoryMarkerMap: {
[key: string]: MarkerCodingType;
}): ColumnMarkerHelper;
reset(): ColumnMarkerHelper;
setMarkerCoding(category: string, marker: string): void;
}
export declare class ColumnMetaHelper {
private readonly column;
private _dialogs;
private _colors;
private _markers;
constructor(column: Column);
get dialogs(): ColumnDialogHelper;
get colors(): ColumnColorHelper;
get markers(): ColumnMarkerHelper;
/** Returns the format of the dataframe column. See also [GridColumn.format] */
/** Specifies the data format of the dataframe column. See also [GridColumn.format] */
get format(): string | null;
set format(x: string | null);
/** Returns the maximum amount of significant digits detected in the column. */
get sourcePrecision(): number | null;
/** When set, uses the formula to calculate the column values. */
get formula(): string | null;
set formula(x: string | null);
/** Specifies the units of the dataframe column. */
get units(): string | null;
set units(x: string | null);
/** When set, switches the cell editor to a combo box that only allows to choose specified values.
* Applicable for string columns only.
* See also {@link autoChoices}. */
get choices(): string[] | null;
set choices(x: string[] | null);
/** 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 {@link choices}. */
get autoChoices(): boolean;
set autoChoices(x: boolean);
/** Specifies the behavior of link click (open in new tab, open in context panel, custom). Open in new tab is used by default. */
get linkClickBehavior(): LINK_CLICK_BEHAVIOR;
set linkClickBehavior(x: LINK_CLICK_BEHAVIOR);
/** Specifies whether the column is exported as part of the CSV file. Defaults to true. */
get includeInCsvExport(): boolean;
set includeInCsvExport(x: boolean);
/** Specifies whether the column is exported as part of the binary file. Defaults to true. */
get includeInBinaryExport(): boolean;
set includeInBinaryExport(x: boolean);
/** When specified, column filter treats the split strings as separate values.
* See also: https://datagrok.ai/help/visualize/viewers/filters#column-tags */
get multiValueSeparator(): string;
set multiValueSeparator(x: string);
}
export {};
//# sourceMappingURL=dataframe.d.ts.map

@@ -0,1 +1,2 @@

import * as rxjs from 'rxjs';
import { DockType } from './const';

@@ -82,3 +83,4 @@ import { Viewer } from './viewer';

findNode(element: HTMLElement): DockNode | undefined;
get onClosed(): rxjs.Observable<HTMLElement>;
}
//# sourceMappingURL=docking.d.ts.map

@@ -119,3 +119,4 @@ import { toJs } from './wrappers';

}
get onClosed() { return api.grok_DockManager_OnElementClosed(this.dart); }
}
//# sourceMappingURL=docking.js.map

@@ -84,3 +84,3 @@ import { ColumnType, ScriptLanguage, SemType, Type, TYPE, USER_STATUS } from "./const";

/** Time when entity was updated **/
get updatedOn(): dayjs.Dayjs;
get updatedOn(): dayjs.Dayjs | null;
/** Who created entity **/

@@ -448,2 +448,3 @@ get author(): User;

constructor(dart: any);
get connection(): DataConnection;
/** Returns path, i.e. `geo/dmv_offices.csv` */

@@ -463,2 +464,3 @@ get path(): string;

get isDirectory(): boolean;
get updatedOn(): dayjs.Dayjs | null;
/** @returns {Promise<string>} */

@@ -469,4 +471,4 @@ get data(): Uint8Array;

readAsBytes(): Promise<Uint8Array>;
static fromBytes(data: Uint8Array): FileInfo;
static fromString(data: string): FileInfo;
static fromBytes(path: string, data: Uint8Array): FileInfo;
static fromString(path: string, data: string): FileInfo;
}

@@ -473,0 +475,0 @@ /** @extends Entity

@@ -48,3 +48,6 @@ // noinspection JSUnusedGlobalSymbols

/** Time when entity was updated **/
get updatedOn() { return dayjs(api.grok_Entity_Get_UpdatedOn(this.dart)); }
get updatedOn() {
const d = api.grok_Entity_Get_UpdatedOn(this.dart);
return d ? dayjs(d) : null;
}
/** Who created entity **/

@@ -509,2 +512,3 @@ get author() { return toJs(api.grok_Entity_Get_Author(this.dart)); }

}
get connection() { return api.grok_FileInfo_Get_Connection(toJs(this.dart)); }
/** Returns path, i.e. `geo/dmv_offices.csv` */

@@ -524,2 +528,6 @@ get path() { return api.grok_FileInfo_Get_Path(this.dart); }

get isDirectory() { return api.grok_FileInfo_Get_IsDirectory(this.dart); }
get updatedOn() {
const d = api.grok_FileInfo_Get_UpdatedOn(this.dart);
return d ? dayjs(d) : null;
}
/** @returns {Promise<string>} */

@@ -537,7 +545,11 @@ // readAsString(): Promise<string> {

}
static fromBytes(data) {
return api.grok_FileInfo_FromBytes(data);
static fromBytes(path, data) {
if (!path)
throw new Error('Path can\'t be null or empty');
return api.grok_FileInfo_FromBytes(path, data);
}
static fromString(data) {
return api.grok_FileInfo_FromString(data);
static fromString(path, data) {
if (!path)
throw new Error('Path can\'t be null or empty');
return api.grok_FileInfo_FromString(path, data);
}

@@ -544,0 +556,0 @@ }

@@ -137,2 +137,5 @@ import * as rxjs from 'rxjs';

}
export interface InputArgs {
input: InputBase;
}
//# sourceMappingURL=events.d.ts.map

@@ -34,4 +34,5 @@ import { Type } from "./const";

eval(name: string, context?: Context): Promise<any>;
parse(command: string, safe?: boolean): any;
/** Returns a function with the specified name, or throws an error if
* there is no such function. See also {@link find}. */
* there is no such function. See also {@link find}. */
get(name: string): Promise<Func>;

@@ -38,0 +39,0 @@ /** Returns a function with the specified name, or null if not found.

@@ -120,4 +120,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

}
parse(command, safe = true) {
return toJs(api.grok_Parse_Command(command, safe));
}
/** Returns a function with the specified name, or throws an error if
* there is no such function. See also {@link find}. */
* there is no such function. See also {@link find}. */
get(name) {

@@ -124,0 +127,0 @@ return __awaiter(this, void 0, void 0, function* () {

@@ -5,6 +5,7 @@ import { Cell, Column, DataFrame, Row } from './dataframe';

import { Observable } from 'rxjs';
import { RangeSlider } from './widgets';
import { Color, RangeSlider } from './widgets';
import { SemType } from './const';
import { Property } from './entities';
import { IFormSettings, IGridSettings } from "./interfaces/d4";
export declare type ColorType = number | string;
export interface IPoint {

@@ -320,4 +321,4 @@ x: number;

/** Background column as a 4-byte ARGB number. */
get backColor(): number;
set backColor(x: number);
get backColor(): Color;
set backColor(x: Color);
/** Column format.

@@ -324,0 +325,0 @@ * Sample: {@link https://public.datagrok.ai/js/samples/grid/html-markup-cells} */

@@ -15,5 +15,5 @@ export interface IScatterPlot3dSettings {

showAxes: boolean;
xAxisType: AxisType;
yAxisType: AxisType;
zAxisType: AxisType;
xAxisType: keyof typeof AxisType;
yAxisType: keyof typeof AxisType;
zAxisType: keyof typeof AxisType;
backColor: number;

@@ -37,3 +37,3 @@ filteredRowsColor: number;

markerRandomRotation: boolean;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -49,4 +49,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -94,3 +94,3 @@ export declare enum AxisType {

outerMarginBottom: number;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -106,4 +106,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -156,4 +156,4 @@ export interface IHistogramSettings {

showCharts: boolean;
legendVisibility: VisibilityMode;
legendPosition: FlexPosition;
legendVisibility: keyof typeof VisibilityMode;
legendPosition: keyof typeof FlexPosition;
marginLeft: number;

@@ -166,3 +166,3 @@ marginTop: number;

aggTooltipColumns: string;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -177,4 +177,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -208,4 +208,4 @@ export interface IFiltersSettings {

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -221,4 +221,4 @@ export interface IScatterPlotSettings {

yColumnName: string;
xAxisType: AxisType;
yAxisType: AxisType;
xAxisType: keyof typeof AxisType;
yAxisType: keyof typeof AxisType;
invertXAxis: boolean;

@@ -240,3 +240,6 @@ invertYAxis: boolean;

showColorSelector: boolean;
colorAxisType: keyof typeof AxisType;
invertColorScheme: boolean;
colorMin: number;
colorMax: number;
size: string;

@@ -257,3 +260,3 @@ sizeColumnName: string;

labelsColumnName: string;
showLabelsFor: RowSet;
showLabelsFor: keyof typeof RowSet;
labelColorAsMarker: boolean;

@@ -291,3 +294,3 @@ showRegressionLine: boolean;

showTooltip: string;
showLabels: VisibilityMode;
showLabels: keyof typeof VisibilityMode;
dataValues: string;

@@ -299,8 +302,8 @@ rowTooltip: string;

yAxisWidth: number;
legendVisibility: VisibilityMode;
legendPosition: FlexPosition;
legendVisibility: keyof typeof VisibilityMode;
legendPosition: keyof typeof FlexPosition;
axisFont: string;
labelFont: string;
defaultRenderer: boolean;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -316,4 +319,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -332,3 +335,3 @@ export interface ILineChartSettings {

xColumnName: string;
xAxisType: AxisType;
xAxisType: keyof typeof AxisType;
segment: string;

@@ -340,3 +343,3 @@ segmentColumnName: string;

xAxisLabelOrientation: string;
xAxisTickmarksMode: AxisTickmarksMode;
xAxisTickmarksMode: keyof typeof AxisTickmarksMode;
xMin: number;

@@ -347,3 +350,3 @@ xMax: number;

yColumnNames: Array<string>;
yAxisType: AxisType;
yAxisType: keyof typeof AxisType;
showYAxis: boolean;

@@ -353,7 +356,7 @@ yGlobalScale: boolean;

y2AxisTitle: string;
yAxisTickmarksMode: AxisTickmarksMode;
yAxisTickmarksMode: keyof typeof AxisTickmarksMode;
showYSelectors: boolean;
showAggrSelectors: boolean;
showSplitSelector: boolean;
interpolation: LineInterpolationMode;
interpolation: keyof typeof LineInterpolationMode;
splineTension: number;

@@ -400,9 +403,10 @@ markerType: string;

showTooltip: string;
showLabels: VisibilityMode;
showLabels: keyof typeof VisibilityMode;
rowTooltip: string;
rowGroupTooltip: string;
legendVisibility: VisibilityMode;
legendPosition: FlexPosition;
legendVisibility: keyof typeof VisibilityMode;
legendPosition: keyof typeof FlexPosition;
addLinesToLegend: boolean;
multiAxisLegendPosition: FlexExtendedPosition;
autoAdjustMultiAxisLegendPosition: boolean;
multiAxisLegendPosition: keyof typeof FlexExtendedPosition;
innerChartMarginTop: number;

@@ -418,3 +422,3 @@ innerChartMarginBottom: number;

aggTooltipColumns: string;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -430,4 +434,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -456,5 +460,5 @@ export declare enum AxisTickmarksMode {

export interface IBarChartSettings {
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;
onClick: RowGroupAction;
onClick: keyof typeof RowGroupAction;
value: string;

@@ -467,5 +471,6 @@ valueColumnName: string;

barSortOrder: string;
axisType: AxisType;
axisType: keyof typeof AxisType;
showValueAxis: boolean;
showValueSelector: boolean;
orientation: string;
split: string;

@@ -496,3 +501,3 @@ splitColumnName: string;

barCornerRadius: number;
verticalAlign: VerticalAlignType;
verticalAlign: keyof typeof VerticalAlignType;
font: string;

@@ -509,4 +514,4 @@ axisFont: string;

barBorderLineColor: number;
legendVisibility: VisibilityMode;
legendPosition: FlexPosition;
legendVisibility: keyof typeof VisibilityMode;
legendPosition: keyof typeof FlexPosition;
outerMarginLeft: number;

@@ -529,4 +534,4 @@ outerMarginRight: number;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -551,6 +556,12 @@ export declare enum RowGroupAction {

showYAxis: boolean;
xAxisType: keyof typeof AxisType;
yAxisType: keyof typeof AxisType;
invertXAxis: boolean;
invertYAxis: boolean;
allowZoom: boolean;
binToRange: boolean;
xBins: number;
yBins: number;
backColor: number;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -566,4 +577,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -576,6 +587,6 @@ export interface IBoxPlotSettings {

showCategorySelector: boolean;
labelOrientation: TextOrientation;
labelOrientation: keyof typeof TextOrientation;
value: string;
valueColumnName: string;
axisType: AxisType;
axisType: keyof typeof AxisType;
invertYAxis: boolean;

@@ -587,7 +598,16 @@ showValueAxis: boolean;

binColorAggrType: string;
showColorSelector: boolean;
markerColor: string;
markerColorColumnName: string;
markers: string;
markersColumnName: string;
markerMinSize: number;
markerMaxSize: number;
showSizeSelector: boolean;
markerSizeColumnName: string;
markerType: string;
markerSize: number;
markerOpacity: number;
legendVisibility: keyof typeof VisibilityMode;
legendPosition: keyof typeof FlexPosition;
showMeanCross: boolean;

@@ -602,4 +622,6 @@ showLowerDash: boolean;

showMouseOverPoint: boolean;
showMouseOverRowGroup: boolean;
statistics: Array<string>;
autoLayout: boolean;
plotStyle: string;
axisFont: string;

@@ -609,6 +631,9 @@ categoryFont: string;

whiskerLineWidth: number;
interquartileLineWidth: number;
whiskerWidthRatio: number;
maxBinWidth: number;
axisUseColumnFormat: boolean;
bins: number;
whiskerColor: number;
violinWhiskerColor: number;
backColor: number;

@@ -621,5 +646,5 @@ filteredRowsColor: number;

showTooltip: string;
showLabels: VisibilityMode;
showLabels: keyof typeof VisibilityMode;
rowTooltip: string;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -635,4 +660,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -652,4 +677,4 @@ export declare enum TextOrientation {

autoLayout: boolean;
legendVisibility: VisibilityMode;
legendPosition: FlexPosition;
legendVisibility: keyof typeof VisibilityMode;
legendPosition: keyof typeof FlexPosition;
segmentAngle: string;

@@ -661,3 +686,3 @@ segmentAngleColumnName: string;

segmentLengthAggrType: string;
onClick: RowGroupAction;
onClick: keyof typeof RowGroupAction;
startAngle: number;

@@ -680,3 +705,3 @@ shift: number;

aggTooltipColumns: string;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -692,4 +717,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -706,3 +731,3 @@ export interface IMatrixPlotSettings {

innerViewerLook: any;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -718,4 +743,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -742,4 +767,4 @@ export interface ISummarySettings {

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -762,4 +787,4 @@ export interface ISparklinesSettings {

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -770,2 +795,3 @@ export interface IGridSettings {

addNewRowOnLastRowEdit: boolean;
showRemoveRowIcon: boolean;
showColumnLabels: boolean;

@@ -805,7 +831,7 @@ colHeaderHeight: number;

showCurrentCellOutline: boolean;
colorCoding: GridColorCodingType;
colorCoding: keyof typeof GridColorCodingType;
defaultCellFont: string;
maxFontSize: number;
colHeaderFont: string;
colLabelsOrientation: TextOrientation;
colLabelsOrientation: keyof typeof TextOrientation;
allowColHeaderResizing: boolean;

@@ -828,3 +854,3 @@ allowColResizing: boolean;

showTooltip: string;
showLabels: VisibilityMode;
showLabels: keyof typeof VisibilityMode;
showCellTooltip: boolean;

@@ -838,2 +864,4 @@ showVisibleColumnsInTooltip: boolean;

marginBottom: number;
heatmapHorzScroll: Array<number>;
heatmapVertScroll: Array<number>;
syncNewColumns: boolean;

@@ -847,3 +875,3 @@ colorScheme: Array<number>;

maxHeatmapColumns: number;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -858,4 +886,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -898,3 +926,3 @@ export declare enum GridColorCodingType {

evenMonthColor: number;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -910,4 +938,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -918,4 +946,4 @@ export interface ITrellisPlotSettings {

viewerType: string;
yLabelsOrientation: TextOrientation;
xLabelsOrientation: TextOrientation;
yLabelsOrientation: keyof typeof TextOrientation;
xLabelsOrientation: keyof typeof TextOrientation;
categoryLabelFont: string;

@@ -928,8 +956,8 @@ innerViewerLook: any;

showGridlines: string;
legendVisibility: VisibilityMode;
legendPosition: FlexPosition;
legendVisibility: keyof typeof VisibilityMode;
legendPosition: keyof typeof FlexPosition;
showXSelectors: boolean;
showYSelectors: boolean;
showXAxes: VisibilityMode;
showYAxes: VisibilityMode;
showXAxes: keyof typeof VisibilityMode;
showYAxes: keyof typeof VisibilityMode;
showXLabels: boolean;

@@ -944,3 +972,3 @@ showYLabels: boolean;

backColor: number;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -956,4 +984,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -979,3 +1007,3 @@ export interface IPcPlotSettings {

transformation: string;
labelsOrientation: TextOrientation;
labelsOrientation: keyof typeof TextOrientation;
backColor: number;

@@ -993,3 +1021,3 @@ selectedRowsColor: number;

horzMargin: number;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -1005,4 +1033,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -1021,3 +1049,3 @@ export interface IMapViewerSettings {

categoricalColorScheme: Array<number>;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -1033,4 +1061,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -1041,3 +1069,3 @@ export interface IStatsViewerSettings {

backColor: number;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -1053,4 +1081,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -1060,7 +1088,7 @@ export interface ICorrelationPlotSettings {

yColumnNames: Array<string>;
correlationType: CorrelationType;
correlationType: keyof typeof CorrelationType;
showPearsonR: boolean;
showTooltip: boolean;
backColor: number;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -1076,4 +1104,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -1108,4 +1136,4 @@ export declare enum CorrelationType {

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -1115,3 +1143,3 @@ export interface IMarkupViewerSettings {

content: string;
mode: TextInterpretationMode;
mode: keyof typeof TextInterpretationMode;
markupEnabled: boolean;

@@ -1127,4 +1155,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -1165,7 +1193,7 @@ export declare enum TextInterpretationMode {

autoLayout: boolean;
node1Shape: ShapeType;
node1Shape: keyof typeof ShapeType;
node1Color: number;
node1Img: string;
node1Physics: boolean;
node2Shape: ShapeType;
node2Shape: keyof typeof ShapeType;
node2Color: number;

@@ -1183,3 +1211,3 @@ node2Img: string;

useGoogleImage: boolean;
nodeShape: ShapeType;
nodeShape: keyof typeof ShapeType;
nodeImg: string;

@@ -1189,3 +1217,3 @@ nodeColor: number;

edgeWidth: number;
showArrows: ArrowType;
showArrows: keyof typeof ArrowType;
edgesPhysics: boolean;

@@ -1207,4 +1235,4 @@ selectedColor: number;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -1235,3 +1263,3 @@ export declare enum ShapeType {

caption: string;
valueSourceType: CardValueSourceType;
valueSourceType: keyof typeof CardValueSourceType;
value: string;

@@ -1248,4 +1276,4 @@ format: string;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -1270,3 +1298,3 @@ export declare enum CardValueSourceType {

lanes: Array<string>;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -1282,4 +1310,4 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}

@@ -1293,5 +1321,6 @@ export interface IPivotViewerSettings {

viewerSettings: Array<any>;
filteringEnabled: boolean;
gridLook: any;
allowViewers: boolean;
rowSource: RowSet;
rowSource: keyof typeof RowSet;
filter: string;

@@ -1307,5 +1336,5 @@ allowDynamicMenus: boolean;

onInitializedScript: string;
descriptionPosition: FlexPosition;
descriptionVisibilityMode: VisibilityMode;
descriptionPosition: keyof typeof FlexPosition;
descriptionVisibilityMode: keyof typeof VisibilityMode;
}
//# sourceMappingURL=d4.d.ts.map

@@ -19,2 +19,5 @@ export interface IUserReport {

labels: Array<string>;
options: {
[index: string]: any;
};
data: any;

@@ -21,0 +24,0 @@ friendlyName: any;

@@ -41,2 +41,5 @@ import { LOG_LEVEL } from './const';

static interceptConsoleOutput(): void;
static set autoReportOptions(options: {
[key: string]: any;
});
}

@@ -43,0 +46,0 @@ export declare class PackageLogger extends Logger {

@@ -88,2 +88,5 @@ import { LOG_LEVEL } from './const';

}
static set autoReportOptions(options) {
api.grok_Set_AutoReport_Options(toDart(options));
}
}

@@ -90,0 +93,0 @@ Logger.consoleLogs = [];

@@ -25,2 +25,3 @@ import { DataFrame } from "./dataframe";

testError(s: String): void;
reportTest(type: String, params: object): Promise<void>;
/** Current table, or null. */

@@ -40,4 +41,5 @@ get t(): DataFrame;

/** Last error state */
get lastError(): string;
set lastError(s: string);
get lastError(): Promise<string | undefined>;
set lastError(s: any);
clearLastError(): void;
/** Current user */

@@ -44,0 +46,0 @@ get user(): User;

@@ -0,1 +1,10 @@

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator['throw'](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
import { DataFrame } from './dataframe';

@@ -29,2 +38,11 @@ import { View, ViewBase } from './views/view';

}
reportTest(type, params) {
return __awaiter(this, void 0, void 0, function* () {
yield fetch(`${grok.dapi.root}/log/tests/${type}?benchmark=${window.DG.Test.isInBenchmark}`, {
method: 'POST', headers: { 'Content-Type': 'application/json' },
credentials: 'same-origin',
body: api.grok_JSON_encode(toDart(params))
});
});
}
/** Current table, or null. */

@@ -55,2 +73,3 @@ get t() {

set lastError(s) { api.grok_Set_LastError(s); }
clearLastError() { api.grok_Clear_LastError(); }
/** Current user */

@@ -57,0 +76,0 @@ get user() {

@@ -1,3 +0,4 @@

import { ColorType, MARKER_TYPE } from "./const";
import { MARKER_TYPE } from "./const";
import { Point, Rect } from "./grid";
import * as rxjs from "rxjs";
declare global {

@@ -8,3 +9,3 @@ interface CanvasRenderingContext2D {

roundRect(x: number, y: number, w: number, h: number, r: number): CanvasRenderingContext2D;
line(x1: number, y1: number, x2: number, y2: number, color: ColorType): CanvasRenderingContext2D;
line(x1: number, y1: number, x2: number, y2: number, color: number): CanvasRenderingContext2D;
/**

@@ -54,2 +55,3 @@ * Use stroke() or fill() after.

static loadJsCss(files: string[]): Promise<null>;
static streamToObservable<T = any>(dartStream: any): rxjs.Observable<T>;
}

@@ -56,0 +58,0 @@ /** A proxy to a Dart `List<T>`. */

@@ -13,2 +13,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

import { Rect } from './grid';
import * as rxjs from 'rxjs';
import { StreamSubscription } from './events';
const api = window;

@@ -174,2 +176,11 @@ HTMLCanvasElement.prototype.g2 = function () { return this.getContext('2d'); };

}
static streamToObservable(dartStream) {
return rxjs.fromEventPattern(function (handler) {
return api.grok_Stream_Listen(dartStream, function (x) {
handler(x);
});
}, function (handler, dart) {
new StreamSubscription(dart).cancel();
});
}
}

@@ -176,0 +187,0 @@ /** A proxy to a Dart `List<T>`. */

@@ -6,2 +6,3 @@ /** A viewer that is typically docked inside a [TableView]. */

import { Menu, ObjectPropertyBag, Widget, Filter } from "./widgets";
import { EventData } from "./events";
import * as rxjs from "rxjs";

@@ -15,13 +16,2 @@ import { Subscription } from "rxjs";

import { ViewerEvent } from './api/d4.api.g';
export declare class TypedEventArgs<TData> {
dart: any;
constructor(dart: any);
/** Event type id */
get type(): string;
get data(): TData;
/** Event arguments. Only applies when data is EventData */
get args(): {
[key: string]: any;
} | null;
}
/**

@@ -49,5 +39,6 @@ * Represents a {@link https://datagrok.ai/help/visualize/viewers | viewer}.

get onDataEvent(): rxjs.Observable<ViewerEvent>;
get onDataHovered(): rxjs.Observable<ViewerEvent>;
get onTooltipCreated(): rxjs.Observable<ViewerEvent>;
get onDataSelected(): rxjs.Observable<ViewerEvent>;
get onDataRowClicked(): rxjs.Observable<ViewerEvent>;
get onPropertyValueChanged(): rxjs.Observable<EventData<Property>>;
initDartObject(dart: any): void;

@@ -221,5 +212,33 @@ /** Creates a new viewer of the specified type.

}
export declare type CategoryDataArgs = {
matchCondition: {
[key: string]: any;
};
matchConditionStr: string;
options: {
[key: string]: any;
};
};
export declare type RowDataArgs = {
rowId: number;
};
export declare type LineChartLineArgs = {
chartIdx: number;
yColumnNames: string[];
yAggrTypes: string[];
};
export declare type CorrPlotCellArgs = {
column1: string;
column2: string;
value: number;
};
export declare class LineChartViewer extends Viewer<interfaces.ILineChartSettings> {
constructor(dart: any);
get activeFrame(): DataFrame;
resetView(): void;
get onAfterDrawScene(): rxjs.Observable<null>;
get onBeforeDrawScene(): rxjs.Observable<null>;
get onZoomed(): rxjs.Observable<null>;
get onLineSelected(): rxjs.Observable<EventData<LineChartLineArgs>>;
get onResetView(): rxjs.Observable<null>;
}

@@ -253,3 +272,47 @@ /** 2D scatter plot */

get onBeforeDrawScene(): rxjs.Observable<null>;
get onPointClicked(): rxjs.Observable<EventData<RowDataArgs>>;
}
export declare class HistogramViewer extends Viewer<interfaces.IHistogramSettings> {
constructor(dart: any);
get onBinsSelected(): rxjs.Observable<EventData<CategoryDataArgs>>;
get onLineSelected(): rxjs.Observable<EventData<CategoryDataArgs>>;
get onMouseOverBins(): rxjs.Observable<EventData<CategoryDataArgs>>;
get onMouseOverLine(): rxjs.Observable<EventData<CategoryDataArgs>>;
}
export declare class BarChartViewer extends Viewer<interfaces.IBarChartSettings> {
constructor(dart: any);
resetView(): void;
get onCategoryClicked(): rxjs.Observable<EventData<CategoryDataArgs>>;
get onCategoryHovered(): rxjs.Observable<EventData<CategoryDataArgs>>;
get onResetView(): rxjs.Observable<null>;
}
export declare class PieChartViewer extends Viewer<interfaces.IPieChartSettings> {
constructor(dart: any);
get onSegmentClicked(): rxjs.Observable<EventData<CategoryDataArgs>>;
}
export declare class PcPlot extends Viewer<interfaces.IPcPlotSettings> {
constructor(dart: any);
get onLineClicked(): rxjs.Observable<EventData<RowDataArgs>>;
get onLineHovered(): rxjs.Observable<EventData<RowDataArgs>>;
}
export declare class BoxPlot extends Viewer<interfaces.IBoxPlotSettings> {
constructor(dart: any);
resetView(): void;
get onResetView(): rxjs.Observable<null>;
get onAfterDrawScene(): rxjs.Observable<null>;
get onBeforeDrawScene(): rxjs.Observable<null>;
get onPointClicked(): rxjs.Observable<EventData<RowDataArgs>>;
}
export declare class CorrelationPlot extends Viewer<interfaces.ICorrelationPlotSettings> {
constructor(dart: any);
get onCorrCellClicked(): rxjs.Observable<EventData<CorrPlotCellArgs>>;
}
export declare class CalendarViewer extends Viewer<interfaces.ICalendarSettings> {
constructor(dart: any);
get onCalendarClicked(): rxjs.Observable<EventData<CategoryDataArgs>>;
}
export declare class PivotViewer extends Viewer<interfaces.IPivotViewerSettings> {
constructor(dart: any);
get onAggregationChanged(): rxjs.Observable<null>;
}
export declare class ViewerMetaHelper {

@@ -256,0 +319,0 @@ private readonly _viewer;

/** A viewer that is typically docked inside a [TableView]. */
import { TYPE, VIEWER } from './const';
import { BitSet } from './dataframe.js';
import { ObjectPropertyBag, Widget } from './widgets';
import { ObjectPropertyBag, Widget, TypedEventArgs } from './widgets';
import { _toJson, MapProxy } from './utils';

@@ -13,24 +13,2 @@ import { toJs } from './wrappers';

let api = window;
export class TypedEventArgs {
constructor(dart) {
this.dart = dart;
}
/** Event type id */
get type() {
return api.grok_TypedEventArgs_Get_Type(this.dart);
}
get data() {
let data = api.grok_TypedEventArgs_Get_Data(this.dart);
return toJs(data);
}
/** Event arguments. Only applies when data is EventData */
get args() {
var _a;
// @ts-ignore
if (!((_a = this.data) === null || _a === void 0 ? void 0 : _a.dart))
return null;
// @ts-ignore
return api.grok_EventData_Get_Args(this.data.dart);
}
}
/**

@@ -59,6 +37,7 @@ * Represents a {@link https://datagrok.ai/help/visualize/viewers | viewer}.

get onDataEvent() { return this.onEvent('d4-data-event'); }
get onDataHovered() { return this.onEvent('d4-data-event').pipe(filter((e) => e.type == 'd4-hover-event')); }
get onDataSelected() { return this.onEvent('d4-data-event').pipe(filter((e) => e.type == 'd4-select-event')); }
get onTooltipCreated() { return this.onEvent('d4-data-event').pipe(filter((e) => e.type == 'd4-tooltip')); }
get onDataSelected() { return this.onEvent('d4-data-event').pipe(filter((e) => e.type == 'd4-select')); }
/// current row clicked
get onDataRowClicked() { return this.onEvent('d4-data-event').pipe(filter((e) => e.type == 'd4-click-event')); }
get onDataRowClicked() { return this.onEvent('d4-data-event').pipe(filter((e) => e.type == 'd4-row-click')); }
get onPropertyValueChanged() { return this.onEvent('d4-property-value-changed'); }
initDartObject(dart) {

@@ -376,2 +355,10 @@ this.dart = dart;

}
resetView() {
api.grok_LineChartViewer_ResetView(this.dart);
}
get onAfterDrawScene() { return this.onEvent('d4-after-draw-scene'); }
get onBeforeDrawScene() { return this.onEvent('d4-before-draw-scene'); }
get onZoomed() { return this.onEvent('d4-linechart-zoomed'); }
get onLineSelected() { return this.onEvent('d4-linechart-line-selected'); }
get onResetView() { return this.onEvent('d4-linechart-reset-view'); }
}

@@ -414,3 +401,67 @@ /** 2D scatter plot */

get onBeforeDrawScene() { return this.onEvent('d4-before-draw-scene'); }
get onPointClicked() { return this.onEvent('d4-scatterplot-point-click'); }
}
export class HistogramViewer extends Viewer {
constructor(dart) {
super(dart);
}
get onBinsSelected() { return this.onEvent('d4-histogram-select-bins'); }
get onLineSelected() { return this.onEvent('d4-histogram-select-line'); }
get onMouseOverBins() { return this.onEvent('d4-histogram-mouse-over-bins'); }
get onMouseOverLine() { return this.onEvent('d4-histogram-mouse-over-line'); }
}
export class BarChartViewer extends Viewer {
constructor(dart) {
super(dart);
}
resetView() {
api.grok_BarChartViewer_ResetView(this.dart);
}
get onCategoryClicked() { return this.onEvent('d4-bar-chart-on-category-clicked'); }
get onCategoryHovered() { return this.onEvent('d4-bar-chart-on-category-hovered'); }
get onResetView() { return this.onEvent('d4-bar-chart-reset-view'); }
}
export class PieChartViewer extends Viewer {
constructor(dart) {
super(dart);
}
get onSegmentClicked() { return this.onEvent('d4-pie-chart-on-segment-clicked'); }
}
export class PcPlot extends Viewer {
constructor(dart) {
super(dart);
}
get onLineClicked() { return this.onEvent('d4-pc-plot-on-line-clicked'); }
get onLineHovered() { return this.onEvent('d4-pc-plot-on-line-hovered'); }
}
export class BoxPlot extends Viewer {
constructor(dart) {
super(dart);
}
resetView() {
api.grok_BoxPlotViewer_ResetView(this.dart);
}
get onResetView() { return this.onEvent('d4-boxplot-reset-view'); }
get onAfterDrawScene() { return this.onEvent('d4-after-draw-scene'); }
get onBeforeDrawScene() { return this.onEvent('d4-before-draw-scene'); }
get onPointClicked() { return this.onEvent('d4-boxplot-point-click'); }
}
export class CorrelationPlot extends Viewer {
constructor(dart) {
super(dart);
}
get onCorrCellClicked() { return this.onEvent('d4-correlation-plot-corr-cell-click'); }
}
export class CalendarViewer extends Viewer {
constructor(dart) {
super(dart);
}
get onCalendarClicked() { return this.onEvent('d4-calendar-clicked'); }
}
export class PivotViewer extends Viewer {
constructor(dart) {
super(dart);
}
get onAggregationChanged() { return this.onEvent('d4-pivot-grid-aggr-changed'); }
}
export class ViewerMetaHelper {

@@ -427,5 +478,18 @@ constructor(viewer) {

}
get storage() { return this.viewer.props['formulaLines']; }
set storage(value) { this.viewer.props['formulaLines'] = value; }
get storage() {
if (this.viewer.getOptions()['type'] === DG.VIEWER.TRELLIS_PLOT) {
let innerLook = this.viewer.props['innerViewerLook'];
return api.grok_PropMixin_GetPropertyValue(innerLook, 'formulaLines');
}
return this.viewer.props['formulaLines'];
}
set storage(value) {
if (this.viewer.getOptions()['type'] === DG.VIEWER.TRELLIS_PLOT) {
let innerLook = this.viewer.props['innerViewerLook'];
api.grok_PropMixin_SetPropertyValue(innerLook, 'formulaLines', value);
}
else
this.viewer.props['formulaLines'] = value;
}
}
//# sourceMappingURL=viewer.js.map

@@ -374,3 +374,3 @@ import { ViewerType } from '../const';

/** Sets the number of elements, and a function that renders i-th element. */
setData(length: number, renderer: any): void;
setData(length: number, renderer: (index: number) => HTMLElement): void;
/** Refreshes i-th element without refreshing the whole view */

@@ -377,0 +377,0 @@ refreshItem(i: number): void;

@@ -1,2 +0,2 @@

import { StreamSubscription } from "./events";
import { EventData, InputArgs, StreamSubscription } from "./events";
import * as rxjs from "rxjs";

@@ -6,3 +6,3 @@ import { Observable, Subscription } from "rxjs";

import { Cell, Column, DataFrame } from "./dataframe";
import { ColorType, LegendPosition, Type } from "./const";
import { LegendPosition, Type } from "./const";
import dayjs from "dayjs";

@@ -17,2 +17,13 @@ import { Dictionary, typeaheadConfig } from 'typeahead-standalone/dist/types';

import { HttpDataSource } from "./dapi";
export declare class TypedEventArgs<TData> {
dart: any;
constructor(dart: any);
/** Event type id */
get type(): string;
get data(): TData;
/** Event arguments. Only applies when data is EventData */
get args(): {
[key: string]: any;
} | null;
}
export declare type RangeSliderStyle = 'barbell' | 'lines' | 'thin_barbell';

@@ -22,2 +33,5 @@ export declare type SliderOptions = {

};
export declare type ICodeEditorOptions = {
root?: HTMLDivElement;
};
export declare type TypeAheadConfig = Omit<typeaheadConfig<Dictionary>, 'input' | 'className'>;

@@ -482,3 +496,3 @@ export declare type CodeConfig = {

constructor(dart: any);
static create(script?: string, mode?: string, placeholder?: string, root?: HTMLDivElement): CodeEditor;
static create(script?: string, mode?: string, placeholder?: string, options?: ICodeEditorOptions): CodeEditor;
append(text: string): void;

@@ -583,3 +597,3 @@ setReadOnly(value: boolean): Promise<void>;

/** Occurs when user changes any input value in a form. */
get onInputChanged(): Observable<any>;
get onInputChanged(): Observable<EventData<InputArgs>>;
/** Occurs after the form is validated, no matter whether it is valid or not. */

@@ -682,5 +696,5 @@ get onValidationCompleted(): Observable<any>;

/** Returns i-th categorical color (looping over the palette if needed) */
static getCategoricalColor(i: number): ColorType;
static getCategoricalColor(i: number): number;
/** Returns either black or white color, depending on which one would be most contrast to the specified [color]. */
static getContrastColor(color: ColorType): ColorType;
static getContrastColor(color: number): number;
/** Converts ARGB-formatted integer color to a HTML-formatted string (such as `#ffffff`). See also {@link toRgb}. */

@@ -691,6 +705,6 @@ static toHtml(color: number): string;

/** Converts ARGB-formatted integer color to a HTML-formatted string (such as `rbg(20, 46, 124)`). See also {@link toHtml. }*/
static toRgb(color: ColorType): string;
static toRgb(color: number): string;
/** Returns the standard palette of the categorical colors used across all visualizations in Datagrok. */
static get categoricalPalette(): ColorType[];
static get categoricalPalettes(): Array<ColorType[]>;
static get categoricalPalette(): number[];
static get categoricalPalettes(): Array<number[]>;
static scaleColor(x: number, min: number, max: number, alpha?: number, colorScheme?: number[]): number;

@@ -701,42 +715,42 @@ static highlight(color: number): number;

static scale(x: number, min: number, max: number): number;
static get gray(): ColorType;
static get lightLightGray(): ColorType;
static get lightGray(): ColorType;
static get darkGray(): ColorType;
static get blue(): ColorType;
static get green(): ColorType;
static get darkGreen(): ColorType;
static get black(): ColorType;
static get yellow(): ColorType;
static get white(): ColorType;
static get red(): ColorType;
static get darkRed(): ColorType;
static get maroon(): ColorType;
static get olive(): ColorType;
static get orange(): ColorType;
static get darkOrange(): ColorType;
static get lightBlue(): ColorType;
static get darkBlue(): ColorType;
static get purple(): ColorType;
static get whitesmoke(): ColorType;
static get navy(): ColorType;
static get cyan(): ColorType;
static get filteredRows(): ColorType;
static get filteredOutRows(): ColorType;
static get selectedRows(): ColorType;
static get missingValueRows(): ColorType;
static get mouseOverRows(): ColorType;
static get currentRow(): ColorType;
static get histogramBar(): ColorType;
static get barChart(): ColorType;
static get scatterPlotMarker(): ColorType;
static get scatterPlotSelection(): ColorType;
static get scatterPlotZoom(): ColorType;
static get areaSelection(): ColorType;
static get rowSelection(): ColorType;
static get colSelection(): ColorType;
static get areaZoom(): ColorType;
static get gridWarningBackground(): ColorType;
static get success(): ColorType;
static get failure(): ColorType;
static get gray(): number;
static get lightLightGray(): number;
static get lightGray(): number;
static get darkGray(): number;
static get blue(): number;
static get green(): number;
static get darkGreen(): number;
static get black(): number;
static get yellow(): number;
static get white(): number;
static get red(): number;
static get darkRed(): number;
static get maroon(): number;
static get olive(): number;
static get orange(): number;
static get darkOrange(): number;
static get lightBlue(): number;
static get darkBlue(): number;
static get purple(): number;
static get whitesmoke(): number;
static get navy(): number;
static get cyan(): number;
static get filteredRows(): number;
static get filteredOutRows(): number;
static get selectedRows(): number;
static get missingValueRows(): number;
static get mouseOverRows(): number;
static get currentRow(): number;
static get histogramBar(): number;
static get barChart(): number;
static get scatterPlotMarker(): number;
static get scatterPlotSelection(): number;
static get scatterPlotZoom(): number;
static get areaSelection(): number;
static get rowSelection(): number;
static get colSelection(): number;
static get areaZoom(): number;
static get gridWarningBackground(): number;
static get success(): number;
static get failure(): number;
}

@@ -955,2 +969,9 @@ /** Tree view node.

}
export declare class FunctionsWidget extends DartWidget {
constructor(dart: any);
/** Observes platform events with the specified eventId. */
onEvent(eventId?: string | null): rxjs.Observable<any>;
get onActionClicked(): rxjs.Observable<Func>;
get onActionPlusIconClicked(): rxjs.Observable<Func>;
}
//# sourceMappingURL=widgets.d.ts.map
import { Property } from './entities';
import { FLOAT_NULL, TYPE, TYPES_SCALAR } from './const';
import { TypedEventArgs } from './viewer';
import dayjs from 'dayjs';
import { TypedEventArgs } from './widgets';
/** Converts list of Dart objects to JavaScript objects by calling {@link toJs}

@@ -6,0 +6,0 @@ * @param {object[]} params

@@ -10,3 +10,3 @@ {

"module": "es2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
"lib": ["esnext", "dom"], /* Specify library files to be included in the compilation. */
"lib": ["es2020", "dom"], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */

@@ -13,0 +13,0 @@ // "checkJs": true, /* Report errors in .js files. */

@@ -226,8 +226,9 @@ /**

/** Shows popup with the [element] near the [anchor].
* tooltip, and popup menu.
* @param {Element} element
* @param {Element} anchor
* @param {boolean} vertical
* @returns {Element}. */
export declare function showPopup(element: HTMLElement, anchor: HTMLElement, vertical?: boolean): Element;
* tooltip, and popup menu. */
export declare function showPopup(element: HTMLElement, anchor: HTMLElement, options?: {
vertical?: boolean;
dx?: number;
dy?: number;
smart?: boolean;
}): Element;
/**

@@ -245,3 +246,3 @@ * Example: {@link https://public.datagrok.ai/js/samples/ui/components/range-slider}

* @returns {VirtualView} */
export declare function virtualView(length: number, renderer: Function, verticalScroll?: boolean, maxColumns?: number): VirtualView;
export declare function virtualView(length: number, renderer: (index: number) => HTMLElement, verticalScroll?: boolean, maxColumns?: number): VirtualView;
export declare function popupMenu(items: any): void;

@@ -277,3 +278,3 @@ /**

}
interface IInputInitOptions<T = any> {
export interface IInputInitOptions<T = any> {
value?: T;

@@ -287,3 +288,3 @@ property?: Property;

}
interface INumberInputInitOptions<T> extends IInputInitOptions<T> {
export interface INumberInputInitOptions<T> extends IInputInitOptions<T> {
min?: number;

@@ -295,9 +296,9 @@ max?: number;

}
interface IChoiceInputInitOptions<T> extends IInputInitOptions<T> {
export interface IChoiceInputInitOptions<T> extends IInputInitOptions<T> {
items?: T[];
}
interface IMultiChoiceInputInitOptions<T> extends Omit<IChoiceInputInitOptions<T>, 'value'> {
export interface IMultiChoiceInputInitOptions<T> extends Omit<IChoiceInputInitOptions<T>, 'value'> {
value?: T[];
}
interface IStringInputInitOptions<T> extends IInputInitOptions<T> {
export interface IStringInputInitOptions<T> extends IInputInitOptions<T> {
clearIcon?: boolean;

@@ -308,10 +309,10 @@ escClears?: boolean;

}
interface ITextAreaInputInitOptions<T> extends IInputInitOptions<T> {
size: Size;
export interface ITextAreaInputInitOptions<T> extends IInputInitOptions<T> {
size?: Size;
}
interface IColumnInputInitOptions<T> extends IInputInitOptions<T> {
export interface IColumnInputInitOptions<T> extends IInputInitOptions<T> {
table?: DataFrame;
filter?: Function;
}
interface IColumnsInputInitOptions<T> extends IColumnInputInitOptions<T> {
export interface IColumnsInputInitOptions<T> extends IColumnInputInitOptions<T> {
available?: string[];

@@ -326,27 +327,27 @@ checked?: string[];

export function form(source: any, props: Property[], options?: IInputInitOptions): HTMLElement;
export function int(name: string, options?: INumberInputInitOptions<number>): InputBase<number>;
export function bigInt(name: string, options?: IInputInitOptions<BigInt>): InputBase<BigInt>;
export function qNum(name: string, options?: IInputInitOptions): InputBase<number>;
export function slider(name: string, options?: INumberInputInitOptions<number>): InputBase<number>;
export function choice<T>(name: string, options?: IChoiceInputInitOptions<T>): ChoiceInput<T>;
export function multiChoice<T>(name: string, options?: IMultiChoiceInputInitOptions<T>): InputBase<T[]>;
export function int(name: string, options?: INumberInputInitOptions<number>): InputBase<number | null>;
export function bigInt(name: string, options?: IInputInitOptions<BigInt>): InputBase<BigInt | null>;
export function qNum(name: string, options?: IInputInitOptions): InputBase<number | null>;
export function slider(name: string, options?: INumberInputInitOptions<number>): InputBase<number | null>;
export function choice<T>(name: string, options?: IChoiceInputInitOptions<T>): ChoiceInput<T | null>;
export function multiChoice<T>(name: string, options?: IMultiChoiceInputInitOptions<T>): InputBase<T[] | null>;
export function string(name: string, options?: IStringInputInitOptions<string>): InputBase<string>;
export function search(name: string, options?: IStringInputInitOptions<string>): InputBase<string>;
export function float(name: string, options?: INumberInputInitOptions<number>): InputBase<number>;
export function float(name: string, options?: INumberInputInitOptions<number>): InputBase<number | null>;
export function date(name: string, options?: IInputInitOptions<dayjs.Dayjs>): DateInput;
export function map(name: string, options?: IInputInitOptions<Map<string, string>>): InputBase<Map<string, string>>;
export function map(name: string, options?: IInputInitOptions<Map<string, string>>): InputBase<Map<string, string> | null>;
export function bool(name: string, options?: IInputInitOptions<boolean>): InputBase<boolean>;
export function toggle(name: string, options?: IInputInitOptions<boolean>): InputBase<boolean>;
export function file(name: string, options?: IInputInitOptions<FileInfo>): InputBase<FileInfo>;
export function list(name: string, options?: IInputInitOptions<Array<any>>): InputBase<Array<any>>;
export function file(name: string, options?: IInputInitOptions<FileInfo>): InputBase<FileInfo | null>;
export function list(name: string, options?: IInputInitOptions<Array<any>>): InputBase<Array<any> | null>;
export function molecule(name: string, options?: IInputInitOptions<string>): InputBase<string>;
export function column(name: string, options?: IColumnInputInitOptions<Column>): InputBase<Column>;
export function column(name: string, options?: IColumnInputInitOptions<Column>): InputBase<Column | null>;
export function columns(name: string, options?: IColumnsInputInitOptions<Column[]>): InputBase<Column[]>;
export function table(name: string, options?: IChoiceInputInitOptions<DataFrame[]>): InputBase<DataFrame>;
export function table(name: string, options?: IChoiceInputInitOptions<DataFrame>): InputBase<DataFrame | null>;
export function textArea(name: string, options?: ITextAreaInputInitOptions<string>): InputBase<string>;
export function color(name: string, options?: IInputInitOptions<string>): InputBase<string>;
export function radio(name: string, options?: IChoiceInputInitOptions<string>): InputBase<string>;
export function user(name: string, options?: IInputInitOptions<User[]>): InputBase<User[]>;
export function userGroups(name: string, options?: IInputInitOptions<User[]>): InputBase<User[]>;
export function image(name: string, options?: IInputInitOptions<string>): InputBase<string>;
export function radio(name: string, options?: IChoiceInputInitOptions<string>): InputBase<string | null>;
export function user(name: string, options?: IInputInitOptions<User[]>): InputBase<User[] | null>;
export function userGroups(name: string, options?: IInputInitOptions<User[]>): InputBase<User[] | null>;
export function image(name: string, options?: IInputInitOptions<string>): InputBase<string | null>;
export function markdown(name: string): Promise<MarkdownInput>;

@@ -428,13 +429,17 @@ export function code(name: string, options?: CodeConfig): CodeInput;

static waitForElementInDom(element: HTMLElement): Promise<HTMLElement>;
static resizeFormLabels(element: HTMLElement): Promise<void>;
private static createInputRows;
private static createTempForm;
private static skipResizing;
private static calculateWidths;
private static applyStyles;
private static copyAttributesToForm;
private static adjustDialogForm;
private static adjustButtonContainer;
private static adjustForm;
private static formObserver;
private static formResizeObserver;
private static setLabelsWidth;
private static formLabelWidths;
private static formMinInputWidths;
private static formLabelMaxWidths;
private static calcWidths;
private static handleFormResize;
private static getFormId;
private static formNumber;
static resizeFormLabels(form: HTMLElement): void;
private static getInputsMinWidths;
private static getLabelsWidths;
private static getLabelWidth;
static scrollIntoViewIfNeeded(e: HTMLElement): void;
}

@@ -481,2 +486,4 @@ /** Represents a tooltip. */

get type(): string;
/** URL of help page for the object that this meta handles. */
get helpUrl(): string | null;
get name(): string;

@@ -483,0 +490,0 @@ toString(): string;

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 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 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 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 too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc