survey-analytics 1.12.51 → 1.12.53

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 (33) hide show
  1. package/fesm/shared.mjs +59 -1
  2. package/fesm/shared.mjs.map +1 -1
  3. package/fesm/shared2.mjs +190 -81
  4. package/fesm/shared2.mjs.map +1 -1
  5. package/fesm/survey.analytics.core.mjs +2 -2
  6. package/fesm/survey.analytics.mjs +12 -5
  7. package/fesm/survey.analytics.mjs.map +1 -1
  8. package/fesm/survey.analytics.tabulator.mjs +25 -12
  9. package/fesm/survey.analytics.tabulator.mjs.map +1 -1
  10. package/package.json +2 -2
  11. package/survey-analytics-tabulator.types/analytics-localization/finnish.d.ts +2 -0
  12. package/survey-analytics-tabulator.types/analytics-localization/swedish.d.ts +2 -0
  13. package/survey-analytics.types/analytics-localization/finnish.d.ts +2 -0
  14. package/survey-analytics.types/analytics-localization/swedish.d.ts +2 -0
  15. package/survey-analytics.types/pivot.d.ts +3 -1
  16. package/survey.analytics.core.css +1 -1
  17. package/survey.analytics.core.js +280 -91
  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.datatables.css +1 -1
  24. package/survey.analytics.datatables.js +1 -1
  25. package/survey.analytics.datatables.min.css +1 -1
  26. package/survey.analytics.datatables.min.js.LICENSE.txt +1 -1
  27. package/survey.analytics.js +1 -1
  28. package/survey.analytics.min.css +1 -1
  29. package/survey.analytics.min.js.LICENSE.txt +1 -1
  30. package/survey.analytics.tabulator.css +1 -1
  31. package/survey.analytics.tabulator.js +1 -1
  32. package/survey.analytics.tabulator.min.css +1 -1
  33. package/survey.analytics.tabulator.min.js.LICENSE.txt +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.3.3
2
+ * surveyjs - SurveyJS Dashboard library v2.3.6
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
  */
@@ -6925,12 +6925,15 @@ var AlternativeVisualizersWrapper = /** @class */ (function (_super) {
6925
6925
  if (quiet === void 0) { quiet = false; }
6926
6926
  var visualizerCandidate = this.visualizers.filter(function (v) { return v.type === type; })[0];
6927
6927
  if (!!visualizerCandidate && visualizerCandidate !== this.visualizer) {
6928
+ var isFooterCollapsed = void 0;
6928
6929
  if (!!this.visualizer) {
6930
+ isFooterCollapsed = this.visualizer.isFooterCollapsed;
6929
6931
  this.visualizer.onStateChanged.remove(this.onVisualizerStateChangedCallback);
6930
6932
  this.visualizer.onAfterRender.remove(this.onAfterVisualizerRenderCallback);
6931
6933
  this.visualizer.destroy();
6932
6934
  }
6933
6935
  this.visualizer = visualizerCandidate;
6936
+ this.visualizer.isFooterCollapsed = isFooterCollapsed;
6934
6937
  this.refresh();
6935
6938
  this.visualizer.onAfterRender.add(this.onAfterVisualizerRenderCallback);
6936
6939
  this.visualizer.onStateChanged.add(this.onVisualizerStateChangedCallback);
@@ -6984,6 +6987,7 @@ var AlternativeVisualizersWrapper = /** @class */ (function (_super) {
6984
6987
  *
6985
6988
  * > This method is overriden in descendant classes.
6986
6989
  * @see setState
6990
+ * @see resetState
6987
6991
  */
6988
6992
  AlternativeVisualizersWrapper.prototype.getState = function () {
6989
6993
  var currentVisualizerState = this.visualizer.getState();
@@ -6998,8 +7002,8 @@ var AlternativeVisualizersWrapper = /** @class */ (function (_super) {
6998
7002
  /**
6999
7003
  * Sets the visualizer's state.
7000
7004
  *
7001
- * > This method is overriden in descendant classes.
7002
7005
  * @see getState
7006
+ * @see resetState
7003
7007
  */
7004
7008
  AlternativeVisualizersWrapper.prototype.setState = function (state) {
7005
7009
  if (!!state.visualizer) {
@@ -7009,6 +7013,17 @@ var AlternativeVisualizersWrapper = /** @class */ (function (_super) {
7009
7013
  this.visualizer.setState(state.state);
7010
7014
  }
7011
7015
  };
7016
+ /**
7017
+ * Resets the visualizer's state.
7018
+ *
7019
+ * @see getState
7020
+ * @see setState
7021
+ */
7022
+ AlternativeVisualizersWrapper.prototype.resetState = function () {
7023
+ _super.prototype.resetState.call(this);
7024
+ this.visualizers.forEach(function (visualizer) { return visualizer.resetState(); });
7025
+ this.setVisualizer(this.visualizers[0].type, true);
7026
+ };
7012
7027
  AlternativeVisualizersWrapper.prototype.getValues = function () {
7013
7028
  return this.visualizer.getValues();
7014
7029
  };
@@ -7192,6 +7207,10 @@ var arabicStrings = {
7192
7207
  responses: "الاستجابات",
7193
7208
  // [Auto-translated] "NPS"
7194
7209
  visualizer_nps: "NPS",
7210
+ // [Auto-translated] "Chart"
7211
+ visualizer_boolean: "جدول",
7212
+ // [Auto-translated] "Table"
7213
+ visualizer_options: "جدول",
7195
7214
  // [Auto-translated] "NPS"
7196
7215
  npsScore: "NPS",
7197
7216
  // [Auto-translated] "Promoters"
@@ -7372,6 +7391,10 @@ var dutchStrings = {
7372
7391
  responses: "Reacties",
7373
7392
  // [Auto-translated] "NPS"
7374
7393
  visualizer_nps: "NPS",
7394
+ // [Auto-translated] "Chart"
7395
+ visualizer_boolean: "Zeekaart",
7396
+ // [Auto-translated] "Table"
7397
+ visualizer_options: "Tafel",
7375
7398
  // [Auto-translated] "NPS"
7376
7399
  npsScore: "NPS",
7377
7400
  // [Auto-translated] "Promoters"
@@ -7481,6 +7504,8 @@ var englishStrings = {
7481
7504
  statistics_chart: "Chart",
7482
7505
  responses: "Responses",
7483
7506
  visualizer_nps: "NPS",
7507
+ visualizer_boolean: "Chart",
7508
+ visualizer_options: "Table",
7484
7509
  npsScore: "NPS",
7485
7510
  npsPromoters: "Promoters",
7486
7511
  npsPassives: "Passives",
@@ -7657,6 +7682,10 @@ var farsiStrings = {
7657
7682
  responses: "پاسخ",
7658
7683
  // [Auto-translated] "NPS"
7659
7684
  visualizer_nps: "NPS",
7685
+ // [Auto-translated] "Chart"
7686
+ visualizer_boolean: "نمودار",
7687
+ // [Auto-translated] "Table"
7688
+ visualizer_options: "جدول",
7660
7689
  // [Auto-translated] "NPS"
7661
7690
  npsScore: "NPS",
7662
7691
  // [Auto-translated] "Promoters"
@@ -7837,6 +7866,10 @@ var finnishStrings = {
7837
7866
  responses: "Vastaukset",
7838
7867
  // "NPS"
7839
7868
  visualizer_nps: "NPS",
7869
+ // [Auto-translated] "Chart"
7870
+ visualizer_boolean: "Kaavio",
7871
+ // [Auto-translated] "Table"
7872
+ visualizer_options: "Pöytä",
7840
7873
  // "NPS"
7841
7874
  npsScore: "NPS",
7842
7875
  // "Promoters"
@@ -8017,6 +8050,10 @@ var frenchStrings = {
8017
8050
  responses: "Réponses",
8018
8051
  // [Auto-translated] "NPS"
8019
8052
  visualizer_nps: "Le NPS",
8053
+ // [Auto-translated] "Chart"
8054
+ visualizer_boolean: "Graphique",
8055
+ // [Auto-translated] "Table"
8056
+ visualizer_options: "Table",
8020
8057
  // [Auto-translated] "NPS"
8021
8058
  npsScore: "Le NPS",
8022
8059
  // [Auto-translated] "Promoters"
@@ -8197,6 +8234,10 @@ var germanStrings = {
8197
8234
  responses: "Antworten",
8198
8235
  // [Auto-translated] "NPS"
8199
8236
  visualizer_nps: "NPS (NPS)",
8237
+ // [Auto-translated] "Chart"
8238
+ visualizer_boolean: "Diagramm",
8239
+ // [Auto-translated] "Table"
8240
+ visualizer_options: "Tisch",
8200
8241
  // [Auto-translated] "NPS"
8201
8242
  npsScore: "NPS (NPS)",
8202
8243
  // [Auto-translated] "Promoters"
@@ -8377,6 +8418,10 @@ var italianStrings = {
8377
8418
  responses: "Risposte",
8378
8419
  // [Auto-translated] "NPS"
8379
8420
  visualizer_nps: "Rete nazionale di dati",
8421
+ // [Auto-translated] "Chart"
8422
+ visualizer_boolean: "Tabella",
8423
+ // [Auto-translated] "Table"
8424
+ visualizer_options: "Tavolo",
8380
8425
  // [Auto-translated] "NPS"
8381
8426
  npsScore: "Rete nazionale di dati",
8382
8427
  // [Auto-translated] "Promoters"
@@ -8557,6 +8602,10 @@ var japaneseStrings = {
8557
8602
  responses: "回答数",
8558
8603
  // [Auto-translated] "NPS"
8559
8604
  visualizer_nps: "NPSの",
8605
+ // [Auto-translated] "Chart"
8606
+ visualizer_boolean: "チャート",
8607
+ // [Auto-translated] "Table"
8608
+ visualizer_options: "テーブル",
8560
8609
  // [Auto-translated] "NPS"
8561
8610
  npsScore: "NPSの",
8562
8611
  // [Auto-translated] "Promoters"
@@ -8737,6 +8786,10 @@ var norwegianStrings = {
8737
8786
  responses: "Svar",
8738
8787
  // [Auto-translated] "NPS"
8739
8788
  visualizer_nps: "NPS",
8789
+ // [Auto-translated] "Chart"
8790
+ visualizer_boolean: "Sjøkart",
8791
+ // [Auto-translated] "Table"
8792
+ visualizer_options: "Bord",
8740
8793
  // [Auto-translated] "NPS"
8741
8794
  npsScore: "NPS",
8742
8795
  // [Auto-translated] "Promoters"
@@ -8917,6 +8970,10 @@ var plStrings = {
8917
8970
  responses: "Odpowiedzi",
8918
8971
  // [Auto-translated] "NPS"
8919
8972
  visualizer_nps: "Wskaźnik NPS",
8973
+ // [Auto-translated] "Chart"
8974
+ visualizer_boolean: "Wykres",
8975
+ // [Auto-translated] "Table"
8976
+ visualizer_options: "Stół",
8920
8977
  // [Auto-translated] "NPS"
8921
8978
  npsScore: "Wskaźnik NPS",
8922
8979
  // [Auto-translated] "Promoters"
@@ -9097,6 +9154,10 @@ var portugueseStrings = {
9097
9154
  responses: "Respostas",
9098
9155
  // [Auto-translated] "NPS"
9099
9156
  visualizer_nps: "NPS",
9157
+ // [Auto-translated] "Chart"
9158
+ visualizer_boolean: "Gráfico",
9159
+ // [Auto-translated] "Table"
9160
+ visualizer_options: "Mesa",
9100
9161
  // [Auto-translated] "NPS"
9101
9162
  npsScore: "NPS",
9102
9163
  // [Auto-translated] "Promoters"
@@ -9277,6 +9338,10 @@ var russianStrings = {
9277
9338
  responses: "ответов",
9278
9339
  // [Auto-translated] "NPS"
9279
9340
  visualizer_nps: "NPS",
9341
+ // [Auto-translated] "Chart"
9342
+ visualizer_boolean: "Диаграмма",
9343
+ // [Auto-translated] "Table"
9344
+ visualizer_options: "Стол",
9280
9345
  // [Auto-translated] "NPS"
9281
9346
  npsScore: "NPS",
9282
9347
  // [Auto-translated] "Promoters"
@@ -9457,6 +9522,10 @@ var spanishStrings = {
9457
9522
  responses: "Respuestas",
9458
9523
  // [Auto-translated] "NPS"
9459
9524
  visualizer_nps: "NPS",
9525
+ // [Auto-translated] "Chart"
9526
+ visualizer_boolean: "Gráfico",
9527
+ // [Auto-translated] "Table"
9528
+ visualizer_options: "Mesa",
9460
9529
  // [Auto-translated] "NPS"
9461
9530
  npsScore: "NPS",
9462
9531
  // [Auto-translated] "Promoters"
@@ -9637,6 +9706,10 @@ var swedishStrings = {
9637
9706
  responses: "Svar",
9638
9707
  // "NPS"
9639
9708
  visualizer_nps: "NPS",
9709
+ // [Auto-translated] "Chart"
9710
+ visualizer_boolean: "Diagram",
9711
+ // [Auto-translated] "Table"
9712
+ visualizer_options: "Bord",
9640
9713
  // "NPS"
9641
9714
  npsScore: "NPS",
9642
9715
  // "Promoters"
@@ -10149,7 +10222,7 @@ var HistogramModel = /** @class */ (function (_super) {
10149
10222
 
10150
10223
  _visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("date", HistogramModel);
10151
10224
  _visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("number", HistogramModel, 100);
10152
- _visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("rating", HistogramModel, 100);
10225
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("rating", HistogramModel, 300);
10153
10226
 
10154
10227
 
10155
10228
  /***/ }),
@@ -11003,9 +11076,11 @@ __webpack_require__.r(__webpack_exports__);
11003
11076
 
11004
11077
  var PivotModel = /** @class */ (function (_super) {
11005
11078
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(PivotModel, _super);
11006
- function PivotModel(questions, data, options, name) {
11079
+ function PivotModel(questions, data, options, name, isRoot) {
11080
+ if (isRoot === void 0) { isRoot = true; }
11007
11081
  var _this = _super.call(this, null, data, options, name || "pivot") || this;
11008
11082
  _this.questions = questions;
11083
+ _this.isRoot = isRoot;
11009
11084
  _this.valueType = "enum";
11010
11085
  _this._cachedValues = undefined;
11011
11086
  _this._continuousData = undefined;
@@ -11428,6 +11503,14 @@ var PivotModel = /** @class */ (function (_super) {
11428
11503
  PivotModel.prototype.isSupportSoftUpdateContent = function () {
11429
11504
  return false;
11430
11505
  };
11506
+ PivotModel.prototype.renderToolbar = function (container) {
11507
+ if (!this.haveCommercialLicense && this.isRoot) {
11508
+ var banner = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.createCommercialLicenseLink)();
11509
+ container.appendChild(banner);
11510
+ }
11511
+ container.className += " sa-pivot__header";
11512
+ _super.prototype.renderToolbar.call(this, container);
11513
+ };
11431
11514
  PivotModel.IntervalsCount = 10;
11432
11515
  PivotModel.UseIntervalsFrom = 10;
11433
11516
  return PivotModel;
@@ -11593,11 +11676,9 @@ var SelectBase = /** @class */ (function (_super) {
11593
11676
  _this.emptyAnswersBtn = undefined;
11594
11677
  _this.transposeDataBtn = undefined;
11595
11678
  _this.topNSelector = undefined;
11596
- _this._showPercentages = false;
11597
11679
  _this._showOnlyPercentages = false;
11598
- _this._percentagePrecision = 0;
11680
+ _this._percentagePrecision = 2;
11599
11681
  _this._answersOrder = "default";
11600
- _this._supportSelection = true;
11601
11682
  _this._hideEmptyAnswers = false;
11602
11683
  _this._topN = -1;
11603
11684
  _this.topNValues = [].concat(SelectBase.topNValuesDefaults);
@@ -11617,7 +11698,7 @@ var SelectBase = /** @class */ (function (_super) {
11617
11698
  _this.dataProvider.raiseDataChanged();
11618
11699
  };
11619
11700
  }
11620
- _this._showPercentages = _this.options.showPercentages === true;
11701
+ _this._supportSelection = true;
11621
11702
  _this._showOnlyPercentages = _this.options.showOnlyPercentages === true;
11622
11703
  if (_this.options.percentagePrecision) {
11623
11704
  _this._percentagePrecision = _this.options.percentagePrecision;
@@ -11875,12 +11956,23 @@ var SelectBase = /** @class */ (function (_super) {
11875
11956
  enumerable: false,
11876
11957
  configurable: true
11877
11958
  });
11959
+ SelectBase.prototype.getShowPercentagesDefault = function () {
11960
+ if (this.options.showPercentages === undefined) {
11961
+ return ["pie", "doughnut"].indexOf(this.chartType) !== -1;
11962
+ }
11963
+ return this.options.showPercentages === true;
11964
+ };
11878
11965
  Object.defineProperty(SelectBase.prototype, "showPercentages", {
11879
11966
  /**
11880
11967
  * Gets and sets whether chart should show values and percentages.
11881
11968
  */
11882
11969
  get: function () {
11883
- return this._showPercentages;
11970
+ if (this._showPercentages !== undefined) {
11971
+ return this._showPercentages;
11972
+ }
11973
+ else {
11974
+ return this.getShowPercentagesDefault();
11975
+ }
11884
11976
  },
11885
11977
  set: function (val) {
11886
11978
  this._showPercentages = val;
@@ -12042,12 +12134,10 @@ var SelectBase = /** @class */ (function (_super) {
12042
12134
  var percentages = [];
12043
12135
  var percentagePrecision = this._percentagePrecision;
12044
12136
  if (data.length < 2) {
12045
- data.forEach(function (res, index) {
12046
- var sum = res.reduce(function (sum, val) { return sum + val; }, 0);
12047
- percentages[index] = res.map(function (val) {
12048
- var value = percentagePrecision ? +(val / sum).toFixed(percentagePrecision) : Math.round((val / sum) * 10000);
12049
- return sum && (value / 100);
12050
- });
12137
+ var sum = data[0].reduce(function (sum, val) { return sum + val; }, 0);
12138
+ percentages[0] = data[0].map(function (val) {
12139
+ var value = percentagePrecision ? +(val / sum * 100).toFixed(percentagePrecision) : Math.round(val / sum * 100);
12140
+ return sum && value;
12051
12141
  });
12052
12142
  }
12053
12143
  else {
@@ -12059,7 +12149,7 @@ var SelectBase = /** @class */ (function (_super) {
12059
12149
  for (var j = 0; j < data.length; j++) {
12060
12150
  if (!Array.isArray(percentages[j]))
12061
12151
  percentages[j] = [];
12062
- var value = percentagePrecision ? +((data[j][i] / sum) * 100).toFixed(percentagePrecision) : Math.round((data[j][i] / sum) * 100);
12152
+ var value = percentagePrecision ? +(data[j][i] / sum * 100).toFixed(percentagePrecision) : Math.round(data[j][i] / sum * 100);
12063
12153
  percentages[j][i] = sum && value;
12064
12154
  }
12065
12155
  }
@@ -12087,7 +12177,7 @@ var SelectBase = /** @class */ (function (_super) {
12087
12177
  */
12088
12178
  SelectBase.prototype.getAnswersData = function () {
12089
12179
  return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
12090
- var seriesLabels, datasets, labels, colors, texts, temp, zippedArray, dict, unzippedArray, answersData;
12180
+ var seriesLabels, datasets, labels, colors, temp, texts, zippedArray, dict, unzippedArray, answersData;
12091
12181
  return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
12092
12182
  switch (_a.label) {
12093
12183
  case 0:
@@ -12097,14 +12187,13 @@ var SelectBase = /** @class */ (function (_super) {
12097
12187
  datasets = (_a.sent());
12098
12188
  labels = this.getLabels();
12099
12189
  colors = this.getColors();
12100
- texts = this.showPercentages ? this.getPercentages(datasets) : datasets;
12101
12190
  if (this.transposeData) {
12102
12191
  datasets = this.transpose(datasets);
12103
- texts = this.transpose(texts);
12104
12192
  temp = seriesLabels;
12105
12193
  seriesLabels = labels;
12106
12194
  labels = temp;
12107
12195
  }
12196
+ texts = this.showPercentages ? this.getPercentages(datasets) : datasets;
12108
12197
  if (this.answersOrder == "asc" || this.answersOrder == "desc") {
12109
12198
  zippedArray = this.showPercentages
12110
12199
  ? _utils_index__WEBPACK_IMPORTED_MODULE_4__.DataHelper.zipArrays(labels, colors, texts[0])
@@ -12190,6 +12279,18 @@ var SelectBase = /** @class */ (function (_super) {
12190
12279
  var selectedItem = survey_core__WEBPACK_IMPORTED_MODULE_1__.ItemValue.getItemByValue(this.question.visibleChoices, state.filter);
12191
12280
  this.setSelection(selectedItem !== null && selectedItem !== void 0 ? selectedItem : undefined);
12192
12281
  };
12282
+ SelectBase.prototype.resetState = function () {
12283
+ _super.prototype.resetState.call(this);
12284
+ // this._showPercentages = this.options.showPercentages === true;
12285
+ // this._showOnlyPercentages = this.options.showOnlyPercentages === true;
12286
+ // this._showMissingAnswers = this.isSupportMissingAnswers() && this.options.showMissingAnswers === true;
12287
+ // this._transposeData = this.options.transposeData || false;
12288
+ this._hideEmptyAnswers = this.options.hideEmptyAnswers === true;
12289
+ this._answersOrder = this.options.answersOrder || "default";
12290
+ this._topN = -1;
12291
+ this.chartType = this.chartTypes[0];
12292
+ this.setSelection(undefined);
12293
+ };
12193
12294
  SelectBase.topNValuesDefaults = [-1, 5, 10, 20];
12194
12295
  SelectBase._stateProperties = ["chartType", "answersOrder", "hideEmptyAnswers", "topN"];
12195
12296
  return SelectBase;
@@ -12200,6 +12301,7 @@ _visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.register
12200
12301
  _visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.registerVisualizer("dropdown", SelectBase);
12201
12302
  _visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.registerVisualizer("imagepicker", SelectBase);
12202
12303
  _visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.registerVisualizer("tagbox", SelectBase);
12304
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.registerVisualizer("rating", SelectBase, 100);
12203
12305
 
12204
12306
 
12205
12307
  /***/ }),
@@ -12357,14 +12459,17 @@ __webpack_require__.r(__webpack_exports__);
12357
12459
  __webpack_require__.r(__webpack_exports__);
12358
12460
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12359
12461
  /* harmony export */ StatisticsTable: () => (/* binding */ StatisticsTable),
12360
- /* harmony export */ StatisticsTableAdapter: () => (/* binding */ StatisticsTableAdapter)
12462
+ /* harmony export */ StatisticsTableAdapter: () => (/* binding */ StatisticsTableAdapter),
12463
+ /* harmony export */ StatisticsTableBoolean: () => (/* binding */ StatisticsTableBoolean)
12361
12464
  /* harmony export */ });
12362
12465
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
12363
12466
  /* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectBase */ "./src/selectBase.ts");
12364
- /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
12365
- /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
12467
+ /* harmony import */ var _boolean__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./boolean */ "./src/boolean.ts");
12468
+ /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
12366
12469
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "./src/utils/index.ts");
12367
- /* harmony import */ var _statistics_table_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./statistics-table.scss */ "./src/statistics-table.scss");
12470
+ /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
12471
+ /* harmony import */ var _statistics_table_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./statistics-table.scss */ "./src/statistics-table.scss");
12472
+
12368
12473
 
12369
12474
 
12370
12475
 
@@ -12386,7 +12491,7 @@ var StatisticsTableAdapter = /** @class */ (function () {
12386
12491
  _a = _b.sent(), datasets = _a.datasets, labels = _a.labels, colors = _a.colors, texts = _a.texts, seriesLabels = _a.seriesLabels;
12387
12492
  hasSeries = seriesLabels.length > 1;
12388
12493
  emptyTextNode = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("p", "", {
12389
- innerText: _localizationManager__WEBPACK_IMPORTED_MODULE_3__.localization.getString("noResults"),
12494
+ innerText: _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("noResults"),
12390
12495
  });
12391
12496
  if (datasets.length === 0 || datasets[0].length === 0) {
12392
12497
  container.appendChild(emptyTextNode);
@@ -12398,19 +12503,19 @@ var StatisticsTableAdapter = /** @class */ (function () {
12398
12503
  container.appendChild(tableNode);
12399
12504
  var headerRow = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("tr");
12400
12505
  var labelCell = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("th", "sa-statistics-table__cell-header", {
12401
- textContent: _localizationManager__WEBPACK_IMPORTED_MODULE_3__.localization.getString("answer"),
12506
+ textContent: _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("answer"),
12402
12507
  });
12403
12508
  headerRow.appendChild(labelCell);
12404
12509
  var sparklineCell = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("th", "sa-statistics-table__cell-header", {
12405
- textContent: _localizationManager__WEBPACK_IMPORTED_MODULE_3__.localization.getString("statistics_chart"),
12510
+ textContent: _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("statistics_chart"),
12406
12511
  });
12407
12512
  headerRow.appendChild(sparklineCell);
12408
12513
  var percentCell = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("th", "sa-statistics-table__cell-header", {
12409
- textContent: _localizationManager__WEBPACK_IMPORTED_MODULE_3__.localization.getString("percentage"),
12514
+ textContent: _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("percentage"),
12410
12515
  });
12411
12516
  headerRow.appendChild(percentCell);
12412
12517
  var valueCell = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("th", "sa-statistics-table__cell-header", {
12413
- textContent: _localizationManager__WEBPACK_IMPORTED_MODULE_3__.localization.getString("responses"),
12518
+ textContent: _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("responses"),
12414
12519
  });
12415
12520
  headerRow.appendChild(valueCell);
12416
12521
  tableNode.appendChild(headerRow);
@@ -12487,9 +12592,46 @@ var StatisticsTable = /** @class */ (function (_super) {
12487
12592
  return StatisticsTable;
12488
12593
  }(_selectBase__WEBPACK_IMPORTED_MODULE_1__.SelectBase));
12489
12594
 
12490
- _visualizationManager__WEBPACK_IMPORTED_MODULE_2__.VisualizationManager.registerVisualizer("radiogroup", StatisticsTable);
12491
- _visualizationManager__WEBPACK_IMPORTED_MODULE_2__.VisualizationManager.registerVisualizer("dropdown", StatisticsTable);
12492
- _visualizationManager__WEBPACK_IMPORTED_MODULE_2__.VisualizationManager.registerVisualizer("checkbox", StatisticsTable);
12595
+ var StatisticsTableBoolean = /** @class */ (function (_super) {
12596
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(StatisticsTableBoolean, _super);
12597
+ function StatisticsTableBoolean(question, data, options, name) {
12598
+ var _this = _super.call(this, question, data, options, name || "options") || this;
12599
+ _this._statisticsTableAdapter = new StatisticsTableAdapter(_this);
12600
+ _this.showPercentages = true;
12601
+ return _this;
12602
+ }
12603
+ StatisticsTableBoolean.prototype.destroyContent = function (container) {
12604
+ this._statisticsTableAdapter.destroy(container);
12605
+ _super.prototype.destroyContent.call(this, container);
12606
+ };
12607
+ StatisticsTableBoolean.prototype.renderContentAsync = function (container) {
12608
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
12609
+ var tableNode;
12610
+ return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
12611
+ switch (_a.label) {
12612
+ case 0:
12613
+ tableNode = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div");
12614
+ return [4 /*yield*/, this._statisticsTableAdapter.create(tableNode)];
12615
+ case 1:
12616
+ _a.sent();
12617
+ container.innerHTML = "";
12618
+ container.appendChild(tableNode);
12619
+ return [2 /*return*/, container];
12620
+ }
12621
+ });
12622
+ });
12623
+ };
12624
+ StatisticsTableBoolean.prototype.destroy = function () {
12625
+ this._statisticsTableAdapter.destroy(this.contentContainer);
12626
+ _super.prototype.destroy.call(this);
12627
+ };
12628
+ return StatisticsTableBoolean;
12629
+ }(_boolean__WEBPACK_IMPORTED_MODULE_2__.BooleanModel));
12630
+
12631
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("radiogroup", StatisticsTable);
12632
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("dropdown", StatisticsTable);
12633
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("checkbox", StatisticsTable);
12634
+ _visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("boolean", StatisticsTableBoolean);
12493
12635
 
12494
12636
 
12495
12637
  /***/ }),
@@ -13188,7 +13330,7 @@ var VisualizationManager = /** @class */ (function () {
13188
13330
  if (constructor) {
13189
13331
  var visualizers = VisualizationManager.vizualizers[qType];
13190
13332
  if (!!visualizers) {
13191
- var vDescr = visualizers.filter(function (v) { return v.ctor === constructor || v.ctor.isPrototypeOf(constructor); })[0];
13333
+ var vDescr = visualizers.filter(function (v) { return v.ctor === constructor; })[0];
13192
13334
  if (!!vDescr) {
13193
13335
  var index = visualizers.indexOf(vDescr);
13194
13336
  if (index !== -1) {
@@ -13211,10 +13353,13 @@ var VisualizationManager = /** @class */ (function () {
13211
13353
  };
13212
13354
  /**
13213
13355
  * Returns all visualizer constructors for a specified question type.
13214
- * @param questionType A question [type](https://surveyjs.io/form-library/documentation/api-reference/question#getType).
13356
+ * @param visualizerType A question [type](https://surveyjs.io/form-library/documentation/api-reference/question#getType).
13215
13357
  */
13216
- VisualizationManager.getVisualizersByType = function (questionType) {
13217
- var vDescrs = VisualizationManager.vizualizers[questionType];
13358
+ VisualizationManager.getVisualizersByType = function (visualizerType, fallbackVisualizerType) {
13359
+ var vDescrs = VisualizationManager.vizualizers[visualizerType];
13360
+ if (!!fallbackVisualizerType && (!vDescrs || vDescrs.length == 0)) {
13361
+ vDescrs = VisualizationManager.vizualizers[fallbackVisualizerType];
13362
+ }
13218
13363
  if (!vDescrs) {
13219
13364
  if (VisualizationManager.defaultVisualizer.suppressVisualizerStubRendering) {
13220
13365
  return [];
@@ -13311,7 +13456,7 @@ var VisualizationMatrixDropdown = /** @class */ (function (_super) {
13311
13456
  }
13312
13457
  else {
13313
13458
  var innerQuestions = _this.getQuestions();
13314
- _this._matrixDropdownVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(innerQuestions, [], _this._childOptions);
13459
+ _this._matrixDropdownVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(innerQuestions, [], _this._childOptions, undefined, false);
13315
13460
  }
13316
13461
  _this._matrixDropdownVisualizer.onAfterRender.add(_this.onPanelAfterRenderCallback);
13317
13462
  _this.updateData(data);
@@ -13511,14 +13656,15 @@ if (!!document) {
13511
13656
  */
13512
13657
  var VisualizationPanel = /** @class */ (function (_super) {
13513
13658
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(VisualizationPanel, _super);
13514
- function VisualizationPanel(questions, data, options, _elements) {
13659
+ function VisualizationPanel(questions, data, options, _elements, isRoot) {
13515
13660
  if (options === void 0) { options = {}; }
13516
13661
  if (_elements === void 0) { _elements = undefined; }
13662
+ if (isRoot === void 0) { isRoot = true; }
13517
13663
  var _this = _super.call(this, null, data, options, "panel") || this;
13518
13664
  _this.questions = questions;
13519
13665
  _this._elements = _elements;
13666
+ _this.isRoot = isRoot;
13520
13667
  _this.visualizers = [];
13521
- _this.haveCommercialLicense = false;
13522
13668
  _this.renderedQuestionsCount = 0;
13523
13669
  _this.onAfterRenderQuestionCallback = function (sender, options) {
13524
13670
  _this.renderedQuestionsCount++;
@@ -13597,12 +13743,6 @@ var VisualizationPanel = /** @class */ (function (_super) {
13597
13743
  */
13598
13744
  _this.onElementMoved = new survey_core__WEBPACK_IMPORTED_MODULE_1__.Event();
13599
13745
  _this.loadingData = false;
13600
- var f = survey_core__WEBPACK_IMPORTED_MODULE_1__.hasLicense;
13601
- _this.haveCommercialLicense = (!!f && f(4)) ||
13602
- VisualizationPanel.haveCommercialLicense ||
13603
- (typeof options.haveCommercialLicense !== "undefined"
13604
- ? options.haveCommercialLicense
13605
- : false);
13606
13746
  _this._layoutEngine =
13607
13747
  options.layoutEngine ||
13608
13748
  new _layoutEngine__WEBPACK_IMPORTED_MODULE_8__.MuuriLayoutEngine(_this.allowDynamicLayout, "." + questionLayoutedElementClassName, _this.allowDragDrop);
@@ -13617,53 +13757,57 @@ var VisualizationPanel = /** @class */ (function (_super) {
13617
13757
  _this._elements = _this.buildElements(questions);
13618
13758
  }
13619
13759
  _this.buildVisualizers(questions);
13620
- if (!_this.haveCommercialLicense) {
13760
+ if (!_this.haveCommercialLicense && _this.isRoot) {
13621
13761
  _this.registerToolbarItem("commercialLicense", function () {
13622
13762
  return (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.createCommercialLicenseLink)();
13623
13763
  });
13624
13764
  }
13625
- _this.registerToolbarItem("resetFilter", function () {
13626
- return _utils_index__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createButton(function () {
13627
- _this.visualizers.forEach(function (visualizer) {
13628
- if (visualizer instanceof _selectBase__WEBPACK_IMPORTED_MODULE_3__.SelectBase || visualizer instanceof _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_4__.AlternativeVisualizersWrapper) {
13629
- visualizer.setSelection(undefined);
13630
- }
13631
- });
13632
- }, _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("resetFilter"));
13633
- }, 900);
13765
+ _this._supportSelection = true;
13766
+ if (_this.supportSelection !== false) {
13767
+ _this.registerToolbarItem("resetFilter", function () {
13768
+ return _utils_index__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createButton(function () {
13769
+ _this.visualizers.forEach(function (visualizer) {
13770
+ if (visualizer instanceof _selectBase__WEBPACK_IMPORTED_MODULE_3__.SelectBase || visualizer instanceof _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_4__.AlternativeVisualizersWrapper) {
13771
+ visualizer.setSelection(undefined);
13772
+ }
13773
+ });
13774
+ }, _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("resetFilter"));
13775
+ }, 900);
13776
+ }
13634
13777
  _this.registerToolbarItem("addElement", function (toolbar) {
13635
13778
  if (_this.allowHideQuestions) {
13636
13779
  var addElementSelector_1 = undefined;
13637
13780
  var addElementSelectorUpdater = function (panel, options) {
13638
13781
  var hiddenElements = _this.hiddenElements;
13782
+ var selectWrapper = _utils_index__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createSelector([
13783
+ {
13784
+ name: undefined,
13785
+ displayName: _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("addElement"),
13786
+ },
13787
+ ]
13788
+ .concat(hiddenElements)
13789
+ .map(function (element) {
13790
+ return {
13791
+ value: element.name,
13792
+ text: element.displayName,
13793
+ };
13794
+ }), function (option) { return false; }, function (e) {
13795
+ _this.showElement(e.target.value);
13796
+ });
13797
+ if (addElementSelector_1) {
13798
+ toolbar.replaceChild(selectWrapper, addElementSelector_1);
13799
+ }
13800
+ addElementSelector_1 = selectWrapper;
13639
13801
  if (hiddenElements.length > 0) {
13640
- var selectWrapper = _utils_index__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createSelector([
13641
- {
13642
- name: undefined,
13643
- displayName: _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("addElement"),
13644
- },
13645
- ]
13646
- .concat(hiddenElements)
13647
- .map(function (element) {
13648
- return {
13649
- value: element.name,
13650
- text: element.displayName,
13651
- };
13652
- }), function (option) { return false; }, function (e) {
13653
- _this.showElement(e.target.value);
13654
- });
13655
- (addElementSelector_1 &&
13656
- toolbar.replaceChild(selectWrapper, addElementSelector_1)) ||
13657
- toolbar.appendChild(selectWrapper);
13658
- addElementSelector_1 = selectWrapper;
13802
+ addElementSelector_1.style.display = undefined;
13659
13803
  }
13660
- else {
13661
- addElementSelector_1 && toolbar.removeChild(addElementSelector_1);
13662
- addElementSelector_1 = undefined;
13804
+ else if (addElementSelector_1) {
13805
+ addElementSelector_1.style.display = "none";
13663
13806
  }
13664
13807
  };
13665
13808
  addElementSelectorUpdater(_this, {});
13666
13809
  _this.onVisibleElementsChanged.add(addElementSelectorUpdater);
13810
+ return addElementSelector_1;
13667
13811
  }
13668
13812
  return undefined;
13669
13813
  });
@@ -13800,7 +13944,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
13800
13944
  var visualizerData = _this.surveyData;
13801
13945
  var visualizer;
13802
13946
  if (Array.isArray(question)) {
13803
- visualizer = new (_visualizationManager__WEBPACK_IMPORTED_MODULE_11__.VisualizationManager.getPivotVisualizerConstructor())(question, visualizerData, visualizerOptions);
13947
+ visualizer = new (_visualizationManager__WEBPACK_IMPORTED_MODULE_11__.VisualizationManager.getPivotVisualizerConstructor())(question, visualizerData, visualizerOptions, undefined, false);
13804
13948
  }
13805
13949
  else {
13806
13950
  visualizer = _this.createVisualizer(question, visualizerOptions, visualizerData);
@@ -14186,6 +14330,18 @@ var VisualizationPanel = /** @class */ (function (_super) {
14186
14330
  enumerable: false,
14187
14331
  configurable: true
14188
14332
  });
14333
+ VisualizationPanel.prototype.resetState = function () {
14334
+ this._settingState = true;
14335
+ _super.prototype.resetState.call(this);
14336
+ try {
14337
+ this.visualizers.forEach(function (visualizer) { return visualizer.resetState(); });
14338
+ this.locale = survey_core__WEBPACK_IMPORTED_MODULE_1__.surveyLocalization.defaultLocale;
14339
+ }
14340
+ finally {
14341
+ this._settingState = false;
14342
+ }
14343
+ this.refresh();
14344
+ };
14189
14345
  Object.defineProperty(VisualizationPanel.prototype, "permissions", {
14190
14346
  get: function () {
14191
14347
  return this._elements.map(function (element) {
@@ -14218,7 +14374,6 @@ var VisualizationPanel = /** @class */ (function (_super) {
14218
14374
  _super.prototype.destroy.call(this);
14219
14375
  this.destroyVisualizers();
14220
14376
  };
14221
- VisualizationPanel.haveCommercialLicense = false;
14222
14377
  return VisualizationPanel;
14223
14378
  }(_visualizerBase__WEBPACK_IMPORTED_MODULE_2__.VisualizerBase));
14224
14379
 
@@ -14258,7 +14413,7 @@ var VisualizationPanelDynamic = /** @class */ (function (_super) {
14258
14413
  var options = Object.assign({}, options);
14259
14414
  options.allowDynamicLayout = false;
14260
14415
  options.dataProvider = undefined;
14261
- _this._panelVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(_this.getQuestions(), [], options);
14416
+ _this._panelVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(_this.getQuestions(), [], options, undefined, false);
14262
14417
  _this._panelVisualizer.onAfterRender.add(_this.onAfterRenderPanelCallback);
14263
14418
  _this.updateData(data);
14264
14419
  return _this;
@@ -14412,6 +14567,7 @@ var VisualizerBase = /** @class */ (function () {
14412
14567
  this._dataProvider = undefined;
14413
14568
  this._getDataCore = undefined;
14414
14569
  this.labelTruncateLength = 27;
14570
+ this.haveCommercialLicense = false;
14415
14571
  this.renderResult = undefined;
14416
14572
  this.toolbarContainer = undefined;
14417
14573
  this.headerContainer = undefined;
@@ -14419,6 +14575,7 @@ var VisualizerBase = /** @class */ (function () {
14419
14575
  this.footerContainer = undefined;
14420
14576
  this._supportSelection = false;
14421
14577
  this._chartAdapter = undefined;
14578
+ this._footerIsCollapsed = undefined;
14422
14579
  /**
14423
14580
  * An event that is raised after the visualizer's content is rendered.
14424
14581
  *
@@ -14474,6 +14631,10 @@ var VisualizerBase = /** @class */ (function () {
14474
14631
  this._calculationsCache = undefined;
14475
14632
  this.loadingData = false;
14476
14633
  this._settingState = false;
14634
+ var f = survey_core__WEBPACK_IMPORTED_MODULE_1__.hasLicense;
14635
+ this.haveCommercialLicense = (!!f && f(4)) ||
14636
+ VisualizerBase.haveCommercialLicense ||
14637
+ (typeof options.haveCommercialLicense !== "undefined" ? options.haveCommercialLicense : false);
14477
14638
  this._getDataCore = (_a = this.questionOptions) === null || _a === void 0 ? void 0 : _a.getDataCore;
14478
14639
  this._dataProvider = options.dataProvider || new _dataProvider__WEBPACK_IMPORTED_MODULE_2__.DataProvider(data);
14479
14640
  this._dataProvider.onDataChanged.add(function () { return _this.onDataChanged(); });
@@ -14586,9 +14747,9 @@ var VisualizerBase = /** @class */ (function () {
14586
14747
  * Indicates whether users can select series points to cross-filter charts. To allow or disallow selection, set the [`allowSelection`](https://surveyjs.io/dashboard/documentation/api-reference/ivisualizationpaneloptions#allowSelection) property of the `IVisualizationPanelOptions` object in the [`VisualizationPanel`](https://surveyjs.io/dashboard/documentation/api-reference/visualizationpanel) constructor.
14587
14748
  */
14588
14749
  get: function () {
14589
- return ((this.options.allowSelection === undefined ||
14750
+ return (this.options.allowSelection === undefined ||
14590
14751
  this.options.allowSelection) &&
14591
- this._supportSelection);
14752
+ this._supportSelection;
14592
14753
  },
14593
14754
  enumerable: false,
14594
14755
  configurable: true
@@ -14864,6 +15025,19 @@ var VisualizerBase = /** @class */ (function () {
14864
15025
  VisualizerBase.prototype.destroyFooter = function (container) {
14865
15026
  container.innerHTML = "";
14866
15027
  };
15028
+ Object.defineProperty(VisualizerBase.prototype, "isFooterCollapsed", {
15029
+ get: function () {
15030
+ if (this._footerIsCollapsed === undefined) {
15031
+ this._footerIsCollapsed = VisualizerBase.otherCommentCollapsed;
15032
+ }
15033
+ return this._footerIsCollapsed;
15034
+ },
15035
+ set: function (newVal) {
15036
+ this._footerIsCollapsed = newVal;
15037
+ },
15038
+ enumerable: false,
15039
+ configurable: true
15040
+ });
14867
15041
  VisualizerBase.prototype.renderFooter = function (container) {
14868
15042
  var _this = this;
14869
15043
  container.innerHTML = "";
@@ -14871,20 +15045,21 @@ var VisualizerBase = /** @class */ (function () {
14871
15045
  var footerTitleElement = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createElement("h4", "sa-visualizer__footer-title", { innerText: _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("otherCommentTitle") });
14872
15046
  container.appendChild(footerTitleElement);
14873
15047
  var footerContentElement_1 = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createElement("div", "sa-visualizer__footer-content");
14874
- footerContentElement_1.style.display = VisualizerBase.otherCommentCollapsed
14875
- ? "none"
14876
- : "block";
15048
+ footerContentElement_1.style.display = this.isFooterCollapsed ? "none" : "block";
15049
+ var visibilityButtonText = _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString(this.isFooterCollapsed ? "showButton" : "hideButton");
14877
15050
  var visibilityButton_1 = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createButton(function () {
14878
15051
  if (footerContentElement_1.style.display === "none") {
14879
15052
  footerContentElement_1.style.display = "block";
14880
15053
  visibilityButton_1.innerText = _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("hideButton");
15054
+ _this._footerIsCollapsed = false;
14881
15055
  }
14882
15056
  else {
14883
15057
  footerContentElement_1.style.display = "none";
14884
- visibilityButton_1.innerText = _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString(VisualizerBase.otherCommentCollapsed ? "showButton" : "hideButton");
15058
+ visibilityButton_1.innerText = _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("showButton");
15059
+ _this._footerIsCollapsed = true;
14885
15060
  }
14886
15061
  _this.footerVisualizer.invokeOnUpdate();
14887
- }, _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("showButton") /*, "sa-toolbar__button--right"*/);
15062
+ }, visibilityButtonText /*, "sa-toolbar__button--right"*/);
14888
15063
  container.appendChild(visibilityButton_1);
14889
15064
  container.appendChild(footerContentElement_1);
14890
15065
  this.footerVisualizer.render(footerContentElement_1);
@@ -15094,6 +15269,7 @@ var VisualizerBase = /** @class */ (function () {
15094
15269
  *
15095
15270
  * > This method is overriden in classes descendant from `VisualizerBase`.
15096
15271
  * @see setState
15272
+ * @see resetState
15097
15273
  * @see onStateChanged
15098
15274
  */
15099
15275
  VisualizerBase.prototype.getState = function () {
@@ -15106,10 +15282,21 @@ var VisualizerBase = /** @class */ (function () {
15106
15282
  *
15107
15283
  * > This method is overriden in classes descendant from `VisualizerBase`.
15108
15284
  * @see getState
15285
+ * @see resetState
15109
15286
  * @see onStateChanged
15110
15287
  */
15111
15288
  VisualizerBase.prototype.setState = function (state) {
15112
15289
  };
15290
+ /**
15291
+ * Resets the visualizer's state.
15292
+ *
15293
+ * > This method is overriden in classes descendant from `VisualizerBase`.
15294
+ * @see getState
15295
+ * @see setState
15296
+ * @see onStateChanged
15297
+ */
15298
+ VisualizerBase.prototype.resetState = function () {
15299
+ };
15113
15300
  Object.defineProperty(VisualizerBase.prototype, "locale", {
15114
15301
  /**
15115
15302
  * Gets or sets the current locale.
@@ -15143,6 +15330,7 @@ var VisualizerBase = /** @class */ (function () {
15143
15330
  survey.locale = newLocale;
15144
15331
  }
15145
15332
  };
15333
+ VisualizerBase.haveCommercialLicense = false;
15146
15334
  VisualizerBase.suppressVisualizerStubRendering = false;
15147
15335
  VisualizerBase.chartAdapterType = undefined;
15148
15336
  // public static otherCommentQuestionType = "comment"; // TODO: make it configureable - allow choose what kind of question/visualizer will be used for comments/others
@@ -15208,14 +15396,14 @@ var VisualizerFactory = /** @class */ (function () {
15208
15396
  * @param options An object with any custom properties you need within the visualizer.
15209
15397
  */
15210
15398
  VisualizerFactory.createVisualizer = function (question, data, options) {
15211
- var type;
15212
- if (question.getType() === "text" && question.inputType) {
15213
- type = question.inputType;
15399
+ var type = question.getType();
15400
+ var creators = [];
15401
+ if (type === "text" && question.inputType) {
15402
+ creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_0__.VisualizationManager.getVisualizersByType(question.inputType, type);
15214
15403
  }
15215
15404
  else {
15216
- type = question.getType();
15405
+ creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_0__.VisualizationManager.getVisualizersByType(type);
15217
15406
  }
15218
- var creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_0__.VisualizationManager.getVisualizersByType(type);
15219
15407
  var visualizers = creators.map(function (creator) { return new creator(question, data, options); });
15220
15408
  if (visualizers.length > 1) {
15221
15409
  var alternativesVisualizerConstructor = _visualizationManager__WEBPACK_IMPORTED_MODULE_0__.VisualizationManager.getAltVisualizerSelector();
@@ -17148,6 +17336,7 @@ __webpack_require__.r(__webpack_exports__);
17148
17336
  /* harmony export */ SelectBase: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_17__.SelectBase),
17149
17337
  /* harmony export */ StatisticsTable: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_32__.StatisticsTable),
17150
17338
  /* harmony export */ StatisticsTableAdapter: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_32__.StatisticsTableAdapter),
17339
+ /* harmony export */ StatisticsTableBoolean: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_32__.StatisticsTableBoolean),
17151
17340
  /* harmony export */ Text: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_31__.Text),
17152
17341
  /* harmony export */ TextTableAdapter: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_31__.TextTableAdapter),
17153
17342
  /* harmony export */ VisualizationManager: () => (/* reexport safe */ _visualizationManager__WEBPACK_IMPORTED_MODULE_23__.VisualizationManager),