survey-analytics 2.5.8 → 2.5.10
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 +1 -1
- package/fesm/survey.analytics.core.mjs +1 -1
- package/fesm/survey.analytics.mjs +1 -1
- package/fesm/survey.analytics.mongo.mjs +1 -1
- package/fesm/survey.analytics.tabulator.mjs +39 -26
- package/fesm/survey.analytics.tabulator.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-analytics-tabulator.types/tables/columnbuilder.d.ts +6 -3
- package/survey-analytics-tabulator.types/tables/columns.d.ts +6 -4
- package/survey.analytics.core.css +1 -1
- package/survey.analytics.core.js +1 -1
- package/survey.analytics.core.min.css +1 -1
- package/survey.analytics.core.min.js.LICENSE.txt +1 -1
- package/survey.analytics.css +1 -1
- package/survey.analytics.js +1 -1
- package/survey.analytics.min.css +1 -1
- package/survey.analytics.min.js.LICENSE.txt +1 -1
- package/survey.analytics.mongo.js +1 -1
- package/survey.analytics.mongo.min.js.LICENSE.txt +1 -1
- package/survey.analytics.tabulator.css +1 -1
- package/survey.analytics.tabulator.js +62 -35
- 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/shared.mjs
CHANGED
package/fesm/shared2.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - SurveyJS Dashboard library v2.5.
|
|
2
|
+
* surveyjs - SurveyJS Dashboard library v2.5.10
|
|
3
3
|
* Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -556,33 +556,40 @@ class DefaultColumn extends BaseColumn {
|
|
|
556
556
|
return this.getDisplayValueCore(data);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
class
|
|
559
|
+
class SelectBaseColumn extends BaseColumn {
|
|
560
|
+
get isOtherInSeparateColumn() {
|
|
561
|
+
return this.question.hasOther && this.question.getStoreOthersAsComment();
|
|
562
|
+
}
|
|
563
|
+
getItemDisplayText(item, options) {
|
|
564
|
+
return options.useValuesAsLabels ? item.value : item.textOrHtml;
|
|
565
|
+
}
|
|
560
566
|
getDisplayValue(data, table, options) {
|
|
561
|
-
const
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
return res.join(table.itemsDelimiter);
|
|
567
|
+
const prevSeparator = settings.choicesSeparator;
|
|
568
|
+
settings.choicesSeparator = table.itemsDelimiter;
|
|
569
|
+
const value = options.useValuesAsLabels ? this.question.renderedValue : this.question.displayValue;
|
|
570
|
+
settings.choicesSeparator = prevSeparator;
|
|
571
|
+
return value;
|
|
567
572
|
}
|
|
568
573
|
}
|
|
569
|
-
class
|
|
574
|
+
class CheckboxColumn extends SelectBaseColumn {
|
|
570
575
|
getDisplayValue(data, table, options) {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
576
|
+
if (this.isOtherInSeparateColumn) {
|
|
577
|
+
const selectedItems = this.question.selectedItems;
|
|
578
|
+
const res = selectedItems.map(item => this.getItemDisplayText(item, options));
|
|
579
|
+
return res.join(table.itemsDelimiter);
|
|
580
|
+
}
|
|
581
|
+
return super.getDisplayValue(data, table, options);
|
|
575
582
|
}
|
|
576
583
|
}
|
|
577
|
-
class
|
|
584
|
+
class SingleChoiceColumn extends SelectBaseColumn {
|
|
578
585
|
getDisplayValue(data, table, options) {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
return value;
|
|
586
|
+
if (this.isOtherInSeparateColumn) {
|
|
587
|
+
const selectedItem = this.question.selectedItem;
|
|
588
|
+
if (!selectedItem)
|
|
589
|
+
return "";
|
|
590
|
+
return this.getItemDisplayText(selectedItem, options);
|
|
585
591
|
}
|
|
592
|
+
return super.getDisplayValue(data, table, options);
|
|
586
593
|
}
|
|
587
594
|
}
|
|
588
595
|
class CommentColumn extends BaseColumn {
|
|
@@ -729,9 +736,6 @@ class DefaultColumnsBuilder {
|
|
|
729
736
|
if (question.hasComment) {
|
|
730
737
|
columns.push(new CommentColumn(question, table));
|
|
731
738
|
}
|
|
732
|
-
if (question.hasOther && question["getStoreOthersAsComment"]()) {
|
|
733
|
-
columns.push(new OtherColumn(question, table));
|
|
734
|
-
}
|
|
735
739
|
return columns;
|
|
736
740
|
}
|
|
737
741
|
}
|
|
@@ -748,14 +752,23 @@ class ColumnsBuilderFactory {
|
|
|
748
752
|
}
|
|
749
753
|
}
|
|
750
754
|
ColumnsBuilderFactory.Instance = new ColumnsBuilderFactory();
|
|
751
|
-
class
|
|
755
|
+
class SelectBaseColumnsBuilder extends DefaultColumnsBuilder {
|
|
756
|
+
buildColumns(question, table) {
|
|
757
|
+
const columns = super.buildColumns(question, table);
|
|
758
|
+
if (question.hasOther && question.getStoreOthersAsComment()) {
|
|
759
|
+
columns.push(new OtherColumn(question, table));
|
|
760
|
+
}
|
|
761
|
+
return columns;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
class CheckboxColumnsBuilder extends SelectBaseColumnsBuilder {
|
|
752
765
|
createColumn(question, table) {
|
|
753
766
|
return new CheckboxColumn(question, table);
|
|
754
767
|
}
|
|
755
768
|
}
|
|
756
769
|
ColumnsBuilderFactory.Instance.registerBuilderColumn("checkbox", new CheckboxColumnsBuilder());
|
|
757
770
|
ColumnsBuilderFactory.Instance.registerBuilderColumn("tagbox", new CheckboxColumnsBuilder());
|
|
758
|
-
class SingleChoiceColumnsBuilder extends
|
|
771
|
+
class SingleChoiceColumnsBuilder extends SelectBaseColumnsBuilder {
|
|
759
772
|
createColumn(question, table) {
|
|
760
773
|
return new SingleChoiceColumn(question, table);
|
|
761
774
|
}
|
|
@@ -1649,5 +1662,5 @@ class TabulatorRow extends TableRow {
|
|
|
1649
1662
|
|
|
1650
1663
|
Tabulator.initTabulatorConstructor(TabulatorFull);
|
|
1651
1664
|
|
|
1652
|
-
export { BaseColumn, CheckboxColumn, CheckboxColumnsBuilder, ColumnsBuilderFactory, CommentColumn, CompositeColumnsBuilder, CompositeQuestionColumn, CustomColumnsBuilder, CustomQuestionColumn, DefaultColumn, DefaultColumnsBuilder, DocumentHelper, FileColumn, FileColumnsBuilder, ImageColumn, ImageColumnsBuilder, MatrixColumn, MatrixColumnsBuilder, MatrixDropdownColumn, MatrixDropdownColumnBuilder, OtherColumn, SelectBaseColumn, SingleChoiceColumn, SingleChoiceColumnsBuilder, Table, TableEvent, TableExtensions, TableRow, Tabulator, TabulatorRow, defaultDownloadOptions, defaultOptions, localization };
|
|
1665
|
+
export { BaseColumn, CheckboxColumn, CheckboxColumnsBuilder, ColumnsBuilderFactory, CommentColumn, CompositeColumnsBuilder, CompositeQuestionColumn, CustomColumnsBuilder, CustomQuestionColumn, DefaultColumn, DefaultColumnsBuilder, DocumentHelper, FileColumn, FileColumnsBuilder, ImageColumn, ImageColumnsBuilder, MatrixColumn, MatrixColumnsBuilder, MatrixDropdownColumn, MatrixDropdownColumnBuilder, OtherColumn, SelectBaseColumn, SelectBaseColumnsBuilder, SingleChoiceColumn, SingleChoiceColumnsBuilder, Table, TableEvent, TableExtensions, TableRow, Tabulator, TabulatorRow, defaultDownloadOptions, defaultOptions, localization };
|
|
1653
1666
|
//# sourceMappingURL=survey.analytics.tabulator.mjs.map
|