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
@@ -0,0 +1,2 @@
1
+ export * from "../apexcharts/index";
2
+ export * from "./summary.core";
@@ -17,6 +17,7 @@ export * from "../dataProvider";
17
17
  export * from "../visualizerFactory";
18
18
  export * from "../selectBase";
19
19
  export * from "../matrix";
20
+ export * from "../matrixDropdownGrouped";
20
21
  export * from "../boolean";
21
22
  export * from "../histogram";
22
23
  export * from "../number";
@@ -28,11 +29,16 @@ export * from "../visualizationMatrixDynamic";
28
29
  export * from "../visualizationMatrixDropdown";
29
30
  export * from "../alternativeVizualizersWrapper";
30
31
  export * from "../visualizationComposite";
32
+ export * from "../dashboard";
31
33
  export * from "../wordcloud/wordcloud";
32
34
  export * from "../wordcloud/stopwords/index";
33
35
  export * from "../text";
34
36
  export * from "../statistics-table";
35
37
  export * from "../nps";
38
+ export * from "../card";
36
39
  export * from "../ranking";
37
40
  export * from "../pivot";
41
+ export * from "../theme";
38
42
  export { DocumentHelper } from "../utils/index";
43
+ export * from "../layout-engine";
44
+ export * from "../muuri-layout-engine";
@@ -1,5 +1,6 @@
1
1
  import { ItemValue, Question } from "survey-core";
2
- import { IAnswersData, SelectBase } from "./selectBase";
2
+ import { SelectBase } from "./selectBase";
3
+ import { IAnswersData, ICalculationResult } from "./visualizerBase";
3
4
  export declare type HistogramIntervalMode = "auto" | "custom" | "decades" | "years" | "quarters" | "months" | "days";
4
5
  export interface IHistogramInterval {
5
6
  start: number;
@@ -15,11 +16,19 @@ export declare const intervalCalculators: {
15
16
  days: (min: number, max: number) => any[];
16
17
  };
17
18
  export declare class HistogramModel extends SelectBase {
18
- protected valueType: "date" | "number";
19
- private _cachedValues;
19
+ protected valueType: "date" | "number" | "enum";
20
+ protected _cachedValues: Array<{
21
+ original: any;
22
+ continuous: number;
23
+ row: any;
24
+ }>;
20
25
  private _continuousData;
21
- private _cachedIntervals;
22
- private _intervalPrecision;
26
+ protected _cachedIntervals: Array<{
27
+ start: number;
28
+ end: number;
29
+ label: string;
30
+ }>;
31
+ protected _intervalPrecision: number;
23
32
  private showRunningTotalsBtn;
24
33
  private showGroupedBtn;
25
34
  private changeIntervalsModeSelector;
@@ -28,13 +37,14 @@ export declare class HistogramModel extends SelectBase {
28
37
  static UseIntervalsFrom: number;
29
38
  constructor(question: Question, data: Array<{
30
39
  [index: string]: any;
31
- }>, options?: Object, name?: string);
40
+ }>, options?: Object, type?: string);
32
41
  private updateIntervalsModeSelector;
33
42
  private updateAggregateDataNameSelector;
34
- private reset;
43
+ getQuestionValueType(question: Question, defaultValue?: string): "enum" | "date" | "number";
44
+ protected reset(): void;
35
45
  getContinuousValue(value: any): number;
36
46
  getString(value: number): string;
37
- private toPrecision;
47
+ protected toPrecision(value: number): number;
38
48
  getSelectedItemByText(itemText: string): ItemValue;
39
49
  /**
40
50
  * Updates visualizer data.
@@ -55,7 +65,11 @@ export declare class HistogramModel extends SelectBase {
55
65
  getValues(): Array<any>;
56
66
  getLabels(): Array<string>;
57
67
  get hasCustomIntervals(): boolean;
58
- get intervals(): any;
68
+ get intervals(): Array<{
69
+ start: number;
70
+ end: number;
71
+ label: string;
72
+ }>;
59
73
  intervalModes: HistogramIntervalMode[];
60
74
  private _intervalsMode;
61
75
  get intervalsMode(): HistogramIntervalMode;
@@ -74,13 +88,15 @@ export declare class HistogramModel extends SelectBase {
74
88
  get aggregateDataName(): string;
75
89
  set aggregateDataName(val: string);
76
90
  get possibleAggregateDataNames(): Array<string>;
77
- convertFromExternalData(externalCalculatedData: any): any[];
78
- protected getCalculatedValuesCore(): Array<any>;
79
- getCalculatedValues(): Promise<Array<Object>>;
91
+ convertFromExternalData(externalCalculatedData: Array<number>): ICalculationResult;
92
+ protected getCalculatedValuesCore(): ICalculationResult;
93
+ getCalculatedValues(): Promise<ICalculationResult>;
80
94
  private getGroupedDateAnswersData;
81
95
  /**
82
96
  * Returns object with all infotmation for data visualization: datasets, labels, colors, additional texts (percentage).
83
97
  */
84
98
  getAnswersData(): Promise<IAnswersData>;
85
- getValueType(): "date" | "number";
99
+ private static _histogramDefaultState;
100
+ getDefaultState(): any;
101
+ getValueType(): "date" | "number" | "enum";
86
102
  }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * A base class used to implement custom layout engines or integrate third-party layout engines with SurveyJS Dashboard.
3
+ */
4
+ export declare class LayoutEngine {
5
+ protected _allowed: boolean;
6
+ constructor(_allowed: boolean);
7
+ protected startCore(container: HTMLElement): void;
8
+ protected stopCore(): void;
9
+ protected updateCore(): void;
10
+ get allowed(): boolean;
11
+ /**
12
+ * Enables the dynamic layout in a given HTML element.
13
+ *
14
+ * This method should arrange visualization items based on the available screen space and allow users to reorder them via drag and drop.
15
+ */
16
+ start(container: HTMLElement): void;
17
+ /**
18
+ * Disables the dynamic layout.
19
+ */
20
+ stop(): void;
21
+ /**
22
+ * Updates the dynamic layout.
23
+ */
24
+ update(): void;
25
+ add(elements: Array<HTMLElement>, options?: any): void;
26
+ remove(elements: Array<HTMLElement>, options?: any): void;
27
+ onMoveCallback: (order: Array<string>) => void;
28
+ destroy(): void;
29
+ }
@@ -19,8 +19,10 @@ export declare var surveyStrings: {
19
19
  groupButton: string;
20
20
  ungroupButton: string;
21
21
  selectButton: string;
22
+ columnReorder: string;
22
23
  hideColumn: string;
23
24
  showColumn: string;
25
+ columns: string;
24
26
  makePrivateColumn: string;
25
27
  makePublicColumn: string;
26
28
  moveToDetail: string;
@@ -29,10 +31,12 @@ export declare var surveyStrings: {
29
31
  removeRows: string;
30
32
  showLabel: string;
31
33
  entriesLabel: string;
34
+ entriesOnPageLabel: string;
32
35
  visualizer_text: string;
33
36
  visualizer_wordcloud: string;
34
37
  visualizer_histogram: string;
35
38
  visualizer_number: string;
39
+ visualizer_average: string;
36
40
  visualizer_choices: string;
37
41
  visualizer_selectBase: string;
38
42
  visualizer_matrix: string;
@@ -46,6 +50,9 @@ export declare var surveyStrings: {
46
50
  chartType_bullet: string;
47
51
  chartType_line: string;
48
52
  chartType_radar: string;
53
+ chartType_histogram: string;
54
+ chartType_vhistogram: string;
55
+ chartType_stackedhistogram: string;
49
56
  hideButton: string;
50
57
  makePrivateButton: string;
51
58
  makePublicButton: string;
@@ -55,6 +62,7 @@ export declare var surveyStrings: {
55
62
  changeLocale: string;
56
63
  clearButton: string;
57
64
  addElement: string;
65
+ allQuestions: string;
58
66
  defaultOrder: string;
59
67
  ascOrder: string;
60
68
  descOrder: string;
@@ -63,10 +71,30 @@ export declare var surveyStrings: {
63
71
  otherCommentTitle: string;
64
72
  showPercentages: string;
65
73
  hidePercentages: string;
74
+ exportAs: string;
66
75
  pdfDownloadCaption: string;
67
76
  xlsxDownloadCaption: string;
68
77
  csvDownloadCaption: string;
69
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;
70
98
  hideEmptyAnswers: string;
71
99
  showEmptyAnswers: string;
72
100
  "topNValueText-1": string;
@@ -1,9 +1,10 @@
1
1
  import { ItemValue, QuestionMatrixModel, Question } from "survey-core";
2
- import { IAnswersData, SelectBase } from "./selectBase";
2
+ import { SelectBase } from "./selectBase";
3
+ import { IAnswersData } from "./visualizerBase";
3
4
  export declare class Matrix extends SelectBase {
4
5
  constructor(question: Question, data: Array<{
5
6
  [index: string]: any;
6
- }>, options?: Object, name?: string);
7
+ }>, options?: Object, type?: string);
7
8
  protected get matrixQuestion(): QuestionMatrixModel;
8
9
  protected isSupportMissingAnswers(): boolean;
9
10
  getSeriesValues(): Array<string>;
@@ -1,14 +1,15 @@
1
1
  import { ItemValue, QuestionMatrixDropdownModel, Question } from "survey-core";
2
2
  import { SelectBase } from "./selectBase";
3
+ import { ICalculationResult } from "./visualizerBase";
3
4
  export declare class MatrixDropdownGrouped extends SelectBase {
4
5
  constructor(question: Question, data: Array<{
5
6
  [index: string]: any;
6
- }>, options?: Object, name?: string);
7
+ }>, options?: Object, type?: string);
7
8
  protected get matrixQuestion(): QuestionMatrixDropdownModel;
8
9
  get dataNames(): Array<string>;
9
10
  getSeriesValues(): Array<string>;
10
11
  getSeriesLabels(): Array<string>;
11
12
  valuesSource(): Array<ItemValue>;
12
13
  protected isSupportMissingAnswers(): boolean;
13
- protected getCalculatedValuesCore(): Array<any>;
14
+ protected getCalculatedValuesCore(): ICalculationResult;
14
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
+ }
@@ -1,16 +1,11 @@
1
1
  import { Question } from "survey-core";
2
- import { VisualizerBase } from "./visualizerBase";
2
+ import { ICalculationResult, VisualizerBase } from "./visualizerBase";
3
3
  import "./nps.scss";
4
4
  export declare class NpsVisualizerWidget {
5
5
  private _model;
6
- private _data;
7
6
  private _renderedTarget;
8
- constructor(_model: NpsVisualizer, _data: {
9
- detractors: number;
10
- passive: number;
11
- promoters: number;
12
- total: number;
13
- });
7
+ private _data;
8
+ constructor(_model: NpsVisualizer, data: ICalculationResult);
14
9
  private renderScorePart;
15
10
  render(target: HTMLDivElement): void;
16
11
  get npsScore(): number;
@@ -34,8 +29,8 @@ export declare class NpsVisualizer extends VisualizerBase {
34
29
  private _npsAdapter;
35
30
  constructor(question: Question, data: Array<{
36
31
  [index: string]: any;
37
- }>, options?: Object, name?: string);
38
- protected getCalculatedValuesCore(): any;
32
+ }>, options?: Object, type?: string);
33
+ protected getCalculatedValuesCore(): ICalculationResult;
39
34
  protected destroyContent(container: HTMLElement): void;
40
35
  protected renderContentAsync(container: HTMLElement): Promise<HTMLElement>;
41
36
  destroy(): void;
@@ -1,19 +1,19 @@
1
1
  import { Question } from "survey-core";
2
- import { VisualizerBase } from "./visualizerBase";
2
+ import { ICalculationResult, VisualizerBase } from "./visualizerBase";
3
3
  export declare class NumberModel extends VisualizerBase {
4
- private _resultAverage;
5
- private _resultMin;
6
- private _resultMax;
4
+ private _statistics;
7
5
  static stepsCount: number;
8
6
  static generateTextsCallback: (question: Question, maxValue: number, minValue: number, stepsCount: number, texts: string[]) => string[];
9
7
  protected chartTypes: Array<string>;
10
8
  chartType: String;
11
9
  static showAsPercentage: boolean;
10
+ displayValueName: string;
11
+ private initChartTypes;
12
12
  constructor(question: Question, data: Array<{
13
13
  [index: string]: any;
14
14
  }>, options?: {
15
15
  [index: string]: any;
16
- }, name?: string);
16
+ }, type?: string);
17
17
  protected onDataChanged(): void;
18
18
  protected onChartTypeChanged(): void;
19
19
  protected setChartType(chartType: string): void;
@@ -21,6 +21,7 @@ export declare class NumberModel extends VisualizerBase {
21
21
  generateText(maxValue: number, minValue: number, stepsCount: number): string[];
22
22
  generateValues(maxValue: number, stepsCount: number): number[];
23
23
  generateColors(maxValue: number, minValue: number, stepsCount: number): string[];
24
- convertFromExternalData(externalCalculatedData: any): any[];
25
- protected getCalculatedValuesCore(): Array<any>;
24
+ convertFromExternalData(externalCalculatedData: any): ICalculationResult;
25
+ protected getCalculatedValuesCore(): ICalculationResult;
26
+ getValues(): Array<any>;
26
27
  }
@@ -1,23 +1,29 @@
1
- import { ItemValue, Question } from "survey-core";
2
- import { SelectBase } from "./selectBase";
3
- export declare class PivotModel extends SelectBase {
4
- private questions;
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>;
5
13
  private isRoot;
6
- protected valueType: "enum" | "date" | "number";
7
- private _cachedValues;
8
- private _continuousData;
9
- private _cachedIntervals;
10
- private _intervalPrecision;
14
+ private _pivotContinuousData;
11
15
  private axisXSelector;
12
16
  axisXQuestionName: string;
13
17
  private axisYSelectors;
14
18
  axisYQuestionNames: Array<string>;
15
19
  private questionsY;
16
- static IntervalsCount: number;
17
- static UseIntervalsFrom: number;
20
+ private _questionDefinition;
21
+ private _aggregations;
18
22
  constructor(questions: Array<Question>, data: Array<{
19
23
  [index: string]: any;
20
- }>, options?: Object, name?: string, isRoot?: boolean);
24
+ }>, options?: IPivotChartVisualizerOptions, isRoot?: boolean, type?: string);
25
+ protected getName(): string;
26
+ protected getTitle(question: Question): string;
21
27
  private createYSelecterGenerator;
22
28
  setAxisQuestions(...axisQuestionNames: string[]): void;
23
29
  onAxisYSelectorChanged(index: number, value: any): void;
@@ -25,35 +31,16 @@ export declare class PivotModel extends SelectBase {
25
31
  private createAxisYSelector;
26
32
  protected setChartType(chartType: string): void;
27
33
  private isXYChart;
28
- getQuestionValueType(question: Question): "enum" | "date" | "number";
29
34
  private setupPivot;
30
- private reset;
31
- getContinuousValue(value: any): number;
32
- getString(value: number): string;
33
- private toPrecision;
34
- getSelectedItemByText(itemText: string): ItemValue;
35
- /**
36
- * Updates visualizer data.
37
- */
38
- updateData(data: Array<{
39
- [index: string]: any;
40
- }>): void;
41
- protected onDataChanged(): void;
42
35
  protected getContinuousValues(): {
43
36
  original: any;
44
37
  continuous: number;
45
38
  row: any;
46
39
  }[];
47
40
  protected isSupportAnswersOrder(): boolean;
48
- protected isSupportMissingAnswers(): boolean;
49
- protected get needUseRateValues(): boolean;
50
41
  getSeriesValues(): Array<string>;
51
42
  getSeriesLabels(): Array<string>;
52
- getValues(): Array<any>;
53
- getLabels(): Array<string>;
54
- get hasCustomIntervals(): boolean;
55
- get intervals(): any;
56
- convertFromExternalData(externalCalculatedData: any): any[];
43
+ convertFromExternalData(externalCalculatedData: any): ICalculationResult;
57
44
  getSeriesValueIndexes(): {
58
45
  [index: string]: number;
59
46
  };
@@ -62,8 +49,11 @@ export declare class PivotModel extends SelectBase {
62
49
  }, valueIndex: number, seriesValueIndexes: {
63
50
  [index: string]: number;
64
51
  }): void;
65
- protected getCalculatedValuesCore(): Array<any>;
66
- getValueType(): "enum" | "date" | "number";
67
- protected isSupportSoftUpdateContent(): boolean;
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;
68
56
  protected renderToolbar(container: HTMLElement): void;
57
+ render(targetElement: HTMLElement | string, isRoot?: boolean): void;
58
+ protected renderBanner(container: HTMLElement): void;
69
59
  }
@@ -1,11 +1,12 @@
1
1
  import { SelectBase } from "./selectBase";
2
2
  import { QuestionRankingModel } from "survey-core";
3
+ import { ICalculationResult } from "./visualizerBase";
3
4
  export declare class RankingModel extends SelectBase {
4
5
  constructor(question: QuestionRankingModel, data: Array<{
5
6
  [index: string]: any;
6
- }>, options?: any, name?: string);
7
+ }>, options?: any, type?: string);
7
8
  getQuestionResults(): any[];
8
9
  getEmptyData(): any;
9
- protected getCalculatedValuesCore(): Array<any>;
10
+ protected getCalculatedValuesCore(): ICalculationResult;
10
11
  applyResultToPlotlyData(result: any[], plotlyData: any, choices: any): void;
11
12
  }
@@ -1,19 +1,10 @@
1
1
  import { Question, ItemValue, Event } from "survey-core";
2
- import { VisualizerBase } from "./visualizerBase";
2
+ import { IAnswersData, ICalculationResult, VisualizerBase } from "./visualizerBase";
3
3
  export interface IVisualizerWithSelection {
4
4
  selection: ItemValue;
5
5
  onDataItemSelected: (selectedValue: any, selectedText: string) => void;
6
6
  setSelection(item: ItemValue): void;
7
7
  }
8
- export interface IAnswersData {
9
- datasets: Array<Array<any>>;
10
- labels: Array<string>;
11
- colors: Array<string>;
12
- texts: Array<Array<any>>;
13
- seriesLabels: Array<string>;
14
- labelsTitle?: string;
15
- valuesTitle?: string;
16
- }
17
8
  export declare function hideEmptyAnswersInData(answersData: IAnswersData): IAnswersData;
18
9
  export declare class SelectBase extends VisualizerBase implements IVisualizerWithSelection {
19
10
  protected selectedItem: ItemValue;
@@ -30,12 +21,14 @@ export declare class SelectBase extends VisualizerBase implements IVisualizerWit
30
21
  private _topN;
31
22
  static topNValuesDefaults: number[];
32
23
  topNValues: any[];
24
+ _legendPosition: "left" | "right" | "top" | "bottom";
33
25
  protected _transposeData: boolean;
34
26
  private _showMissingAnswers;
35
27
  private missingAnswersBtn;
28
+ private initChartTypes;
36
29
  constructor(question: Question, data: Array<{
37
30
  [index: string]: any;
38
- }>, options?: any, name?: string);
31
+ }>, options?: any, type?: string);
39
32
  protected chartTypes: string[];
40
33
  protected _chartType: string;
41
34
  /**
@@ -64,6 +57,7 @@ export declare class SelectBase extends VisualizerBase implements IVisualizerWit
64
57
  get showOnlyPercentages(): boolean;
65
58
  set showOnlyPercentages(val: boolean);
66
59
  protected getShowPercentagesDefault(): boolean;
60
+ get percentagePrecision(): number;
67
61
  /**
68
62
  * Gets and sets whether chart should show values and percentages.
69
63
  */
@@ -93,7 +87,8 @@ export declare class SelectBase extends VisualizerBase implements IVisualizerWit
93
87
  */
94
88
  get showMissingAnswers(): boolean;
95
89
  set showMissingAnswers(value: boolean);
96
- refreshContent(): void;
90
+ get legendPosition(): "left" | "right" | "top" | "bottom";
91
+ set legendPosition(value: "left" | "right" | "top" | "bottom");
97
92
  onDataItemSelected: (selectedValue: any, selectedText: string) => void;
98
93
  get showValuesInOriginalOrder(): boolean;
99
94
  valuesSource(): Array<ItemValue>;
@@ -110,10 +105,12 @@ export declare class SelectBase extends VisualizerBase implements IVisualizerWit
110
105
  * Returns object with all infotmation for data visualization: datasets, labels, colors, additional texts (percentage).
111
106
  */
112
107
  getAnswersData(): Promise<IAnswersData>;
113
- convertFromExternalData(externalCalculatedData: any): any[];
108
+ convertFromExternalData(externalCalculatedData: any): ICalculationResult;
114
109
  protected transpose(data: Array<Array<number>>): Array<Array<number>>;
115
- private static _stateProperties;
110
+ private static _selectBaseDefaultState;
111
+ getDefaultState(): any;
116
112
  getState(): any;
117
- setState(state: any): void;
113
+ protected setStateCore(state: any): void;
118
114
  resetState(): void;
115
+ protected onThemeChanged(): void;
119
116
  }
@@ -1,14 +1,9 @@
1
- import { IDataInfo } from "./visualizerBase";
2
- export declare function defaultStatisticsCalculator(data: Array<any>, dataInfo: IDataInfo): Array<any>;
3
- export declare function histogramStatisticsCalculator(data: {
4
- [series: string]: Array<{
5
- continuous: number;
6
- row: any;
7
- }>;
8
- }, intervals: Array<{
9
- start: number;
10
- end: number;
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;
11
6
  label: string;
12
- }>, dataInfo: IDataInfo, aggregateDataNames?: any[]): Array<any>;
13
- export declare function mathStatisticsCalculator(data: Array<any>, dataInfo: IDataInfo): number[];
14
- export declare function getNestedDataRows(dataRow: any, dataInfo: IDataInfo): Array<any>;
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>;
@@ -12,7 +12,7 @@ export declare class StatisticsTable extends SelectBase {
12
12
  private _statisticsTableAdapter;
13
13
  constructor(question: Question, data: Array<{
14
14
  [index: string]: any;
15
- }>, options?: Object, name?: string);
15
+ }>, options?: Object, type?: string);
16
16
  protected destroyContent(container: HTMLElement): void;
17
17
  protected renderContentAsync(container: HTMLElement): Promise<HTMLElement>;
18
18
  destroy(): void;
@@ -21,7 +21,7 @@ export declare class StatisticsTableBoolean extends BooleanModel {
21
21
  private _statisticsTableAdapter;
22
22
  constructor(question: Question, data: Array<{
23
23
  [index: string]: any;
24
- }>, options?: Object, name?: string);
24
+ }>, options?: Object, type?: string);
25
25
  protected destroyContent(container: HTMLElement): void;
26
26
  protected renderContentAsync(container: HTMLElement): Promise<HTMLElement>;
27
27
  destroy(): void;
@@ -1,5 +1,5 @@
1
1
  import { Question } from "survey-core";
2
- import { VisualizerBase } from "./visualizerBase";
2
+ import { ICalculationResult, VisualizerBase } from "./visualizerBase";
3
3
  import "./text.scss";
4
4
  export declare class TextTableAdapter {
5
5
  private model;
@@ -11,13 +11,14 @@ export declare class Text extends VisualizerBase {
11
11
  private _textTableAdapter;
12
12
  constructor(question: Question, data: Array<{
13
13
  [index: string]: any;
14
- }>, options?: Object, name?: string);
14
+ }>, options?: Object, type?: string);
15
15
  get columns(): Array<{
16
16
  name: string;
17
17
  title: string;
18
18
  type: string;
19
19
  }>;
20
- protected getCalculatedValuesCore(): any;
20
+ getValues(): Array<any>;
21
+ protected getCalculatedValuesCore(): ICalculationResult;
21
22
  protected destroyContent(container: HTMLElement): void;
22
23
  protected renderContentAsync(container: HTMLElement): Promise<HTMLElement>;
23
24
  destroy(): void;
@@ -0,0 +1,50 @@
1
+ export interface IDashboardTheme {
2
+ cssVariables?: {
3
+ [index: string]: string | any;
4
+ };
5
+ }
6
+ export interface FontSettings {
7
+ family: string;
8
+ color: string;
9
+ size: string;
10
+ weight: number;
11
+ }
12
+ export declare class DashboardTheme implements IDashboardTheme {
13
+ private theme;
14
+ static barGap: number;
15
+ static fontFamily: string;
16
+ private _cssStyleDeclaration;
17
+ private _computedValuesCache;
18
+ private getCssVariableValue;
19
+ private initComputedValuesCache;
20
+ constructor(theme?: IDashboardTheme);
21
+ applyThemeToElement(element: HTMLElement): void;
22
+ setTheme(theme: IDashboardTheme): void;
23
+ get cssVariables(): {
24
+ [index: string]: string | any;
25
+ };
26
+ get defaultFontFamily(): any;
27
+ get backgroundColor(): string;
28
+ get axisGridColor(): string;
29
+ get axisBorderColor(): string;
30
+ get modebarActiveColor(): string;
31
+ get modebarColor(): string;
32
+ isFontLoaded(fontFaceName: string): boolean;
33
+ isAxisLabelFontLoaded(): boolean;
34
+ get axisLabelFont(): FontSettings;
35
+ get insideLabelFont(): FontSettings;
36
+ get legendLabelFont(): FontSettings;
37
+ get legendSetting(): {
38
+ borderWidth: any;
39
+ borderColor: any;
40
+ borderRadius: any;
41
+ };
42
+ get tooltipBackground(): any;
43
+ get tooltipFont(): FontSettings;
44
+ get noDataFont(): FontSettings;
45
+ get gaugeBackground(): any;
46
+ get gaugeBarColor(): any;
47
+ get gaugeValueFont(): FontSettings;
48
+ get gaugeTickFont(): FontSettings;
49
+ get radarLabelFont(): FontSettings;
50
+ }