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: MIT (http://www.opensource.org/licenses/mit-license.php)
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: MIT (http://www.opensource.org/licenses/mit-license.php)
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: MIT (http://www.opensource.org/licenses/mit-license.php)
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: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.5.10",
2
+ "version": "2.5.12",
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.10"
96
+ "survey-core": "2.5.12"
97
97
  },
98
98
  "husky": {
99
99
  "hooks": {
@@ -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"
@@ -13731,7 +13731,9 @@ __webpack_require__.r(__webpack_exports__);
13731
13731
  /* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
13732
13732
  /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
13733
13733
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "./src/utils/index.ts");
13734
- /* harmony import */ var _text_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./text.scss */ "./src/text.scss");
13734
+ /* harmony import */ var _statisticCalculators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./statisticCalculators */ "./src/statisticCalculators.ts");
13735
+ /* harmony import */ var _text_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./text.scss */ "./src/text.scss");
13736
+
13735
13737
 
13736
13738
 
13737
13739
 
@@ -13819,28 +13821,31 @@ var Text = /** @class */ (function (_super) {
13819
13821
  var _this = this;
13820
13822
  var result = [];
13821
13823
  var columnCount = 0;
13822
- this.surveyData.forEach(function (row) {
13823
- var rowValue = row[_this.question.name];
13824
- var dataStrings = [];
13825
- if (!!rowValue) {
13826
- if (Array.isArray(rowValue)) {
13827
- dataStrings = dataStrings.concat(rowValue);
13828
- }
13829
- else {
13830
- if (typeof rowValue === "object") {
13831
- Object.keys(rowValue).forEach(function (key) {
13832
- return dataStrings.push(rowValue[key]);
13833
- });
13824
+ this.surveyData.forEach(function (dataRow) {
13825
+ var nestedDataRows = (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_5__.getNestedDataRows)(dataRow, _this);
13826
+ nestedDataRows.forEach(function (row) {
13827
+ var rowValue = row[_this.question.name];
13828
+ var dataStrings = [];
13829
+ if (!!rowValue) {
13830
+ if (Array.isArray(rowValue)) {
13831
+ dataStrings = dataStrings.concat(rowValue);
13834
13832
  }
13835
13833
  else {
13836
- dataStrings.push(rowValue);
13834
+ if (typeof rowValue === "object") {
13835
+ Object.keys(rowValue).forEach(function (key) {
13836
+ return dataStrings.push(rowValue[key]);
13837
+ });
13838
+ }
13839
+ else {
13840
+ dataStrings.push(rowValue);
13841
+ }
13842
+ }
13843
+ result.push(dataStrings);
13844
+ if (dataStrings.length > columnCount) {
13845
+ columnCount = dataStrings.length;
13837
13846
  }
13838
13847
  }
13839
- result.push(dataStrings);
13840
- if (dataStrings.length > columnCount) {
13841
- columnCount = dataStrings.length;
13842
- }
13843
- }
13848
+ });
13844
13849
  });
13845
13850
  return { columnCount: columnCount, data: result };
13846
13851
  };
@@ -14134,7 +14139,9 @@ var DocumentHelper = /** @class */ (function () {
14134
14139
  DocumentHelper.createElement = function (tagName, className, attrs) {
14135
14140
  if (className === void 0) { className = ""; }
14136
14141
  var el = document.createElement(tagName);
14137
- el.className = className;
14142
+ if (!!className) {
14143
+ el.className = className;
14144
+ }
14138
14145
  if (!!attrs) {
14139
14146
  Object.keys(attrs).forEach(function (key) {
14140
14147
  el[key] = attrs[key];
@@ -14279,12 +14286,15 @@ var DataHelper = /** @class */ (function () {
14279
14286
 
14280
14287
  function createLinksContainer(links) {
14281
14288
  var linksContainer = DocumentHelper.createElement("div");
14282
- links.forEach(function (link) {
14289
+ links.forEach(function (link, index) {
14283
14290
  linksContainer.appendChild(DocumentHelper.createElement("a", "", {
14284
14291
  innerText: link.name,
14285
14292
  download: link.name,
14286
14293
  href: link.content,
14287
14294
  }));
14295
+ if (index < links.length - 1) {
14296
+ linksContainer.appendChild(DocumentHelper.createElement("br"));
14297
+ }
14288
14298
  });
14289
14299
  return linksContainer;
14290
14300
  }
@@ -14486,6 +14496,8 @@ __webpack_require__.r(__webpack_exports__);
14486
14496
 
14487
14497
 
14488
14498
  function isChoicesArraysEqual(choices1, choices2) {
14499
+ if (choices1 === undefined || choices2 === undefined)
14500
+ return false;
14489
14501
  if (choices1.length !== choices2.length)
14490
14502
  return false;
14491
14503
  for (var i = 0; i < choices1.length; i++) {
@@ -18150,6 +18162,8 @@ __webpack_require__.r(__webpack_exports__);
18150
18162
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ "./src/utils/index.ts");
18151
18163
  /* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../localizationManager */ "./src/localizationManager.ts");
18152
18164
  /* harmony import */ var _widget__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./widget */ "./src/wordcloud/widget.ts");
18165
+ /* harmony import */ var _statisticCalculators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../statisticCalculators */ "./src/statisticCalculators.ts");
18166
+
18153
18167
 
18154
18168
 
18155
18169
 
@@ -18263,23 +18277,26 @@ var WordCloud = /** @class */ (function (_super) {
18263
18277
  });
18264
18278
  }
18265
18279
  };
18266
- this.surveyData.forEach(function (row) {
18267
- var rowValue = row[_this.question.name];
18268
- if (!!rowValue) {
18269
- if (Array.isArray(rowValue)) {
18270
- rowValue.forEach(processString);
18271
- }
18272
- else {
18273
- if (typeof rowValue === "object") {
18274
- Object.keys(rowValue).forEach(function (key) {
18275
- return processString(rowValue[key]);
18276
- });
18280
+ this.surveyData.forEach(function (dataRow) {
18281
+ var nestedDataRows = (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_8__.getNestedDataRows)(dataRow, _this);
18282
+ nestedDataRows.forEach(function (row) {
18283
+ var rowValue = row[_this.question.name];
18284
+ if (!!rowValue) {
18285
+ if (Array.isArray(rowValue)) {
18286
+ rowValue.forEach(processString);
18277
18287
  }
18278
18288
  else {
18279
- processString(rowValue);
18289
+ if (typeof rowValue === "object") {
18290
+ Object.keys(rowValue).forEach(function (key) {
18291
+ return processString(rowValue[key]);
18292
+ });
18293
+ }
18294
+ else {
18295
+ processString(rowValue);
18296
+ }
18280
18297
  }
18281
18298
  }
18282
- }
18299
+ });
18283
18300
  });
18284
18301
  return Object.keys(result).map(function (key) {
18285
18302
  return [key, result[key]];