survey-analytics 2.2.6 → 2.3.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 +84 -1
- package/fesm/shared.mjs.map +1 -1
- package/fesm/shared2.mjs +46 -20
- package/fesm/shared2.mjs.map +1 -1
- package/fesm/survey.analytics.core.mjs +1 -1
- package/fesm/survey.analytics.mjs +80 -19
- package/fesm/survey.analytics.mjs.map +1 -1
- package/fesm/survey.analytics.tabulator.mjs +47 -4
- package/fesm/survey.analytics.tabulator.mjs.map +1 -1
- package/package.json +3 -3
- package/survey-analytics-tabulator.types/analytics-localization/english.d.ts +1 -0
- package/survey-analytics-tabulator.types/analytics-localization/swedish.d.ts +79 -0
- package/survey-analytics-tabulator.types/entries/tabulator.d.ts +1 -0
- package/survey-analytics-tabulator.types/localizationManager.d.ts +1 -0
- package/survey-analytics-tabulator.types/tables/columnbuilder.d.ts +7 -1
- package/survey-analytics-tabulator.types/tables/columns.d.ts +10 -1
- package/survey-analytics.types/analytics-localization/english.d.ts +1 -0
- package/survey-analytics.types/analytics-localization/swedish.d.ts +79 -0
- package/survey-analytics.types/config.d.ts +1 -0
- package/survey-analytics.types/entries/summary.core.d.ts +1 -0
- package/survey-analytics.types/localizationManager.d.ts +1 -0
- package/survey-analytics.types/plotly/chart-adapter.d.ts +1 -0
- package/survey-analytics.types/plotly/setup.d.ts +1 -0
- package/survey-analytics.types/ranking.d.ts +4 -0
- package/survey-analytics.types/visualizationPanel.d.ts +4 -2
- package/survey-analytics.types/visualizerBase.d.ts +11 -4
- package/survey.analytics.core.css +1 -1
- package/survey.analytics.core.js +201 -75
- package/survey.analytics.core.js.map +1 -1
- package/survey.analytics.core.min.css +1 -1
- package/survey.analytics.core.min.js +1 -1
- package/survey.analytics.core.min.js.LICENSE.txt +1 -1
- package/survey.analytics.css +1 -1
- package/survey.analytics.js +295 -106
- package/survey.analytics.js.map +1 -1
- package/survey.analytics.min.css +1 -1
- package/survey.analytics.min.js +1 -1
- package/survey.analytics.min.js.LICENSE.txt +1 -1
- package/survey.analytics.tabulator.css +1 -1
- package/survey.analytics.tabulator.js +214 -23
- package/survey.analytics.tabulator.js.map +1 -1
- package/survey.analytics.tabulator.min.css +1 -1
- package/survey.analytics.tabulator.min.js +1 -1
- package/survey.analytics.tabulator.min.js.LICENSE.txt +1 -1
package/package.json
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"build:types:tabulator": "tsc --p tsconfig.tabulator.json && echo \"export * from './survey-analytics-tabulator.types/entries/tabulator';\" >> build/survey.analytics.tabulator.d.ts",
|
|
17
17
|
"lint": "eslint ./src --quiet",
|
|
18
18
|
"pre-push-check": "npm run lint && npm run test",
|
|
19
|
-
"
|
|
19
|
+
"pwinst": "playwright install chromium"
|
|
20
20
|
},
|
|
21
|
-
"version": "2.
|
|
21
|
+
"version": "2.3.1",
|
|
22
22
|
"name": "survey-analytics",
|
|
23
23
|
"description": "SurveyJS analytics Library.",
|
|
24
24
|
"main": "survey.analytics.js",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"@types/plotly.js-dist-min": "^2.3.0",
|
|
92
92
|
"@types/tabulator-tables": "^6.2.3",
|
|
93
|
-
"survey-core": "2.
|
|
93
|
+
"survey-core": "2.3.1"
|
|
94
94
|
},
|
|
95
95
|
"husky": {
|
|
96
96
|
"hooks": {
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export declare var swedishStrings: {
|
|
2
|
+
groupButton: string;
|
|
3
|
+
ungroupButton: string;
|
|
4
|
+
selectButton: string;
|
|
5
|
+
hideColumn: string;
|
|
6
|
+
showColumn: string;
|
|
7
|
+
makePrivateColumn: string;
|
|
8
|
+
makePublicColumn: string;
|
|
9
|
+
moveToDetail: string;
|
|
10
|
+
showAsColumn: string;
|
|
11
|
+
filterPlaceholder: string;
|
|
12
|
+
removeRows: string;
|
|
13
|
+
showLabel: string;
|
|
14
|
+
entriesLabel: string;
|
|
15
|
+
visualizer_text: string;
|
|
16
|
+
visualizer_wordcloud: string;
|
|
17
|
+
visualizer_histogram: string;
|
|
18
|
+
visualizer_number: string;
|
|
19
|
+
visualizer_choices: string;
|
|
20
|
+
visualizer_selectBase: string;
|
|
21
|
+
visualizer_matrix: string;
|
|
22
|
+
chartType_bar: string;
|
|
23
|
+
chartType_vbar: string;
|
|
24
|
+
chartType_stackedbar: string;
|
|
25
|
+
chartType_doughnut: string;
|
|
26
|
+
chartType_pie: string;
|
|
27
|
+
chartType_scatter: string;
|
|
28
|
+
chartType_gauge: string;
|
|
29
|
+
chartType_bullet: string;
|
|
30
|
+
chartType_line: string;
|
|
31
|
+
chartType_radar: string;
|
|
32
|
+
hideButton: string;
|
|
33
|
+
makePrivateButton: string;
|
|
34
|
+
makePublicButton: string;
|
|
35
|
+
showButton: string;
|
|
36
|
+
filter: string;
|
|
37
|
+
resetFilter: string;
|
|
38
|
+
changeLocale: string;
|
|
39
|
+
clearButton: string;
|
|
40
|
+
addElement: string;
|
|
41
|
+
defaultOrder: string;
|
|
42
|
+
ascOrder: string;
|
|
43
|
+
descOrder: string;
|
|
44
|
+
showMinorColumns: string;
|
|
45
|
+
actionsColumn: string;
|
|
46
|
+
otherCommentTitle: string;
|
|
47
|
+
showPercentages: string;
|
|
48
|
+
hidePercentages: string;
|
|
49
|
+
pdfDownloadCaption: string;
|
|
50
|
+
xlsxDownloadCaption: string;
|
|
51
|
+
csvDownloadCaption: string;
|
|
52
|
+
saveDiagramAsPNG: string;
|
|
53
|
+
hideEmptyAnswers: string;
|
|
54
|
+
showEmptyAnswers: string;
|
|
55
|
+
"topNValueText-1": string;
|
|
56
|
+
topNValueText5: string;
|
|
57
|
+
topNValueText10: string;
|
|
58
|
+
topNValueText20: string;
|
|
59
|
+
hideMissingAnswers: string;
|
|
60
|
+
showMissingAnswers: string;
|
|
61
|
+
missingAnswersLabel: string;
|
|
62
|
+
noVisualizerForQuestion: string;
|
|
63
|
+
noResults: string;
|
|
64
|
+
showPerValues: string;
|
|
65
|
+
showPerColumns: string;
|
|
66
|
+
answer: string;
|
|
67
|
+
correctAnswer: string;
|
|
68
|
+
percent: string;
|
|
69
|
+
percentage: string;
|
|
70
|
+
statistics_chart: string;
|
|
71
|
+
responses: string;
|
|
72
|
+
visualizer_nps: string;
|
|
73
|
+
npsScore: string;
|
|
74
|
+
npsPromoters: string;
|
|
75
|
+
npsPassives: string;
|
|
76
|
+
npsDetractors: string;
|
|
77
|
+
axisXSelectorTitle: string;
|
|
78
|
+
axisYSelectorTitle: string;
|
|
79
|
+
};
|
|
@@ -12,6 +12,7 @@ import "../analytics-localization/arabic";
|
|
|
12
12
|
import "../analytics-localization/japanese";
|
|
13
13
|
import "../analytics-localization/polish";
|
|
14
14
|
import "../analytics-localization/finnish";
|
|
15
|
+
import "../analytics-localization/swedish";
|
|
15
16
|
import "../tables/extensions/rowextensions";
|
|
16
17
|
import "../tables/extensions/headerextensions";
|
|
17
18
|
import "../tables/extensions/columnextensions";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Question, QuestionCompositeModel, QuestionCustomModel, QuestionFileModel, QuestionMatrixDropdownModel, QuestionMatrixModel } from "survey-core";
|
|
1
|
+
import { Question, QuestionCheckboxModel, QuestionCompositeModel, QuestionCustomModel, QuestionDropdownModel, QuestionFileModel, QuestionMatrixDropdownModel, QuestionMatrixModel, QuestionRadiogroupModel } from "survey-core";
|
|
2
2
|
import { BaseColumn, CompositeQuestionColumn, CustomQuestionColumn, FileColumn, ImageColumn } from "./columns";
|
|
3
3
|
import { IColumn } from "./config";
|
|
4
4
|
import { Table } from "./table";
|
|
@@ -18,6 +18,12 @@ export declare class ColumnsBuilderFactory {
|
|
|
18
18
|
registerBuilderColumn(type: string, columnsBuilder: IColumnsBuilder): void;
|
|
19
19
|
getColumnsBuilder(type: string): IColumnsBuilder;
|
|
20
20
|
}
|
|
21
|
+
export declare class CheckboxColumnsBuilder extends DefaultColumnsBuilder<QuestionCheckboxModel> {
|
|
22
|
+
protected createColumn(question: QuestionCheckboxModel, table: Table): BaseColumn<QuestionCheckboxModel>;
|
|
23
|
+
}
|
|
24
|
+
export declare class SingleChoiceColumnsBuilder extends DefaultColumnsBuilder<QuestionDropdownModel | QuestionRadiogroupModel> {
|
|
25
|
+
protected createColumn(question: QuestionDropdownModel | QuestionRadiogroupModel, table: Table): BaseColumn<QuestionDropdownModel | QuestionRadiogroupModel>;
|
|
26
|
+
}
|
|
21
27
|
export declare class MatrixColumnsBuilder extends DefaultColumnsBuilder<QuestionMatrixModel> {
|
|
22
28
|
protected buildColumnsCore(questionBase: Question, table: Table): IColumn[];
|
|
23
29
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MatrixRowModel, Question, QuestionCompositeModel, QuestionCustomModel, QuestionFileModel, QuestionMatrixDropdownModel, QuestionMatrixModel, QuestionSelectBase } from "survey-core";
|
|
1
|
+
import { MatrixRowModel, Question, QuestionCheckboxModel, QuestionCompositeModel, QuestionCustomModel, QuestionDropdownModel, QuestionFileModel, QuestionMatrixDropdownModel, QuestionMatrixModel, QuestionRadiogroupModel, QuestionSelectBase } from "survey-core";
|
|
2
2
|
import { ICellData, IColumn, ColumnDataType, QuestionLocation, IColumnData } from "./config";
|
|
3
3
|
import { ITableOptions, Table } from "./table";
|
|
4
4
|
export declare class BaseColumn<T extends Question = Question> implements IColumn {
|
|
@@ -32,6 +32,15 @@ export declare class BaseColumn<T extends Question = Question> implements IColum
|
|
|
32
32
|
export declare class DefaultColumn extends BaseColumn {
|
|
33
33
|
protected getDisplayValue(data: any, table: Table, options: ITableOptions): any;
|
|
34
34
|
}
|
|
35
|
+
export declare class CheckboxColumn extends BaseColumn<QuestionCheckboxModel> {
|
|
36
|
+
protected getDisplayValue(data: any, table: Table, options: ITableOptions): string;
|
|
37
|
+
}
|
|
38
|
+
export declare class SingleChoiceColumn extends BaseColumn<QuestionDropdownModel | QuestionRadiogroupModel> {
|
|
39
|
+
protected getDisplayValue(data: any, table: Table, options: ITableOptions): string;
|
|
40
|
+
}
|
|
41
|
+
export declare class SelectBaseColumn extends BaseColumn<QuestionDropdownModel | QuestionCheckboxModel | QuestionRadiogroupModel> {
|
|
42
|
+
protected getDisplayValue(data: any, table: Table, options: ITableOptions): string;
|
|
43
|
+
}
|
|
35
44
|
export declare class CommentColumn<T extends Question = Question> extends BaseColumn<T> {
|
|
36
45
|
protected getName(): string;
|
|
37
46
|
protected getDisplayName(): string;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export declare var swedishStrings: {
|
|
2
|
+
groupButton: string;
|
|
3
|
+
ungroupButton: string;
|
|
4
|
+
selectButton: string;
|
|
5
|
+
hideColumn: string;
|
|
6
|
+
showColumn: string;
|
|
7
|
+
makePrivateColumn: string;
|
|
8
|
+
makePublicColumn: string;
|
|
9
|
+
moveToDetail: string;
|
|
10
|
+
showAsColumn: string;
|
|
11
|
+
filterPlaceholder: string;
|
|
12
|
+
removeRows: string;
|
|
13
|
+
showLabel: string;
|
|
14
|
+
entriesLabel: string;
|
|
15
|
+
visualizer_text: string;
|
|
16
|
+
visualizer_wordcloud: string;
|
|
17
|
+
visualizer_histogram: string;
|
|
18
|
+
visualizer_number: string;
|
|
19
|
+
visualizer_choices: string;
|
|
20
|
+
visualizer_selectBase: string;
|
|
21
|
+
visualizer_matrix: string;
|
|
22
|
+
chartType_bar: string;
|
|
23
|
+
chartType_vbar: string;
|
|
24
|
+
chartType_stackedbar: string;
|
|
25
|
+
chartType_doughnut: string;
|
|
26
|
+
chartType_pie: string;
|
|
27
|
+
chartType_scatter: string;
|
|
28
|
+
chartType_gauge: string;
|
|
29
|
+
chartType_bullet: string;
|
|
30
|
+
chartType_line: string;
|
|
31
|
+
chartType_radar: string;
|
|
32
|
+
hideButton: string;
|
|
33
|
+
makePrivateButton: string;
|
|
34
|
+
makePublicButton: string;
|
|
35
|
+
showButton: string;
|
|
36
|
+
filter: string;
|
|
37
|
+
resetFilter: string;
|
|
38
|
+
changeLocale: string;
|
|
39
|
+
clearButton: string;
|
|
40
|
+
addElement: string;
|
|
41
|
+
defaultOrder: string;
|
|
42
|
+
ascOrder: string;
|
|
43
|
+
descOrder: string;
|
|
44
|
+
showMinorColumns: string;
|
|
45
|
+
actionsColumn: string;
|
|
46
|
+
otherCommentTitle: string;
|
|
47
|
+
showPercentages: string;
|
|
48
|
+
hidePercentages: string;
|
|
49
|
+
pdfDownloadCaption: string;
|
|
50
|
+
xlsxDownloadCaption: string;
|
|
51
|
+
csvDownloadCaption: string;
|
|
52
|
+
saveDiagramAsPNG: string;
|
|
53
|
+
hideEmptyAnswers: string;
|
|
54
|
+
showEmptyAnswers: string;
|
|
55
|
+
"topNValueText-1": string;
|
|
56
|
+
topNValueText5: string;
|
|
57
|
+
topNValueText10: string;
|
|
58
|
+
topNValueText20: string;
|
|
59
|
+
hideMissingAnswers: string;
|
|
60
|
+
showMissingAnswers: string;
|
|
61
|
+
missingAnswersLabel: string;
|
|
62
|
+
noVisualizerForQuestion: string;
|
|
63
|
+
noResults: string;
|
|
64
|
+
showPerValues: string;
|
|
65
|
+
showPerColumns: string;
|
|
66
|
+
answer: string;
|
|
67
|
+
correctAnswer: string;
|
|
68
|
+
percent: string;
|
|
69
|
+
percentage: string;
|
|
70
|
+
statistics_chart: string;
|
|
71
|
+
responses: string;
|
|
72
|
+
visualizer_nps: string;
|
|
73
|
+
npsScore: string;
|
|
74
|
+
npsPromoters: string;
|
|
75
|
+
npsPassives: string;
|
|
76
|
+
npsDetractors: string;
|
|
77
|
+
axisXSelectorTitle: string;
|
|
78
|
+
axisYSelectorTitle: string;
|
|
79
|
+
};
|
|
@@ -12,6 +12,7 @@ import "../analytics-localization/arabic";
|
|
|
12
12
|
import "../analytics-localization/japanese";
|
|
13
13
|
import "../analytics-localization/polish";
|
|
14
14
|
import "../analytics-localization/finnish";
|
|
15
|
+
import "../analytics-localization/swedish";
|
|
15
16
|
export * from "../dataProvider";
|
|
16
17
|
export * from "../visualizerFactory";
|
|
17
18
|
export * from "../selectBase";
|
|
@@ -28,4 +28,5 @@ export declare class PlotlySetup {
|
|
|
28
28
|
static setupVBar(model: SelectBase, answersData: IAnswersData): PlotlyOptions;
|
|
29
29
|
static setupScatter(model: SelectBase, answersData: IAnswersData): PlotlyOptions;
|
|
30
30
|
static setupGauge(model: NumberModel, answersData: IAnswersData): PlotlyOptions;
|
|
31
|
+
static setupRadar(model: SelectBase, answersData: IAnswersData): PlotlyOptions;
|
|
31
32
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { SelectBase } from "./selectBase";
|
|
2
|
+
import { QuestionRankingModel } from "survey-core";
|
|
2
3
|
export declare class RankingModel extends SelectBase {
|
|
4
|
+
constructor(question: QuestionRankingModel, data: Array<{
|
|
5
|
+
[index: string]: any;
|
|
6
|
+
}>, options?: any, name?: string);
|
|
3
7
|
getQuestionResults(): any[];
|
|
4
8
|
getEmptyData(): any;
|
|
5
9
|
protected getCalculatedValuesCore(): Array<any>;
|
|
@@ -200,14 +200,16 @@ export interface IVisualizationPanelOptions {
|
|
|
200
200
|
* - Matrix: `"bar"` | `"vbar"` | `"pie"` | `"doughnut"` | `"stackedbar"`
|
|
201
201
|
* - Rating: `"bar"` | `"vbar"` | `"gauge"` | `"bullet"`
|
|
202
202
|
* - Radiogroup, Checkbox, Dropdown, Image Picker: `"bar"` | `"vbar"` | `"pie"` | `"doughnut"`
|
|
203
|
+
* - Ranking: `"bar"` | `"vbar"` | `"pie"` | `"doughnut" | `"radar"`
|
|
203
204
|
*
|
|
204
|
-
* To set a type for an individual chart, access this chart in the `visualizers` array and set its `chartType` property to one of the values described above:
|
|
205
|
+
* To set a type for an individual chart, access this chart in the `visualizers` array or using the [`getVisualizer(questionName)`](https://surveyjs.io/dashboard/documentation/api-reference/visualizationpanel#getVisualizer) method and set its `chartType` property to one of the values described above:
|
|
205
206
|
*
|
|
206
207
|
* ```js
|
|
207
208
|
* const vizPanel = new SurveyAnalytics.VisualizationPanel( ... );
|
|
208
209
|
* vizPanel.visualizers[0].chartType = "stackedbar";
|
|
210
|
+
* // --- or ---
|
|
211
|
+
* vizPanel.getVisualizer("my-question").chartType = "stackedbar";
|
|
209
212
|
* ```
|
|
210
|
-
*
|
|
211
213
|
*/
|
|
212
214
|
defaultChartType?: string;
|
|
213
215
|
/**
|
|
@@ -15,6 +15,12 @@ export interface IDataInfo {
|
|
|
15
15
|
getSeriesValues(): Array<string>;
|
|
16
16
|
getSeriesLabels(): Array<string>;
|
|
17
17
|
}
|
|
18
|
+
type ToolbarItemCreators = {
|
|
19
|
+
[name: string]: {
|
|
20
|
+
creator: (toolbar?: HTMLDivElement) => HTMLElement;
|
|
21
|
+
order: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
18
24
|
export declare class PostponeHelper {
|
|
19
25
|
static postponeFunction: (fn: () => void, timeout?: number) => any;
|
|
20
26
|
static postpone(fn: () => void, timeout?: number): any;
|
|
@@ -115,9 +121,9 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
115
121
|
*/
|
|
116
122
|
onStateChanged: Event<(sender: VisualizerBase, options: any) => any, VisualizerBase, any>;
|
|
117
123
|
protected stateChanged(name: string, value: any): void;
|
|
118
|
-
protected toolbarItemCreators:
|
|
119
|
-
|
|
120
|
-
|
|
124
|
+
protected toolbarItemCreators: ToolbarItemCreators;
|
|
125
|
+
onGetToolbarItemCreators: () => ToolbarItemCreators;
|
|
126
|
+
protected getToolbarItemCreators(): ToolbarItemCreators;
|
|
121
127
|
constructor(question: Question, data: Array<{
|
|
122
128
|
[index: string]: any;
|
|
123
129
|
}> | GetDataFn, options?: {
|
|
@@ -200,7 +206,7 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
200
206
|
* @param creator A function that accepts the toolbar and should return an `HTMLElement` with the toolbar item.
|
|
201
207
|
* @see unregisterToolbarItem
|
|
202
208
|
*/
|
|
203
|
-
registerToolbarItem(name: string, creator: (toolbar?: HTMLDivElement) => HTMLElement): void;
|
|
209
|
+
registerToolbarItem(name: string, creator: (toolbar?: HTMLDivElement) => HTMLElement, order?: number): void;
|
|
204
210
|
/**
|
|
205
211
|
*
|
|
206
212
|
* Unregisters a function used to create a toolbar item. Allows you to remove a toolbar item.
|
|
@@ -335,3 +341,4 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
335
341
|
set locale(newLocale: string);
|
|
336
342
|
protected setLocale(newLocale: string): void;
|
|
337
343
|
}
|
|
344
|
+
export {};
|