survey-analytics 2.5.16 → 3.0.0-beta.1
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/fesm/shared.mjs +759 -3180
- package/fesm/shared.mjs.map +1 -1
- package/fesm/shared2.mjs +10561 -8296
- package/fesm/shared2.mjs.map +1 -1
- package/fesm/shared3.mjs +4844 -0
- package/fesm/shared3.mjs.map +1 -0
- package/fesm/shared4.mjs +42 -0
- package/fesm/shared4.mjs.map +1 -0
- package/fesm/survey.analytics.apexcharts.mjs +1082 -0
- package/fesm/survey.analytics.apexcharts.mjs.map +1 -0
- package/fesm/survey.analytics.core.mjs +3 -3
- package/fesm/survey.analytics.mjs +7 -755
- package/fesm/survey.analytics.mjs.map +1 -1
- package/fesm/survey.analytics.mongo.mjs +1 -1
- package/fesm/survey.analytics.plotly.mjs +13 -0
- package/fesm/survey.analytics.plotly.mjs.map +1 -0
- package/fesm/survey.analytics.tabulator.mjs +341 -193
- package/fesm/survey.analytics.tabulator.mjs.map +1 -1
- package/fesm/themes/index.mjs +1942 -0
- package/fesm/themes/index.mjs.map +1 -0
- package/package.json +39 -10
- package/survey-analytics-plotly.types/alternativeVizualizersWrapper.d.ts +73 -0
- package/survey-analytics-plotly.types/analytics-localization/arabic.d.ts +100 -0
- package/survey-analytics-plotly.types/analytics-localization/dutch.d.ts +100 -0
- package/survey-analytics-plotly.types/analytics-localization/english.d.ts +142 -0
- package/survey-analytics-plotly.types/analytics-localization/farsi.d.ts +100 -0
- package/survey-analytics-plotly.types/analytics-localization/finnish.d.ts +100 -0
- package/survey-analytics-plotly.types/analytics-localization/french.d.ts +100 -0
- package/survey-analytics-plotly.types/analytics-localization/german.d.ts +100 -0
- package/survey-analytics-plotly.types/analytics-localization/italian.d.ts +100 -0
- package/survey-analytics-plotly.types/analytics-localization/japanese.d.ts +100 -0
- package/survey-analytics-plotly.types/analytics-localization/norwegian.d.ts +100 -0
- package/survey-analytics-plotly.types/analytics-localization/polish.d.ts +100 -0
- package/survey-analytics-plotly.types/analytics-localization/portuguese.d.ts +100 -0
- package/survey-analytics-plotly.types/analytics-localization/russian.d.ts +100 -0
- package/survey-analytics-plotly.types/analytics-localization/spanish.d.ts +100 -0
- package/survey-analytics-plotly.types/analytics-localization/swedish.d.ts +100 -0
- package/survey-analytics-plotly.types/axisDescription.d.ts +6 -0
- package/survey-analytics-plotly.types/boolean.d.ts +15 -0
- package/survey-analytics-plotly.types/card.d.ts +29 -0
- package/survey-analytics-plotly.types/chartConfig.d.ts +9 -0
- package/survey-analytics-plotly.types/config.d.ts +35 -0
- package/survey-analytics-plotly.types/dashboard.d.ts +51 -0
- package/survey-analytics-plotly.types/dataProvider.d.ts +69 -0
- package/survey-analytics-plotly.types/entries/plotly.d.ts +2 -0
- package/survey-analytics-plotly.types/entries/summary.core.d.ts +46 -0
- package/survey-analytics-plotly.types/filterInfo.d.ts +11 -0
- package/survey-analytics-plotly.types/histogram.d.ts +102 -0
- package/{survey-analytics.types/layoutEngine.d.ts → survey-analytics-plotly.types/layout-engine.d.ts} +0 -12
- package/survey-analytics-plotly.types/localizationManager.d.ts +164 -0
- package/survey-analytics-plotly.types/matrix.d.ts +17 -0
- package/survey-analytics-plotly.types/matrixDropdownGrouped.d.ts +15 -0
- package/survey-analytics-plotly.types/muuri-layout-engine.d.ts +13 -0
- package/survey-analytics-plotly.types/nps.d.ts +37 -0
- package/survey-analytics-plotly.types/number.d.ts +27 -0
- package/survey-analytics-plotly.types/pivot.d.ts +71 -0
- package/{survey-analytics.types → survey-analytics-plotly.types}/plotly/chart-adapter.d.ts +11 -2
- package/survey-analytics-plotly.types/plotly/setup.d.ts +150 -0
- package/survey-analytics-plotly.types/ranking.d.ts +12 -0
- package/survey-analytics-plotly.types/selectBase.d.ts +117 -0
- package/survey-analytics-plotly.types/sideBarItemCreators.d.ts +7 -0
- package/survey-analytics-plotly.types/statisticCalculators.d.ts +9 -0
- package/survey-analytics-plotly.types/statistics-table.d.ts +28 -0
- package/survey-analytics-plotly.types/svgbundle.d.ts +2 -0
- package/survey-analytics-plotly.types/text.d.ts +25 -0
- package/survey-analytics-plotly.types/theme.d.ts +51 -0
- package/survey-analytics-plotly.types/themes/default-light.d.ts +965 -0
- package/survey-analytics-plotly.types/utils/calculationDateRanges.d.ts +35 -0
- package/survey-analytics-plotly.types/utils/dateRangeModel.d.ts +32 -0
- package/survey-analytics-plotly.types/utils/dateRangeWidget.d.ts +38 -0
- package/survey-analytics-plotly.types/utils/documentHelper.d.ts +28 -0
- package/survey-analytics-plotly.types/utils/dropdownActionWidget.d.ts +34 -0
- package/survey-analytics-plotly.types/utils/dropdownBase.d.ts +48 -0
- package/survey-analytics-plotly.types/utils/dropdownWidget.d.ts +46 -0
- package/survey-analytics-plotly.types/utils/editableSeriesListWidget.d.ts +34 -0
- package/survey-analytics-plotly.types/utils/elementVisibilityAction.d.ts +22 -0
- package/survey-analytics-plotly.types/utils/index.d.ts +25 -0
- package/survey-analytics-plotly.types/utils/sidebarWidget.d.ts +48 -0
- package/survey-analytics-plotly.types/utils/toggle.d.ts +17 -0
- package/survey-analytics-plotly.types/utils/utils.d.ts +9 -0
- package/survey-analytics-plotly.types/visualizationComposite.d.ts +8 -0
- package/survey-analytics-plotly.types/visualizationManager.d.ts +61 -0
- package/survey-analytics-plotly.types/visualizationMatrixDropdown.d.ts +23 -0
- package/survey-analytics-plotly.types/visualizationMatrixDynamic.d.ts +8 -0
- package/survey-analytics-plotly.types/visualizationPanel.d.ts +464 -0
- package/survey-analytics-plotly.types/visualizationPanelDynamic.d.ts +20 -0
- package/survey-analytics-plotly.types/visualizer-interfaces.d.ts +25 -0
- package/survey-analytics-plotly.types/visualizerBase.d.ts +435 -0
- package/survey-analytics-plotly.types/visualizerDescription.d.ts +4 -0
- package/survey-analytics-plotly.types/visualizerFactory.d.ts +41 -0
- package/survey-analytics-plotly.types/wordcloud/stopwords/dutch.d.ts +1 -0
- package/survey-analytics-plotly.types/wordcloud/stopwords/english.d.ts +1 -0
- package/survey-analytics-plotly.types/wordcloud/stopwords/index.d.ts +3 -0
- package/survey-analytics-plotly.types/wordcloud/stopwords/norwegian.d.ts +1 -0
- package/survey-analytics-plotly.types/wordcloud/stopwords/spanish.d.ts +1 -0
- package/survey-analytics-plotly.types/wordcloud/widget.d.ts +38 -0
- package/survey-analytics-plotly.types/wordcloud/wordcloud.d.ts +28 -0
- package/survey-analytics-tabulator.types/analytics-localization/english.d.ts +40 -0
- package/survey-analytics-tabulator.types/entries/tabulator.d.ts +2 -25
- package/survey-analytics-tabulator.types/entries/tabulator.fontless.d.ts +26 -0
- package/survey-analytics-tabulator.types/localizationManager.d.ts +40 -0
- package/survey-analytics-tabulator.types/tables/columnbuilder.d.ts +16 -16
- package/survey-analytics-tabulator.types/tables/columns.d.ts +18 -18
- package/survey-analytics-tabulator.types/tables/config.d.ts +2 -2
- package/survey-analytics-tabulator.types/tables/extensions/footerextensions.d.ts +1 -0
- package/survey-analytics-tabulator.types/tables/extensions/tableextensions.d.ts +2 -1
- package/survey-analytics-tabulator.types/tables/table-interfaces.d.ts +56 -0
- package/survey-analytics-tabulator.types/tables/table.d.ts +4 -48
- package/survey-analytics-tabulator.types/tables/tabulator.d.ts +9 -1
- package/survey-analytics-tabulator.types/theme.d.ts +51 -0
- package/survey-analytics-tabulator.types/themes/default-light.d.ts +965 -0
- package/survey-analytics-tabulator.types/utils/documentHelper.d.ts +28 -0
- package/survey-analytics-tabulator.types/utils/dropdownActionWidget.d.ts +34 -0
- package/survey-analytics-tabulator.types/utils/dropdownBase.d.ts +48 -0
- package/survey-analytics-tabulator.types/utils/index.d.ts +1 -15
- package/survey-analytics.types/alternativeVizualizersWrapper.d.ts +9 -4
- package/survey-analytics.types/analytics-localization/english.d.ts +40 -0
- package/survey-analytics.types/apexcharts/chart-adapter.d.ts +29 -0
- package/survey-analytics.types/apexcharts/index.d.ts +2 -0
- package/survey-analytics.types/apexcharts/setup.d.ts +200 -0
- package/survey-analytics.types/axisDescription.d.ts +6 -0
- package/survey-analytics.types/boolean.d.ts +1 -1
- package/survey-analytics.types/card.d.ts +29 -0
- package/survey-analytics.types/chartConfig.d.ts +9 -0
- package/survey-analytics.types/config.d.ts +1 -33
- package/survey-analytics.types/dashboard.d.ts +51 -0
- package/survey-analytics.types/dataProvider.d.ts +17 -0
- package/survey-analytics.types/entries/apexcharts.d.ts +2 -0
- package/survey-analytics.types/entries/apexcharts.fontless.d.ts +2 -0
- package/survey-analytics.types/entries/summary.core.d.ts +9 -1
- package/survey-analytics.types/histogram.d.ts +29 -13
- package/survey-analytics.types/layout-engine.d.ts +29 -0
- package/survey-analytics.types/localizationManager.d.ts +40 -0
- package/survey-analytics.types/matrix.d.ts +3 -2
- package/survey-analytics.types/matrixDropdownGrouped.d.ts +3 -2
- package/survey-analytics.types/muuri-layout-engine.d.ts +13 -0
- package/survey-analytics.types/nps.d.ts +5 -10
- package/survey-analytics.types/number.d.ts +8 -7
- package/survey-analytics.types/pivot.d.ts +42 -40
- package/survey-analytics.types/ranking.d.ts +3 -2
- package/survey-analytics.types/selectBase.d.ts +13 -15
- package/survey-analytics.types/sideBarItemCreators.d.ts +7 -0
- package/survey-analytics.types/statisticCalculators.d.ts +8 -13
- package/survey-analytics.types/statistics-table.d.ts +2 -2
- package/survey-analytics.types/text.d.ts +4 -3
- package/survey-analytics.types/theme.d.ts +51 -0
- package/survey-analytics.types/themes/default-light.d.ts +965 -0
- package/survey-analytics.types/utils/calculationDateRanges.d.ts +35 -0
- package/survey-analytics.types/utils/dateRangeModel.d.ts +32 -0
- package/survey-analytics.types/utils/dateRangeWidget.d.ts +38 -0
- package/survey-analytics.types/utils/documentHelper.d.ts +28 -0
- package/survey-analytics.types/utils/dropdownActionWidget.d.ts +34 -0
- package/survey-analytics.types/utils/dropdownBase.d.ts +48 -0
- package/survey-analytics.types/utils/dropdownWidget.d.ts +46 -0
- package/survey-analytics.types/utils/editableSeriesListWidget.d.ts +34 -0
- package/survey-analytics.types/utils/elementVisibilityAction.d.ts +22 -0
- package/survey-analytics.types/utils/index.d.ts +1 -15
- package/survey-analytics.types/utils/sidebarWidget.d.ts +48 -0
- package/survey-analytics.types/utils/toggle.d.ts +17 -0
- package/survey-analytics.types/utils/utils.d.ts +9 -0
- package/survey-analytics.types/visualizationComposite.d.ts +1 -1
- package/survey-analytics.types/visualizationManager.d.ts +6 -5
- package/survey-analytics.types/visualizationMatrixDropdown.d.ts +2 -1
- package/survey-analytics.types/visualizationMatrixDynamic.d.ts +1 -1
- package/survey-analytics.types/visualizationPanel.d.ts +20 -3
- package/survey-analytics.types/visualizationPanelDynamic.d.ts +4 -3
- package/survey-analytics.types/visualizer-interfaces.d.ts +25 -0
- package/survey-analytics.types/visualizerBase.d.ts +80 -12
- package/survey-analytics.types/visualizerDescription.d.ts +4 -0
- package/survey-analytics.types/visualizerFactory.d.ts +11 -2
- package/survey-analytics.types/wordcloud/wordcloud.d.ts +6 -4
- package/survey.analytics.core.css +1534 -122
- package/survey.analytics.core.css.map +1 -1
- package/survey.analytics.core.d.ts +1 -0
- package/survey.analytics.core.js +6118 -1229
- package/survey.analytics.core.js.map +1 -1
- package/survey.analytics.core.min.css +11 -6
- package/survey.analytics.core.min.js +1 -1
- package/survey.analytics.core.min.js.LICENSE.txt +1 -1
- package/survey.analytics.css +1900 -129
- package/survey.analytics.css.map +1 -1
- package/survey.analytics.d.ts +2 -2
- package/survey.analytics.fontless.css +2009 -0
- package/survey.analytics.fontless.css.map +1 -0
- package/survey.analytics.fontless.min.css +16 -0
- package/survey.analytics.js +9764 -4539
- package/survey.analytics.js.map +1 -1
- package/survey.analytics.min.css +13 -6
- package/survey.analytics.min.js +1 -1
- package/survey.analytics.min.js.LICENSE.txt +1 -1
- package/survey.analytics.mongo.d.ts +1 -0
- package/survey.analytics.mongo.js +2 -2
- package/survey.analytics.mongo.js.map +1 -1
- package/survey.analytics.mongo.min.js +1 -1
- package/survey.analytics.mongo.min.js.LICENSE.txt +1 -1
- package/survey.analytics.plotly.css +2094 -0
- package/survey.analytics.plotly.css.map +1 -0
- package/survey.analytics.plotly.d.ts +2 -0
- package/survey.analytics.plotly.fontless.css +1872 -0
- package/survey.analytics.plotly.fontless.css.map +1 -0
- package/survey.analytics.plotly.fontless.min.css +15 -0
- package/survey.analytics.plotly.js +24673 -0
- package/survey.analytics.plotly.js.map +1 -0
- package/survey.analytics.plotly.min.css +16 -0
- package/survey.analytics.plotly.min.js +2 -0
- package/survey.analytics.plotly.min.js.LICENSE.txt +22 -0
- package/survey.analytics.tabulator.css +1005 -132
- package/survey.analytics.tabulator.css.map +1 -1
- package/survey.analytics.tabulator.d.ts +1 -0
- package/survey.analytics.tabulator.fontless.css +1134 -0
- package/survey.analytics.tabulator.fontless.css.map +1 -0
- package/survey.analytics.tabulator.fontless.min.css +6 -0
- package/survey.analytics.tabulator.js +2719 -476
- package/survey.analytics.tabulator.js.map +1 -1
- package/survey.analytics.tabulator.min.css +3 -2
- package/survey.analytics.tabulator.min.js +1 -1
- package/survey.analytics.tabulator.min.js.LICENSE.txt +1 -1
- package/themes/default-dark.js +1032 -0
- package/themes/default-dark.js.map +1 -0
- package/themes/default-dark.min.js +2 -0
- package/themes/default-dark.min.js.LICENSE.txt +5 -0
- package/themes/default-light.js +1032 -0
- package/themes/default-light.js.map +1 -0
- package/themes/default-light.min.js +2 -0
- package/themes/default-light.min.js.LICENSE.txt +5 -0
- package/themes/index.js +2063 -0
- package/themes/index.js.map +1 -0
- package/themes/index.min.js +2 -0
- package/themes/index.min.js.LICENSE.txt +5 -0
- package/themes/themes/default-dark.d.ts +965 -0
- package/themes/themes/default-light.d.ts +965 -0
- package/themes/themes/index.d.ts +1934 -0
- package/themes/utils/helpers.d.ts +8 -0
- package/survey-analytics.types/plotly/setup.d.ts +0 -32
- /package/{survey-analytics.types/entries/summary.d.ts → survey-analytics-plotly.types/entries/plotly.fontless.d.ts} +0 -0
- /package/{survey-analytics.types → survey-analytics-plotly.types}/plotly/index.d.ts +0 -0
- /package/{survey-analytics.types → survey-analytics-plotly.types}/plotly/legacy.d.ts +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Question, Event } from "survey-core";
|
|
2
2
|
import { DataProvider, GetDataFn } from "./dataProvider";
|
|
3
|
+
import { DashboardTheme, IDashboardTheme } from "./theme";
|
|
4
|
+
import { SidebarWidget } from "./utils/sidebarWidget";
|
|
5
|
+
import { SideBarItemCreators } from "./sideBarItemCreators";
|
|
3
6
|
import "./visualizerBase.scss";
|
|
4
7
|
export interface IChartAdapter {
|
|
5
8
|
getChartTypes(): string[];
|
|
@@ -7,6 +10,28 @@ export interface IChartAdapter {
|
|
|
7
10
|
update(chartNode: HTMLElement): Promise<any>;
|
|
8
11
|
destroy(node: HTMLElement): void;
|
|
9
12
|
}
|
|
13
|
+
export interface ICalculatedDataInfo {
|
|
14
|
+
dataPath?: string;
|
|
15
|
+
valueNames: Array<string>;
|
|
16
|
+
seriesNames?: Array<string>;
|
|
17
|
+
getLabel?(value: string): string;
|
|
18
|
+
getSeriesLabel?(series: string): string;
|
|
19
|
+
}
|
|
20
|
+
export declare type ICalculationResult<T = number> = {
|
|
21
|
+
data: Array<Array<T>>;
|
|
22
|
+
values: Array<string>;
|
|
23
|
+
series?: Array<string>;
|
|
24
|
+
};
|
|
25
|
+
export interface IAnswersData {
|
|
26
|
+
datasets: Array<Array<any>>;
|
|
27
|
+
values: Array<string>;
|
|
28
|
+
labels: Array<string>;
|
|
29
|
+
colors: Array<string>;
|
|
30
|
+
texts: Array<Array<any>>;
|
|
31
|
+
seriesLabels: Array<string>;
|
|
32
|
+
labelsTitle?: string;
|
|
33
|
+
valuesTitle?: string;
|
|
34
|
+
}
|
|
10
35
|
export interface IDataInfo {
|
|
11
36
|
name: string;
|
|
12
37
|
dataPath?: string;
|
|
@@ -16,12 +41,16 @@ export interface IDataInfo {
|
|
|
16
41
|
getSeriesValues(): Array<string>;
|
|
17
42
|
getSeriesLabels(): Array<string>;
|
|
18
43
|
}
|
|
44
|
+
export type ToolbarItemType = "button" | "dropdown" | "filter" | "license";
|
|
19
45
|
type ToolbarItemCreators = {
|
|
20
46
|
[name: string]: {
|
|
21
47
|
creator: (toolbar?: HTMLDivElement) => HTMLElement;
|
|
22
|
-
|
|
48
|
+
type: ToolbarItemType;
|
|
49
|
+
index: number;
|
|
50
|
+
groupIndex: number;
|
|
23
51
|
};
|
|
24
52
|
};
|
|
53
|
+
export { IVisualizerOptions } from "./visualizer-interfaces";
|
|
25
54
|
export declare class PostponeHelper {
|
|
26
55
|
static postponeFunction: (fn: () => void, timeout?: number) => any;
|
|
27
56
|
static postpone(fn: () => void, timeout?: number): any;
|
|
@@ -60,7 +89,10 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
60
89
|
private _type?;
|
|
61
90
|
static haveCommercialLicense: boolean;
|
|
62
91
|
static suppressVisualizerStubRendering: boolean;
|
|
63
|
-
static chartAdapterType: any;
|
|
92
|
+
static get chartAdapterType(): any;
|
|
93
|
+
static set chartAdapterType(value: any);
|
|
94
|
+
private _appliedTheme;
|
|
95
|
+
private _theme;
|
|
64
96
|
private _showToolbar;
|
|
65
97
|
private _footerVisualizer;
|
|
66
98
|
private _dataProvider;
|
|
@@ -127,7 +159,25 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
127
159
|
protected stateChanged(name: string, value: any): void;
|
|
128
160
|
protected toolbarItemCreators: ToolbarItemCreators;
|
|
129
161
|
onGetToolbarItemCreators: () => ToolbarItemCreators;
|
|
162
|
+
protected sideBarItemCreators: SideBarItemCreators;
|
|
163
|
+
onGetSideBarItemCreators: () => SideBarItemCreators;
|
|
164
|
+
protected _sidebarWidget: SidebarWidget | undefined;
|
|
130
165
|
protected getToolbarItemCreators(): ToolbarItemCreators;
|
|
166
|
+
protected createSidebarPanelButton(_toolbar?: HTMLDivElement): HTMLElement;
|
|
167
|
+
/**
|
|
168
|
+
* Registers a sidebar item creator by name. The item will be rendered in the sidebar panel when the sidebar button is used.
|
|
169
|
+
* @param name Unique name for the sidebar item.
|
|
170
|
+
* @param creator Function that receives the panel container and returns an HTMLElement to be appended.
|
|
171
|
+
* @param index Optional order index (default 100). Lower values appear first.
|
|
172
|
+
* @param groupIndex Optional group index (default 0). Items are ordered by group first, then by index within group.
|
|
173
|
+
*/
|
|
174
|
+
registerSideBarItem(name: string, creator: (container: HTMLDivElement) => HTMLElement, index?: number, groupIndex?: number): void;
|
|
175
|
+
/**
|
|
176
|
+
* Unregisters a sidebar item creator.
|
|
177
|
+
* @param name Name of the sidebar item to remove.
|
|
178
|
+
* @returns The previously registered creator function, or undefined.
|
|
179
|
+
*/
|
|
180
|
+
unregisterSideBarItem(name: string): ((container: HTMLDivElement) => HTMLElement) | undefined;
|
|
131
181
|
constructor(question: Question, data: Array<{
|
|
132
182
|
[index: string]: any;
|
|
133
183
|
}> | GetDataFn, options?: {
|
|
@@ -135,6 +185,8 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
135
185
|
}, _type?: string);
|
|
136
186
|
protected get questionOptions(): any;
|
|
137
187
|
protected onDataChanged(): void;
|
|
188
|
+
protected getName(): string;
|
|
189
|
+
protected get allowChangeType(): any;
|
|
138
190
|
/**
|
|
139
191
|
* Returns the identifier of a visualized question.
|
|
140
192
|
*/
|
|
@@ -167,6 +219,7 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
167
219
|
getSeriesLabels(): Array<string>;
|
|
168
220
|
getValues(): Array<any>;
|
|
169
221
|
getLabels(): Array<string>;
|
|
222
|
+
getChartAdapter(): IChartAdapter;
|
|
170
223
|
/**
|
|
171
224
|
* Registers a function used to create a toolbar item for this visualizer.
|
|
172
225
|
*
|
|
@@ -211,7 +264,7 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
211
264
|
* @param creator A function that accepts the toolbar and should return an `HTMLElement` with the toolbar item.
|
|
212
265
|
* @see unregisterToolbarItem
|
|
213
266
|
*/
|
|
214
|
-
registerToolbarItem(name: string, creator: (toolbar?: HTMLDivElement) => HTMLElement,
|
|
267
|
+
registerToolbarItem(name: string, creator: (toolbar?: HTMLDivElement) => HTMLElement, type: ToolbarItemType, index?: number, groupIndex?: number): void;
|
|
215
268
|
/**
|
|
216
269
|
*
|
|
217
270
|
* Unregisters a function used to create a toolbar item. Allows you to remove a toolbar item.
|
|
@@ -229,6 +282,7 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
229
282
|
* Returns the visualizer's type.
|
|
230
283
|
*/
|
|
231
284
|
get type(): string;
|
|
285
|
+
get dataType(): string;
|
|
232
286
|
/**
|
|
233
287
|
* @deprecated Use [`surveyData`](https://surveyjs.io/dashboard/documentation/api-reference/visualizationpanel#surveyData) instead.
|
|
234
288
|
*/
|
|
@@ -260,8 +314,11 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
260
314
|
* If you want to empty and delete the visualizer and all its elements from the DOM, call the [`destroy()`](https://surveyjs.io/dashboard/documentation/api-reference/visualizerbase#destroy) method instead.
|
|
261
315
|
*/
|
|
262
316
|
clear(): void;
|
|
317
|
+
getSortedToolbarItemCreators(): Array<any>;
|
|
263
318
|
protected createToolbarItems(toolbar: HTMLDivElement): void;
|
|
264
319
|
protected getCorrectAnswerText(): string;
|
|
320
|
+
resetContentFilter(): void;
|
|
321
|
+
protected renderBanner(container: HTMLElement): void;
|
|
265
322
|
protected destroyToolbar(container: HTMLElement): void;
|
|
266
323
|
protected renderToolbar(container: HTMLElement): void;
|
|
267
324
|
protected destroyHeader(container: HTMLElement): void;
|
|
@@ -278,7 +335,7 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
278
335
|
* Renders the visualizer in a specified container.
|
|
279
336
|
* @param targetElement An `HTMLElement` or an `id` of a page element in which you want to render the visualizer.
|
|
280
337
|
*/
|
|
281
|
-
render(targetElement: HTMLElement | string): void;
|
|
338
|
+
render(targetElement: HTMLElement | string, isRoot?: boolean): void;
|
|
282
339
|
updateToolbar(): void;
|
|
283
340
|
protected isSupportSoftUpdateContent(): boolean;
|
|
284
341
|
protected softUpdateContent(): void;
|
|
@@ -288,16 +345,21 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
288
345
|
* Re-renders the visualizer and its content.
|
|
289
346
|
*/
|
|
290
347
|
refresh(): void;
|
|
348
|
+
refreshContent(): void;
|
|
291
349
|
protected processText(text: string): string;
|
|
292
350
|
getRandomColor(): any;
|
|
293
351
|
private _backgroundColor;
|
|
294
|
-
get backgroundColor():
|
|
295
|
-
set backgroundColor(value:
|
|
296
|
-
protected getBackgroundColorCore():
|
|
352
|
+
get backgroundColor(): any;
|
|
353
|
+
set backgroundColor(value: any);
|
|
354
|
+
protected getBackgroundColorCore(): any;
|
|
297
355
|
protected setBackgroundColorCore(color: string): void;
|
|
356
|
+
protected onThemeChanged(): void;
|
|
357
|
+
get theme(): DashboardTheme;
|
|
358
|
+
set theme(theme: DashboardTheme);
|
|
359
|
+
applyTheme(theme: IDashboardTheme): void;
|
|
298
360
|
static customColors: string[];
|
|
299
361
|
private static colors;
|
|
300
|
-
getColors(count?: number): any;
|
|
362
|
+
static getColors(count?: number): any;
|
|
301
363
|
/**
|
|
302
364
|
* Gets or sets the visibility of the visualizer's toolbar.
|
|
303
365
|
*
|
|
@@ -310,17 +372,23 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
310
372
|
*/
|
|
311
373
|
getData(): any;
|
|
312
374
|
private _calculationsCache;
|
|
313
|
-
protected getCalculatedValuesCore():
|
|
375
|
+
protected getCalculatedValuesCore(): ICalculationResult;
|
|
314
376
|
protected loadingData: boolean;
|
|
315
377
|
renderLoadingIndicator(contentContainer: HTMLElement): void;
|
|
316
|
-
convertFromExternalData(externalCalculatedData: any):
|
|
378
|
+
convertFromExternalData(externalCalculatedData: any): ICalculationResult;
|
|
379
|
+
/**
|
|
380
|
+
* Returns object with all infotmation for data visualization: datasets, labels, colors, additional texts (percentage).
|
|
381
|
+
*/
|
|
382
|
+
getAnswersData(): Promise<IAnswersData>;
|
|
317
383
|
/**
|
|
318
384
|
* Returns an array of calculated and visualized values. If a user applies a filter, the array is also filtered.
|
|
319
385
|
*
|
|
320
386
|
* To get an array of source survey results, use the [`surveyData`](https://surveyjs.io/dashboard/documentation/api-reference/visualizerbase#surveyData) property.
|
|
321
387
|
*/
|
|
322
|
-
getCalculatedValues(): Promise<
|
|
388
|
+
getCalculatedValues(): Promise<ICalculationResult>;
|
|
323
389
|
protected _settingState: boolean;
|
|
390
|
+
protected _defaultStateValue: any;
|
|
391
|
+
getDefaultState(): any;
|
|
324
392
|
/**
|
|
325
393
|
* Returns an object with properties that describe a current visualizer state. The properties are different for each individual visualizer.
|
|
326
394
|
*
|
|
@@ -330,6 +398,7 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
330
398
|
* @see onStateChanged
|
|
331
399
|
*/
|
|
332
400
|
getState(): any;
|
|
401
|
+
protected setStateCore(state: any): void;
|
|
333
402
|
/**
|
|
334
403
|
* Sets the visualizer's state.
|
|
335
404
|
*
|
|
@@ -364,4 +433,3 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
364
433
|
set locale(newLocale: string);
|
|
365
434
|
protected setLocale(newLocale: string): void;
|
|
366
435
|
}
|
|
367
|
-
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Question } from "survey-core";
|
|
2
|
+
import { IVisualizerDescription, IVisualizerOptions } from "./visualizer-interfaces";
|
|
3
|
+
export declare function getDataName(description: Question | IVisualizerDescription): any;
|
|
4
|
+
export declare function createVisualizerDescription(vOptions: IVisualizerOptions, question: Question): IVisualizerDescription;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Question } from "survey-core";
|
|
2
2
|
import { VisualizerBase } from "./visualizerBase";
|
|
3
|
+
import { IVisualizerDescription } from "./visualizer-interfaces";
|
|
3
4
|
/**
|
|
4
5
|
* An object that allows you to create individual visualizers without creating a [visualization panel](https://surveyjs.io/dashboard/documentation/api-reference/visualizationpanel).
|
|
5
6
|
*/
|
|
@@ -20,13 +21,21 @@ export declare class VisualizerFactory {
|
|
|
20
21
|
* ```
|
|
21
22
|
*
|
|
22
23
|
* If a question has more than one [registered](https://surveyjs.io/dashboard/documentation/api-reference/visualizationmanager#registerVisualizer) visualizer, users can switch between them using a drop-down menu.
|
|
23
|
-
* @param
|
|
24
|
+
* @param description A question for which to create a visualizer.
|
|
24
25
|
* @param data A data array with survey results to be visualized.
|
|
25
26
|
* @param options An object with any custom properties you need within the visualizer.
|
|
26
27
|
*/
|
|
27
|
-
static createVisualizer(
|
|
28
|
+
static createVisualizer(description: Question | IVisualizerDescription, data: Array<{
|
|
28
29
|
[index: string]: any;
|
|
29
30
|
}>, options?: {
|
|
30
31
|
[index: string]: any;
|
|
31
32
|
}): VisualizerBase;
|
|
33
|
+
static getVisualizerCreatorsByQuestion(question: Question): Array<{
|
|
34
|
+
typeName: string;
|
|
35
|
+
creator: any;
|
|
36
|
+
}>;
|
|
37
|
+
static getVisualizerCreatorsByDescription(description: IVisualizerDescription): Array<{
|
|
38
|
+
typeName: string;
|
|
39
|
+
creator: any;
|
|
40
|
+
}>;
|
|
32
41
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Question, Event } from "survey-core";
|
|
2
|
-
import { VisualizerBase } from "../visualizerBase";
|
|
2
|
+
import { ICalculationResult, VisualizerBase } from "../visualizerBase";
|
|
3
3
|
export declare class WordCloudAdapter {
|
|
4
4
|
private model;
|
|
5
5
|
private _wordcloud;
|
|
@@ -15,11 +15,13 @@ export declare class WordCloudAdapter {
|
|
|
15
15
|
}
|
|
16
16
|
export declare class WordCloud extends VisualizerBase {
|
|
17
17
|
private _wordcloudAdapter;
|
|
18
|
+
private _values;
|
|
18
19
|
constructor(question: Question, data: Array<{
|
|
19
20
|
[index: string]: any;
|
|
20
|
-
}>, options?: Object,
|
|
21
|
-
convertFromExternalData(externalCalculatedData: any):
|
|
22
|
-
|
|
21
|
+
}>, options?: Object, type?: string);
|
|
22
|
+
convertFromExternalData(externalCalculatedData: any): ICalculationResult;
|
|
23
|
+
getValues(): Array<any>;
|
|
24
|
+
protected getCalculatedValuesCore(): ICalculationResult;
|
|
23
25
|
protected destroyContent(container: HTMLElement): void;
|
|
24
26
|
protected renderContentAsync(container: HTMLElement): Promise<HTMLElement>;
|
|
25
27
|
destroy(): void;
|