survey-analytics 2.3.2 → 2.3.4

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 (34) hide show
  1. package/README.md +1 -0
  2. package/fesm/shared.mjs +1 -1
  3. package/fesm/shared2.mjs +25 -17
  4. package/fesm/shared2.mjs.map +1 -1
  5. package/fesm/survey.analytics.core.mjs +1 -1
  6. package/fesm/survey.analytics.mjs +1 -1
  7. package/fesm/survey.analytics.tabulator.mjs +9 -9
  8. package/fesm/survey.analytics.tabulator.mjs.map +1 -1
  9. package/package.json +3 -2
  10. package/survey-analytics.types/number.d.ts +3 -3
  11. package/survey-analytics.types/pivot.d.ts +3 -1
  12. package/survey-analytics.types/visualizationPanel.d.ts +2 -3
  13. package/survey-analytics.types/visualizerBase.d.ts +2 -0
  14. package/survey.analytics.core.css +2 -3
  15. package/survey.analytics.core.css.map +1 -1
  16. package/survey.analytics.core.js +25 -15
  17. package/survey.analytics.core.js.map +1 -1
  18. package/survey.analytics.core.min.css +2 -2
  19. package/survey.analytics.core.min.js +1 -1
  20. package/survey.analytics.core.min.js.LICENSE.txt +1 -1
  21. package/survey.analytics.css +2 -3
  22. package/survey.analytics.css.map +1 -1
  23. package/survey.analytics.js +25 -15
  24. package/survey.analytics.js.map +1 -1
  25. package/survey.analytics.min.css +2 -2
  26. package/survey.analytics.min.js +1 -1
  27. package/survey.analytics.min.js.LICENSE.txt +1 -1
  28. package/survey.analytics.tabulator.css +6 -3
  29. package/survey.analytics.tabulator.css.map +1 -1
  30. package/survey.analytics.tabulator.js +9 -9
  31. package/survey.analytics.tabulator.js.map +1 -1
  32. package/survey.analytics.tabulator.min.css +2 -2
  33. package/survey.analytics.tabulator.min.js +1 -1
  34. package/survey.analytics.tabulator.min.js.LICENSE.txt +1 -1
package/README.md CHANGED
@@ -25,6 +25,7 @@ The SurveyJS Dashboard library lets you build survey data dashboards and simplif
25
25
  - Pie chart
26
26
  - Gauge chart
27
27
  - Bullet graph
28
+ - Radar / Spider chart
28
29
  - Word cloud
29
30
  - Interactive value filtering ordering
30
31
  - Customizable colors
package/fesm/shared.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.3.2
2
+ * surveyjs - SurveyJS Dashboard library v2.3.4
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
  */
package/fesm/shared2.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.3.2
2
+ * surveyjs - SurveyJS Dashboard library v2.3.4
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
  */
6
6
 
7
- import { D as DocumentHelper, l as localization, g as createLoadingIndicator, b as DataHelper, f as svgTemplate, e as createCommercialLicenseLink, t as toPrecision } from './shared.mjs';
8
- import { Event, QuestionCommentModel, settings, ItemValue, hasLicense, surveyLocalization, IsTouch } from 'survey-core';
7
+ import { D as DocumentHelper, l as localization, g as createLoadingIndicator, b as DataHelper, e as createCommercialLicenseLink, f as svgTemplate, t as toPrecision } from './shared.mjs';
8
+ import { Event, hasLicense, QuestionCommentModel, settings, ItemValue, surveyLocalization, IsTouch } from 'survey-core';
9
9
 
10
10
  /******************************************************************************
11
11
  Copyright (c) Microsoft Corporation.
@@ -466,6 +466,7 @@ class VisualizerBase {
466
466
  this._dataProvider = undefined;
467
467
  this._getDataCore = undefined;
468
468
  this.labelTruncateLength = 27;
469
+ this.haveCommercialLicense = false;
469
470
  this.renderResult = undefined;
470
471
  this.toolbarContainer = undefined;
471
472
  this.headerContainer = undefined;
@@ -528,6 +529,10 @@ class VisualizerBase {
528
529
  this._calculationsCache = undefined;
529
530
  this.loadingData = false;
530
531
  this._settingState = false;
532
+ const f = hasLicense;
533
+ this.haveCommercialLicense = (!!f && f(4)) ||
534
+ VisualizerBase.haveCommercialLicense ||
535
+ (typeof options.haveCommercialLicense !== "undefined" ? options.haveCommercialLicense : false);
531
536
  this._getDataCore = (_a = this.questionOptions) === null || _a === void 0 ? void 0 : _a.getDataCore;
532
537
  this._dataProvider = options.dataProvider || new DataProvider(data);
533
538
  this._dataProvider.onDataChanged.add(() => this.onDataChanged());
@@ -1113,6 +1118,7 @@ class VisualizerBase {
1113
1118
  }
1114
1119
  }
1115
1120
  }
1121
+ VisualizerBase.haveCommercialLicense = false;
1116
1122
  VisualizerBase.suppressVisualizerStubRendering = false;
1117
1123
  VisualizerBase.chartAdapterType = undefined;
1118
1124
  // public static otherCommentQuestionType = "comment"; // TODO: make it configureable - allow choose what kind of question/visualizer will be used for comments/others
@@ -2158,9 +2164,10 @@ class Matrix extends SelectBase {
2158
2164
  VisualizationManager.registerVisualizer("matrix", Matrix);
2159
2165
 
2160
2166
  class PivotModel extends SelectBase {
2161
- constructor(questions, data, options, name) {
2167
+ constructor(questions, data, options, name, isRoot = true) {
2162
2168
  super(null, data, options, name || "pivot");
2163
2169
  this.questions = questions;
2170
+ this.isRoot = isRoot;
2164
2171
  this.valueType = "enum";
2165
2172
  this._cachedValues = undefined;
2166
2173
  this._continuousData = undefined;
@@ -2556,6 +2563,14 @@ class PivotModel extends SelectBase {
2556
2563
  isSupportSoftUpdateContent() {
2557
2564
  return false;
2558
2565
  }
2566
+ renderToolbar(container) {
2567
+ if (!this.haveCommercialLicense && this.isRoot) {
2568
+ const banner = createCommercialLicenseLink();
2569
+ container.appendChild(banner);
2570
+ }
2571
+ container.className += " sa-pivot__header";
2572
+ super.renderToolbar(container);
2573
+ }
2559
2574
  }
2560
2575
  PivotModel.IntervalsCount = 10;
2561
2576
  PivotModel.UseIntervalsFrom = 10;
@@ -9723,12 +9738,12 @@ if (!!document) {
9723
9738
  * [View Demo](https://surveyjs.io/dashboard/examples/interactive-survey-data-dashboard/ (linkStyle))
9724
9739
  */
9725
9740
  class VisualizationPanel extends VisualizerBase {
9726
- constructor(questions, data, options = {}, _elements = undefined) {
9741
+ constructor(questions, data, options = {}, _elements = undefined, isRoot = true) {
9727
9742
  super(null, data, options, "panel");
9728
9743
  this.questions = questions;
9729
9744
  this._elements = _elements;
9745
+ this.isRoot = isRoot;
9730
9746
  this.visualizers = [];
9731
- this.haveCommercialLicense = false;
9732
9747
  this.renderedQuestionsCount = 0;
9733
9748
  this.onAfterRenderQuestionCallback = (sender, options) => {
9734
9749
  this.renderedQuestionsCount++;
@@ -9807,12 +9822,6 @@ class VisualizationPanel extends VisualizerBase {
9807
9822
  */
9808
9823
  this.onElementMoved = new Event();
9809
9824
  this.loadingData = false;
9810
- const f = hasLicense;
9811
- this.haveCommercialLicense = (!!f && f(4)) ||
9812
- VisualizationPanel.haveCommercialLicense ||
9813
- (typeof options.haveCommercialLicense !== "undefined"
9814
- ? options.haveCommercialLicense
9815
- : false);
9816
9825
  this._layoutEngine =
9817
9826
  options.layoutEngine ||
9818
9827
  new MuuriLayoutEngine(this.allowDynamicLayout, "." + questionLayoutedElementClassName, this.allowDragDrop);
@@ -9825,7 +9834,7 @@ class VisualizationPanel extends VisualizerBase {
9825
9834
  this._elements = this.buildElements(questions);
9826
9835
  }
9827
9836
  this.buildVisualizers(questions);
9828
- if (!this.haveCommercialLicense) {
9837
+ if (!this.haveCommercialLicense && this.isRoot) {
9829
9838
  this.registerToolbarItem("commercialLicense", () => {
9830
9839
  return createCommercialLicenseLink();
9831
9840
  });
@@ -9998,7 +10007,7 @@ class VisualizationPanel extends VisualizerBase {
9998
10007
  let visualizerData = this.surveyData;
9999
10008
  let visualizer;
10000
10009
  if (Array.isArray(question)) {
10001
- visualizer = new (VisualizationManager.getPivotVisualizerConstructor())(question, visualizerData, visualizerOptions);
10010
+ visualizer = new (VisualizationManager.getPivotVisualizerConstructor())(question, visualizerData, visualizerOptions, undefined, false);
10002
10011
  }
10003
10012
  else {
10004
10013
  visualizer = this.createVisualizer(question, visualizerOptions, visualizerData);
@@ -10363,7 +10372,6 @@ class VisualizationPanel extends VisualizerBase {
10363
10372
  this.destroyVisualizers();
10364
10373
  }
10365
10374
  }
10366
- VisualizationPanel.haveCommercialLicense = false;
10367
10375
 
10368
10376
  class VisualizationPanelDynamic extends VisualizerBase {
10369
10377
  constructor(question, data, options = {}, name) {
@@ -10376,7 +10384,7 @@ class VisualizationPanelDynamic extends VisualizerBase {
10376
10384
  var options = Object.assign({}, options);
10377
10385
  options.allowDynamicLayout = false;
10378
10386
  options.dataProvider = undefined;
10379
- this._panelVisualizer = new VisualizationPanel(this.getQuestions(), [], options);
10387
+ this._panelVisualizer = new VisualizationPanel(this.getQuestions(), [], options, undefined, false);
10380
10388
  this._panelVisualizer.onAfterRender.add(this.onAfterRenderPanelCallback);
10381
10389
  this.updateData(data);
10382
10390
  }
@@ -10471,7 +10479,7 @@ class VisualizationMatrixDropdown extends VisualizerBase {
10471
10479
  }
10472
10480
  else {
10473
10481
  const innerQuestions = this.getQuestions();
10474
- this._matrixDropdownVisualizer = new VisualizationPanel(innerQuestions, [], this._childOptions);
10482
+ this._matrixDropdownVisualizer = new VisualizationPanel(innerQuestions, [], this._childOptions, undefined, false);
10475
10483
  }
10476
10484
  this._matrixDropdownVisualizer.onAfterRender.add(this.onPanelAfterRenderCallback);
10477
10485
  this.updateData(data);