survey-analytics 2.3.7 → 2.3.9

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.
Files changed (37) hide show
  1. package/fesm/shared.mjs +1 -1
  2. package/fesm/shared2.mjs +61 -38
  3. package/fesm/shared2.mjs.map +1 -1
  4. package/fesm/survey.analytics.core.mjs +1 -1
  5. package/fesm/survey.analytics.mjs +1 -1
  6. package/fesm/survey.analytics.mongo.mjs +221 -0
  7. package/fesm/survey.analytics.mongo.mjs.map +1 -0
  8. package/fesm/survey.analytics.tabulator.mjs +37 -2
  9. package/fesm/survey.analytics.tabulator.mjs.map +1 -1
  10. package/package.json +12 -3
  11. package/survey-analytics-tabulator.types/entries/tabulator.d.ts +2 -0
  12. package/survey-analytics-tabulator.types/tables/columnbuilder.d.ts +3 -0
  13. package/survey-analytics.types/visualizationComposite.d.ts +1 -1
  14. package/survey-analytics.types/visualizationPanel.d.ts +6 -0
  15. package/survey-analytics.types/visualizerBase.d.ts +5 -0
  16. package/survey.analytics.core.css +1 -1
  17. package/survey.analytics.core.js +66 -39
  18. package/survey.analytics.core.js.map +1 -1
  19. package/survey.analytics.core.min.css +1 -1
  20. package/survey.analytics.core.min.js +1 -1
  21. package/survey.analytics.core.min.js.LICENSE.txt +1 -1
  22. package/survey.analytics.css +1 -1
  23. package/survey.analytics.js +66 -39
  24. package/survey.analytics.js.map +1 -1
  25. package/survey.analytics.min.css +1 -1
  26. package/survey.analytics.min.js +1 -1
  27. package/survey.analytics.min.js.LICENSE.txt +1 -1
  28. package/survey.analytics.mongo.js +359 -0
  29. package/survey.analytics.mongo.js.map +1 -0
  30. package/survey.analytics.mongo.min.js +2 -0
  31. package/survey.analytics.mongo.min.js.LICENSE.txt +5 -0
  32. package/survey.analytics.tabulator.css +1 -1
  33. package/survey.analytics.tabulator.js +80 -5
  34. package/survey.analytics.tabulator.js.map +1 -1
  35. package/survey.analytics.tabulator.min.css +1 -1
  36. package/survey.analytics.tabulator.min.js +1 -1
  37. package/survey.analytics.tabulator.min.js.LICENSE.txt +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.3.7
2
+ * surveyjs - SurveyJS Dashboard library v2.3.9
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
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.3.7
2
+ * surveyjs - SurveyJS Dashboard library v2.3.9
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
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.3.7
2
+ * surveyjs - SurveyJS Dashboard library v2.3.9
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
  */
@@ -6885,14 +6885,16 @@ var AlternativeVisualizersWrapper = /** @class */ (function (_super) {
6885
6885
  _this.visualizersWithSelection.push(visualizer);
6886
6886
  }
6887
6887
  });
6888
- _this.registerToolbarItem("changeVisualizer", function () {
6889
- return _this.visualizerSelector = _utils_index__WEBPACK_IMPORTED_MODULE_3__.DocumentHelper.createSelector(_this.visualizers.map(function (visualizer) {
6890
- return {
6891
- value: visualizer.type,
6892
- text: _localizationManager__WEBPACK_IMPORTED_MODULE_2__.localization.getString("visualizer_" + visualizer.type),
6893
- };
6894
- }), function (option) { return _this.visualizer.type === option.value; }, function (e) { return _this.setVisualizer(e.target.value); });
6895
- }, 0);
6888
+ if (_this.options.allowChangeVisualizerType !== false) {
6889
+ _this.registerToolbarItem("changeVisualizer", function () {
6890
+ return _this.visualizerSelector = _utils_index__WEBPACK_IMPORTED_MODULE_3__.DocumentHelper.createSelector(_this.visualizers.map(function (visualizer) {
6891
+ return {
6892
+ value: visualizer.type,
6893
+ text: _localizationManager__WEBPACK_IMPORTED_MODULE_2__.localization.getString("visualizer_" + visualizer.type),
6894
+ };
6895
+ }), function (option) { return _this.visualizer.type === option.value; }, function (e) { return _this.setVisualizer(e.target.value); });
6896
+ }, 0);
6897
+ }
6896
6898
  _this.visualizer = visualizers[0];
6897
6899
  _this.visualizer.onAfterRender.add(_this.onAfterVisualizerRenderCallback);
6898
6900
  _this.visualizer.onStateChanged.add(_this.onVisualizerStateChangedCallback);
@@ -11146,19 +11148,21 @@ var NumberModel = /** @class */ (function (_super) {
11146
11148
  _this.chartTypes = _this._chartAdapter.getChartTypes();
11147
11149
  _this.chartType = _this.chartTypes[0];
11148
11150
  }
11149
- _this.registerToolbarItem("changeChartType", function () {
11150
- if (_this.chartTypes.length > 1) {
11151
- return _utils_index__WEBPACK_IMPORTED_MODULE_3__.DocumentHelper.createSelector(_this.chartTypes.map(function (chartType) {
11152
- return {
11153
- value: chartType,
11154
- text: _localizationManager__WEBPACK_IMPORTED_MODULE_2__.localization.getString("chartType_" + chartType),
11155
- };
11156
- }), function (option) { return _this.chartType === option.value; }, function (e) {
11157
- _this.setChartType(e.target.value);
11158
- });
11159
- }
11160
- return null;
11161
- });
11151
+ if (_this.options.allowChangeVisualizerType !== false) {
11152
+ _this.registerToolbarItem("changeChartType", function () {
11153
+ if (_this.chartTypes.length > 1) {
11154
+ return _utils_index__WEBPACK_IMPORTED_MODULE_3__.DocumentHelper.createSelector(_this.chartTypes.map(function (chartType) {
11155
+ return {
11156
+ value: chartType,
11157
+ text: _localizationManager__WEBPACK_IMPORTED_MODULE_2__.localization.getString("chartType_" + chartType),
11158
+ };
11159
+ }), function (option) { return _this.chartType === option.value; }, function (e) {
11160
+ _this.setChartType(e.target.value);
11161
+ });
11162
+ }
11163
+ return null;
11164
+ });
11165
+ }
11162
11166
  return _this;
11163
11167
  }
11164
11168
  NumberModel.prototype.onDataChanged = function () {
@@ -12821,19 +12825,21 @@ var SelectBase = /** @class */ (function (_super) {
12821
12825
  _this._chartType = _this.options.defaultChartType;
12822
12826
  }
12823
12827
  }
12824
- _this.registerToolbarItem("changeChartType", function () {
12825
- if (_this.chartTypes.length > 1) {
12826
- return _utils_index__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createSelector(_this.chartTypes.map(function (chartType) {
12827
- return {
12828
- value: chartType,
12829
- text: _localizationManager__WEBPACK_IMPORTED_MODULE_3__.localization.getString("chartType_" + chartType),
12830
- };
12831
- }), function (option) { return _this.chartType === option.value; }, function (e) {
12832
- _this.setChartType(e.target.value);
12833
- });
12834
- }
12835
- return null;
12836
- });
12828
+ if (_this.options.allowChangeVisualizerType !== false) {
12829
+ _this.registerToolbarItem("changeChartType", function () {
12830
+ if (_this.chartTypes.length > 1) {
12831
+ return _utils_index__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createSelector(_this.chartTypes.map(function (chartType) {
12832
+ return {
12833
+ value: chartType,
12834
+ text: _localizationManager__WEBPACK_IMPORTED_MODULE_3__.localization.getString("chartType_" + chartType),
12835
+ };
12836
+ }), function (option) { return _this.chartType === option.value; }, function (e) {
12837
+ _this.setChartType(e.target.value);
12838
+ });
12839
+ }
12840
+ return null;
12841
+ });
12842
+ }
12837
12843
  _this.registerToolbarItem("changeAnswersOrder", function () {
12838
12844
  if (_this.isSupportAnswersOrder()) {
12839
12845
  _this.choicesOrderSelector = _utils_index__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createSelector([
@@ -13014,6 +13020,11 @@ var SelectBase = /** @class */ (function (_super) {
13014
13020
  }
13015
13021
  };
13016
13022
  SelectBase.prototype.getSelectedItemByText = function (itemText) {
13023
+ var _a;
13024
+ if (this.question instanceof survey_core__WEBPACK_IMPORTED_MODULE_1__.QuestionRatingModel) {
13025
+ var rateValues = this.question.rateValues;
13026
+ return (_a = rateValues === null || rateValues === void 0 ? void 0 : rateValues.filter(function (choice) { return choice.text === itemText; })[0]) !== null && _a !== void 0 ? _a : new survey_core__WEBPACK_IMPORTED_MODULE_1__.ItemValue(parseFloat(itemText), itemText);
13027
+ }
13017
13028
  var selBase = this.question;
13018
13029
  if (this.question.hasOther && itemText == selBase.otherText) {
13019
13030
  return selBase.otherItem;
@@ -14399,9 +14410,9 @@ var VisualizationComposite = /** @class */ (function (_super) {
14399
14410
  return _super.call(this, question, data, options, name || "composite") || this;
14400
14411
  }
14401
14412
  VisualizationComposite.prototype.getQuestions = function () {
14402
- var matrixdynamic = this.question;
14413
+ var questionComposite = this.question;
14403
14414
  var innerQuestions = [];
14404
- matrixdynamic.contentPanel.addQuestionsToList(innerQuestions);
14415
+ questionComposite.contentPanel.addQuestionsToList(innerQuestions);
14405
14416
  return innerQuestions;
14406
14417
  };
14407
14418
  return VisualizationComposite;
@@ -15148,7 +15159,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
15148
15159
  question = Array.isArray(question) ? question[0] : question;
15149
15160
  var element = _this.getElement(question.name);
15150
15161
  if (!!element) {
15151
- element.displayName = _this.processText(question.title);
15162
+ element.displayName = _this.getTitle(question);
15152
15163
  }
15153
15164
  });
15154
15165
  this.visualizers.forEach(function (v) {
@@ -15216,7 +15227,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
15216
15227
  question = Array.isArray(question) ? question[0] : question;
15217
15228
  return {
15218
15229
  name: question.name,
15219
- displayName: _this.processText(question.title),
15230
+ displayName: _this.getTitle(question),
15220
15231
  isVisible: true,
15221
15232
  isPublic: true,
15222
15233
  };
@@ -15949,6 +15960,22 @@ var VisualizerBase = /** @class */ (function () {
15949
15960
  }
15950
15961
  return undefined;
15951
15962
  };
15963
+ Object.defineProperty(VisualizerBase.prototype, "title", {
15964
+ /**
15965
+ * Returns the visualizer's title.
15966
+ */
15967
+ get: function () {
15968
+ return this.getTitle(this.question);
15969
+ },
15970
+ enumerable: false,
15971
+ configurable: true
15972
+ });
15973
+ VisualizerBase.prototype.getTitle = function (question) {
15974
+ var _a;
15975
+ if (question === undefined)
15976
+ return "";
15977
+ return this.processText(((_a = question.locTitle) === null || _a === void 0 ? void 0 : _a.renderedHtml) ? question.locTitle.renderedHtml : question.title);
15978
+ };
15952
15979
  Object.defineProperty(VisualizerBase.prototype, "type", {
15953
15980
  /**
15954
15981
  * Returns the visualizer's type.