survey-analytics 2.5.14 → 3.0.0-beta.0

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.
Files changed (215) hide show
  1. package/fesm/shared.mjs +754 -3179
  2. package/fesm/shared.mjs.map +1 -1
  3. package/fesm/shared2.mjs +9687 -8187
  4. package/fesm/shared2.mjs.map +1 -1
  5. package/fesm/shared3.mjs +4982 -0
  6. package/fesm/shared3.mjs.map +1 -0
  7. package/fesm/shared4.mjs +42 -0
  8. package/fesm/shared4.mjs.map +1 -0
  9. package/fesm/survey.analytics.apexcharts.mjs +1061 -0
  10. package/fesm/survey.analytics.apexcharts.mjs.map +1 -0
  11. package/fesm/survey.analytics.core.mjs +3 -3
  12. package/fesm/survey.analytics.mjs +7 -755
  13. package/fesm/survey.analytics.mjs.map +1 -1
  14. package/fesm/survey.analytics.mongo.mjs +1 -1
  15. package/fesm/survey.analytics.plotly.mjs +13 -0
  16. package/fesm/survey.analytics.plotly.mjs.map +1 -0
  17. package/fesm/survey.analytics.tabulator.mjs +335 -180
  18. package/fesm/survey.analytics.tabulator.mjs.map +1 -1
  19. package/fesm/themes/index.mjs +1942 -0
  20. package/fesm/themes/index.mjs.map +1 -0
  21. package/package.json +37 -10
  22. package/survey-analytics-plotly.types/alternativeVizualizersWrapper.d.ts +73 -0
  23. package/survey-analytics-plotly.types/analytics-localization/arabic.d.ts +100 -0
  24. package/survey-analytics-plotly.types/analytics-localization/dutch.d.ts +100 -0
  25. package/survey-analytics-plotly.types/analytics-localization/english.d.ts +130 -0
  26. package/survey-analytics-plotly.types/analytics-localization/farsi.d.ts +100 -0
  27. package/survey-analytics-plotly.types/analytics-localization/finnish.d.ts +100 -0
  28. package/survey-analytics-plotly.types/analytics-localization/french.d.ts +100 -0
  29. package/survey-analytics-plotly.types/analytics-localization/german.d.ts +100 -0
  30. package/survey-analytics-plotly.types/analytics-localization/italian.d.ts +100 -0
  31. package/survey-analytics-plotly.types/analytics-localization/japanese.d.ts +100 -0
  32. package/survey-analytics-plotly.types/analytics-localization/norwegian.d.ts +100 -0
  33. package/survey-analytics-plotly.types/analytics-localization/polish.d.ts +100 -0
  34. package/survey-analytics-plotly.types/analytics-localization/portuguese.d.ts +100 -0
  35. package/survey-analytics-plotly.types/analytics-localization/russian.d.ts +100 -0
  36. package/survey-analytics-plotly.types/analytics-localization/spanish.d.ts +100 -0
  37. package/survey-analytics-plotly.types/analytics-localization/swedish.d.ts +100 -0
  38. package/survey-analytics-plotly.types/boolean.d.ts +15 -0
  39. package/survey-analytics-plotly.types/card.d.ts +29 -0
  40. package/survey-analytics-plotly.types/chartConfig.d.ts +9 -0
  41. package/survey-analytics-plotly.types/config.d.ts +35 -0
  42. package/survey-analytics-plotly.types/dashboard.d.ts +51 -0
  43. package/survey-analytics-plotly.types/dataProvider.d.ts +69 -0
  44. package/survey-analytics-plotly.types/entries/plotly.d.ts +2 -0
  45. package/survey-analytics-plotly.types/entries/summary.core.d.ts +44 -0
  46. package/survey-analytics-plotly.types/filterInfo.d.ts +11 -0
  47. package/survey-analytics-plotly.types/histogram.d.ts +102 -0
  48. package/{survey-analytics.types/layoutEngine.d.ts → survey-analytics-plotly.types/layout-engine.d.ts} +0 -12
  49. package/survey-analytics-plotly.types/localizationManager.d.ts +152 -0
  50. package/survey-analytics-plotly.types/matrix.d.ts +17 -0
  51. package/survey-analytics-plotly.types/matrixDropdownGrouped.d.ts +15 -0
  52. package/survey-analytics-plotly.types/muuri-layout-engine.d.ts +13 -0
  53. package/survey-analytics-plotly.types/nps.d.ts +37 -0
  54. package/survey-analytics-plotly.types/number.d.ts +27 -0
  55. package/survey-analytics-plotly.types/pivot.d.ts +59 -0
  56. package/{survey-analytics.types → survey-analytics-plotly.types}/plotly/chart-adapter.d.ts +11 -2
  57. package/survey-analytics-plotly.types/plotly/setup.d.ts +150 -0
  58. package/survey-analytics-plotly.types/ranking.d.ts +12 -0
  59. package/survey-analytics-plotly.types/selectBase.d.ts +116 -0
  60. package/survey-analytics-plotly.types/statisticCalculators.d.ts +9 -0
  61. package/survey-analytics-plotly.types/statistics-table.d.ts +28 -0
  62. package/survey-analytics-plotly.types/svgbundle.d.ts +2 -0
  63. package/survey-analytics-plotly.types/text.d.ts +25 -0
  64. package/survey-analytics-plotly.types/theme.d.ts +50 -0
  65. package/survey-analytics-plotly.types/themes/default-light.d.ts +965 -0
  66. package/survey-analytics-plotly.types/utils/calculationDateRanges.d.ts +35 -0
  67. package/survey-analytics-plotly.types/utils/dateRangeModel.d.ts +32 -0
  68. package/survey-analytics-plotly.types/utils/dateRangeWidget.d.ts +38 -0
  69. package/survey-analytics-plotly.types/utils/dropdownActionWidget.d.ts +31 -0
  70. package/survey-analytics-plotly.types/utils/dropdownBase.d.ts +47 -0
  71. package/survey-analytics-plotly.types/utils/dropdownWidget.d.ts +40 -0
  72. package/survey-analytics-plotly.types/utils/index.d.ts +62 -0
  73. package/survey-analytics-plotly.types/utils/toggle.d.ts +17 -0
  74. package/survey-analytics-plotly.types/utils/utils.d.ts +9 -0
  75. package/survey-analytics-plotly.types/visualizationComposite.d.ts +8 -0
  76. package/survey-analytics-plotly.types/visualizationManager.d.ts +60 -0
  77. package/survey-analytics-plotly.types/visualizationMatrixDropdown.d.ts +23 -0
  78. package/survey-analytics-plotly.types/visualizationMatrixDynamic.d.ts +8 -0
  79. package/survey-analytics-plotly.types/visualizationPanel.d.ts +464 -0
  80. package/survey-analytics-plotly.types/visualizationPanelDynamic.d.ts +20 -0
  81. package/survey-analytics-plotly.types/visualizerBase.d.ts +422 -0
  82. package/survey-analytics-plotly.types/visualizerDescription.d.ts +19 -0
  83. package/survey-analytics-plotly.types/visualizerFactory.d.ts +41 -0
  84. package/survey-analytics-plotly.types/wordcloud/stopwords/dutch.d.ts +1 -0
  85. package/survey-analytics-plotly.types/wordcloud/stopwords/english.d.ts +1 -0
  86. package/survey-analytics-plotly.types/wordcloud/stopwords/index.d.ts +3 -0
  87. package/survey-analytics-plotly.types/wordcloud/stopwords/norwegian.d.ts +1 -0
  88. package/survey-analytics-plotly.types/wordcloud/stopwords/spanish.d.ts +1 -0
  89. package/survey-analytics-plotly.types/wordcloud/widget.d.ts +38 -0
  90. package/survey-analytics-plotly.types/wordcloud/wordcloud.d.ts +28 -0
  91. package/survey-analytics-tabulator.types/analytics-localization/english.d.ts +28 -0
  92. package/survey-analytics-tabulator.types/entries/tabulator.d.ts +2 -25
  93. package/survey-analytics-tabulator.types/entries/tabulator.fontless.d.ts +26 -0
  94. package/survey-analytics-tabulator.types/localizationManager.d.ts +28 -0
  95. package/survey-analytics-tabulator.types/tables/extensions/footerextensions.d.ts +1 -0
  96. package/survey-analytics-tabulator.types/tables/extensions/tableextensions.d.ts +2 -1
  97. package/survey-analytics-tabulator.types/tables/tabulator.d.ts +7 -0
  98. package/survey-analytics-tabulator.types/theme.d.ts +50 -0
  99. package/survey-analytics-tabulator.types/themes/default-light.d.ts +965 -0
  100. package/survey-analytics-tabulator.types/utils/dropdownActionWidget.d.ts +31 -0
  101. package/survey-analytics-tabulator.types/utils/dropdownBase.d.ts +47 -0
  102. package/survey-analytics-tabulator.types/utils/dropdownWidget.d.ts +40 -0
  103. package/survey-analytics-tabulator.types/utils/index.d.ts +25 -2
  104. package/survey-analytics.types/alternativeVizualizersWrapper.d.ts +9 -4
  105. package/survey-analytics.types/analytics-localization/english.d.ts +28 -0
  106. package/survey-analytics.types/apexcharts/chart-adapter.d.ts +29 -0
  107. package/survey-analytics.types/apexcharts/index.d.ts +2 -0
  108. package/survey-analytics.types/apexcharts/setup.d.ts +185 -0
  109. package/survey-analytics.types/boolean.d.ts +1 -1
  110. package/survey-analytics.types/card.d.ts +29 -0
  111. package/survey-analytics.types/chartConfig.d.ts +9 -0
  112. package/survey-analytics.types/config.d.ts +1 -33
  113. package/survey-analytics.types/dashboard.d.ts +51 -0
  114. package/survey-analytics.types/dataProvider.d.ts +17 -0
  115. package/survey-analytics.types/entries/apexcharts.d.ts +2 -0
  116. package/survey-analytics.types/entries/apexcharts.fontless.d.ts +2 -0
  117. package/survey-analytics.types/entries/summary.core.d.ts +6 -0
  118. package/survey-analytics.types/histogram.d.ts +29 -13
  119. package/survey-analytics.types/layout-engine.d.ts +29 -0
  120. package/survey-analytics.types/localizationManager.d.ts +28 -0
  121. package/survey-analytics.types/matrix.d.ts +3 -2
  122. package/survey-analytics.types/matrixDropdownGrouped.d.ts +3 -2
  123. package/survey-analytics.types/muuri-layout-engine.d.ts +13 -0
  124. package/survey-analytics.types/nps.d.ts +5 -10
  125. package/survey-analytics.types/number.d.ts +8 -7
  126. package/survey-analytics.types/pivot.d.ts +25 -35
  127. package/survey-analytics.types/ranking.d.ts +3 -2
  128. package/survey-analytics.types/selectBase.d.ts +12 -15
  129. package/survey-analytics.types/statisticCalculators.d.ts +8 -13
  130. package/survey-analytics.types/statistics-table.d.ts +2 -2
  131. package/survey-analytics.types/text.d.ts +4 -3
  132. package/survey-analytics.types/theme.d.ts +50 -0
  133. package/survey-analytics.types/themes/default-light.d.ts +965 -0
  134. package/survey-analytics.types/utils/calculationDateRanges.d.ts +35 -0
  135. package/survey-analytics.types/utils/dateRangeModel.d.ts +32 -0
  136. package/survey-analytics.types/utils/dateRangeWidget.d.ts +38 -0
  137. package/survey-analytics.types/utils/dropdownActionWidget.d.ts +31 -0
  138. package/survey-analytics.types/utils/dropdownBase.d.ts +47 -0
  139. package/survey-analytics.types/utils/dropdownWidget.d.ts +40 -0
  140. package/survey-analytics.types/utils/index.d.ts +25 -2
  141. package/survey-analytics.types/utils/toggle.d.ts +17 -0
  142. package/survey-analytics.types/utils/utils.d.ts +9 -0
  143. package/survey-analytics.types/visualizationComposite.d.ts +1 -1
  144. package/survey-analytics.types/visualizationManager.d.ts +5 -5
  145. package/survey-analytics.types/visualizationMatrixDropdown.d.ts +2 -1
  146. package/survey-analytics.types/visualizationMatrixDynamic.d.ts +1 -1
  147. package/survey-analytics.types/visualizationPanel.d.ts +20 -3
  148. package/survey-analytics.types/visualizationPanelDynamic.d.ts +2 -1
  149. package/survey-analytics.types/visualizerBase.d.ts +65 -10
  150. package/survey-analytics.types/visualizerDescription.d.ts +19 -0
  151. package/survey-analytics.types/visualizerFactory.d.ts +11 -2
  152. package/survey-analytics.types/wordcloud/wordcloud.d.ts +6 -4
  153. package/survey.analytics.core.css +1131 -99
  154. package/survey.analytics.core.css.map +1 -1
  155. package/survey.analytics.core.js +5063 -1002
  156. package/survey.analytics.core.js.map +1 -1
  157. package/survey.analytics.core.min.css +9 -6
  158. package/survey.analytics.core.min.js +1 -1
  159. package/survey.analytics.core.min.js.LICENSE.txt +1 -1
  160. package/survey.analytics.css +1494 -103
  161. package/survey.analytics.css.map +1 -1
  162. package/survey.analytics.d.ts +1 -2
  163. package/survey.analytics.fontless.css +1629 -0
  164. package/survey.analytics.fontless.css.map +1 -0
  165. package/survey.analytics.fontless.min.css +14 -0
  166. package/survey.analytics.js +7427 -3055
  167. package/survey.analytics.js.map +1 -1
  168. package/survey.analytics.min.css +11 -6
  169. package/survey.analytics.min.js +1 -1
  170. package/survey.analytics.min.js.LICENSE.txt +1 -1
  171. package/survey.analytics.mongo.js +2 -2
  172. package/survey.analytics.mongo.js.map +1 -1
  173. package/survey.analytics.mongo.min.js +1 -1
  174. package/survey.analytics.mongo.min.js.LICENSE.txt +1 -1
  175. package/survey.analytics.plotly.css +1714 -0
  176. package/survey.analytics.plotly.css.map +1 -0
  177. package/survey.analytics.plotly.d.ts +1 -0
  178. package/survey.analytics.plotly.fontless.css +1492 -0
  179. package/survey.analytics.plotly.fontless.css.map +1 -0
  180. package/survey.analytics.plotly.fontless.min.css +13 -0
  181. package/survey.analytics.plotly.js +23829 -0
  182. package/survey.analytics.plotly.js.map +1 -0
  183. package/survey.analytics.plotly.min.css +14 -0
  184. package/survey.analytics.plotly.min.js +2 -0
  185. package/survey.analytics.plotly.min.js.LICENSE.txt +22 -0
  186. package/survey.analytics.tabulator.css +992 -132
  187. package/survey.analytics.tabulator.css.map +1 -1
  188. package/survey.analytics.tabulator.fontless.css +1121 -0
  189. package/survey.analytics.tabulator.fontless.css.map +1 -0
  190. package/survey.analytics.tabulator.fontless.min.css +6 -0
  191. package/survey.analytics.tabulator.js +2608 -235
  192. package/survey.analytics.tabulator.js.map +1 -1
  193. package/survey.analytics.tabulator.min.css +3 -2
  194. package/survey.analytics.tabulator.min.js +1 -1
  195. package/survey.analytics.tabulator.min.js.LICENSE.txt +1 -1
  196. package/themes/default-dark.js +1032 -0
  197. package/themes/default-dark.js.map +1 -0
  198. package/themes/default-dark.min.js +2 -0
  199. package/themes/default-dark.min.js.LICENSE.txt +5 -0
  200. package/themes/default-light.js +1032 -0
  201. package/themes/default-light.js.map +1 -0
  202. package/themes/default-light.min.js +2 -0
  203. package/themes/default-light.min.js.LICENSE.txt +5 -0
  204. package/themes/index.js +2063 -0
  205. package/themes/index.js.map +1 -0
  206. package/themes/index.min.js +2 -0
  207. package/themes/index.min.js.LICENSE.txt +5 -0
  208. package/themes/themes/default-dark.d.ts +965 -0
  209. package/themes/themes/default-light.d.ts +965 -0
  210. package/themes/themes/index.d.ts +1934 -0
  211. package/themes/utils/helpers.d.ts +8 -0
  212. package/survey-analytics.types/plotly/setup.d.ts +0 -32
  213. /package/{survey-analytics.types/entries/summary.d.ts → survey-analytics-plotly.types/entries/plotly.fontless.d.ts} +0 -0
  214. /package/{survey-analytics.types → survey-analytics-plotly.types}/plotly/index.d.ts +0 -0
  215. /package/{survey-analytics.types → survey-analytics-plotly.types}/plotly/legacy.d.ts +0 -0
@@ -27,15 +27,3 @@ export declare class LayoutEngine {
27
27
  onMoveCallback: (order: Array<string>) => void;
28
28
  destroy(): void;
29
29
  }
30
- export declare class MuuriLayoutEngine extends LayoutEngine {
31
- private _selector;
32
- private dragEnabled;
33
- private _muuri;
34
- private _layoutingTimer;
35
- constructor(allowed: boolean, _selector: string, dragEnabled?: boolean);
36
- protected startCore(container: HTMLElement): void;
37
- protected stopCore(): void;
38
- protected updateCore(): void;
39
- add(elements: Array<HTMLElement>, options?: any): void;
40
- remove(elements: Array<HTMLElement>, options?: any): void;
41
- }
@@ -0,0 +1,152 @@
1
+ export declare var localization: {
2
+ currentLocaleValue: string;
3
+ defaultLocaleValue: string;
4
+ locales: {
5
+ [index: string]: any;
6
+ };
7
+ localeNames: {
8
+ [index: string]: any;
9
+ };
10
+ supportedLocales: Array<any>;
11
+ currentLocale: string;
12
+ defaultLocale: string;
13
+ setupLocale: (loc: string, strings: any) => void;
14
+ getLocaleName: (loc: string, inEnglish?: boolean) => string;
15
+ getString: (strName: string) => any;
16
+ getLocales: () => Array<string>;
17
+ };
18
+ export declare var surveyStrings: {
19
+ groupButton: string;
20
+ ungroupButton: string;
21
+ selectButton: string;
22
+ columnReorder: string;
23
+ hideColumn: string;
24
+ showColumn: string;
25
+ columns: string;
26
+ makePrivateColumn: string;
27
+ makePublicColumn: string;
28
+ moveToDetail: string;
29
+ showAsColumn: string;
30
+ filterPlaceholder: string;
31
+ removeRows: string;
32
+ showLabel: string;
33
+ entriesLabel: string;
34
+ entriesOnPageLabel: string;
35
+ visualizer_text: string;
36
+ visualizer_wordcloud: string;
37
+ visualizer_histogram: string;
38
+ visualizer_number: string;
39
+ visualizer_average: string;
40
+ visualizer_choices: string;
41
+ visualizer_selectBase: string;
42
+ visualizer_matrix: string;
43
+ chartType_bar: string;
44
+ chartType_vbar: string;
45
+ chartType_stackedbar: string;
46
+ chartType_doughnut: string;
47
+ chartType_pie: string;
48
+ chartType_scatter: string;
49
+ chartType_gauge: string;
50
+ chartType_bullet: string;
51
+ chartType_line: string;
52
+ chartType_radar: string;
53
+ chartType_histogram: string;
54
+ chartType_vhistogram: string;
55
+ chartType_stackedhistogram: string;
56
+ hideButton: string;
57
+ makePrivateButton: string;
58
+ makePublicButton: string;
59
+ showButton: string;
60
+ filter: string;
61
+ resetFilter: string;
62
+ changeLocale: string;
63
+ clearButton: string;
64
+ addElement: string;
65
+ allQuestions: string;
66
+ defaultOrder: string;
67
+ ascOrder: string;
68
+ descOrder: string;
69
+ showMinorColumns: string;
70
+ actionsColumn: string;
71
+ otherCommentTitle: string;
72
+ showPercentages: string;
73
+ hidePercentages: string;
74
+ exportAs: string;
75
+ pdfDownloadCaption: string;
76
+ xlsxDownloadCaption: string;
77
+ csvDownloadCaption: string;
78
+ saveDiagramAsPNG: string;
79
+ responsesText: string;
80
+ noData: string;
81
+ selectDateRange: string;
82
+ includeToday: string;
83
+ reportingPeriodCustom: string;
84
+ reportingPeriodLast7days: string;
85
+ reportingPeriodLast14days: string;
86
+ reportingPeriodLast28days: string;
87
+ reportingPeriodLast30days: string;
88
+ reportingPeriodLastWeekMon: string;
89
+ reportingPeriodLastWeekSun: string;
90
+ reportingPeriodLastMonth: string;
91
+ reportingPeriodLastQuarter: string;
92
+ reportingPeriodLastYear: string;
93
+ reportingPeriodWtdSun: string;
94
+ reportingPeriodWtdMon: string;
95
+ reportingPeriodMtd: string;
96
+ reportingPeriodQtd: string;
97
+ reportingPeriodYtd: string;
98
+ hideEmptyAnswers: string;
99
+ showEmptyAnswers: string;
100
+ "topNValueText-1": string;
101
+ topNValueText5: string;
102
+ topNValueText10: string;
103
+ topNValueText20: string;
104
+ hideMissingAnswers: string;
105
+ showMissingAnswers: string;
106
+ missingAnswersLabel: string;
107
+ noVisualizerForQuestion: string;
108
+ noResults: string;
109
+ showPerValues: string;
110
+ showPerColumns: string;
111
+ answer: string;
112
+ correctAnswer: string;
113
+ percent: string;
114
+ percentage: string;
115
+ statistics_chart: string;
116
+ responses: string;
117
+ visualizer_nps: string;
118
+ visualizer_boolean: string;
119
+ visualizer_options: string;
120
+ npsScore: string;
121
+ npsPromoters: string;
122
+ npsPassives: string;
123
+ npsDetractors: string;
124
+ axisXSelectorTitle: string;
125
+ axisYSelectorTitle: string;
126
+ axisXAlternativeSelectorTitle: string;
127
+ axisYAlternativeSelectorTitle: string;
128
+ notSelected: string;
129
+ intervalMode_default: string;
130
+ intervalMode_decades: string;
131
+ intervalMode_years: string;
132
+ intervalMode_quarters: string;
133
+ intervalMode_months: string;
134
+ intervalMode_days: string;
135
+ intervalMode_custom: string;
136
+ intervalMode_auto: string;
137
+ intervalModeTitle: string;
138
+ noRunningTotals: string;
139
+ runningTotals: string;
140
+ groupDateSeries: string;
141
+ ungroupDateSeries: string;
142
+ noneAggregateText: string;
143
+ selectAggregateText: string;
144
+ groupedYearsAxisTitle: string;
145
+ license: string;
146
+ license2: string;
147
+ };
148
+ export declare function setupLocale(localeConfig: {
149
+ localeCode: string;
150
+ strings: any;
151
+ nativeName?: string;
152
+ }): void;
@@ -0,0 +1,17 @@
1
+ import { ItemValue, QuestionMatrixModel, Question } from "survey-core";
2
+ import { SelectBase } from "./selectBase";
3
+ import { IAnswersData } from "./visualizerBase";
4
+ export declare class Matrix extends SelectBase {
5
+ constructor(question: Question, data: Array<{
6
+ [index: string]: any;
7
+ }>, options?: Object, type?: string);
8
+ protected get matrixQuestion(): QuestionMatrixModel;
9
+ protected isSupportMissingAnswers(): boolean;
10
+ getSeriesValues(): Array<string>;
11
+ getSeriesLabels(): Array<string>;
12
+ getSelectedItemByText(itemText: string): any;
13
+ valuesSource(): Array<ItemValue>;
14
+ private getHasAnswersInAllSeriesArray;
15
+ private getHasAnswersInSeries;
16
+ protected hideEmptyAnswersInData(answersData: IAnswersData): IAnswersData;
17
+ }
@@ -0,0 +1,15 @@
1
+ import { ItemValue, QuestionMatrixDropdownModel, Question } from "survey-core";
2
+ import { SelectBase } from "./selectBase";
3
+ import { ICalculationResult } from "./visualizerBase";
4
+ export declare class MatrixDropdownGrouped extends SelectBase {
5
+ constructor(question: Question, data: Array<{
6
+ [index: string]: any;
7
+ }>, options?: Object, type?: string);
8
+ protected get matrixQuestion(): QuestionMatrixDropdownModel;
9
+ get dataNames(): Array<string>;
10
+ getSeriesValues(): Array<string>;
11
+ getSeriesLabels(): Array<string>;
12
+ valuesSource(): Array<ItemValue>;
13
+ protected isSupportMissingAnswers(): boolean;
14
+ protected getCalculatedValuesCore(): ICalculationResult;
15
+ }
@@ -0,0 +1,13 @@
1
+ import { LayoutEngine } from "./layout-engine";
2
+ export declare class MuuriLayoutEngine extends LayoutEngine {
3
+ private _selector;
4
+ private dragEnabled;
5
+ private _muuri;
6
+ private _layoutingTimer;
7
+ constructor(allowed: boolean, _selector: string, dragEnabled?: boolean);
8
+ protected startCore(container: HTMLElement): void;
9
+ protected stopCore(): void;
10
+ protected updateCore(): void;
11
+ add(elements: Array<HTMLElement>, options?: any): void;
12
+ remove(elements: Array<HTMLElement>, options?: any): void;
13
+ }
@@ -0,0 +1,37 @@
1
+ import { Question } from "survey-core";
2
+ import { ICalculationResult, VisualizerBase } from "./visualizerBase";
3
+ import "./nps.scss";
4
+ export declare class NpsVisualizerWidget {
5
+ private _model;
6
+ private _renderedTarget;
7
+ private _data;
8
+ constructor(_model: NpsVisualizer, data: ICalculationResult);
9
+ private renderScorePart;
10
+ render(target: HTMLDivElement): void;
11
+ get npsScore(): number;
12
+ get promotersPercent(): number;
13
+ get passivePercent(): number;
14
+ get detractorsPercent(): number;
15
+ dispose(): void;
16
+ }
17
+ export declare class NpsAdapter {
18
+ private model;
19
+ private _npsVisualizer;
20
+ constructor(model: NpsVisualizer);
21
+ get npsVisualizer(): any;
22
+ create(element: HTMLElement): Promise<any>;
23
+ destroy(node: HTMLElement): void;
24
+ }
25
+ export declare class NpsVisualizer extends VisualizerBase {
26
+ static DetractorScore: number;
27
+ static PromoterScore: number;
28
+ precision: number;
29
+ private _npsAdapter;
30
+ constructor(question: Question, data: Array<{
31
+ [index: string]: any;
32
+ }>, options?: Object, type?: string);
33
+ protected getCalculatedValuesCore(): ICalculationResult;
34
+ protected destroyContent(container: HTMLElement): void;
35
+ protected renderContentAsync(container: HTMLElement): Promise<HTMLElement>;
36
+ destroy(): void;
37
+ }
@@ -0,0 +1,27 @@
1
+ import { Question } from "survey-core";
2
+ import { ICalculationResult, VisualizerBase } from "./visualizerBase";
3
+ export declare class NumberModel extends VisualizerBase {
4
+ private _statistics;
5
+ static stepsCount: number;
6
+ static generateTextsCallback: (question: Question, maxValue: number, minValue: number, stepsCount: number, texts: string[]) => string[];
7
+ protected chartTypes: Array<string>;
8
+ chartType: String;
9
+ static showAsPercentage: boolean;
10
+ displayValueName: string;
11
+ private initChartTypes;
12
+ constructor(question: Question, data: Array<{
13
+ [index: string]: any;
14
+ }>, options?: {
15
+ [index: string]: any;
16
+ }, type?: string);
17
+ protected onDataChanged(): void;
18
+ protected onChartTypeChanged(): void;
19
+ protected setChartType(chartType: string): void;
20
+ destroy(): void;
21
+ generateText(maxValue: number, minValue: number, stepsCount: number): string[];
22
+ generateValues(maxValue: number, stepsCount: number): number[];
23
+ generateColors(maxValue: number, minValue: number, stepsCount: number): string[];
24
+ convertFromExternalData(externalCalculatedData: any): ICalculationResult;
25
+ protected getCalculatedValuesCore(): ICalculationResult;
26
+ getValues(): Array<any>;
27
+ }
@@ -0,0 +1,59 @@
1
+ import { Question } from "survey-core";
2
+ import { ICalculationResult, IVisualizerOptions } from "./visualizerBase";
3
+ import { HistogramModel } from "./histogram";
4
+ export interface IPivotChartVisualizerOptions extends IVisualizerOptions {
5
+ questions?: Question[] | string[];
6
+ categoryField?: Question | string;
7
+ seriesFields?: Question[] | string[];
8
+ maxSeriesCount?: number;
9
+ [key: string]: any;
10
+ }
11
+ export declare class PivotModel extends HistogramModel {
12
+ questions: Array<Question>;
13
+ private isRoot;
14
+ private _pivotContinuousData;
15
+ private axisXSelector;
16
+ axisXQuestionName: string;
17
+ private axisYSelectors;
18
+ axisYQuestionNames: Array<string>;
19
+ private questionsY;
20
+ private _questionDefinition;
21
+ private _aggregations;
22
+ constructor(questions: Array<Question>, data: Array<{
23
+ [index: string]: any;
24
+ }>, options?: IPivotChartVisualizerOptions, isRoot?: boolean, type?: string);
25
+ protected getName(): string;
26
+ protected getTitle(question: Question): string;
27
+ private createYSelecterGenerator;
28
+ setAxisQuestions(...axisQuestionNames: string[]): void;
29
+ onAxisYSelectorChanged(index: number, value: any): void;
30
+ protected updateQuestionsSelection(): void;
31
+ private createAxisYSelector;
32
+ protected setChartType(chartType: string): void;
33
+ private isXYChart;
34
+ private setupPivot;
35
+ protected getContinuousValues(): {
36
+ original: any;
37
+ continuous: number;
38
+ row: any;
39
+ }[];
40
+ protected isSupportAnswersOrder(): boolean;
41
+ getSeriesValues(): Array<string>;
42
+ getSeriesLabels(): Array<string>;
43
+ convertFromExternalData(externalCalculatedData: any): ICalculationResult;
44
+ getSeriesValueIndexes(): {
45
+ [index: string]: number;
46
+ };
47
+ updateStatisticsSeriesValue(statistics: Array<Array<number>>, dataRow: {
48
+ [index: string]: any;
49
+ }, valueIndex: number, seriesValueIndexes: {
50
+ [index: string]: number;
51
+ }): void;
52
+ resetAggregations(): void;
53
+ setValueAggregation(axisYQuestion: string, aggregation: string | ((acc: number, value: number) => number)): void;
54
+ protected calculateAggregation(dataRow: any, axisYQuestion: string, currentValue: number): number;
55
+ protected getCalculatedValuesCore(): ICalculationResult;
56
+ protected renderToolbar(container: HTMLElement): void;
57
+ render(targetElement: HTMLElement | string, isRoot?: boolean): void;
58
+ protected renderBanner(container: HTMLElement): void;
59
+ }
@@ -1,11 +1,20 @@
1
1
  import { SelectBase } from "../selectBase";
2
2
  import { VisualizerBase, IChartAdapter } from "../visualizerBase";
3
- export declare const plotlyChartTypes: {
4
- [key: string]: () => Array<string>;
3
+ export declare const chartTypes: {
4
+ boolean: string[];
5
+ number: string[];
6
+ average: string[];
7
+ selectBase: string[];
8
+ histogram: string[];
9
+ matrix: string[];
10
+ matrixDropdownGrouped: string[];
11
+ pivot: string[];
12
+ ranking: string[];
5
13
  };
6
14
  export declare class PlotlyChartAdapter implements IChartAdapter {
7
15
  protected model: SelectBase | VisualizerBase;
8
16
  private _chart;
17
+ static getChartTypesByVisualizerType(vType: string): Array<string>;
9
18
  constructor(model: SelectBase | VisualizerBase);
10
19
  protected patchConfigParameters(chartNode: object, traces: Array<object>, layout: object, config: any): void;
11
20
  get chart(): Promise<Plotly.PlotlyHTMLElement>;
@@ -0,0 +1,150 @@
1
+ import { Event } from "survey-core";
2
+ import { SelectBase } from "../selectBase";
3
+ import { IAnswersData, VisualizerBase } from "../visualizerBase";
4
+ import { NumberModel } from "../number";
5
+ import { DashboardTheme } from "../theme";
6
+ export interface PlotlyOptions {
7
+ traces: Array<any>;
8
+ layout: any;
9
+ hasSeries: boolean;
10
+ }
11
+ export declare class PlotlySetup {
12
+ static imageExportFormat: string;
13
+ static defaultBarGap: number;
14
+ static getRgbaColor(propertyValue: any): string;
15
+ static defaultModebarConfig(theme: DashboardTheme): {
16
+ bgcolor: string;
17
+ activecolor: string;
18
+ color: string;
19
+ };
20
+ static defaultTooltipConfig(theme: DashboardTheme): {
21
+ bgcolor: string;
22
+ font: {
23
+ size: number;
24
+ family: string;
25
+ color: string;
26
+ weight: number;
27
+ };
28
+ };
29
+ static defaultLegendConfig(model: SelectBase): {
30
+ orientation: string;
31
+ xanchor: string;
32
+ yanchor: string;
33
+ x: number;
34
+ y: number;
35
+ bordercolor: any;
36
+ borderwidth: any;
37
+ itemwidth: number;
38
+ font: {
39
+ size: number;
40
+ family: string;
41
+ color: string;
42
+ weight: number;
43
+ };
44
+ };
45
+ static defaultAxisConfig(theme: DashboardTheme): {
46
+ zerolinecolor: string;
47
+ automargin: boolean;
48
+ tickfont: {
49
+ size: number;
50
+ family: string;
51
+ color: string;
52
+ weight: number;
53
+ };
54
+ };
55
+ static defaultInsideLabelFont(theme: DashboardTheme): {
56
+ size: number;
57
+ family: string;
58
+ color: string;
59
+ weight: number;
60
+ };
61
+ static defaultAxisXConfig(theme: DashboardTheme): {
62
+ ticklabelstandoff: number;
63
+ zerolinecolor: string;
64
+ automargin: boolean;
65
+ tickfont: {
66
+ size: number;
67
+ family: string;
68
+ color: string;
69
+ weight: number;
70
+ };
71
+ };
72
+ static defaultAxisXWithGridLineConfig(theme: DashboardTheme): {
73
+ gridcolor: string;
74
+ griddash: string;
75
+ ticklabelstandoff: number;
76
+ zerolinecolor: string;
77
+ automargin: boolean;
78
+ tickfont: {
79
+ size: number;
80
+ family: string;
81
+ color: string;
82
+ weight: number;
83
+ };
84
+ };
85
+ static defaultAxisYConfig(theme: DashboardTheme): {
86
+ ticklabelstandoff: number;
87
+ zerolinecolor: string;
88
+ automargin: boolean;
89
+ tickfont: {
90
+ size: number;
91
+ family: string;
92
+ color: string;
93
+ weight: number;
94
+ };
95
+ };
96
+ static defaultAxisYWithGridLineConfig(theme: DashboardTheme): {
97
+ gridcolor: string;
98
+ griddash: string;
99
+ ticklabelstandoff: number;
100
+ zerolinecolor: string;
101
+ automargin: boolean;
102
+ tickfont: {
103
+ size: number;
104
+ family: string;
105
+ color: string;
106
+ weight: number;
107
+ };
108
+ };
109
+ static defaultGaugeConfig(theme: any): {
110
+ bgcolor: string;
111
+ bordercolor: string;
112
+ bar: {
113
+ color: string;
114
+ thickness: number;
115
+ };
116
+ };
117
+ static defaultValueGaugeFont(theme: DashboardTheme): {
118
+ size: number;
119
+ family: string;
120
+ color: string;
121
+ weight: number;
122
+ };
123
+ static defaultGaugeTickFont(theme: DashboardTheme): {
124
+ size: number;
125
+ family: string;
126
+ color: string;
127
+ weight: number;
128
+ };
129
+ static noDataAnnotations(theme: DashboardTheme): any;
130
+ /**
131
+ * Fires when end user clicks on the 'save as image' button.
132
+ */
133
+ static onImageSaving: Event<(sender: VisualizerBase, options: any) => any, VisualizerBase, any>;
134
+ /**
135
+ * Fires before plot will be created. User can change traces, layout and config of the plot.
136
+ * Options is an object with the following fields: traces, layout and config of the plot.
137
+ */
138
+ static onPlotCreating: Event<(sender: VisualizerBase, options: any) => any, VisualizerBase, any>;
139
+ static setups: {
140
+ [type: string]: (model: VisualizerBase, answersData: IAnswersData) => PlotlyOptions;
141
+ };
142
+ static setup(charType: string, model: VisualizerBase, answersData: IAnswersData): PlotlyOptions;
143
+ static getTruncatedLabel: (label: string, labelTruncateLength: number) => string;
144
+ static setupPie(model: SelectBase, answersData: IAnswersData): PlotlyOptions;
145
+ static setupBar(model: SelectBase, answersData: IAnswersData): PlotlyOptions;
146
+ static setupVBar(model: SelectBase, answersData: IAnswersData): PlotlyOptions;
147
+ static setupScatter(model: SelectBase, answersData: IAnswersData): PlotlyOptions;
148
+ static setupGauge(model: NumberModel, answersData: IAnswersData): PlotlyOptions;
149
+ static setupRadar(model: SelectBase, answersData: IAnswersData): PlotlyOptions;
150
+ }
@@ -0,0 +1,12 @@
1
+ import { SelectBase } from "./selectBase";
2
+ import { QuestionRankingModel } from "survey-core";
3
+ import { ICalculationResult } from "./visualizerBase";
4
+ export declare class RankingModel extends SelectBase {
5
+ constructor(question: QuestionRankingModel, data: Array<{
6
+ [index: string]: any;
7
+ }>, options?: any, type?: string);
8
+ getQuestionResults(): any[];
9
+ getEmptyData(): any;
10
+ protected getCalculatedValuesCore(): ICalculationResult;
11
+ applyResultToPlotlyData(result: any[], plotlyData: any, choices: any): void;
12
+ }
@@ -0,0 +1,116 @@
1
+ import { Question, ItemValue, Event } from "survey-core";
2
+ import { IAnswersData, ICalculationResult, VisualizerBase } from "./visualizerBase";
3
+ export interface IVisualizerWithSelection {
4
+ selection: ItemValue;
5
+ onDataItemSelected: (selectedValue: any, selectedText: string) => void;
6
+ setSelection(item: ItemValue): void;
7
+ }
8
+ export declare function hideEmptyAnswersInData(answersData: IAnswersData): IAnswersData;
9
+ export declare class SelectBase extends VisualizerBase implements IVisualizerWithSelection {
10
+ protected selectedItem: ItemValue;
11
+ private choicesOrderSelector;
12
+ private showPercentageBtn;
13
+ private emptyAnswersBtn;
14
+ private transposeDataBtn;
15
+ private topNSelector;
16
+ private _showPercentages;
17
+ private _showOnlyPercentages;
18
+ private _percentagePrecision;
19
+ protected _answersOrder: string;
20
+ private _hideEmptyAnswers;
21
+ private _topN;
22
+ static topNValuesDefaults: number[];
23
+ topNValues: any[];
24
+ _legendPosition: "left" | "right" | "top" | "bottom";
25
+ protected _transposeData: boolean;
26
+ private _showMissingAnswers;
27
+ private missingAnswersBtn;
28
+ private initChartTypes;
29
+ constructor(question: Question, data: Array<{
30
+ [index: string]: any;
31
+ }>, options?: any, type?: string);
32
+ protected chartTypes: string[];
33
+ protected _chartType: string;
34
+ /**
35
+ * Chart type - current chart type.
36
+ */
37
+ get chartType(): string;
38
+ set chartType(newChartType: string);
39
+ private updateEmptyAnswersBtn;
40
+ private updateTransposeDataBtn;
41
+ private updateOrderSelector;
42
+ private updateShowPercentageBtn;
43
+ private updateTopNSelector;
44
+ private updateMissingAnswersBtn;
45
+ protected onChartTypeChanged(): void;
46
+ protected setChartType(chartType: string): void;
47
+ protected getCorrectAnswerText(): string;
48
+ protected isSupportSoftUpdateContent(): boolean;
49
+ protected softUpdateContent(): void;
50
+ getSelectedItemByText(itemText: string): any;
51
+ protected onSelectionChanged(item: ItemValue): void;
52
+ setSelection(item: ItemValue): void;
53
+ get selection(): ItemValue;
54
+ /**
55
+ * Gets and sets whether chart should show percentages only.
56
+ */
57
+ get showOnlyPercentages(): boolean;
58
+ set showOnlyPercentages(val: boolean);
59
+ protected getShowPercentagesDefault(): boolean;
60
+ get percentagePrecision(): number;
61
+ /**
62
+ * Gets and sets whether chart should show values and percentages.
63
+ */
64
+ get showPercentages(): boolean;
65
+ set showPercentages(val: boolean);
66
+ /**
67
+ * Gets and sets chart elements order.
68
+ */
69
+ get answersOrder(): string;
70
+ set answersOrder(value: string);
71
+ /**
72
+ * Set to true if need to hide empty chart elements (e.g. bars vith zero value).
73
+ */
74
+ get hideEmptyAnswers(): boolean;
75
+ set hideEmptyAnswers(value: boolean);
76
+ get transposeData(): boolean;
77
+ set transposeData(value: boolean);
78
+ /**
79
+ * Set to some value if need to show top N chart elements.
80
+ */
81
+ get topN(): number;
82
+ set topN(value: number);
83
+ protected isSupportAnswersOrder(): boolean;
84
+ protected isSupportMissingAnswers(): boolean;
85
+ /**
86
+ * Set to true if you want to see chart elements for missing answers (e.g. radiogroup items never been selected by surveyee).
87
+ */
88
+ get showMissingAnswers(): boolean;
89
+ set showMissingAnswers(value: boolean);
90
+ get legendPosition(): "left" | "right" | "top" | "bottom";
91
+ set legendPosition(value: "left" | "right" | "top" | "bottom");
92
+ onDataItemSelected: (selectedValue: any, selectedText: string) => void;
93
+ get showValuesInOriginalOrder(): boolean;
94
+ valuesSource(): Array<ItemValue>;
95
+ getValues(): Array<any>;
96
+ getLabels(): Array<string>;
97
+ getPercentages(data: Array<Array<number>>): Array<Array<number>>;
98
+ /**
99
+ * Fires when answer data has been combined before they passed to draw graph.
100
+ * options - the answers data object containing: datasets, labels, colors, additional texts (percentage).
101
+ * options fields can be modified
102
+ */
103
+ onAnswersDataReady: Event<(sender: SelectBase, options: any) => any, SelectBase, any>;
104
+ /**
105
+ * Returns object with all infotmation for data visualization: datasets, labels, colors, additional texts (percentage).
106
+ */
107
+ getAnswersData(): Promise<IAnswersData>;
108
+ convertFromExternalData(externalCalculatedData: any): ICalculationResult;
109
+ protected transpose(data: Array<Array<number>>): Array<Array<number>>;
110
+ private static _selectBaseDefaultState;
111
+ getDefaultState(): any;
112
+ getState(): any;
113
+ protected setStateCore(state: any): void;
114
+ resetState(): void;
115
+ protected onThemeChanged(): void;
116
+ }
@@ -0,0 +1,9 @@
1
+ import { ICalculationResult, IDataInfo } from "./visualizerBase";
2
+ export declare function defaultStatisticsCalculator(data: Array<any>, dataInfo: IDataInfo): ICalculationResult;
3
+ export declare function histogramStatisticsCalculator(data: any, intervals: Array<{
4
+ start: number | Date;
5
+ end: number | Date;
6
+ label: string;
7
+ }>, dataInfo: IDataInfo, aggregateDataNames?: any[]): ICalculationResult;
8
+ export declare function mathStatisticsCalculator(data: Array<any>, dataInfo: IDataInfo): ICalculationResult;
9
+ export declare function getNestedDataRows(dataRow: any, dataPath: string): Array<any>;
@@ -0,0 +1,28 @@
1
+ import { Question } from "survey-core";
2
+ import { SelectBase } from "./selectBase";
3
+ import { BooleanModel } from "./boolean";
4
+ import "./statistics-table.scss";
5
+ export declare class StatisticsTableAdapter {
6
+ private model;
7
+ constructor(model: SelectBase);
8
+ create(container: HTMLElement): Promise<void>;
9
+ destroy(node: HTMLElement): void;
10
+ }
11
+ export declare class StatisticsTable extends SelectBase {
12
+ private _statisticsTableAdapter;
13
+ constructor(question: Question, data: Array<{
14
+ [index: string]: any;
15
+ }>, options?: Object, type?: string);
16
+ protected destroyContent(container: HTMLElement): void;
17
+ protected renderContentAsync(container: HTMLElement): Promise<HTMLElement>;
18
+ destroy(): void;
19
+ }
20
+ export declare class StatisticsTableBoolean extends BooleanModel {
21
+ private _statisticsTableAdapter;
22
+ constructor(question: Question, data: Array<{
23
+ [index: string]: any;
24
+ }>, options?: Object, type?: string);
25
+ protected destroyContent(container: HTMLElement): void;
26
+ protected renderContentAsync(container: HTMLElement): Promise<HTMLElement>;
27
+ destroy(): void;
28
+ }