survey-analytics 2.5.12 → 2.5.13
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 +1 -1
- package/fesm/shared2.mjs +1 -1
- package/fesm/survey.analytics.core.mjs +1 -1
- package/fesm/survey.analytics.mjs +1 -1
- package/fesm/survey.analytics.mongo.mjs +1 -1
- package/fesm/survey.analytics.tabulator.mjs +41 -29
- package/fesm/survey.analytics.tabulator.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-analytics-tabulator.types/tables/columns.d.ts +3 -3
- package/survey-analytics-tabulator.types/tables/table.d.ts +4 -0
- package/survey.analytics.core.css +1 -1
- package/survey.analytics.core.js +1 -1
- package/survey.analytics.core.min.css +1 -1
- package/survey.analytics.core.min.js.LICENSE.txt +1 -1
- package/survey.analytics.css +1 -1
- package/survey.analytics.js +1 -1
- package/survey.analytics.min.css +1 -1
- package/survey.analytics.min.js.LICENSE.txt +1 -1
- package/survey.analytics.mongo.js +1 -1
- package/survey.analytics.mongo.min.js.LICENSE.txt +1 -1
- package/survey.analytics.tabulator.css +1 -1
- package/survey.analytics.tabulator.js +46 -39
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.5.
|
|
2
|
+
"version": "2.5.13",
|
|
3
3
|
"name": "survey-analytics",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "webpack-dev-server --env buildType=dev",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@types/mongodb": "^4.0.6",
|
|
94
94
|
"@types/plotly.js-dist-min": "^2.3.0",
|
|
95
95
|
"@types/tabulator-tables": "^6.2.3",
|
|
96
|
-
"survey-core": "2.5.
|
|
96
|
+
"survey-core": "2.5.13"
|
|
97
97
|
},
|
|
98
98
|
"husky": {
|
|
99
99
|
"hooks": {
|
|
@@ -14,6 +14,7 @@ export declare class BaseColumn<T extends Question = Question> implements IColum
|
|
|
14
14
|
private nameValue;
|
|
15
15
|
private displayNameValue?;
|
|
16
16
|
constructor(question: T, table: Table);
|
|
17
|
+
protected updateWhenQuestionIsReady(question: Question, table: Table): void;
|
|
17
18
|
get name(): string;
|
|
18
19
|
set name(val: string);
|
|
19
20
|
get displayName(): string;
|
|
@@ -22,7 +23,6 @@ export declare class BaseColumn<T extends Question = Question> implements IColum
|
|
|
22
23
|
protected getName(): string;
|
|
23
24
|
protected getDataType(): ColumnDataType;
|
|
24
25
|
protected getDisplayValueCore(data: any): any;
|
|
25
|
-
protected setupReadyChangedCallback(table: Table, question: Question): void;
|
|
26
26
|
protected getDisplayValue(data: any, table: Table, options: ITableOptions): any;
|
|
27
27
|
private formatDisplayValue;
|
|
28
28
|
getCellData(table: Table, data: any): ICellData;
|
|
@@ -78,8 +78,8 @@ export declare class MatrixDropdownColumn extends BaseColumn<QuestionMatrixDropd
|
|
|
78
78
|
protected getDisplayValue(data: any, table: Table, options: ITableOptions): any;
|
|
79
79
|
}
|
|
80
80
|
export declare class CustomQuestionColumn extends BaseColumn<QuestionCustomModel> {
|
|
81
|
-
|
|
81
|
+
constructor(question: QuestionCustomModel, table: Table);
|
|
82
82
|
}
|
|
83
83
|
export declare class CompositeQuestionColumn extends BaseColumn<QuestionCompositeModel> {
|
|
84
|
-
|
|
84
|
+
constructor(question: QuestionCompositeModel, table: Table);
|
|
85
85
|
}
|
|
@@ -154,6 +154,10 @@ export declare abstract class Table {
|
|
|
154
154
|
* Sets locale for table.
|
|
155
155
|
*/
|
|
156
156
|
set locale(newLocale: string);
|
|
157
|
+
private _lockStateChanged;
|
|
158
|
+
lockStateChanged(): void;
|
|
159
|
+
unlockStateChanged(): void;
|
|
160
|
+
protected stateChanged(): void;
|
|
157
161
|
getLocales(): Array<string>;
|
|
158
162
|
protected supportSoftRefresh(): boolean;
|
|
159
163
|
protected softRefresh(): void;
|
package/survey.analytics.core.js
CHANGED
package/survey.analytics.css
CHANGED
package/survey.analytics.js
CHANGED
package/survey.analytics.min.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - SurveyJS Dashboard library v2.5.
|
|
2
|
+
* surveyjs - SurveyJS Dashboard library v2.5.13
|
|
3
3
|
* Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: SEE LICENSE IN LICENSE
|
|
5
5
|
*/
|
|
@@ -3789,7 +3789,21 @@ var BaseColumn = /** @class */ (function () {
|
|
|
3789
3789
|
this.isPublic = true;
|
|
3790
3790
|
this.location = _config__WEBPACK_IMPORTED_MODULE_3__.QuestionLocation.Column;
|
|
3791
3791
|
this.dataType = this.getDataType();
|
|
3792
|
+
this.updateWhenQuestionIsReady(question, table);
|
|
3792
3793
|
}
|
|
3794
|
+
BaseColumn.prototype.updateWhenQuestionIsReady = function (question, table) {
|
|
3795
|
+
if (!question)
|
|
3796
|
+
return;
|
|
3797
|
+
question.waitForQuestionIsReady().then(function () {
|
|
3798
|
+
try {
|
|
3799
|
+
table.lockStateChanged();
|
|
3800
|
+
table.refresh(!table.isInitTableDataProcessing);
|
|
3801
|
+
}
|
|
3802
|
+
finally {
|
|
3803
|
+
table.unlockStateChanged();
|
|
3804
|
+
}
|
|
3805
|
+
});
|
|
3806
|
+
};
|
|
3793
3807
|
Object.defineProperty(BaseColumn.prototype, "name", {
|
|
3794
3808
|
get: function () {
|
|
3795
3809
|
if (!this.nameValue) {
|
|
@@ -3831,19 +3845,6 @@ var BaseColumn = /** @class */ (function () {
|
|
|
3831
3845
|
BaseColumn.prototype.getDisplayValueCore = function (data) {
|
|
3832
3846
|
return data[this.name];
|
|
3833
3847
|
};
|
|
3834
|
-
BaseColumn.prototype.setupReadyChangedCallback = function (table, question) {
|
|
3835
|
-
if (!!question) {
|
|
3836
|
-
var onReadyChangedCallback_1 = function (sender, options) {
|
|
3837
|
-
if (options.isReady) {
|
|
3838
|
-
table.refresh(!table.isInitTableDataProcessing);
|
|
3839
|
-
sender.onReadyChanged.remove(onReadyChangedCallback_1);
|
|
3840
|
-
}
|
|
3841
|
-
};
|
|
3842
|
-
if (!question.isReady) {
|
|
3843
|
-
question.onReadyChanged.add(onReadyChangedCallback_1);
|
|
3844
|
-
}
|
|
3845
|
-
}
|
|
3846
|
-
};
|
|
3847
3848
|
BaseColumn.prototype.getDisplayValue = function (data, table, options) {
|
|
3848
3849
|
var displayValue = this.getDisplayValueCore(data);
|
|
3849
3850
|
var question = this.question;
|
|
@@ -3864,7 +3865,6 @@ var BaseColumn = /** @class */ (function () {
|
|
|
3864
3865
|
};
|
|
3865
3866
|
BaseColumn.prototype.getCellData = function (table, data) {
|
|
3866
3867
|
var displayValue = this.getDisplayValue(data, table, table.options);
|
|
3867
|
-
this.setupReadyChangedCallback(table, this.question);
|
|
3868
3868
|
return { question: this.question, displayValue: this.formatDisplayValue(displayValue) };
|
|
3869
3869
|
};
|
|
3870
3870
|
BaseColumn.prototype.toJSON = function () {
|
|
@@ -4105,30 +4105,25 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
|
4105
4105
|
|
|
4106
4106
|
var CustomQuestionColumn = /** @class */ (function (_super) {
|
|
4107
4107
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(CustomQuestionColumn, _super);
|
|
4108
|
-
function CustomQuestionColumn() {
|
|
4109
|
-
|
|
4108
|
+
function CustomQuestionColumn(question, table) {
|
|
4109
|
+
var _this = _super.call(this, question, table) || this;
|
|
4110
|
+
_this.updateWhenQuestionIsReady(question.contentQuestion, table);
|
|
4111
|
+
return _this;
|
|
4110
4112
|
}
|
|
4111
|
-
CustomQuestionColumn.prototype.getCellData = function (table, data) {
|
|
4112
|
-
this.setupReadyChangedCallback(table, this.question.contentQuestion);
|
|
4113
|
-
return _super.prototype.getCellData.call(this, table, data);
|
|
4114
|
-
};
|
|
4115
4113
|
return CustomQuestionColumn;
|
|
4116
4114
|
}(BaseColumn));
|
|
4117
4115
|
|
|
4118
4116
|
var CompositeQuestionColumn = /** @class */ (function (_super) {
|
|
4119
4117
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(CompositeQuestionColumn, _super);
|
|
4120
|
-
function CompositeQuestionColumn() {
|
|
4121
|
-
|
|
4122
|
-
}
|
|
4123
|
-
CompositeQuestionColumn.prototype.getCellData = function (table, data) {
|
|
4124
|
-
var _this = this;
|
|
4118
|
+
function CompositeQuestionColumn(question, table) {
|
|
4119
|
+
var _this = _super.call(this, question, table) || this;
|
|
4125
4120
|
var questionList = [];
|
|
4126
|
-
|
|
4127
|
-
questionList.forEach(function (
|
|
4128
|
-
_this.
|
|
4121
|
+
_this.question.contentPanel.addQuestionsToList(questionList);
|
|
4122
|
+
questionList.forEach(function (q) {
|
|
4123
|
+
_this.updateWhenQuestionIsReady(q, table);
|
|
4129
4124
|
});
|
|
4130
|
-
return
|
|
4131
|
-
}
|
|
4125
|
+
return _this;
|
|
4126
|
+
}
|
|
4132
4127
|
return CompositeQuestionColumn;
|
|
4133
4128
|
}(BaseColumn));
|
|
4134
4129
|
|
|
@@ -4786,6 +4781,7 @@ var Table = /** @class */ (function () {
|
|
|
4786
4781
|
});
|
|
4787
4782
|
return columns;
|
|
4788
4783
|
};
|
|
4784
|
+
this._lockStateChanged = false;
|
|
4789
4785
|
/**
|
|
4790
4786
|
* Fires when table state changed.
|
|
4791
4787
|
*/
|
|
@@ -4865,7 +4861,7 @@ var Table = /** @class */ (function () {
|
|
|
4865
4861
|
*/
|
|
4866
4862
|
Table.prototype.setPageSize = function (value) {
|
|
4867
4863
|
this.currentPageSize = value;
|
|
4868
|
-
this.
|
|
4864
|
+
this.stateChanged();
|
|
4869
4865
|
};
|
|
4870
4866
|
Table.prototype.getCreatedRows = function () {
|
|
4871
4867
|
return [].concat(this._rows);
|
|
@@ -4905,7 +4901,7 @@ var Table = /** @class */ (function () {
|
|
|
4905
4901
|
set: function (columns) {
|
|
4906
4902
|
this._columns = columns;
|
|
4907
4903
|
this.refresh(true);
|
|
4908
|
-
this.
|
|
4904
|
+
this.stateChanged();
|
|
4909
4905
|
},
|
|
4910
4906
|
enumerable: false,
|
|
4911
4907
|
configurable: true
|
|
@@ -4941,7 +4937,7 @@ var Table = /** @class */ (function () {
|
|
|
4941
4937
|
Table.prototype.moveColumn = function (from, to) {
|
|
4942
4938
|
var deletedColumns = this._columns.splice(from, 1);
|
|
4943
4939
|
this._columns.splice(to, 0, deletedColumns[0]);
|
|
4944
|
-
this.
|
|
4940
|
+
this.stateChanged();
|
|
4945
4941
|
};
|
|
4946
4942
|
Table.prototype.setColumnLocation = function (columnName, location) {
|
|
4947
4943
|
this.getColumnByName(columnName).location = location;
|
|
@@ -4949,7 +4945,7 @@ var Table = /** @class */ (function () {
|
|
|
4949
4945
|
columnName: columnName,
|
|
4950
4946
|
location: location,
|
|
4951
4947
|
});
|
|
4952
|
-
this.
|
|
4948
|
+
this.stateChanged();
|
|
4953
4949
|
};
|
|
4954
4950
|
Table.prototype.getColumnByName = function (columnName) {
|
|
4955
4951
|
return this._columns.filter(function (column) { return column.name === columnName; })[0];
|
|
@@ -4961,12 +4957,12 @@ var Table = /** @class */ (function () {
|
|
|
4961
4957
|
columnName: columnName,
|
|
4962
4958
|
columnVisibility: isVisible,
|
|
4963
4959
|
});
|
|
4964
|
-
this.
|
|
4960
|
+
this.stateChanged();
|
|
4965
4961
|
};
|
|
4966
4962
|
Table.prototype.setColumnWidth = function (columnName, width) {
|
|
4967
4963
|
var column = this.getColumnByName(columnName);
|
|
4968
4964
|
column.width = width;
|
|
4969
|
-
this.
|
|
4965
|
+
this.stateChanged();
|
|
4970
4966
|
};
|
|
4971
4967
|
Table.prototype.removeRow = function (row) {
|
|
4972
4968
|
var index = this._rows.indexOf(row);
|
|
@@ -4989,11 +4985,22 @@ var Table = /** @class */ (function () {
|
|
|
4989
4985
|
_localizationManager__WEBPACK_IMPORTED_MODULE_4__.localization.currentLocale = newLocale;
|
|
4990
4986
|
this.columns.forEach(function (c) { return c.displayName = undefined; });
|
|
4991
4987
|
this.refresh(true);
|
|
4992
|
-
this.
|
|
4988
|
+
this.stateChanged();
|
|
4993
4989
|
},
|
|
4994
4990
|
enumerable: false,
|
|
4995
4991
|
configurable: true
|
|
4996
4992
|
});
|
|
4993
|
+
Table.prototype.lockStateChanged = function () {
|
|
4994
|
+
this._lockStateChanged = true;
|
|
4995
|
+
};
|
|
4996
|
+
Table.prototype.unlockStateChanged = function () {
|
|
4997
|
+
this._lockStateChanged = false;
|
|
4998
|
+
};
|
|
4999
|
+
Table.prototype.stateChanged = function () {
|
|
5000
|
+
if (this._lockStateChanged)
|
|
5001
|
+
return;
|
|
5002
|
+
this.onStateChanged.fire(this, this.state);
|
|
5003
|
+
};
|
|
4997
5004
|
Table.prototype.getLocales = function () {
|
|
4998
5005
|
return [].concat(this._survey.getUsedLocales());
|
|
4999
5006
|
};
|
|
@@ -5076,7 +5083,7 @@ var Table = /** @class */ (function () {
|
|
|
5076
5083
|
this._survey.locale = survey_core__WEBPACK_IMPORTED_MODULE_1__.surveyLocalization.defaultLocale;
|
|
5077
5084
|
this.initialize();
|
|
5078
5085
|
this.refresh(true);
|
|
5079
|
-
this.
|
|
5086
|
+
this.stateChanged();
|
|
5080
5087
|
};
|
|
5081
5088
|
Table.prototype.updateColumnsFromData = function (columnsData) {
|
|
5082
5089
|
var _this = this;
|