New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

datagrok-api

Package Overview
Dependencies
Maintainers
4
Versions
487
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 0.89.35 to 0.89.36

2

package.json
{
"name": "datagrok-api",
"version": "0.89.35",
"version": "0.89.36",
"description": "",

@@ -5,0 +5,0 @@ "dependencies": {

@@ -290,3 +290,3 @@

export type ColumnType = `${COLUMN_TYPE}`;
export type ViewerType = `${VIEWER}`;
export type ViewerType = `${VIEWER}` | string;
export type ObjectType = string;

@@ -293,0 +293,0 @@ export type ViewerPropertyType = string;

@@ -183,3 +183,3 @@ import { DataFrame } from './dataframe';

let value = Math.floor(Math.random() * categories.length);
if (!check(categories[value]))
if (categories[value] && !check(categories[value]))
return false;

@@ -186,0 +186,0 @@ }

@@ -213,3 +213,3 @@ import {DataFrame, Column} from "./dataframe";

let value = Math.floor(Math.random() * categories.length);
if (!check(categories[value]))
if (categories[value] && !check(categories[value]))
return false;

@@ -216,0 +216,0 @@ }

@@ -531,3 +531,3 @@ import * as rxjs from 'rxjs';

return new Proxy(this, {
set(target, name:string, value) {
set(target, name: string, value) {
if (target.hasOwnProperty(name)) {

@@ -1162,2 +1162,3 @@ Object.entries(target)[<any>name] = value;

private readonly table: any;
constructor(table: DataFrame, d: any) {

@@ -1257,3 +1258,3 @@ /** @member {DataFrame} */

constructor(d: any) {
constructor(d: any) {
this.d = d;

@@ -1260,0 +1261,0 @@ }

@@ -24,50 +24,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

* @type {string} */
get id() {
return api.grok_Entity_Get_Id(this.d);
}
set id(x) {
api.grok_Entity_Set_Id(this.d, x);
}
get id() { return api.grok_Entity_Get_Id(this.d); }
set id(x) { api.grok_Entity_Set_Id(this.d, x); }
/** Entity friendly name
* @type {string} */
get friendlyName() {
return api.grok_Entity_Get_FriendlyName(this.d);
}
set friendlyName(x) {
api.grok_Entity_Set_FriendlyName(this.d, x);
}
/** Entity short name
* @type {string} */
get name() {
return api.grok_Entity_Get_Name(this.d);
}
set name(x) {
api.grok_Entity_Set_Name(this.d, x);
}
/** Entity full-qualified name
* @type {string} */
get nqName() {
return api.grok_Entity_Get_nqName(this.d);
}
/** Entity path
* @type {string} */
get path() {
return api.grok_Entity_Path(this.d);
}
/** Returns entity properties
* @returns {Promise<Map>} props */
get friendlyName() { return api.grok_Entity_Get_FriendlyName(this.d); }
set friendlyName(x) { api.grok_Entity_Set_FriendlyName(this.d, x); }
/** Entity short name */
get name() { return api.grok_Entity_Get_Name(this.d); }
set name(x) { api.grok_Entity_Set_Name(this.d, x); }
/** Entity full-qualified name */
get nqName() { return api.grok_Entity_Get_nqName(this.d); }
/** Entity path */
get path() { return api.grok_Entity_Path(this.d); }
/** Entity properties */
getProperties() {
return new Promise((resolve, reject) => api.grok_EntitiesDataSource_GetProperties(grok.dapi.entities.s, this.d, (p) => resolve(p), (e) => reject(e)));
}
/** Allows to set properties for entity
* @param {Map} props
* @returns Promise */
/** Sets entity properties */
setProperties(props) {
return new Promise((resolve, reject) => api.grok_EntitiesDataSource_SetProperties(grok.dapi.entities.s, this.d, props, (_) => resolve(_), (e) => reject(e)));
}
/** Returns a string representing the object
* @returns {string} */
toString() {
return api.grok_Object_ToString(this.d);
}
/** Returns a string representing the object */
toString() { return api.grok_Object_ToString(this.d); }
}

@@ -83,53 +58,21 @@ /**

}
static fromId(id) {
return new User(api.grok_User_From_Id(id));
}
static current() {
return new User(api.grok_User());
}
/** First name
* @type {string} */
get firstName() {
return api.grok_User_Get_FirstName(this.d);
}
/** Last name
* @type {string} */
get lastName() {
return api.grok_User_Get_LastName(this.d);
}
/** Email
* @type {string} */
get email() {
return api.grok_User_Get_Email(this.d);
}
/** Picture URL
* @type {string} */
get picture() {
return api.grok_User_Get_Picture(this.d);
}
/** User home project
* @type {Project} */
get project() {
return toJs(api.grok_User_Get_Project(this.d));
}
/** User home folder connection
* @type {Project} */
get home() {
return toJs(api.grok_User_Get_Storage(this.d));
}
/** Login
* @type {string} */
get login() {
return api.grok_User_Get_Login(this.d);
}
/** */
toMarkup() {
return api.grok_User_ToMarkup(this.d);
}
/** Security Group
* @type Group
*/
get group() {
return toJs(api.grok_User_Get_Group(this.d));
}
static fromId(id) { return new User(api.grok_User_From_Id(id)); }
static current() { return new User(api.grok_User()); }
/** First name */
get firstName() { return api.grok_User_Get_FirstName(this.d); }
/** Last name */
get lastName() { return api.grok_User_Get_LastName(this.d); }
/** Email */
get email() { return api.grok_User_Get_Email(this.d); }
/** Picture URL */
get picture() { return api.grok_User_Get_Picture(this.d); }
/** User home project */
get project() { return toJs(api.grok_User_Get_Project(this.d)); }
/** User home folder connection */
get home() { return toJs(api.grok_User_Get_Storage(this.d)); }
/** Login */
get login() { return api.grok_User_Get_Login(this.d); }
toMarkup() { return api.grok_User_ToMarkup(this.d); }
/** Security Group */
get group() { return toJs(api.grok_User_Get_Group(this.d)); }
}

@@ -145,25 +88,10 @@ /**

}
/** Entity ID (GUID)
* @type {string} */
get id() {
return api.grok_Entity_Get_Id(this.d);
}
set id(x) {
api.grok_Entity_Set_Id(this.d, x);
}
/** Login
* @type {string} */
get type() {
return api.grok_UserSession_Get_Type(this.d);
}
/** External Token
* @type {string} */
get externalToken() {
return api.grok_UserSession_Get_ExternalToken(this.d);
}
/** User
* @type {User} */
get user() {
return toJs(api.grok_UserSession_Get_User(this.d));
}
/** Entity ID (GUID) */
get id() { return api.grok_Entity_Get_Id(this.d); }
set id(x) { api.grok_Entity_Set_Id(this.d, x); }
get type() { return api.grok_UserSession_Get_Type(this.d); }
/** External Token */
get externalToken() { return api.grok_UserSession_Get_ExternalToken(this.d); }
/** User */
get user() { return toJs(api.grok_UserSession_Get_User(this.d)); }
}

@@ -192,20 +120,9 @@ /** Represents a function

}
/** Project description
* @type {string} */
get description() {
return api.grok_Project_Description(this.d);
}
/** Project changes flag
* @type {string} */
get isDirty() {
return api.grok_Project_IsDirty(this.d);
}
/** Project is empty flag
* @type {string} */
get isEmpty() {
return api.grok_Project_IsEmpty(this.d);
}
toMarkup() {
return api.grok_Project_ToMarkup(this.d);
}
/** Project description */
get description() { return api.grok_Project_Description(this.d); }
/** Project changes flag */
get isDirty() { return api.grok_Project_IsDirty(this.d); }
/** Project is empty flag */
get isEmpty() { return api.grok_Project_IsEmpty(this.d); }
toMarkup() { return api.grok_Project_ToMarkup(this.d); }
}

@@ -221,7 +138,4 @@ /** Represents a data query

}
/** Query text
* @type {string} */
get query() {
return api.grok_Query_Query(this.d);
}
/** Query text */
get query() { return api.grok_Query_Query(this.d); }
}

@@ -247,7 +161,4 @@ /** Represents a data job

}
/** Collection of parameters: server, database, endpoint, etc.
* @type {object} */
get parameters() {
return api.grok_DataConnection_Parameters(this.d);
}
/** Collection of parameters: server, database, endpoint, etc. */
get parameters() { return api.grok_DataConnection_Parameters(this.d); }
}

@@ -278,18 +189,8 @@ /** Represents a predictive model

}
/** Environment name
* @type {string} */
get environment() {
return api.grok_Notebook_Get_Environment(this.d);
}
set environment(e) {
api.grok_Notebook_Set_Environment(this.d, e);
}
/** Description
* @type {string} */
get description() {
return api.grok_Notebook_Get_Description(this.d);
}
set description(e) {
api.grok_Notebook_Set_Description(this.d, e);
}
/** Environment name */
get environment() { return api.grok_Notebook_Get_Environment(this.d); }
set environment(e) { api.grok_Notebook_Set_Environment(this.d, e); }
/** Description */
get description() { return api.grok_Notebook_Get_Description(this.d); }
set description(e) { api.grok_Notebook_Set_Description(this.d, e); }
/** Converts Notebook to HTML code

@@ -319,26 +220,12 @@ * @returns {Promise<string>} */

}
/** Returns path, i.e. `geo/dmv_offices.csv`
* @type {string} */
get path() {
return api.grok_FileInfo_Get_Path(this.d);
}
/** Returns full path, i.e. `Demo:TestJobs:Files:DemoFiles/geo/dmv_offices.csv`
* @type {string} */
get fullPath() {
return api.grok_FileInfo_Get_FullPath(this.d);
}
/** Returns file extension, i.e. `csv`
* @type {string} */
get extension() {
return api.grok_FileInfo_Get_Extension(this.d);
}
/** Returns file name, i.e. `dmv_offices.csv`
* @type {string} */
get fileName() {
return api.grok_FileInfo_Get_FileName(this.d);
}
/** @returns {string} */
get url() {
return api.grok_FileInfo_Get_Url(this.d);
}
/** Returns path, i.e. `geo/dmv_offices.csv` */
get path() { return api.grok_FileInfo_Get_Path(this.d); }
/** Returns full path, i.e. `Demo:TestJobs:Files:DemoFiles/geo/dmv_offices.csv` */
get fullPath() { return api.grok_FileInfo_Get_FullPath(this.d); }
/** Returns file extension, i.e. `csv` */
get extension() { return api.grok_FileInfo_Get_Extension(this.d); }
/** Returns file name, i.e. `dmv_offices.csv` */
get fileName() { return api.grok_FileInfo_Get_FileName(this.d); }
/** Returns file URL */
get url() { return api.grok_FileInfo_Get_Url(this.d); }
/** @returns {Promise<string>} */

@@ -361,71 +248,39 @@ readAsString() {

}
static create(name) {
return new Group(api.grok_Group(name));
}
static create(name) { return new Group(api.grok_Group(name)); }
/** Adds a member to the group
* @param {Group} m */
addMember(m) {
api.grok_Group_Add_Member(this.d, m.d, false);
}
addMember(m) { api.grok_Group_Add_Member(this.d, m.d, false); }
/** Adds an admin member to the group
* @param {Group} m */
addAdminMember(m) {
api.grok_Group_Add_Member(this.d, m.d, true);
}
addAdminMember(m) { api.grok_Group_Add_Member(this.d, m.d, true); }
/** Removes a member from the group
* @param {Group} m */
removeMember(m) {
api.grok_Group_Remove_Member(this.d, m.d);
}
removeMember(m) { api.grok_Group_Remove_Member(this.d, m.d); }
/** Adds the group to another one
* @param {Group} m */
includeTo(m) {
api.grok_Group_Add_Membership(this.d, m.d, false);
}
includeTo(m) { api.grok_Group_Add_Membership(this.d, m.d, false); }
/** Adds the group to another one as an admin
* @param {Group} m */
includeAdminTo(m) {
api.grok_Group_Add_Membership(this.d, m.d, true);
}
includeAdminTo(m) { api.grok_Group_Add_Membership(this.d, m.d, true); }
/** Removes membership from another group
* @param {Group} m */
excludeFrom(m) {
api.grok_Group_Remove_Membership(this.d, m.d);
}
excludeFrom(m) { api.grok_Group_Remove_Membership(this.d, m.d); }
/** Returns list of groups that belong to group, with no admin permissions
* @type {Array<Group>} */
get members() {
return toJs(api.grok_Group_Get_Members(this.d, false));
}
get members() { return toJs(api.grok_Group_Get_Members(this.d, false)); }
/** Returns list of groups that belong to group, with admin permissions
* @type {Array<Group>} */
get adminMembers() {
return toJs(api.grok_Group_Get_Members(this.d, true));
}
get adminMembers() { return toJs(api.grok_Group_Get_Members(this.d, true)); }
/** Returns list of groups that group belongs to, with no admin permissions
* @type {Array<Group>} */
get memberships() {
return toJs(api.grok_Group_Get_Memberships(this.d, false));
}
get memberships() { return toJs(api.grok_Group_Get_Memberships(this.d, false)); }
/** Returns list of groups that group belongs to, with admin permissions
* @type {list<Group>} */
get adminMemberships() {
return toJs(api.grok_Group_Get_Memberships(this.d, true));
}
/** Personal user group
* @type {boolean} */
get personal() {
return api.grok_Group_Get_Personal(this.d);
}
set personal(e) {
api.grok_Group_Set_Personal(this.d, e);
}
/** Hidden group
* @type {boolean} */
get hidden() {
return api.grok_Group_Get_Hidden(this.d);
}
set hidden(e) {
api.grok_Group_Set_Hidden(this.d, e);
}
get adminMemberships() { return toJs(api.grok_Group_Get_Memberships(this.d, true)); }
/** Personal user group */
get personal() { return api.grok_Group_Get_Personal(this.d); }
set personal(e) { api.grok_Group_Set_Personal(this.d, e); }
/** Hidden group */
get hidden() { return api.grok_Group_Get_Hidden(this.d); }
set hidden(e) { api.grok_Group_Set_Hidden(this.d, e); }
}

@@ -440,13 +295,6 @@ /** @extends Func

}
static create(script) {
return new Script(api.grok_Script_Create(script));
}
/** Script
* @type {string} */
get script() {
return api.grok_Script_GetScript(this.d);
}
set script(s) {
api.grok_Script_SetScript(this.d, s);
}
static create(script) { return new Script(api.grok_Script_Create(script)); }
/** Script */
get script() { return api.grok_Script_GetScript(this.d); }
set script(s) { api.grok_Script_SetScript(this.d, s); }
}

@@ -462,7 +310,4 @@ /** Represents connection credentials

}
/** Collection of parameters: login, password, API key, etc.
* @type {object} */
get parameters() {
return api.grok_Credentials_Parameters(this.d);
}
/** Collection of parameters: login, password, API key, etc. */
get parameters() { return api.grok_Credentials_Parameters(this.d); }
}

@@ -481,7 +326,4 @@ /** Represents a script environment */

}
/** Environment yaml file content
* @type {string} */
get environment() {
return api.grok_ScriptEnvironment_Environment(this.d);
}
/** Environment yaml file content */
get environment() { return api.grok_ScriptEnvironment_Environment(this.d); }
/** Setup environment */

@@ -496,7 +338,4 @@ setup() {

}
/** Friendly name of the event type
* @type {string} */
get name() {
return api.grok_LogEventType_Get_Name(this.d);
}
/** Friendly name of the event type */
get name() { return api.grok_LogEventType_Get_Name(this.d); }
}

@@ -507,32 +346,16 @@ export class LogEvent extends Entity {

}
/** Description of the event
* @type {string} */
get description() {
return api.grok_LogEvent_Get_Description(this.d);
}
/** Friendly name of the event
* @type {string} */
get name() {
return api.grok_LogEvent_Get_Name(this.d);
}
/** Source of the event
* @type {string} */
get source() {
return api.grok_LogEvent_Get_Source(this.d);
}
/** Session id of the event
* @type {UserSession} */
get session() {
return toJs(api.grok_LogEvent_Get_Session(this.d));
}
/** Description of the event */
get description() { return api.grok_LogEvent_Get_Description(this.d); }
/** Friendly name of the event */
get name() { return api.grok_LogEvent_Get_Name(this.d); }
/** Source of the event */
get source() { return api.grok_LogEvent_Get_Source(this.d); }
/** Session id of the event */
get session() { return toJs(api.grok_LogEvent_Get_Session(this.d)); }
/** Parameters of the event
* @type {Array<LogEventParameterValue>} */
get parameters() {
return api.grok_LogEvent_Get_Parameters(this.d);
}
get parameters() { return api.grok_LogEvent_Get_Parameters(this.d); }
/** Type of the event
* @type {LogEventType} */
get eventType() {
return toJs(api.grok_LogEvent_Get_Type(this.d));
}
get eventType() { return toJs(api.grok_LogEvent_Get_Type(this.d)); }
}

@@ -543,27 +366,12 @@ export class LogEventParameter extends Entity {

}
/** Name of the parameter
* @type {string} */
get name() {
return api.grok_LogEventParameter_Get_Name(this.d);
}
/** Type of the parameter
* @type {string} */
get type() {
return api.grok_LogEventParameter_Get_Type(this.d);
}
/** Description of the parameter
* @type {string} */
get description() {
return api.grok_LogEventParameter_Get_Description(this.d);
}
/** Is the parameter input
* @type {Boolean} */
get isInput() {
return api.grok_LogEventParameter_Get_IsInput(this.d);
}
/** Is the parameter optional
* @type {Boolean} */
get isOptional() {
return api.grok_LogEventParameter_Get_IsOptional(this.d);
}
/** Name of the parameter */
get name() { return api.grok_LogEventParameter_Get_Name(this.d); }
/** Type of the parameter */
get type() { return api.grok_LogEventParameter_Get_Type(this.d); }
/** Description of the parameter */
get description() { return api.grok_LogEventParameter_Get_Description(this.d); }
/** Is the parameter input */
get isInput() { return api.grok_LogEventParameter_Get_IsInput(this.d); }
/** Is the parameter optional */
get isOptional() { return api.grok_LogEventParameter_Get_IsOptional(this.d); }
}

@@ -604,7 +412,4 @@ export class LogEventParameterValue extends Entity {

* It is guaranteed to get called exactly once before the execution of any function below.
* */
/*async*/
init() {
return Promise.resolve(null);
}
*/
init() { return Promise.resolve(null); }
/** Package short name

@@ -624,3 +429,3 @@ * @type {string} */

}
/** load package
/** Loads package
* @returns {Promise<Package>} */

@@ -662,64 +467,28 @@ load() {

* @returns {PropertyGetter} */
get get() {
return api.grok_Property_Get_Get(this.d);
}
/** @param {PropertyGetter} x */
set get(x) {
api.grok_Property_Set_Get(this.d, x);
}
get set() {
return api.grok_Property_Get_Set(this.d);
}
set set(x) {
api.grok_Property_Set_Set(this.d, x);
}
/** Property name
* @type {string} */
get name() {
return api.grok_Property_Get_Name(this.d);
}
set name(s) {
api.grok_Property_Set_Name(this.d, s);
}
/** Property type
* @type {string} */
get propertyType() {
return api.grok_Property_Get_PropertyType(this.d);
}
set propertyType(s) {
api.grok_Property_Set_PropertyType(this.d, s);
}
/** Semantic type
* @type {string} */
get semType() {
return api.grok_Property_Get_SemType(this.d);
}
set semType(s) {
api.grok_Property_Set_SemType(this.d, s);
}
get get() { return api.grok_Property_Get_Get(this.d); }
set get(x) { api.grok_Property_Set_Get(this.d, x); }
/** Property setter */
get set() { return api.grok_Property_Get_Set(this.d); }
set set(x) { api.grok_Property_Set_Set(this.d, x); }
/** Property name */
get name() { return api.grok_Property_Get_Name(this.d); }
set name(s) { api.grok_Property_Set_Name(this.d, s); }
/** Property type */
get propertyType() { return api.grok_Property_Get_PropertyType(this.d); }
set propertyType(s) { api.grok_Property_Set_PropertyType(this.d, s); }
/** Semantic type */
get semType() { return api.grok_Property_Get_SemType(this.d); }
set semType(s) { api.grok_Property_Set_SemType(this.d, s); }
/** Description */
get description() {
return api.grok_Property_Get_Description(this.d);
}
set description(s) {
api.grok_Property_Set_Description(this.d, s);
}
get description() { return api.grok_Property_Get_Description(this.d); }
set description(s) { api.grok_Property_Set_Description(this.d, s); }
/** Default value */
get defaultValue() {
return api.grok_Property_Get_DefaultValue(this.d);
}
set defaultValue(s) {
api.grok_Property_Set_DefaultValue(this.d, s);
}
get defaultValue() { return api.grok_Property_Get_DefaultValue(this.d); }
set defaultValue(s) { api.grok_Property_Set_DefaultValue(this.d, s); }
/** List of possible values of that property.
* PropertyGrid will use it to populate combo boxes.
* @returns ArrayList<string>*/
get choices() {
return api.grok_Property_Get_Choices(this.d);
}
set choices(x) {
api.grok_Property_Set_Choices(this.d, x);
}
/** Column type filter
* @type {string}*/
* @returns {Array<string>} */
get choices() { return api.grok_Property_Get_Choices(this.d); }
set choices(x) { api.grok_Property_Set_Choices(this.d, x); }
/** Column type filter */
get columnFilter() {

@@ -766,22 +535,2 @@ return api.grok_Property_Get_ColumnTypeFilter(this.d);

}
export class SemanticValue {
constructor(d) {
this.d = d;
}
static fromValueType(value, semType) {
return new SemanticValue(api.grok_SemanticValue(value, semType));
}
get value() {
return api.grok_SemanticValue_Get_Value(this.d);
}
set value(x) {
api.grok_SemanticValue_Set_Value(this.d, x);
}
get semType() {
return api.grok_SemanticValue_Get_SemType(this.d);
}
set semType(x) {
api.grok_SemanticValue_Set_SemType(this.d, x);
}
}
export class DateTime {

@@ -788,0 +537,0 @@ constructor(d) {

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

import {SemType, Type, TYPE} from "./const";
import {ColumnType, SemType, Type, TYPE} from "./const";
import { FuncCall } from "./functions";
import {toJs} from "./wrappers";

@@ -25,60 +26,33 @@

* @type {string} */
get id() {
return api.grok_Entity_Get_Id(this.d);
}
get id(): string { return api.grok_Entity_Get_Id(this.d); }
set id(x: string) { api.grok_Entity_Set_Id(this.d, x); }
set id(x) {
api.grok_Entity_Set_Id(this.d, x);
}
/** Entity friendly name
* @type {string} */
get friendlyName() {
return api.grok_Entity_Get_FriendlyName(this.d);
}
get friendlyName(): string { return api.grok_Entity_Get_FriendlyName(this.d); }
set friendlyName(x: string) { api.grok_Entity_Set_FriendlyName(this.d, x); }
set friendlyName(x) {
api.grok_Entity_Set_FriendlyName(this.d, x);
}
/** Entity short name */
get name(): string { return api.grok_Entity_Get_Name(this.d); }
set name(x: string) { api.grok_Entity_Set_Name(this.d, x); }
/** Entity short name
* @type {string} */
get name() {
return api.grok_Entity_Get_Name(this.d);
}
/** Entity full-qualified name */
get nqName(): string { return api.grok_Entity_Get_nqName(this.d); }
set name(x) {
api.grok_Entity_Set_Name(this.d, x);
}
/** Entity path */
get path(): string { return api.grok_Entity_Path(this.d); }
/** Entity full-qualified name
* @type {string} */
get nqName() {
return api.grok_Entity_Get_nqName(this.d);
}
/** Entity path
* @type {string} */
get path() {
return api.grok_Entity_Path(this.d);
}
/** Returns entity properties
* @returns {Promise<Map>} props */
getProperties() {
/** Entity properties */
getProperties(): Promise<Map<string, any>> {
return new Promise((resolve, reject) => api.grok_EntitiesDataSource_GetProperties(grok.dapi.entities.s, this.d, (p: any) => resolve(p), (e: any) => reject(e)));
}
/** Allows to set properties for entity
* @param {Map} props
* @returns Promise */
setProperties(props: Map<string, any>) {
/** Sets entity properties */
setProperties(props: Map<string, any>): Promise<any> {
return new Promise((resolve, reject) => api.grok_EntitiesDataSource_SetProperties(grok.dapi.entities.s, this.d, props, (_: any) => resolve(_), (e: any) => reject(e)));
}
/** Returns a string representing the object
* @returns {string} */
toString() {
return api.grok_Object_ToString(this.d);
}
/** Returns a string representing the object */
toString(): string { return api.grok_Object_ToString(this.d); }
}

@@ -96,63 +70,31 @@

static fromId(id: string) {
return new User(api.grok_User_From_Id(id));
}
static fromId(id: string): User { return new User(api.grok_User_From_Id(id)); }
static current() {
return new User(api.grok_User());
}
static current(): User { return new User(api.grok_User()); }
/** First name
* @type {string} */
get firstName() {
return api.grok_User_Get_FirstName(this.d);
}
/** First name */
get firstName(): string { return api.grok_User_Get_FirstName(this.d); }
/** Last name
* @type {string} */
get lastName() {
return api.grok_User_Get_LastName(this.d);
}
/** Last name */
get lastName(): string { return api.grok_User_Get_LastName(this.d); }
/** Email
* @type {string} */
get email() {
return api.grok_User_Get_Email(this.d);
}
/** Email */
get email(): string | null { return api.grok_User_Get_Email(this.d); }
/** Picture URL
* @type {string} */
get picture() {
return api.grok_User_Get_Picture(this.d);
}
/** Picture URL */
get picture(): string | object { return api.grok_User_Get_Picture(this.d); }
/** User home project
* @type {Project} */
get project() {
return toJs(api.grok_User_Get_Project(this.d));
}
/** User home project */
get project(): Project { return toJs(api.grok_User_Get_Project(this.d)); }
/** User home folder connection
* @type {Project} */
get home() {
return toJs(api.grok_User_Get_Storage(this.d));
}
/** User home folder connection */
get home(): DataConnection { return toJs(api.grok_User_Get_Storage(this.d)); }
/** Login
* @type {string} */
get login() {
return api.grok_User_Get_Login(this.d);
}
/** Login */
get login(): string { return api.grok_User_Get_Login(this.d); }
/** */
toMarkup() {
return api.grok_User_ToMarkup(this.d);
}
toMarkup(): string { return api.grok_User_ToMarkup(this.d); }
/** Security Group
* @type Group
*/
get group() {
return toJs(api.grok_User_Get_Group(this.d))
}
/** Security Group */
get group(): Group { return toJs(api.grok_User_Get_Group(this.d)); }
}

@@ -171,29 +113,13 @@

/** Entity ID (GUID)
* @type {string} */
get id() {
return api.grok_Entity_Get_Id(this.d);
}
/** Entity ID (GUID) */
get id(): string { return api.grok_Entity_Get_Id(this.d); }
set id(x: string) { api.grok_Entity_Set_Id(this.d, x); }
set id(x) {
api.grok_Entity_Set_Id(this.d, x);
}
get type(): string { return api.grok_UserSession_Get_Type(this.d); }
/** Login
* @type {string} */
get type() {
return api.grok_UserSession_Get_Type(this.d);
}
/** External Token */
get externalToken(): string { return api.grok_UserSession_Get_ExternalToken(this.d); }
/** External Token
* @type {string} */
get externalToken() {
return api.grok_UserSession_Get_ExternalToken(this.d);
}
/** User
* @type {User} */
get user() {
return toJs(api.grok_UserSession_Get_User(this.d));
}
/** User */
get user(): User { return toJs(api.grok_UserSession_Get_User(this.d)); }
}

@@ -214,3 +140,3 @@

* @returns {FuncCall} */
prepare(parameters = {}) {
prepare(parameters: object = {}): FuncCall {
return toJs(api.grok_Func_Prepare(this.d, parameters));

@@ -226,23 +152,12 @@ };

/** Project description
* @type {string} */
get description() {
return api.grok_Project_Description(this.d);
}
/** Project description */
get description(): string { return api.grok_Project_Description(this.d); }
/** Project changes flag
* @type {string} */
get isDirty() {
return api.grok_Project_IsDirty(this.d);
}
/** Project changes flag */
get isDirty(): boolean { return api.grok_Project_IsDirty(this.d); }
/** Project is empty flag
* @type {string} */
get isEmpty() {
return api.grok_Project_IsEmpty(this.d);
}
/** Project is empty flag */
get isEmpty(): boolean { return api.grok_Project_IsEmpty(this.d); }
toMarkup() {
return api.grok_Project_ToMarkup(this.d);
}
toMarkup(): string { return api.grok_Project_ToMarkup(this.d); }
}

@@ -260,7 +175,4 @@

/** Query text
* @type {string} */
get query() {
return api.grok_Query_Query(this.d);
}
/** Query text */
get query(): string { return api.grok_Query_Query(this.d); }
}

@@ -289,7 +201,4 @@

/** Collection of parameters: server, database, endpoint, etc.
* @type {object} */
get parameters() {
return api.grok_DataConnection_Parameters(this.d);
}
/** Collection of parameters: server, database, endpoint, etc. */
get parameters(): object { return api.grok_DataConnection_Parameters(this.d); }
}

@@ -320,29 +229,17 @@

* @returns {Promise<string>} Current notebook's name */
edit() {
edit(): Promise<string> {
return new Promise((resolve, reject) => api.grok_Notebook_Edit(this.d, (f: any) => resolve(f), (e: any) => reject(e)));
}
/** Environment name
* @type {string} */
get environment() {
return api.grok_Notebook_Get_Environment(this.d);
}
/** Environment name */
get environment(): string { return api.grok_Notebook_Get_Environment(this.d); }
set environment(e: string) { api.grok_Notebook_Set_Environment(this.d, e); }
set environment(e) {
api.grok_Notebook_Set_Environment(this.d, e);
}
/** Description */
get description(): string { return api.grok_Notebook_Get_Description(this.d); }
set description(e: string) { api.grok_Notebook_Set_Description(this.d, e); }
/** Description
* @type {string} */
get description() {
return api.grok_Notebook_Get_Description(this.d);
}
set description(e) {
api.grok_Notebook_Set_Description(this.d, e);
}
/** Converts Notebook to HTML code
* @returns {Promise<string>} */
toHtml() {
toHtml(): Promise<string> {
return new Promise((resolve, reject) => api.grok_Notebook_ToHtml(this.d, (html: any) => resolve(html), (e: any) => reject(e)));

@@ -372,33 +269,19 @@ }

/** Returns path, i.e. `geo/dmv_offices.csv`
* @type {string} */
get path() {
return api.grok_FileInfo_Get_Path(this.d);
}
/** Returns path, i.e. `geo/dmv_offices.csv` */
get path(): string { return api.grok_FileInfo_Get_Path(this.d); }
/** Returns full path, i.e. `Demo:TestJobs:Files:DemoFiles/geo/dmv_offices.csv`
* @type {string} */
get fullPath() {
return api.grok_FileInfo_Get_FullPath(this.d);
}
/** Returns full path, i.e. `Demo:TestJobs:Files:DemoFiles/geo/dmv_offices.csv` */
get fullPath(): string { return api.grok_FileInfo_Get_FullPath(this.d); }
/** Returns file extension, i.e. `csv`
* @type {string} */
get extension() {
return api.grok_FileInfo_Get_Extension(this.d);
}
/** Returns file extension, i.e. `csv` */
get extension(): string { return api.grok_FileInfo_Get_Extension(this.d); }
/** Returns file name, i.e. `dmv_offices.csv`
* @type {string} */
get fileName() {
return api.grok_FileInfo_Get_FileName(this.d);
}
/** Returns file name, i.e. `dmv_offices.csv` */
get fileName(): string { return api.grok_FileInfo_Get_FileName(this.d); }
/** @returns {string} */
get url() {
return api.grok_FileInfo_Get_Url(this.d);
}
/** Returns file URL */
get url(): string { return api.grok_FileInfo_Get_Url(this.d); }
/** @returns {Promise<string>} */
readAsString() {
readAsString(): Promise<string> {
return new Promise((resolve, reject) => api.grok_FileInfo_ReadAsString(this.d, (x: any) => resolve(x), (x: any) => reject(x)));

@@ -408,3 +291,3 @@ }

/** @returns {Promise<Uint8Array>} */
readAsBytes() {
readAsBytes(): Promise<Uint8Array> {
return new Promise((resolve, reject) => api.grok_FileInfo_ReadAsBytes(this.d, (x: any) => resolve(x), (x: any) => reject(x)));

@@ -423,86 +306,52 @@ }

static create(name: string) {
return new Group(api.grok_Group(name));
}
static create(name: string): Group { return new Group(api.grok_Group(name)); }
/** Adds a member to the group
* @param {Group} m */
addMember(m: Group) {
api.grok_Group_Add_Member(this.d, m.d, false);
}
addMember(m: Group): void { api.grok_Group_Add_Member(this.d, m.d, false); }
/** Adds an admin member to the group
* @param {Group} m */
addAdminMember(m: Group) {
api.grok_Group_Add_Member(this.d, m.d, true);
}
addAdminMember(m: Group): void { api.grok_Group_Add_Member(this.d, m.d, true); }
/** Removes a member from the group
* @param {Group} m */
removeMember(m: Group) {
api.grok_Group_Remove_Member(this.d, m.d);
}
removeMember(m: Group): void { api.grok_Group_Remove_Member(this.d, m.d); }
/** Adds the group to another one
* @param {Group} m */
includeTo(m: Group) {
api.grok_Group_Add_Membership(this.d, m.d, false);
}
includeTo(m: Group): void { api.grok_Group_Add_Membership(this.d, m.d, false); }
/** Adds the group to another one as an admin
* @param {Group} m */
includeAdminTo(m: Group) {
api.grok_Group_Add_Membership(this.d, m.d, true);
}
includeAdminTo(m: Group): void { api.grok_Group_Add_Membership(this.d, m.d, true); }
/** Removes membership from another group
* @param {Group} m */
excludeFrom(m: Group) {
api.grok_Group_Remove_Membership(this.d, m.d);
}
excludeFrom(m: Group): void { api.grok_Group_Remove_Membership(this.d, m.d); }
/** Returns list of groups that belong to group, with no admin permissions
* @type {Array<Group>} */
get members() {
return toJs(api.grok_Group_Get_Members(this.d, false));
}
get members(): Group[] { return toJs(api.grok_Group_Get_Members(this.d, false)); }
/** Returns list of groups that belong to group, with admin permissions
* @type {Array<Group>} */
get adminMembers(): Group[] {
return toJs(api.grok_Group_Get_Members(this.d, true));
}
get adminMembers(): Group[] { return toJs(api.grok_Group_Get_Members(this.d, true)); }
/** Returns list of groups that group belongs to, with no admin permissions
* @type {Array<Group>} */
get memberships() {
return toJs(api.grok_Group_Get_Memberships(this.d, false));
}
get memberships(): Group[] { return toJs(api.grok_Group_Get_Memberships(this.d, false)); }
/** Returns list of groups that group belongs to, with admin permissions
* @type {list<Group>} */
get adminMemberships() {
return toJs(api.grok_Group_Get_Memberships(this.d, true));
}
get adminMemberships(): Group[] { return toJs(api.grok_Group_Get_Memberships(this.d, true)); }
/** Personal user group
* @type {boolean} */
get personal() {
return api.grok_Group_Get_Personal(this.d);
}
/** Personal user group */
get personal(): boolean { return api.grok_Group_Get_Personal(this.d); }
set personal(e: boolean) { api.grok_Group_Set_Personal(this.d, e); }
set personal(e) {
api.grok_Group_Set_Personal(this.d, e);
}
/** Hidden group */
get hidden(): boolean { return api.grok_Group_Get_Hidden(this.d); }
set hidden(e: boolean) { api.grok_Group_Set_Hidden(this.d, e); }
/** Hidden group
* @type {boolean} */
get hidden() {
return api.grok_Group_Get_Hidden(this.d);
}
set hidden(e) {
api.grok_Group_Set_Hidden(this.d, e);
}
}

@@ -519,15 +368,7 @@

static create(script: string) {
return new Script(api.grok_Script_Create(script));
}
static create(script: string): Script { return new Script(api.grok_Script_Create(script)); }
/** Script
* @type {string} */
get script() {
return api.grok_Script_GetScript(this.d);
}
set script(s) {
api.grok_Script_SetScript(this.d, s);
}
/** Script */
get script(): string { return api.grok_Script_GetScript(this.d); }
set script(s: string) { api.grok_Script_SetScript(this.d, s); }
}

@@ -545,7 +386,4 @@

/** Collection of parameters: login, password, API key, etc.
* @type {object} */
get parameters() {
return api.grok_Credentials_Parameters(this.d);
}
/** Collection of parameters: login, password, API key, etc. */
get parameters(): object { return api.grok_Credentials_Parameters(this.d); }
}

@@ -563,15 +401,12 @@

* */
static create(name: string) {
static create(name: string): ScriptEnvironment {
return new ScriptEnvironment(api.grok_ScriptEnvironment_Create(name));
}
/** Environment yaml file content
* @type {string} */
get environment() {
return api.grok_ScriptEnvironment_Environment(this.d);
}
/** Environment yaml file content */
get environment(): string { return api.grok_ScriptEnvironment_Environment(this.d); }
/** Setup environment */
setup() {
return new Promise<void>((resolve, reject) => api.grok_ScriptEnvironment_Setup(this.d, () => resolve(), (e: any) => reject(e)));
setup(): Promise<void> {
return new Promise((resolve, reject) => api.grok_ScriptEnvironment_Setup(this.d, () => resolve(), (e: any) => reject(e)));
}

@@ -585,7 +420,4 @@ }

/** Friendly name of the event type
* @type {string} */
get name() {
return api.grok_LogEventType_Get_Name(this.d);
}
/** Friendly name of the event type */
get name(): string { return api.grok_LogEventType_Get_Name(this.d); }
}

@@ -598,37 +430,21 @@

/** Description of the event
* @type {string} */
get description() {
return api.grok_LogEvent_Get_Description(this.d);
}
/** Description of the event */
get description(): string { return api.grok_LogEvent_Get_Description(this.d); }
/** Friendly name of the event
* @type {string} */
get name() {
return api.grok_LogEvent_Get_Name(this.d);
}
/** Friendly name of the event */
get name(): string { return api.grok_LogEvent_Get_Name(this.d); }
/** Source of the event
* @type {string} */
get source() {
return api.grok_LogEvent_Get_Source(this.d);
}
/** Source of the event */
get source(): string { return api.grok_LogEvent_Get_Source(this.d); }
/** Session id of the event
* @type {UserSession} */
get session() {
return toJs(api.grok_LogEvent_Get_Session(this.d));
}
/** Session id of the event */
get session(): UserSession | string { return toJs(api.grok_LogEvent_Get_Session(this.d)); }
/** Parameters of the event
* @type {Array<LogEventParameterValue>} */
get parameters() {
return api.grok_LogEvent_Get_Parameters(this.d);
}
get parameters(): LogEventParameterValue[] { return api.grok_LogEvent_Get_Parameters(this.d); }
/** Type of the event
* @type {LogEventType} */
get eventType() {
return toJs(api.grok_LogEvent_Get_Type(this.d));
}
get eventType(): LogEventType { return toJs(api.grok_LogEvent_Get_Type(this.d)); }
}

@@ -641,31 +457,16 @@

/** Name of the parameter
* @type {string} */
get name() {
return api.grok_LogEventParameter_Get_Name(this.d);
}
/** Name of the parameter */
get name(): string { return api.grok_LogEventParameter_Get_Name(this.d); }
/** Type of the parameter
* @type {string} */
get type() {
return api.grok_LogEventParameter_Get_Type(this.d);
}
/** Type of the parameter */
get type(): string { return api.grok_LogEventParameter_Get_Type(this.d); }
/** Description of the parameter
* @type {string} */
get description() {
return api.grok_LogEventParameter_Get_Description(this.d);
}
/** Description of the parameter */
get description(): string { return api.grok_LogEventParameter_Get_Description(this.d); }
/** Is the parameter input
* @type {Boolean} */
get isInput() {
return api.grok_LogEventParameter_Get_IsInput(this.d);
}
/** Is the parameter input */
get isInput(): boolean { return api.grok_LogEventParameter_Get_IsInput(this.d); }
/** Is the parameter optional
* @type {Boolean} */
get isOptional() {
return api.grok_LogEventParameter_Get_IsOptional(this.d);
}
/** Is the parameter optional */
get isOptional(): boolean { return api.grok_LogEventParameter_Get_IsOptional(this.d); }
}

@@ -680,3 +481,3 @@

* @type {LogEvent} */
get event() {
get event(): LogEvent {
return toJs(api.grok_LogEventParameterValue_Get_Event(this.d));

@@ -687,3 +488,3 @@ }

* @type {LogEventParameter} */
get parameter() {
get parameter(): LogEventParameter {
return toJs(api.grok_LogEventParameterValue_Get_Parameter(this.d));

@@ -694,3 +495,3 @@ }

* @type {string} */
get value() {
get value(): string {
return api.grok_LogEventParameterValue_Get_Value(this.d);

@@ -704,3 +505,3 @@ }

export class Package extends Entity {
public webRoot: any | undefined;
public webRoot: string | String | undefined;
public version: string;

@@ -719,9 +520,5 @@

* It is guaranteed to get called exactly once before the execution of any function below.
* */
*/
init(): Promise<null> { return Promise.resolve(null); }
/*async*/
init() {
return Promise.resolve(null);
}
private _name: string | undefined;

@@ -744,5 +541,5 @@ /** Package short name

/** load package
/** Loads package
* @returns {Promise<Package>} */
async load() {
async load(): Promise<Package> {
return new Promise((resolve, reject) =>

@@ -754,3 +551,3 @@ api.grok_Dapi_Packages_Load(this.name, (data: any) => resolve(data), (e: any) => reject(e)));

* @returns {Promise<Credentials>} */
getCredentials() {
getCredentials(): Promise<Credentials> {
return new Promise((resolve, reject) => api.grok_Package_Get_Credentials(this.name, (c: any) => {

@@ -764,3 +561,3 @@ let cred = toJs(c);

* @returns {Promise<object>} */
getProperties() {
getProperties(): Promise<Map<string, any>> {
return new Promise((resolve, reject) => api.grok_Package_Get_Properties(this.name, (c: any) => {

@@ -789,81 +586,37 @@ resolve(c);

* @returns {PropertyGetter} */
get get() {
return api.grok_Property_Get_Get(this.d);
}
get get(): PropertyGetter { return api.grok_Property_Get_Get(this.d); }
set get(x: PropertyGetter) { api.grok_Property_Set_Get(this.d, x); }
/** @param {PropertyGetter} x */
set get(x: PropertyGetter){
api.grok_Property_Set_Get(this.d, x);
}
/** Property setter */
get set(): PropertySetter { return api.grok_Property_Get_Set(this.d); }
set set(x: PropertySetter) { api.grok_Property_Set_Set(this.d, x); }
get set() {
return api.grok_Property_Get_Set(this.d);
}
/** Property name */
get name(): string { return api.grok_Property_Get_Name(this.d); }
set name(s: string) { api.grok_Property_Set_Name(this.d, s); }
set set(x) {
api.grok_Property_Set_Set(this.d, x);
}
/** Property type */
get propertyType(): string { return api.grok_Property_Get_PropertyType(this.d); }
set propertyType(s: string) { api.grok_Property_Set_PropertyType(this.d, s); }
/** Property name
* @type {string} */
get name() {
return api.grok_Property_Get_Name(this.d);
}
/** Semantic type */
get semType(): SemType | string { return api.grok_Property_Get_SemType(this.d); }
set semType(s: SemType | string) { api.grok_Property_Set_SemType(this.d, s); }
set name(s) {
api.grok_Property_Set_Name(this.d, s);
}
/** Property type
* @type {string} */
get propertyType() {
return api.grok_Property_Get_PropertyType(this.d);
}
set propertyType(s) {
api.grok_Property_Set_PropertyType(this.d, s);
}
/** Semantic type
* @type {string} */
get semType() {
return api.grok_Property_Get_SemType(this.d);
}
set semType(s) {
api.grok_Property_Set_SemType(this.d, s);
}
/** Description */
get description() {
return api.grok_Property_Get_Description(this.d);
}
get description(): string { return api.grok_Property_Get_Description(this.d); }
set description(s: string) { api.grok_Property_Set_Description(this.d, s); }
set description(s) {
api.grok_Property_Set_Description(this.d, s);
}
/** Default value */
get defaultValue() {
return api.grok_Property_Get_DefaultValue(this.d);
}
get defaultValue(): any { return api.grok_Property_Get_DefaultValue(this.d); }
set defaultValue(s: any) { api.grok_Property_Set_DefaultValue(this.d, s); }
set defaultValue(s) {
api.grok_Property_Set_DefaultValue(this.d, s);
}
/** List of possible values of that property.
* PropertyGrid will use it to populate combo boxes.
* @returns ArrayList<string>*/
get choices() {
return api.grok_Property_Get_Choices(this.d);
}
* @returns {Array<string>} */
get choices(): string[] { return api.grok_Property_Get_Choices(this.d); }
set choices(x: string[]) { api.grok_Property_Set_Choices(this.d, x); }
set choices(x) {
api.grok_Property_Set_Choices(this.d, x);
}
/** Column type filter
* @type {string}*/
get columnFilter() {
/** Column type filter */
get columnFilter(): ColumnType | 'numerical' | 'categorical' | null {
return api.grok_Property_Get_ColumnTypeFilter(this.d);

@@ -879,3 +632,3 @@ }

* @returns Property*/
static create(name: string, type: Type, getter: Function, setter: Function, defaultValue = null) {
static create(name: string, type: Type, getter: PropertyGetter, setter: PropertySetter, defaultValue: any = null): Property {
return new Property(api.grok_Property(name, type, getter, setter, defaultValue));

@@ -890,3 +643,3 @@ }

* @returns Property*/
static int(name: string, getter: Function, setter: Function, defaultValue: any) {
static int(name: string, getter: PropertyGetter, setter: PropertySetter, defaultValue: any): Property {
return Property.create(name, TYPE.INT, getter, setter, defaultValue);

@@ -901,3 +654,3 @@ }

* @returns Property*/
static float(name: string, getter: Function, setter: Function, defaultValue: any) {
static float(name: string, getter: PropertyGetter, setter: PropertySetter, defaultValue: any): Property {
return Property.create(name, TYPE.FLOAT, getter, setter, defaultValue);

@@ -912,3 +665,3 @@ }

* @returns Property*/
static string(name: string, getter: Function, setter: Function, defaultValue: any) {
static string(name: string, getter: PropertyGetter, setter: PropertySetter, defaultValue: any): Property {
return Property.create(name, TYPE.STRING, getter, setter, defaultValue);

@@ -918,30 +671,3 @@ }

export class SemanticValue {
private readonly d: any;
constructor(d: any) {
this.d = d;
}
static fromValueType(value: any, semType: SemType) {
return new SemanticValue(api.grok_SemanticValue(value, semType));
}
get value() {
return api.grok_SemanticValue_Get_Value(this.d);
}
set value(x) {
api.grok_SemanticValue_Set_Value(this.d, x);
}
get semType() {
return api.grok_SemanticValue_Get_SemType(this.d);
}
set semType(x) {
api.grok_SemanticValue_Set_SemType(this.d, x);
}
}
export class DateTime {

@@ -954,9 +680,9 @@ public d: any;

static fromDate(date: any) {
static fromDate(date: Date): DateTime {
return DateTime.fromMillisecondsSinceEpoch(date.getTime());
}
static fromMillisecondsSinceEpoch(millisecondsSinceEpoch: number) {
static fromMillisecondsSinceEpoch(millisecondsSinceEpoch: number): DateTime {
return new DateTime(api.grok_DateTime_FromMillisecondsSinceEpoch(millisecondsSinceEpoch));
}
}

@@ -66,5 +66,3 @@ import * as rxjs from 'rxjs';

* @param args - event arguments*/
fireCustomEvent(eventId, args) {
return this.customEventBus.fire(eventId, args);
}
fireCustomEvent(eventId, args) { this.customEventBus.fire(eventId, args); }
/** @returns {rxjs.Observable} */ get onContextMenu() {

@@ -148,2 +146,3 @@ return __obs('d4-context-menu');

}
get onPackageLoaded() { return __obs('d4-package-loaded'); }
}

@@ -183,8 +182,4 @@ /*

}
unsubscribe() {
this.cancel();
}
cancel() {
api.grok_Subscription_Cancel(this.d);
}
unsubscribe() { this.cancel(); }
cancel() { api.grok_Subscription_Cancel(this.d); }
}

@@ -191,0 +186,0 @@ /** Event arguments. {@see args} contains event details.

@@ -5,6 +5,7 @@ import * as rxjs from 'rxjs';

import {Observable} from "rxjs";
import { Package } from './entities';
let api = <any>window;
export function debounce(observable: rxjs.Observable<any>, milliseconds = 100) {
export function debounce<T>(observable: rxjs.Observable<T>, milliseconds: number = 100): rxjs.Observable<T> {
return observable.pipe(rxjsOperators.debounceTime(milliseconds));

@@ -73,3 +74,3 @@ }

* @returns {rxjs.Observable} */
onEvent(eventId: string) {
onEvent(eventId: string): rxjs.Observable<any> {
return __obs(eventId);

@@ -81,3 +82,3 @@ }

* @returns {rxjs.Observable} */
onCustomEvent(eventId: string) {
onCustomEvent(eventId: string): rxjs.Observable<any> {
return this.customEventBus.onEvent(eventId);

@@ -90,5 +91,3 @@ }

* @param args - event arguments*/
fireCustomEvent(eventId: string, args: any) {
return this.customEventBus.fire(eventId, args);
}
fireCustomEvent(eventId: string, args: any): void { this.customEventBus.fire(eventId, args); }

@@ -198,2 +197,4 @@ /** @returns {rxjs.Observable} */ get onContextMenu() {

}
get onPackageLoaded(): rxjs.Observable<Package> { return __obs('d4-package-loaded'); }
}

@@ -237,9 +238,5 @@

unsubscribe() {
this.cancel();
}
unsubscribe(): void { this.cancel(); }
cancel() {
api.grok_Subscription_Cancel(this.d);
}
cancel(): void { api.grok_Subscription_Cancel(this.d); }
}

@@ -257,3 +254,3 @@

/** @type {UIEvent} */
get causedBy() {
get causedBy(): UIEvent {
return api.grok_EventData_Get_CausedBy(this.d);

@@ -264,3 +261,3 @@ }

* @returns {boolean} */
get isDefaultPrevented() {
get isDefaultPrevented(): boolean {
return api.grok_EventData_Get_IsDefaultPrevented(this.d);

@@ -270,3 +267,3 @@ }

/** Prevents default handling. See also {@link isDefaultPrevented} */
preventDefault() {
preventDefault(): void {
api.grok_EventData_PreventDefault(this.d);

@@ -276,5 +273,5 @@ }

/** Event details. */
get args() {
get args(): { [index: string]: any } {
let x = api.grok_EventData_Get_Args(this.d);
let result: {[index: string]:any}= {};
let result: { [index: string]: any } = {};
for (const property in x)

@@ -295,3 +292,3 @@ if (x.hasOwnProperty(property))

onEvent(type: string) {
onEvent(type: string): rxjs.Observable<any> {
let subject = this._getSubject(type);

@@ -308,3 +305,3 @@

_getSubject(type: string) {
_getSubject(type: string): any {
if (!this._streams.has(type)) {

@@ -319,3 +316,3 @@ let s = new rxjs.Subject();

fire(type: string, data: any) {
fire(type: string, data: any): void {
let subject = this._getSubject(type);

@@ -327,4 +324,4 @@ subject.next(data);

export function _sub(d: any) {
export function _sub(d: any): StreamSubscription {
return new StreamSubscription(d);
}

@@ -53,8 +53,4 @@ import { paramsToJs, toDart, toJs } from './wrappers';

}
get context() {
return toJs(api.grok_FuncCall_Get_Context(this.d));
}
set context(context) {
api.grok_FuncCall_Set_Context(this.d, context.d);
}
get context() { return toJs(api.grok_FuncCall_Get_Context(this.d)); }
set context(context) { api.grok_FuncCall_Set_Context(this.d, context.d); }
getOutputParamValue() {

@@ -61,0 +57,0 @@ return toJs(api.grok_FuncCall_Get_Output_Param_Value(this.d));

import {paramsToJs, toDart, toJs} from "./wrappers";
import {Type} from "./const";
import {Entity, Func} from "./entities";
import {DartWidget, Widget} from "./widgets";
import {DartWidget, ProgressIndicator, Widget} from "./widgets";
import {Column} from "./dataframe";

@@ -12,15 +12,15 @@ declare let grok: any;

export class Functions {
register(func: Func) {
register(func: Func): void {
api.grok_RegisterFunc(func);
}
registerParamFunc(name: string, type: Type, run: Function, check: boolean | null = null, description: string | null = null) {
registerParamFunc(name: string, type: Type, run: Function, check: boolean | null = null, description: string | null = null): void {
api.grok_RegisterParamFunc(name, type, run, check, description);
}
call(name: string, parameters = {}, showProgress = false, progress = null) {
call(name: string, parameters: object = {}, showProgress: boolean = false, progress: ProgressIndicator | null = null): Promise<any> {
return new Promise((resolve, reject) => api.grok_CallFunc(name, parameters, (out: any) => resolve(toJs(out)), (err: any) => reject(err), showProgress, toDart(progress)));
}
eval(name: string) {
eval(name: string): Promise<any> {
return new Promise((resolve, reject) => api.grok_EvalFunc(name, function (out: any) {

@@ -31,3 +31,3 @@ return resolve(toJs(out));

scriptSync(s: string) {
scriptSync(s: string): any {
return toJs(api.grok_ScriptSync(s));

@@ -47,3 +47,3 @@ }

setVariable(name: string, value: any) {
setVariable(name: string, value: any): void {
api.grok_Context_Set_Variable(this.d, name, toDart(value));

@@ -73,19 +73,14 @@ }

* @returns {object} */
getParamValue(name: string) {
getParamValue(name: string): any {
return toJs(api.grok_FuncCall_Get_Param_Value(this.d, name));
}
get context(): Context {
return toJs(api.grok_FuncCall_Get_Context(this.d));
}
get context(): Context { return toJs(api.grok_FuncCall_Get_Context(this.d)); }
set context(context: Context) { api.grok_FuncCall_Set_Context(this.d, context.d); }
set context(context: Context) {
api.grok_FuncCall_Set_Context(this.d, context.d);
}
getOutputParamValue() {
getOutputParamValue(): any {
return toJs(api.grok_FuncCall_Get_Output_Param_Value(this.d));
}
setParamValue(name: string, value: any) {
setParamValue(name: string, value: any): void {
api.grok_FuncCall_Set_Param_Value(this.d, name, toDart(value));

@@ -98,3 +93,3 @@ }

* @returns {Promise<FuncCall>} */
call(showProgress = false, progress = null): Promise<FuncCall> {
call(showProgress: boolean = false, progress: ProgressIndicator | null = null): Promise<FuncCall> {
return new Promise((resolve, reject) => api.grok_FuncCall_Call(this.d, (out: any) => resolve(toJs(out)), (err: any) => reject(err), showProgress, toDart(progress)));

@@ -108,3 +103,3 @@ }

export function callFuncWithDartParameters(f: Function, params: object) {
export function callFuncWithDartParameters<T>(f: (...params: any[]) => T, params: object): T {
let jsParams = paramsToJs(params);

@@ -132,2 +127,2 @@ return f.apply(null, jsParams);

}
}

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

}
/** @returns {RangeSlider} */
get vertScroll() {
return toJs(api.grok_Grid_Get_VertScroll(this.d));
}
/** @returns {RangeSlider} */
get horzScroll() {

@@ -333,2 +331,8 @@ return toJs(api.grok_Grid_Get_HorzScroll(this.d));

}
get onColumnResized() {
return __obs('d4-grid-column-resized', this.d);
}
get onRowsResized() {
return __obs('d4-grid-rows-resized', this.d);
}
}

@@ -415,1 +419,18 @@ export class GridCellStyle {

}
export class SemanticValue {
constructor(d) {
this.d = d;
}
static fromValueType(value, semType) {
return new SemanticValue(api.grok_SemanticValue(value, semType));
}
get value() { return api.grok_SemanticValue_Get_Value(this.d); }
set value(x) { api.grok_SemanticValue_Set_Value(this.d, x); }
get semType() { return api.grok_SemanticValue_Get_SemType(this.d); }
set semType(x) { api.grok_SemanticValue_Set_SemType(this.d, x); }
getMeta(name) { return api.grok_SemanticValue_Get_Meta(name); }
setMeta(name, value) { api.grok_SemanticValue_Set_Meta(name, toDart(value)); }
get cell() { return api.grok_SemanticValue_Get_Cell(this.d); }
get gridCell() { return this.getMeta('gridCell'); }
get viewer() { return this.getMeta('viewer'); }
}

@@ -8,2 +8,3 @@ import {Cell, Column, Row} from "./dataframe";

import { RangeSlider } from "./widgets";
import {SemType} from "./const";

@@ -414,3 +415,2 @@

/** @returns {RangeSlider} */
get vertScroll(): RangeSlider {

@@ -420,3 +420,2 @@ return toJs(api.grok_Grid_Get_VertScroll(this.d));

/** @returns {RangeSlider} */
get horzScroll(): RangeSlider {

@@ -431,2 +430,10 @@ return toJs(api.grok_Grid_Get_HorzScroll(this.d));

}
get onColumnResized(): Observable<any> {
return __obs('d4-grid-column-resized', this.d);
}
get onRowsResized(): Observable<any> {
return __obs('d4-grid-rows-resized', this.d);
}
}

@@ -539,2 +546,28 @@

}
}
export class SemanticValue {
private readonly d: any;
constructor(d: any) {
this.d = d;
}
static fromValueType(value: any, semType: SemType | null) {
return new SemanticValue(api.grok_SemanticValue(value, semType));
}
get value(): any { return api.grok_SemanticValue_Get_Value(this.d); }
set value(x: any) { api.grok_SemanticValue_Set_Value(this.d, x); }
get semType(): string { return api.grok_SemanticValue_Get_SemType(this.d); }
set semType(x: string) { api.grok_SemanticValue_Set_SemType(this.d, x); }
getMeta(name: string): any { return api.grok_SemanticValue_Get_Meta(name); }
setMeta(name: string, value: any): void { api.grok_SemanticValue_Set_Meta(name, toDart(value)); }
get cell(): Cell { return api.grok_SemanticValue_Get_Cell(this.d); }
get gridCell(): GridCell { return this.getMeta('gridCell'); }
get viewer(): Viewer { return this.getMeta('viewer'); }
}

@@ -169,3 +169,3 @@ import {VIEW_TYPE, VIEWER, ViewerType} from './const';

* @param {Object} item */
append(item: HTMLElement): HTMLElement {
append(item: any): HTMLElement {
return this.appendAll([ui.render(item)]);

@@ -172,0 +172,0 @@ }

@@ -379,2 +379,4 @@ import { toDart, toJs } from './wrappers';

* @param {Function} action
* @param index
* @param tooltip
* @returns {Dialog}

@@ -381,0 +383,0 @@ * */

@@ -7,2 +7,3 @@ import {toDart, toJs} from "./wrappers";

import {ColorType, Type} from "./const";
import React from "react";

@@ -492,2 +493,4 @@ declare let grok: any;

* @param {Function} action
* @param index
* @param tooltip
* @returns {Dialog}

@@ -494,0 +497,0 @@ * */

@@ -8,3 +8,3 @@ import {Property} from "./entities";

* @returns {object[]} - list of JavaScript objects */
export function paramsToJs(params :any) :any {
export function paramsToJs(params: any): any {
let result = [];

@@ -29,3 +29,3 @@ for (let i = 0; i < params.length; i++) {

* */
export function toJs(d :any, check = false) :any {
export function toJs(d: any, check: boolean = false): any {
let type = (<any>window).grok_GetType(d);

@@ -60,3 +60,3 @@ if (type === TYPE.MAP) {

/** Extracts a Dart handle from the JavaScript wrapper. See also {@link toJs} */
export function toDart(x :any) :any {
export function toDart(x: any): any {
if (x === undefined || x === null)

@@ -63,0 +63,0 @@ return x;

@@ -13,3 +13,3 @@ /**

import * as rxjs from 'rxjs';
import { GridCellRenderer } from './src/grid';
import { GridCellRenderer, SemanticValue } from './src/grid';
let api = window;

@@ -477,7 +477,8 @@ /**

export class ObjectHandlerResolutionArgs {
constructor(object, context) {
this.object = object;
constructor(semValue, context) {
this.semValue = semValue;
this.context = context;
this.handler = null;
}
get value() { return this.semValue.value; }
}

@@ -502,2 +503,4 @@ let _objectHandlerSubject = new rxjs.Subject();

}
get name() { return `${this.type} handler`; }
toString() { return this.name; }
/**

@@ -525,35 +528,23 @@ * Override this method to check whether this meta class should handle the specified object.

}
/** Renders icon for the item.
* @param x - item
* @returns {Element} */
/** Renders icon for the item. */
renderIcon(x, context = null) {
return divText(this.getCaption(x));
}
/** Renders markup for the item.
* @param x - item
* @returns {Element} */
/** Renders markup for the item. */
renderMarkup(x, context = null) {
return divText(this.getCaption(x));
}
/** Renders tooltip for the item.
* @param x - item
* @returns {Element} */
/** Renders tooltip for the item. */
renderTooltip(x, context = null) {
return divText(this.getCaption(x));
}
/** Renders card div for the item.
* @param x - item
* @returns {Element} */
/** Renders card div for the item. */
renderCard(x, context = null) {
return divText(this.getCaption(x));
}
/** Renders properties list for the item.
* @param x - item
* @returns {Element} */
/** Renders properties list for the item. */
renderProperties(x, context = null) {
return divText(this.getCaption(x));
}
/** Renders view for the item.
* @param x - item
* @returns {Element} */
/** Renders view for the item. */
renderView(x, context = null) {

@@ -564,4 +555,3 @@ return this.renderProperties(x);

init() { }
/** Registers entity handler.
* @param {ObjectHandler} meta */
/** Registers entity handler. */
static register(meta) {

@@ -573,3 +563,2 @@ api.grok_Meta_Register(meta);

}
/** @returns {ObjectHandler[]} */
static list() {

@@ -581,9 +570,5 @@ return toJs(api.grok_Meta_List());

}
/**
* @param {Object} object
* @param {Object} context
* @returns {ObjectHandler}
* */
static forEntity(object, context = null) {
let args = new ObjectHandlerResolutionArgs(object, context);
let semValue = object instanceof SemanticValue ? object : SemanticValue.fromValueType(object, null);
let args = new ObjectHandlerResolutionArgs(semValue, context);
_objectHandlerSubject.next(args);

@@ -594,2 +579,5 @@ if (args.handler !== null)

}
static forSemType(semType) {
return new Promise((resolve, reject) => api.grok_Meta_ForSemType(semType, (t) => resolve(toJs(t)), (e) => reject(e)));
}
/**

@@ -596,0 +584,0 @@ * Registers a function that takes applicable objects as the only argument.

@@ -16,3 +16,3 @@ /**

import * as rxjs from 'rxjs';
import { CanvasRenderer, GridCellRenderer } from './src/grid';
import { CanvasRenderer, GridCellRenderer, SemanticValue } from './src/grid';
import { DateTime } from './src/entities';

@@ -562,8 +562,10 @@ import { Column, DataFrame } from './src/dataframe';

export class ObjectHandlerResolutionArgs {
object: object;
semValue: SemanticValue;
context: object | null;
handler: null;
handler: ObjectHandler | null;
constructor(object: object, context: object | null) {
this.object = object;
get value(): any { return this.semValue.value; }
constructor(semValue: SemanticValue, context: object | null) {
this.semValue = semValue;
this.context = context;

@@ -574,3 +576,3 @@ this.handler = null;

let _objectHandlerSubject = new rxjs.Subject();
let _objectHandlerSubject = new rxjs.Subject<ObjectHandlerResolutionArgs>();

@@ -596,2 +598,6 @@ /**

get name(): string { return `${this.type} handler`; }
toString(): string { return this.name; }
/**

@@ -623,5 +629,3 @@ * Override this method to check whether this meta class should handle the specified object.

/** Renders icon for the item.
* @param x - item
* @returns {Element} */
/** Renders icon for the item. */
renderIcon(x: any, context: any = null): HTMLDivElement {

@@ -631,5 +635,3 @@ return divText(this.getCaption(x));

/** Renders markup for the item.
* @param x - item
* @returns {Element} */
/** Renders markup for the item. */
renderMarkup(x: any, context: any = null): HTMLDivElement {

@@ -639,5 +641,3 @@ return divText(this.getCaption(x));

/** Renders tooltip for the item.
* @param x - item
* @returns {Element} */
/** Renders tooltip for the item. */
renderTooltip(x: any, context: any = null): HTMLDivElement {

@@ -647,5 +647,3 @@ return divText(this.getCaption(x));

/** Renders card div for the item.
* @param x - item
* @returns {Element} */
/** Renders card div for the item. */
renderCard(x: any, context: any = null): HTMLDivElement {

@@ -655,5 +653,3 @@ return divText(this.getCaption(x));

/** Renders properties list for the item.
* @param x - item
* @returns {Element} */
/** Renders properties list for the item. */
renderProperties(x: any, context: any = null): HTMLDivElement {

@@ -663,5 +659,3 @@ return divText(this.getCaption(x));

/** Renders view for the item.
* @param x - item
* @returns {Element} */
/** Renders view for the item. */
renderView(x: any, context: any = null): HTMLDivElement {

@@ -674,4 +668,3 @@ return this.renderProperties(x);

/** Registers entity handler.
* @param {ObjectHandler} meta */
/** Registers entity handler. */
static register(meta: ObjectHandler): void {

@@ -684,3 +677,2 @@ api.grok_Meta_Register(meta);

/** @returns {ObjectHandler[]} */
static list(): ObjectHandler[] {

@@ -690,13 +682,10 @@ return toJs(api.grok_Meta_List());

static onResolve(observer: rxjs.PartialObserver<unknown> | undefined): rxjs.Subscription {
static onResolve(observer: rxjs.PartialObserver<ObjectHandlerResolutionArgs>): rxjs.Subscription {
return _objectHandlerSubject.subscribe(observer);
}
/**
* @param {Object} object
* @param {Object} context
* @returns {ObjectHandler}
* */
static forEntity(object: object, context: object | null = null): ObjectHandler | null {
let args = new ObjectHandlerResolutionArgs(object, context);
let semValue = object instanceof SemanticValue ? object : SemanticValue.fromValueType(object, null);
let args = new ObjectHandlerResolutionArgs(semValue, context);
_objectHandlerSubject.next(args);

@@ -709,2 +698,6 @@ if (args.handler !== null)

static forSemType(semType: string): Promise<ObjectHandler[]> {
return new Promise((resolve, reject) => api.grok_Meta_ForSemType(semType, (t: any) => resolve(toJs(t)), (e: any) => reject(e)));
}
/**

@@ -711,0 +704,0 @@ * Registers a function that takes applicable objects as the only argument.

const path = require('path');
module.exports = {
mode: 'production',
mode: 'development',
entry: {'grok': './grok.ts', 'ui': './ui.ts', 'DG': './dg.ts'},

@@ -6,0 +6,0 @@ devtool: 'inline-source-map',

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