survey-analytics 2.3.9 → 2.3.10
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 +2 -1
- package/fesm/survey.analytics.mjs.map +1 -1
- package/fesm/survey.analytics.mongo.mjs +1 -1
- package/fesm/survey.analytics.tabulator.mjs +28 -24
- package/fesm/survey.analytics.tabulator.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-analytics-tabulator.types/tables/table.d.ts +1 -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 +2 -1
- 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.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 +28 -24
- 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,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - SurveyJS Dashboard library v2.3.
|
|
2
|
+
* surveyjs - SurveyJS Dashboard library v2.3.10
|
|
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
|
*/
|
|
@@ -3232,9 +3232,10 @@ var CompositeColumnsBuilder = /** @class */ (function (_super) {
|
|
|
3232
3232
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
3233
3233
|
}
|
|
3234
3234
|
CompositeColumnsBuilder.prototype.getDisplayName = function (question, table) {
|
|
3235
|
+
var _a;
|
|
3235
3236
|
return table.useNamesAsTitles
|
|
3236
3237
|
? question.name
|
|
3237
|
-
: (question.title || "").trim() || question.name;
|
|
3238
|
+
: (((_a = question.locTitle) === null || _a === void 0 ? void 0 : _a.renderedHtml) || question.title || "").trim() || question.name;
|
|
3238
3239
|
};
|
|
3239
3240
|
CompositeColumnsBuilder.prototype.buildColumnsCore = function (question, table) {
|
|
3240
3241
|
var _this = this;
|
|
@@ -3337,9 +3338,10 @@ var BaseColumn = /** @class */ (function () {
|
|
|
3337
3338
|
configurable: true
|
|
3338
3339
|
});
|
|
3339
3340
|
BaseColumn.prototype.getDisplayName = function () {
|
|
3341
|
+
var _a;
|
|
3340
3342
|
return this.table.useNamesAsTitles
|
|
3341
3343
|
? this.question.name
|
|
3342
|
-
: (this.question.title || "").trim() || this.question.name;
|
|
3344
|
+
: (((_a = this.question.locTitle) === null || _a === void 0 ? void 0 : _a.renderedHtml) || this.question.title || "").trim() || this.question.name;
|
|
3343
3345
|
};
|
|
3344
3346
|
BaseColumn.prototype.getName = function () {
|
|
3345
3347
|
return this.question.name;
|
|
@@ -4297,13 +4299,7 @@ var Table = /** @class */ (function () {
|
|
|
4297
4299
|
if (!this._options) {
|
|
4298
4300
|
this._options = {};
|
|
4299
4301
|
}
|
|
4300
|
-
this.
|
|
4301
|
-
this.initTableData(data);
|
|
4302
|
-
_localizationManager__WEBPACK_IMPORTED_MODULE_4__.localization.currentLocale = this._survey.locale;
|
|
4303
|
-
this._columns = this.buildColumns(_survey);
|
|
4304
|
-
if (_columnsData.length !== 0) {
|
|
4305
|
-
this.updateColumnsFromData(this._columnsData);
|
|
4306
|
-
}
|
|
4302
|
+
this.initialize();
|
|
4307
4303
|
this.extensions = new _extensions_tableextensions__WEBPACK_IMPORTED_MODULE_5__.TableExtensions(this);
|
|
4308
4304
|
var f = survey_core__WEBPACK_IMPORTED_MODULE_1__.hasLicense;
|
|
4309
4305
|
this.haveCommercialLicense = (!!f && f(4)) ||
|
|
@@ -4313,6 +4309,16 @@ var Table = /** @class */ (function () {
|
|
|
4313
4309
|
? _options.haveCommercialLicense
|
|
4314
4310
|
: false));
|
|
4315
4311
|
}
|
|
4312
|
+
Table.prototype.initialize = function () {
|
|
4313
|
+
this.currentPageSize = 5;
|
|
4314
|
+
this.currentPageNumber = 1;
|
|
4315
|
+
this._columns = this.buildColumns(this._survey);
|
|
4316
|
+
this.initTableData(this.data);
|
|
4317
|
+
_localizationManager__WEBPACK_IMPORTED_MODULE_4__.localization.currentLocale = this._survey.locale;
|
|
4318
|
+
if (this._columnsData.length !== 0) {
|
|
4319
|
+
this.updateColumnsFromData(this._columnsData);
|
|
4320
|
+
}
|
|
4321
|
+
};
|
|
4316
4322
|
Table.prototype.getTableData = function () {
|
|
4317
4323
|
return [].concat(this.tableData || []);
|
|
4318
4324
|
};
|
|
@@ -4487,6 +4493,7 @@ var Table = /** @class */ (function () {
|
|
|
4487
4493
|
set: function (newLocale) {
|
|
4488
4494
|
this._survey.locale = newLocale;
|
|
4489
4495
|
_localizationManager__WEBPACK_IMPORTED_MODULE_4__.localization.currentLocale = newLocale;
|
|
4496
|
+
this.columns.forEach(function (c) { return c.displayName = undefined; });
|
|
4490
4497
|
this.refresh(true);
|
|
4491
4498
|
this.onStateChanged.fire(this, this.state);
|
|
4492
4499
|
},
|
|
@@ -4540,15 +4547,18 @@ var Table = /** @class */ (function () {
|
|
|
4540
4547
|
set: function (newState) {
|
|
4541
4548
|
if (!newState)
|
|
4542
4549
|
return;
|
|
4550
|
+
if (typeof newState.elements !== "undefined") {
|
|
4551
|
+
this.updateColumnsFromData(newState.elements);
|
|
4552
|
+
}
|
|
4543
4553
|
if (typeof newState.locale !== "undefined") {
|
|
4544
4554
|
_localizationManager__WEBPACK_IMPORTED_MODULE_4__.localization.currentLocale = newState.locale;
|
|
4545
4555
|
this._survey.locale = newState.locale;
|
|
4546
4556
|
this.initTableData(this.data);
|
|
4547
4557
|
}
|
|
4548
|
-
if (typeof newState.
|
|
4549
|
-
this.updateColumnsFromData(newState.elements);
|
|
4550
|
-
if (typeof newState.pageSize !== "undefined")
|
|
4558
|
+
if (typeof newState.pageSize !== "undefined") {
|
|
4551
4559
|
this.currentPageSize = newState.pageSize;
|
|
4560
|
+
}
|
|
4561
|
+
this.refresh(true);
|
|
4552
4562
|
},
|
|
4553
4563
|
enumerable: false,
|
|
4554
4564
|
configurable: true
|
|
@@ -4557,13 +4567,9 @@ var Table = /** @class */ (function () {
|
|
|
4557
4567
|
* Resets table state.
|
|
4558
4568
|
*/
|
|
4559
4569
|
Table.prototype.resetState = function () {
|
|
4560
|
-
this.
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
});
|
|
4564
|
-
this.locale = survey_core__WEBPACK_IMPORTED_MODULE_1__.surveyLocalization.defaultLocale;
|
|
4565
|
-
this.currentPageSize = 5;
|
|
4566
|
-
this.initTableData(this.data);
|
|
4570
|
+
this._survey.locale = survey_core__WEBPACK_IMPORTED_MODULE_1__.surveyLocalization.defaultLocale;
|
|
4571
|
+
this.initialize();
|
|
4572
|
+
this.refresh(true);
|
|
4567
4573
|
this.onStateChanged.fire(this, this.state);
|
|
4568
4574
|
};
|
|
4569
4575
|
Table.prototype.updateColumnsFromData = function (columnsData) {
|
|
@@ -4990,7 +4996,6 @@ var Tabulator = /** @class */ (function (_super) {
|
|
|
4990
4996
|
Tabulator.prototype.getColumns = function () {
|
|
4991
4997
|
var _this = this;
|
|
4992
4998
|
var columns = this.columns.map(function (column, index) {
|
|
4993
|
-
var question = _this._survey.getQuestionByName(column.name);
|
|
4994
4999
|
var formatter = "plaintext";
|
|
4995
5000
|
if (column.dataType == _config__WEBPACK_IMPORTED_MODULE_2__.ColumnDataType.FileLink) {
|
|
4996
5001
|
formatter = "html";
|
|
@@ -5000,9 +5005,7 @@ var Tabulator = /** @class */ (function (_super) {
|
|
|
5000
5005
|
}
|
|
5001
5006
|
return {
|
|
5002
5007
|
field: column.name,
|
|
5003
|
-
title:
|
|
5004
|
-
(_this._options.useNamesAsTitles ? question.name : question.title)) ||
|
|
5005
|
-
column.displayName,
|
|
5008
|
+
title: column.displayName || column.name,
|
|
5006
5009
|
width: column.width,
|
|
5007
5010
|
widthShrink: !column.width ? 1 : 0,
|
|
5008
5011
|
visible: _this.isColumnVisible(column),
|
|
@@ -5011,6 +5014,7 @@ var Tabulator = /** @class */ (function (_super) {
|
|
|
5011
5014
|
download: _this.options.downloadHiddenColumns ? true : undefined,
|
|
5012
5015
|
formatter: formatter,
|
|
5013
5016
|
headerTooltip: true,
|
|
5017
|
+
headerWordWrap: true,
|
|
5014
5018
|
accessorDownload: _this.accessorDownload,
|
|
5015
5019
|
titleFormatter: function (cell, formatterParams, onRendered) {
|
|
5016
5020
|
return _this.getTitleFormatter(cell, formatterParams, onRendered, column.name);
|