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.
package/fesm/shared2.mjs CHANGED
@@ -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
  */
@@ -11064,6 +11064,8 @@ class VisualizationMatrixDynamic extends VisualizationPanelDynamic {
11064
11064
  VisualizationManager.registerVisualizer("matrixdynamic", VisualizationMatrixDynamic);
11065
11065
 
11066
11066
  function isChoicesArraysEqual(choices1, choices2) {
11067
+ if (choices1 === undefined || choices2 === undefined)
11068
+ return false;
11067
11069
  if (choices1.length !== choices2.length)
11068
11070
  return false;
11069
11071
  for (let i = 0; i < choices1.length; i++) {
@@ -12763,21 +12765,24 @@ class WordCloud extends VisualizerBase {
12763
12765
  });
12764
12766
  }
12765
12767
  };
12766
- this.surveyData.forEach((row) => {
12767
- const rowValue = row[this.question.name];
12768
- if (!!rowValue) {
12769
- if (Array.isArray(rowValue)) {
12770
- rowValue.forEach(processString);
12771
- }
12772
- else {
12773
- if (typeof rowValue === "object") {
12774
- Object.keys(rowValue).forEach((key) => processString(rowValue[key]));
12768
+ this.surveyData.forEach((dataRow) => {
12769
+ const nestedDataRows = getNestedDataRows(dataRow, this);
12770
+ nestedDataRows.forEach(row => {
12771
+ const rowValue = row[this.question.name];
12772
+ if (!!rowValue) {
12773
+ if (Array.isArray(rowValue)) {
12774
+ rowValue.forEach(processString);
12775
12775
  }
12776
12776
  else {
12777
- processString(rowValue);
12777
+ if (typeof rowValue === "object") {
12778
+ Object.keys(rowValue).forEach((key) => processString(rowValue[key]));
12779
+ }
12780
+ else {
12781
+ processString(rowValue);
12782
+ }
12778
12783
  }
12779
12784
  }
12780
- }
12785
+ });
12781
12786
  });
12782
12787
  return Object.keys(result).map((key) => {
12783
12788
  return [key, result[key]];
@@ -12869,26 +12874,29 @@ class Text extends VisualizerBase {
12869
12874
  getCalculatedValuesCore() {
12870
12875
  let result = [];
12871
12876
  let columnCount = 0;
12872
- this.surveyData.forEach((row) => {
12873
- const rowValue = row[this.question.name];
12874
- let dataStrings = [];
12875
- if (!!rowValue) {
12876
- if (Array.isArray(rowValue)) {
12877
- dataStrings = dataStrings.concat(rowValue);
12878
- }
12879
- else {
12880
- if (typeof rowValue === "object") {
12881
- Object.keys(rowValue).forEach((key) => dataStrings.push(rowValue[key]));
12877
+ this.surveyData.forEach((dataRow) => {
12878
+ const nestedDataRows = getNestedDataRows(dataRow, this);
12879
+ nestedDataRows.forEach(row => {
12880
+ const rowValue = row[this.question.name];
12881
+ let dataStrings = [];
12882
+ if (!!rowValue) {
12883
+ if (Array.isArray(rowValue)) {
12884
+ dataStrings = dataStrings.concat(rowValue);
12882
12885
  }
12883
12886
  else {
12884
- dataStrings.push(rowValue);
12887
+ if (typeof rowValue === "object") {
12888
+ Object.keys(rowValue).forEach((key) => dataStrings.push(rowValue[key]));
12889
+ }
12890
+ else {
12891
+ dataStrings.push(rowValue);
12892
+ }
12893
+ }
12894
+ result.push(dataStrings);
12895
+ if (dataStrings.length > columnCount) {
12896
+ columnCount = dataStrings.length;
12885
12897
  }
12886
12898
  }
12887
- result.push(dataStrings);
12888
- if (dataStrings.length > columnCount) {
12889
- columnCount = dataStrings.length;
12890
- }
12891
- }
12899
+ });
12892
12900
  });
12893
12901
  return { columnCount: columnCount, data: result };
12894
12902
  }