survey-analytics 2.2.1 → 2.2.3
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 +195 -187
- package/fesm/shared.mjs.map +1 -1
- package/fesm/shared2.mjs +12326 -0
- package/fesm/shared2.mjs.map +1 -0
- package/fesm/survey.analytics.core.mjs +10 -0
- package/fesm/survey.analytics.core.mjs.map +1 -0
- package/fesm/survey.analytics.mjs +149 -12063
- package/fesm/survey.analytics.mjs.map +1 -1
- package/fesm/survey.analytics.tabulator.mjs +3 -3
- package/package.json +17 -11
- package/survey-analytics-tabulator.types/analytics-localization/english.d.ts +2 -0
- package/survey-analytics-tabulator.types/localizationManager.d.ts +2 -0
- package/survey-analytics-tabulator.types/utils/index.d.ts +1 -1
- package/survey-analytics.types/alternativeVizualizersWrapper.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/english.d.ts +2 -0
- package/survey-analytics.types/entries/summary.core.d.ts +35 -0
- package/survey-analytics.types/entries/summary.d.ts +1 -34
- package/survey-analytics.types/localizationManager.d.ts +2 -0
- package/survey-analytics.types/matrix.d.ts +0 -1
- package/survey-analytics.types/pivot.d.ts +62 -0
- package/survey-analytics.types/plotly/histogram.d.ts +0 -1
- package/survey-analytics.types/plotly/index.d.ts +1 -0
- package/survey-analytics.types/plotly/pivot.d.ts +12 -0
- package/survey-analytics.types/plotly/selectBase.d.ts +0 -1
- package/survey-analytics.types/selectBase.d.ts +1 -1
- package/survey-analytics.types/utils/index.d.ts +1 -1
- package/survey-analytics.types/visualizationManager.d.ts +3 -0
- package/survey-analytics.types/visualizerBase.d.ts +3 -1
- package/survey.analytics.core.css +430 -0
- package/survey.analytics.core.css.map +1 -0
- package/survey.analytics.core.js +15689 -0
- package/survey.analytics.core.js.map +1 -0
- package/survey.analytics.core.min.css +10 -0
- package/survey.analytics.core.min.js +2 -0
- package/survey.analytics.core.min.js.LICENSE.txt +22 -0
- package/survey.analytics.css +7 -1
- package/survey.analytics.css.map +1 -1
- package/survey.analytics.js +875 -316
- package/survey.analytics.js.map +1 -1
- package/survey.analytics.min.css +2 -2
- 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 +10 -2
- 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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - SurveyJS Dashboard library v2.2.
|
|
2
|
+
* surveyjs - SurveyJS Dashboard library v2.2.3
|
|
3
3
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { D as DocumentHelper, l as localization,
|
|
8
|
-
export {
|
|
7
|
+
import { D as DocumentHelper, l as localization, c as createImagesContainer, b as createLinksContainer, d as createCommercialLicenseLink, e as svgTemplate } from './shared.mjs';
|
|
8
|
+
export { s as surveyStrings } from './shared.mjs';
|
|
9
9
|
import { ItemValue, settings, hasLicense, Serializer, EventBase, Event } from 'survey-core';
|
|
10
10
|
import { TabulatorFull } from 'tabulator-tables';
|
|
11
11
|
|
package/package.json
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
"scripts": {
|
|
3
3
|
"start": "webpack-dev-server --env buildType=dev",
|
|
4
4
|
"test": "jest",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"testcafe:file": "concurrently \"http-server --silent\" \"testcafe chrome testCafe/tabulator/basetests.js --selector-timeout 1500 --reporter minimal --debug-mode\"",
|
|
5
|
+
"test:dev": "jest --watch",
|
|
6
|
+
"test:debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand",
|
|
7
|
+
"e2e": "playwright test --project chromium --ui",
|
|
8
|
+
"e2e:ci": "playwright test --project chromium",
|
|
10
9
|
"release": "standard-version --message \"Release: %s [azurepipelines skip]\" ",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
10
|
+
"doc:gen": "node doc_generator/lib_docgenerator.js src/index.ts",
|
|
11
|
+
"doc:update": "chmod +x ./docupdate_npm.sh && ./docupdate_npm.sh",
|
|
13
12
|
"watch:dev": "concurrently \"webpack --env buildType=dev --env emitStyles\" \"rollup -c -w\" ",
|
|
14
13
|
"build": "webpack --env buildType=dev --env emitNonSourceFiles --env emitStyles && webpack --env buildType=prod --env emitStyles && rollup -c",
|
|
14
|
+
"build:types:core": "tsc --p tsconfig.summary.core.json && echo \"export * from './survey-analytics.types/entries/summary.core';\" >> build/survey.analytics.core.d.ts",
|
|
15
15
|
"build:types:summary": "tsc --p tsconfig.summary.json && echo \"export * from './survey-analytics.types/entries/summary';\" >> build/survey.analytics.d.ts",
|
|
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
|
},
|
|
20
|
-
"version": "2.2.
|
|
20
|
+
"version": "2.2.3",
|
|
21
21
|
"name": "survey-analytics",
|
|
22
22
|
"description": "SurveyJS analytics Library.",
|
|
23
23
|
"main": "survey.analytics.js",
|
|
@@ -45,8 +45,9 @@
|
|
|
45
45
|
"tabulator-tables": "^6.2.5"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@
|
|
48
|
+
"@playwright/test": "^1.53.1",
|
|
49
49
|
"@rollup/plugin-commonjs": "^28.0.2",
|
|
50
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
50
51
|
"@rollup/plugin-replace": "^6.0.2",
|
|
51
52
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
52
53
|
"@types/jest": "^26.0.24",
|
|
@@ -66,6 +67,7 @@
|
|
|
66
67
|
"jest-junit": "^16.0.0",
|
|
67
68
|
"mini-css-extract-plugin": "^2.9.0",
|
|
68
69
|
"node-uuid": "1.4.7",
|
|
70
|
+
"playwright": "^1.53.1",
|
|
69
71
|
"puppeteer": "22.13.1",
|
|
70
72
|
"replace-in-file": "^6.3.2",
|
|
71
73
|
"rollup": "^4.34.8",
|
|
@@ -76,7 +78,6 @@
|
|
|
76
78
|
"style-loader": "^1.3.0",
|
|
77
79
|
"surveyjs-doc-generator": "git+https://github.com/surveyjs/surveyjs-doc-generator.git",
|
|
78
80
|
"svg-inline-loader": "^0.8.2",
|
|
79
|
-
"testcafe": "3.3.0",
|
|
80
81
|
"ts-jest": "^29.2.2",
|
|
81
82
|
"ts-loader": "^8.0.0",
|
|
82
83
|
"typescript": "^5.7.0",
|
|
@@ -88,7 +89,7 @@
|
|
|
88
89
|
"peerDependencies": {
|
|
89
90
|
"@types/plotly.js-dist-min": "^2.3.0",
|
|
90
91
|
"@types/tabulator-tables": "^6.2.3",
|
|
91
|
-
"survey-core": "2.2.
|
|
92
|
+
"survey-core": "2.2.3"
|
|
92
93
|
},
|
|
93
94
|
"husky": {
|
|
94
95
|
"hooks": {
|
|
@@ -101,6 +102,11 @@
|
|
|
101
102
|
"import": "./fesm/survey.analytics.mjs",
|
|
102
103
|
"require": "./survey.analytics.js"
|
|
103
104
|
},
|
|
105
|
+
"./survey.analytics.core": {
|
|
106
|
+
"types": "./survey.analytics.core.d.ts",
|
|
107
|
+
"import": "./fesm/survey.analytics.core.mjs",
|
|
108
|
+
"require": "./survey.analytics.core.js"
|
|
109
|
+
},
|
|
104
110
|
"./*.css": "./*.css",
|
|
105
111
|
"./survey.analytics.tabulator": {
|
|
106
112
|
"types": "./survey.analytics.tabulator.d.ts",
|
|
@@ -5,7 +5,7 @@ export declare class DocumentHelper {
|
|
|
5
5
|
}>, isSelected: (option: {
|
|
6
6
|
value: string;
|
|
7
7
|
text: string;
|
|
8
|
-
}) => boolean, handler: (e: any) => void): HTMLDivElement;
|
|
8
|
+
}) => boolean, handler: (e: any) => void, title?: string): HTMLDivElement;
|
|
9
9
|
static createButton(handler: (e: any) => void, text?: string, className?: string): HTMLElement;
|
|
10
10
|
static createElement(tagName: string, className?: string, attrs?: any): HTMLElement;
|
|
11
11
|
static createSvgElement(path: string): SVGSVGElement;
|
|
@@ -53,6 +53,8 @@ export declare class AlternativeVisualizersWrapper extends VisualizerBase implem
|
|
|
53
53
|
* @see getState
|
|
54
54
|
*/
|
|
55
55
|
setState(state: any): void;
|
|
56
|
+
getValues(): Array<any>;
|
|
57
|
+
getLabels(): Array<string>;
|
|
56
58
|
getCalculatedValues(): Promise<Array<Object>>;
|
|
57
59
|
destroy(): void;
|
|
58
60
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export * from "../localizationManager";
|
|
2
|
+
import "../analytics-localization/farsi";
|
|
3
|
+
import "../analytics-localization/french";
|
|
4
|
+
import "../analytics-localization/german";
|
|
5
|
+
import "../analytics-localization/norwegian";
|
|
6
|
+
import "../analytics-localization/portuguese";
|
|
7
|
+
import "../analytics-localization/russian";
|
|
8
|
+
import "../analytics-localization/dutch";
|
|
9
|
+
import "../analytics-localization/spanish";
|
|
10
|
+
import "../analytics-localization/italian";
|
|
11
|
+
import "../analytics-localization/arabic";
|
|
12
|
+
import "../analytics-localization/japanese";
|
|
13
|
+
import "../analytics-localization/polish";
|
|
14
|
+
import "../analytics-localization/finnish";
|
|
15
|
+
export * from "../dataProvider";
|
|
16
|
+
export * from "../visualizerFactory";
|
|
17
|
+
export * from "../number";
|
|
18
|
+
export * from "../selectBase";
|
|
19
|
+
export * from "../matrix";
|
|
20
|
+
export * from "../boolean";
|
|
21
|
+
export * from "../histogram";
|
|
22
|
+
export * from "../visualizerBase";
|
|
23
|
+
export * from "../visualizationManager";
|
|
24
|
+
export * from "../visualizationPanel";
|
|
25
|
+
export * from "../visualizationPanelDynamic";
|
|
26
|
+
export * from "../visualizationMatrixDynamic";
|
|
27
|
+
export * from "../visualizationMatrixDropdown";
|
|
28
|
+
export * from "../alternativeVizualizersWrapper";
|
|
29
|
+
export * from "../wordcloud/wordcloud";
|
|
30
|
+
export * from "../wordcloud/stopwords/index";
|
|
31
|
+
export * from "../text";
|
|
32
|
+
export * from "../statistics-table";
|
|
33
|
+
export * from "../nps";
|
|
34
|
+
export * from "../pivot";
|
|
35
|
+
export { DocumentHelper } from "../utils/index";
|
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
export * from "../localizationManager";
|
|
2
|
-
import "../analytics-localization/farsi";
|
|
3
|
-
import "../analytics-localization/french";
|
|
4
|
-
import "../analytics-localization/german";
|
|
5
|
-
import "../analytics-localization/norwegian";
|
|
6
|
-
import "../analytics-localization/portuguese";
|
|
7
|
-
import "../analytics-localization/russian";
|
|
8
|
-
import "../analytics-localization/dutch";
|
|
9
|
-
import "../analytics-localization/spanish";
|
|
10
|
-
import "../analytics-localization/italian";
|
|
11
|
-
import "../analytics-localization/arabic";
|
|
12
|
-
import "../analytics-localization/japanese";
|
|
13
|
-
import "../analytics-localization/polish";
|
|
14
|
-
import "../analytics-localization/finnish";
|
|
15
|
-
export * from "../dataProvider";
|
|
16
|
-
export * from "../visualizerFactory";
|
|
17
|
-
export * from "../number";
|
|
18
|
-
export * from "../selectBase";
|
|
19
|
-
export * from "../matrix";
|
|
20
|
-
export * from "../boolean";
|
|
21
|
-
export * from "../histogram";
|
|
22
|
-
export * from "../visualizerBase";
|
|
23
|
-
export * from "../visualizationManager";
|
|
24
|
-
export * from "../visualizationPanel";
|
|
25
|
-
export * from "../visualizationPanelDynamic";
|
|
26
|
-
export * from "../visualizationMatrixDynamic";
|
|
27
|
-
export * from "../visualizationMatrixDropdown";
|
|
28
|
-
export * from "../alternativeVizualizersWrapper";
|
|
29
1
|
export * from "../plotly/index";
|
|
30
|
-
export * from "
|
|
31
|
-
export * from "../wordcloud/stopwords/index";
|
|
32
|
-
export * from "../text";
|
|
33
|
-
export * from "../statistics-table";
|
|
34
|
-
export * from "../nps";
|
|
35
|
-
export { DocumentHelper } from "../utils/index";
|
|
2
|
+
export * from "./summary.core";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ItemValue, Question } from "survey-core";
|
|
2
|
+
import { SelectBase } from "./selectBase";
|
|
3
|
+
export declare class PivotModel extends SelectBase {
|
|
4
|
+
private questions;
|
|
5
|
+
protected valueType: "enum" | "date" | "number";
|
|
6
|
+
private _cachedValues;
|
|
7
|
+
private _continiousData;
|
|
8
|
+
private _cachedIntervals;
|
|
9
|
+
private _intervalPrecision;
|
|
10
|
+
private axisXSelector;
|
|
11
|
+
axisXQuestionName: string;
|
|
12
|
+
private axisYSelectors;
|
|
13
|
+
axisYQuestionNames: Array<string>;
|
|
14
|
+
private questionsY;
|
|
15
|
+
static IntervalsCount: number;
|
|
16
|
+
static UseIntervalsFrom: number;
|
|
17
|
+
constructor(questions: Array<Question>, data: Array<{
|
|
18
|
+
[index: string]: any;
|
|
19
|
+
}>, options?: Object, name?: string);
|
|
20
|
+
private createYSelecterGenerator;
|
|
21
|
+
setAxisQuestions(...axisQuestionNames: string[]): void;
|
|
22
|
+
onAxisYSelectorChanged(index: number, value: any): void;
|
|
23
|
+
private createAxisYSelector;
|
|
24
|
+
getQuestionValueType(question: Question): "enum" | "date" | "number";
|
|
25
|
+
private setupPivot;
|
|
26
|
+
private reset;
|
|
27
|
+
getContiniousValue(value: any): number;
|
|
28
|
+
getString(value: number): string;
|
|
29
|
+
private toPrecision;
|
|
30
|
+
getSelectedItemByText(itemText: string): ItemValue;
|
|
31
|
+
/**
|
|
32
|
+
* Updates visualizer data.
|
|
33
|
+
*/
|
|
34
|
+
updateData(data: Array<{
|
|
35
|
+
[index: string]: any;
|
|
36
|
+
}>): void;
|
|
37
|
+
protected onDataChanged(): void;
|
|
38
|
+
protected getContiniousValues(): {
|
|
39
|
+
original: any;
|
|
40
|
+
continious: number;
|
|
41
|
+
row: any;
|
|
42
|
+
}[];
|
|
43
|
+
protected isSupportAnswersOrder(): boolean;
|
|
44
|
+
protected isSupportMissingAnswers(): boolean;
|
|
45
|
+
protected get needUseRateValues(): boolean;
|
|
46
|
+
getSeriesValues(): Array<string>;
|
|
47
|
+
getSeriesLabels(): Array<string>;
|
|
48
|
+
getValues(): Array<any>;
|
|
49
|
+
getLabels(): Array<string>;
|
|
50
|
+
get hasCustomIntervals(): boolean;
|
|
51
|
+
get intervals(): any;
|
|
52
|
+
convertFromExternalData(externalCalculatedData: any): any[];
|
|
53
|
+
getSeriesValueIndexes(): {
|
|
54
|
+
[index: string]: number;
|
|
55
|
+
};
|
|
56
|
+
updateStatisticsSeriesValue(statistics: Array<Array<number>>, dataRow: {
|
|
57
|
+
[index: string]: any;
|
|
58
|
+
}, valueIndex: number, seriesValueIndexes: {
|
|
59
|
+
[index: string]: number;
|
|
60
|
+
}): void;
|
|
61
|
+
protected getCalculatedValuesCore(): Array<any>;
|
|
62
|
+
}
|
|
@@ -8,6 +8,5 @@ export declare class HistogramPlotly extends HistogramModel {
|
|
|
8
8
|
}>, options?: Object, name?: string);
|
|
9
9
|
protected destroyContent(container: HTMLElement): void;
|
|
10
10
|
protected renderContentAsync(container: HTMLElement): Promise<HTMLElement>;
|
|
11
|
-
protected getCalculatedValuesCore(): Array<any>;
|
|
12
11
|
getValueType(): "date" | "number";
|
|
13
12
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Question } from "survey-core";
|
|
2
|
+
import { PivotModel } from "../pivot";
|
|
3
|
+
export declare class PivotPlotly extends PivotModel {
|
|
4
|
+
private _chartAdapter;
|
|
5
|
+
static types: string[];
|
|
6
|
+
constructor(questions: Array<Question>, data: Array<{
|
|
7
|
+
[index: string]: any;
|
|
8
|
+
}>, options?: Object, name?: string);
|
|
9
|
+
protected destroyContent(container: HTMLElement): void;
|
|
10
|
+
protected renderContentAsync(container: HTMLElement): Promise<HTMLElement>;
|
|
11
|
+
getValueType(): "enum" | "date" | "number";
|
|
12
|
+
}
|
|
@@ -22,5 +22,4 @@ export declare class SelectBasePlotly extends SelectBase {
|
|
|
22
22
|
protected destroyContent(container: HTMLElement): void;
|
|
23
23
|
protected renderContentAsync(container: HTMLElement): Promise<HTMLElement>;
|
|
24
24
|
updateContent(): void;
|
|
25
|
-
protected getCalculatedValuesCore(): Array<any>;
|
|
26
25
|
}
|
|
@@ -29,7 +29,7 @@ export declare class SelectBase extends VisualizerBase implements IVisualizerWit
|
|
|
29
29
|
private _topN;
|
|
30
30
|
static topNValuesDefaults: number[];
|
|
31
31
|
topNValues: any[];
|
|
32
|
-
|
|
32
|
+
protected _transposeData: boolean;
|
|
33
33
|
private _showMissingAnswers;
|
|
34
34
|
private missingAnswersBtn;
|
|
35
35
|
constructor(question: Question, data: Array<{
|
|
@@ -5,7 +5,7 @@ export declare class DocumentHelper {
|
|
|
5
5
|
}>, isSelected: (option: {
|
|
6
6
|
value: string;
|
|
7
7
|
text: string;
|
|
8
|
-
}) => boolean, handler: (e: any) => void): HTMLDivElement;
|
|
8
|
+
}) => boolean, handler: (e: any) => void, title?: string): HTMLDivElement;
|
|
9
9
|
static createButton(handler: (e: any) => void, text?: string, className?: string): HTMLElement;
|
|
10
10
|
static createElement(tagName: string, className?: string, attrs?: any): HTMLElement;
|
|
11
11
|
static createSvgElement(path: string): SVGSVGElement;
|
|
@@ -9,6 +9,7 @@ declare type VisualizerConstructor = new (question: Question, data: Array<{
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class VisualizationManager {
|
|
11
11
|
static alternativesVisualizer: any;
|
|
12
|
+
static pivotVisualizer: any;
|
|
12
13
|
static vizualizers: {
|
|
13
14
|
[index: string]: Array<{
|
|
14
15
|
ctor: VisualizerConstructor;
|
|
@@ -52,5 +53,7 @@ export declare class VisualizationManager {
|
|
|
52
53
|
* @param constructor A function that returns a constructor for an alternative visualizer selector.
|
|
53
54
|
*/
|
|
54
55
|
static registerAltVisualizerSelector(constructor: any): void;
|
|
56
|
+
static getPivotVisualizerConstructor(): any;
|
|
57
|
+
static registerPivotVisualizer(constructor: any): void;
|
|
55
58
|
}
|
|
56
59
|
export {};
|
|
@@ -135,7 +135,7 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
135
135
|
get hasFooter(): boolean;
|
|
136
136
|
protected createVisualizer<T = VisualizerBase>(question: Question, options?: {
|
|
137
137
|
[index: string]: any;
|
|
138
|
-
}): T;
|
|
138
|
+
}, data?: any[]): T;
|
|
139
139
|
/**
|
|
140
140
|
* Allows you to access the footer visualizer. Returns `undefined` if the footer is absent.
|
|
141
141
|
* @see hasFooter
|
|
@@ -245,6 +245,7 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
245
245
|
protected destroyContent(container: HTMLElement): void;
|
|
246
246
|
protected renderHeader(container: HTMLElement): void;
|
|
247
247
|
protected renderContentAsync(container: HTMLElement): Promise<HTMLElement>;
|
|
248
|
+
protected ensureQuestionIsReady(): Promise<void>;
|
|
248
249
|
protected renderContent(container: HTMLElement): void;
|
|
249
250
|
protected destroyFooter(container: HTMLElement): void;
|
|
250
251
|
protected renderFooter(container: HTMLElement): void;
|
|
@@ -253,6 +254,7 @@ export declare class VisualizerBase implements IDataInfo {
|
|
|
253
254
|
* @param targetElement An `HTMLElement` or an `id` of a page element in which you want to render the visualizer.
|
|
254
255
|
*/
|
|
255
256
|
render(targetElement: HTMLElement | string): void;
|
|
257
|
+
updateToolbar(): void;
|
|
256
258
|
updateContent(): void;
|
|
257
259
|
/**
|
|
258
260
|
* Re-renders the visualizer and its content.
|