survey-analytics 2.5.11 → 2.5.13

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.11
2
+ * surveyjs - SurveyJS Dashboard library v2.5.13
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
  */
@@ -12765,21 +12765,24 @@ class WordCloud extends VisualizerBase {
12765
12765
  });
12766
12766
  }
12767
12767
  };
12768
- this.surveyData.forEach((row) => {
12769
- const rowValue = row[this.question.name];
12770
- if (!!rowValue) {
12771
- if (Array.isArray(rowValue)) {
12772
- rowValue.forEach(processString);
12773
- }
12774
- else {
12775
- if (typeof rowValue === "object") {
12776
- 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);
12777
12775
  }
12778
12776
  else {
12779
- processString(rowValue);
12777
+ if (typeof rowValue === "object") {
12778
+ Object.keys(rowValue).forEach((key) => processString(rowValue[key]));
12779
+ }
12780
+ else {
12781
+ processString(rowValue);
12782
+ }
12780
12783
  }
12781
12784
  }
12782
- }
12785
+ });
12783
12786
  });
12784
12787
  return Object.keys(result).map((key) => {
12785
12788
  return [key, result[key]];
@@ -12871,26 +12874,29 @@ class Text extends VisualizerBase {
12871
12874
  getCalculatedValuesCore() {
12872
12875
  let result = [];
12873
12876
  let columnCount = 0;
12874
- this.surveyData.forEach((row) => {
12875
- const rowValue = row[this.question.name];
12876
- let dataStrings = [];
12877
- if (!!rowValue) {
12878
- if (Array.isArray(rowValue)) {
12879
- dataStrings = dataStrings.concat(rowValue);
12880
- }
12881
- else {
12882
- if (typeof rowValue === "object") {
12883
- 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);
12884
12885
  }
12885
12886
  else {
12886
- 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;
12887
12897
  }
12888
12898
  }
12889
- result.push(dataStrings);
12890
- if (dataStrings.length > columnCount) {
12891
- columnCount = dataStrings.length;
12892
- }
12893
- }
12899
+ });
12894
12900
  });
12895
12901
  return { columnCount: columnCount, data: result };
12896
12902
  }