survey-analytics
Advanced tools
Comparing version 1.7.24 to 1.7.25
@@ -14,3 +14,3 @@ { | ||
}, | ||
"version": "1.7.24", | ||
"version": "1.7.25", | ||
"name": "survey-analytics", | ||
@@ -99,3 +99,3 @@ "description": "SurveyJS analytics Library.", | ||
"ts-loader": "^7.0.5", | ||
"typescript": "3.6.2", | ||
"typescript": "3.9.6", | ||
"url-loader": "0.6.2", | ||
@@ -102,0 +102,0 @@ "val-loader": "0.5.0", |
@@ -1,2 +0,2 @@ | ||
/*Type definitions for SurveyJS Analytics library v1.7.24 | ||
/*Type definitions for SurveyJS Analytics library v1.7.25 | ||
Copyright (c) 2015-2019 Devsoft Baltic OÜ - http://surveyjs.io/ | ||
@@ -8,4 +8,4 @@ Definitions by: Devsoft Baltic OÜ <https://github.com/surveyjs/> | ||
import { Event } from "survey-core"; | ||
import { Question } from "survey-core"; | ||
import { Event } from "survey-core"; | ||
import { IQuestion } from "survey-core"; | ||
@@ -15,2 +15,3 @@ import { QuestionMatrixDropdownModel } from "survey-core"; | ||
import { ItemValue } from "survey-core"; | ||
import { QuestionMatrixModel } from "survey-core"; | ||
import { QuestionBooleanModel } from "survey-core"; | ||
@@ -35,3 +36,3 @@ | ||
getString: (strName: string) => any; | ||
getLocales: () => string[]; | ||
getLocales: () => Array<string>; | ||
}; | ||
@@ -70,14 +71,43 @@ export var surveyStrings: { | ||
/** | ||
* Describes data info: | ||
* dataName - question name, used as a key to obtain question data | ||
* getValues - function returning an array of all possible values | ||
* getLabels - function returning an array of human-friendly descriptions for values | ||
* getSeriesValues - function returning an array of all possible series values | ||
* getSeriesLabels - function returning an array of human-friendly descriptions for series values | ||
*/ | ||
export interface IDataInfo { | ||
dataName: string; | ||
getValues(): Array<any>; | ||
getLabels(): Array<string>; | ||
getSeriesValues(): Array<string>; | ||
getSeriesLabels(): Array<string>; | ||
dataName: string; | ||
getValues(): Array<any>; | ||
getLabels(): Array<string>; | ||
getSeriesValues(): Array<string>; | ||
getSeriesLabels(): Array<string>; | ||
} | ||
export class DataProvider { | ||
static seriesMarkerKey: string; | ||
constructor(_data?: Array<any>); | ||
data: Array<any>; | ||
getData(dataInfo: IDataInfo): number[][]; | ||
static seriesMarkerKey: string; | ||
protected filterValues: { | ||
[index: string]: any; | ||
}; | ||
constructor(_data?: Array<any>); | ||
reset(): void; | ||
get data(): Array<any>; | ||
set data(data: Array<any>); | ||
get filteredData(): { | ||
[index: string]: any; | ||
}[]; | ||
/** | ||
* Sets filter by question name and value. | ||
*/ | ||
setFilter(questionName: string, selectedValue: any): void; | ||
protected getDataCore(dataInfo: IDataInfo): number[][]; | ||
/** | ||
* Returns calculated statisctics for the IDataInfo object. | ||
*/ | ||
getData(dataInfo: IDataInfo): any[]; | ||
/** | ||
* Fires when data has been changed. | ||
*/ | ||
onDataChanged: Event<(sender: DataProvider, options: any) => any, any>; | ||
protected raiseDataChanged(): void; | ||
} | ||
@@ -87,47 +117,62 @@ | ||
export class VisualizerBase implements IDataInfo { | ||
question: Question; | ||
protected data: Array<{ | ||
[index: string]: any; | ||
}>; | ||
protected options: { | ||
[index: string]: any; | ||
}; | ||
protected renderResult: HTMLElement; | ||
protected toolbarContainer: HTMLElement; | ||
protected contentContainer: HTMLElement; | ||
protected footerContainer: HTMLElement; | ||
protected toolbarItemCreators: { | ||
[name: string]: (toolbar?: HTMLDivElement) => HTMLElement; | ||
}; | ||
constructor(question: Question, data: Array<{ | ||
[index: string]: any; | ||
}>, options?: { | ||
[index: string]: any; | ||
}); | ||
readonly dataName: string; | ||
getSeriesValues(): Array<string>; | ||
getSeriesLabels(): Array<string>; | ||
getValues(): Array<any>; | ||
getLabels(): Array<string>; | ||
registerToolbarItem(name: string, creator: (toolbar?: HTMLDivElement) => HTMLElement): void; | ||
readonly name: string; | ||
update(data: Array<{ | ||
[index: string]: any; | ||
}>): void; | ||
onUpdate: () => void; | ||
invokeOnUpdate(): void; | ||
destroy(): void; | ||
protected createToolbarItems(toolbar: HTMLDivElement): void; | ||
protected destroyToolbar(container: HTMLElement): void; | ||
protected renderToolbar(container: HTMLElement): void; | ||
protected destroyContent(container: HTMLElement): void; | ||
protected renderContent(container: HTMLElement): void; | ||
protected destroyFooter(container: HTMLElement): void; | ||
protected renderFooter(container: HTMLElement): void; | ||
render(targetElement: HTMLElement): void; | ||
getRandomColor(): any; | ||
backgroundColor: string; | ||
static customColors: string[]; | ||
getColors(count?: number): any; | ||
showHeader: boolean; | ||
question: Question; | ||
protected options: { | ||
[index: string]: any; | ||
}; | ||
protected renderResult: HTMLElement; | ||
protected toolbarContainer: HTMLElement; | ||
protected contentContainer: HTMLElement; | ||
protected footerContainer: HTMLElement; | ||
static otherCommentCollapsed: boolean; | ||
protected toolbarItemCreators: { | ||
[name: string]: (toolbar?: HTMLDivElement) => HTMLElement; | ||
}; | ||
constructor(question: Question, data: Array<{ | ||
[index: string]: any; | ||
}>, options?: { | ||
[index: string]: any; | ||
}); | ||
protected onDataChanged(): void; | ||
get dataName(): string; | ||
get hasFooter(): boolean; | ||
protected createVisualizer(question: Question): VisualizerBase; | ||
get footerVisualizer(): VisualizerBase; | ||
getSeriesValues(): Array<string>; | ||
getSeriesLabels(): Array<string>; | ||
getValues(): Array<any>; | ||
getLabels(): Array<string>; | ||
registerToolbarItem(name: string, creator: (toolbar?: HTMLDivElement) => HTMLElement): void; | ||
get name(): string; | ||
protected get data(): { | ||
[index: string]: any; | ||
}[]; | ||
protected get dataProvider(): DataProvider; | ||
/** | ||
* Updates visualizer data. | ||
*/ | ||
updateData(data: Array<{ | ||
[index: string]: any; | ||
}>): void; | ||
onUpdate: () => void; | ||
invokeOnUpdate(): void; | ||
destroy(): void; | ||
protected createToolbarItems(toolbar: HTMLDivElement): void; | ||
protected destroyToolbar(container: HTMLElement): void; | ||
protected renderToolbar(container: HTMLElement): void; | ||
protected destroyContent(container: HTMLElement): void; | ||
protected renderContent(container: HTMLElement): void; | ||
protected destroyFooter(container: HTMLElement): void; | ||
protected renderFooter(container: HTMLElement): void; | ||
render(targetElement: HTMLElement): void; | ||
/** | ||
* Redraws visualizer and all inner content. | ||
*/ | ||
refresh(): void; | ||
getRandomColor(): any; | ||
backgroundColor: string; | ||
static customColors: string[]; | ||
getColors(count?: number): any; | ||
get showHeader(): boolean; | ||
set showHeader(newValue: boolean); | ||
getData(): any; | ||
} | ||
@@ -139,2 +184,3 @@ | ||
export class VisualizationManager { | ||
static alternativesVisualizer: any; | ||
static vizualizers: { | ||
@@ -151,2 +197,10 @@ [index: string]: Array<VisualizerConstructor>; | ||
static getVisualizersByType(typeName: string): VisualizerConstructor[]; | ||
/** | ||
* Get visualizers (constructors) for question type. | ||
*/ | ||
static getAlternativesVisualizer(): any; | ||
/** | ||
* Register visualizer (constructor) for question type. | ||
*/ | ||
static registerAlternativesVisualizer(constructor: any): void; | ||
} | ||
@@ -156,9 +210,20 @@ export {}; | ||
import "./visualizationPanel.scss"; | ||
export interface IVisualizerPanelRenderedElement extends IVisualizerPanelElement { | ||
renderedElement?: HTMLElement; | ||
} | ||
/** | ||
* VisualizationPanel is responsible for displaying an array of survey questions | ||
* | ||
* constructor parameters: | ||
* questions - an array of survey questions to visualize | ||
* data - an array of answers in format of survey result | ||
* | ||
* options: | ||
* allowDynamicLayout - set it to false to disable items drag/drop reordering and dynamic layouting | ||
* allowHideQuestions - set it to false to deny user to hide/show individual questions | ||
* seriesValues - an array of series values in data to group data by series | ||
* seriesLabels - labels for series to display, if not passed the seriesValues are used as labels | ||
* survey - pass survey instance to use localses from the survey JSON | ||
* dataProvider - dataProvider for this visualizer | ||
* | ||
* elements - list of visual element descriptions | ||
@@ -168,8 +233,2 @@ */ | ||
protected questions: Array<any>; | ||
protected filteredData: Array<{ | ||
[index: string]: any; | ||
}>; | ||
protected filterValues: { | ||
[index: string]: any; | ||
}; | ||
protected visualizers: Array<VisualizerBase>; | ||
@@ -180,8 +239,38 @@ constructor(questions: Array<any>, data: Array<{ | ||
[index: string]: any; | ||
}, _elements?: Array<IVisualizerPanelElement>, isTrustedAccess?: boolean); | ||
readonly name: string; | ||
readonly allowDynamicLayout: boolean; | ||
readonly allowHideQuestions: boolean; | ||
readonly layoutEngine: any; | ||
}, _elements?: Array<IVisualizerPanelRenderedElement>, isTrustedAccess?: boolean); | ||
protected showElement(elementName: string): void; | ||
protected hideElement(elementName: string): void; | ||
protected moveVisibleElement(fromVisibleIndex: number, toVisibleIndex: number): void; | ||
protected moveElement(fromIndex: number, toIndex: number): void; | ||
/** | ||
* Returns current locale of the visualization panel. | ||
* If locales more than one, the language selection dropdown will be added in the toolbar | ||
* In order to use survey locales the survey instance object should be passed as 'survey' option for visualizer | ||
*/ | ||
get locale(): string; | ||
/** | ||
* Sets locale for visualization panel. | ||
*/ | ||
set locale(newLocale: string); | ||
/** | ||
* Returns name of the visualizer - 'panel' for the VisualizationPanel. | ||
*/ | ||
get name(): string; | ||
/** | ||
* Returns whether the VisualizationPanel allows dynamic layouting - rearrange items via drap/drop. | ||
*/ | ||
get allowDynamicLayout(): boolean; | ||
/** | ||
* Returns whether the VisualizationPanel allows to hide/show individual inner visualizers. | ||
*/ | ||
get allowHideQuestions(): boolean; | ||
/** | ||
* Returns the layout engine instance if any. | ||
*/ | ||
get layoutEngine(): LayoutEngine; | ||
protected buildElements(questions: any[]): IVisualizerPanelElement[]; | ||
/** | ||
* Returns panel elements descriptions array. | ||
* Inner visualizers are rendered in the order of this array and with titles from the displayName property | ||
*/ | ||
getElements(): IVisualizerPanelElement[]; | ||
@@ -192,19 +281,32 @@ /** | ||
isVisible(visibility: ElementVisibility): boolean; | ||
protected readonly visibleElements: IVisualizerPanelElement[]; | ||
protected readonly hiddenElements: IVisualizerPanelElement[]; | ||
protected readonly locales: any; | ||
protected getElement(name: string): IVisualizerPanelElement; | ||
protected get visibleElements(): IVisualizerPanelRenderedElement[]; | ||
protected get hiddenElements(): IVisualizerPanelRenderedElement[]; | ||
protected get locales(): any; | ||
/** | ||
* Returns panel element description by the question name. | ||
*/ | ||
getElement(name: string): IVisualizerPanelRenderedElement; | ||
/** | ||
* Returns panel element visualizer by the question name. | ||
*/ | ||
getVisualizer(dataName: string): VisualizerBase; | ||
/** | ||
* Fires when element visibility has been changed. | ||
* options: | ||
* elements - panel elements array | ||
* changed - changed element | ||
* reason - reason (string) why event fired: "ADDED", "MOVED" or "REMOVED" | ||
*/ | ||
onVisibleElementsChanged: Event<(sender: VisualizationPanel, options: any) => any, any>; | ||
visibleElementsChanged(element: IVisualizerPanelElement): void; | ||
protected visibleElementsChanged(element: IVisualizerPanelElement, reason: string): void; | ||
/** | ||
* Destroys given visualizer. | ||
* Fires when vizualization panel state changed. | ||
* sender - this panel | ||
* state - new state of the panel | ||
*/ | ||
destroyVisualizer(visualizer: VisualizerBase): void; | ||
onStateChanged: Event<(sender: VisualizationPanel, options: any) => any, any>; | ||
/** | ||
* Renders given element. | ||
* Renders given panel element. | ||
*/ | ||
renderVisualizer(element: IVisualizerPanelElement): HTMLDivElement; | ||
protected renderPanelElement(element: IVisualizerPanelRenderedElement): HTMLElement; | ||
protected renderToolbar(container: HTMLElement): void; | ||
@@ -221,11 +323,9 @@ /** | ||
/** | ||
* Updates visualizer and all inner content. | ||
* Method for clearing all rendered elements from outside. | ||
*/ | ||
update(data: Array<{ | ||
[index: string]: any; | ||
}>): void; | ||
clear(): void; | ||
/** | ||
* Updates visualizer and all inner content. | ||
* Redraws visualizer toobar and all inner content. | ||
*/ | ||
refresh(hard?: boolean): void; | ||
refresh(): void; | ||
/** | ||
@@ -240,14 +340,22 @@ * Updates layout of visualizer inner content. | ||
/** | ||
* Applies filter to the data and update visualizers. | ||
* Gets vizualization panel state. | ||
*/ | ||
applyFilter(): void; | ||
get state(): IState; | ||
/** | ||
* Sets vizualization panel state. | ||
*/ | ||
set state(newState: IState); | ||
destroy(): void; | ||
} | ||
export class VisualizationPanelDynamic extends VisualizerBase { | ||
protected _panelVisualizer: VisualizationPanel; | ||
constructor(question: Question, data: Array<{ | ||
[index: string]: any; | ||
}>, options?: Object); | ||
readonly name: string; | ||
update(data: Array<{ | ||
}>, options?: { | ||
[index: string]: any; | ||
}); | ||
get name(): string; | ||
updateData(data: Array<{ | ||
[index: string]: any; | ||
}>): void; | ||
@@ -263,3 +371,3 @@ getQuestions(): IQuestion[]; | ||
}>, options?: Object); | ||
readonly name: string; | ||
get name(): string; | ||
getQuestions(): Question[]; | ||
@@ -272,6 +380,8 @@ } | ||
[index: string]: any; | ||
}>, options?: Object); | ||
readonly name: string; | ||
update(data: Array<{ | ||
}>, options?: { | ||
[index: string]: any; | ||
}); | ||
get name(): string; | ||
updateData(data: Array<{ | ||
[index: string]: any; | ||
}>): void; | ||
@@ -283,2 +393,14 @@ getQuestions(): import("survey-core").Question[]; | ||
export class AlternativeVisualizersWrapper extends VisualizerBase { | ||
constructor(visualizers: Array<VisualizerBase>, question: Question, data: Array<{ | ||
[index: string]: any; | ||
}>, options?: Object); | ||
protected visualizerContainer: HTMLElement; | ||
updateData(data: Array<{ | ||
[index: string]: any; | ||
}>): void; | ||
protected renderContent(container: HTMLElement): void; | ||
destroy(): void; | ||
} | ||
import "./datatables.scss"; | ||
@@ -293,2 +415,3 @@ interface DataTablesOptions { | ||
export class DataTables extends Table { | ||
datatableApi: any; | ||
currentPageNumber: number; | ||
@@ -305,10 +428,5 @@ /** | ||
protected onColumnsChanged(): void; | ||
columns: Array<ITableColumn>; | ||
update(hard?: boolean): void; | ||
readonly isRendered: boolean; | ||
groupBy: Array<string>; | ||
destroy(): void; | ||
setColumnVisibility(columnName: string, visibility: ColumnVisibility): void; | ||
setColumnLocation(columnName: string, location: QuestionLocation): void; | ||
createActionContainer(): HTMLDivElement; | ||
applyFilter(value: string): void; | ||
@@ -318,2 +436,4 @@ applyColumnFilter(columnName: string, value: string): void; | ||
setPageSize(value: number): void; | ||
setPageNumber(value: number): void; | ||
getPageNumber(): number; | ||
render(targetNode: HTMLElement): void; | ||
@@ -324,5 +444,15 @@ doStateSave(): void; | ||
getColumns(): Array<Object>; | ||
onColumnSelected: (dataName: string) => void; | ||
layout(): void; | ||
} | ||
export class DatatablesRow extends TableRow { | ||
protected table: Table; | ||
protected extensionsContainer: HTMLElement; | ||
protected detailsContainer: HTMLElement; | ||
constructor(table: Table, extensionsContainer: HTMLElement, detailsContainer: HTMLElement, _innerRow: any); | ||
get innerRow(): any; | ||
getElement(): HTMLElement; | ||
getData(): HTMLElement; | ||
getDataPosition(): number; | ||
remove(): void; | ||
} | ||
export {}; | ||
@@ -338,2 +468,3 @@ | ||
columnMinWidth: number; | ||
actionsColumnWidth: number; | ||
paginationButtonCount: number; | ||
@@ -345,13 +476,9 @@ downloadOptions: IDownloadOptions; | ||
constructor(survey: SurveyModel, data: Array<Object>, options: IOptions, _columns?: Array<any>, isTrustedAccess?: boolean); | ||
detailButtonCreators: Array<(columnName?: string) => HTMLElement>; | ||
tabulatorTables: any; | ||
render: (targetNode: HTMLElement) => void; | ||
createToolsContainer: () => HTMLElement; | ||
createHeader: () => HTMLElement; | ||
createPaginationElement: () => HTMLElement; | ||
destroy: () => void; | ||
columnMovedCallback: (column: any, columns: any[]) => void; | ||
rowFormatter: (row: any) => void; | ||
protected getTitleFormatter: (cell: any, formatterParams: any, onRendered: any, columnName: any) => HTMLDivElement; | ||
getColumnTitle: (titleStr: string) => HTMLElement; | ||
getHeaderActions: (columnName: string) => HTMLDivElement; | ||
protected getTitleFormatter: (cell: any, formatterParams: any, onRendered: any, columnName: any) => HTMLElement; | ||
getHeaderActions: (columnName: string) => HTMLElement; | ||
protected getColumns: () => any; | ||
@@ -363,6 +490,19 @@ setColumnVisibility(columnName: string, visibility: ColumnVisibility): void; | ||
applyFilter(value: string): void; | ||
getPageNumber(): number; | ||
setPageNumber(value: number): void; | ||
setPageSize(value: number): void; | ||
download(type: string): void; | ||
update(): void; | ||
layout(): void; | ||
} | ||
export class TabulatorRow extends TableRow { | ||
protected table: Table; | ||
protected extensionsContainer: HTMLElement; | ||
protected detailsContainer: HTMLElement; | ||
protected innerRow: any; | ||
constructor(table: Table, extensionsContainer: HTMLElement, detailsContainer: HTMLElement, innerRow: any); | ||
getElement(): HTMLElement; | ||
getData(): HTMLElement; | ||
getDataPosition(): number; | ||
remove(): void; | ||
} | ||
export {}; | ||
@@ -372,3 +512,3 @@ | ||
constructor(model: WordCloud); | ||
readonly wordcloud: any; | ||
get wordcloud(): any; | ||
create(node: HTMLElement): any; | ||
@@ -381,3 +521,3 @@ destroy(node: HTMLElement): void; | ||
}>, options?: Object); | ||
readonly name: string; | ||
get name(): string; | ||
getData(): (string | number)[][]; | ||
@@ -403,3 +543,3 @@ protected destroyContent(container: HTMLElement): void; | ||
}>, options?: Object); | ||
readonly name: string; | ||
get name(): string; | ||
getData(): { | ||
@@ -425,45 +565,126 @@ columnsCount: number; | ||
} | ||
export interface IState { | ||
locale: string; | ||
elements: IVisualizerPanelElement[]; | ||
} | ||
export class LayoutEngine { | ||
protected _allowed: boolean; | ||
constructor(_allowed: boolean); | ||
protected startCore(container: HTMLElement): void; | ||
protected stopCore(): void; | ||
protected updateCore(): void; | ||
get allowed(): boolean; | ||
start(container: HTMLElement): void; | ||
stop(): void; | ||
update(): void; | ||
add(elements: Array<HTMLElement>, options?: any): void; | ||
remove(elements: Array<HTMLElement>, options?: any): void; | ||
onMoveCallback: (fromIndex: number, toIndex: number) => void; | ||
destroy(): void; | ||
} | ||
export class MuuriLayoutEngine extends LayoutEngine { | ||
constructor(allowed: boolean, _selector: string); | ||
protected startCore(container: HTMLElement): void; | ||
protected stopCore(): void; | ||
protected updateCore(): void; | ||
add(elements: Array<HTMLElement>, options?: any): void; | ||
remove(elements: Array<HTMLElement>, options?: any): void; | ||
} | ||
export abstract class Table { | ||
protected survey: SurveyModel; | ||
protected data: Array<Object>; | ||
protected options: any; | ||
protected _columns: Array<any>; | ||
protected isTrustedAccess: boolean; | ||
protected tableData: any; | ||
constructor(survey: SurveyModel, data: Array<Object>, options: any, _columns?: Array<any>, isTrustedAccess?: boolean); | ||
protected _rows: TableRow[]; | ||
protected rowDetails: { | ||
[rowName: string]: Details; | ||
}; | ||
onColumnsVisibilityChanged: Event<(sender: Table, options: any) => any, any>; | ||
onColumnsLocationChanged: Event<(sender: Table, options: any) => any, any>; | ||
onRowCreated: Event<(sender: Table, options: any) => any, any>; | ||
onTableToolsCreated: Event<(sender: Table, options: any) => any, any>; | ||
onColumnToolsCreated: Event<(sender: Table, options: any) => any, any>; | ||
renderDetailActions: (container: HTMLElement, row: TableRow) => HTMLElement; | ||
getData(): Object[]; | ||
abstract render(targetNode: HTMLElement): void; | ||
abstract applyFilter(value: string): void; | ||
abstract applyColumnFilter(columnName: string, value: string): void; | ||
abstract sortByColumn(columnName: string, direction: string): void; | ||
abstract setPageSize(value: number): void; | ||
protected getCreatedRows(): TableRow[]; | ||
protected buildColumns: (survey: SurveyModel) => { | ||
name: string; | ||
displayName: string; | ||
dataType: ColumnDataType; | ||
visibility: ColumnVisibility; | ||
location: QuestionLocation; | ||
}[]; | ||
isVisible: (visibility: ColumnVisibility) => boolean; | ||
readonly columns: any[]; | ||
protected getAvailableColumns: () => any[]; | ||
protected initTableData(data: Array<any>): void; | ||
setColumnLocation(columnName: string, location: QuestionLocation): void; | ||
setColumnVisibility(columnName: string, visibility: ColumnVisibility): void; | ||
getColumnVisibility(columnName: string): ColumnVisibility; | ||
doStateSave(): void; | ||
stateSaveCallback(settings: any, data: any): void; | ||
protected survey: SurveyModel; | ||
protected data: Array<Object>; | ||
protected options: any; | ||
protected _columns: Array<any>; | ||
isTrustedAccess: boolean; | ||
protected tableData: any; | ||
protected extensions: TableExtensions; | ||
constructor(survey: SurveyModel, data: Array<Object>, options: any, _columns: Array<any>, isTrustedAccess: boolean); | ||
protected renderResult: HTMLElement; | ||
protected currentPageSize: number; | ||
protected currentPageNumber: number; | ||
protected _rows: TableRow[]; | ||
onColumnsVisibilityChanged: Event<(sender: Table, options: any) => any, any>; | ||
onColumnsLocationChanged: Event<(sender: Table, options: any) => any, any>; | ||
onRowRemoved: Event<(sender: Table, options: any) => any, any>; | ||
renderDetailActions: (container: HTMLElement, row: TableRow) => HTMLElement; | ||
getData(): Object[]; | ||
abstract render(targetNode: HTMLElement): void; | ||
abstract applyFilter(value: string): void; | ||
abstract applyColumnFilter(columnName: string, value: string): void; | ||
abstract sortByColumn(columnName: string, direction: string): void; | ||
getPageNumber(): number; | ||
setPageNumber(value: number): void; | ||
getPageSize(): number; | ||
setPageSize(value: number): void; | ||
getCreatedRows(): TableRow[]; | ||
clearCreatedRows(): void; | ||
protected buildColumns: (survey: SurveyModel) => { | ||
name: string; | ||
displayName: string; | ||
dataType: ColumnDataType; | ||
visibility: ColumnVisibility; | ||
location: QuestionLocation; | ||
}[]; | ||
isColumnVisible(column: any): boolean; | ||
isVisible: (visibility: ColumnVisibility) => boolean; | ||
isAvailable: (visibility: ColumnVisibility) => boolean; | ||
getAvailableColumns: () => Array<ITableColumn>; | ||
get columns(): Array<ITableColumn>; | ||
set columns(columns: Array<ITableColumn>); | ||
protected initTableData(data: Array<any>): void; | ||
setColumnLocation(columnName: string, location: QuestionLocation): void; | ||
setColumnVisibility(columnName: string, visibility: ColumnVisibility): void; | ||
getColumnVisibility(columnName: string): ColumnVisibility; | ||
doStateSave(): void; | ||
stateSaveCallback(settings: any, data: any): void; | ||
removeRow(row: TableRow): void; | ||
/** | ||
* Returns current locale of the table. | ||
* If locales more than one, the language selection dropdown will be added in the toolbar | ||
*/ | ||
get locale(): string; | ||
/** | ||
* Sets locale for table. | ||
*/ | ||
set locale(newLocale: string); | ||
getLocales(): Array<string>; | ||
refresh(hard?: boolean): void; | ||
destroy(): void; | ||
get isRendered(): boolean; | ||
/** | ||
* Vizualization panel state getter. | ||
*/ | ||
get state(): ITableState; | ||
/** | ||
* Vizualization panel state setter. | ||
*/ | ||
set state(newState: ITableState); | ||
/** | ||
* Fires when vizualization panel state changed. | ||
*/ | ||
onStateChanged: Event<(sender: Table, options: any) => any, any>; | ||
} | ||
export abstract class TableRow { | ||
protected table: Table; | ||
protected extensionsContainer: HTMLElement; | ||
protected detailsContainer: HTMLElement; | ||
constructor(table: Table, extensionsContainer: HTMLElement, detailsContainer: HTMLElement); | ||
details: Details; | ||
extensions: TableExtensions; | ||
onToggleDetails: Event<(sender: TableRow, options: any) => any, any>; | ||
abstract getElement(): HTMLElement; | ||
abstract getData(): any; | ||
abstract getDataPosition(): number; | ||
protected isSelected: boolean; | ||
render(): void; | ||
openDetails(): void; | ||
closeDetails(): void; | ||
toggleDetails(): void; | ||
getIsSelected(): boolean; | ||
toggleSelect(): void; | ||
remove(): void; | ||
destroy(): void; | ||
} | ||
@@ -491,2 +712,6 @@ export enum ColumnVisibility { | ||
} | ||
export interface ITableState { | ||
locale: string; | ||
elements: ITableColumn[]; | ||
} | ||
@@ -497,3 +722,3 @@ export class PlotlyChartAdapter { | ||
protected patchConfigParameters(chartNode: object, traces: Array<object>, layout: object, config: object): void; | ||
readonly chart: Promise<import("plotly.js").PlotlyHTMLElement>; | ||
get chart(): Promise<import("plotly.js").PlotlyHTMLElement>; | ||
create(chartNode: HTMLElement): any; | ||
@@ -515,3 +740,3 @@ destroy(node: HTMLElement): void; | ||
constructor(model: GaugePlotly); | ||
readonly chart: Promise<import("plotly.js").PlotlyHTMLElement>; | ||
get chart(): Promise<import("plotly.js").PlotlyHTMLElement>; | ||
create(chartNode: HTMLElement): any; | ||
@@ -551,48 +776,7 @@ destroy(node: HTMLElement): void; | ||
export abstract class TableRow { | ||
export class Details { | ||
protected table: Table; | ||
protected toolsContainer: HTMLElement; | ||
protected detailsContainer: HTMLElement; | ||
renderDetailActions: (container: HTMLElement, data: any, tableRow: TableRow) => HTMLElement; | ||
constructor(table: Table, toolsContainer: HTMLElement, detailsContainer: HTMLElement, renderDetailActions: (container: HTMLElement, data: any, tableRow: TableRow) => HTMLElement); | ||
details: Details; | ||
tools: RowTools; | ||
onToggleDetails: Event<(sender: TableRow, options: any) => any, any>; | ||
abstract getElement(): HTMLElement; | ||
abstract getData(): any; | ||
getIsDetailsExpanded(): boolean; | ||
render(): void; | ||
openDetails(): void; | ||
closeDetails(): void; | ||
toggleDetails(): void; | ||
} | ||
export class TabulatorRow extends TableRow { | ||
protected table: Table; | ||
protected toolsContainer: HTMLElement; | ||
protected detailsContainer: HTMLElement; | ||
protected innerRow: any; | ||
renderDetailActions: (container: HTMLElement, tableRow: any) => HTMLElement; | ||
constructor(table: Table, toolsContainer: HTMLElement, detailsContainer: HTMLElement, innerRow: any, renderDetailActions: (container: HTMLElement, tableRow: any) => HTMLElement); | ||
getElement(): HTMLElement; | ||
getData(): HTMLElement; | ||
} | ||
export class DatatablesRow extends TableRow { | ||
protected table: Table; | ||
protected toolsContainer: HTMLElement; | ||
protected detailsContainer: HTMLElement; | ||
renderDetailActions: (container: HTMLElement, tableRow: any) => HTMLElement; | ||
constructor(table: Table, toolsContainer: HTMLElement, detailsContainer: HTMLElement, _innerRow: any, renderDetailActions: (container: HTMLElement, tableRow: any) => HTMLElement); | ||
readonly innerRow: any; | ||
getElement(): HTMLElement; | ||
getData(): HTMLElement; | ||
} | ||
export class RowTools { | ||
constructor(targetNode: HTMLElement, table: Table, row: TableRow); | ||
actions: ((row: TableRow, table: Table) => HTMLElement)[]; | ||
render(): void; | ||
protected createDetailsBtn: (row: TableRow) => HTMLButtonElement; | ||
} | ||
export class Details { | ||
constructor(table: Table, row: TableRow, targetNode: HTMLElement, renderActions: any); | ||
setContainer(targetNode: HTMLElement): void; | ||
protected targetNode: HTMLElement; | ||
constructor(table: Table, row: TableRow, targetNode: HTMLElement); | ||
protected location: string; | ||
open(): void; | ||
@@ -603,5 +787,20 @@ protected createShowAsColumnButton: (columnName: string) => HTMLElement; | ||
interface ITableExtension { | ||
location: string; | ||
name: string; | ||
visibleIndex: number; | ||
render: (table: Table, opt: any) => HTMLElement; | ||
destroy?: () => void; | ||
} | ||
export class TableExtensions { | ||
constructor(table: Table); | ||
render(targetNode: HTMLElement, location: string, options?: any): void; | ||
destroy(): void; | ||
static registerExtension(extension: ITableExtension): void; | ||
static findExtension(location: string, actionName: string): ITableExtension; | ||
} | ||
export {}; | ||
export class SelectBase extends VisualizerBase { | ||
orderByAnsweres: string; | ||
static otherCommentCollapsed: boolean; | ||
constructor(question: Question, data: Array<{ | ||
@@ -612,3 +811,3 @@ [index: string]: any; | ||
chartType: string; | ||
readonly name: string; | ||
get name(): string; | ||
protected onChartTypeChanged(): void; | ||
@@ -618,13 +817,8 @@ protected setChartType(chartType: string): void; | ||
setSelection(item: ItemValue): void; | ||
readonly selection: ItemValue; | ||
get selection(): ItemValue; | ||
setLabelsOrder(value: string): void; | ||
onDataItemSelected: (selectedValue: any, selectedText: string) => void; | ||
update(data: Array<{ | ||
[index: string]: any; | ||
}>): void; | ||
protected renderFooter(container: HTMLElement): void; | ||
valuesSource(): Array<ItemValue>; | ||
getValues(): Array<any>; | ||
getLabels(): Array<string>; | ||
getData(): any[]; | ||
} | ||
@@ -640,8 +834,9 @@ | ||
[index: string]: any; | ||
}>, options?: Object); | ||
readonly name: string; | ||
update(data: Array<{ | ||
}>, options?: { | ||
[index: string]: any; | ||
}>): void; | ||
protected createToolbarItems(toolbar: HTMLDivElement): void; | ||
}); | ||
protected onDataChanged(): void; | ||
get name(): string; | ||
protected onChartTypeChanged(): void; | ||
protected setChartType(chartType: string): void; | ||
destroy(): void; | ||
@@ -658,5 +853,7 @@ generateText(maxValue: number, minValue: number, stepsCount: number): any; | ||
}>, options?: Object); | ||
readonly name: string; | ||
protected get matrixQuestion(): QuestionMatrixModel; | ||
get name(): string; | ||
getSeriesValues(): Array<string>; | ||
getSeriesLabels(): Array<string>; | ||
getSelectedItemByText(itemText: string): any; | ||
valuesSource(): Array<ItemValue>; | ||
@@ -672,4 +869,4 @@ getData(): any[]; | ||
}>, options?: Object); | ||
readonly name: string; | ||
readonly booleanQuestion: QuestionBooleanModel; | ||
get name(): string; | ||
get booleanQuestion(): QuestionBooleanModel; | ||
static trueColor: string; | ||
@@ -680,5 +877,4 @@ static falseColor: string; | ||
getLabels(): Array<string>; | ||
getData(): any[]; | ||
} | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
3833010
33533
2