survey-analytics 2.3.3 → 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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.3.3
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
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.3.3
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
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v2.3.3
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
  */
@@ -11201,9 +11201,11 @@ __webpack_require__.r(__webpack_exports__);
11201
11201
 
11202
11202
  var PivotModel = /** @class */ (function (_super) {
11203
11203
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(PivotModel, _super);
11204
- function PivotModel(questions, data, options, name) {
11204
+ function PivotModel(questions, data, options, name, isRoot) {
11205
+ if (isRoot === void 0) { isRoot = true; }
11205
11206
  var _this = _super.call(this, null, data, options, name || "pivot") || this;
11206
11207
  _this.questions = questions;
11208
+ _this.isRoot = isRoot;
11207
11209
  _this.valueType = "enum";
11208
11210
  _this._cachedValues = undefined;
11209
11211
  _this._continuousData = undefined;
@@ -11626,6 +11628,14 @@ var PivotModel = /** @class */ (function (_super) {
11626
11628
  PivotModel.prototype.isSupportSoftUpdateContent = function () {
11627
11629
  return false;
11628
11630
  };
11631
+ PivotModel.prototype.renderToolbar = function (container) {
11632
+ if (!this.haveCommercialLicense && this.isRoot) {
11633
+ var banner = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.createCommercialLicenseLink)();
11634
+ container.appendChild(banner);
11635
+ }
11636
+ container.className += " sa-pivot__header";
11637
+ _super.prototype.renderToolbar.call(this, container);
11638
+ };
11629
11639
  PivotModel.IntervalsCount = 10;
11630
11640
  PivotModel.UseIntervalsFrom = 10;
11631
11641
  return PivotModel;
@@ -14398,7 +14408,7 @@ var VisualizationMatrixDropdown = /** @class */ (function (_super) {
14398
14408
  }
14399
14409
  else {
14400
14410
  var innerQuestions = _this.getQuestions();
14401
- _this._matrixDropdownVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(innerQuestions, [], _this._childOptions);
14411
+ _this._matrixDropdownVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(innerQuestions, [], _this._childOptions, undefined, false);
14402
14412
  }
14403
14413
  _this._matrixDropdownVisualizer.onAfterRender.add(_this.onPanelAfterRenderCallback);
14404
14414
  _this.updateData(data);
@@ -14598,14 +14608,15 @@ if (!!document) {
14598
14608
  */
14599
14609
  var VisualizationPanel = /** @class */ (function (_super) {
14600
14610
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(VisualizationPanel, _super);
14601
- function VisualizationPanel(questions, data, options, _elements) {
14611
+ function VisualizationPanel(questions, data, options, _elements, isRoot) {
14602
14612
  if (options === void 0) { options = {}; }
14603
14613
  if (_elements === void 0) { _elements = undefined; }
14614
+ if (isRoot === void 0) { isRoot = true; }
14604
14615
  var _this = _super.call(this, null, data, options, "panel") || this;
14605
14616
  _this.questions = questions;
14606
14617
  _this._elements = _elements;
14618
+ _this.isRoot = isRoot;
14607
14619
  _this.visualizers = [];
14608
- _this.haveCommercialLicense = false;
14609
14620
  _this.renderedQuestionsCount = 0;
14610
14621
  _this.onAfterRenderQuestionCallback = function (sender, options) {
14611
14622
  _this.renderedQuestionsCount++;
@@ -14684,12 +14695,6 @@ var VisualizationPanel = /** @class */ (function (_super) {
14684
14695
  */
14685
14696
  _this.onElementMoved = new survey_core__WEBPACK_IMPORTED_MODULE_1__.Event();
14686
14697
  _this.loadingData = false;
14687
- var f = survey_core__WEBPACK_IMPORTED_MODULE_1__.hasLicense;
14688
- _this.haveCommercialLicense = (!!f && f(4)) ||
14689
- VisualizationPanel.haveCommercialLicense ||
14690
- (typeof options.haveCommercialLicense !== "undefined"
14691
- ? options.haveCommercialLicense
14692
- : false);
14693
14698
  _this._layoutEngine =
14694
14699
  options.layoutEngine ||
14695
14700
  new _layoutEngine__WEBPACK_IMPORTED_MODULE_8__.MuuriLayoutEngine(_this.allowDynamicLayout, "." + questionLayoutedElementClassName, _this.allowDragDrop);
@@ -14704,7 +14709,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
14704
14709
  _this._elements = _this.buildElements(questions);
14705
14710
  }
14706
14711
  _this.buildVisualizers(questions);
14707
- if (!_this.haveCommercialLicense) {
14712
+ if (!_this.haveCommercialLicense && _this.isRoot) {
14708
14713
  _this.registerToolbarItem("commercialLicense", function () {
14709
14714
  return (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.createCommercialLicenseLink)();
14710
14715
  });
@@ -14887,7 +14892,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
14887
14892
  var visualizerData = _this.surveyData;
14888
14893
  var visualizer;
14889
14894
  if (Array.isArray(question)) {
14890
- visualizer = new (_visualizationManager__WEBPACK_IMPORTED_MODULE_11__.VisualizationManager.getPivotVisualizerConstructor())(question, visualizerData, visualizerOptions);
14895
+ visualizer = new (_visualizationManager__WEBPACK_IMPORTED_MODULE_11__.VisualizationManager.getPivotVisualizerConstructor())(question, visualizerData, visualizerOptions, undefined, false);
14891
14896
  }
14892
14897
  else {
14893
14898
  visualizer = _this.createVisualizer(question, visualizerOptions, visualizerData);
@@ -15305,7 +15310,6 @@ var VisualizationPanel = /** @class */ (function (_super) {
15305
15310
  _super.prototype.destroy.call(this);
15306
15311
  this.destroyVisualizers();
15307
15312
  };
15308
- VisualizationPanel.haveCommercialLicense = false;
15309
15313
  return VisualizationPanel;
15310
15314
  }(_visualizerBase__WEBPACK_IMPORTED_MODULE_2__.VisualizerBase));
15311
15315
 
@@ -15345,7 +15349,7 @@ var VisualizationPanelDynamic = /** @class */ (function (_super) {
15345
15349
  var options = Object.assign({}, options);
15346
15350
  options.allowDynamicLayout = false;
15347
15351
  options.dataProvider = undefined;
15348
- _this._panelVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(_this.getQuestions(), [], options);
15352
+ _this._panelVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(_this.getQuestions(), [], options, undefined, false);
15349
15353
  _this._panelVisualizer.onAfterRender.add(_this.onAfterRenderPanelCallback);
15350
15354
  _this.updateData(data);
15351
15355
  return _this;
@@ -15499,6 +15503,7 @@ var VisualizerBase = /** @class */ (function () {
15499
15503
  this._dataProvider = undefined;
15500
15504
  this._getDataCore = undefined;
15501
15505
  this.labelTruncateLength = 27;
15506
+ this.haveCommercialLicense = false;
15502
15507
  this.renderResult = undefined;
15503
15508
  this.toolbarContainer = undefined;
15504
15509
  this.headerContainer = undefined;
@@ -15561,6 +15566,10 @@ var VisualizerBase = /** @class */ (function () {
15561
15566
  this._calculationsCache = undefined;
15562
15567
  this.loadingData = false;
15563
15568
  this._settingState = false;
15569
+ var f = survey_core__WEBPACK_IMPORTED_MODULE_1__.hasLicense;
15570
+ this.haveCommercialLicense = (!!f && f(4)) ||
15571
+ VisualizerBase.haveCommercialLicense ||
15572
+ (typeof options.haveCommercialLicense !== "undefined" ? options.haveCommercialLicense : false);
15564
15573
  this._getDataCore = (_a = this.questionOptions) === null || _a === void 0 ? void 0 : _a.getDataCore;
15565
15574
  this._dataProvider = options.dataProvider || new _dataProvider__WEBPACK_IMPORTED_MODULE_2__.DataProvider(data);
15566
15575
  this._dataProvider.onDataChanged.add(function () { return _this.onDataChanged(); });
@@ -16230,6 +16239,7 @@ var VisualizerBase = /** @class */ (function () {
16230
16239
  survey.locale = newLocale;
16231
16240
  }
16232
16241
  };
16242
+ VisualizerBase.haveCommercialLicense = false;
16233
16243
  VisualizerBase.suppressVisualizerStubRendering = false;
16234
16244
  VisualizerBase.chartAdapterType = undefined;
16235
16245
  // public static otherCommentQuestionType = "comment"; // TODO: make it configureable - allow choose what kind of question/visualizer will be used for comments/others