Skip to content

Commit

Permalink
#7322 add declaration files
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariusz Jurowicz committed Jun 7, 2018
1 parent 901f380 commit 138bb96
Show file tree
Hide file tree
Showing 106 changed files with 2,008 additions and 8 deletions.
4 changes: 2 additions & 2 deletions js/notebook/src/contextMenu/BkoContextMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ declare var lab: { contextMenu: ContextMenu };
import { ContextMenu, Menu } from '@phosphor/widgets';
import { CommandRegistry } from '@phosphor/commands';
import { IDisposable } from '@phosphor/disposable';
import MenuItem from "shared/interfaces/contextMenuItemInterface";
import MenuItem from "../shared/interfaces/contextMenuItemInterface";
import MenuInterface from '../shared/interfaces/menuInterface'

interface addItem {
export interface addItem {
addItem: Function
}

Expand Down
3 changes: 2 additions & 1 deletion js/notebook/src/tableDisplay/dataGrid/DataGridScope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import ColumnLimitModal from "./modal/ColumnLimitModal";
import createStore, { BeakerXDataStore } from "./store/BeakerXDataStore";
import { selectModel } from "./model/selectors";
import BeakerXThemeHelper from "../../BeakerXThemeHelper";
import IDataModelState from "./interface/IDataGridModelState";

export class DataGridScope {
contextMenu: DataGridContextMenu;
Expand Down Expand Up @@ -53,7 +54,7 @@ export class DataGridScope {
this.initColumnLimitModal();
}

get state() {
get state(): IDataModelState {
return selectModel(this.store.state);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import getStringSize = DataGridHelpers.getStringSize;
import retrieveUrl = DataGridHelpers.retrieveUrl;
import BeakerXThemeHelper from "../../../BeakerXThemeHelper";

interface ICellRendererOptions {
export interface ICellRendererOptions {
font?: string,
color?: string,
text?: any,
Expand Down
2 changes: 1 addition & 1 deletion js/notebook/src/tableDisplay/dataGrid/cell/CellManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {ICellData} from "../interface/ICell";
import {DataGridHelpers} from "../dataGridHelpers";
import isUrl = DataGridHelpers.isUrl;

interface ICellDataOptions {
export interface ICellDataOptions {
row: number,
column: number,
value: any,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import {ColumnValuesIterator} from "./ColumnValuesIterator";
import {DataGridHelpers} from "../dataGridHelpers";
import getStringSize = DataGridHelpers.getStringSize;
import {selectDataFontSize} from "../model/selectors/model";
import Highlighter from "../highlighter/Highlighter";

export default class DataGridColumn {
index: number;
Expand Down Expand Up @@ -272,7 +273,7 @@ export default class DataGridColumn {
return selectRenderer(this.store.state, this);
}

getHighlighter(highlighterType: HIGHLIGHTER_TYPE) {
getHighlighter(highlighterType: HIGHLIGHTER_TYPE): Highlighter[] {
return this.dataGrid.highlighterManager.getColumnHighlighters(this, highlighterType);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class HighlighterManager {
constructor(dataGrid: BeakerXDataGrid) {
this.dataGrid = dataGrid;
this.highlighters = [];
this.cachedHighlighters = new Map();
this.cachedHighlighters = new Map<string, Highlighter>();

this.createHighlighter = this.createHighlighter.bind(this);
this.registerHighlighter = this.registerHighlighter.bind(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import {
import {getAlignmentByChar} from "../../column/columnAlignment";
import {IColumnPosition} from "../../interface/IColumn";
import {ALL_TYPES} from "../../dataTypes";
import Highlighter from "../../highlighter/Highlighter";
import IHihglighterState from "../../interface/IHighlighterState";

export const DEFAULT_INDEX_COLUMN_NAME = 'index';

Expand Down Expand Up @@ -186,7 +188,7 @@ export const selectColumnHighlighters = createSelector(
(state, columnName) => columnName,
(state, columnName, highlighterType) => highlighterType
],
(highlighters, columnName, highlighterType) => highlighters.filter(
(highlighters, columnName, highlighterType): IHihglighterState[] => highlighters.filter(
highlighter => highlighter.colName === columnName && highlighter.type === highlighterType
)
);
12 changes: 12 additions & 0 deletions js/notebook/src/types/BeakerXThemeHelper.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { DataGrid } from "@phosphor/datagrid";
export default class BeakerXThemeHelper {
static readonly isDark: boolean;
static getStyle(): DataGrid.IStyle;
static readonly DEFAULT_DATA_FONT_COLOR: string;
static readonly DEFAULT_HEADER_FONT_COLOR: string;
static readonly DEFAULT_HIGHLIGHT_COLOR: string;
static readonly DEFAULT_CELL_BACKGROUND: string;
static readonly FOCUSED_CELL_BACKGROUND: string;
private static getDarkStyle();
private static getLightStyle();
}
12 changes: 12 additions & 0 deletions js/notebook/src/types/BxHTML.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import widgets from './widgets';
export declare class BxHTMLModel extends widgets.HTMLModel {
defaults(): any;
}
export declare class BxHTMLView extends widgets.HTMLView {
render(): void;
}
declare const _default: {
BxHTMLModel: typeof BxHTMLModel;
BxHTMLView: typeof BxHTMLView;
};
export default _default;
14 changes: 14 additions & 0 deletions js/notebook/src/types/CyclingDisplayBox.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import widgets from './widgets';
export declare class CyclingDisplayBoxModel extends widgets.BoxModel {
defaults(): any;
}
export declare class CyclingDisplayBoxView extends widgets.BoxView {
initialize(): void;
update_children(): void;
draw_widget(): void;
}
declare const _default: {
CyclingDisplayBoxView: typeof CyclingDisplayBoxView;
CyclingDisplayBoxModel: typeof CyclingDisplayBoxModel;
};
export default _default;
34 changes: 34 additions & 0 deletions js/notebook/src/types/EasyForm.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import widgets from './widgets';
export * from './easyForm/selectMultipleWidget';
export * from './easyForm/selectMultipleSingleWidget';
export * from './easyForm/datePickerWidget';
export * from './easyForm/comboBoxWidget';
export * from './easyForm/textWidget';
export * from './easyForm/passwordWidget';
export * from './easyForm/TextareaWidget';
export * from './easyForm/checkboxWidget';
import './easyForm/css/jupyter-easyform.scss';
import 'flatpickr/dist/flatpickr.css';
import 'jquery-ui/themes/base/all.css';
import 'jquery-ui/ui/widgets/button';
import 'jquery-ui/ui/widgets/autocomplete';
export declare class EasyFormModel extends widgets.DOMWidgetModel {
defaults(): any;
static serializers: {
children: {
deserialize: any;
};
};
}
export declare class EasyFormView extends widgets.BoxView {
render(): void;
events(): {
'keypress': string;
};
handleEnterKeyPress(event: any): any;
}
declare const _default: {
EasyFormModel: typeof EasyFormModel;
EasyFormView: typeof EasyFormView;
};
export default _default;
39 changes: 39 additions & 0 deletions js/notebook/src/types/Foldout.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { Widget, Panel } from '@phosphor/widgets';
import widgets from './widgets';
export declare class FoldoutModel extends widgets.BoxModel {
defaults(): any;
}
export declare class FoldoutView extends widgets.BoxView {
label: Panel;
labelContent: Widget;
content: Panel;
previewContainer: Widget;
previewContent: HTMLElement;
previewContentParent: HTMLElement;
hiddenContainer: HTMLElement;
timeoutId: number;
active: boolean;
hidePreview: boolean;
initialize(parameters: any): void;
add_child_model(model: any): any;
addLabel(): void;
addContent(): void;
addPreviewContent(): void;
addHiddenContainer(): void;
headerClickCallback(): void;
activateFoldout(): void;
deactivateFoldout(): void;
activateFoldoutCallback(): void;
deactivateFoldoutCallback(): void;
getPreviewContent(): HTMLElement;
render(): void;
updateHiddenContainer(): void;
restorePreviewContent(): void;
renderPreview(): void;
dispose(): void;
}
declare const _default: {
FoldoutModel: typeof FoldoutModel;
FoldoutView: typeof FoldoutView;
};
export default _default;
13 changes: 13 additions & 0 deletions js/notebook/src/types/GridView.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import widgets from './widgets';
import './gridView/grid-view.scss';
export declare class GridViewModel extends widgets.VBoxModel {
defaults(): any;
}
export declare class GridView extends widgets.VBoxView {
render(): void;
}
declare const _default: {
GridViewModel: typeof GridViewModel;
GridView: typeof GridView;
};
export default _default;
12 changes: 12 additions & 0 deletions js/notebook/src/types/HTMLPre.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import widgets from './widgets';
export declare class HTMLPreModel extends widgets.StringModel {
defaults(): any;
}
export declare class HTMLPreView extends widgets.DescriptionView {
render(): void;
}
declare const _default: {
HTMLPreModel: typeof HTMLPreModel;
HTMLPreView: typeof HTMLPreView;
};
export default _default;
11 changes: 11 additions & 0 deletions js/notebook/src/types/SparkConfiguration.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import widgets from './widgets';
export declare class SparkConfigurationModel extends widgets.VBoxModel {
defaults(): any;
}
export declare class SparkConfigurationView extends widgets.VBoxView {
}
declare const _default: {
SparkConfigurationModel: typeof SparkConfigurationModel;
SparkConfigurationView: typeof SparkConfigurationView;
};
export default _default;
13 changes: 13 additions & 0 deletions js/notebook/src/types/SparkFoldout.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Foldout from "./Foldout";
import widgets from './widgets';
export declare class SparkFoldoutModel extends widgets.BoxModel {
defaults(): any;
}
export declare class SparkFoldoutView extends Foldout.FoldoutView {
getPreviewContent(): HTMLElement;
}
declare const _default: {
SparkFoldoutModel: typeof SparkFoldoutModel;
SparkFoldoutView: typeof SparkFoldoutView;
};
export default _default;
31 changes: 31 additions & 0 deletions js/notebook/src/types/SparkStateProgress.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import widgets from './widgets';
import "./shared/style/spark.scss";
export declare class SparkStateProgressModel extends widgets.VBoxModel {
defaults(): any;
}
export declare class SparkStateProgressView extends widgets.VBoxView {
progressBar: HTMLElement;
progressBarDone: HTMLElement;
progressBarActive: HTMLElement;
progressBarWaiting: HTMLElement;
progressLabels: HTMLElement;
progressLabelDone: HTMLElement;
progressLabelActive: HTMLElement;
progressLabelWaiting: HTMLElement;
progressLabelAll: HTMLElement;
render(): void;
update(): any;
private updateLabelWidths();
private createWidget();
private createJobPanel();
private createJobLink(state);
private createStagePanel(state);
private createStageLink(state);
private createStageProgressBar(state);
private createStageProgressLabels(state);
}
declare const _default: {
SparkStateProgressModel: typeof SparkStateProgressModel;
SparkStateProgressView: typeof SparkStateProgressView;
};
export default _default;
42 changes: 42 additions & 0 deletions js/notebook/src/types/SparkUI.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import widgets from './widgets';
export declare class SparkUIModel extends widgets.VBoxModel {
defaults(): any;
}
export declare class SparkUIView extends widgets.VBoxView {
private sparkStats;
private sparkAppId;
private sparkUiWebUrl;
private sparkMasterUrl;
private apiCallIntervalId;
private connectionLabelActive;
private connectionLabelMemory;
private connectionLabelDead;
private connectionStatusElement;
private masterUrlInput;
private executorCoresInput;
private executorMemoryInput;
initialize(parameters: any): void;
render(): void;
update(): void;
private addSparkUrls();
private addSparUiWebUrl();
private addMasterUrl();
private handleLocalMasterUrl();
private toggleExecutorConfigInputs();
private openWebUi();
private openExecutors();
private updateChildren();
private resolveChildren(view);
private createSparkMetricsWidget();
private connectToApi();
private setApiCallInterval(api);
private clearApiCallInterval();
private updateMetrics(data);
private addSparkMetricsWidget();
dispose(): void;
}
declare const _default: {
SparkUIModel: typeof SparkUIModel;
SparkUIView: typeof SparkUIView;
};
export default _default;
14 changes: 14 additions & 0 deletions js/notebook/src/types/TabView.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import widgets from './widgets';
export declare class TabModel extends widgets.TabModel {
defaults(): any;
}
export declare class TabView extends widgets.TabView {
render(): void;
_onTabChanged(tabBar: any, tabs: any): void;
_triggerSelectEventForChildren(currentIndex: any): void;
}
declare const _default: {
TabModel: typeof TabModel;
TabView: typeof TabView;
};
export default _default;
18 changes: 18 additions & 0 deletions js/notebook/src/types/TableDisplay.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import widgets from './widgets';
export declare class TableDisplayModel extends widgets.DOMWidgetModel {
defaults(): any;
}
export declare class TableDisplayView extends widgets.DOMWidgetView {
private _currentScope;
render(): void;
handleModellUpdate(): void;
handleUpdateData(): void;
showWarning(data: any): void;
initDataGridTable(data: any): void;
remove(): void;
}
declare const _default: {
TableDisplayModel: typeof TableDisplayModel;
TableDisplayView: typeof TableDisplayView;
};
export default _default;
Loading

0 comments on commit 138bb96

Please sign in to comment.