survey-analytics 2.3.9 → 2.3.11
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 +479 -15
- package/fesm/shared.mjs.map +1 -1
- package/fesm/shared2.mjs +696 -212
- package/fesm/shared2.mjs.map +1 -1
- package/fesm/survey.analytics.core.mjs +2 -2
- package/fesm/survey.analytics.mjs +27 -8
- package/fesm/survey.analytics.mjs.map +1 -1
- package/fesm/survey.analytics.mongo.mjs +1 -1
- package/fesm/survey.analytics.tabulator.mjs +28 -24
- package/fesm/survey.analytics.tabulator.mjs.map +1 -1
- package/package.json +4 -3
- package/survey-analytics-tabulator.types/analytics-localization/arabic.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/dutch.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/english.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/farsi.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/finnish.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/french.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/german.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/italian.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/japanese.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/norwegian.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/polish.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/portuguese.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/russian.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/spanish.d.ts +16 -0
- package/survey-analytics-tabulator.types/analytics-localization/swedish.d.ts +16 -0
- package/survey-analytics-tabulator.types/localizationManager.d.ts +16 -0
- package/survey-analytics-tabulator.types/tables/table.d.ts +2 -0
- package/survey-analytics.types/analytics-localization/arabic.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/dutch.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/english.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/farsi.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/finnish.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/french.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/german.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/italian.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/japanese.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/norwegian.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/polish.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/portuguese.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/russian.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/spanish.d.ts +16 -0
- package/survey-analytics.types/analytics-localization/swedish.d.ts +16 -0
- package/survey-analytics.types/dataProvider.d.ts +10 -0
- package/survey-analytics.types/entries/mongo.d.ts +1 -0
- package/survey-analytics.types/histogram.d.ts +48 -1
- package/survey-analytics.types/localizationManager.d.ts +16 -0
- package/survey-analytics.types/mongo/index.d.ts +16 -0
- package/survey-analytics.types/mongo/pipelines.d.ts +1 -0
- package/survey-analytics.types/mongo/result-transformers.d.ts +35 -0
- package/survey-analytics.types/selectBase.d.ts +3 -1
- package/survey-analytics.types/statisticCalculators.d.ts +12 -2
- package/survey-analytics.types/visualizationMatrixDropdown.d.ts +4 -6
- package/survey-analytics.types/visualizationPanel.d.ts +1 -0
- package/survey-analytics.types/visualizationPanelDynamic.d.ts +2 -5
- package/survey-analytics.types/visualizerBase.d.ts +2 -0
- package/survey.analytics.core.css +1 -1
- package/survey.analytics.core.d.ts +1 -0
- package/survey.analytics.core.js +1215 -201
- 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.d.ts +1 -0
- package/survey.analytics.js +1241 -206
- 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.mongo.d.ts +1 -0
- 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.d.ts +1 -0
- package/survey.analytics.tabulator.js +506 -38
- 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.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - SurveyJS Dashboard library v2.3.
|
|
2
|
+
* surveyjs - SurveyJS Dashboard library v2.3.11
|
|
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
|
*/
|
|
@@ -7230,7 +7230,39 @@ var arabicStrings = {
|
|
|
7230
7230
|
// [Auto-translated] "Groups:"
|
|
7231
7231
|
axisYAlternativeSelectorTitle: "المجموعات:",
|
|
7232
7232
|
// [Auto-translated] "Not selected"
|
|
7233
|
-
notSelected: "غير محدد"
|
|
7233
|
+
notSelected: "غير محدد",
|
|
7234
|
+
// [Auto-translated] "Default"
|
|
7235
|
+
intervalMode_default: "افتراضي",
|
|
7236
|
+
// [Auto-translated] "Decades"
|
|
7237
|
+
intervalMode_decades: "عقود",
|
|
7238
|
+
// [Auto-translated] "Years"
|
|
7239
|
+
intervalMode_years: "اعوام",
|
|
7240
|
+
// [Auto-translated] "Quarters"
|
|
7241
|
+
intervalMode_quarters: "ارباع",
|
|
7242
|
+
// [Auto-translated] "Months"
|
|
7243
|
+
intervalMode_months: "أشهر",
|
|
7244
|
+
// [Auto-translated] "Days"
|
|
7245
|
+
intervalMode_days: "أيام",
|
|
7246
|
+
// [Auto-translated] "Custom"
|
|
7247
|
+
intervalMode_custom: "تقليد",
|
|
7248
|
+
// [Auto-translated] "Auto"
|
|
7249
|
+
intervalMode_auto: "تلقائي",
|
|
7250
|
+
// [Auto-translated] "Intervals:"
|
|
7251
|
+
intervalModeTitle: "فترات:",
|
|
7252
|
+
// [Auto-translated] "Show individual values"
|
|
7253
|
+
noRunningTotals: "إظهار القيم الفردية",
|
|
7254
|
+
// [Auto-translated] "Show running totals"
|
|
7255
|
+
runningTotals: "إظهار الإجماليات الجارية",
|
|
7256
|
+
// [Auto-translated] "Compare periods"
|
|
7257
|
+
groupDateSeries: "مقارنة الفترات",
|
|
7258
|
+
// [Auto-translated] "View timeline"
|
|
7259
|
+
ungroupDateSeries: "عرض الجدول الزمني",
|
|
7260
|
+
// [Auto-translated] "None"
|
|
7261
|
+
noneAggregateText: "اي",
|
|
7262
|
+
// [Auto-translated] "Aggregate:"
|
|
7263
|
+
selectAggregateText: "تجميع:",
|
|
7264
|
+
// [Auto-translated] "Year ends with"
|
|
7265
|
+
groupedYearsAxisTitle: "ينتهي العام ب"
|
|
7234
7266
|
};
|
|
7235
7267
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "ar", strings: arabicStrings, nativeName: "العربية" });
|
|
7236
7268
|
|
|
@@ -7414,7 +7446,39 @@ var dutchStrings = {
|
|
|
7414
7446
|
// [Auto-translated] "Groups:"
|
|
7415
7447
|
axisYAlternativeSelectorTitle: "Groepen:",
|
|
7416
7448
|
// [Auto-translated] "Not selected"
|
|
7417
|
-
notSelected: "Niet geselecteerd"
|
|
7449
|
+
notSelected: "Niet geselecteerd",
|
|
7450
|
+
// [Auto-translated] "Default"
|
|
7451
|
+
intervalMode_default: "Verstek",
|
|
7452
|
+
// [Auto-translated] "Decades"
|
|
7453
|
+
intervalMode_decades: "Decennia",
|
|
7454
|
+
// [Auto-translated] "Years"
|
|
7455
|
+
intervalMode_years: "Jaren",
|
|
7456
|
+
// [Auto-translated] "Quarters"
|
|
7457
|
+
intervalMode_quarters: "Vertrekken",
|
|
7458
|
+
// [Auto-translated] "Months"
|
|
7459
|
+
intervalMode_months: "Maanden",
|
|
7460
|
+
// [Auto-translated] "Days"
|
|
7461
|
+
intervalMode_days: "Dagen",
|
|
7462
|
+
// [Auto-translated] "Custom"
|
|
7463
|
+
intervalMode_custom: "Gewoonte",
|
|
7464
|
+
// [Auto-translated] "Auto"
|
|
7465
|
+
intervalMode_auto: "Auto",
|
|
7466
|
+
// [Auto-translated] "Intervals:"
|
|
7467
|
+
intervalModeTitle: "Intervallen:",
|
|
7468
|
+
// [Auto-translated] "Show individual values"
|
|
7469
|
+
noRunningTotals: "Toon individuele waarden",
|
|
7470
|
+
// [Auto-translated] "Show running totals"
|
|
7471
|
+
runningTotals: "Toon lopende totalen",
|
|
7472
|
+
// [Auto-translated] "Compare periods"
|
|
7473
|
+
groupDateSeries: "Vergelijk periodes",
|
|
7474
|
+
// [Auto-translated] "View timeline"
|
|
7475
|
+
ungroupDateSeries: "Tijdlijn bekijken",
|
|
7476
|
+
// [Auto-translated] "None"
|
|
7477
|
+
noneAggregateText: "Geen",
|
|
7478
|
+
// [Auto-translated] "Aggregate:"
|
|
7479
|
+
selectAggregateText: "Aggregaat:",
|
|
7480
|
+
// [Auto-translated] "Year ends with"
|
|
7481
|
+
groupedYearsAxisTitle: "Het jaar eindigt met"
|
|
7418
7482
|
};
|
|
7419
7483
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "nl", strings: dutchStrings, nativeName: "Nederlands" });
|
|
7420
7484
|
|
|
@@ -7517,6 +7581,22 @@ var englishStrings = {
|
|
|
7517
7581
|
axisXAlternativeSelectorTitle: "Segments:",
|
|
7518
7582
|
axisYAlternativeSelectorTitle: "Groups:",
|
|
7519
7583
|
notSelected: "Not selected",
|
|
7584
|
+
intervalMode_default: "Default",
|
|
7585
|
+
intervalMode_decades: "Decades",
|
|
7586
|
+
intervalMode_years: "Years",
|
|
7587
|
+
intervalMode_quarters: "Quarters",
|
|
7588
|
+
intervalMode_months: "Months",
|
|
7589
|
+
intervalMode_days: "Days",
|
|
7590
|
+
intervalMode_custom: "Custom",
|
|
7591
|
+
intervalMode_auto: "Auto",
|
|
7592
|
+
intervalModeTitle: "Intervals:",
|
|
7593
|
+
noRunningTotals: "Show individual values",
|
|
7594
|
+
runningTotals: "Show running totals",
|
|
7595
|
+
groupDateSeries: "Compare periods",
|
|
7596
|
+
ungroupDateSeries: "View timeline",
|
|
7597
|
+
noneAggregateText: "None",
|
|
7598
|
+
selectAggregateText: "Aggregate:",
|
|
7599
|
+
groupedYearsAxisTitle: "Year ends with",
|
|
7520
7600
|
license: "To use the Dashboard library in your application, a <a href='https://surveyjs.io/licensing' target='_blank'>developer license</a> is required. If you have an active license, please <a href='https://surveyjs.io/remove-alert-banner' target='_blank'>set up your license key</a> and ensure you're using the <a href='https://surveyjs.io/stay-updated/release-notes' target='_blank'>latest version</a>.",
|
|
7521
7601
|
license2: "This banner appears because your maintenance subscription for the Dashboard library expired on {date}. You may continue using <a href='https://surveyjs.io/stay-updated/release-notes' target='_blank'>all versions released up to that date</a>. To remove this banner in the latest version, please <a href='https://surveyjs.io/manage#license-manager' target='_blank'>renew your subscription</a> and <a href='https://surveyjs.io/remove-alert-banner' target='_blank'>set up a new license key</a>."
|
|
7522
7602
|
};
|
|
@@ -7705,7 +7785,39 @@ var farsiStrings = {
|
|
|
7705
7785
|
// [Auto-translated] "Groups:"
|
|
7706
7786
|
axisYAlternativeSelectorTitle: "گروه:",
|
|
7707
7787
|
// [Auto-translated] "Not selected"
|
|
7708
|
-
notSelected: "انتخاب نشده است"
|
|
7788
|
+
notSelected: "انتخاب نشده است",
|
|
7789
|
+
// [Auto-translated] "Default"
|
|
7790
|
+
intervalMode_default: "پیش فرض",
|
|
7791
|
+
// [Auto-translated] "Decades"
|
|
7792
|
+
intervalMode_decades: "دهه",
|
|
7793
|
+
// [Auto-translated] "Years"
|
|
7794
|
+
intervalMode_years: "سال",
|
|
7795
|
+
// [Auto-translated] "Quarters"
|
|
7796
|
+
intervalMode_quarters: "چهارم",
|
|
7797
|
+
// [Auto-translated] "Months"
|
|
7798
|
+
intervalMode_months: "ماهها",
|
|
7799
|
+
// [Auto-translated] "Days"
|
|
7800
|
+
intervalMode_days: "روزها",
|
|
7801
|
+
// [Auto-translated] "Custom"
|
|
7802
|
+
intervalMode_custom: "سفارشی",
|
|
7803
|
+
// [Auto-translated] "Auto"
|
|
7804
|
+
intervalMode_auto: "خودکار",
|
|
7805
|
+
// [Auto-translated] "Intervals:"
|
|
7806
|
+
intervalModeTitle: "فواصل:",
|
|
7807
|
+
// [Auto-translated] "Show individual values"
|
|
7808
|
+
noRunningTotals: "نمایش ارزش های فردی",
|
|
7809
|
+
// [Auto-translated] "Show running totals"
|
|
7810
|
+
runningTotals: "نمایش مجموع در حال اجرا",
|
|
7811
|
+
// [Auto-translated] "Compare periods"
|
|
7812
|
+
groupDateSeries: "دوره ها را مقایسه کنید",
|
|
7813
|
+
// [Auto-translated] "View timeline"
|
|
7814
|
+
ungroupDateSeries: "مشاهده جدول زمانی",
|
|
7815
|
+
// [Auto-translated] "None"
|
|
7816
|
+
noneAggregateText: "هیچ کدام",
|
|
7817
|
+
// [Auto-translated] "Aggregate:"
|
|
7818
|
+
selectAggregateText: "مجموع:",
|
|
7819
|
+
// [Auto-translated] "Year ends with"
|
|
7820
|
+
groupedYearsAxisTitle: "سال به پایان می رسد با"
|
|
7709
7821
|
};
|
|
7710
7822
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "fa", strings: farsiStrings, nativeName: "فارسی" });
|
|
7711
7823
|
|
|
@@ -7889,7 +8001,39 @@ var finnishStrings = {
|
|
|
7889
8001
|
// [Auto-translated] "Groups:"
|
|
7890
8002
|
axisYAlternativeSelectorTitle: "Ryhmät:",
|
|
7891
8003
|
// [Auto-translated] "Not selected"
|
|
7892
|
-
notSelected: "Ei valittu"
|
|
8004
|
+
notSelected: "Ei valittu",
|
|
8005
|
+
// [Auto-translated] "Default"
|
|
8006
|
+
intervalMode_default: "Laiminlyönti",
|
|
8007
|
+
// [Auto-translated] "Decades"
|
|
8008
|
+
intervalMode_decades: "Vuosikymmeniä",
|
|
8009
|
+
// [Auto-translated] "Years"
|
|
8010
|
+
intervalMode_years: "Vuosia",
|
|
8011
|
+
// [Auto-translated] "Quarters"
|
|
8012
|
+
intervalMode_quarters: "Neljäsosaa",
|
|
8013
|
+
// [Auto-translated] "Months"
|
|
8014
|
+
intervalMode_months: "Kuukautta",
|
|
8015
|
+
// [Auto-translated] "Days"
|
|
8016
|
+
intervalMode_days: "Päivää",
|
|
8017
|
+
// [Auto-translated] "Custom"
|
|
8018
|
+
intervalMode_custom: "Tapa",
|
|
8019
|
+
// [Auto-translated] "Auto"
|
|
8020
|
+
intervalMode_auto: "Auto",
|
|
8021
|
+
// [Auto-translated] "Intervals:"
|
|
8022
|
+
intervalModeTitle: "Välein:",
|
|
8023
|
+
// [Auto-translated] "Show individual values"
|
|
8024
|
+
noRunningTotals: "Näytä yksittäiset arvot",
|
|
8025
|
+
// [Auto-translated] "Show running totals"
|
|
8026
|
+
runningTotals: "Näytä juoksevat kokonaismäärät",
|
|
8027
|
+
// [Auto-translated] "Compare periods"
|
|
8028
|
+
groupDateSeries: "Vertaile kausia",
|
|
8029
|
+
// [Auto-translated] "View timeline"
|
|
8030
|
+
ungroupDateSeries: "Näytä aikajana",
|
|
8031
|
+
// [Auto-translated] "None"
|
|
8032
|
+
noneAggregateText: "Ei lainkaan",
|
|
8033
|
+
// [Auto-translated] "Aggregate:"
|
|
8034
|
+
selectAggregateText: "Aggregaatti:",
|
|
8035
|
+
// [Auto-translated] "Year ends with"
|
|
8036
|
+
groupedYearsAxisTitle: "Vuosi päättyy"
|
|
7893
8037
|
};
|
|
7894
8038
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "fi", strings: finnishStrings, nativeName: "Suomi" });
|
|
7895
8039
|
|
|
@@ -8073,7 +8217,39 @@ var frenchStrings = {
|
|
|
8073
8217
|
// [Auto-translated] "Groups:"
|
|
8074
8218
|
axisYAlternativeSelectorTitle: "Groupe:",
|
|
8075
8219
|
// [Auto-translated] "Not selected"
|
|
8076
|
-
notSelected: "Non sélectionné"
|
|
8220
|
+
notSelected: "Non sélectionné",
|
|
8221
|
+
// [Auto-translated] "Default"
|
|
8222
|
+
intervalMode_default: "Faire défaut",
|
|
8223
|
+
// [Auto-translated] "Decades"
|
|
8224
|
+
intervalMode_decades: "Décennies",
|
|
8225
|
+
// [Auto-translated] "Years"
|
|
8226
|
+
intervalMode_years: "Années",
|
|
8227
|
+
// [Auto-translated] "Quarters"
|
|
8228
|
+
intervalMode_quarters: "Quartier",
|
|
8229
|
+
// [Auto-translated] "Months"
|
|
8230
|
+
intervalMode_months: "Mois",
|
|
8231
|
+
// [Auto-translated] "Days"
|
|
8232
|
+
intervalMode_days: "Jours",
|
|
8233
|
+
// [Auto-translated] "Custom"
|
|
8234
|
+
intervalMode_custom: "Coutume",
|
|
8235
|
+
// [Auto-translated] "Auto"
|
|
8236
|
+
intervalMode_auto: "Auto",
|
|
8237
|
+
// [Auto-translated] "Intervals:"
|
|
8238
|
+
intervalModeTitle: "Intervalles:",
|
|
8239
|
+
// [Auto-translated] "Show individual values"
|
|
8240
|
+
noRunningTotals: "Afficher les valeurs individuelles",
|
|
8241
|
+
// [Auto-translated] "Show running totals"
|
|
8242
|
+
runningTotals: "Afficher les totaux cumulés",
|
|
8243
|
+
// [Auto-translated] "Compare periods"
|
|
8244
|
+
groupDateSeries: "Comparer les périodes",
|
|
8245
|
+
// [Auto-translated] "View timeline"
|
|
8246
|
+
ungroupDateSeries: "Voir la chronologie",
|
|
8247
|
+
// [Auto-translated] "None"
|
|
8248
|
+
noneAggregateText: "Aucun",
|
|
8249
|
+
// [Auto-translated] "Aggregate:"
|
|
8250
|
+
selectAggregateText: "Agrégat:",
|
|
8251
|
+
// [Auto-translated] "Year ends with"
|
|
8252
|
+
groupedYearsAxisTitle: "L’exercice se termine avec"
|
|
8077
8253
|
};
|
|
8078
8254
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "fr", strings: frenchStrings, nativeName: "Français" });
|
|
8079
8255
|
|
|
@@ -8257,7 +8433,39 @@ var germanStrings = {
|
|
|
8257
8433
|
// [Auto-translated] "Groups:"
|
|
8258
8434
|
axisYAlternativeSelectorTitle: "Gruppen:",
|
|
8259
8435
|
// [Auto-translated] "Not selected"
|
|
8260
|
-
notSelected: "Nicht ausgewählt"
|
|
8436
|
+
notSelected: "Nicht ausgewählt",
|
|
8437
|
+
// [Auto-translated] "Default"
|
|
8438
|
+
intervalMode_default: "Vorgabe",
|
|
8439
|
+
// [Auto-translated] "Decades"
|
|
8440
|
+
intervalMode_decades: "Dekaden",
|
|
8441
|
+
// [Auto-translated] "Years"
|
|
8442
|
+
intervalMode_years: "Jahre",
|
|
8443
|
+
// [Auto-translated] "Quarters"
|
|
8444
|
+
intervalMode_quarters: "Quartier",
|
|
8445
|
+
// [Auto-translated] "Months"
|
|
8446
|
+
intervalMode_months: "Monate",
|
|
8447
|
+
// [Auto-translated] "Days"
|
|
8448
|
+
intervalMode_days: "Tage",
|
|
8449
|
+
// [Auto-translated] "Custom"
|
|
8450
|
+
intervalMode_custom: "Gewohnheit",
|
|
8451
|
+
// [Auto-translated] "Auto"
|
|
8452
|
+
intervalMode_auto: "Auto",
|
|
8453
|
+
// [Auto-translated] "Intervals:"
|
|
8454
|
+
intervalModeTitle: "Intervalle:",
|
|
8455
|
+
// [Auto-translated] "Show individual values"
|
|
8456
|
+
noRunningTotals: "Einzelne Werte anzeigen",
|
|
8457
|
+
// [Auto-translated] "Show running totals"
|
|
8458
|
+
runningTotals: "Laufende Summen anzeigen",
|
|
8459
|
+
// [Auto-translated] "Compare periods"
|
|
8460
|
+
groupDateSeries: "Zeiträume vergleichen",
|
|
8461
|
+
// [Auto-translated] "View timeline"
|
|
8462
|
+
ungroupDateSeries: "Zeitleiste anzeigen",
|
|
8463
|
+
// [Auto-translated] "None"
|
|
8464
|
+
noneAggregateText: "Nichts",
|
|
8465
|
+
// [Auto-translated] "Aggregate:"
|
|
8466
|
+
selectAggregateText: "Aggregat:",
|
|
8467
|
+
// [Auto-translated] "Year ends with"
|
|
8468
|
+
groupedYearsAxisTitle: "Das Jahr endet mit"
|
|
8261
8469
|
};
|
|
8262
8470
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "de", strings: germanStrings, nativeName: "Deutsch" });
|
|
8263
8471
|
|
|
@@ -8441,7 +8649,39 @@ var italianStrings = {
|
|
|
8441
8649
|
// [Auto-translated] "Groups:"
|
|
8442
8650
|
axisYAlternativeSelectorTitle: "Gruppi:",
|
|
8443
8651
|
// [Auto-translated] "Not selected"
|
|
8444
|
-
notSelected: "Non selezionato"
|
|
8652
|
+
notSelected: "Non selezionato",
|
|
8653
|
+
// [Auto-translated] "Default"
|
|
8654
|
+
intervalMode_default: "Default",
|
|
8655
|
+
// [Auto-translated] "Decades"
|
|
8656
|
+
intervalMode_decades: "Decenni",
|
|
8657
|
+
// [Auto-translated] "Years"
|
|
8658
|
+
intervalMode_years: "Anni",
|
|
8659
|
+
// [Auto-translated] "Quarters"
|
|
8660
|
+
intervalMode_quarters: "Quarti",
|
|
8661
|
+
// [Auto-translated] "Months"
|
|
8662
|
+
intervalMode_months: "Mesi",
|
|
8663
|
+
// [Auto-translated] "Days"
|
|
8664
|
+
intervalMode_days: "Giorni",
|
|
8665
|
+
// [Auto-translated] "Custom"
|
|
8666
|
+
intervalMode_custom: "Costume",
|
|
8667
|
+
// [Auto-translated] "Auto"
|
|
8668
|
+
intervalMode_auto: "Automatico",
|
|
8669
|
+
// [Auto-translated] "Intervals:"
|
|
8670
|
+
intervalModeTitle: "Intervalli:",
|
|
8671
|
+
// [Auto-translated] "Show individual values"
|
|
8672
|
+
noRunningTotals: "Mostra i singoli valori",
|
|
8673
|
+
// [Auto-translated] "Show running totals"
|
|
8674
|
+
runningTotals: "Mostra totali parziali",
|
|
8675
|
+
// [Auto-translated] "Compare periods"
|
|
8676
|
+
groupDateSeries: "Confronta i periodi",
|
|
8677
|
+
// [Auto-translated] "View timeline"
|
|
8678
|
+
ungroupDateSeries: "Visualizza la timeline",
|
|
8679
|
+
// [Auto-translated] "None"
|
|
8680
|
+
noneAggregateText: "Nessuno",
|
|
8681
|
+
// [Auto-translated] "Aggregate:"
|
|
8682
|
+
selectAggregateText: "Aggregato:",
|
|
8683
|
+
// [Auto-translated] "Year ends with"
|
|
8684
|
+
groupedYearsAxisTitle: "L'anno si chiude con"
|
|
8445
8685
|
};
|
|
8446
8686
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "it", strings: italianStrings, nativeName: "Italiano" });
|
|
8447
8687
|
|
|
@@ -8625,7 +8865,39 @@ var japaneseStrings = {
|
|
|
8625
8865
|
// [Auto-translated] "Groups:"
|
|
8626
8866
|
axisYAlternativeSelectorTitle: "グループ:",
|
|
8627
8867
|
// [Auto-translated] "Not selected"
|
|
8628
|
-
notSelected: "選択されていない"
|
|
8868
|
+
notSelected: "選択されていない",
|
|
8869
|
+
// [Auto-translated] "Default"
|
|
8870
|
+
intervalMode_default: "デフォルト",
|
|
8871
|
+
// [Auto-translated] "Decades"
|
|
8872
|
+
intervalMode_decades: "数 十 年",
|
|
8873
|
+
// [Auto-translated] "Years"
|
|
8874
|
+
intervalMode_years: "月日",
|
|
8875
|
+
// [Auto-translated] "Quarters"
|
|
8876
|
+
intervalMode_quarters: "四半期",
|
|
8877
|
+
// [Auto-translated] "Months"
|
|
8878
|
+
intervalMode_months: "月",
|
|
8879
|
+
// [Auto-translated] "Days"
|
|
8880
|
+
intervalMode_days: "日",
|
|
8881
|
+
// [Auto-translated] "Custom"
|
|
8882
|
+
intervalMode_custom: "習慣",
|
|
8883
|
+
// [Auto-translated] "Auto"
|
|
8884
|
+
intervalMode_auto: "自動",
|
|
8885
|
+
// [Auto-translated] "Intervals:"
|
|
8886
|
+
intervalModeTitle: "間隔:",
|
|
8887
|
+
// [Auto-translated] "Show individual values"
|
|
8888
|
+
noRunningTotals: "個々の値を表示する",
|
|
8889
|
+
// [Auto-translated] "Show running totals"
|
|
8890
|
+
runningTotals: "累計を表示する",
|
|
8891
|
+
// [Auto-translated] "Compare periods"
|
|
8892
|
+
groupDateSeries: "期間の比較",
|
|
8893
|
+
// [Auto-translated] "View timeline"
|
|
8894
|
+
ungroupDateSeries: "タイムラインの表示",
|
|
8895
|
+
// [Auto-translated] "None"
|
|
8896
|
+
noneAggregateText: "何一つ",
|
|
8897
|
+
// [Auto-translated] "Aggregate:"
|
|
8898
|
+
selectAggregateText: "骨材:",
|
|
8899
|
+
// [Auto-translated] "Year ends with"
|
|
8900
|
+
groupedYearsAxisTitle: "年末は"
|
|
8629
8901
|
};
|
|
8630
8902
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "ja", strings: japaneseStrings, nativeName: "日本語" });
|
|
8631
8903
|
|
|
@@ -8809,7 +9081,39 @@ var norwegianStrings = {
|
|
|
8809
9081
|
// [Auto-translated] "Groups:"
|
|
8810
9082
|
axisYAlternativeSelectorTitle: "Grupper:",
|
|
8811
9083
|
// [Auto-translated] "Not selected"
|
|
8812
|
-
notSelected: "Ikke valgt"
|
|
9084
|
+
notSelected: "Ikke valgt",
|
|
9085
|
+
// [Auto-translated] "Default"
|
|
9086
|
+
intervalMode_default: "Standard",
|
|
9087
|
+
// [Auto-translated] "Decades"
|
|
9088
|
+
intervalMode_decades: "Tiår",
|
|
9089
|
+
// [Auto-translated] "Years"
|
|
9090
|
+
intervalMode_years: "År",
|
|
9091
|
+
// [Auto-translated] "Quarters"
|
|
9092
|
+
intervalMode_quarters: "Kvartaler",
|
|
9093
|
+
// [Auto-translated] "Months"
|
|
9094
|
+
intervalMode_months: "Måneder",
|
|
9095
|
+
// [Auto-translated] "Days"
|
|
9096
|
+
intervalMode_days: "Dager",
|
|
9097
|
+
// [Auto-translated] "Custom"
|
|
9098
|
+
intervalMode_custom: "Skikk",
|
|
9099
|
+
// [Auto-translated] "Auto"
|
|
9100
|
+
intervalMode_auto: "Auto",
|
|
9101
|
+
// [Auto-translated] "Intervals:"
|
|
9102
|
+
intervalModeTitle: "Intervaller:",
|
|
9103
|
+
// [Auto-translated] "Show individual values"
|
|
9104
|
+
noRunningTotals: "Vis individuelle verdier",
|
|
9105
|
+
// [Auto-translated] "Show running totals"
|
|
9106
|
+
runningTotals: "Vis løpende totaler",
|
|
9107
|
+
// [Auto-translated] "Compare periods"
|
|
9108
|
+
groupDateSeries: "Sammenlign perioder",
|
|
9109
|
+
// [Auto-translated] "View timeline"
|
|
9110
|
+
ungroupDateSeries: "Vis tidslinje",
|
|
9111
|
+
// [Auto-translated] "None"
|
|
9112
|
+
noneAggregateText: "Ingen",
|
|
9113
|
+
// [Auto-translated] "Aggregate:"
|
|
9114
|
+
selectAggregateText: "Samlet:",
|
|
9115
|
+
// [Auto-translated] "Year ends with"
|
|
9116
|
+
groupedYearsAxisTitle: "Året avsluttes med"
|
|
8813
9117
|
};
|
|
8814
9118
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "no", strings: norwegianStrings, nativeName: "Norsk" });
|
|
8815
9119
|
|
|
@@ -8993,7 +9297,39 @@ var plStrings = {
|
|
|
8993
9297
|
// [Auto-translated] "Groups:"
|
|
8994
9298
|
axisYAlternativeSelectorTitle: "Grupy:",
|
|
8995
9299
|
// [Auto-translated] "Not selected"
|
|
8996
|
-
notSelected: "Nie wybrano"
|
|
9300
|
+
notSelected: "Nie wybrano",
|
|
9301
|
+
// [Auto-translated] "Default"
|
|
9302
|
+
intervalMode_default: "Domyślny",
|
|
9303
|
+
// [Auto-translated] "Decades"
|
|
9304
|
+
intervalMode_decades: "Dziesięciolecia",
|
|
9305
|
+
// [Auto-translated] "Years"
|
|
9306
|
+
intervalMode_years: "Lata",
|
|
9307
|
+
// [Auto-translated] "Quarters"
|
|
9308
|
+
intervalMode_quarters: "Kwartałów",
|
|
9309
|
+
// [Auto-translated] "Months"
|
|
9310
|
+
intervalMode_months: "Miesiące",
|
|
9311
|
+
// [Auto-translated] "Days"
|
|
9312
|
+
intervalMode_days: "Dni",
|
|
9313
|
+
// [Auto-translated] "Custom"
|
|
9314
|
+
intervalMode_custom: "Zwyczaj",
|
|
9315
|
+
// [Auto-translated] "Auto"
|
|
9316
|
+
intervalMode_auto: "Automatycznie",
|
|
9317
|
+
// [Auto-translated] "Intervals:"
|
|
9318
|
+
intervalModeTitle: "Odstępach czasu:",
|
|
9319
|
+
// [Auto-translated] "Show individual values"
|
|
9320
|
+
noRunningTotals: "Pokaż poszczególne wartości",
|
|
9321
|
+
// [Auto-translated] "Show running totals"
|
|
9322
|
+
runningTotals: "Pokazywanie sum bieżących",
|
|
9323
|
+
// [Auto-translated] "Compare periods"
|
|
9324
|
+
groupDateSeries: "Porównywanie okresów",
|
|
9325
|
+
// [Auto-translated] "View timeline"
|
|
9326
|
+
ungroupDateSeries: "Wyświetl oś czasu",
|
|
9327
|
+
// [Auto-translated] "None"
|
|
9328
|
+
noneAggregateText: "Żaden",
|
|
9329
|
+
// [Auto-translated] "Aggregate:"
|
|
9330
|
+
selectAggregateText: "Kruszywo:",
|
|
9331
|
+
// [Auto-translated] "Year ends with"
|
|
9332
|
+
groupedYearsAxisTitle: "Rok kończy się na"
|
|
8997
9333
|
};
|
|
8998
9334
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "pl", strings: plStrings, nativeName: "Polski" });
|
|
8999
9335
|
|
|
@@ -9177,7 +9513,39 @@ var portugueseStrings = {
|
|
|
9177
9513
|
// [Auto-translated] "Groups:"
|
|
9178
9514
|
axisYAlternativeSelectorTitle: "Grupos:",
|
|
9179
9515
|
// [Auto-translated] "Not selected"
|
|
9180
|
-
notSelected: "Não selecionado"
|
|
9516
|
+
notSelected: "Não selecionado",
|
|
9517
|
+
// [Auto-translated] "Default"
|
|
9518
|
+
intervalMode_default: "Inadimplência",
|
|
9519
|
+
// [Auto-translated] "Decades"
|
|
9520
|
+
intervalMode_decades: "Décadas",
|
|
9521
|
+
// [Auto-translated] "Years"
|
|
9522
|
+
intervalMode_years: "Anos",
|
|
9523
|
+
// [Auto-translated] "Quarters"
|
|
9524
|
+
intervalMode_quarters: "Quartos",
|
|
9525
|
+
// [Auto-translated] "Months"
|
|
9526
|
+
intervalMode_months: "Meses",
|
|
9527
|
+
// [Auto-translated] "Days"
|
|
9528
|
+
intervalMode_days: "Dias",
|
|
9529
|
+
// [Auto-translated] "Custom"
|
|
9530
|
+
intervalMode_custom: "Costume",
|
|
9531
|
+
// [Auto-translated] "Auto"
|
|
9532
|
+
intervalMode_auto: "Automático",
|
|
9533
|
+
// [Auto-translated] "Intervals:"
|
|
9534
|
+
intervalModeTitle: "Intervalos:",
|
|
9535
|
+
// [Auto-translated] "Show individual values"
|
|
9536
|
+
noRunningTotals: "Mostrar valores individuais",
|
|
9537
|
+
// [Auto-translated] "Show running totals"
|
|
9538
|
+
runningTotals: "Mostrar totais acumulados",
|
|
9539
|
+
// [Auto-translated] "Compare periods"
|
|
9540
|
+
groupDateSeries: "Comparar períodos",
|
|
9541
|
+
// [Auto-translated] "View timeline"
|
|
9542
|
+
ungroupDateSeries: "Ver linha do tempo",
|
|
9543
|
+
// [Auto-translated] "None"
|
|
9544
|
+
noneAggregateText: "Nenhum",
|
|
9545
|
+
// [Auto-translated] "Aggregate:"
|
|
9546
|
+
selectAggregateText: "Agregado:",
|
|
9547
|
+
// [Auto-translated] "Year ends with"
|
|
9548
|
+
groupedYearsAxisTitle: "O ano termina com"
|
|
9181
9549
|
};
|
|
9182
9550
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "pt", strings: portugueseStrings, nativeName: "Português" });
|
|
9183
9551
|
|
|
@@ -9361,7 +9729,39 @@ var russianStrings = {
|
|
|
9361
9729
|
// [Auto-translated] "Groups:"
|
|
9362
9730
|
axisYAlternativeSelectorTitle: "Группы:",
|
|
9363
9731
|
// [Auto-translated] "Not selected"
|
|
9364
|
-
notSelected: "Не выбрано"
|
|
9732
|
+
notSelected: "Не выбрано",
|
|
9733
|
+
// [Auto-translated] "Default"
|
|
9734
|
+
intervalMode_default: "По умолчанию",
|
|
9735
|
+
// [Auto-translated] "Decades"
|
|
9736
|
+
intervalMode_decades: "Десятилетий",
|
|
9737
|
+
// [Auto-translated] "Years"
|
|
9738
|
+
intervalMode_years: "Годы",
|
|
9739
|
+
// [Auto-translated] "Quarters"
|
|
9740
|
+
intervalMode_quarters: "Квартира",
|
|
9741
|
+
// [Auto-translated] "Months"
|
|
9742
|
+
intervalMode_months: "Месяцы",
|
|
9743
|
+
// [Auto-translated] "Days"
|
|
9744
|
+
intervalMode_days: "Дни недели",
|
|
9745
|
+
// [Auto-translated] "Custom"
|
|
9746
|
+
intervalMode_custom: "Обычай",
|
|
9747
|
+
// [Auto-translated] "Auto"
|
|
9748
|
+
intervalMode_auto: "Авто",
|
|
9749
|
+
// [Auto-translated] "Intervals:"
|
|
9750
|
+
intervalModeTitle: "Интервалы:",
|
|
9751
|
+
// [Auto-translated] "Show individual values"
|
|
9752
|
+
noRunningTotals: "Отображение отдельных значений",
|
|
9753
|
+
// [Auto-translated] "Show running totals"
|
|
9754
|
+
runningTotals: "Показать промежуточные итоги",
|
|
9755
|
+
// [Auto-translated] "Compare periods"
|
|
9756
|
+
groupDateSeries: "Сравнение периодов",
|
|
9757
|
+
// [Auto-translated] "View timeline"
|
|
9758
|
+
ungroupDateSeries: "Просмотр временной шкалы",
|
|
9759
|
+
// [Auto-translated] "None"
|
|
9760
|
+
noneAggregateText: "Никакой",
|
|
9761
|
+
// [Auto-translated] "Aggregate:"
|
|
9762
|
+
selectAggregateText: "Совокупность:",
|
|
9763
|
+
// [Auto-translated] "Year ends with"
|
|
9764
|
+
groupedYearsAxisTitle: "Год заканчивается с"
|
|
9365
9765
|
};
|
|
9366
9766
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "ru", strings: russianStrings, nativeName: "Русский" });
|
|
9367
9767
|
|
|
@@ -9545,7 +9945,39 @@ var spanishStrings = {
|
|
|
9545
9945
|
// [Auto-translated] "Groups:"
|
|
9546
9946
|
axisYAlternativeSelectorTitle: "Grupos:",
|
|
9547
9947
|
// [Auto-translated] "Not selected"
|
|
9548
|
-
notSelected: "No seleccionado"
|
|
9948
|
+
notSelected: "No seleccionado",
|
|
9949
|
+
// [Auto-translated] "Default"
|
|
9950
|
+
intervalMode_default: "Predeterminado",
|
|
9951
|
+
// [Auto-translated] "Decades"
|
|
9952
|
+
intervalMode_decades: "Décadas",
|
|
9953
|
+
// [Auto-translated] "Years"
|
|
9954
|
+
intervalMode_years: "Años",
|
|
9955
|
+
// [Auto-translated] "Quarters"
|
|
9956
|
+
intervalMode_quarters: "Alojamiento",
|
|
9957
|
+
// [Auto-translated] "Months"
|
|
9958
|
+
intervalMode_months: "Meses",
|
|
9959
|
+
// [Auto-translated] "Days"
|
|
9960
|
+
intervalMode_days: "Días",
|
|
9961
|
+
// [Auto-translated] "Custom"
|
|
9962
|
+
intervalMode_custom: "Costumbre",
|
|
9963
|
+
// [Auto-translated] "Auto"
|
|
9964
|
+
intervalMode_auto: "Automático",
|
|
9965
|
+
// [Auto-translated] "Intervals:"
|
|
9966
|
+
intervalModeTitle: "Intervalos:",
|
|
9967
|
+
// [Auto-translated] "Show individual values"
|
|
9968
|
+
noRunningTotals: "Mostrar valores individuales",
|
|
9969
|
+
// [Auto-translated] "Show running totals"
|
|
9970
|
+
runningTotals: "Mostrar totales acumulados",
|
|
9971
|
+
// [Auto-translated] "Compare periods"
|
|
9972
|
+
groupDateSeries: "Comparar períodos",
|
|
9973
|
+
// [Auto-translated] "View timeline"
|
|
9974
|
+
ungroupDateSeries: "Ver cronograma",
|
|
9975
|
+
// [Auto-translated] "None"
|
|
9976
|
+
noneAggregateText: "Ninguno",
|
|
9977
|
+
// [Auto-translated] "Aggregate:"
|
|
9978
|
+
selectAggregateText: "Agregado:",
|
|
9979
|
+
// [Auto-translated] "Year ends with"
|
|
9980
|
+
groupedYearsAxisTitle: "El año termina con"
|
|
9549
9981
|
};
|
|
9550
9982
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "es", strings: spanishStrings, nativeName: "Español" });
|
|
9551
9983
|
|
|
@@ -9729,7 +10161,39 @@ var swedishStrings = {
|
|
|
9729
10161
|
// [Auto-translated] "Groups:"
|
|
9730
10162
|
axisYAlternativeSelectorTitle: "Grupper:",
|
|
9731
10163
|
// [Auto-translated] "Not selected"
|
|
9732
|
-
notSelected: "Inte valt"
|
|
10164
|
+
notSelected: "Inte valt",
|
|
10165
|
+
// [Auto-translated] "Default"
|
|
10166
|
+
intervalMode_default: "Standard",
|
|
10167
|
+
// [Auto-translated] "Decades"
|
|
10168
|
+
intervalMode_decades: "Årtionden",
|
|
10169
|
+
// [Auto-translated] "Years"
|
|
10170
|
+
intervalMode_years: "År",
|
|
10171
|
+
// [Auto-translated] "Quarters"
|
|
10172
|
+
intervalMode_quarters: "Bostad",
|
|
10173
|
+
// [Auto-translated] "Months"
|
|
10174
|
+
intervalMode_months: "Månader",
|
|
10175
|
+
// [Auto-translated] "Days"
|
|
10176
|
+
intervalMode_days: "Dagar",
|
|
10177
|
+
// [Auto-translated] "Custom"
|
|
10178
|
+
intervalMode_custom: "Sed",
|
|
10179
|
+
// [Auto-translated] "Auto"
|
|
10180
|
+
intervalMode_auto: "Bil",
|
|
10181
|
+
// [Auto-translated] "Intervals:"
|
|
10182
|
+
intervalModeTitle: "Mellanrum:",
|
|
10183
|
+
// [Auto-translated] "Show individual values"
|
|
10184
|
+
noRunningTotals: "Visa individuella värden",
|
|
10185
|
+
// [Auto-translated] "Show running totals"
|
|
10186
|
+
runningTotals: "Visa löpande totaler",
|
|
10187
|
+
// [Auto-translated] "Compare periods"
|
|
10188
|
+
groupDateSeries: "Jämför perioder",
|
|
10189
|
+
// [Auto-translated] "View timeline"
|
|
10190
|
+
ungroupDateSeries: "Visa tidslinjen",
|
|
10191
|
+
// [Auto-translated] "None"
|
|
10192
|
+
noneAggregateText: "Ingen",
|
|
10193
|
+
// [Auto-translated] "Aggregate:"
|
|
10194
|
+
selectAggregateText: "Aggregat:",
|
|
10195
|
+
// [Auto-translated] "Year ends with"
|
|
10196
|
+
groupedYearsAxisTitle: "Året slutar med"
|
|
9733
10197
|
};
|
|
9734
10198
|
(0,_localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale)({ localeCode: "sv", strings: swedishStrings, nativeName: "Svenska" });
|
|
9735
10199
|
|
|
@@ -9841,6 +10305,10 @@ var DataProvider = /** @class */ (function () {
|
|
|
9841
10305
|
if (_data === void 0) { _data = []; }
|
|
9842
10306
|
this._data = _data;
|
|
9843
10307
|
this.filterValues = {};
|
|
10308
|
+
/**
|
|
10309
|
+
* Fires when data has been changed.
|
|
10310
|
+
*/
|
|
10311
|
+
this.onFilterChanged = new survey_core__WEBPACK_IMPORTED_MODULE_0__.Event();
|
|
9844
10312
|
/**
|
|
9845
10313
|
* Fires when data has been changed.
|
|
9846
10314
|
*/
|
|
@@ -9887,13 +10355,17 @@ var DataProvider = /** @class */ (function () {
|
|
|
9887
10355
|
var filterValueType = typeof filterValue;
|
|
9888
10356
|
var questionValue = item[key];
|
|
9889
10357
|
if (Array.isArray(questionValue)) {
|
|
9890
|
-
if (filterValueType
|
|
10358
|
+
if (filterValueType === "object") {
|
|
10359
|
+
return !questionArrayValueContainsValue(questionValue, filterValue);
|
|
10360
|
+
}
|
|
10361
|
+
else {
|
|
9891
10362
|
return questionValue.indexOf(filterValue) == -1;
|
|
10363
|
+
}
|
|
9892
10364
|
}
|
|
9893
10365
|
if (typeof questionValue === "object") {
|
|
9894
10366
|
if (filterValueType !== "object")
|
|
9895
10367
|
return true;
|
|
9896
|
-
return !
|
|
10368
|
+
return !questionValueContainsValue(questionValue, filterValue);
|
|
9897
10369
|
}
|
|
9898
10370
|
var seriesValue = item[DataProvider.seriesMarkerKey];
|
|
9899
10371
|
if (!!seriesValue && filterValueType === "object") {
|
|
@@ -9929,16 +10401,38 @@ var DataProvider = /** @class */ (function () {
|
|
|
9929
10401
|
var filterChanged = true;
|
|
9930
10402
|
if (selectedValue !== undefined) {
|
|
9931
10403
|
filterChanged = this.filterValues[questionName] !== selectedValue;
|
|
9932
|
-
|
|
10404
|
+
if (filterChanged) {
|
|
10405
|
+
this.filterValues[questionName] = selectedValue;
|
|
10406
|
+
}
|
|
9933
10407
|
}
|
|
9934
10408
|
else {
|
|
9935
10409
|
filterChanged = this.filterValues[questionName] !== undefined;
|
|
9936
|
-
|
|
10410
|
+
if (filterChanged) {
|
|
10411
|
+
delete this.filterValues[questionName];
|
|
10412
|
+
}
|
|
9937
10413
|
}
|
|
9938
10414
|
if (filterChanged) {
|
|
10415
|
+
this.raiseFilterChanged(questionName, selectedValue);
|
|
9939
10416
|
this.raiseDataChanged();
|
|
9940
10417
|
}
|
|
9941
10418
|
};
|
|
10419
|
+
/**
|
|
10420
|
+
* Resets filter.
|
|
10421
|
+
*/
|
|
10422
|
+
DataProvider.prototype.resetFilter = function () {
|
|
10423
|
+
var _this = this;
|
|
10424
|
+
if (Object.keys(this.filterValues).length === 0) {
|
|
10425
|
+
return;
|
|
10426
|
+
}
|
|
10427
|
+
Object.keys(this.filterValues).forEach(function (key) { return delete _this.filterValues[key]; });
|
|
10428
|
+
this.raiseFilterChanged();
|
|
10429
|
+
this.raiseDataChanged();
|
|
10430
|
+
};
|
|
10431
|
+
DataProvider.prototype.raiseFilterChanged = function (questionName, selectedValue) {
|
|
10432
|
+
if (!this.onFilterChanged.isEmpty) {
|
|
10433
|
+
this.onFilterChanged.fire(this, { questionName: questionName, selectedValue: selectedValue });
|
|
10434
|
+
}
|
|
10435
|
+
};
|
|
9942
10436
|
DataProvider.prototype.raiseDataChanged = function (questionName) {
|
|
9943
10437
|
this._filteredData = undefined;
|
|
9944
10438
|
if (!this.onDataChanged.isEmpty) {
|
|
@@ -9949,11 +10443,33 @@ var DataProvider = /** @class */ (function () {
|
|
|
9949
10443
|
var _this = this;
|
|
9950
10444
|
return Object.keys(this.filterValues).map(function (key) { return ({ field: key, type: "=", value: _this.filterValues[key] }); });
|
|
9951
10445
|
};
|
|
10446
|
+
DataProvider.prototype.fixDropdownData = function (dataNames) {
|
|
10447
|
+
(this.data || []).forEach(function (dataItem) {
|
|
10448
|
+
var rawDataItem = dataItem[dataNames[0]];
|
|
10449
|
+
if (!!rawDataItem && typeof rawDataItem === "object" && !Array.isArray(rawDataItem)) {
|
|
10450
|
+
var arrayData_1 = [];
|
|
10451
|
+
Object.keys(rawDataItem).forEach(function (key) {
|
|
10452
|
+
var nestedDataItem = Object.assign({}, rawDataItem[key]);
|
|
10453
|
+
nestedDataItem[DataProvider.seriesMarkerKey] = key;
|
|
10454
|
+
arrayData_1.push(nestedDataItem);
|
|
10455
|
+
});
|
|
10456
|
+
dataItem[dataNames[0]] = arrayData_1;
|
|
10457
|
+
}
|
|
10458
|
+
});
|
|
10459
|
+
};
|
|
9952
10460
|
DataProvider.seriesMarkerKey = "__sa_series_name";
|
|
9953
10461
|
return DataProvider;
|
|
9954
10462
|
}());
|
|
9955
10463
|
|
|
9956
|
-
function
|
|
10464
|
+
function questionArrayValueContainsValue(questionValues, filterValue) {
|
|
10465
|
+
for (var i = 0; i < questionValues.length; i++) {
|
|
10466
|
+
if (questionValueContainsValue(questionValues[i], filterValue)) {
|
|
10467
|
+
return true;
|
|
10468
|
+
}
|
|
10469
|
+
}
|
|
10470
|
+
return false;
|
|
10471
|
+
}
|
|
10472
|
+
function questionValueContainsValue(questionValue, filterValue) {
|
|
9957
10473
|
var questionValueKeys = Object.keys(questionValue);
|
|
9958
10474
|
var filterValueKeys = Object.keys(filterValue);
|
|
9959
10475
|
if (filterValueKeys.length > questionValueKeys.length)
|
|
@@ -10029,7 +10545,9 @@ var FilterInfo = /** @class */ (function () {
|
|
|
10029
10545
|
"use strict";
|
|
10030
10546
|
__webpack_require__.r(__webpack_exports__);
|
|
10031
10547
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10032
|
-
/* harmony export */ HistogramModel: () => (/* binding */ HistogramModel)
|
|
10548
|
+
/* harmony export */ HistogramModel: () => (/* binding */ HistogramModel),
|
|
10549
|
+
/* harmony export */ getBestIntervalMode: () => (/* binding */ getBestIntervalMode),
|
|
10550
|
+
/* harmony export */ intervalCalculators: () => (/* binding */ intervalCalculators)
|
|
10033
10551
|
/* harmony export */ });
|
|
10034
10552
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
|
|
10035
10553
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
@@ -10038,12 +10556,154 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10038
10556
|
/* harmony import */ var _selectBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectBase */ "./src/selectBase.ts");
|
|
10039
10557
|
/* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
|
|
10040
10558
|
/* harmony import */ var _statisticCalculators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./statisticCalculators */ "./src/statisticCalculators.ts");
|
|
10559
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils */ "./src/utils/index.ts");
|
|
10560
|
+
/* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
|
|
10561
|
+
|
|
10041
10562
|
|
|
10042
10563
|
|
|
10043
10564
|
|
|
10044
10565
|
|
|
10045
10566
|
|
|
10046
10567
|
|
|
10568
|
+
|
|
10569
|
+
function getQuarter(date) {
|
|
10570
|
+
switch (Math.floor(date.getMonth() / 3) + 1) {
|
|
10571
|
+
case 1: return "I";
|
|
10572
|
+
case 2: return "II";
|
|
10573
|
+
case 3: return "III";
|
|
10574
|
+
case 4: return "IV";
|
|
10575
|
+
}
|
|
10576
|
+
}
|
|
10577
|
+
function getBestIntervalMode(min, max) {
|
|
10578
|
+
var start = new Date(min);
|
|
10579
|
+
var end = new Date(max);
|
|
10580
|
+
var totalMonths = (end.getFullYear() - start.getFullYear()) * 12 + (end.getMonth() - start.getMonth());
|
|
10581
|
+
if (totalMonths > 10 * 12)
|
|
10582
|
+
return "decades";
|
|
10583
|
+
if (totalMonths > 2 * 12)
|
|
10584
|
+
return "years";
|
|
10585
|
+
if (totalMonths > 1 * 12)
|
|
10586
|
+
return "quarters";
|
|
10587
|
+
if (totalMonths > 4)
|
|
10588
|
+
return "months";
|
|
10589
|
+
return "days";
|
|
10590
|
+
}
|
|
10591
|
+
var intervalCalculators = {
|
|
10592
|
+
decades: function (min, max) {
|
|
10593
|
+
var intervals = [];
|
|
10594
|
+
var start = new Date(min);
|
|
10595
|
+
start.setFullYear(Math.floor(start.getFullYear() / 10) * 10);
|
|
10596
|
+
start.setMonth(0);
|
|
10597
|
+
start.setDate(1);
|
|
10598
|
+
start.setHours(0, 0, 0, 0);
|
|
10599
|
+
var startYear = start.getFullYear();
|
|
10600
|
+
var end = new Date(max);
|
|
10601
|
+
var endYear = end.getFullYear();
|
|
10602
|
+
while (startYear <= endYear) {
|
|
10603
|
+
var intervalStart = new Date(startYear, 0, 1);
|
|
10604
|
+
var intervalEnd = new Date(startYear + 10, 0, 1);
|
|
10605
|
+
intervals.push({
|
|
10606
|
+
start: intervalStart.getTime(),
|
|
10607
|
+
end: intervalEnd.getTime(),
|
|
10608
|
+
label: "" + startYear + "s"
|
|
10609
|
+
});
|
|
10610
|
+
startYear += 10;
|
|
10611
|
+
}
|
|
10612
|
+
return intervals;
|
|
10613
|
+
},
|
|
10614
|
+
years: function (min, max) {
|
|
10615
|
+
var intervals = [];
|
|
10616
|
+
var start = new Date(min);
|
|
10617
|
+
start.setMonth(0);
|
|
10618
|
+
start.setDate(1);
|
|
10619
|
+
start.setHours(0, 0, 0, 0);
|
|
10620
|
+
var startYear = start.getFullYear();
|
|
10621
|
+
var end = new Date(max);
|
|
10622
|
+
var endYear = end.getFullYear();
|
|
10623
|
+
while (startYear <= endYear) {
|
|
10624
|
+
var intervalStart = new Date(startYear, 0, 1);
|
|
10625
|
+
var intervalEnd = new Date(startYear + 1, 0, 1);
|
|
10626
|
+
intervals.push({
|
|
10627
|
+
start: intervalStart.getTime(),
|
|
10628
|
+
end: intervalEnd.getTime(),
|
|
10629
|
+
label: "" + startYear
|
|
10630
|
+
});
|
|
10631
|
+
startYear++;
|
|
10632
|
+
}
|
|
10633
|
+
return intervals;
|
|
10634
|
+
},
|
|
10635
|
+
months: function (min, max) {
|
|
10636
|
+
var intervals = [];
|
|
10637
|
+
var start = new Date(min);
|
|
10638
|
+
start.setDate(1);
|
|
10639
|
+
start.setHours(0, 0, 0, 0);
|
|
10640
|
+
var startYear = start.getFullYear();
|
|
10641
|
+
var startMonth = start.getMonth();
|
|
10642
|
+
var end = new Date(max);
|
|
10643
|
+
var endYear = end.getFullYear();
|
|
10644
|
+
var endMonth = end.getMonth();
|
|
10645
|
+
while (startYear < endYear || (startYear === endYear && startMonth <= endMonth)) {
|
|
10646
|
+
var intervalStart = new Date(startYear, startMonth, 1);
|
|
10647
|
+
var intervalEnd = new Date(startYear, startMonth + 1, 1);
|
|
10648
|
+
intervals.push({
|
|
10649
|
+
start: intervalStart.getTime(),
|
|
10650
|
+
end: intervalEnd.getTime(),
|
|
10651
|
+
label: intervalStart.toLocaleDateString(undefined, { year: "numeric", month: "short" })
|
|
10652
|
+
});
|
|
10653
|
+
startMonth++;
|
|
10654
|
+
if (startMonth >= 12) {
|
|
10655
|
+
startMonth = 0;
|
|
10656
|
+
startYear++;
|
|
10657
|
+
}
|
|
10658
|
+
}
|
|
10659
|
+
return intervals;
|
|
10660
|
+
},
|
|
10661
|
+
quarters: function (min, max) {
|
|
10662
|
+
var intervals = [];
|
|
10663
|
+
var start = new Date(min);
|
|
10664
|
+
start.setDate(1);
|
|
10665
|
+
start.setHours(0, 0, 0, 0);
|
|
10666
|
+
var startYear = start.getFullYear();
|
|
10667
|
+
var startMonth = start.getMonth();
|
|
10668
|
+
var end = new Date(max);
|
|
10669
|
+
var endYear = end.getFullYear();
|
|
10670
|
+
var endMonth = end.getMonth();
|
|
10671
|
+
while (startYear < endYear || (startYear === endYear && startMonth <= endMonth)) {
|
|
10672
|
+
var intervalStart = new Date(startYear, startMonth, 1);
|
|
10673
|
+
var intervalEnd = new Date(startYear, startMonth + 3, 1);
|
|
10674
|
+
intervals.push({
|
|
10675
|
+
start: intervalStart.getTime(),
|
|
10676
|
+
end: intervalEnd.getTime(),
|
|
10677
|
+
label: getQuarter(intervalStart) + " " + intervalStart.getFullYear().toString()
|
|
10678
|
+
});
|
|
10679
|
+
startMonth += 3;
|
|
10680
|
+
if (startMonth >= 12) {
|
|
10681
|
+
startMonth = startMonth % 12;
|
|
10682
|
+
startYear++;
|
|
10683
|
+
}
|
|
10684
|
+
}
|
|
10685
|
+
return intervals;
|
|
10686
|
+
},
|
|
10687
|
+
days: function (min, max) {
|
|
10688
|
+
var intervals = [];
|
|
10689
|
+
var start = new Date(min);
|
|
10690
|
+
start.setHours(0, 0, 0, 0);
|
|
10691
|
+
var end = new Date(max);
|
|
10692
|
+
end.setHours(0, 0, 0, 0);
|
|
10693
|
+
while (start <= end) {
|
|
10694
|
+
var intervalStart = new Date(start);
|
|
10695
|
+
var intervalEnd = new Date(start);
|
|
10696
|
+
intervalEnd.setDate(intervalEnd.getDate() + 1);
|
|
10697
|
+
intervals.push({
|
|
10698
|
+
start: intervalStart.getTime(),
|
|
10699
|
+
end: intervalEnd.getTime(),
|
|
10700
|
+
label: intervalStart.toLocaleDateString()
|
|
10701
|
+
});
|
|
10702
|
+
start.setDate(start.getDate() + 1);
|
|
10703
|
+
}
|
|
10704
|
+
return intervals;
|
|
10705
|
+
}
|
|
10706
|
+
};
|
|
10047
10707
|
var HistogramModel = /** @class */ (function (_super) {
|
|
10048
10708
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(HistogramModel, _super);
|
|
10049
10709
|
function HistogramModel(question, data, options, name) {
|
|
@@ -10053,6 +10713,14 @@ var HistogramModel = /** @class */ (function (_super) {
|
|
|
10053
10713
|
_this._continuousData = undefined;
|
|
10054
10714
|
_this._cachedIntervals = undefined;
|
|
10055
10715
|
_this._intervalPrecision = 2;
|
|
10716
|
+
_this.showRunningTotalsBtn = undefined;
|
|
10717
|
+
_this.showGroupedBtn = undefined;
|
|
10718
|
+
_this.changeIntervalsModeSelector = undefined;
|
|
10719
|
+
_this.aggregateDataNameSelector = undefined;
|
|
10720
|
+
_this.intervalModes = ["auto", "decades", "years", "quarters", "months", "days"];
|
|
10721
|
+
_this._showRunningTotals = false;
|
|
10722
|
+
_this._showGrouped = false;
|
|
10723
|
+
_this._aggregateDataName = "";
|
|
10056
10724
|
_this._transposeData = false;
|
|
10057
10725
|
if (_this.options.intervalPrecision !== undefined) {
|
|
10058
10726
|
_this._intervalPrecision = _this.options.intervalPrecision;
|
|
@@ -10064,8 +10732,63 @@ var HistogramModel = /** @class */ (function (_super) {
|
|
|
10064
10732
|
else {
|
|
10065
10733
|
_this.valueType = "number";
|
|
10066
10734
|
}
|
|
10735
|
+
_this._intervalsMode = _this.valueType === "date" ? "auto" : "default";
|
|
10736
|
+
if (_this.allowChangeIntervals) {
|
|
10737
|
+
_this.registerToolbarItem("changeIntervalsMode", function () {
|
|
10738
|
+
_this.changeIntervalsModeSelector = _utils__WEBPACK_IMPORTED_MODULE_6__.DocumentHelper.createSelector(_this.intervalModes.map(function (intervalModeValue) {
|
|
10739
|
+
return {
|
|
10740
|
+
value: intervalModeValue,
|
|
10741
|
+
text: _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("intervalMode_" + intervalModeValue),
|
|
10742
|
+
};
|
|
10743
|
+
}), function (option) { return _this.intervalsMode === option.value; }, function (e) {
|
|
10744
|
+
_this.intervalsMode = e.target.value;
|
|
10745
|
+
}, _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("intervalModeTitle"));
|
|
10746
|
+
return _this.changeIntervalsModeSelector;
|
|
10747
|
+
});
|
|
10748
|
+
}
|
|
10749
|
+
if (_this.possibleAggregateDataNames.length > 0) {
|
|
10750
|
+
_this.registerToolbarItem("aggregateDataName", function () {
|
|
10751
|
+
var choices = _this.possibleAggregateDataNames.map(function (dataName) {
|
|
10752
|
+
return typeof dataName === "string" ? { value: dataName, text: dataName } : dataName;
|
|
10753
|
+
});
|
|
10754
|
+
choices.unshift({ value: "", text: _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("noneAggregateText") }),
|
|
10755
|
+
_this.aggregateDataNameSelector = _utils__WEBPACK_IMPORTED_MODULE_6__.DocumentHelper.createSelector(choices, function (option) { return _this.aggregateDataName === option.value; }, function (e) {
|
|
10756
|
+
_this.aggregateDataName = e.target.value;
|
|
10757
|
+
}, _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("selectAggregateText"));
|
|
10758
|
+
_this.updateAggregateDataNameSelector();
|
|
10759
|
+
return _this.aggregateDataNameSelector;
|
|
10760
|
+
});
|
|
10761
|
+
}
|
|
10762
|
+
if (_this.allowChangeIntervals && _this.options.allowRunningTotals) {
|
|
10763
|
+
_this.registerToolbarItem("showRunningTotals", function () {
|
|
10764
|
+
_this.showRunningTotalsBtn = _utils__WEBPACK_IMPORTED_MODULE_6__.DocumentHelper.createButton(function () {
|
|
10765
|
+
_this.showRunningTotals = !_this.showRunningTotals;
|
|
10766
|
+
});
|
|
10767
|
+
_this.updateShowRunningTotalsBtn();
|
|
10768
|
+
return _this.showRunningTotalsBtn;
|
|
10769
|
+
});
|
|
10770
|
+
}
|
|
10771
|
+
if (_this.allowChangeIntervals && _this.options.allowCompareDatePeriods) {
|
|
10772
|
+
_this.registerToolbarItem("showGrouped", function () {
|
|
10773
|
+
_this.showGroupedBtn = _utils__WEBPACK_IMPORTED_MODULE_6__.DocumentHelper.createButton(function () {
|
|
10774
|
+
_this.showGrouped = !_this.showGrouped;
|
|
10775
|
+
});
|
|
10776
|
+
_this.updateShowGroupedBtn();
|
|
10777
|
+
return _this.showGroupedBtn;
|
|
10778
|
+
});
|
|
10779
|
+
}
|
|
10067
10780
|
return _this;
|
|
10068
10781
|
}
|
|
10782
|
+
HistogramModel.prototype.updateIntervalsModeSelector = function () {
|
|
10783
|
+
if (!!this.changeIntervalsModeSelector) {
|
|
10784
|
+
this.changeIntervalsModeSelector.getElementsByTagName("select")[0].value = this.intervalsMode;
|
|
10785
|
+
}
|
|
10786
|
+
};
|
|
10787
|
+
HistogramModel.prototype.updateAggregateDataNameSelector = function () {
|
|
10788
|
+
if (!!this.aggregateDataNameSelector) {
|
|
10789
|
+
this.aggregateDataNameSelector.getElementsByTagName("select")[0].value = this.aggregateDataName;
|
|
10790
|
+
}
|
|
10791
|
+
};
|
|
10069
10792
|
HistogramModel.prototype.reset = function () {
|
|
10070
10793
|
this._continuousData = undefined;
|
|
10071
10794
|
this._cachedValues = undefined;
|
|
@@ -10107,6 +10830,17 @@ var HistogramModel = /** @class */ (function (_super) {
|
|
|
10107
10830
|
this.reset();
|
|
10108
10831
|
_super.prototype.onDataChanged.call(this);
|
|
10109
10832
|
};
|
|
10833
|
+
HistogramModel.prototype.onSelectionChanged = function (item) {
|
|
10834
|
+
if (item !== undefined && this.onDataItemSelected !== undefined) {
|
|
10835
|
+
if (this.valueType === "date") {
|
|
10836
|
+
var currIntervalCalueIndex = this.intervalModes.indexOf(this.intervalsMode);
|
|
10837
|
+
if (currIntervalCalueIndex > 0 && currIntervalCalueIndex < this.intervalModes.length - 1) {
|
|
10838
|
+
this.intervalsMode = this.intervalModes[currIntervalCalueIndex + 1];
|
|
10839
|
+
}
|
|
10840
|
+
}
|
|
10841
|
+
}
|
|
10842
|
+
_super.prototype.onSelectionChanged.call(this, item);
|
|
10843
|
+
};
|
|
10110
10844
|
HistogramModel.prototype.getContinuousValues = function () {
|
|
10111
10845
|
var _this = this;
|
|
10112
10846
|
if (this._cachedValues === undefined) {
|
|
@@ -10117,20 +10851,26 @@ var HistogramModel = /** @class */ (function (_super) {
|
|
|
10117
10851
|
this._continuousData = {};
|
|
10118
10852
|
series.forEach(function (seriesValue) { return _this._continuousData[seriesValue] = []; });
|
|
10119
10853
|
var hash_1 = {};
|
|
10120
|
-
this.data.forEach(function (
|
|
10121
|
-
var
|
|
10122
|
-
|
|
10123
|
-
var
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10854
|
+
this.data.forEach(function (dataRow) {
|
|
10855
|
+
var nestedDataRows = (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_5__.getNestedDataRows)(dataRow, _this);
|
|
10856
|
+
nestedDataRows.forEach(function (nestedDataRow) {
|
|
10857
|
+
var answerData = nestedDataRow[_this.dataNames[0]];
|
|
10858
|
+
if (answerData !== undefined) {
|
|
10859
|
+
var seriesValue = nestedDataRow[_dataProvider__WEBPACK_IMPORTED_MODULE_2__.DataProvider.seriesMarkerKey] || "";
|
|
10860
|
+
// TODO: _continuousData should be sorted in order to speed-up statistics calculation in the getData function
|
|
10861
|
+
_this._continuousData[seriesValue].push({ continuous: _this.getContinuousValue(answerData), row: nestedDataRow });
|
|
10862
|
+
hash_1[answerData] = answerData;
|
|
10863
|
+
}
|
|
10864
|
+
});
|
|
10128
10865
|
});
|
|
10129
|
-
this._cachedValues = Object.keys(hash_1).map(function (key) { return ({ original: hash_1[key], continuous: _this.getContinuousValue(key) }); });
|
|
10866
|
+
this._cachedValues = Object.keys(hash_1).map(function (key) { return ({ original: hash_1[key], continuous: _this.getContinuousValue(key), row: hash_1[key].row }); });
|
|
10130
10867
|
this._cachedValues.sort(function (a, b) { return a.continuous - b.continuous; });
|
|
10131
10868
|
}
|
|
10132
10869
|
return this._cachedValues;
|
|
10133
10870
|
};
|
|
10871
|
+
HistogramModel.prototype.isSupportSoftUpdateContent = function () {
|
|
10872
|
+
return false;
|
|
10873
|
+
};
|
|
10134
10874
|
HistogramModel.prototype.isSupportMissingAnswers = function () {
|
|
10135
10875
|
return false;
|
|
10136
10876
|
};
|
|
@@ -10187,18 +10927,24 @@ var HistogramModel = /** @class */ (function (_super) {
|
|
|
10187
10927
|
if (continuousValues.length) {
|
|
10188
10928
|
var start = continuousValues[0].continuous;
|
|
10189
10929
|
var end = continuousValues[continuousValues.length - 1].continuous;
|
|
10190
|
-
var
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
var
|
|
10196
|
-
|
|
10197
|
-
|
|
10198
|
-
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10930
|
+
var intervalsMode = this.intervalsMode === "auto" ? getBestIntervalMode(start, end) : this.intervalsMode;
|
|
10931
|
+
if (intervalCalculators[intervalsMode] !== undefined) {
|
|
10932
|
+
this._cachedIntervals = intervalCalculators[intervalsMode](start, end);
|
|
10933
|
+
}
|
|
10934
|
+
else {
|
|
10935
|
+
var intervalsCount = HistogramModel.IntervalsCount;
|
|
10936
|
+
var delta = (end - start) / intervalsCount;
|
|
10937
|
+
for (var i = 0; i < intervalsCount; ++i) {
|
|
10938
|
+
var next = start + delta;
|
|
10939
|
+
var istart = this.toPrecision(start);
|
|
10940
|
+
var inext = this.toPrecision(next);
|
|
10941
|
+
this._cachedIntervals.push({
|
|
10942
|
+
start: istart,
|
|
10943
|
+
end: i < intervalsCount - 1 ? inext : inext + delta / 100,
|
|
10944
|
+
label: "" + this.getString(istart) + "-" + this.getString(inext)
|
|
10945
|
+
});
|
|
10946
|
+
start = next;
|
|
10947
|
+
}
|
|
10202
10948
|
}
|
|
10203
10949
|
}
|
|
10204
10950
|
}
|
|
@@ -10207,12 +10953,241 @@ var HistogramModel = /** @class */ (function (_super) {
|
|
|
10207
10953
|
enumerable: false,
|
|
10208
10954
|
configurable: true
|
|
10209
10955
|
});
|
|
10956
|
+
Object.defineProperty(HistogramModel.prototype, "intervalsMode", {
|
|
10957
|
+
get: function () {
|
|
10958
|
+
if (this.hasCustomIntervals)
|
|
10959
|
+
return "custom";
|
|
10960
|
+
return this._intervalsMode;
|
|
10961
|
+
},
|
|
10962
|
+
set: function (val) {
|
|
10963
|
+
if (this.allowChangeIntervals && this._intervalsMode !== val) {
|
|
10964
|
+
this._intervalsMode = val;
|
|
10965
|
+
if (!this.canShowGroupedDateSeries) {
|
|
10966
|
+
this._showGrouped = false;
|
|
10967
|
+
}
|
|
10968
|
+
this.updateIntervalsModeSelector();
|
|
10969
|
+
this.updateShowGroupedBtn();
|
|
10970
|
+
this.onDataChanged();
|
|
10971
|
+
}
|
|
10972
|
+
},
|
|
10973
|
+
enumerable: false,
|
|
10974
|
+
configurable: true
|
|
10975
|
+
});
|
|
10976
|
+
Object.defineProperty(HistogramModel.prototype, "allowChangeIntervals", {
|
|
10977
|
+
get: function () {
|
|
10978
|
+
return this.valueType === "date" && !this.hasCustomIntervals && this.options.allowChangeIntervals === true;
|
|
10979
|
+
},
|
|
10980
|
+
enumerable: false,
|
|
10981
|
+
configurable: true
|
|
10982
|
+
});
|
|
10983
|
+
Object.defineProperty(HistogramModel.prototype, "showRunningTotals", {
|
|
10984
|
+
get: function () {
|
|
10985
|
+
return this._showRunningTotals;
|
|
10986
|
+
},
|
|
10987
|
+
set: function (val) {
|
|
10988
|
+
this._showRunningTotals = val;
|
|
10989
|
+
this.updateShowRunningTotalsBtn();
|
|
10990
|
+
this.stateChanged("showRunningTotals", val);
|
|
10991
|
+
this.refreshContent();
|
|
10992
|
+
},
|
|
10993
|
+
enumerable: false,
|
|
10994
|
+
configurable: true
|
|
10995
|
+
});
|
|
10996
|
+
HistogramModel.prototype.updateShowRunningTotalsBtn = function () {
|
|
10997
|
+
if (!!this.showRunningTotalsBtn) {
|
|
10998
|
+
this.showRunningTotalsBtn.innerText = this.showRunningTotals
|
|
10999
|
+
? _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("noRunningTotals")
|
|
11000
|
+
: _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("runningTotals");
|
|
11001
|
+
}
|
|
11002
|
+
};
|
|
11003
|
+
Object.defineProperty(HistogramModel.prototype, "showGrouped", {
|
|
11004
|
+
get: function () {
|
|
11005
|
+
return this._showGrouped;
|
|
11006
|
+
},
|
|
11007
|
+
set: function (val) {
|
|
11008
|
+
this._showGrouped = val;
|
|
11009
|
+
this.updateShowGroupedBtn();
|
|
11010
|
+
this.stateChanged("showGrouped", val);
|
|
11011
|
+
this.refreshContent();
|
|
11012
|
+
},
|
|
11013
|
+
enumerable: false,
|
|
11014
|
+
configurable: true
|
|
11015
|
+
});
|
|
11016
|
+
HistogramModel.prototype.updateShowGroupedBtn = function () {
|
|
11017
|
+
if (!!this.showGroupedBtn) {
|
|
11018
|
+
this.showGroupedBtn.innerText = this.showGrouped
|
|
11019
|
+
? _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("ungroupDateSeries")
|
|
11020
|
+
: _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("groupDateSeries");
|
|
11021
|
+
this.showGroupedBtn.style.display = this.canShowGroupedDateSeries ? "inline" : "none";
|
|
11022
|
+
}
|
|
11023
|
+
};
|
|
11024
|
+
Object.defineProperty(HistogramModel.prototype, "canShowGroupedDateSeries", {
|
|
11025
|
+
get: function () {
|
|
11026
|
+
return ["years", "quarters", "months"].indexOf(this.intervalsMode) !== -1;
|
|
11027
|
+
},
|
|
11028
|
+
enumerable: false,
|
|
11029
|
+
configurable: true
|
|
11030
|
+
});
|
|
11031
|
+
Object.defineProperty(HistogramModel.prototype, "aggregateDataName", {
|
|
11032
|
+
get: function () {
|
|
11033
|
+
return this._aggregateDataName;
|
|
11034
|
+
},
|
|
11035
|
+
set: function (val) {
|
|
11036
|
+
if (this._aggregateDataName !== val) {
|
|
11037
|
+
this._aggregateDataName = val;
|
|
11038
|
+
this.onDataChanged();
|
|
11039
|
+
}
|
|
11040
|
+
},
|
|
11041
|
+
enumerable: false,
|
|
11042
|
+
configurable: true
|
|
11043
|
+
});
|
|
11044
|
+
Object.defineProperty(HistogramModel.prototype, "possibleAggregateDataNames", {
|
|
11045
|
+
get: function () {
|
|
11046
|
+
var _a, _b;
|
|
11047
|
+
return (_b = (_a = this.questionOptions) === null || _a === void 0 ? void 0 : _a.aggregateDataNames) !== null && _b !== void 0 ? _b : [];
|
|
11048
|
+
},
|
|
11049
|
+
enumerable: false,
|
|
11050
|
+
configurable: true
|
|
11051
|
+
});
|
|
10210
11052
|
HistogramModel.prototype.convertFromExternalData = function (externalCalculatedData) {
|
|
10211
11053
|
return [externalCalculatedData];
|
|
10212
11054
|
};
|
|
10213
11055
|
HistogramModel.prototype.getCalculatedValuesCore = function () {
|
|
10214
11056
|
var continuousValues = this.getContinuousValues();
|
|
10215
|
-
return (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_5__.histogramStatisticsCalculator)(this._continuousData, this.intervals, this.
|
|
11057
|
+
return (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_5__.histogramStatisticsCalculator)(this._continuousData, this.intervals, this, [this.aggregateDataName].filter(function (name) { return !!name; }));
|
|
11058
|
+
};
|
|
11059
|
+
HistogramModel.prototype.getCalculatedValues = function () {
|
|
11060
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
|
|
11061
|
+
var values, result, i, j;
|
|
11062
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
|
|
11063
|
+
switch (_a.label) {
|
|
11064
|
+
case 0: return [4 /*yield*/, _super.prototype.getCalculatedValues.call(this)];
|
|
11065
|
+
case 1:
|
|
11066
|
+
values = _a.sent();
|
|
11067
|
+
result = JSON.parse(JSON.stringify(values));
|
|
11068
|
+
if (this.showRunningTotals) {
|
|
11069
|
+
for (i = 0; i < result.length; i++) {
|
|
11070
|
+
for (j = 1; j < result[i].length; j++) {
|
|
11071
|
+
result[i][j] += result[i][j - 1];
|
|
11072
|
+
}
|
|
11073
|
+
}
|
|
11074
|
+
}
|
|
11075
|
+
return [2 /*return*/, result];
|
|
11076
|
+
}
|
|
11077
|
+
});
|
|
11078
|
+
});
|
|
11079
|
+
};
|
|
11080
|
+
HistogramModel.prototype.getGroupedDateAnswersData = function () {
|
|
11081
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
|
|
11082
|
+
var datasets, colors, labels, seriesLabels, intervals, start, end, startYear, endYear, groupedDatasets, year, i, interval, intervalDate, decade, yearInDecade, decadeIndex, groupedDatasets, year, i, interval, intervalDate, quarter, year, yearIndex, groupedDatasets, year, i, interval, intervalDate, month, year, yearIndex, texts;
|
|
11083
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
|
|
11084
|
+
switch (_a.label) {
|
|
11085
|
+
case 0: return [4 /*yield*/, this.getCalculatedValues()];
|
|
11086
|
+
case 1:
|
|
11087
|
+
datasets = (_a.sent());
|
|
11088
|
+
colors = this.getColors();
|
|
11089
|
+
labels = this.getLabels();
|
|
11090
|
+
seriesLabels = this.getSeriesLabels();
|
|
11091
|
+
intervals = [].concat(this.intervals);
|
|
11092
|
+
start = new Date(intervals[0].start);
|
|
11093
|
+
end = new Date(intervals[intervals.length - 1].end);
|
|
11094
|
+
startYear = start.getFullYear();
|
|
11095
|
+
endYear = end.getFullYear();
|
|
11096
|
+
if (this.intervalsMode === "years") {
|
|
11097
|
+
seriesLabels = [];
|
|
11098
|
+
groupedDatasets = [];
|
|
11099
|
+
for (year = Math.floor(startYear / 10) * 10; year <= endYear; year += 10) {
|
|
11100
|
+
seriesLabels.push(year.toString() + "s");
|
|
11101
|
+
groupedDatasets.push(new Array(10).fill(0));
|
|
11102
|
+
}
|
|
11103
|
+
for (i = 0; i < intervals.length; i++) {
|
|
11104
|
+
interval = intervals[i];
|
|
11105
|
+
intervalDate = new Date(interval.start);
|
|
11106
|
+
decade = Math.floor(intervalDate.getFullYear() / 10) * 10;
|
|
11107
|
+
yearInDecade = intervalDate.getFullYear() - decade;
|
|
11108
|
+
decadeIndex = Math.floor((decade - Math.floor(startYear / 10) * 10) / 10);
|
|
11109
|
+
groupedDatasets[decadeIndex][yearInDecade] = datasets[0][i];
|
|
11110
|
+
}
|
|
11111
|
+
datasets = groupedDatasets;
|
|
11112
|
+
labels = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
11113
|
+
}
|
|
11114
|
+
else if (this.intervalsMode === "quarters") {
|
|
11115
|
+
seriesLabels = [];
|
|
11116
|
+
groupedDatasets = [];
|
|
11117
|
+
for (year = startYear; year <= endYear; year++) {
|
|
11118
|
+
seriesLabels.push(year.toString());
|
|
11119
|
+
groupedDatasets.push(new Array(4).fill(0));
|
|
11120
|
+
}
|
|
11121
|
+
for (i = 0; i < intervals.length; i++) {
|
|
11122
|
+
interval = intervals[i];
|
|
11123
|
+
intervalDate = new Date(interval.start);
|
|
11124
|
+
quarter = Math.floor(intervalDate.getMonth() / 3);
|
|
11125
|
+
year = intervalDate.getFullYear();
|
|
11126
|
+
yearIndex = year - startYear;
|
|
11127
|
+
groupedDatasets[yearIndex][quarter] = datasets[0][i];
|
|
11128
|
+
}
|
|
11129
|
+
datasets = groupedDatasets;
|
|
11130
|
+
labels = ["I", "II", "III", "IV"];
|
|
11131
|
+
}
|
|
11132
|
+
else if (this.intervalsMode === "months") {
|
|
11133
|
+
seriesLabels = [];
|
|
11134
|
+
groupedDatasets = [];
|
|
11135
|
+
for (year = startYear; year <= endYear; year++) {
|
|
11136
|
+
seriesLabels.push(year.toString());
|
|
11137
|
+
groupedDatasets.push(new Array(12).fill(0));
|
|
11138
|
+
}
|
|
11139
|
+
for (i = 0; i < intervals.length; i++) {
|
|
11140
|
+
interval = intervals[i];
|
|
11141
|
+
intervalDate = new Date(interval.start);
|
|
11142
|
+
month = intervalDate.getMonth();
|
|
11143
|
+
year = intervalDate.getFullYear();
|
|
11144
|
+
yearIndex = year - startYear;
|
|
11145
|
+
groupedDatasets[yearIndex][month] = datasets[0][i];
|
|
11146
|
+
}
|
|
11147
|
+
datasets = groupedDatasets;
|
|
11148
|
+
labels = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
11149
|
+
}
|
|
11150
|
+
texts = datasets;
|
|
11151
|
+
return [2 /*return*/, {
|
|
11152
|
+
datasets: datasets,
|
|
11153
|
+
labels: labels,
|
|
11154
|
+
colors: colors,
|
|
11155
|
+
texts: texts,
|
|
11156
|
+
seriesLabels: seriesLabels,
|
|
11157
|
+
}];
|
|
11158
|
+
}
|
|
11159
|
+
});
|
|
11160
|
+
});
|
|
11161
|
+
};
|
|
11162
|
+
/**
|
|
11163
|
+
* Returns object with all infotmation for data visualization: datasets, labels, colors, additional texts (percentage).
|
|
11164
|
+
*/
|
|
11165
|
+
HistogramModel.prototype.getAnswersData = function () {
|
|
11166
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {
|
|
11167
|
+
var answersData, continuousValues, start, end, intervalsMode;
|
|
11168
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {
|
|
11169
|
+
switch (_a.label) {
|
|
11170
|
+
case 0:
|
|
11171
|
+
if (!this.showGrouped) {
|
|
11172
|
+
return [2 /*return*/, _super.prototype.getAnswersData.call(this)];
|
|
11173
|
+
}
|
|
11174
|
+
return [4 /*yield*/, this.getGroupedDateAnswersData()];
|
|
11175
|
+
case 1:
|
|
11176
|
+
answersData = _a.sent();
|
|
11177
|
+
continuousValues = this.getContinuousValues();
|
|
11178
|
+
if (continuousValues.length) {
|
|
11179
|
+
start = continuousValues[0].continuous;
|
|
11180
|
+
end = continuousValues[continuousValues.length - 1].continuous;
|
|
11181
|
+
intervalsMode = this.intervalsMode === "auto" ? getBestIntervalMode(start, end) : this.intervalsMode;
|
|
11182
|
+
if (intervalsMode === "years" && this.showGrouped) {
|
|
11183
|
+
answersData.labelsTitle = _localizationManager__WEBPACK_IMPORTED_MODULE_7__.localization.getString("groupedYearsAxisTitle");
|
|
11184
|
+
}
|
|
11185
|
+
}
|
|
11186
|
+
this.onAnswersDataReady.fire(this, answersData);
|
|
11187
|
+
return [2 /*return*/, answersData];
|
|
11188
|
+
}
|
|
11189
|
+
});
|
|
11190
|
+
});
|
|
10216
11191
|
};
|
|
10217
11192
|
HistogramModel.prototype.getValueType = function () {
|
|
10218
11193
|
return this.valueType;
|
|
@@ -11036,7 +12011,7 @@ var NumberModel = /** @class */ (function (_super) {
|
|
|
11036
12011
|
if (this._resultAverage === undefined ||
|
|
11037
12012
|
this._resultMin === undefined ||
|
|
11038
12013
|
this._resultMax === undefined) {
|
|
11039
|
-
_a = (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_5__.mathStatisticsCalculator)(this.surveyData, this
|
|
12014
|
+
_a = (0,_statisticCalculators__WEBPACK_IMPORTED_MODULE_5__.mathStatisticsCalculator)(this.surveyData, this), this._resultAverage = _a[0], this._resultMin = _a[1], this._resultMax = _a[2];
|
|
11040
12015
|
}
|
|
11041
12016
|
return [this._resultAverage, this._resultMin, this._resultMax];
|
|
11042
12017
|
};
|
|
@@ -11935,14 +12910,17 @@ var SelectBase = /** @class */ (function (_super) {
|
|
|
11935
12910
|
return selBase.choices.filter(function (choice) { return choice.text === itemText; })[0];
|
|
11936
12911
|
}
|
|
11937
12912
|
};
|
|
11938
|
-
SelectBase.prototype.
|
|
12913
|
+
SelectBase.prototype.onSelectionChanged = function (item) {
|
|
11939
12914
|
var _a;
|
|
12915
|
+
if (this.onDataItemSelected !== undefined) {
|
|
12916
|
+
this.onDataItemSelected(item !== undefined ? item.value : undefined, item !== undefined ? item.text : "");
|
|
12917
|
+
}
|
|
12918
|
+
this.stateChanged("filter", (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.value);
|
|
12919
|
+
};
|
|
12920
|
+
SelectBase.prototype.setSelection = function (item) {
|
|
11940
12921
|
if (this.selectedItem !== item) {
|
|
11941
12922
|
this.selectedItem = item;
|
|
11942
|
-
|
|
11943
|
-
this.onDataItemSelected(item !== undefined ? item.value : undefined, item !== undefined ? item.text : "");
|
|
11944
|
-
}
|
|
11945
|
-
this.stateChanged("filter", (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.value);
|
|
12923
|
+
this.onSelectionChanged(item);
|
|
11946
12924
|
}
|
|
11947
12925
|
};
|
|
11948
12926
|
Object.defineProperty(SelectBase.prototype, "selection", {
|
|
@@ -12167,22 +13145,6 @@ var SelectBase = /** @class */ (function (_super) {
|
|
|
12167
13145
|
}
|
|
12168
13146
|
return percentages;
|
|
12169
13147
|
};
|
|
12170
|
-
SelectBase.prototype.answersDataReady = function (answersData) {
|
|
12171
|
-
var result = {};
|
|
12172
|
-
if (this.hideEmptyAnswers) {
|
|
12173
|
-
result = hideEmptyAnswersInData(answersData);
|
|
12174
|
-
}
|
|
12175
|
-
else {
|
|
12176
|
-
result = answersData;
|
|
12177
|
-
}
|
|
12178
|
-
if (this.topN > 0) {
|
|
12179
|
-
result.datasets[0] = result.datasets[0].slice(-this.topN);
|
|
12180
|
-
result.labels = result.labels.slice(-this.topN);
|
|
12181
|
-
result.colors = result.colors.slice(-this.topN);
|
|
12182
|
-
result.texts[0] = result.texts[0].slice(-this.topN);
|
|
12183
|
-
}
|
|
12184
|
-
return result;
|
|
12185
|
-
};
|
|
12186
13148
|
/**
|
|
12187
13149
|
* Returns object with all infotmation for data visualization: datasets, labels, colors, additional texts (percentage).
|
|
12188
13150
|
*/
|
|
@@ -12224,7 +13186,15 @@ var SelectBase = /** @class */ (function (_super) {
|
|
|
12224
13186
|
texts: texts,
|
|
12225
13187
|
seriesLabels: seriesLabels,
|
|
12226
13188
|
};
|
|
12227
|
-
|
|
13189
|
+
if (this.hideEmptyAnswers) {
|
|
13190
|
+
answersData = hideEmptyAnswersInData(answersData);
|
|
13191
|
+
}
|
|
13192
|
+
if (this.topN > 0) {
|
|
13193
|
+
answersData.datasets[0] = answersData.datasets[0].slice(-this.topN);
|
|
13194
|
+
answersData.labels = answersData.labels.slice(-this.topN);
|
|
13195
|
+
answersData.colors = answersData.colors.slice(-this.topN);
|
|
13196
|
+
answersData.texts[0] = answersData.texts[0].slice(-this.topN);
|
|
13197
|
+
}
|
|
12228
13198
|
this.onAnswersDataReady.fire(this, answersData);
|
|
12229
13199
|
return [2 /*return*/, answersData];
|
|
12230
13200
|
}
|
|
@@ -12327,6 +13297,7 @@ _visualizationManager__WEBPACK_IMPORTED_MODULE_5__.VisualizationManager.register
|
|
|
12327
13297
|
__webpack_require__.r(__webpack_exports__);
|
|
12328
13298
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12329
13299
|
/* harmony export */ defaultStatisticsCalculator: () => (/* binding */ defaultStatisticsCalculator),
|
|
13300
|
+
/* harmony export */ getNestedDataRows: () => (/* binding */ getNestedDataRows),
|
|
12330
13301
|
/* harmony export */ histogramStatisticsCalculator: () => (/* binding */ histogramStatisticsCalculator),
|
|
12331
13302
|
/* harmony export */ mathStatisticsCalculator: () => (/* binding */ mathStatisticsCalculator)
|
|
12332
13303
|
/* harmony export */ });
|
|
@@ -12359,51 +13330,59 @@ function defaultStatisticsCalculator(data, dataInfo) {
|
|
|
12359
13330
|
return valuesIndex[val.value];
|
|
12360
13331
|
return valuesIndex[val];
|
|
12361
13332
|
};
|
|
12362
|
-
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
|
|
12375
|
-
});
|
|
12376
|
-
}
|
|
12377
|
-
else {
|
|
12378
|
-
// Series are the keys in question value (matrix question)
|
|
12379
|
-
// TODO: think about the de-normalization and combine with the previous case
|
|
12380
|
-
rowValues.forEach(function (val) {
|
|
12381
|
-
series.forEach(function (seriesName) {
|
|
12382
|
-
if (val[seriesName] !== undefined) {
|
|
12383
|
-
var seriesNo_2 = seriesIndex[seriesName] || 0;
|
|
12384
|
-
var values_1 = Array.isArray(val[seriesName]) ? val[seriesName] : [val[seriesName]];
|
|
12385
|
-
values_1.forEach(function (value) {
|
|
12386
|
-
var valIndex = getValueIndex(value);
|
|
12387
|
-
statistics[index][seriesNo_2][valIndex]++;
|
|
12388
|
-
});
|
|
12389
|
-
}
|
|
12390
|
-
});
|
|
12391
|
-
});
|
|
12392
|
-
}
|
|
13333
|
+
var processDataRow = function (dataRow, dataName, index) {
|
|
13334
|
+
var rowValue = dataRow[dataName];
|
|
13335
|
+
if (rowValue !== undefined || processMissingAnswers) {
|
|
13336
|
+
var rowValues = Array.isArray(rowValue) ? rowValue : [rowValue];
|
|
13337
|
+
if (series.length > 0) {
|
|
13338
|
+
var rowName = dataRow[_dataProvider__WEBPACK_IMPORTED_MODULE_0__.DataProvider.seriesMarkerKey];
|
|
13339
|
+
if (rowName !== undefined) {
|
|
13340
|
+
// Series are labelled by seriesMarkerKey in row data
|
|
13341
|
+
var seriesNo_1 = seriesIndex[rowName] || 0;
|
|
13342
|
+
rowValues.forEach(function (val) {
|
|
13343
|
+
var valIndex = getValueIndex(val);
|
|
13344
|
+
statistics[index][seriesNo_1][valIndex]++;
|
|
13345
|
+
});
|
|
12393
13346
|
}
|
|
12394
13347
|
else {
|
|
12395
|
-
//
|
|
13348
|
+
// Series are the keys in question value (matrix question)
|
|
13349
|
+
// TODO: think about the de-normalization and combine with the previous case
|
|
12396
13350
|
rowValues.forEach(function (val) {
|
|
12397
|
-
|
|
12398
|
-
|
|
13351
|
+
series.forEach(function (seriesName) {
|
|
13352
|
+
if (val[seriesName] !== undefined) {
|
|
13353
|
+
var seriesNo_2 = seriesIndex[seriesName] || 0;
|
|
13354
|
+
var values_1 = Array.isArray(val[seriesName]) ? val[seriesName] : [val[seriesName]];
|
|
13355
|
+
values_1.forEach(function (value) {
|
|
13356
|
+
var valIndex = getValueIndex(value);
|
|
13357
|
+
statistics[index][seriesNo_2][valIndex]++;
|
|
13358
|
+
});
|
|
13359
|
+
}
|
|
13360
|
+
});
|
|
12399
13361
|
});
|
|
12400
13362
|
}
|
|
12401
13363
|
}
|
|
13364
|
+
else {
|
|
13365
|
+
// No series
|
|
13366
|
+
rowValues.forEach(function (val) {
|
|
13367
|
+
var valIndex = getValueIndex(val);
|
|
13368
|
+
statistics[0][0][valIndex]++;
|
|
13369
|
+
});
|
|
13370
|
+
}
|
|
13371
|
+
}
|
|
13372
|
+
};
|
|
13373
|
+
data.forEach(function (dataRow) {
|
|
13374
|
+
var nestedDataRows = getNestedDataRows(dataRow, dataInfo);
|
|
13375
|
+
nestedDataRows.forEach(function (nestedDataRow) {
|
|
13376
|
+
dataNames.forEach(function (dataName, index) {
|
|
13377
|
+
processDataRow(nestedDataRow, dataName, index);
|
|
13378
|
+
});
|
|
12402
13379
|
});
|
|
12403
13380
|
});
|
|
12404
13381
|
return dataInfo.dataNames.length > 1 ? statistics : statistics[0];
|
|
12405
13382
|
}
|
|
12406
|
-
function histogramStatisticsCalculator(data, intervals,
|
|
13383
|
+
function histogramStatisticsCalculator(data, intervals, dataInfo, aggregateDataNames) {
|
|
13384
|
+
if (aggregateDataNames === void 0) { aggregateDataNames = []; }
|
|
13385
|
+
var seriesValues = dataInfo.getSeriesValues();
|
|
12407
13386
|
var statistics = [];
|
|
12408
13387
|
if (seriesValues.length === 0) {
|
|
12409
13388
|
seriesValues.push("");
|
|
@@ -12411,31 +13390,51 @@ function histogramStatisticsCalculator(data, intervals, seriesValues) {
|
|
|
12411
13390
|
for (var i = 0; i < seriesValues.length; ++i) {
|
|
12412
13391
|
statistics.push(intervals.map(function (i) { return 0; }));
|
|
12413
13392
|
data[seriesValues[i]].forEach(function (dataValue) {
|
|
13393
|
+
var _loop_1 = function (j) {
|
|
13394
|
+
if (intervals[j].start <= dataValue.continuous && (dataValue.continuous < intervals[j].end || j == intervals.length - 1)) {
|
|
13395
|
+
if (aggregateDataNames.length > 0) {
|
|
13396
|
+
aggregateDataNames.forEach(function (aggregateDataName) {
|
|
13397
|
+
var aggregateDataValue = dataValue.row[aggregateDataName];
|
|
13398
|
+
var numberValue = parseFloat(aggregateDataValue);
|
|
13399
|
+
if (aggregateDataValue !== undefined && !isNaN(numberValue)) {
|
|
13400
|
+
statistics[i][j] += numberValue;
|
|
13401
|
+
}
|
|
13402
|
+
});
|
|
13403
|
+
}
|
|
13404
|
+
else {
|
|
13405
|
+
statistics[i][j]++;
|
|
13406
|
+
}
|
|
13407
|
+
return "break";
|
|
13408
|
+
}
|
|
13409
|
+
};
|
|
12414
13410
|
for (var j = 0; j < intervals.length; ++j) {
|
|
12415
|
-
|
|
12416
|
-
|
|
13411
|
+
var state_1 = _loop_1(j);
|
|
13412
|
+
if (state_1 === "break")
|
|
12417
13413
|
break;
|
|
12418
|
-
}
|
|
12419
13414
|
}
|
|
12420
13415
|
});
|
|
12421
13416
|
}
|
|
12422
13417
|
return statistics;
|
|
12423
13418
|
}
|
|
12424
|
-
function mathStatisticsCalculator(data,
|
|
13419
|
+
function mathStatisticsCalculator(data, dataInfo) {
|
|
12425
13420
|
var resultMin = Number.MAX_VALUE, resultMax = -Number.MAX_VALUE, resultAverage = 0;
|
|
12426
13421
|
var actualAnswerCount = 0;
|
|
12427
|
-
data.forEach(function (
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
|
|
13422
|
+
data.forEach(function (dataRow) {
|
|
13423
|
+
var nestedDataRows = getNestedDataRows(dataRow, dataInfo);
|
|
13424
|
+
nestedDataRows.forEach(function (nestedDataRow) {
|
|
13425
|
+
var answerData = nestedDataRow[dataInfo.dataNames[0]];
|
|
13426
|
+
if (answerData !== undefined) {
|
|
13427
|
+
var questionValue = +answerData;
|
|
13428
|
+
actualAnswerCount++;
|
|
13429
|
+
resultAverage += questionValue;
|
|
13430
|
+
if (resultMin > questionValue) {
|
|
13431
|
+
resultMin = questionValue;
|
|
13432
|
+
}
|
|
13433
|
+
if (resultMax < questionValue) {
|
|
13434
|
+
resultMax = questionValue;
|
|
13435
|
+
}
|
|
12437
13436
|
}
|
|
12438
|
-
}
|
|
13437
|
+
});
|
|
12439
13438
|
});
|
|
12440
13439
|
if (actualAnswerCount > 0) {
|
|
12441
13440
|
resultAverage = resultAverage / actualAnswerCount;
|
|
@@ -12443,6 +13442,25 @@ function mathStatisticsCalculator(data, dataName) {
|
|
|
12443
13442
|
resultAverage = Math.ceil(resultAverage * 100) / 100;
|
|
12444
13443
|
return [resultAverage, resultMin, resultMax];
|
|
12445
13444
|
}
|
|
13445
|
+
function getNestedDataRows(dataRow, dataInfo) {
|
|
13446
|
+
var nestedDataRows = [];
|
|
13447
|
+
if (!dataInfo.dataPath) {
|
|
13448
|
+
nestedDataRows = [dataRow];
|
|
13449
|
+
}
|
|
13450
|
+
else {
|
|
13451
|
+
if (dataRow[dataInfo.dataPath] === undefined)
|
|
13452
|
+
return [];
|
|
13453
|
+
if (typeof dataRow[dataInfo.dataPath] !== "object")
|
|
13454
|
+
return [];
|
|
13455
|
+
if (Array.isArray(dataRow[dataInfo.dataPath])) {
|
|
13456
|
+
nestedDataRows = dataRow[dataInfo.dataPath];
|
|
13457
|
+
}
|
|
13458
|
+
else {
|
|
13459
|
+
nestedDataRows = [dataRow[dataInfo.dataPath]];
|
|
13460
|
+
}
|
|
13461
|
+
}
|
|
13462
|
+
return nestedDataRows;
|
|
13463
|
+
}
|
|
12446
13464
|
|
|
12447
13465
|
|
|
12448
13466
|
/***/ }),
|
|
@@ -13463,8 +14481,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13463
14481
|
/* harmony import */ var _visualizerBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./visualizerBase */ "./src/visualizerBase.ts");
|
|
13464
14482
|
/* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
|
|
13465
14483
|
/* harmony import */ var _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./visualizationPanel */ "./src/visualizationPanel.ts");
|
|
13466
|
-
/* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dataProvider */ "./src/dataProvider.ts");
|
|
13467
|
-
|
|
13468
14484
|
|
|
13469
14485
|
|
|
13470
14486
|
|
|
@@ -13485,28 +14501,29 @@ var VisualizationMatrixDropdown = /** @class */ (function (_super) {
|
|
|
13485
14501
|
function VisualizationMatrixDropdown(question, data, options, name) {
|
|
13486
14502
|
if (options === void 0) { options = {}; }
|
|
13487
14503
|
var _this = _super.call(this, question, data, options, name || "matrixDropdown") || this;
|
|
13488
|
-
_this.
|
|
14504
|
+
_this._contentVisualizer = undefined;
|
|
13489
14505
|
_this.onPanelAfterRenderCallback = function () {
|
|
13490
14506
|
_this.afterRender(_this.contentContainer);
|
|
13491
14507
|
};
|
|
13492
14508
|
_this.loadingData = false;
|
|
13493
14509
|
_this._childOptions = Object.assign({}, options);
|
|
13494
14510
|
_this._childOptions.disableLocaleSwitch = true;
|
|
13495
|
-
_this._childOptions.dataProvider = undefined;
|
|
13496
14511
|
_this._childOptions.allowDynamicLayout = false;
|
|
13497
14512
|
_this._childOptions.transposeData = true;
|
|
14513
|
+
_this._childOptions.dataProvider = _this.dataProvider;
|
|
14514
|
+
_this._childOptions.dataPath = _this.dataNames[0];
|
|
13498
14515
|
_this._childOptions.seriesValues = question.rows.map(function (row) { return row.value; });
|
|
13499
14516
|
_this._childOptions.seriesLabels = question.rows.map(function (row) { return row.text; });
|
|
14517
|
+
_this.dataProvider.fixDropdownData(_this.dataNames);
|
|
13500
14518
|
if (_this.canGroupColumns) {
|
|
13501
14519
|
var creators = _visualizationManager__WEBPACK_IMPORTED_MODULE_2__.VisualizationManager.getVisualizersByType("matrixdropdown-grouped");
|
|
13502
|
-
_this.
|
|
14520
|
+
_this._contentVisualizer = new creators[0](_this.question, [], _this._childOptions);
|
|
13503
14521
|
}
|
|
13504
14522
|
else {
|
|
13505
14523
|
var innerQuestions = _this.getQuestions();
|
|
13506
|
-
_this.
|
|
14524
|
+
_this._contentVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(innerQuestions, [], _this._childOptions, undefined, false);
|
|
13507
14525
|
}
|
|
13508
|
-
_this.
|
|
13509
|
-
_this.updateData(data);
|
|
14526
|
+
_this._contentVisualizer.onAfterRender.add(_this.onPanelAfterRenderCallback);
|
|
13510
14527
|
return _this;
|
|
13511
14528
|
}
|
|
13512
14529
|
Object.defineProperty(VisualizationMatrixDropdown.prototype, "canGroupColumns", {
|
|
@@ -13524,37 +14541,18 @@ var VisualizationMatrixDropdown = /** @class */ (function (_super) {
|
|
|
13524
14541
|
VisualizationMatrixDropdown.prototype.setLocale = function (newLocale) {
|
|
13525
14542
|
_super.prototype.setLocale.call(this, newLocale);
|
|
13526
14543
|
this._childOptions.seriesLabels = this.question.rows.map(function (row) { return row.text; });
|
|
13527
|
-
this.
|
|
14544
|
+
this._contentVisualizer.locale = newLocale;
|
|
13528
14545
|
};
|
|
13529
|
-
Object.defineProperty(VisualizationMatrixDropdown.prototype, "
|
|
14546
|
+
Object.defineProperty(VisualizationMatrixDropdown.prototype, "contentVisualizer", {
|
|
13530
14547
|
get: function () {
|
|
13531
|
-
return this.
|
|
14548
|
+
return this._contentVisualizer;
|
|
13532
14549
|
},
|
|
13533
14550
|
enumerable: false,
|
|
13534
14551
|
configurable: true
|
|
13535
14552
|
});
|
|
13536
|
-
VisualizationMatrixDropdown.prototype.updateDropdownVisualizerData = function () {
|
|
13537
|
-
var _this = this;
|
|
13538
|
-
var panelData = [];
|
|
13539
|
-
this.data.forEach(function (dataItem) {
|
|
13540
|
-
var rawDataItem = dataItem[_this.question.name];
|
|
13541
|
-
if (!!rawDataItem) {
|
|
13542
|
-
Object.keys(rawDataItem).forEach(function (key) {
|
|
13543
|
-
var nestedDataItem = Object.assign({}, rawDataItem[key]);
|
|
13544
|
-
nestedDataItem[_dataProvider__WEBPACK_IMPORTED_MODULE_4__.DataProvider.seriesMarkerKey] = key;
|
|
13545
|
-
panelData.push(nestedDataItem);
|
|
13546
|
-
});
|
|
13547
|
-
}
|
|
13548
|
-
});
|
|
13549
|
-
this._matrixDropdownVisualizer.updateData(panelData);
|
|
13550
|
-
};
|
|
13551
14553
|
VisualizationMatrixDropdown.prototype.updateData = function (data) {
|
|
13552
14554
|
_super.prototype.updateData.call(this, data);
|
|
13553
|
-
this.
|
|
13554
|
-
};
|
|
13555
|
-
VisualizationMatrixDropdown.prototype.onDataChanged = function () {
|
|
13556
|
-
this.updateDropdownVisualizerData();
|
|
13557
|
-
_super.prototype.onDataChanged.call(this);
|
|
14555
|
+
this.dataProvider.fixDropdownData(this.dataNames);
|
|
13558
14556
|
};
|
|
13559
14557
|
VisualizationMatrixDropdown.prototype.getQuestions = function () {
|
|
13560
14558
|
var matrixdropdown = this.question;
|
|
@@ -13567,15 +14565,15 @@ var VisualizationMatrixDropdown = /** @class */ (function (_super) {
|
|
|
13567
14565
|
});
|
|
13568
14566
|
};
|
|
13569
14567
|
VisualizationMatrixDropdown.prototype.destroyContent = function (container) {
|
|
13570
|
-
this.
|
|
14568
|
+
this._contentVisualizer.clear();
|
|
13571
14569
|
_super.prototype.destroyContent.call(this, this.contentContainer);
|
|
13572
14570
|
};
|
|
13573
14571
|
VisualizationMatrixDropdown.prototype.renderContent = function (container) {
|
|
13574
|
-
this.
|
|
14572
|
+
this._contentVisualizer.render(container);
|
|
13575
14573
|
};
|
|
13576
14574
|
VisualizationMatrixDropdown.prototype.destroy = function () {
|
|
13577
14575
|
_super.prototype.destroy.call(this);
|
|
13578
|
-
this.
|
|
14576
|
+
this._contentVisualizer.onAfterRender.remove(this.onPanelAfterRenderCallback);
|
|
13579
14577
|
};
|
|
13580
14578
|
return VisualizationMatrixDropdown;
|
|
13581
14579
|
}(_visualizerBase__WEBPACK_IMPORTED_MODULE_1__.VisualizerBase));
|
|
@@ -13656,9 +14654,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13656
14654
|
/* harmony import */ var _localizationManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./localizationManager */ "./src/localizationManager.ts");
|
|
13657
14655
|
/* harmony import */ var _filterInfo__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./filterInfo */ "./src/filterInfo.ts");
|
|
13658
14656
|
/* harmony import */ var _layoutEngine__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./layoutEngine */ "./src/layoutEngine.ts");
|
|
13659
|
-
/* harmony import */ var
|
|
13660
|
-
/* harmony import */ var
|
|
13661
|
-
/* harmony import */ var
|
|
14657
|
+
/* harmony import */ var _dataProvider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./dataProvider */ "./src/dataProvider.ts");
|
|
14658
|
+
/* harmony import */ var _svgbundle__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./svgbundle */ "./src/svgbundle.ts");
|
|
14659
|
+
/* harmony import */ var _visualizationManager__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./visualizationManager */ "./src/visualizationManager.ts");
|
|
14660
|
+
/* harmony import */ var _visualizationPanel_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./visualizationPanel.scss */ "./src/visualizationPanel.scss");
|
|
14661
|
+
/* harmony import */ var _visualizationPanelDynamic__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./visualizationPanelDynamic */ "./src/visualizationPanelDynamic.ts");
|
|
14662
|
+
|
|
14663
|
+
|
|
13662
14664
|
|
|
13663
14665
|
|
|
13664
14666
|
|
|
@@ -13677,7 +14679,7 @@ var questionLayoutedElementClassName = "sa-question-layouted";
|
|
|
13677
14679
|
if (!!document) {
|
|
13678
14680
|
var templateHolder = document.createElement("div");
|
|
13679
14681
|
templateHolder.style.display = "none";
|
|
13680
|
-
templateHolder.innerHTML =
|
|
14682
|
+
templateHolder.innerHTML = _svgbundle__WEBPACK_IMPORTED_MODULE_10__.svgTemplate;
|
|
13681
14683
|
document.head.appendChild(templateHolder);
|
|
13682
14684
|
}
|
|
13683
14685
|
/**
|
|
@@ -13708,7 +14710,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
13708
14710
|
_this.renderedQuestionsCount = 0;
|
|
13709
14711
|
_this.onAfterRenderQuestionCallback = function (sender, options) {
|
|
13710
14712
|
_this.renderedQuestionsCount++;
|
|
13711
|
-
if (_this.renderedQuestionsCount == _this.
|
|
14713
|
+
if (_this.renderedQuestionsCount == _this.visibleElements.length) {
|
|
13712
14714
|
_this.renderedQuestionsCount = 0;
|
|
13713
14715
|
_this.layoutEngine.update();
|
|
13714
14716
|
_this.afterRender(_this.contentContainer);
|
|
@@ -13797,7 +14799,6 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
13797
14799
|
_this._elements = _this.buildElements(questions);
|
|
13798
14800
|
}
|
|
13799
14801
|
_this.buildVisualizers(questions);
|
|
13800
|
-
_this.updateData(_this.surveyData);
|
|
13801
14802
|
if (!_this.haveCommercialLicense && _this.isRoot) {
|
|
13802
14803
|
_this.registerToolbarItem("commercialLicense", function () {
|
|
13803
14804
|
return (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.createCommercialLicenseLink)();
|
|
@@ -13807,11 +14808,7 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
13807
14808
|
if (_this.supportSelection !== false) {
|
|
13808
14809
|
_this.registerToolbarItem("resetFilter", function () {
|
|
13809
14810
|
return _utils_index__WEBPACK_IMPORTED_MODULE_5__.DocumentHelper.createButton(function () {
|
|
13810
|
-
_this.
|
|
13811
|
-
if (visualizer instanceof _selectBase__WEBPACK_IMPORTED_MODULE_3__.SelectBase || visualizer instanceof _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_4__.AlternativeVisualizersWrapper) {
|
|
13812
|
-
visualizer.setSelection(undefined);
|
|
13813
|
-
}
|
|
13814
|
-
});
|
|
14811
|
+
_this.resetFilter();
|
|
13815
14812
|
}, _localizationManager__WEBPACK_IMPORTED_MODULE_6__.localization.getString("resetFilter"));
|
|
13816
14813
|
}, 900);
|
|
13817
14814
|
}
|
|
@@ -13872,6 +14869,18 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
13872
14869
|
}
|
|
13873
14870
|
return _this;
|
|
13874
14871
|
}
|
|
14872
|
+
VisualizationPanel.prototype.resetFilter = function () {
|
|
14873
|
+
var _a;
|
|
14874
|
+
(_a = this.dataProvider) === null || _a === void 0 ? void 0 : _a.resetFilter();
|
|
14875
|
+
this.visualizers.forEach(function (visualizer) {
|
|
14876
|
+
if (visualizer instanceof _selectBase__WEBPACK_IMPORTED_MODULE_3__.SelectBase || visualizer instanceof _alternativeVizualizersWrapper__WEBPACK_IMPORTED_MODULE_4__.AlternativeVisualizersWrapper) {
|
|
14877
|
+
visualizer.setSelection(undefined);
|
|
14878
|
+
}
|
|
14879
|
+
if (visualizer instanceof _visualizationPanelDynamic__WEBPACK_IMPORTED_MODULE_13__.VisualizationPanelDynamic) {
|
|
14880
|
+
visualizer.resetFilter();
|
|
14881
|
+
}
|
|
14882
|
+
});
|
|
14883
|
+
};
|
|
13875
14884
|
VisualizationPanel.prototype.reorderVisibleElements = function (order) {
|
|
13876
14885
|
var _this = this;
|
|
13877
14886
|
var newElements = [];
|
|
@@ -13982,13 +14991,15 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
13982
14991
|
var _this = this;
|
|
13983
14992
|
questions.forEach(function (question) {
|
|
13984
14993
|
var visualizerOptions = Object.assign({}, _this.options);
|
|
13985
|
-
|
|
14994
|
+
if (visualizerOptions.dataProvider === undefined) {
|
|
14995
|
+
visualizerOptions.dataProvider = _this.dataProvider;
|
|
14996
|
+
}
|
|
13986
14997
|
var visualizer;
|
|
13987
14998
|
if (Array.isArray(question)) {
|
|
13988
|
-
visualizer = new (
|
|
14999
|
+
visualizer = new (_visualizationManager__WEBPACK_IMPORTED_MODULE_11__.VisualizationManager.getPivotVisualizerConstructor())(question, [], visualizerOptions, undefined, false);
|
|
13989
15000
|
}
|
|
13990
15001
|
else {
|
|
13991
|
-
visualizer = _this.createVisualizer(question, visualizerOptions,
|
|
15002
|
+
visualizer = _this.createVisualizer(question, visualizerOptions, []);
|
|
13992
15003
|
}
|
|
13993
15004
|
if (!visualizer) {
|
|
13994
15005
|
return;
|
|
@@ -14318,7 +15329,24 @@ var VisualizationPanel = /** @class */ (function (_super) {
|
|
|
14318
15329
|
* @see IVisualizationPanelOptions.allowSelection
|
|
14319
15330
|
*/
|
|
14320
15331
|
VisualizationPanel.prototype.setFilter = function (questionName, selectedValue) {
|
|
14321
|
-
|
|
15332
|
+
var _a, _b;
|
|
15333
|
+
if (!this.dataPath) {
|
|
15334
|
+
this.dataProvider.setFilter(questionName, selectedValue);
|
|
15335
|
+
}
|
|
15336
|
+
else {
|
|
15337
|
+
if (selectedValue !== undefined && selectedValue !== null) {
|
|
15338
|
+
if (typeof selectedValue === "object" && Object.keys(selectedValue)[0]) {
|
|
15339
|
+
var seriesValue = Object.keys(selectedValue)[0];
|
|
15340
|
+
this.dataProvider.setFilter(this.dataPath, (_a = {}, _a[questionName] = selectedValue[seriesValue], _a[_dataProvider__WEBPACK_IMPORTED_MODULE_9__.DataProvider.seriesMarkerKey] = seriesValue, _a));
|
|
15341
|
+
}
|
|
15342
|
+
else {
|
|
15343
|
+
this.dataProvider.setFilter(this.dataPath, (_b = {}, _b[questionName] = selectedValue, _b));
|
|
15344
|
+
}
|
|
15345
|
+
}
|
|
15346
|
+
else {
|
|
15347
|
+
this.dataProvider.setFilter(this.dataPath, undefined);
|
|
15348
|
+
}
|
|
15349
|
+
}
|
|
14322
15350
|
};
|
|
14323
15351
|
VisualizationPanel.prototype.getState = function () {
|
|
14324
15352
|
var _this = this;
|
|
@@ -14446,7 +15474,7 @@ var VisualizationPanelDynamic = /** @class */ (function (_super) {
|
|
|
14446
15474
|
function VisualizationPanelDynamic(question, data, options, name) {
|
|
14447
15475
|
if (options === void 0) { options = {}; }
|
|
14448
15476
|
var _this = _super.call(this, question, data, options, name || "panelDynamic") || this;
|
|
14449
|
-
_this.
|
|
15477
|
+
_this._contentVisualizer = undefined;
|
|
14450
15478
|
_this.onAfterRenderPanelCallback = function () {
|
|
14451
15479
|
_this.afterRender(_this.contentContainer);
|
|
14452
15480
|
};
|
|
@@ -14454,46 +15482,40 @@ var VisualizationPanelDynamic = /** @class */ (function (_super) {
|
|
|
14454
15482
|
var options = Object.assign({}, options);
|
|
14455
15483
|
options.allowHideQuestions = false;
|
|
14456
15484
|
options.allowDynamicLayout = false;
|
|
14457
|
-
options.dataProvider =
|
|
15485
|
+
options.dataProvider = _this.dataProvider;
|
|
14458
15486
|
options.dataPath = _this.dataNames[0];
|
|
14459
|
-
_this.
|
|
14460
|
-
_this.
|
|
14461
|
-
_this.updateData(data);
|
|
15487
|
+
_this._contentVisualizer = new _visualizationPanel__WEBPACK_IMPORTED_MODULE_3__.VisualizationPanel(_this.getQuestions(), [], options, undefined, false);
|
|
15488
|
+
_this._contentVisualizer.onAfterRender.add(_this.onAfterRenderPanelCallback);
|
|
14462
15489
|
return _this;
|
|
14463
15490
|
}
|
|
14464
15491
|
Object.defineProperty(VisualizationPanelDynamic.prototype, "contentVisualizer", {
|
|
14465
15492
|
get: function () {
|
|
14466
|
-
return this.
|
|
15493
|
+
return this._contentVisualizer;
|
|
14467
15494
|
},
|
|
14468
15495
|
enumerable: false,
|
|
14469
15496
|
configurable: true
|
|
14470
15497
|
});
|
|
14471
15498
|
VisualizationPanelDynamic.prototype.setLocale = function (newLocale) {
|
|
14472
15499
|
_super.prototype.setLocale.call(this, newLocale);
|
|
14473
|
-
this.
|
|
15500
|
+
this._contentVisualizer.locale = newLocale;
|
|
14474
15501
|
};
|
|
14475
|
-
VisualizationPanelDynamic.prototype.
|
|
14476
|
-
|
|
14477
|
-
this._panelVisualizer.updateData(data);
|
|
14478
|
-
};
|
|
14479
|
-
VisualizationPanelDynamic.prototype.onDataChanged = function () {
|
|
14480
|
-
this._panelVisualizer.updateData(this.dataProvider.filteredData);
|
|
14481
|
-
_super.prototype.onDataChanged.call(this);
|
|
15502
|
+
VisualizationPanelDynamic.prototype.resetFilter = function () {
|
|
15503
|
+
this.contentVisualizer.resetFilter();
|
|
14482
15504
|
};
|
|
14483
15505
|
VisualizationPanelDynamic.prototype.getQuestions = function () {
|
|
14484
15506
|
var paneldynamic = this.question;
|
|
14485
15507
|
return paneldynamic.template.questions;
|
|
14486
15508
|
};
|
|
14487
15509
|
VisualizationPanelDynamic.prototype.destroyContent = function (container) {
|
|
14488
|
-
this.
|
|
15510
|
+
this._contentVisualizer.clear();
|
|
14489
15511
|
_super.prototype.destroyContent.call(this, this.contentContainer);
|
|
14490
15512
|
};
|
|
14491
15513
|
VisualizationPanelDynamic.prototype.renderContent = function (container) {
|
|
14492
|
-
this.
|
|
15514
|
+
this._contentVisualizer.render(container);
|
|
14493
15515
|
};
|
|
14494
15516
|
VisualizationPanelDynamic.prototype.destroy = function () {
|
|
14495
15517
|
_super.prototype.destroy.call(this);
|
|
14496
|
-
this.
|
|
15518
|
+
this._contentVisualizer.onAfterRender.remove(this.onAfterRenderPanelCallback);
|
|
14497
15519
|
};
|
|
14498
15520
|
return VisualizationPanelDynamic;
|
|
14499
15521
|
}(_visualizerBase__WEBPACK_IMPORTED_MODULE_1__.VisualizerBase));
|
|
@@ -14718,6 +15740,13 @@ var VisualizerBase = /** @class */ (function () {
|
|
|
14718
15740
|
enumerable: false,
|
|
14719
15741
|
configurable: true
|
|
14720
15742
|
});
|
|
15743
|
+
Object.defineProperty(VisualizerBase.prototype, "dataPath", {
|
|
15744
|
+
get: function () {
|
|
15745
|
+
return this.options.dataPath;
|
|
15746
|
+
},
|
|
15747
|
+
enumerable: false,
|
|
15748
|
+
configurable: true
|
|
15749
|
+
});
|
|
14721
15750
|
Object.defineProperty(VisualizerBase.prototype, "hasHeader", {
|
|
14722
15751
|
/**
|
|
14723
15752
|
* Indicates whether the visualizer displays a header. This property is `true` when a visualized question has a correct answer.
|
|
@@ -14922,26 +15951,9 @@ var VisualizerBase = /** @class */ (function () {
|
|
|
14922
15951
|
* @param data A data array with survey results to be visualized.
|
|
14923
15952
|
*/
|
|
14924
15953
|
VisualizerBase.prototype.updateData = function (data) {
|
|
14925
|
-
|
|
14926
|
-
var dataToAssign = data;
|
|
14927
|
-
if (!!dataPath && Array.isArray(data)) {
|
|
14928
|
-
dataToAssign = [];
|
|
14929
|
-
data.forEach(function (dataItem) {
|
|
14930
|
-
if (!!dataItem && dataItem[dataPath] !== undefined) {
|
|
14931
|
-
if (Array.isArray(dataItem[dataPath])) {
|
|
14932
|
-
dataToAssign = dataToAssign.concat(dataItem[dataPath]);
|
|
14933
|
-
}
|
|
14934
|
-
else {
|
|
14935
|
-
dataToAssign.push(dataItem[dataPath]);
|
|
14936
|
-
}
|
|
14937
|
-
}
|
|
14938
|
-
});
|
|
14939
|
-
}
|
|
14940
|
-
if (!this.options.dataProvider) {
|
|
14941
|
-
this.dataProvider.data = dataToAssign;
|
|
14942
|
-
}
|
|
15954
|
+
this.dataProvider.data = data;
|
|
14943
15955
|
if (this.hasFooter) {
|
|
14944
|
-
this.footerVisualizer.updateData(
|
|
15956
|
+
this.footerVisualizer.updateData(data);
|
|
14945
15957
|
}
|
|
14946
15958
|
};
|
|
14947
15959
|
VisualizerBase.prototype.invokeOnUpdate = function () {
|
|
@@ -17426,7 +18438,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17426
18438
|
/* harmony export */ VisualizerFactory: () => (/* reexport safe */ _visualizerFactory__WEBPACK_IMPORTED_MODULE_16__.VisualizerFactory),
|
|
17427
18439
|
/* harmony export */ WordCloud: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_30__.WordCloud),
|
|
17428
18440
|
/* harmony export */ WordCloudAdapter: () => (/* reexport safe */ _wordcloud_wordcloud__WEBPACK_IMPORTED_MODULE_30__.WordCloudAdapter),
|
|
18441
|
+
/* harmony export */ getBestIntervalMode: () => (/* reexport safe */ _histogram__WEBPACK_IMPORTED_MODULE_20__.getBestIntervalMode),
|
|
17429
18442
|
/* harmony export */ hideEmptyAnswersInData: () => (/* reexport safe */ _selectBase__WEBPACK_IMPORTED_MODULE_17__.hideEmptyAnswersInData),
|
|
18443
|
+
/* harmony export */ intervalCalculators: () => (/* reexport safe */ _histogram__WEBPACK_IMPORTED_MODULE_20__.intervalCalculators),
|
|
17430
18444
|
/* harmony export */ localization: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.localization),
|
|
17431
18445
|
/* harmony export */ setupLocale: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.setupLocale),
|
|
17432
18446
|
/* harmony export */ surveyStrings: () => (/* reexport safe */ _localizationManager__WEBPACK_IMPORTED_MODULE_0__.surveyStrings),
|