survey-analytics 2.5.10 → 2.5.12

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.5.10
2
+ * surveyjs - SurveyJS Dashboard library v2.5.12
3
3
  * Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: SEE LICENSE IN LICENSE
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.5.10
2
+ * surveyjs - SurveyJS Dashboard library v2.5.12
3
3
  * Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: SEE LICENSE IN LICENSE
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.5.10
2
+ * surveyjs - SurveyJS Dashboard library v2.5.12
3
3
  * Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: SEE LICENSE IN LICENSE
5
5
  */
@@ -7983,7 +7983,7 @@ var finnishStrings = {
7983
7983
  // [Auto-translated] "Chart"
7984
7984
  visualizer_boolean: "Kaavio",
7985
7985
  // [Auto-translated] "Table"
7986
- visualizer_options: "Pöytä",
7986
+ visualizer_options: "Taulukko",
7987
7987
  // "NPS"
7988
7988
  npsScore: "NPS",
7989
7989
  // "Promoters"
@@ -14853,7 +14853,9 @@ __webpack_require__.r(__webpack_exports__);
14853
14853
  /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
14854
14854
  /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
14855
14855
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "./src/utils/index.ts");
14856
- /* harmony import */ var _text_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./text.scss */ "./src/text.scss");
14856
+ /* harmony import */ var _statisticCalculators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./statisticCalculators */ "./src/statisticCalculators.ts");
14857
+ /* harmony import */ var _text_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./text.scss */ "./src/text.scss");
14858
+
14857
14859
 
14858
14860
 
14859
14861
 
@@ -14941,28 +14943,31 @@ var Text = /** @class */ (function (_super) {
14941
14943
  var _this = this;
14942
14944
  var result = [];
14943
14945
  var columnCount = 0;
14944
- this.surveyData.forEach(function (row) {
14945
- var rowValue = row[_this.question.name];
14946
- var dataStrings = [];
14947
- if (!!rowValue) {
14948
- if (Array.isArray(rowValue)) {
14949
- dataStrings = dataStrings.concat(rowValue);
14950
- }
14951
- else {
14952
- if (typeof rowValue === "object") {
14953
- Object.keys(rowValue).forEach(function (key) {
14954
- return dataStrings.push(rowValue[key]);
14955
- });
14946
+ this.surveyData.forEach(function (dataRow) {
14947
+ var nestedDataRows = (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_5__.getNestedDataRows)(dataRow, _this);
14948
+ nestedDataRows.forEach(function (row) {
14949
+ var rowValue = row[_this.question.name];
14950
+ var dataStrings = [];
14951
+ if (!!rowValue) {
14952
+ if (Array.isArray(rowValue)) {
14953
+ dataStrings = dataStrings.concat(rowValue);
14956
14954
  }
14957
14955
  else {
14958
- dataStrings.push(rowValue);
14956
+ if (typeof rowValue === "object") {
14957
+ Object.keys(rowValue).forEach(function (key) {
14958
+ return dataStrings.push(rowValue[key]);
14959
+ });
14960
+ }
14961
+ else {
14962
+ dataStrings.push(rowValue);
14963
+ }
14964
+ }
14965
+ result.push(dataStrings);
14966
+ if (dataStrings.length > columnCount) {
14967
+ columnCount = dataStrings.length;
14959
14968
  }
14960
14969
  }
14961
- result.push(dataStrings);
14962
- if (dataStrings.length > columnCount) {
14963
- columnCount = dataStrings.length;
14964
- }
14965
- }
14970
+ });
14966
14971
  });
14967
14972
  return { columnCount: columnCount, data: result };
14968
14973
  };
@@ -15256,7 +15261,9 @@ var DocumentHelper = /** @class */ (function () {
15256
15261
  DocumentHelper.createElement = function (tagName, className, attrs) {
15257
15262
  if (className === void 0) { className = ""; }
15258
15263
  var el = document.createElement(tagName);
15259
- el.className = className;
15264
+ if (!!className) {
15265
+ el.className = className;
15266
+ }
15260
15267
  if (!!attrs) {
15261
15268
  Object.keys(attrs).forEach(function (key) {
15262
15269
  el[key] = attrs[key];
@@ -15401,12 +15408,15 @@ var DataHelper = /** @class */ (function () {
15401
15408
 
15402
15409
  function createLinksContainer(links) {
15403
15410
  var linksContainer = DocumentHelper.createElement("div");
15404
- links.forEach(function (link) {
15411
+ links.forEach(function (link, index) {
15405
15412
  linksContainer.appendChild(DocumentHelper.createElement("a", "", {
15406
15413
  innerText: link.name,
15407
15414
  download: link.name,
15408
15415
  href: link.content,
15409
15416
  }));
15417
+ if (index < links.length - 1) {
15418
+ linksContainer.appendChild(DocumentHelper.createElement("br"));
15419
+ }
15410
15420
  });
15411
15421
  return linksContainer;
15412
15422
  }
@@ -15608,6 +15618,8 @@ __webpack_require__.r(__webpack_exports__);
15608
15618
 
15609
15619
 
15610
15620
  function isChoicesArraysEqual(choices1, choices2) {
15621
+ if (choices1 === undefined || choices2 === undefined)
15622
+ return false;
15611
15623
  if (choices1.length !== choices2.length)
15612
15624
  return false;
15613
15625
  for (var i = 0; i < choices1.length; i++) {
@@ -19272,6 +19284,8 @@ __webpack_require__.r(__webpack_exports__);
19272
19284
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ "./src/utils/index.ts");
19273
19285
  /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../localizationManager */ "./src/localizationManager.ts");
19274
19286
  /* harmony import */ var _widget__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./widget */ "./src/wordcloud/widget.ts");
19287
+ /* harmony import */ var _statisticCalculators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../statisticCalculators */ "./src/statisticCalculators.ts");
19288
+
19275
19289
 
19276
19290
 
19277
19291
 
@@ -19385,23 +19399,26 @@ var WordCloud = /** @class */ (function (_super) {
19385
19399
  });
19386
19400
  }
19387
19401
  };
19388
- this.surveyData.forEach(function (row) {
19389
- var rowValue = row[_this.question.name];
19390
- if (!!rowValue) {
19391
- if (Array.isArray(rowValue)) {
19392
- rowValue.forEach(processString);
19393
- }
19394
- else {
19395
- if (typeof rowValue === "object") {
19396
- Object.keys(rowValue).forEach(function (key) {
19397
- return processString(rowValue[key]);
19398
- });
19402
+ this.surveyData.forEach(function (dataRow) {
19403
+ var nestedDataRows = (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_8__.getNestedDataRows)(dataRow, _this);
19404
+ nestedDataRows.forEach(function (row) {
19405
+ var rowValue = row[_this.question.name];
19406
+ if (!!rowValue) {
19407
+ if (Array.isArray(rowValue)) {
19408
+ rowValue.forEach(processString);
19399
19409
  }
19400
19410
  else {
19401
- processString(rowValue);
19411
+ if (typeof rowValue === "object") {
19412
+ Object.keys(rowValue).forEach(function (key) {
19413
+ return processString(rowValue[key]);
19414
+ });
19415
+ }
19416
+ else {
19417
+ processString(rowValue);
19418
+ }
19402
19419
  }
19403
19420
  }
19404
- }
19421
+ });
19405
19422
  });
19406
19423
  return Object.keys(result).map(function (key) {
19407
19424
  return [key, result[key]];