survey-analytics 2.3.4 → 2.3.5
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 +59 -1
- package/fesm/shared.mjs.map +1 -1
- package/fesm/shared2.mjs +145 -48
- package/fesm/shared2.mjs.map +1 -1
- package/fesm/survey.analytics.core.mjs +2 -2
- package/fesm/survey.analytics.mjs +4 -4
- package/fesm/survey.analytics.mjs.map +1 -1
- package/fesm/survey.analytics.tabulator.mjs +17 -4
- package/fesm/survey.analytics.tabulator.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-analytics-tabulator.types/analytics-localization/arabic.d.ts +2 -0
- package/survey-analytics-tabulator.types/analytics-localization/dutch.d.ts +2 -0
- package/survey-analytics-tabulator.types/analytics-localization/english.d.ts +2 -0
- package/survey-analytics-tabulator.types/analytics-localization/farsi.d.ts +2 -0
- package/survey-analytics-tabulator.types/analytics-localization/finnish.d.ts +2 -0
- package/survey-analytics-tabulator.types/analytics-localization/french.d.ts +2 -0
- package/survey-analytics-tabulator.types/analytics-localization/german.d.ts +2 -0
- package/survey-analytics-tabulator.types/analytics-localization/italian.d.ts +2 -0
- package/survey-analytics-tabulator.types/analytics-localization/japanese.d.ts +2 -0
- package/survey-analytics-tabulator.types/analytics-localization/norwegian.d.ts +2 -0
- package/survey-analytics-tabulator.types/analytics-localization/polish.d.ts +2 -0
- package/survey-analytics-tabulator.types/analytics-localization/portuguese.d.ts +2 -0
- package/survey-analytics-tabulator.types/analytics-localization/russian.d.ts +2 -0
- package/survey-analytics-tabulator.types/analytics-localization/spanish.d.ts +2 -0
- package/survey-analytics-tabulator.types/analytics-localization/swedish.d.ts +2 -0
- package/survey-analytics-tabulator.types/localizationManager.d.ts +2 -0
- package/survey-analytics-tabulator.types/tables/table.d.ts +6 -2
- package/survey-analytics.types/alternativeVizualizersWrapper.d.ts +9 -1
- package/survey-analytics.types/analytics-localization/arabic.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/dutch.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/english.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/farsi.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/finnish.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/french.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/german.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/italian.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/japanese.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/norwegian.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/polish.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/portuguese.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/russian.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/spanish.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/swedish.d.ts +2 -0
- package/survey-analytics.types/localizationManager.d.ts +2 -0
- package/survey-analytics.types/selectBase.d.ts +1 -1
- package/survey-analytics.types/statistics-table.d.ts +11 -1
- package/survey-analytics.types/visualizationPanel.d.ts +1 -0
- package/survey-analytics.types/visualizerBase.d.ts +14 -0
- package/survey.analytics.core.css +1 -1
- package/survey.analytics.core.js +234 -59
- 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 +236 -60
- 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 +74 -3
- 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.5
|
|
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
|
*/
|
|
@@ -6925,12 +6925,15 @@ var AlternativeVisualizersWrapper = /** @class */ (function (_super) {
|
|
|
6925
6925
|
if (quiet === void 0) { quiet = false; }
|
|
6926
6926
|
var visualizerCandidate = this.visualizers.filter(function (v) { return v.type === type; })[0];
|
|
6927
6927
|
if (!!visualizerCandidate && visualizerCandidate !== this.visualizer) {
|
|
6928
|
+
var isFooterCollapsed = void 0;
|
|
6928
6929
|
if (!!this.visualizer) {
|
|
6930
|
+
isFooterCollapsed = this.visualizer.isFooterCollapsed;
|
|
6929
6931
|
this.visualizer.onStateChanged.remove(this.onVisualizerStateChangedCallback);
|
|
6930
6932
|
this.visualizer.onAfterRender.remove(this.onAfterVisualizerRenderCallback);
|
|
6931
6933
|
this.visualizer.destroy();
|
|
6932
6934
|
}
|
|
6933
6935
|
this.visualizer = visualizerCandidate;
|
|
6936
|
+
this.visualizer.isFooterCollapsed = isFooterCollapsed;
|
|
6934
6937
|
this.refresh();
|
|
6935
6938
|
this.visualizer.onAfterRender.add(this.onAfterVisualizerRenderCallback);
|
|
6936
6939
|
this.visualizer.onStateChanged.add(this.onVisualizerStateChangedCallback);
|
|
@@ -6984,6 +6987,7 @@ var AlternativeVisualizersWrapper = /** @class */ (function (_super) {
|
|
|
6984
6987
|
*
|
|
6985
6988
|
* > This method is overriden in descendant classes.
|
|
6986
6989
|
* @see setState
|
|
6990
|
+
* @see resetState
|
|
6987
6991
|
*/
|
|
6988
6992
|
AlternativeVisualizersWrapper.prototype.getState = function () {
|
|
6989
6993
|
var currentVisualizerState = this.visualizer.getState();
|
|
@@ -6998,8 +7002,8 @@ var AlternativeVisualizersWrapper = /** @class */ (function (_super) {
|
|
|
6998
7002
|
/**
|
|
6999
7003
|
* Sets the visualizer's state.
|
|
7000
7004
|
*
|
|
7001
|
-
* > This method is overriden in descendant classes.
|
|
7002
7005
|
* @see getState
|
|
7006
|
+
* @see resetState
|
|
7003
7007
|
*/
|
|
7004
7008
|
AlternativeVisualizersWrapper.prototype.setState = function (state) {
|
|
7005
7009
|
if (!!state.visualizer) {
|
|
@@ -7009,6 +7013,17 @@ var AlternativeVisualizersWrapper = /** @class */ (function (_super) {
|
|
|
7009
7013
|
this.visualizer.setState(state.state);
|
|
7010
7014
|
}
|
|
7011
7015
|
};
|
|
7016
|
+
/**
|
|
7017
|
+
* Resets the visualizer's state.
|
|
7018
|
+
*
|
|
7019
|
+
* @see getState
|
|
7020
|
+
* @see setState
|
|
7021
|
+
*/
|
|
7022
|
+
AlternativeVisualizersWrapper.prototype.resetState = function () {
|
|
7023
|
+
_super.prototype.resetState.call(this);
|
|
7024
|
+
this.visualizers.forEach(function (visualizer) { return visualizer.resetState(); });
|
|
7025
|
+
this.setVisualizer(this.visualizers[0].type, true);
|
|
7026
|
+
};
|
|
7012
7027
|
AlternativeVisualizersWrapper.prototype.getValues = function () {
|
|
7013
7028
|
return this.visualizer.getValues();
|
|
7014
7029
|
};
|
|
@@ -7192,6 +7207,10 @@ var arabicStrings = {
|
|
|
7192
7207
|
responses: "الاستجابات",
|
|
7193
7208
|
// [Auto-translated] "NPS"
|
|
7194
7209
|
visualizer_nps: "NPS",
|
|
7210
|
+
// [Auto-translated] "Chart"
|
|
7211
|
+
visualizer_boolean: "جدول",
|
|
7212
|
+
// [Auto-translated] "Table"
|
|
7213
|
+
visualizer_options: "جدول",
|
|
7195
7214
|
// [Auto-translated] "NPS"
|
|
7196
7215
|
npsScore: "NPS",
|
|
7197
7216
|
// [Auto-translated] "Promoters"
|
|
@@ -7372,6 +7391,10 @@ var dutchStrings = {
|
|
|
7372
7391
|
responses: "Reacties",
|
|
7373
7392
|
// [Auto-translated] "NPS"
|
|
7374
7393
|
visualizer_nps: "NPS",
|
|
7394
|
+
// [Auto-translated] "Chart"
|
|
7395
|
+
visualizer_boolean: "Zeekaart",
|
|
7396
|
+
// [Auto-translated] "Table"
|
|
7397
|
+
visualizer_options: "Tafel",
|
|
7375
7398
|
// [Auto-translated] "NPS"
|
|
7376
7399
|
npsScore: "NPS",
|
|
7377
7400
|
// [Auto-translated] "Promoters"
|
|
@@ -7481,6 +7504,8 @@ var englishStrings = {
|
|
|
7481
7504
|
statistics_chart: "Chart",
|
|
7482
7505
|
responses: "Responses",
|
|
7483
7506
|
visualizer_nps: "NPS",
|
|
7507
|
+
visualizer_boolean: "Chart",
|
|
7508
|
+
visualizer_options: "Table",
|
|
7484
7509
|
npsScore: "NPS",
|
|
7485
7510
|
npsPromoters: "Promoters",
|
|
7486
7511
|
npsPassives: "Passives",
|
|
@@ -7657,6 +7682,10 @@ var farsiStrings = {
|
|
|
7657
7682
|
responses: "پاسخ",
|
|
7658
7683
|
// [Auto-translated] "NPS"
|
|
7659
7684
|
visualizer_nps: "NPS",
|
|
7685
|
+
// [Auto-translated] "Chart"
|
|
7686
|
+
visualizer_boolean: "نمودار",
|
|
7687
|
+
// [Auto-translated] "Table"
|
|
7688
|
+
visualizer_options: "جدول",
|
|
7660
7689
|
// [Auto-translated] "NPS"
|
|
7661
7690
|
npsScore: "NPS",
|
|
7662
7691
|
// [Auto-translated] "Promoters"
|
|
@@ -7837,6 +7866,10 @@ var finnishStrings = {
|
|
|
7837
7866
|
responses: "Vastaukset",
|
|
7838
7867
|
// "NPS"
|
|
7839
7868
|
visualizer_nps: "NPS",
|
|
7869
|
+
// [Auto-translated] "Chart"
|
|
7870
|
+
visualizer_boolean: "Kaavio",
|
|
7871
|
+
// [Auto-translated] "Table"
|
|
7872
|
+
visualizer_options: "Pöytä",
|
|
7840
7873
|
// "NPS"
|
|
7841
7874
|
npsScore: "NPS",
|
|
7842
7875
|
// "Promoters"
|
|
@@ -8017,6 +8050,10 @@ var frenchStrings = {
|
|
|
8017
8050
|
responses: "Réponses",
|
|
8018
8051
|
// [Auto-translated] "NPS"
|
|
8019
8052
|
visualizer_nps: "Le NPS",
|
|
8053
|
+
// [Auto-translated] "Chart"
|
|
8054
|
+
visualizer_boolean: "Graphique",
|
|
8055
|
+
// [Auto-translated] "Table"
|
|
8056
|
+
visualizer_options: "Table",
|
|
8020
8057
|
// [Auto-translated] "NPS"
|
|
8021
8058
|
npsScore: "Le NPS",
|
|
8022
8059
|
// [Auto-translated] "Promoters"
|
|
@@ -8197,6 +8234,10 @@ var germanStrings = {
|
|
|
8197
8234
|
responses: "Antworten",
|
|
8198
8235
|
// [Auto-translated] "NPS"
|
|
8199
8236
|
visualizer_nps: "NPS (NPS)",
|
|
8237
|
+
// [Auto-translated] "Chart"
|
|
8238
|
+
visualizer_boolean: "Diagramm",
|
|
8239
|
+
// [Auto-translated] "Table"
|
|
8240
|
+
visualizer_options: "Tisch",
|
|
8200
8241
|
// [Auto-translated] "NPS"
|
|
8201
8242
|
npsScore: "NPS (NPS)",
|
|
8202
8243
|
// [Auto-translated] "Promoters"
|
|
@@ -8377,6 +8418,10 @@ var italianStrings = {
|
|
|
8377
8418
|
responses: "Risposte",
|
|
8378
8419
|
// [Auto-translated] "NPS"
|
|
8379
8420
|
visualizer_nps: "Rete nazionale di dati",
|
|
8421
|
+
// [Auto-translated] "Chart"
|
|
8422
|
+
visualizer_boolean: "Tabella",
|
|
8423
|
+
// [Auto-translated] "Table"
|
|
8424
|
+
visualizer_options: "Tavolo",
|
|
8380
8425
|
// [Auto-translated] "NPS"
|
|
8381
8426
|
npsScore: "Rete nazionale di dati",
|
|
8382
8427
|
// [Auto-translated] "Promoters"
|
|
@@ -8557,6 +8602,10 @@ var japaneseStrings = {
|
|
|
8557
8602
|
responses: "回答数",
|
|
8558
8603
|
// [Auto-translated] "NPS"
|
|
8559
8604
|
visualizer_nps: "NPSの",
|
|
8605
|
+
// [Auto-translated] "Chart"
|
|
8606
|
+
visualizer_boolean: "チャート",
|
|
8607
|
+
// [Auto-translated] "Table"
|
|
8608
|
+
visualizer_options: "テーブル",
|
|
8560
8609
|
// [Auto-translated] "NPS"
|
|
8561
8610
|
npsScore: "NPSの",
|
|
8562
8611
|
// [Auto-translated] "Promoters"
|
|
@@ -8737,6 +8786,10 @@ var norwegianStrings = {
|
|
|
8737
8786
|
responses: "Svar",
|
|
8738
8787
|
// [Auto-translated] "NPS"
|
|
8739
8788
|
visualizer_nps: "NPS",
|
|
8789
|
+
// [Auto-translated] "Chart"
|
|
8790
|
+
visualizer_boolean: "Sjøkart",
|
|
8791
|
+
// [Auto-translated] "Table"
|
|
8792
|
+
visualizer_options: "Bord",
|
|
8740
8793
|
// [Auto-translated] "NPS"
|
|
8741
8794
|
npsScore: "NPS",
|
|
8742
8795
|
// [Auto-translated] "Promoters"
|
|
@@ -8917,6 +8970,10 @@ var plStrings = {
|
|
|
8917
8970
|
responses: "Odpowiedzi",
|
|
8918
8971
|
// [Auto-translated] "NPS"
|
|
8919
8972
|
visualizer_nps: "Wskaźnik NPS",
|
|
8973
|
+
// [Auto-translated] "Chart"
|
|
8974
|
+
visualizer_boolean: "Wykres",
|
|
8975
|
+
// [Auto-translated] "Table"
|
|
8976
|
+
visualizer_options: "Stół",
|
|
8920
8977
|
// [Auto-translated] "NPS"
|
|
8921
8978
|
npsScore: "Wskaźnik NPS",
|
|
8922
8979
|
// [Auto-translated] "Promoters"
|
|
@@ -9097,6 +9154,10 @@ var portugueseStrings = {
|
|
|
9097
9154
|
responses: "Respostas",
|
|
9098
9155
|
// [Auto-translated] "NPS"
|
|
9099
9156
|
visualizer_nps: "NPS",
|
|
9157
|
+
// [Auto-translated] "Chart"
|
|
9158
|
+
visualizer_boolean: "Gráfico",
|
|
9159
|
+
// [Auto-translated] "Table"
|
|
9160
|
+
visualizer_options: "Mesa",
|
|
9100
9161
|
// [Auto-translated] "NPS"
|
|
9101
9162
|
npsScore: "NPS",
|
|
9102
9163
|
// [Auto-translated] "Promoters"
|
|
@@ -9277,6 +9338,10 @@ var russianStrings = {
|
|
|
9277
9338
|
responses: "ответов",
|
|
9278
9339
|
// [Auto-translated] "NPS"
|
|
9279
9340
|
visualizer_nps: "NPS",
|
|
9341
|
+
// [Auto-translated] "Chart"
|
|
9342
|
+
visualizer_boolean: "Диаграмма",
|
|
9343
|
+
// [Auto-translated] "Table"
|
|
9344
|
+
visualizer_options: "Стол",
|
|
9280
9345
|
// [Auto-translated] "NPS"
|
|
9281
9346
|
npsScore: "NPS",
|
|
9282
9347
|
// [Auto-translated] "Promoters"
|
|
@@ -9457,6 +9522,10 @@ var spanishStrings = {
|
|
|
9457
9522
|
responses: "Respuestas",
|
|
9458
9523
|
// [Auto-translated] "NPS"
|
|
9459
9524
|
visualizer_nps: "NPS",
|
|
9525
|
+
// [Auto-translated] "Chart"
|
|
9526
|
+
visualizer_boolean: "Gráfico",
|
|
9527
|
+
// [Auto-translated] "Table"
|
|
9528
|
+
visualizer_options: "Mesa",
|
|
9460
9529
|
// [Auto-translated] "NPS"
|
|
9461
9530
|
npsScore: "NPS",
|
|
9462
9531
|
// [Auto-translated] "Promoters"
|
|
@@ -9637,6 +9706,10 @@ var swedishStrings = {
|
|
|
9637
9706
|
responses: "Svar",
|
|
9638
9707
|
// "NPS"
|
|
9639
9708
|
visualizer_nps: "NPS",
|
|
9709
|
+
// [Auto-translated] "Chart"
|
|
9710
|
+
visualizer_boolean: "Diagram",
|
|
9711
|
+
// [Auto-translated] "Table"
|
|
9712
|
+
visualizer_options: "Bord",
|
|
9640
9713
|
// "NPS"
|
|
9641
9714
|
npsScore: "NPS",
|
|
9642
9715
|
// "Promoters"
|
|
@@ -9919,6 +9992,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9919
9992
|
/* harmony export */ SelectBase: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_17__.SelectBase),
|
|
9920
9993
|
/* harmony export */ StatisticsTable: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_32__.StatisticsTable),
|
|
9921
9994
|
/* harmony export */ StatisticsTableAdapter: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_32__.StatisticsTableAdapter),
|
|
9995
|
+
/* harmony export */ StatisticsTableBoolean: () => (/* reexport safe */ _statistics_table__WEBPACK_IMPORTED_MODULE_32__.StatisticsTableBoolean),
|
|
9922
9996
|
/* harmony export */ Text: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_31__.Text),
|
|
9923
9997
|
/* harmony export */ TextTableAdapter: () => (/* reexport safe */ _text__WEBPACK_IMPORTED_MODULE_31__.TextTableAdapter),
|
|
9924
9998
|
/* harmony export */ VisualizationManager: () => (/* reexport safe */ _visualizationManager__WEBPACK_IMPORTED_MODULE_23__.VisualizationManager),
|
|
@@ -10270,7 +10344,7 @@ var HistogramModel = /** @class */ (function (_super) {
|
|
|
10270
10344
|
|
|
10271
10345
|
_visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("date", HistogramModel);
|
|
10272
10346
|
_visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("number", HistogramModel, 100);
|
|
10273
|
-
_visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("rating", HistogramModel,
|
|
10347
|
+
_visualizationManager__WEBPACK_IMPORTED_MODULE_4__.VisualizationManager.registerVisualizer("rating", HistogramModel, 300);
|
|
10274
10348
|
|
|
10275
10349
|
|
|
10276
10350
|
/***/ }),
|
|
@@ -11748,7 +11822,7 @@ var PlotlyChartAdapter = /** @class */ (function () {
|
|
|
11748
11822
|
case 0: return [4 /*yield*/, this.update(chartNode)];
|
|
11749
11823
|
case 1:
|
|
11750
11824
|
_a = _b.sent(), plot = _a[0], plotlyOptions = _a[1];
|
|
11751
|
-
if (this.model instanceof _selectBase__WEBPACK_IMPORTED_MODULE_2__.SelectBase) {
|
|
11825
|
+
if (this.model instanceof _selectBase__WEBPACK_IMPORTED_MODULE_2__.SelectBase && this.model.supportSelection) {
|
|
11752
11826
|
_model_1 = this.model;
|
|
11753
11827
|
chartNode["on"]("plotly_click", function (data) {
|
|
11754
11828
|
var _a;
|
|
@@ -12694,7 +12768,6 @@ var SelectBase = /** @class */ (function (_super) {
|
|
|
12694
12768
|
_this._showOnlyPercentages = false;
|
|
12695
12769
|
_this._percentagePrecision = 0;
|
|
12696
12770
|
_this._answersOrder = "default";
|
|
12697
|
-
_this._supportSelection = true;
|
|
12698
12771
|
_this._hideEmptyAnswers = false;
|
|
12699
12772
|
_this._topN = -1;
|
|
12700
12773
|
_this.topNValues = [].concat(SelectBase.topNValuesDefaults);
|
|
@@ -12714,6 +12787,7 @@ var SelectBase = /** @class */ (function (_super) {
|
|
|
12714
12787
|
_this.dataProvider.raiseDataChanged();
|
|
12715
12788
|
};
|
|
12716
12789
|
}
|
|
12790
|
+
_this._supportSelection = true;
|
|
12717
12791
|
_this._showPercentages = _this.options.showPercentages === true;
|
|
12718
12792
|
_this._showOnlyPercentages = _this.options.showOnlyPercentages === true;
|
|
12719
12793
|
if (_this.options.percentagePrecision) {
|
|
@@ -13287,6 +13361,18 @@ var SelectBase = /** @class */ (function (_super) {
|
|
|
13287
13361
|
var selectedItem = survey_core__WEBPACK_IMPORTED_MODULE_1__.ItemValue.getItemByValue(this.question.visibleChoices, state.filter);
|
|
13288
13362
|
this.setSelection(selectedItem !== null && selectedItem !== void 0 ? selectedItem : undefined);
|
|
13289
13363
|
};
|
|
13364
|
+
SelectBase.prototype.resetState = function () {
|
|
13365
|
+
_super.prototype.resetState.call(this);
|
|
13366
|
+
// this._showPercentages = this.options.showPercentages === true;
|
|
13367
|
+
// this._showOnlyPercentages = this.options.showOnlyPercentages === true;
|
|
13368
|
+
// this._showMissingAnswers = this.isSupportMissingAnswers() && this.options.showMissingAnswers === true;
|
|
13369
|
+
// this._transposeData = this.options.transposeData || false;
|
|
13370
|
+
this._hideEmptyAnswers = this.options.hideEmptyAnswers === true;
|
|
13371
|
+
this._answersOrder = this.options.answersOrder || "default";
|
|
13372
|
+
this._topN = -1;
|
|
13373
|
+
this.chartType = this.chartTypes[0];
|
|
13374
|
+
this.setSelection(undefined);
|
|
13375
|
+
};
|
|
13290
13376
|
SelectBase.topNValuesDefaults = [-1, 5, 10, 20];
|
|
13291
13377
|
SelectBase._stateProperties = ["chartType", "answersOrder", "hideEmptyAnswers", "topN"];
|
|
13292
13378
|
return SelectBase;
|
|
@@ -13297,6 +13383,7 @@ _visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.register
|
|
|
13297
13383
|
_visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.registerVisualizer("dropdown", SelectBase);
|
|
13298
13384
|
_visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.registerVisualizer("imagepicker", SelectBase);
|
|
13299
13385
|
_visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.registerVisualizer("tagbox", SelectBase);
|
|
13386
|
+
_visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.registerVisualizer("rating", SelectBase, 100);
|
|
13300
13387
|
|
|
13301
13388
|
|
|
13302
13389
|
/***/ }),
|
|
@@ -13454,14 +13541,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13454
13541
|
__webpack_require__.r(__webpack_exports__);
|
|
13455
13542
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13456
13543
|
/* harmony export */ StatisticsTable: () => (/* binding */ StatisticsTable),
|
|
13457
|
-
/* harmony export */ StatisticsTableAdapter: () => (/* binding */ StatisticsTableAdapter)
|
|
13544
|
+
/* harmony export */ StatisticsTableAdapter: () => (/* binding */ StatisticsTableAdapter),
|
|
13545
|
+
/* harmony export */ StatisticsTableBoolean: () => (/* binding */ StatisticsTableBoolean)
|
|
13458
13546
|
/* harmony export */ });
|
|
13459
13547
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
|
|
13460
13548
|
/* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectBase */ "./src/selectBase.ts");
|
|
13461
|
-
/* harmony import */ var
|
|
13462
|
-
/* harmony import */ var
|
|
13549
|
+
/* harmony import */ var _boolean__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./boolean */ "./src/boolean.ts");
|
|
13550
|
+
/* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
|
|
13463
13551
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "./src/utils/index.ts");
|
|
13464
|
-
/* harmony import */ var
|
|
13552
|
+
/* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
|
|
13553
|
+
/* harmony import */ var _statistics_table_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./statistics-table.scss */ "./src/statistics-table.scss");
|
|
13554
|
+
|
|
13465
13555
|
|
|
13466
13556
|
|
|
13467
13557
|
|
|
@@ -13483,7 +13573,7 @@ var StatisticsTableAdapter = /** @class */ (function () {
|
|
|
13483
13573
|
_a = _b.sent(), datasets = _a.datasets, labels = _a.labels, colors = _a.colors, texts = _a.texts, seriesLabels = _a.seriesLabels;
|
|
13484
13574
|
hasSeries = seriesLabels.length > 1;
|
|
13485
13575
|
emptyTextNode = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("p", "", {
|
|
13486
|
-
innerText:
|
|
13576
|
+
innerText: _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("noResults"),
|
|
13487
13577
|
});
|
|
13488
13578
|
if (datasets.length === 0 || datasets[0].length === 0) {
|
|
13489
13579
|
container.appendChild(emptyTextNode);
|
|
@@ -13495,19 +13585,19 @@ var StatisticsTableAdapter = /** @class */ (function () {
|
|
|
13495
13585
|
container.appendChild(tableNode);
|
|
13496
13586
|
var headerRow = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("tr");
|
|
13497
13587
|
var labelCell = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("th", "sa-statistics-table__cell-header", {
|
|
13498
|
-
textContent:
|
|
13588
|
+
textContent: _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("answer"),
|
|
13499
13589
|
});
|
|
13500
13590
|
headerRow.appendChild(labelCell);
|
|
13501
13591
|
var sparklineCell = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("th", "sa-statistics-table__cell-header", {
|
|
13502
|
-
textContent:
|
|
13592
|
+
textContent: _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("statistics_chart"),
|
|
13503
13593
|
});
|
|
13504
13594
|
headerRow.appendChild(sparklineCell);
|
|
13505
13595
|
var percentCell = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("th", "sa-statistics-table__cell-header", {
|
|
13506
|
-
textContent:
|
|
13596
|
+
textContent: _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("percentage"),
|
|
13507
13597
|
});
|
|
13508
13598
|
headerRow.appendChild(percentCell);
|
|
13509
13599
|
var valueCell = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("th", "sa-statistics-table__cell-header", {
|
|
13510
|
-
textContent:
|
|
13600
|
+
textContent: _localizationManager__WEBPACK_IMPORTED_MODULE_5__.localization.getString("responses"),
|
|
13511
13601
|
});
|
|
13512
13602
|
headerRow.appendChild(valueCell);
|
|
13513
13603
|
tableNode.appendChild(headerRow);
|
|
@@ -13584,9 +13674,46 @@ var StatisticsTable = /** @class */ (function (_super) {
|
|
|
13584
13674
|
return StatisticsTable;
|
|
13585
13675
|
}(_selectBase__WEBPACK_IMPORTED_MODULE_1__.SelectBase));
|
|
13586
13676
|
|
|
13587
|
-
|
|
13588
|
-
|
|
13589
|
-
|
|
13677
|
+
var StatisticsTableBoolean = /** @class */ (function (_super) {
|
|
13678
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(StatisticsTableBoolean, _super);
|
|
13679
|
+
function StatisticsTableBoolean(question, data, options, name) {
|
|
13680
|
+
var _this = _super.call(this, question, data, options, name || "options") || this;
|
|
13681
|
+
_this._statisticsTableAdapter = new StatisticsTableAdapter(_this);
|
|
13682
|
+
_this.showPercentages = true;
|
|
13683
|
+
return _this;
|
|
13684
|
+
}
|
|
13685
|
+
StatisticsTableBoolean.prototype.destroyContent = function (container) {
|
|
13686
|
+
this._statisticsTableAdapter.destroy(container);
|
|
13687
|
+
_super.prototype.destroyContent.call(this, container);
|
|
13688
|
+
};
|
|
13689
|
+
StatisticsTableBoolean.prototype.renderContentAsync = function (container) {
|
|
13690
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
|
|
13691
|
+
var tableNode;
|
|
13692
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
|
|
13693
|
+
switch (_a.label) {
|
|
13694
|
+
case 0:
|
|
13695
|
+
tableNode = _utils__WEBPACK_IMPORTED_MODULE_4__.DocumentHelper.createElement("div");
|
|
13696
|
+
return [4 /*yield*/, this._statisticsTableAdapter.create(tableNode)];
|
|
13697
|
+
case 1:
|
|
13698
|
+
_a.sent();
|
|
13699
|
+
container.innerHTML = "";
|
|
13700
|
+
container.appendChild(tableNode);
|
|
13701
|
+
return [2 /*return*/, container];
|
|
13702
|
+
}
|
|
13703
|
+
});
|
|
13704
|
+
});
|
|
13705
|
+
};
|
|
13706
|
+
StatisticsTableBoolean.prototype.destroy = function () {
|
|
13707
|
+
this._statisticsTableAdapter.destroy(this.contentContainer);
|
|
13708
|
+
_super.prototype.destroy.call(this);
|
|
13709
|
+
};
|
|
13710
|
+
return StatisticsTableBoolean;
|
|
13711
|
+
}(_boolean__WEBPACK_IMPORTED_MODULE_2__.BooleanModel));
|
|
13712
|
+
|
|
13713
|
+
_visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("radiogroup", StatisticsTable);
|
|
13714
|
+
_visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("dropdown", StatisticsTable);
|
|
13715
|
+
_visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("checkbox", StatisticsTable);
|
|
13716
|
+
_visualizationManager__WEBPACK_IMPORTED_MODULE_3__.VisualizationManager.registerVisualizer("boolean", StatisticsTableBoolean);
|
|
13590
13717
|
|
|
13591
13718
|
|
|
13592
13719
|
/***/ }),
|
|
@@ -14285,7 +14412,7 @@ var VisualizationManager = /** @class */ (function () {
|
|
|
14285
14412
|
if (constructor) {
|
|
14286
14413
|
var visualizers = VisualizationManager.vizualizers[qType];
|
|
14287
14414
|
if (!!visualizers) {
|
|
14288
|
-
var vDescr = visualizers.filter(function (v) { return v.ctor === constructor
|
|
14415
|
+
var vDescr = visualizers.filter(function (v) { return v.ctor === constructor; })[0];
|
|
14289
14416
|
if (!!vDescr) {
|
|
14290
14417
|
var index = visualizers.indexOf(vDescr);
|
|
14291
14418
|
if (index !== -1) {
|
|
@@ -14714,48 +14841,52 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
14714
14841
|
return (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.createCommercialLicenseLink)();
|
|
14715
14842
|
});
|
|
14716
14843
|
}
|
|
14717
|
-
_this.
|
|
14718
|
-
|
|
14719
|
-
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
|
-
|
|
14725
|
-
|
|
14844
|
+
_this._supportSelection = true;
|
|
14845
|
+
if (_this.supportSelection !== false) {
|
|
14846
|
+
_this.registerToolbarItem("resetFilter", function () {
|
|
14847
|
+
return _utils_index__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createButton(function () {
|
|
14848
|
+
_this.visualizers.forEach(function (visualizer) {
|
|
14849
|
+
if (visualizer instanceof _selectBase__WEBPACK_IMPORTED_MODULE_3__.SelectBase || visualizer instanceof _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_4__.AlternativeVisualizersWrapper) {
|
|
14850
|
+
visualizer.setSelection(undefined);
|
|
14851
|
+
}
|
|
14852
|
+
});
|
|
14853
|
+
}, _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("resetFilter"));
|
|
14854
|
+
}, 900);
|
|
14855
|
+
}
|
|
14726
14856
|
_this.registerToolbarItem("addElement", function (toolbar) {
|
|
14727
14857
|
if (_this.allowHideQuestions) {
|
|
14728
14858
|
var addElementSelector_1 = undefined;
|
|
14729
14859
|
var addElementSelectorUpdater = function (panel, options) {
|
|
14730
14860
|
var hiddenElements = _this.hiddenElements;
|
|
14861
|
+
var selectWrapper = _utils_index__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createSelector([
|
|
14862
|
+
{
|
|
14863
|
+
name: undefined,
|
|
14864
|
+
displayName: _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("addElement"),
|
|
14865
|
+
},
|
|
14866
|
+
]
|
|
14867
|
+
.concat(hiddenElements)
|
|
14868
|
+
.map(function (element) {
|
|
14869
|
+
return {
|
|
14870
|
+
value: element.name,
|
|
14871
|
+
text: element.displayName,
|
|
14872
|
+
};
|
|
14873
|
+
}), function (option) { return false; }, function (e) {
|
|
14874
|
+
_this.showElement(e.target.value);
|
|
14875
|
+
});
|
|
14876
|
+
if (addElementSelector_1) {
|
|
14877
|
+
toolbar.replaceChild(selectWrapper, addElementSelector_1);
|
|
14878
|
+
}
|
|
14879
|
+
addElementSelector_1 = selectWrapper;
|
|
14731
14880
|
if (hiddenElements.length > 0) {
|
|
14732
|
-
|
|
14733
|
-
{
|
|
14734
|
-
name: undefined,
|
|
14735
|
-
displayName: _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("addElement"),
|
|
14736
|
-
},
|
|
14737
|
-
]
|
|
14738
|
-
.concat(hiddenElements)
|
|
14739
|
-
.map(function (element) {
|
|
14740
|
-
return {
|
|
14741
|
-
value: element.name,
|
|
14742
|
-
text: element.displayName,
|
|
14743
|
-
};
|
|
14744
|
-
}), function (option) { return false; }, function (e) {
|
|
14745
|
-
_this.showElement(e.target.value);
|
|
14746
|
-
});
|
|
14747
|
-
(addElementSelector_1 &&
|
|
14748
|
-
toolbar.replaceChild(selectWrapper, addElementSelector_1)) ||
|
|
14749
|
-
toolbar.appendChild(selectWrapper);
|
|
14750
|
-
addElementSelector_1 = selectWrapper;
|
|
14881
|
+
addElementSelector_1.style.display = undefined;
|
|
14751
14882
|
}
|
|
14752
|
-
else {
|
|
14753
|
-
addElementSelector_1
|
|
14754
|
-
addElementSelector_1 = undefined;
|
|
14883
|
+
else if (addElementSelector_1) {
|
|
14884
|
+
addElementSelector_1.style.display = "none";
|
|
14755
14885
|
}
|
|
14756
14886
|
};
|
|
14757
14887
|
addElementSelectorUpdater(_this, {});
|
|
14758
14888
|
_this.onVisibleElementsChanged.add(addElementSelectorUpdater);
|
|
14889
|
+
return addElementSelector_1;
|
|
14759
14890
|
}
|
|
14760
14891
|
return undefined;
|
|
14761
14892
|
});
|
|
@@ -15278,6 +15409,18 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
15278
15409
|
enumerable: false,
|
|
15279
15410
|
configurable: true
|
|
15280
15411
|
});
|
|
15412
|
+
VisualizationPanel.prototype.resetState = function () {
|
|
15413
|
+
this._settingState = true;
|
|
15414
|
+
_super.prototype.resetState.call(this);
|
|
15415
|
+
try {
|
|
15416
|
+
this.visualizers.forEach(function (visualizer) { return visualizer.resetState(); });
|
|
15417
|
+
this.locale = survey_core__WEBPACK_IMPORTED_MODULE_1__.surveyLocalization.defaultLocale;
|
|
15418
|
+
}
|
|
15419
|
+
finally {
|
|
15420
|
+
this._settingState = false;
|
|
15421
|
+
}
|
|
15422
|
+
this.refresh();
|
|
15423
|
+
};
|
|
15281
15424
|
Object.defineProperty(VisualizationPanel.prototype, "permissions", {
|
|
15282
15425
|
get: function () {
|
|
15283
15426
|
return this._elements.map(function (element) {
|
|
@@ -15511,6 +15654,7 @@ var VisualizerBase = /** @class */ (function () {
|
|
|
15511
15654
|
this.footerContainer = undefined;
|
|
15512
15655
|
this._supportSelection = false;
|
|
15513
15656
|
this._chartAdapter = undefined;
|
|
15657
|
+
this._footerIsCollapsed = undefined;
|
|
15514
15658
|
/**
|
|
15515
15659
|
* An event that is raised after the visualizer's content is rendered.
|
|
15516
15660
|
*
|
|
@@ -15682,9 +15826,9 @@ var VisualizerBase = /** @class */ (function () {
|
|
|
15682
15826
|
* Indicates whether users can select series points to cross-filter charts. To allow or disallow selection, set the [`allowSelection`](https://surveyjs.io/dashboard/documentation/api-reference/ivisualizationpaneloptions#allowSelection) property of the `IVisualizationPanelOptions` object in the [`VisualizationPanel`](https://surveyjs.io/dashboard/documentation/api-reference/visualizationpanel) constructor.
|
|
15683
15827
|
*/
|
|
15684
15828
|
get: function () {
|
|
15685
|
-
return (
|
|
15829
|
+
return (this.options.allowSelection === undefined ||
|
|
15686
15830
|
this.options.allowSelection) &&
|
|
15687
|
-
this._supportSelection
|
|
15831
|
+
this._supportSelection;
|
|
15688
15832
|
},
|
|
15689
15833
|
enumerable: false,
|
|
15690
15834
|
configurable: true
|
|
@@ -15960,6 +16104,19 @@ var VisualizerBase = /** @class */ (function () {
|
|
|
15960
16104
|
VisualizerBase.prototype.destroyFooter = function (container) {
|
|
15961
16105
|
container.innerHTML = "";
|
|
15962
16106
|
};
|
|
16107
|
+
Object.defineProperty(VisualizerBase.prototype, "isFooterCollapsed", {
|
|
16108
|
+
get: function () {
|
|
16109
|
+
if (this._footerIsCollapsed === undefined) {
|
|
16110
|
+
this._footerIsCollapsed = VisualizerBase.otherCommentCollapsed;
|
|
16111
|
+
}
|
|
16112
|
+
return this._footerIsCollapsed;
|
|
16113
|
+
},
|
|
16114
|
+
set: function (newVal) {
|
|
16115
|
+
this._footerIsCollapsed = newVal;
|
|
16116
|
+
},
|
|
16117
|
+
enumerable: false,
|
|
16118
|
+
configurable: true
|
|
16119
|
+
});
|
|
15963
16120
|
VisualizerBase.prototype.renderFooter = function (container) {
|
|
15964
16121
|
var _this = this;
|
|
15965
16122
|
container.innerHTML = "";
|
|
@@ -15967,20 +16124,21 @@ var VisualizerBase = /** @class */ (function () {
|
|
|
15967
16124
|
var footerTitleElement = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createElement("h4", "sa-visualizer__footer-title", { innerText: _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("otherCommentTitle") });
|
|
15968
16125
|
container.appendChild(footerTitleElement);
|
|
15969
16126
|
var footerContentElement_1 = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createElement("div", "sa-visualizer__footer-content");
|
|
15970
|
-
footerContentElement_1.style.display =
|
|
15971
|
-
|
|
15972
|
-
: "block";
|
|
16127
|
+
footerContentElement_1.style.display = this.isFooterCollapsed ? "none" : "block";
|
|
16128
|
+
var visibilityButtonText = _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString(this.isFooterCollapsed ? "showButton" : "hideButton");
|
|
15973
16129
|
var visibilityButton_1 = _utils__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createButton(function () {
|
|
15974
16130
|
if (footerContentElement_1.style.display === "none") {
|
|
15975
16131
|
footerContentElement_1.style.display = "block";
|
|
15976
16132
|
visibilityButton_1.innerText = _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("hideButton");
|
|
16133
|
+
_this._footerIsCollapsed = false;
|
|
15977
16134
|
}
|
|
15978
16135
|
else {
|
|
15979
16136
|
footerContentElement_1.style.display = "none";
|
|
15980
|
-
visibilityButton_1.innerText = _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString(
|
|
16137
|
+
visibilityButton_1.innerText = _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("showButton");
|
|
16138
|
+
_this._footerIsCollapsed = true;
|
|
15981
16139
|
}
|
|
15982
16140
|
_this.footerVisualizer.invokeOnUpdate();
|
|
15983
|
-
},
|
|
16141
|
+
}, visibilityButtonText /*, "sa-toolbar__button--right"*/);
|
|
15984
16142
|
container.appendChild(visibilityButton_1);
|
|
15985
16143
|
container.appendChild(footerContentElement_1);
|
|
15986
16144
|
this.footerVisualizer.render(footerContentElement_1);
|
|
@@ -16190,6 +16348,7 @@ var VisualizerBase = /** @class */ (function () {
|
|
|
16190
16348
|
*
|
|
16191
16349
|
* > This method is overriden in classes descendant from `VisualizerBase`.
|
|
16192
16350
|
* @see setState
|
|
16351
|
+
* @see resetState
|
|
16193
16352
|
* @see onStateChanged
|
|
16194
16353
|
*/
|
|
16195
16354
|
VisualizerBase.prototype.getState = function () {
|
|
@@ -16202,10 +16361,21 @@ var VisualizerBase = /** @class */ (function () {
|
|
|
16202
16361
|
*
|
|
16203
16362
|
* > This method is overriden in classes descendant from `VisualizerBase`.
|
|
16204
16363
|
* @see getState
|
|
16364
|
+
* @see resetState
|
|
16205
16365
|
* @see onStateChanged
|
|
16206
16366
|
*/
|
|
16207
16367
|
VisualizerBase.prototype.setState = function (state) {
|
|
16208
16368
|
};
|
|
16369
|
+
/**
|
|
16370
|
+
* Resets the visualizer's state.
|
|
16371
|
+
*
|
|
16372
|
+
* > This method is overriden in classes descendant from `VisualizerBase`.
|
|
16373
|
+
* @see getState
|
|
16374
|
+
* @see setState
|
|
16375
|
+
* @see onStateChanged
|
|
16376
|
+
*/
|
|
16377
|
+
VisualizerBase.prototype.resetState = function () {
|
|
16378
|
+
};
|
|
16209
16379
|
Object.defineProperty(VisualizerBase.prototype, "locale", {
|
|
16210
16380
|
/**
|
|
16211
16381
|
* Gets or sets the current locale.
|
|
@@ -16305,14 +16475,19 @@ var VisualizerFactory = /** @class */ (function () {
|
|
|
16305
16475
|
* @param options An object with any custom properties you need within the visualizer.
|
|
16306
16476
|
*/
|
|
16307
16477
|
VisualizerFactory.createVisualizer = function (question, data, options) {
|
|
16308
|
-
var type;
|
|
16309
|
-
|
|
16478
|
+
var type = question.getType();
|
|
16479
|
+
var creators = [];
|
|
16480
|
+
if (type === "text" && question.inputType) {
|
|
16310
16481
|
type = question.inputType;
|
|
16482
|
+
creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_0__.VisualizationManager.getVisualizersByType(type);
|
|
16483
|
+
if (creators === undefined || creators.length == 0) {
|
|
16484
|
+
type = "text";
|
|
16485
|
+
creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_0__.VisualizationManager.getVisualizersByType(type);
|
|
16486
|
+
}
|
|
16311
16487
|
}
|
|
16312
16488
|
else {
|
|
16313
|
-
|
|
16489
|
+
creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_0__.VisualizationManager.getVisualizersByType(type);
|
|
16314
16490
|
}
|
|
16315
|
-
var creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_0__.VisualizationManager.getVisualizersByType(type);
|
|
16316
16491
|
var visualizers = creators.map(function (creator) { return new creator(question, data, options); });
|
|
16317
16492
|
if (visualizers.length > 1) {
|
|
16318
16493
|
var alternativesVisualizerConstructor = _visualizationManager__WEBPACK_IMPORTED_MODULE_0__.VisualizationManager.getAltVisualizerSelector();
|
|
@@ -18266,6 +18441,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18266
18441
|
/* harmony export */ SelectBasePlotly: () => (/* reexport safe */ _plotly_index__WEBPACK_IMPORTED_MODULE_0__.SelectBasePlotly),
|
|
18267
18442
|
/* harmony export */ StatisticsTable: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.StatisticsTable),
|
|
18268
18443
|
/* harmony export */ StatisticsTableAdapter: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.StatisticsTableAdapter),
|
|
18444
|
+
/* harmony export */ StatisticsTableBoolean: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.StatisticsTableBoolean),
|
|
18269
18445
|
/* harmony export */ Text: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.Text),
|
|
18270
18446
|
/* harmony export */ TextTableAdapter: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.TextTableAdapter),
|
|
18271
18447
|
/* harmony export */ VisualizationManager: () => (/* reexport safe */ _summary_core__WEBPACK_IMPORTED_MODULE_1__.VisualizationManager),
|