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/fesm/shared2.mjs
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
|
*/
|
|
@@ -189,7 +189,7 @@ class VisualizationManager {
|
|
|
189
189
|
if (constructor) {
|
|
190
190
|
let visualizers = VisualizationManager.vizualizers[qType];
|
|
191
191
|
if (!!visualizers) {
|
|
192
|
-
const vDescr = visualizers.filter(v => v.ctor === constructor
|
|
192
|
+
const vDescr = visualizers.filter(v => v.ctor === constructor)[0];
|
|
193
193
|
if (!!vDescr) {
|
|
194
194
|
let index = visualizers.indexOf(vDescr);
|
|
195
195
|
if (index !== -1) {
|
|
@@ -277,14 +277,19 @@ class VisualizerFactory {
|
|
|
277
277
|
* @param options An object with any custom properties you need within the visualizer.
|
|
278
278
|
*/
|
|
279
279
|
static createVisualizer(question, data, options) {
|
|
280
|
-
let type;
|
|
281
|
-
|
|
280
|
+
let type = question.getType();
|
|
281
|
+
let creators = [];
|
|
282
|
+
if (type === "text" && question.inputType) {
|
|
282
283
|
type = question.inputType;
|
|
284
|
+
creators = VisualizationManager.getVisualizersByType(type);
|
|
285
|
+
if (creators === undefined || creators.length == 0) {
|
|
286
|
+
type = "text";
|
|
287
|
+
creators = VisualizationManager.getVisualizersByType(type);
|
|
288
|
+
}
|
|
283
289
|
}
|
|
284
290
|
else {
|
|
285
|
-
|
|
291
|
+
creators = VisualizationManager.getVisualizersByType(type);
|
|
286
292
|
}
|
|
287
|
-
var creators = VisualizationManager.getVisualizersByType(type);
|
|
288
293
|
var visualizers = creators.map((creator) => new creator(question, data, options));
|
|
289
294
|
if (visualizers.length > 1) {
|
|
290
295
|
const alternativesVisualizerConstructor = VisualizationManager.getAltVisualizerSelector();
|
|
@@ -474,6 +479,7 @@ class VisualizerBase {
|
|
|
474
479
|
this.footerContainer = undefined;
|
|
475
480
|
this._supportSelection = false;
|
|
476
481
|
this._chartAdapter = undefined;
|
|
482
|
+
this._footerIsCollapsed = undefined;
|
|
477
483
|
/**
|
|
478
484
|
* An event that is raised after the visualizer's content is rendered.
|
|
479
485
|
*
|
|
@@ -607,9 +613,9 @@ class VisualizerBase {
|
|
|
607
613
|
* 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.
|
|
608
614
|
*/
|
|
609
615
|
get supportSelection() {
|
|
610
|
-
return (
|
|
616
|
+
return (this.options.allowSelection === undefined ||
|
|
611
617
|
this.options.allowSelection) &&
|
|
612
|
-
this._supportSelection
|
|
618
|
+
this._supportSelection;
|
|
613
619
|
}
|
|
614
620
|
getSeriesValues() {
|
|
615
621
|
return this.options.seriesValues || [];
|
|
@@ -855,26 +861,36 @@ class VisualizerBase {
|
|
|
855
861
|
destroyFooter(container) {
|
|
856
862
|
container.innerHTML = "";
|
|
857
863
|
}
|
|
864
|
+
get isFooterCollapsed() {
|
|
865
|
+
if (this._footerIsCollapsed === undefined) {
|
|
866
|
+
this._footerIsCollapsed = VisualizerBase.otherCommentCollapsed;
|
|
867
|
+
}
|
|
868
|
+
return this._footerIsCollapsed;
|
|
869
|
+
}
|
|
870
|
+
set isFooterCollapsed(newVal) {
|
|
871
|
+
this._footerIsCollapsed = newVal;
|
|
872
|
+
}
|
|
858
873
|
renderFooter(container) {
|
|
859
874
|
container.innerHTML = "";
|
|
860
875
|
if (this.hasFooter) {
|
|
861
876
|
const footerTitleElement = DocumentHelper.createElement("h4", "sa-visualizer__footer-title", { innerText: localization.getString("otherCommentTitle") });
|
|
862
877
|
container.appendChild(footerTitleElement);
|
|
863
878
|
const footerContentElement = DocumentHelper.createElement("div", "sa-visualizer__footer-content");
|
|
864
|
-
footerContentElement.style.display =
|
|
865
|
-
|
|
866
|
-
: "block";
|
|
879
|
+
footerContentElement.style.display = this.isFooterCollapsed ? "none" : "block";
|
|
880
|
+
const visibilityButtonText = localization.getString(this.isFooterCollapsed ? "showButton" : "hideButton");
|
|
867
881
|
const visibilityButton = DocumentHelper.createButton(() => {
|
|
868
882
|
if (footerContentElement.style.display === "none") {
|
|
869
883
|
footerContentElement.style.display = "block";
|
|
870
884
|
visibilityButton.innerText = localization.getString("hideButton");
|
|
885
|
+
this._footerIsCollapsed = false;
|
|
871
886
|
}
|
|
872
887
|
else {
|
|
873
888
|
footerContentElement.style.display = "none";
|
|
874
|
-
visibilityButton.innerText = localization.getString(
|
|
889
|
+
visibilityButton.innerText = localization.getString("showButton");
|
|
890
|
+
this._footerIsCollapsed = true;
|
|
875
891
|
}
|
|
876
892
|
this.footerVisualizer.invokeOnUpdate();
|
|
877
|
-
},
|
|
893
|
+
}, visibilityButtonText /*, "sa-toolbar__button--right"*/);
|
|
878
894
|
container.appendChild(visibilityButton);
|
|
879
895
|
container.appendChild(footerContentElement);
|
|
880
896
|
this.footerVisualizer.render(footerContentElement);
|
|
@@ -1072,6 +1088,7 @@ class VisualizerBase {
|
|
|
1072
1088
|
*
|
|
1073
1089
|
* > This method is overriden in classes descendant from `VisualizerBase`.
|
|
1074
1090
|
* @see setState
|
|
1091
|
+
* @see resetState
|
|
1075
1092
|
* @see onStateChanged
|
|
1076
1093
|
*/
|
|
1077
1094
|
getState() {
|
|
@@ -1084,10 +1101,21 @@ class VisualizerBase {
|
|
|
1084
1101
|
*
|
|
1085
1102
|
* > This method is overriden in classes descendant from `VisualizerBase`.
|
|
1086
1103
|
* @see getState
|
|
1104
|
+
* @see resetState
|
|
1087
1105
|
* @see onStateChanged
|
|
1088
1106
|
*/
|
|
1089
1107
|
setState(state) {
|
|
1090
1108
|
}
|
|
1109
|
+
/**
|
|
1110
|
+
* Resets the visualizer's state.
|
|
1111
|
+
*
|
|
1112
|
+
* > This method is overriden in classes descendant from `VisualizerBase`.
|
|
1113
|
+
* @see getState
|
|
1114
|
+
* @see setState
|
|
1115
|
+
* @see onStateChanged
|
|
1116
|
+
*/
|
|
1117
|
+
resetState() {
|
|
1118
|
+
}
|
|
1091
1119
|
/**
|
|
1092
1120
|
* Gets or sets the current locale.
|
|
1093
1121
|
*
|
|
@@ -1316,7 +1344,6 @@ class SelectBase extends VisualizerBase {
|
|
|
1316
1344
|
this._showOnlyPercentages = false;
|
|
1317
1345
|
this._percentagePrecision = 0;
|
|
1318
1346
|
this._answersOrder = "default";
|
|
1319
|
-
this._supportSelection = true;
|
|
1320
1347
|
this._hideEmptyAnswers = false;
|
|
1321
1348
|
this._topN = -1;
|
|
1322
1349
|
this.topNValues = [].concat(SelectBase.topNValuesDefaults);
|
|
@@ -1336,6 +1363,7 @@ class SelectBase extends VisualizerBase {
|
|
|
1336
1363
|
this.dataProvider.raiseDataChanged();
|
|
1337
1364
|
};
|
|
1338
1365
|
}
|
|
1366
|
+
this._supportSelection = true;
|
|
1339
1367
|
this._showPercentages = this.options.showPercentages === true;
|
|
1340
1368
|
this._showOnlyPercentages = this.options.showOnlyPercentages === true;
|
|
1341
1369
|
if (this.options.percentagePrecision) {
|
|
@@ -1853,6 +1881,18 @@ class SelectBase extends VisualizerBase {
|
|
|
1853
1881
|
const selectedItem = ItemValue.getItemByValue(this.question.visibleChoices, state.filter);
|
|
1854
1882
|
this.setSelection(selectedItem !== null && selectedItem !== void 0 ? selectedItem : undefined);
|
|
1855
1883
|
}
|
|
1884
|
+
resetState() {
|
|
1885
|
+
super.resetState();
|
|
1886
|
+
// this._showPercentages = this.options.showPercentages === true;
|
|
1887
|
+
// this._showOnlyPercentages = this.options.showOnlyPercentages === true;
|
|
1888
|
+
// this._showMissingAnswers = this.isSupportMissingAnswers() && this.options.showMissingAnswers === true;
|
|
1889
|
+
// this._transposeData = this.options.transposeData || false;
|
|
1890
|
+
this._hideEmptyAnswers = this.options.hideEmptyAnswers === true;
|
|
1891
|
+
this._answersOrder = this.options.answersOrder || "default";
|
|
1892
|
+
this._topN = -1;
|
|
1893
|
+
this.chartType = this.chartTypes[0];
|
|
1894
|
+
this.setSelection(undefined);
|
|
1895
|
+
}
|
|
1856
1896
|
}
|
|
1857
1897
|
SelectBase.topNValuesDefaults = [-1, 5, 10, 20];
|
|
1858
1898
|
SelectBase._stateProperties = ["chartType", "answersOrder", "hideEmptyAnswers", "topN"];
|
|
@@ -1861,6 +1901,7 @@ VisualizationManager.registerVisualizer("radiogroup", SelectBase);
|
|
|
1861
1901
|
VisualizationManager.registerVisualizer("dropdown", SelectBase);
|
|
1862
1902
|
VisualizationManager.registerVisualizer("imagepicker", SelectBase);
|
|
1863
1903
|
VisualizationManager.registerVisualizer("tagbox", SelectBase);
|
|
1904
|
+
VisualizationManager.registerVisualizer("rating", SelectBase, 100);
|
|
1864
1905
|
|
|
1865
1906
|
class BooleanModel extends SelectBase {
|
|
1866
1907
|
constructor(question, data, options, name) {
|
|
@@ -2079,7 +2120,7 @@ HistogramModel.IntervalsCount = 10;
|
|
|
2079
2120
|
HistogramModel.UseIntervalsFrom = 10;
|
|
2080
2121
|
VisualizationManager.registerVisualizer("date", HistogramModel);
|
|
2081
2122
|
VisualizationManager.registerVisualizer("number", HistogramModel, 100);
|
|
2082
|
-
VisualizationManager.registerVisualizer("rating", HistogramModel,
|
|
2123
|
+
VisualizationManager.registerVisualizer("rating", HistogramModel, 300);
|
|
2083
2124
|
|
|
2084
2125
|
class Matrix extends SelectBase {
|
|
2085
2126
|
constructor(question, data, options, name) {
|
|
@@ -2672,12 +2713,15 @@ class AlternativeVisualizersWrapper extends VisualizerBase {
|
|
|
2672
2713
|
setVisualizer(type, quiet = false) {
|
|
2673
2714
|
const visualizerCandidate = this.visualizers.filter((v) => v.type === type)[0];
|
|
2674
2715
|
if (!!visualizerCandidate && visualizerCandidate !== this.visualizer) {
|
|
2716
|
+
let isFooterCollapsed;
|
|
2675
2717
|
if (!!this.visualizer) {
|
|
2718
|
+
isFooterCollapsed = this.visualizer.isFooterCollapsed;
|
|
2676
2719
|
this.visualizer.onStateChanged.remove(this.onVisualizerStateChangedCallback);
|
|
2677
2720
|
this.visualizer.onAfterRender.remove(this.onAfterVisualizerRenderCallback);
|
|
2678
2721
|
this.visualizer.destroy();
|
|
2679
2722
|
}
|
|
2680
2723
|
this.visualizer = visualizerCandidate;
|
|
2724
|
+
this.visualizer.isFooterCollapsed = isFooterCollapsed;
|
|
2681
2725
|
this.refresh();
|
|
2682
2726
|
this.visualizer.onAfterRender.add(this.onAfterVisualizerRenderCallback);
|
|
2683
2727
|
this.visualizer.onStateChanged.add(this.onVisualizerStateChangedCallback);
|
|
@@ -2723,6 +2767,7 @@ class AlternativeVisualizersWrapper extends VisualizerBase {
|
|
|
2723
2767
|
*
|
|
2724
2768
|
* > This method is overriden in descendant classes.
|
|
2725
2769
|
* @see setState
|
|
2770
|
+
* @see resetState
|
|
2726
2771
|
*/
|
|
2727
2772
|
getState() {
|
|
2728
2773
|
const currentVisualizerState = this.visualizer.getState();
|
|
@@ -2737,8 +2782,8 @@ class AlternativeVisualizersWrapper extends VisualizerBase {
|
|
|
2737
2782
|
/**
|
|
2738
2783
|
* Sets the visualizer's state.
|
|
2739
2784
|
*
|
|
2740
|
-
* > This method is overriden in descendant classes.
|
|
2741
2785
|
* @see getState
|
|
2786
|
+
* @see resetState
|
|
2742
2787
|
*/
|
|
2743
2788
|
setState(state) {
|
|
2744
2789
|
if (!!state.visualizer) {
|
|
@@ -2748,6 +2793,17 @@ class AlternativeVisualizersWrapper extends VisualizerBase {
|
|
|
2748
2793
|
this.visualizer.setState(state.state);
|
|
2749
2794
|
}
|
|
2750
2795
|
}
|
|
2796
|
+
/**
|
|
2797
|
+
* Resets the visualizer's state.
|
|
2798
|
+
*
|
|
2799
|
+
* @see getState
|
|
2800
|
+
* @see setState
|
|
2801
|
+
*/
|
|
2802
|
+
resetState() {
|
|
2803
|
+
super.resetState();
|
|
2804
|
+
this.visualizers.forEach(visualizer => visualizer.resetState());
|
|
2805
|
+
this.setVisualizer(this.visualizers[0].type, true);
|
|
2806
|
+
}
|
|
2751
2807
|
getValues() {
|
|
2752
2808
|
return this.visualizer.getValues();
|
|
2753
2809
|
}
|
|
@@ -9839,48 +9895,52 @@ class VisualizationPanel extends VisualizerBase {
|
|
|
9839
9895
|
return createCommercialLicenseLink();
|
|
9840
9896
|
});
|
|
9841
9897
|
}
|
|
9842
|
-
this.
|
|
9843
|
-
|
|
9844
|
-
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
-
|
|
9849
|
-
|
|
9850
|
-
|
|
9898
|
+
this._supportSelection = true;
|
|
9899
|
+
if (this.supportSelection !== false) {
|
|
9900
|
+
this.registerToolbarItem("resetFilter", () => {
|
|
9901
|
+
return DocumentHelper.createButton(() => {
|
|
9902
|
+
this.visualizers.forEach((visualizer) => {
|
|
9903
|
+
if (visualizer instanceof SelectBase || visualizer instanceof AlternativeVisualizersWrapper) {
|
|
9904
|
+
visualizer.setSelection(undefined);
|
|
9905
|
+
}
|
|
9906
|
+
});
|
|
9907
|
+
}, localization.getString("resetFilter"));
|
|
9908
|
+
}, 900);
|
|
9909
|
+
}
|
|
9851
9910
|
this.registerToolbarItem("addElement", (toolbar) => {
|
|
9852
9911
|
if (this.allowHideQuestions) {
|
|
9853
9912
|
let addElementSelector = undefined;
|
|
9854
9913
|
const addElementSelectorUpdater = (panel, options) => {
|
|
9855
9914
|
const hiddenElements = this.hiddenElements;
|
|
9915
|
+
const selectWrapper = DocumentHelper.createSelector([
|
|
9916
|
+
{
|
|
9917
|
+
name: undefined,
|
|
9918
|
+
displayName: localization.getString("addElement"),
|
|
9919
|
+
},
|
|
9920
|
+
]
|
|
9921
|
+
.concat(hiddenElements)
|
|
9922
|
+
.map((element) => {
|
|
9923
|
+
return {
|
|
9924
|
+
value: element.name,
|
|
9925
|
+
text: element.displayName,
|
|
9926
|
+
};
|
|
9927
|
+
}), (option) => false, (e) => {
|
|
9928
|
+
this.showElement(e.target.value);
|
|
9929
|
+
});
|
|
9930
|
+
if (addElementSelector) {
|
|
9931
|
+
toolbar.replaceChild(selectWrapper, addElementSelector);
|
|
9932
|
+
}
|
|
9933
|
+
addElementSelector = selectWrapper;
|
|
9856
9934
|
if (hiddenElements.length > 0) {
|
|
9857
|
-
|
|
9858
|
-
{
|
|
9859
|
-
name: undefined,
|
|
9860
|
-
displayName: localization.getString("addElement"),
|
|
9861
|
-
},
|
|
9862
|
-
]
|
|
9863
|
-
.concat(hiddenElements)
|
|
9864
|
-
.map((element) => {
|
|
9865
|
-
return {
|
|
9866
|
-
value: element.name,
|
|
9867
|
-
text: element.displayName,
|
|
9868
|
-
};
|
|
9869
|
-
}), (option) => false, (e) => {
|
|
9870
|
-
this.showElement(e.target.value);
|
|
9871
|
-
});
|
|
9872
|
-
(addElementSelector &&
|
|
9873
|
-
toolbar.replaceChild(selectWrapper, addElementSelector)) ||
|
|
9874
|
-
toolbar.appendChild(selectWrapper);
|
|
9875
|
-
addElementSelector = selectWrapper;
|
|
9935
|
+
addElementSelector.style.display = undefined;
|
|
9876
9936
|
}
|
|
9877
|
-
else {
|
|
9878
|
-
addElementSelector
|
|
9879
|
-
addElementSelector = undefined;
|
|
9937
|
+
else if (addElementSelector) {
|
|
9938
|
+
addElementSelector.style.display = "none";
|
|
9880
9939
|
}
|
|
9881
9940
|
};
|
|
9882
9941
|
addElementSelectorUpdater();
|
|
9883
9942
|
this.onVisibleElementsChanged.add(addElementSelectorUpdater);
|
|
9943
|
+
return addElementSelector;
|
|
9884
9944
|
}
|
|
9885
9945
|
return undefined;
|
|
9886
9946
|
});
|
|
@@ -10343,6 +10403,18 @@ class VisualizationPanel extends VisualizerBase {
|
|
|
10343
10403
|
}
|
|
10344
10404
|
this.refresh();
|
|
10345
10405
|
}
|
|
10406
|
+
resetState() {
|
|
10407
|
+
this._settingState = true;
|
|
10408
|
+
super.resetState();
|
|
10409
|
+
try {
|
|
10410
|
+
this.visualizers.forEach(visualizer => visualizer.resetState());
|
|
10411
|
+
this.locale = surveyLocalization.defaultLocale;
|
|
10412
|
+
}
|
|
10413
|
+
finally {
|
|
10414
|
+
this._settingState = false;
|
|
10415
|
+
}
|
|
10416
|
+
this.refresh();
|
|
10417
|
+
}
|
|
10346
10418
|
get permissions() {
|
|
10347
10419
|
return this._elements.map((element) => {
|
|
10348
10420
|
return {
|
|
@@ -12395,9 +12467,34 @@ class StatisticsTable extends SelectBase {
|
|
|
12395
12467
|
super.destroy();
|
|
12396
12468
|
}
|
|
12397
12469
|
}
|
|
12470
|
+
class StatisticsTableBoolean extends BooleanModel {
|
|
12471
|
+
constructor(question, data, options, name) {
|
|
12472
|
+
super(question, data, options, name || "options");
|
|
12473
|
+
this._statisticsTableAdapter = new StatisticsTableAdapter(this);
|
|
12474
|
+
this.showPercentages = true;
|
|
12475
|
+
}
|
|
12476
|
+
destroyContent(container) {
|
|
12477
|
+
this._statisticsTableAdapter.destroy(container);
|
|
12478
|
+
super.destroyContent(container);
|
|
12479
|
+
}
|
|
12480
|
+
renderContentAsync(container) {
|
|
12481
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12482
|
+
const tableNode = DocumentHelper.createElement("div");
|
|
12483
|
+
yield this._statisticsTableAdapter.create(tableNode);
|
|
12484
|
+
container.innerHTML = "";
|
|
12485
|
+
container.appendChild(tableNode);
|
|
12486
|
+
return container;
|
|
12487
|
+
});
|
|
12488
|
+
}
|
|
12489
|
+
destroy() {
|
|
12490
|
+
this._statisticsTableAdapter.destroy(this.contentContainer);
|
|
12491
|
+
super.destroy();
|
|
12492
|
+
}
|
|
12493
|
+
}
|
|
12398
12494
|
VisualizationManager.registerVisualizer("radiogroup", StatisticsTable);
|
|
12399
12495
|
VisualizationManager.registerVisualizer("dropdown", StatisticsTable);
|
|
12400
12496
|
VisualizationManager.registerVisualizer("checkbox", StatisticsTable);
|
|
12497
|
+
VisualizationManager.registerVisualizer("boolean", StatisticsTableBoolean);
|
|
12401
12498
|
|
|
12402
12499
|
class NpsVisualizerWidget {
|
|
12403
12500
|
constructor(_model, _data) {
|
|
@@ -12526,5 +12623,5 @@ NpsVisualizer.DetractorScore = 6;
|
|
|
12526
12623
|
NpsVisualizer.PromoterScore = 9;
|
|
12527
12624
|
// VisualizationManager.registerVisualizer("rating", NpsVisualizer);
|
|
12528
12625
|
|
|
12529
|
-
export { AlternativeVisualizersWrapper as A, BooleanModel as B, DataProvider as D, HistogramModel as H, Matrix as M, NumberModel as N, PostponeHelper as P, RankingModel as R, SelectBase as S, TextTableAdapter as T, VisualizerFactory as V, WordCloudAdapter as W, __awaiter as _, VisualizerBase as a, VisualizationManager as b, VisualizationPanel as c, VisualizationPanelDynamic as d, VisualizationMatrixDynamic as e, VisualizationMatrixDropdown as f, WordCloud as g, hideEmptyAnswersInData as h, Text as i, StatisticsTableAdapter as j, StatisticsTable as k,
|
|
12626
|
+
export { AlternativeVisualizersWrapper as A, BooleanModel as B, DataProvider as D, HistogramModel as H, Matrix as M, NumberModel as N, PostponeHelper as P, RankingModel as R, SelectBase as S, TextTableAdapter as T, VisualizerFactory as V, WordCloudAdapter as W, __awaiter as _, VisualizerBase as a, VisualizationManager as b, VisualizationPanel as c, VisualizationPanelDynamic as d, VisualizationMatrixDynamic as e, VisualizationMatrixDropdown as f, WordCloud as g, hideEmptyAnswersInData as h, Text as i, StatisticsTableAdapter as j, StatisticsTable as k, StatisticsTableBoolean as l, NpsVisualizerWidget as m, NpsAdapter as n, NpsVisualizer as o, PivotModel as p, defaultStatisticsCalculator as q, textHelper as t };
|
|
12530
12627
|
//# sourceMappingURL=shared2.mjs.map
|