survey-analytics 2.3.6 → 2.3.8
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/shared.mjs +1 -1
- package/fesm/shared2.mjs +110 -63
- package/fesm/shared2.mjs.map +1 -1
- package/fesm/survey.analytics.core.mjs +2 -2
- package/fesm/survey.analytics.mjs +3 -3
- package/fesm/survey.analytics.tabulator.mjs +6 -3
- package/fesm/survey.analytics.tabulator.mjs.map +1 -1
- package/package.json +3 -3
- package/survey-analytics-tabulator.types/tables/table.d.ts +18 -5
- package/survey-analytics.types/entries/summary.core.d.ts +1 -0
- package/survey-analytics.types/visualizationComposite.d.ts +8 -0
- package/survey-analytics.types/visualizationMatrixDynamic.d.ts +1 -2
- package/survey-analytics.types/visualizationPanel.d.ts +6 -0
- package/survey-analytics.types/visualizationPanelDynamic.d.ts +1 -2
- package/survey-analytics.types/visualizerBase.d.ts +6 -1
- package/survey.analytics.core.css +1 -1
- package/survey.analytics.core.js +173 -98
- package/survey.analytics.core.js.map +1 -1
- package/survey.analytics.core.min.css +1 -1
- package/survey.analytics.core.min.js +1 -1
- package/survey.analytics.core.min.js.LICENSE.txt +1 -1
- package/survey.analytics.css +1 -1
- package/survey.analytics.js +174 -98
- package/survey.analytics.js.map +1 -1
- package/survey.analytics.min.css +1 -1
- package/survey.analytics.min.js +1 -1
- package/survey.analytics.min.js.LICENSE.txt +1 -1
- package/survey.analytics.tabulator.css +1 -1
- package/survey.analytics.tabulator.js +11 -4
- package/survey.analytics.tabulator.js.map +1 -1
- package/survey.analytics.tabulator.min.css +1 -1
- package/survey.analytics.tabulator.min.js +1 -1
- package/survey.analytics.tabulator.min.js.LICENSE.txt +1 -1
package/survey.analytics.css
CHANGED
package/survey.analytics.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - SurveyJS Dashboard library v2.3.
|
|
2
|
+
* surveyjs - SurveyJS Dashboard library v2.3.8
|
|
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
|
*/
|
|
@@ -6859,7 +6859,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6859
6859
|
var AlternativeVisualizersWrapper = /** @class */ (function (_super) {
|
|
6860
6860
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(AlternativeVisualizersWrapper, _super);
|
|
6861
6861
|
function AlternativeVisualizersWrapper(visualizers, question, data, options) {
|
|
6862
|
-
var _this = _super.call(this, question, data, options) || this;
|
|
6862
|
+
var _this = _super.call(this, question, data, options, "alternative") || this;
|
|
6863
6863
|
_this.visualizers = visualizers;
|
|
6864
6864
|
_this.visualizersWithSelection = [];
|
|
6865
6865
|
_this.onAfterVisualizerRenderCallback = function () {
|
|
@@ -6885,14 +6885,16 @@ var AlternativeVisualizersWrapper = /** @class */ (function (_super) {
|
|
|
6885
6885
|
_this.visualizersWithSelection.push(visualizer);
|
|
6886
6886
|
}
|
|
6887
6887
|
});
|
|
6888
|
-
_this.
|
|
6889
|
-
|
|
6890
|
-
return {
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6888
|
+
if (_this.options.allowChangeVisualizerType !== false) {
|
|
6889
|
+
_this.registerToolbarItem("changeVisualizer", function () {
|
|
6890
|
+
return _this.visualizerSelector = _utils_index__WEBPACK_IMPORTED_MODULE_3__.DocumentHelper.createSelector(_this.visualizers.map(function (visualizer) {
|
|
6891
|
+
return {
|
|
6892
|
+
value: visualizer.type,
|
|
6893
|
+
text: _localizationManager__WEBPACK_IMPORTED_MODULE_2__.localization.getString("visualizer_" + visualizer.type),
|
|
6894
|
+
};
|
|
6895
|
+
}), function (option) { return _this.visualizer.type === option.value; }, function (e) { return _this.setVisualizer(e.target.value); });
|
|
6896
|
+
}, 0);
|
|
6897
|
+
}
|
|
6896
6898
|
_this.visualizer = visualizers[0];
|
|
6897
6899
|
_this.visualizer.onAfterRender.add(_this.onAfterVisualizerRenderCallback);
|
|
6898
6900
|
_this.visualizer.onStateChanged.add(_this.onVisualizerStateChangedCallback);
|
|
@@ -9979,22 +9981,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9979
9981
|
/* harmony export */ AlternativeVisualizersWrapper: () => (/* reexport safe */ _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_28__.AlternativeVisualizersWrapper),
|
|
9980
9982
|
/* harmony export */ BooleanModel: () => (/* reexport safe */ _boolean__WEBPACK_IMPORTED_MODULE_19__.BooleanModel),
|
|
9981
9983
|
/* harmony export */ DataProvider: () => (/* reexport safe */ _dataProvider__WEBPACK_IMPORTED_MODULE_15__.DataProvider),
|
|
9982
|
-
/* harmony export */ DocumentHelper: () => (/* reexport safe */
|
|
9984
|
+
/* harmony export */ DocumentHelper: () => (/* reexport safe */ _utils_index__WEBPACK_IMPORTED_MODULE_37__.DocumentHelper),
|
|
9983
9985
|
/* harmony export */ HistogramModel: () => (/* reexport safe */ _histogram__WEBPACK_IMPORTED_MODULE_20__.HistogramModel),
|
|
9984
9986
|
/* harmony export */ Matrix: () => (/* reexport safe */ _matrix__WEBPACK_IMPORTED_MODULE_18__.Matrix),
|
|
9985
|
-
/* harmony export */ NpsAdapter: () => (/* reexport safe */
|
|
9986
|
-
/* harmony export */ NpsVisualizer: () => (/* reexport safe */
|
|
9987
|
-
/* harmony export */ NpsVisualizerWidget: () => (/* reexport safe */
|
|
9987
|
+
/* harmony export */ NpsAdapter: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_34__.NpsAdapter),
|
|
9988
|
+
/* harmony export */ NpsVisualizer: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_34__.NpsVisualizer),
|
|
9989
|
+
/* harmony export */ NpsVisualizerWidget: () => (/* reexport safe */ _nps__WEBPACK_IMPORTED_MODULE_34__.NpsVisualizerWidget),
|
|
9988
9990
|
/* harmony export */ NumberModel: () => (/* reexport safe */ _number__WEBPACK_IMPORTED_MODULE_21__.NumberModel),
|
|
9989
|
-
/* harmony export */ PivotModel: () => (/* reexport safe */
|
|
9991
|
+
/* harmony export */ PivotModel: () => (/* reexport safe */ _pivot__WEBPACK_IMPORTED_MODULE_36__.PivotModel),
|
|
9990
9992
|
/* harmony export */ PostponeHelper: () => (/* reexport safe */ _visualizerBase__WEBPACK_IMPORTED_MODULE_22__.PostponeHelper),
|
|
9991
|
-
/* harmony export */ RankingModel: () => (/* reexport safe */
|
|
9993
|
+
/* harmony export */ RankingModel: () => (/* reexport safe */ _ranking__WEBPACK_IMPORTED_MODULE_35__.RankingModel),
|
|
9992
9994
|
/* harmony export */ SelectBase: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_17__.SelectBase),
|
|
9993
|
-
/* harmony export */ StatisticsTable: () => (/* reexport safe */
|
|
9994
|
-
/* harmony export */ StatisticsTableAdapter: () => (/* reexport safe */
|
|
9995
|
-
/* harmony export */ StatisticsTableBoolean: () => (/* reexport safe */
|
|
9996
|
-
/* harmony export */ Text: () => (/* reexport safe */
|
|
9997
|
-
/* harmony export */ TextTableAdapter: () => (/* reexport safe */
|
|
9995
|
+
/* harmony export */ StatisticsTable: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_33__.StatisticsTable),
|
|
9996
|
+
/* harmony export */ StatisticsTableAdapter: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_33__.StatisticsTableAdapter),
|
|
9997
|
+
/* harmony export */ StatisticsTableBoolean: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_33__.StatisticsTableBoolean),
|
|
9998
|
+
/* harmony export */ Text: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_32__.Text),
|
|
9999
|
+
/* harmony export */ TextTableAdapter: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_32__.TextTableAdapter),
|
|
10000
|
+
/* harmony export */ VisualizationComposite: () => (/* reexport safe */ _visualizationComposite__WEBPACK_IMPORTED_MODULE_29__.VisualizationComposite),
|
|
9998
10001
|
/* harmony export */ VisualizationManager: () => (/* reexport safe */ _visualizationManager__WEBPACK_IMPORTED_MODULE_23__.VisualizationManager),
|
|
9999
10002
|
/* harmony export */ VisualizationMatrixDropdown: () => (/* reexport safe */ _visualizationMatrixDropdown__WEBPACK_IMPORTED_MODULE_27__.VisualizationMatrixDropdown),
|
|
10000
10003
|
/* harmony export */ VisualizationMatrixDynamic: () => (/* reexport safe */ _visualizationMatrixDynamic__WEBPACK_IMPORTED_MODULE_26__.VisualizationMatrixDynamic),
|
|
@@ -10002,13 +10005,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10002
10005
|
/* harmony export */ VisualizationPanelDynamic: () => (/* reexport safe */ _visualizationPanelDynamic__WEBPACK_IMPORTED_MODULE_25__.VisualizationPanelDynamic),
|
|
10003
10006
|
/* harmony export */ VisualizerBase: () => (/* reexport safe */ _visualizerBase__WEBPACK_IMPORTED_MODULE_22__.VisualizerBase),
|
|
10004
10007
|
/* harmony export */ VisualizerFactory: () => (/* reexport safe */ _visualizerFactory__WEBPACK_IMPORTED_MODULE_16__.VisualizerFactory),
|
|
10005
|
-
/* harmony export */ WordCloud: () => (/* reexport safe */
|
|
10006
|
-
/* harmony export */ WordCloudAdapter: () => (/* reexport safe */
|
|
10008
|
+
/* harmony export */ WordCloud: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_30__.WordCloud),
|
|
10009
|
+
/* harmony export */ WordCloudAdapter: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_30__.WordCloudAdapter),
|
|
10007
10010
|
/* harmony export */ hideEmptyAnswersInData: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_17__.hideEmptyAnswersInData),
|
|
10008
10011
|
/* harmony export */ localization: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.localization),
|
|
10009
10012
|
/* harmony export */ setupLocale: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale),
|
|
10010
10013
|
/* harmony export */ surveyStrings: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.surveyStrings),
|
|
10011
|
-
/* harmony export */ textHelper: () => (/* reexport safe */
|
|
10014
|
+
/* harmony export */ textHelper: () => (/* reexport safe */ _wordcloud_stopwords_index__WEBPACK_IMPORTED_MODULE_31__.textHelper)
|
|
10012
10015
|
/* harmony export */ });
|
|
10013
10016
|
/* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../localizationManager */ "./src/localizationManager.ts");
|
|
10014
10017
|
/* harmony import */ var _analytics_localization_farsi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../analytics-localization/farsi */ "./src/analytics-localization/farsi.ts");
|
|
@@ -10039,14 +10042,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10039
10042
|
/* harmony import */ var _visualizationMatrixDynamic__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../visualizationMatrixDynamic */ "./src/visualizationMatrixDynamic.ts");
|
|
10040
10043
|
/* harmony import */ var _visualizationMatrixDropdown__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../visualizationMatrixDropdown */ "./src/visualizationMatrixDropdown.ts");
|
|
10041
10044
|
/* harmony import */ var _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../alternativeVizualizersWrapper */ "./src/alternativeVizualizersWrapper.ts");
|
|
10042
|
-
/* harmony import */ var
|
|
10043
|
-
/* harmony import */ var
|
|
10044
|
-
/* harmony import */ var
|
|
10045
|
-
/* harmony import */ var
|
|
10046
|
-
/* harmony import */ var
|
|
10047
|
-
/* harmony import */ var
|
|
10048
|
-
/* harmony import */ var
|
|
10049
|
-
/* harmony import */ var
|
|
10045
|
+
/* harmony import */ var _visualizationComposite__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../visualizationComposite */ "./src/visualizationComposite.ts");
|
|
10046
|
+
/* harmony import */ var _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../wordcloud/wordcloud */ "./src/wordcloud/wordcloud.ts");
|
|
10047
|
+
/* harmony import */ var _wordcloud_stopwords_index__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../wordcloud/stopwords/index */ "./src/wordcloud/stopwords/index.ts");
|
|
10048
|
+
/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../text */ "./src/text.ts");
|
|
10049
|
+
/* harmony import */ var _statistics_table__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../statistics-table */ "./src/statistics-table.ts");
|
|
10050
|
+
/* harmony import */ var _nps__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../nps */ "./src/nps.ts");
|
|
10051
|
+
/* harmony import */ var _ranking__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../ranking */ "./src/ranking.ts");
|
|
10052
|
+
/* harmony import */ var _pivot__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../pivot */ "./src/pivot.ts");
|
|
10053
|
+
/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../utils/index */ "./src/utils/index.ts");
|
|
10050
10054
|
|
|
10051
10055
|
//localization
|
|
10052
10056
|
|
|
@@ -10085,6 +10089,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10085
10089
|
|
|
10086
10090
|
|
|
10087
10091
|
|
|
10092
|
+
|
|
10088
10093
|
|
|
10089
10094
|
|
|
10090
10095
|
/***/ }),
|
|
@@ -11143,19 +11148,21 @@ var NumberModel = /** @class */ (function (_super) {
|
|
|
11143
11148
|
_this.chartTypes = _this._chartAdapter.getChartTypes();
|
|
11144
11149
|
_this.chartType = _this.chartTypes[0];
|
|
11145
11150
|
}
|
|
11146
|
-
_this.
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
return {
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
_this.
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11151
|
+
if (_this.options.allowChangeVisualizerType !== false) {
|
|
11152
|
+
_this.registerToolbarItem("changeChartType", function () {
|
|
11153
|
+
if (_this.chartTypes.length > 1) {
|
|
11154
|
+
return _utils_index__WEBPACK_IMPORTED_MODULE_3__.DocumentHelper.createSelector(_this.chartTypes.map(function (chartType) {
|
|
11155
|
+
return {
|
|
11156
|
+
value: chartType,
|
|
11157
|
+
text: _localizationManager__WEBPACK_IMPORTED_MODULE_2__.localization.getString("chartType_" + chartType),
|
|
11158
|
+
};
|
|
11159
|
+
}), function (option) { return _this.chartType === option.value; }, function (e) {
|
|
11160
|
+
_this.setChartType(e.target.value);
|
|
11161
|
+
});
|
|
11162
|
+
}
|
|
11163
|
+
return null;
|
|
11164
|
+
});
|
|
11165
|
+
}
|
|
11159
11166
|
return _this;
|
|
11160
11167
|
}
|
|
11161
11168
|
NumberModel.prototype.onDataChanged = function () {
|
|
@@ -12818,19 +12825,21 @@ var SelectBase = /** @class */ (function (_super) {
|
|
|
12818
12825
|
_this._chartType = _this.options.defaultChartType;
|
|
12819
12826
|
}
|
|
12820
12827
|
}
|
|
12821
|
-
_this.
|
|
12822
|
-
|
|
12823
|
-
|
|
12824
|
-
return {
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
_this.
|
|
12830
|
-
|
|
12831
|
-
|
|
12832
|
-
|
|
12833
|
-
|
|
12828
|
+
if (_this.options.allowChangeVisualizerType !== false) {
|
|
12829
|
+
_this.registerToolbarItem("changeChartType", function () {
|
|
12830
|
+
if (_this.chartTypes.length > 1) {
|
|
12831
|
+
return _utils_index__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createSelector(_this.chartTypes.map(function (chartType) {
|
|
12832
|
+
return {
|
|
12833
|
+
value: chartType,
|
|
12834
|
+
text: _localizationManager__WEBPACK_IMPORTED_MODULE_3__.localization.getString("chartType_" + chartType),
|
|
12835
|
+
};
|
|
12836
|
+
}), function (option) { return _this.chartType === option.value; }, function (e) {
|
|
12837
|
+
_this.setChartType(e.target.value);
|
|
12838
|
+
});
|
|
12839
|
+
}
|
|
12840
|
+
return null;
|
|
12841
|
+
});
|
|
12842
|
+
}
|
|
12834
12843
|
_this.registerToolbarItem("changeAnswersOrder", function () {
|
|
12835
12844
|
if (_this.isSupportAnswersOrder()) {
|
|
12836
12845
|
_this.choicesOrderSelector = _utils_index__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createSelector([
|
|
@@ -14371,6 +14380,42 @@ function toPrecision(value, precision) {
|
|
|
14371
14380
|
}
|
|
14372
14381
|
|
|
14373
14382
|
|
|
14383
|
+
/***/ }),
|
|
14384
|
+
|
|
14385
|
+
/***/ "./src/visualizationComposite.ts":
|
|
14386
|
+
/*!***************************************!*\
|
|
14387
|
+
!*** ./src/visualizationComposite.ts ***!
|
|
14388
|
+
\***************************************/
|
|
14389
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14390
|
+
|
|
14391
|
+
"use strict";
|
|
14392
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14393
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14394
|
+
/* harmony export */ VisualizationComposite: () => (/* binding */ VisualizationComposite)
|
|
14395
|
+
/* harmony export */ });
|
|
14396
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
|
|
14397
|
+
/* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
|
|
14398
|
+
/* harmony import */ var _visualizationPanelDynamic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./visualizationPanelDynamic */ "./src/visualizationPanelDynamic.ts");
|
|
14399
|
+
|
|
14400
|
+
|
|
14401
|
+
|
|
14402
|
+
var VisualizationComposite = /** @class */ (function (_super) {
|
|
14403
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(VisualizationComposite, _super);
|
|
14404
|
+
function VisualizationComposite(question, data, options, name) {
|
|
14405
|
+
return _super.call(this, question, data, options, name || "composite") || this;
|
|
14406
|
+
}
|
|
14407
|
+
VisualizationComposite.prototype.getQuestions = function () {
|
|
14408
|
+
var matrixdynamic = this.question;
|
|
14409
|
+
var innerQuestions = [];
|
|
14410
|
+
matrixdynamic.contentPanel.addQuestionsToList(innerQuestions);
|
|
14411
|
+
return innerQuestions;
|
|
14412
|
+
};
|
|
14413
|
+
return VisualizationComposite;
|
|
14414
|
+
}(_visualizationPanelDynamic__WEBPACK_IMPORTED_MODULE_2__.VisualizationPanelDynamic));
|
|
14415
|
+
|
|
14416
|
+
_visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.registerVisualizer("composite", VisualizationComposite);
|
|
14417
|
+
|
|
14418
|
+
|
|
14374
14419
|
/***/ }),
|
|
14375
14420
|
|
|
14376
14421
|
/***/ "./src/visualizationManager.ts":
|
|
@@ -14652,16 +14697,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14652
14697
|
|
|
14653
14698
|
var VisualizationMatrixDynamic = /** @class */ (function (_super) {
|
|
14654
14699
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(VisualizationMatrixDynamic, _super);
|
|
14655
|
-
function VisualizationMatrixDynamic(question, data, options) {
|
|
14656
|
-
return _super.call(this, question, data, options) || this;
|
|
14700
|
+
function VisualizationMatrixDynamic(question, data, options, name) {
|
|
14701
|
+
return _super.call(this, question, data, options, name || "matrixDynamic") || this;
|
|
14657
14702
|
}
|
|
14658
|
-
Object.defineProperty(VisualizationMatrixDynamic.prototype, "type", {
|
|
14659
|
-
get: function () {
|
|
14660
|
-
return "matrixDynamic";
|
|
14661
|
-
},
|
|
14662
|
-
enumerable: false,
|
|
14663
|
-
configurable: true
|
|
14664
|
-
});
|
|
14665
14703
|
VisualizationMatrixDynamic.prototype.getQuestions = function () {
|
|
14666
14704
|
var matrixdynamic = this.question;
|
|
14667
14705
|
var visibleRows = matrixdynamic.visibleRows;
|
|
@@ -14712,8 +14750,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14712
14750
|
/* harmony import */ var _filterInfo__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./filterInfo */ "./src/filterInfo.ts");
|
|
14713
14751
|
/* harmony import */ var _layoutEngine__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./layoutEngine */ "./src/layoutEngine.ts");
|
|
14714
14752
|
/* harmony import */ var _svgbundle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./svgbundle */ "./src/svgbundle.ts");
|
|
14715
|
-
/* harmony import */ var
|
|
14716
|
-
/* harmony import */ var
|
|
14753
|
+
/* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
|
|
14754
|
+
/* harmony import */ var _visualizationPanel_scss__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./visualizationPanel.scss */ "./src/visualizationPanel.scss");
|
|
14717
14755
|
|
|
14718
14756
|
|
|
14719
14757
|
|
|
@@ -14844,7 +14882,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
14844
14882
|
_this._layoutEngine.onMoveCallback = function (order) {
|
|
14845
14883
|
return _this.reorderVisibleElements(order);
|
|
14846
14884
|
};
|
|
14847
|
-
_this.showToolbar =
|
|
14885
|
+
_this.showToolbar = isRoot;
|
|
14848
14886
|
if (_this.options.survey) {
|
|
14849
14887
|
_localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.currentLocale = _this.options.survey.locale;
|
|
14850
14888
|
}
|
|
@@ -14852,6 +14890,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
14852
14890
|
_this._elements = _this.buildElements(questions);
|
|
14853
14891
|
}
|
|
14854
14892
|
_this.buildVisualizers(questions);
|
|
14893
|
+
_this.updateData(_this.surveyData);
|
|
14855
14894
|
if (!_this.haveCommercialLicense && _this.isRoot) {
|
|
14856
14895
|
_this.registerToolbarItem("commercialLicense", function () {
|
|
14857
14896
|
return (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.createCommercialLicenseLink)();
|
|
@@ -15039,7 +15078,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
15039
15078
|
var visualizerData = _this.surveyData;
|
|
15040
15079
|
var visualizer;
|
|
15041
15080
|
if (Array.isArray(question)) {
|
|
15042
|
-
visualizer = new (
|
|
15081
|
+
visualizer = new (_visualizationManager__WEBPACK_IMPORTED_MODULE_10__.VisualizationManager.getPivotVisualizerConstructor())(question, visualizerData, visualizerOptions, undefined, false);
|
|
15043
15082
|
}
|
|
15044
15083
|
else {
|
|
15045
15084
|
visualizer = _this.createVisualizer(question, visualizerOptions, visualizerData);
|
|
@@ -15115,7 +15154,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
15115
15154
|
question = Array.isArray(question) ? question[0] : question;
|
|
15116
15155
|
var element = _this.getElement(question.name);
|
|
15117
15156
|
if (!!element) {
|
|
15118
|
-
element.displayName = _this.
|
|
15157
|
+
element.displayName = _this.getTitle(question);
|
|
15119
15158
|
}
|
|
15120
15159
|
});
|
|
15121
15160
|
this.visualizers.forEach(function (v) {
|
|
@@ -15183,7 +15222,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
15183
15222
|
question = Array.isArray(question) ? question[0] : question;
|
|
15184
15223
|
return {
|
|
15185
15224
|
name: question.name,
|
|
15186
|
-
displayName: _this.
|
|
15225
|
+
displayName: _this.getTitle(question),
|
|
15187
15226
|
isVisible: true,
|
|
15188
15227
|
isPublic: true,
|
|
15189
15228
|
};
|
|
@@ -15506,40 +15545,32 @@ var VisualizationPanelDynamic = /** @class */ (function (_super) {
|
|
|
15506
15545
|
};
|
|
15507
15546
|
_this.loadingData = false;
|
|
15508
15547
|
var options = Object.assign({}, options);
|
|
15548
|
+
options.allowHideQuestions = false;
|
|
15509
15549
|
options.allowDynamicLayout = false;
|
|
15510
15550
|
options.dataProvider = undefined;
|
|
15551
|
+
options.dataPath = _this.dataNames[0];
|
|
15511
15552
|
_this._panelVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(_this.getQuestions(), [], options, undefined, false);
|
|
15512
15553
|
_this._panelVisualizer.onAfterRender.add(_this.onAfterRenderPanelCallback);
|
|
15513
15554
|
_this.updateData(data);
|
|
15514
15555
|
return _this;
|
|
15515
15556
|
}
|
|
15516
|
-
VisualizationPanelDynamic.prototype
|
|
15517
|
-
_super.prototype.setLocale.call(this, newLocale);
|
|
15518
|
-
this._panelVisualizer.locale = newLocale;
|
|
15519
|
-
};
|
|
15520
|
-
Object.defineProperty(VisualizationPanelDynamic.prototype, "type", {
|
|
15557
|
+
Object.defineProperty(VisualizationPanelDynamic.prototype, "contentVisualizer", {
|
|
15521
15558
|
get: function () {
|
|
15522
|
-
return
|
|
15559
|
+
return this._panelVisualizer;
|
|
15523
15560
|
},
|
|
15524
15561
|
enumerable: false,
|
|
15525
15562
|
configurable: true
|
|
15526
15563
|
});
|
|
15527
|
-
VisualizationPanelDynamic.prototype.
|
|
15528
|
-
|
|
15529
|
-
|
|
15530
|
-
this.data.forEach(function (dataItem) {
|
|
15531
|
-
if (dataItem[_this.question.name] !== undefined) {
|
|
15532
|
-
panelData = panelData.concat(dataItem[_this.question.name]);
|
|
15533
|
-
}
|
|
15534
|
-
});
|
|
15535
|
-
this._panelVisualizer.updateData(panelData);
|
|
15564
|
+
VisualizationPanelDynamic.prototype.setLocale = function (newLocale) {
|
|
15565
|
+
_super.prototype.setLocale.call(this, newLocale);
|
|
15566
|
+
this._panelVisualizer.locale = newLocale;
|
|
15536
15567
|
};
|
|
15537
15568
|
VisualizationPanelDynamic.prototype.updateData = function (data) {
|
|
15538
15569
|
_super.prototype.updateData.call(this, data);
|
|
15539
|
-
this.
|
|
15570
|
+
this._panelVisualizer.updateData(data);
|
|
15540
15571
|
};
|
|
15541
15572
|
VisualizationPanelDynamic.prototype.onDataChanged = function () {
|
|
15542
|
-
this.
|
|
15573
|
+
this._panelVisualizer.updateData(this.dataProvider.filteredData);
|
|
15543
15574
|
_super.prototype.onDataChanged.call(this);
|
|
15544
15575
|
};
|
|
15545
15576
|
VisualizationPanelDynamic.prototype.getQuestions = function () {
|
|
@@ -15924,6 +15955,22 @@ var VisualizerBase = /** @class */ (function () {
|
|
|
15924
15955
|
}
|
|
15925
15956
|
return undefined;
|
|
15926
15957
|
};
|
|
15958
|
+
Object.defineProperty(VisualizerBase.prototype, "title", {
|
|
15959
|
+
/**
|
|
15960
|
+
* Returns the visualizer's title.
|
|
15961
|
+
*/
|
|
15962
|
+
get: function () {
|
|
15963
|
+
return this.getTitle(this.question);
|
|
15964
|
+
},
|
|
15965
|
+
enumerable: false,
|
|
15966
|
+
configurable: true
|
|
15967
|
+
});
|
|
15968
|
+
VisualizerBase.prototype.getTitle = function (question) {
|
|
15969
|
+
var _a;
|
|
15970
|
+
if (question === undefined)
|
|
15971
|
+
return "";
|
|
15972
|
+
return this.processText(((_a = question.locTitle) === null || _a === void 0 ? void 0 : _a.renderedHtml) ? question.locTitle.renderedHtml : question.title);
|
|
15973
|
+
};
|
|
15927
15974
|
Object.defineProperty(VisualizerBase.prototype, "type", {
|
|
15928
15975
|
/**
|
|
15929
15976
|
* Returns the visualizer's type.
|
|
@@ -15968,11 +16015,26 @@ var VisualizerBase = /** @class */ (function () {
|
|
|
15968
16015
|
* @param data A data array with survey results to be visualized.
|
|
15969
16016
|
*/
|
|
15970
16017
|
VisualizerBase.prototype.updateData = function (data) {
|
|
16018
|
+
var dataPath = this.options.dataPath;
|
|
16019
|
+
var dataToAssign = data;
|
|
16020
|
+
if (!!dataPath && Array.isArray(data)) {
|
|
16021
|
+
dataToAssign = [];
|
|
16022
|
+
data.forEach(function (dataItem) {
|
|
16023
|
+
if (!!dataItem && dataItem[dataPath] !== undefined) {
|
|
16024
|
+
if (Array.isArray(dataItem[dataPath])) {
|
|
16025
|
+
dataToAssign = dataToAssign.concat(dataItem[dataPath]);
|
|
16026
|
+
}
|
|
16027
|
+
else {
|
|
16028
|
+
dataToAssign.push(dataItem[dataPath]);
|
|
16029
|
+
}
|
|
16030
|
+
}
|
|
16031
|
+
});
|
|
16032
|
+
}
|
|
15971
16033
|
if (!this.options.dataProvider) {
|
|
15972
|
-
this.dataProvider.data =
|
|
16034
|
+
this.dataProvider.data = dataToAssign;
|
|
15973
16035
|
}
|
|
15974
16036
|
if (this.hasFooter) {
|
|
15975
|
-
this.footerVisualizer.updateData(
|
|
16037
|
+
this.footerVisualizer.updateData(dataToAssign);
|
|
15976
16038
|
}
|
|
15977
16039
|
};
|
|
15978
16040
|
VisualizerBase.prototype.invokeOnUpdate = function () {
|
|
@@ -16462,7 +16524,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16462
16524
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16463
16525
|
/* harmony export */ VisualizerFactory: () => (/* binding */ VisualizerFactory)
|
|
16464
16526
|
/* harmony export */ });
|
|
16465
|
-
/* harmony import */ var
|
|
16527
|
+
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
16528
|
+
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
16529
|
+
/* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
|
|
16530
|
+
|
|
16466
16531
|
|
|
16467
16532
|
/**
|
|
16468
16533
|
* An object that allows you to create individual visualizers without creating a [visualization panel](https://surveyjs.io/dashboard/documentation/api-reference/visualizationpanel).
|
|
@@ -16493,16 +16558,26 @@ var VisualizerFactory = /** @class */ (function () {
|
|
|
16493
16558
|
VisualizerFactory.createVisualizer = function (question, data, options) {
|
|
16494
16559
|
var type = question.getType();
|
|
16495
16560
|
var creators = [];
|
|
16561
|
+
var questionForCreator = question;
|
|
16562
|
+
var optionsForCreator = Object.assign({}, options);
|
|
16496
16563
|
if (type === "text" && question.inputType) {
|
|
16497
|
-
creators =
|
|
16564
|
+
creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.getVisualizersByType(question.inputType, type);
|
|
16498
16565
|
}
|
|
16499
16566
|
else {
|
|
16500
|
-
|
|
16567
|
+
var fallbackType = undefined;
|
|
16568
|
+
if (question instanceof survey_core__WEBPACK_IMPORTED_MODULE_0__.QuestionCustomModel) {
|
|
16569
|
+
fallbackType = question.getDynamicType();
|
|
16570
|
+
// questionForCreator = question.contentQuestion;
|
|
16571
|
+
}
|
|
16572
|
+
else if (question instanceof survey_core__WEBPACK_IMPORTED_MODULE_0__.QuestionCompositeModel) {
|
|
16573
|
+
fallbackType = "composite";
|
|
16574
|
+
}
|
|
16575
|
+
creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.getVisualizersByType(type, fallbackType);
|
|
16501
16576
|
}
|
|
16502
|
-
var visualizers = creators.map(function (creator) { return new creator(
|
|
16577
|
+
var visualizers = creators.map(function (creator) { return new creator(questionForCreator, data, optionsForCreator); });
|
|
16503
16578
|
if (visualizers.length > 1) {
|
|
16504
|
-
var alternativesVisualizerConstructor =
|
|
16505
|
-
var visualizer = new alternativesVisualizerConstructor(visualizers,
|
|
16579
|
+
var alternativesVisualizerConstructor = _visualizationManager__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager.getAltVisualizerSelector();
|
|
16580
|
+
var visualizer = new alternativesVisualizerConstructor(visualizers, questionForCreator, data, optionsForCreator);
|
|
16506
16581
|
return visualizer;
|
|
16507
16582
|
}
|
|
16508
16583
|
return visualizers[0];
|
|
@@ -18455,6 +18530,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18455
18530
|
/* harmony export */ StatisticsTableBoolean: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.StatisticsTableBoolean),
|
|
18456
18531
|
/* harmony export */ Text: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.Text),
|
|
18457
18532
|
/* harmony export */ TextTableAdapter: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.TextTableAdapter),
|
|
18533
|
+
/* harmony export */ VisualizationComposite: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizationComposite),
|
|
18458
18534
|
/* harmony export */ VisualizationManager: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager),
|
|
18459
18535
|
/* harmony export */ VisualizationMatrixDropdown: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizationMatrixDropdown),
|
|
18460
18536
|
/* harmony export */ VisualizationMatrixDynamic: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizationMatrixDynamic),
|