survey-analytics 1.9.89 → 1.9.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/package.json +6 -20
- package/survey-analytics-datatables.types/analytics-localization/arabic.d.ts +66 -0
- package/survey-analytics-datatables.types/analytics-localization/dutch.d.ts +49 -0
- package/survey-analytics-datatables.types/analytics-localization/english.d.ts +70 -0
- package/survey-analytics-datatables.types/analytics-localization/farsi.d.ts +20 -0
- package/survey-analytics-datatables.types/analytics-localization/french.d.ts +46 -0
- package/survey-analytics-datatables.types/analytics-localization/german.d.ts +52 -0
- package/survey-analytics-datatables.types/analytics-localization/norwegian.d.ts +39 -0
- package/survey-analytics-datatables.types/analytics-localization/portuguese.d.ts +70 -0
- package/survey-analytics-datatables.types/analytics-localization/russian.d.ts +34 -0
- package/survey-analytics-datatables.types/entries/datatables.d.ts +17 -0
- package/survey-analytics-datatables.types/localizationManager.d.ts +85 -0
- package/survey-analytics-datatables.types/tables/columnbuilder.d.ts +38 -0
- package/survey-analytics-datatables.types/tables/columns.d.ts +71 -0
- package/survey-analytics-datatables.types/tables/config.d.ts +39 -0
- package/survey-analytics-datatables.types/tables/datatables.d.ts +51 -0
- package/survey-analytics-datatables.types/tables/extensions/columnextensions.d.ts +1 -0
- package/survey-analytics-datatables.types/tables/extensions/detailsextensions.d.ts +13 -0
- package/survey-analytics-datatables.types/tables/extensions/headerextensions.d.ts +1 -0
- package/survey-analytics-datatables.types/tables/extensions/rowextensions.d.ts +1 -0
- package/survey-analytics-datatables.types/tables/extensions/tableextensions.d.ts +22 -0
- package/survey-analytics-datatables.types/tables/table.d.ts +153 -0
- package/survey-analytics-datatables.types/utils/index.d.ts +37 -0
- package/survey-analytics-tabulator.types/analytics-localization/arabic.d.ts +66 -0
- package/survey-analytics-tabulator.types/analytics-localization/dutch.d.ts +49 -0
- package/survey-analytics-tabulator.types/analytics-localization/english.d.ts +70 -0
- package/survey-analytics-tabulator.types/analytics-localization/farsi.d.ts +20 -0
- package/survey-analytics-tabulator.types/analytics-localization/french.d.ts +46 -0
- package/survey-analytics-tabulator.types/analytics-localization/german.d.ts +52 -0
- package/survey-analytics-tabulator.types/analytics-localization/norwegian.d.ts +39 -0
- package/survey-analytics-tabulator.types/analytics-localization/portuguese.d.ts +70 -0
- package/survey-analytics-tabulator.types/analytics-localization/russian.d.ts +34 -0
- package/survey-analytics-tabulator.types/entries/tabulator.d.ts +17 -0
- package/survey-analytics-tabulator.types/localizationManager.d.ts +85 -0
- package/survey-analytics-tabulator.types/tables/columnbuilder.d.ts +38 -0
- package/survey-analytics-tabulator.types/tables/columns.d.ts +71 -0
- package/survey-analytics-tabulator.types/tables/config.d.ts +39 -0
- package/survey-analytics-tabulator.types/tables/custom_jspdf_font.d.ts +1 -0
- package/survey-analytics-tabulator.types/tables/extensions/columnextensions.d.ts +1 -0
- package/survey-analytics-tabulator.types/tables/extensions/detailsextensions.d.ts +13 -0
- package/survey-analytics-tabulator.types/tables/extensions/headerextensions.d.ts +1 -0
- package/survey-analytics-tabulator.types/tables/extensions/rowextensions.d.ts +1 -0
- package/survey-analytics-tabulator.types/tables/extensions/tableextensions.d.ts +22 -0
- package/survey-analytics-tabulator.types/tables/table.d.ts +153 -0
- package/survey-analytics-tabulator.types/tables/tabulator.d.ts +83 -0
- package/survey-analytics-tabulator.types/utils/index.d.ts +37 -0
- package/survey-analytics.types/alternativeVizualizersWrapper.d.ts +41 -0
- package/survey-analytics.types/analytics-localization/arabic.d.ts +66 -0
- package/survey-analytics.types/analytics-localization/dutch.d.ts +49 -0
- package/survey-analytics.types/analytics-localization/english.d.ts +70 -0
- package/survey-analytics.types/analytics-localization/farsi.d.ts +20 -0
- package/survey-analytics.types/analytics-localization/french.d.ts +46 -0
- package/survey-analytics.types/analytics-localization/german.d.ts +52 -0
- package/survey-analytics.types/analytics-localization/italian.d.ts +69 -0
- package/survey-analytics.types/analytics-localization/norwegian.d.ts +39 -0
- package/survey-analytics.types/analytics-localization/portuguese.d.ts +70 -0
- package/survey-analytics.types/analytics-localization/russian.d.ts +34 -0
- package/survey-analytics.types/analytics-localization/spanish.d.ts +51 -0
- package/survey-analytics.types/boolean.d.ts +16 -0
- package/survey-analytics.types/choices-table.d.ts +17 -0
- package/survey-analytics.types/config.d.ts +38 -0
- package/survey-analytics.types/dataProvider.d.ts +40 -0
- package/survey-analytics.types/entries/summary.d.ts +30 -0
- package/survey-analytics.types/filterInfo.d.ts +11 -0
- package/survey-analytics.types/histogram.d.ts +38 -0
- package/survey-analytics.types/layoutEngine.d.ts +40 -0
- package/survey-analytics.types/localizationManager.d.ts +85 -0
- package/survey-analytics.types/matrix.d.ts +17 -0
- package/survey-analytics.types/matrixDropdownGrouped.d.ts +14 -0
- package/survey-analytics.types/number.d.ts +25 -0
- package/survey-analytics.types/plotly/boolean.d.ts +16 -0
- package/survey-analytics.types/plotly/histogram.d.ts +12 -0
- package/survey-analytics.types/plotly/index.d.ts +8 -0
- package/survey-analytics.types/plotly/matrix.d.ts +11 -0
- package/survey-analytics.types/plotly/matrixdropdown-grouped.d.ts +11 -0
- package/survey-analytics.types/plotly/ranking.d.ts +7 -0
- package/survey-analytics.types/plotly/rating.d.ts +20 -0
- package/survey-analytics.types/plotly/selectBase.d.ts +24 -0
- package/survey-analytics.types/plotly/setup.d.ts +29 -0
- package/survey-analytics.types/selectBase.d.ts +112 -0
- package/survey-analytics.types/text.d.ts +21 -0
- package/survey-analytics.types/utils/index.d.ts +37 -0
- package/survey-analytics.types/visualizationManager.d.ts +52 -0
- package/survey-analytics.types/visualizationMatrixDropdown.d.ts +23 -0
- package/survey-analytics.types/visualizationMatrixDynamic.d.ts +9 -0
- package/survey-analytics.types/visualizationPanel.d.ts +371 -0
- package/survey-analytics.types/visualizationPanelDynamic.d.ts +23 -0
- package/survey-analytics.types/visualizerBase.d.ts +257 -0
- package/survey-analytics.types/visualizerFactory.d.ts +20 -0
- package/survey-analytics.types/wordcloud/stopwords/dutch.d.ts +1 -0
- package/survey-analytics.types/wordcloud/stopwords/english.d.ts +1 -0
- package/survey-analytics.types/wordcloud/stopwords/index.d.ts +3 -0
- package/survey-analytics.types/wordcloud/stopwords/norwegian.d.ts +1 -0
- package/survey-analytics.types/wordcloud/stopwords/spanish.d.ts +1 -0
- package/survey-analytics.types/wordcloud/wordcloud.d.ts +25 -0
- package/survey.analytics.css +1 -1
- package/survey.analytics.d.ts +1 -2133
- package/survey.analytics.datatables/index.d.ts.d.ts +891 -0
- package/survey.analytics.datatables/survey.analytics.datatables.css +325 -0
- package/survey.analytics.datatables/survey.analytics.datatables.js +38982 -0
- package/survey.analytics.datatables/survey.analytics.datatables.min.css +7 -0
- package/survey.analytics.datatables/survey.analytics.datatables.min.js +29 -0
- package/survey.analytics.datatables.css +1 -1
- package/survey.analytics.datatables.d.ts +1 -1012
- package/survey.analytics.datatables.js +1 -1
- package/survey.analytics.datatables.min.css +1 -1
- package/survey.analytics.datatables.min.js +1 -1
- package/survey.analytics.js +40 -2
- package/survey.analytics.min.css +1 -1
- package/survey.analytics.min.js +1 -1
- package/survey.analytics.tabulator.css +1 -1
- package/survey.analytics.tabulator.d.ts +1 -1047
- package/survey.analytics.tabulator.js +1 -1
- package/survey.analytics.tabulator.min.css +1 -1
- package/survey.analytics.tabulator.min.js +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Question } from "survey-core";
|
|
2
|
+
import { Matrix } from "../matrix";
|
|
3
|
+
export declare class MatrixPlotly extends Matrix {
|
|
4
|
+
private _chartAdapter;
|
|
5
|
+
static types: string[];
|
|
6
|
+
constructor(question: Question, data: Array<{
|
|
7
|
+
[index: string]: any;
|
|
8
|
+
}>, options?: Object, name?: string);
|
|
9
|
+
protected destroyContent(container: HTMLElement): void;
|
|
10
|
+
protected renderContent(container: HTMLElement): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { QuestionMatrixDropdownModel } from "survey-core";
|
|
2
|
+
import { MatrixDropdownGrouped } from "../matrixDropdownGrouped";
|
|
3
|
+
export declare class MatrixDropdownGroupedPlotly extends MatrixDropdownGrouped {
|
|
4
|
+
private _chartAdapter;
|
|
5
|
+
static types: string[];
|
|
6
|
+
constructor(question: QuestionMatrixDropdownModel, data: Array<{
|
|
7
|
+
[index: string]: any;
|
|
8
|
+
}>, options?: Object, name?: string);
|
|
9
|
+
protected destroyContent(container: HTMLElement): void;
|
|
10
|
+
protected renderContent(container: HTMLElement): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SelectBasePlotly } from "./selectBase";
|
|
2
|
+
export declare class RankingPlotly extends SelectBasePlotly {
|
|
3
|
+
getQuestionResults(): any[];
|
|
4
|
+
getEmptyData(): any;
|
|
5
|
+
getData(): any[];
|
|
6
|
+
applyResultToPlotlyData(result: any[], plotlyData: any, choices: any): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Question } from "survey-core";
|
|
2
|
+
import { NumberModel } from "../number";
|
|
3
|
+
export declare class PlotlyGaugeAdapter {
|
|
4
|
+
private model;
|
|
5
|
+
private _chart;
|
|
6
|
+
constructor(model: GaugePlotly);
|
|
7
|
+
get chart(): Promise<Plotly.PlotlyHTMLElement>;
|
|
8
|
+
create(chartNode: HTMLElement): any;
|
|
9
|
+
destroy(node: HTMLElement): void;
|
|
10
|
+
}
|
|
11
|
+
export declare class GaugePlotly extends NumberModel {
|
|
12
|
+
private _chartAdapter;
|
|
13
|
+
static displayModeBar: any;
|
|
14
|
+
static types: string[];
|
|
15
|
+
constructor(question: Question, data: Array<{
|
|
16
|
+
[index: string]: any;
|
|
17
|
+
}>, options?: Object, name?: string);
|
|
18
|
+
protected destroyContent(container: HTMLElement): void;
|
|
19
|
+
protected renderContent(container: HTMLElement): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Question } from "survey-core";
|
|
2
|
+
import { SelectBase } from "../selectBase";
|
|
3
|
+
export declare class PlotlyChartAdapter {
|
|
4
|
+
protected model: SelectBase;
|
|
5
|
+
private _chart;
|
|
6
|
+
constructor(model: SelectBase);
|
|
7
|
+
protected patchConfigParameters(chartNode: object, traces: Array<object>, layout: object, config: object): void;
|
|
8
|
+
get chart(): Promise<Plotly.PlotlyHTMLElement>;
|
|
9
|
+
create(chartNode: HTMLElement): any;
|
|
10
|
+
destroy(node: HTMLElement): void;
|
|
11
|
+
}
|
|
12
|
+
export declare class SelectBasePlotly extends SelectBase {
|
|
13
|
+
private _chartAdapter;
|
|
14
|
+
static types: string[];
|
|
15
|
+
static displayModeBar: any;
|
|
16
|
+
constructor(question: Question, data: Array<{
|
|
17
|
+
[index: string]: any;
|
|
18
|
+
}>, options?: {
|
|
19
|
+
[index: string]: any;
|
|
20
|
+
}, name?: string);
|
|
21
|
+
protected destroyContent(container: HTMLElement): void;
|
|
22
|
+
protected renderContent(container: HTMLElement): void;
|
|
23
|
+
getData(): any[];
|
|
24
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Event } from "survey-core";
|
|
2
|
+
import { SelectBase } from "../selectBase";
|
|
3
|
+
import { VisualizerBase } from "../visualizerBase";
|
|
4
|
+
export interface PlotlyOptions {
|
|
5
|
+
traces: Array<any>;
|
|
6
|
+
layout: any;
|
|
7
|
+
hasSeries: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class PlotlySetup {
|
|
10
|
+
static imageExportFormat: string;
|
|
11
|
+
/**
|
|
12
|
+
* Fires when end user clicks on the 'save as image' button.
|
|
13
|
+
*/
|
|
14
|
+
static onImageSaving: Event<(sender: SelectBase, options: any) => any, SelectBase, any>;
|
|
15
|
+
/**
|
|
16
|
+
* Fires before plot will be created. User can change traces, layout and config of the plot.
|
|
17
|
+
* Options is an object with the following fields: traces, layout and config of the plot.
|
|
18
|
+
*/
|
|
19
|
+
static onPlotCreating: Event<(sender: VisualizerBase, options: any) => any, VisualizerBase, any>;
|
|
20
|
+
static setups: {
|
|
21
|
+
[type: string]: (model: SelectBase) => PlotlyOptions;
|
|
22
|
+
};
|
|
23
|
+
static setup(charType: string, model: SelectBase): PlotlyOptions;
|
|
24
|
+
static getTruncatedLabel: (label: string, labelTruncateLength: number) => string;
|
|
25
|
+
static setupPie(model: SelectBase): PlotlyOptions;
|
|
26
|
+
static setupBar(model: SelectBase): PlotlyOptions;
|
|
27
|
+
static setupVBar(model: SelectBase): PlotlyOptions;
|
|
28
|
+
static setupScatter(model: SelectBase): PlotlyOptions;
|
|
29
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Question, ItemValue, Event } from "survey-core";
|
|
2
|
+
import { VisualizerBase } from "./visualizerBase";
|
|
3
|
+
export interface IVisualizerWithSelection {
|
|
4
|
+
selection: ItemValue;
|
|
5
|
+
onDataItemSelected: (selectedValue: any, selectedText: string) => void;
|
|
6
|
+
setSelection(item: ItemValue): void;
|
|
7
|
+
}
|
|
8
|
+
export interface IAnswersData {
|
|
9
|
+
datasets: Array<Array<any>>;
|
|
10
|
+
labels: Array<string>;
|
|
11
|
+
colors: Array<string>;
|
|
12
|
+
texts: Array<Array<any>>;
|
|
13
|
+
seriesLabels: Array<string>;
|
|
14
|
+
}
|
|
15
|
+
export declare class SelectBase extends VisualizerBase implements IVisualizerWithSelection {
|
|
16
|
+
protected selectedItem: ItemValue;
|
|
17
|
+
private choicesOrderSelector;
|
|
18
|
+
private showPercentageBtn;
|
|
19
|
+
private emptyAnswersBtn;
|
|
20
|
+
private transposeDataBtn;
|
|
21
|
+
private topNSelector;
|
|
22
|
+
private _showPercentages;
|
|
23
|
+
private _showOnlyPercentages;
|
|
24
|
+
private _percentagePrecision;
|
|
25
|
+
protected _answersOrder: string;
|
|
26
|
+
protected _supportSelection: boolean;
|
|
27
|
+
private _hideEmptyAnswers;
|
|
28
|
+
private _topN;
|
|
29
|
+
static topNValuesDefaults: number[];
|
|
30
|
+
topNValues: any[];
|
|
31
|
+
private _transposeData;
|
|
32
|
+
private _showMissingAnswers;
|
|
33
|
+
private missingAnswersBtn;
|
|
34
|
+
constructor(question: Question, data: Array<{
|
|
35
|
+
[index: string]: any;
|
|
36
|
+
}>, options?: any, name?: string);
|
|
37
|
+
protected chartTypes: string[];
|
|
38
|
+
protected _chartType: string;
|
|
39
|
+
/**
|
|
40
|
+
* Chart type - current chart type.
|
|
41
|
+
*/
|
|
42
|
+
get chartType(): string;
|
|
43
|
+
set chartType(newChartType: string);
|
|
44
|
+
private updateEmptyAnswersBtn;
|
|
45
|
+
private updateTransposeDataBtn;
|
|
46
|
+
private updateOrderSelector;
|
|
47
|
+
private updateShowPercentageBtn;
|
|
48
|
+
private updateTopNSelector;
|
|
49
|
+
private updateMissingAnswersBtn;
|
|
50
|
+
protected onChartTypeChanged(): void;
|
|
51
|
+
protected setChartType(chartType: string): void;
|
|
52
|
+
protected getCorrectAnswerText(): string;
|
|
53
|
+
getSelectedItemByText(itemText: string): any;
|
|
54
|
+
setSelection(item: ItemValue): void;
|
|
55
|
+
get selection(): ItemValue;
|
|
56
|
+
/**
|
|
57
|
+
* Gets and sets whether chart should show percentages only.
|
|
58
|
+
*/
|
|
59
|
+
get showOnlyPercentages(): boolean;
|
|
60
|
+
set showOnlyPercentages(val: boolean);
|
|
61
|
+
/**
|
|
62
|
+
* Gets and sets whether chart should show values and percentages.
|
|
63
|
+
*/
|
|
64
|
+
get showPercentages(): boolean;
|
|
65
|
+
set showPercentages(val: boolean);
|
|
66
|
+
/**
|
|
67
|
+
* Gets and sets chart elements order.
|
|
68
|
+
*/
|
|
69
|
+
get answersOrder(): string;
|
|
70
|
+
set answersOrder(value: string);
|
|
71
|
+
/**
|
|
72
|
+
* Set to true if need to hide empty chart elements (e.g. bars vith zero value).
|
|
73
|
+
*/
|
|
74
|
+
get hideEmptyAnswers(): boolean;
|
|
75
|
+
set hideEmptyAnswers(value: boolean);
|
|
76
|
+
get transposeData(): boolean;
|
|
77
|
+
set transposeData(value: boolean);
|
|
78
|
+
/**
|
|
79
|
+
* Set to some value if need to show top N chart elements.
|
|
80
|
+
*/
|
|
81
|
+
get topN(): number;
|
|
82
|
+
set topN(value: number);
|
|
83
|
+
protected isSupportMissingAnswers(): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Set to true if you want to see chart elements for missing answers (e.g. radiogroup items never been selected by surveyee).
|
|
86
|
+
*/
|
|
87
|
+
get showMissingAnswers(): boolean;
|
|
88
|
+
set showMissingAnswers(value: boolean);
|
|
89
|
+
refreshContent(): void;
|
|
90
|
+
onDataItemSelected: (selectedValue: any, selectedText: string) => void;
|
|
91
|
+
get showValuesInOriginalOrder(): boolean;
|
|
92
|
+
valuesSource(): Array<ItemValue>;
|
|
93
|
+
getValues(): Array<any>;
|
|
94
|
+
getLabels(): Array<string>;
|
|
95
|
+
getPercentages(): Array<Array<number>>;
|
|
96
|
+
protected hideEmptyAnswersInData(answersData: IAnswersData): IAnswersData;
|
|
97
|
+
protected answersDataReady(answersData: IAnswersData): any;
|
|
98
|
+
/**
|
|
99
|
+
* Fires when answer data has been combined before they passed to draw graph.
|
|
100
|
+
* options - the answers data object containing: datasets, labels, colors, additional texts (percentage).
|
|
101
|
+
* options fields can be modified
|
|
102
|
+
*/
|
|
103
|
+
onAnswersDataReady: Event<(sender: SelectBase, options: any) => any, SelectBase, any>;
|
|
104
|
+
/**
|
|
105
|
+
* Returns object with all infotmation for data visualization: datasets, labels, colors, additional texts (percentage).
|
|
106
|
+
*/
|
|
107
|
+
getAnswersData(): IAnswersData;
|
|
108
|
+
protected transpose(data: Array<Array<number>>): Array<Array<number>>;
|
|
109
|
+
private static _stateProperties;
|
|
110
|
+
getState(): any;
|
|
111
|
+
setState(state: any): void;
|
|
112
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Question } from "survey-core";
|
|
2
|
+
import { VisualizerBase } from "./visualizerBase";
|
|
3
|
+
export declare class TextTableAdapter {
|
|
4
|
+
private model;
|
|
5
|
+
constructor(model: Text);
|
|
6
|
+
create(container: HTMLElement): void;
|
|
7
|
+
destroy(node: HTMLElement): void;
|
|
8
|
+
}
|
|
9
|
+
export declare class Text extends VisualizerBase {
|
|
10
|
+
private _textTableAdapter;
|
|
11
|
+
constructor(question: Question, data: Array<{
|
|
12
|
+
[index: string]: any;
|
|
13
|
+
}>, options?: Object, name?: string);
|
|
14
|
+
getData(): {
|
|
15
|
+
columnsCount: number;
|
|
16
|
+
data: string[][];
|
|
17
|
+
};
|
|
18
|
+
protected destroyContent(container: HTMLElement): void;
|
|
19
|
+
protected renderContent(container: HTMLElement): void;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare class DocumentHelper {
|
|
2
|
+
static createSelector(options: Array<{
|
|
3
|
+
value: string;
|
|
4
|
+
text: string;
|
|
5
|
+
}>, isSelected: (option: {
|
|
6
|
+
value: string;
|
|
7
|
+
text: string;
|
|
8
|
+
}) => boolean, handler: (e: any) => void): HTMLDivElement;
|
|
9
|
+
static createButton(handler: (e: any) => void, text?: string, className?: string): HTMLElement;
|
|
10
|
+
static createElement(tagName: string, className?: string, attrs?: any): HTMLElement;
|
|
11
|
+
static createSvgElement(path: string): SVGSVGElement;
|
|
12
|
+
static createSvgButton(path: string): HTMLButtonElement;
|
|
13
|
+
static createSvgToggleButton(svgPath1: string, svPpath2: string, text1: string, text2: string, handler1: (e: any) => any, handler2: (e: any) => any, state?: string, className?: string): HTMLElement;
|
|
14
|
+
static createInput(className: string, placeholder?: string, defaultValue?: string): HTMLInputElement;
|
|
15
|
+
}
|
|
16
|
+
export declare var options: {
|
|
17
|
+
runningInBrowser: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare function allowDomRendering(): boolean;
|
|
20
|
+
export declare function createCommercialLicenseLink(): HTMLElement;
|
|
21
|
+
export declare class DataHelper {
|
|
22
|
+
static zipArrays(...arrays: any[]): any[][];
|
|
23
|
+
static unzipArrays(zipArray: any[][]): any[][];
|
|
24
|
+
static sortDictionary(keys: any[], values: any[], desc: boolean): {
|
|
25
|
+
keys: any[];
|
|
26
|
+
values: any[];
|
|
27
|
+
};
|
|
28
|
+
static toPercentage(value: number, maxValue: number): number;
|
|
29
|
+
}
|
|
30
|
+
export declare function createLinksContainer(links: Array<{
|
|
31
|
+
name: string;
|
|
32
|
+
content: any;
|
|
33
|
+
}>): HTMLElement;
|
|
34
|
+
export declare function createImagesContainer(links: Array<{
|
|
35
|
+
name: string;
|
|
36
|
+
content: any;
|
|
37
|
+
}>): HTMLElement;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Question } from "survey-core";
|
|
2
|
+
declare type VisualizerConstructor = new (question: Question, data: Array<{
|
|
3
|
+
[index: string]: any;
|
|
4
|
+
}>, options?: Object) => any;
|
|
5
|
+
/**
|
|
6
|
+
* An object with methods used to register and unregister visualizers for individual question types.
|
|
7
|
+
*
|
|
8
|
+
* [View Demo](https://surveyjs.io/dashboard/examples/visualize-answers-from-text-entry-fields-with-charts/ (linkStyle))
|
|
9
|
+
*/
|
|
10
|
+
export declare class VisualizationManager {
|
|
11
|
+
static alternativesVisualizer: any;
|
|
12
|
+
static vizualizers: {
|
|
13
|
+
[index: string]: Array<VisualizerConstructor>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Registers a visualizer for a specified question type.
|
|
17
|
+
*
|
|
18
|
+
* [View Demo](https://surveyjs.io/dashboard/examples/visualize-answers-from-text-entry-fields-with-charts/ (linkStyle))
|
|
19
|
+
* @param questionType A question [type](https://surveyjs.io/form-library/documentation/api-reference/question#getType).
|
|
20
|
+
* @param constructor A function that returns a visualizer constructor to register.
|
|
21
|
+
*/
|
|
22
|
+
static registerVisualizer(questionType: string, constructor: VisualizerConstructor): void;
|
|
23
|
+
/**
|
|
24
|
+
* Unregisters a visualizer for a specified question type.
|
|
25
|
+
*
|
|
26
|
+
* [View Demo](https://surveyjs.io/dashboard/examples/visualize-answers-from-text-entry-fields-with-charts/ (linkStyle))
|
|
27
|
+
* @param questionType A question [type](https://surveyjs.io/form-library/documentation/api-reference/question#getType).
|
|
28
|
+
* @param constructor A function that returns a visualizer constructor to unregister.
|
|
29
|
+
*/
|
|
30
|
+
static unregisterVisualizer(questionType: string, constructor: VisualizerConstructor): void;
|
|
31
|
+
/**
|
|
32
|
+
* Unregisters a visualizer for all question types.
|
|
33
|
+
* @param constructor A function that returns a visualizer constructor to unregister.
|
|
34
|
+
*/
|
|
35
|
+
static unregisterVisualizerForAll(constructor: VisualizerConstructor): void;
|
|
36
|
+
/**
|
|
37
|
+
* Returns all visualizer constructors for a specified question type.
|
|
38
|
+
* @param questionType A question [type](https://surveyjs.io/form-library/documentation/api-reference/question#getType).
|
|
39
|
+
*/
|
|
40
|
+
static getVisualizersByType(questionType: string): VisualizerConstructor[];
|
|
41
|
+
/**
|
|
42
|
+
* Returns a constructor for an alternative visualizer selector.
|
|
43
|
+
* @see registerAlternativesVisualizer
|
|
44
|
+
*/
|
|
45
|
+
static getAlternativesVisualizer(): any;
|
|
46
|
+
/**
|
|
47
|
+
* Registers an alternative visualizer selector.
|
|
48
|
+
* @param constructor A function that returns a constructor for an alternative visualizer selector.
|
|
49
|
+
*/
|
|
50
|
+
static registerAlternativesVisualizer(constructor: any): void;
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { QuestionMatrixDropdownModel } from "survey-core";
|
|
2
|
+
import { VisualizerBase } from "./visualizerBase";
|
|
3
|
+
export declare class VisualizationMatrixDropdown extends VisualizerBase {
|
|
4
|
+
protected _matrixDropdownVisualizer: VisualizerBase;
|
|
5
|
+
private readonly _childOptions;
|
|
6
|
+
constructor(question: QuestionMatrixDropdownModel, data: Array<{
|
|
7
|
+
[index: string]: any;
|
|
8
|
+
}>, options?: {
|
|
9
|
+
[index: string]: any;
|
|
10
|
+
}, name?: string);
|
|
11
|
+
protected setLocale(newLocale: string): void;
|
|
12
|
+
get matrixDropdownVisualizer(): VisualizerBase;
|
|
13
|
+
private onPanelAfterRenderCallback;
|
|
14
|
+
private updateDropdownVisualizerData;
|
|
15
|
+
updateData(data: Array<{
|
|
16
|
+
[index: string]: any;
|
|
17
|
+
}>): void;
|
|
18
|
+
protected onDataChanged(): void;
|
|
19
|
+
getQuestions(): any[];
|
|
20
|
+
destroyContent(container: HTMLElement): void;
|
|
21
|
+
renderContent(container: HTMLElement): void;
|
|
22
|
+
destroy(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Question } from "survey-core";
|
|
2
|
+
import { VisualizationPanelDynamic } from "./visualizationPanelDynamic";
|
|
3
|
+
export declare class VisualizationMatrixDynamic extends VisualizationPanelDynamic {
|
|
4
|
+
constructor(question: Question, data: Array<{
|
|
5
|
+
[index: string]: any;
|
|
6
|
+
}>, options?: Object);
|
|
7
|
+
get type(): string;
|
|
8
|
+
getQuestions(): Question[];
|
|
9
|
+
}
|