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,35 @@
1
+ export interface IDateRange {
2
+ start?: number;
3
+ end?: number;
4
+ }
5
+ export declare function startOfDay(d: Date): Date;
6
+ export declare function endOfDay(d: Date): Date;
7
+ export declare function toRange(start: Date | number, end: Date | number): IDateRange;
8
+ /** Last 7 days (excl. today): refDate minus 7 days through yesterday */
9
+ export declare function getLast7Days(refDate?: Date): IDateRange;
10
+ /** Last 14 days (excl. today): refDate minus 14 days through yesterday */
11
+ export declare function getLast14Days(refDate?: Date): IDateRange;
12
+ /** Last 28 days (excl. today): refDate minus 28 days through yesterday */
13
+ export declare function getLast28Days(refDate?: Date): IDateRange;
14
+ /** Last 30 days (excl. today): refDate minus 30 days through yesterday */
15
+ export declare function getLast30Days(refDate?: Date): IDateRange;
16
+ /** Last week (Monday-Sunday): previous Monday through previous Sunday */
17
+ export declare function getLastWeekMon(refDate?: Date): IDateRange;
18
+ /** Last week (Sunday-Saturday): previous Sunday through previous Saturday */
19
+ export declare function getLastWeekSun(refDate?: Date): IDateRange;
20
+ /** Last month: first day through last day of previous month */
21
+ export declare function getLastMonth(refDate?: Date): IDateRange;
22
+ /** Last quarter: first day through last day of previous quarter */
23
+ export declare function getLastQuarter(refDate?: Date): IDateRange;
24
+ /** Last year: January 1 through December 31 of previous year */
25
+ export declare function getLastYear(refDate?: Date): IDateRange;
26
+ /** This week to date (starts Sunday): Sunday through yesterday or today */
27
+ export declare function getThisWeekToDateSun(refDate?: Date, includeToday?: boolean): IDateRange;
28
+ /** This week to date (starts Monday): Monday through yesterday or today */
29
+ export declare function getThisWeekToDateMon(refDate?: Date, includeToday?: boolean): IDateRange;
30
+ /** This month to date: first day of month through yesterday or today */
31
+ export declare function getThisMonthToDate(refDate?: Date, includeToday?: boolean): IDateRange;
32
+ /** This quarter to date: first day of quarter through yesterday or today */
33
+ export declare function getThisQuarterToDate(refDate?: Date, includeToday?: boolean): IDateRange;
34
+ /** This year to date: January 1 through yesterday or today */
35
+ export declare function getThisYearToDate(refDate?: Date, includeToday?: boolean): IDateRange;
@@ -0,0 +1,32 @@
1
+ import { IDateRange } from "./calculationDateRanges";
2
+ export type DatePeriodEnum = "last7days" | "last14days" | "last28days" | "last30days" | "lastWeekMon" | "lastWeekSun" | "lastMonth" | "lastQuarter" | "lastYear" | "ytd" | "mtd" | "wtdSun" | "wtdMon" | "qtd";
3
+ export type DateRangeTuple = [startDate: Date | number, endDate: Date | number];
4
+ export declare const datePeriodsFunctions: Partial<Record<DatePeriodEnum, (refDate?: Date, includeToday?: boolean) => IDateRange>>;
5
+ export interface IDateRangeChangedOptions {
6
+ datePeriod?: DatePeriodEnum;
7
+ dateRange?: DateRangeTuple;
8
+ }
9
+ export interface IDateRangeModelOptions {
10
+ onDateRangeChanged: (dateRange: IDateRange, datePeriod: DatePeriodEnum) => void;
11
+ datePeriod?: DatePeriodEnum;
12
+ availableDatePeriods?: Array<DatePeriodEnum>;
13
+ dateRange?: DateRangeTuple;
14
+ includeToday?: boolean;
15
+ }
16
+ export declare class DateRangeModel {
17
+ private _currentDatePeriod;
18
+ private _currentDateRange;
19
+ private _availableDatePeriods;
20
+ private _onDateRangeChanged;
21
+ private _includeToday;
22
+ constructor(options: IDateRangeModelOptions);
23
+ get currentDatePeriod(): DatePeriodEnum;
24
+ get currentDateRange(): IDateRange;
25
+ get availableDatePeriods(): Array<DatePeriodEnum>;
26
+ get includeToday(): boolean;
27
+ set includeToday(newValue: boolean);
28
+ toggleIncludeToday(): void;
29
+ setDatePeriod(datePeriod: DatePeriodEnum | undefined): void;
30
+ setFilter(start: number, end: number, isCustom?: boolean): void;
31
+ periodIsToDate(): boolean;
32
+ }
@@ -0,0 +1,38 @@
1
+ import { DateRangeModel, DatePeriodEnum, datePeriodsFunctions, IDateRangeModelOptions } from "./dateRangeModel";
2
+ import "./dateRangeWidget.scss";
3
+ export type { DatePeriodEnum };
4
+ export { datePeriodsFunctions };
5
+ export interface IDateRangeWidgetOptions extends IDateRangeModelOptions {
6
+ showAnswerCount?: boolean;
7
+ }
8
+ export declare class DateRangeWidget {
9
+ private model;
10
+ private options;
11
+ static invalidRangeClassName: string;
12
+ static invalidRangeEditorClassName: string;
13
+ private dateRangeContainer;
14
+ private startDateEditor;
15
+ private endDateEditor;
16
+ private startDateInput;
17
+ private endDateInput;
18
+ private countLabel;
19
+ private rangeErrorMessage;
20
+ private datePeriodContainer;
21
+ private includeTodayContainer;
22
+ private includeTodayCheckbox;
23
+ private answersCount;
24
+ private elementRemoveClassName;
25
+ private updateMinMaxAttributes;
26
+ private setDateIntoInput;
27
+ private createErrorMessage;
28
+ private createDateEditor;
29
+ private createDivider;
30
+ private createIncludeTodayCheckbox;
31
+ private updateIncludeTodayCheckbox;
32
+ constructor(model: DateRangeModel, options: IDateRangeWidgetOptions);
33
+ render(): HTMLElement;
34
+ setDatePeriod(datePeriod: DatePeriodEnum | undefined): void;
35
+ updateElements(): void;
36
+ updateAnswersCount(answersCount?: number): void;
37
+ destroy(): void;
38
+ }
@@ -0,0 +1,31 @@
1
+ import { DropdownBase, IDropdownItemOption } from "./dropdownBase";
2
+ export interface IActionDropdownOptions {
3
+ options: Array<IDropdownItemOption> | (() => Array<IDropdownItemOption>);
4
+ isSelected: (option: {
5
+ value: string;
6
+ text: string;
7
+ icon?: string;
8
+ }) => boolean;
9
+ handler: (value: string) => boolean;
10
+ title: string | (() => string) | Function;
11
+ className?: string;
12
+ showArrow?: boolean;
13
+ direction?: "up" | "down";
14
+ }
15
+ export declare class ActionDropdownWidget extends DropdownBase {
16
+ private options;
17
+ private headerText;
18
+ constructor(options: IActionDropdownOptions);
19
+ get direction(): "up" | "down";
20
+ protected createHeader(): HTMLDivElement;
21
+ private getTitleText;
22
+ protected getOptions(): IDropdownItemOption[];
23
+ protected isOptionSelected(option: IDropdownItemOption): boolean;
24
+ protected onOptionSelect(option: IDropdownItemOption, dropdownItem: HTMLLIElement): void;
25
+ protected onBeforePopupShow(): void;
26
+ private updateHeaderLabel;
27
+ protected updateSelect(): void;
28
+ protected attachMethodsToElement(): void;
29
+ setValues(values: string[]): void;
30
+ getValues(): string[];
31
+ }
@@ -0,0 +1,47 @@
1
+ export interface IDropdownItemOption {
2
+ value: string;
3
+ text: string;
4
+ title?: string;
5
+ icon?: string;
6
+ [key: string]: any;
7
+ }
8
+ export declare abstract class DropdownBase {
9
+ protected className: string;
10
+ protected dropdownOpenedClass: string;
11
+ protected itemClassSelected: string;
12
+ protected dropdownElement: HTMLDivElement;
13
+ protected dropdownHeader: HTMLDivElement;
14
+ protected dropdownList: HTMLUListElement;
15
+ protected dropdownContainer: HTMLDivElement;
16
+ protected optionItems: IDropdownItemOption[];
17
+ protected currentFocusIndex: number;
18
+ protected handleClickOutsideRef: (event: MouseEvent) => void;
19
+ constructor(defaultClassName: string);
20
+ get isOpen(): boolean;
21
+ render(): HTMLDivElement;
22
+ protected createDropdownElement(): HTMLDivElement;
23
+ protected createList(): HTMLUListElement;
24
+ protected createContainer(): HTMLDivElement;
25
+ protected createArrow(arrowClassName?: string): HTMLDivElement;
26
+ protected showPopup(): void;
27
+ protected hidePopup(): void;
28
+ protected focusItem(index: number, updateAriaSelected?: boolean): void;
29
+ protected updateOptions(): void;
30
+ protected createOptionItem(option: IDropdownItemOption): HTMLLIElement;
31
+ protected handleOptionClick(e: MouseEvent, option: IDropdownItemOption, dropdownItem: HTMLLIElement): void;
32
+ protected handleKeyDown(e: KeyboardEvent): void;
33
+ protected handleClickOutside(event: MouseEvent): void;
34
+ protected bindEvents(): void;
35
+ protected handleHeaderClick(e: MouseEvent): void;
36
+ protected onBeforePopupShow(): void;
37
+ protected onOpenedByKeyboard(): void;
38
+ protected onDropdownOpened(): void;
39
+ protected updateItemSelection(): void;
40
+ protected shouldUpdateAriaSelectedOnFocus(): boolean;
41
+ protected abstract createHeader(): HTMLDivElement;
42
+ protected abstract getOptions(): IDropdownItemOption[];
43
+ protected abstract isOptionSelected(option: IDropdownItemOption): boolean;
44
+ protected abstract onOptionSelect(option: IDropdownItemOption, dropdownItem: HTMLLIElement): void;
45
+ protected abstract updateSelect(): void;
46
+ protected abstract attachMethodsToElement(): void;
47
+ }
@@ -0,0 +1,40 @@
1
+ import { DropdownBase, IDropdownItemOption } from "./dropdownBase";
2
+ export interface IDropdownOptions {
3
+ /** Array of options or function that returns options */
4
+ options: Array<IDropdownItemOption> | (() => Array<IDropdownItemOption>);
5
+ /** Function to check if option is selected */
6
+ isSelected: (option: IDropdownItemOption) => boolean;
7
+ /** Selection handler */
8
+ handler: (value: string, option: IDropdownItemOption) => void;
9
+ /** Placeholder text when no option is selected */
10
+ placeholder?: string;
11
+ /** Title text above the dropdown */
12
+ title?: string | (() => string);
13
+ /** CSS class name for the dropdown */
14
+ className?: string;
15
+ resetHandler?: () => void;
16
+ }
17
+ export declare class DropdownWidget extends DropdownBase {
18
+ private options;
19
+ private optionsSource;
20
+ private placeholder;
21
+ private titleElement;
22
+ private headerContent;
23
+ private selectedOption;
24
+ constructor(options: IDropdownOptions);
25
+ protected createHeader(): HTMLDivElement;
26
+ private createResetButton;
27
+ private updateTitle;
28
+ protected getOptions(): IDropdownItemOption[];
29
+ protected isOptionSelected(option: IDropdownItemOption): boolean;
30
+ protected onOptionSelect(option: IDropdownItemOption, dropdownItem: HTMLLIElement): void;
31
+ protected onBeforePopupShow(): void;
32
+ protected onDropdownOpened(): void;
33
+ protected onOpenedByKeyboard(): void;
34
+ protected shouldUpdateAriaSelectedOnFocus(): boolean;
35
+ protected updateHeaderContent(): void;
36
+ protected updateSelect(): void;
37
+ protected attachMethodsToElement(): void;
38
+ setValue(value: string | null | undefined): void;
39
+ getValue(): string | null;
40
+ }
@@ -1,3 +1,5 @@
1
+ import { IDropdownOptions } from "./dropdownWidget";
2
+ import { IActionDropdownOptions } from "./dropdownActionWidget";
1
3
  export declare class DocumentHelper {
2
4
  static createSelector(options: Array<{
3
5
  value: string;
@@ -6,12 +8,32 @@ export declare class DocumentHelper {
6
8
  value: string;
7
9
  text: string;
8
10
  }) => boolean, handler: (e: any) => void, title?: string | Function): HTMLDivElement;
9
- static createButton(handler: (e: any) => void, text?: string, className?: string): HTMLElement;
11
+ /**
12
+ * Creates a custom dropdown element with icon support
13
+ * @param options - Configuration object for the dropdown
14
+ * @returns Created dropdown element
15
+ */
16
+ static createDropdown(options: IDropdownOptions): HTMLDivElement;
17
+ static createActionDropdown(options: IActionDropdownOptions): HTMLDivElement;
18
+ /**
19
+ * Destroys dropdown and removes all event handlers
20
+ * @param {HTMLElement} dropdownElement - Root dropdown element
21
+ */
22
+ static destroyDropdown(dropdownElement: any): void;
23
+ static createButton(handler: (e: any) => void, text?: string, className?: string, icon?: string): HTMLDivElement;
24
+ static setStyles(element: HTMLElement, styles: Record<string, any>): void;
10
25
  static createElement(tagName: string, className?: string, attrs?: any): HTMLElement;
11
26
  static createSvgElement(path: string): SVGSVGElement;
12
- static createSvgButton(path: string): HTMLButtonElement;
27
+ static createSvgButton(path: string, title?: string): HTMLButtonElement;
13
28
  static createSvgToggleButton(svgPath1: string, svPpath2: string, text1: string, text2: string, handler1: (e: any) => any, handler2: (e: any) => any, state?: string, className?: string): HTMLElement;
14
29
  static createInput(className: string, placeholder?: string, defaultValue?: string): HTMLInputElement;
30
+ static createTextEditor(options?: {
31
+ showIcon?: boolean;
32
+ placeholder?: string;
33
+ className?: string;
34
+ inputValue?: string;
35
+ onchange?: (val: any) => void;
36
+ }): HTMLElement;
15
37
  }
16
38
  export declare var options: {
17
39
  runningInBrowser: boolean;
@@ -37,3 +59,4 @@ export declare function createImagesContainer(links: Array<{
37
59
  content: any;
38
60
  }>): HTMLElement;
39
61
  export declare function toPrecision(value: number, precision?: number): number;
62
+ export declare function getDiffsFromDefaults(obj: any, defaultObj?: any): any;
@@ -0,0 +1,17 @@
1
+ import "./toggle.scss";
2
+ export declare class ToggleWidget {
3
+ private toggleHandler;
4
+ private text?;
5
+ private toggleElement;
6
+ private isActive;
7
+ container: HTMLElement;
8
+ constructor(toggleHandler: (options: {
9
+ isActive: boolean;
10
+ }) => void, text?: string | Function, initialState?: boolean);
11
+ get title(): string;
12
+ createWidget(): void;
13
+ bindEvents(): void;
14
+ toggle(): void;
15
+ updateView(): void;
16
+ setState(state: any): void;
17
+ }
@@ -0,0 +1,9 @@
1
+ export declare function reverseAll(labels: string[], seriesLabels: string[], colors: string[], hasSeries: boolean, texts: any[][], datasets: any[][]): {
2
+ labels: string[];
3
+ seriesLabels: string[];
4
+ colors: string[];
5
+ texts: any[][];
6
+ datasets: any[][];
7
+ };
8
+ export declare function removeUndefinedProperties(obj: any): void;
9
+ export declare function isAllZeros(arr: Array<number>): boolean;
@@ -3,6 +3,6 @@ import { VisualizationPanelDynamic } from "./visualizationPanelDynamic";
3
3
  export declare class VisualizationComposite extends VisualizationPanelDynamic {
4
4
  constructor(question: Question, data: Array<{
5
5
  [index: string]: any;
6
- }>, options?: Object, name?: string);
6
+ }>, options?: Object, type?: string);
7
7
  getQuestions(): Array<Question>;
8
8
  }
@@ -5,7 +5,7 @@ declare type VisualizerConstructor = new (question: Question, data: Array<{
5
5
  /**
6
6
  * An object with methods used to register and unregister visualizers for individual question types.
7
7
  *
8
- * [View Demo](https://surveyjs.io/dashboard/examples/custom-survey-data-visualizer/ (linkStyle))
8
+ * [How to Implement a Custom Data Visualizer](https://github.com/surveyjs/surveyjs-howtos-and-troubleshooting/blob/main/categories/data-visualization/custom-survey-data-visualizer.md (linkStyle))
9
9
  */
10
10
  export declare class VisualizationManager {
11
11
  static defaultVisualizer: any;
@@ -15,21 +15,20 @@ export declare class VisualizationManager {
15
15
  [index: string]: Array<{
16
16
  ctor: VisualizerConstructor;
17
17
  index: number;
18
+ visualizerType: string;
18
19
  }>;
19
20
  };
20
21
  /**
21
22
  * Registers a visualizer for a specified question type.
22
23
  *
23
- * [View Demo](https://surveyjs.io/dashboard/examples/custom-survey-data-visualizer/ (linkStyle))
24
+ * [How to Implement a Custom Data Visualizer](https://github.com/surveyjs/surveyjs-howtos-and-troubleshooting/blob/main/categories/data-visualization/custom-survey-data-visualizer.md (linkStyle))
24
25
  * @param questionType A question [type](https://surveyjs.io/form-library/documentation/api-reference/question#getType).
25
26
  * @param constructor A function that returns a visualizer constructor to register.
26
27
  * @param index A zero-based index that specifies the visualizer's position in the visualizer list for the specified question type. Pass `0` to insert the visualizer at the beginning of the list and use it by default. If `index` is not specified, the visualizer is added to the end of the list.
27
28
  */
28
- static registerVisualizer(questionType: string, constructor: VisualizerConstructor, index?: number): void;
29
+ static registerVisualizer(questionType: string, constructor: VisualizerConstructor, index?: number, visualizerType?: string): void;
29
30
  /**
30
31
  * Unregisters a visualizer for a specified question type.
31
- *
32
- * [View Demo](https://surveyjs.io/dashboard/examples/visualize-answers-from-text-entry-fields-with-charts/ (linkStyle))
33
32
  * @param questionType A question [type](https://surveyjs.io/form-library/documentation/api-reference/question#getType).
34
33
  * @param constructor A function that returns a visualizer constructor to unregister.
35
34
  */
@@ -44,6 +43,7 @@ export declare class VisualizationManager {
44
43
  * @param visualizerType A question [type](https://surveyjs.io/form-library/documentation/api-reference/question#getType).
45
44
  */
46
45
  static getVisualizersByType(visualizerType: string, fallbackVisualizerType?: string): VisualizerConstructor[];
46
+ static getVisualizerNamesByType(visualizerType: string, fallbackVisualizerType?: string): Array<string>;
47
47
  /**
48
48
  * Returns a constructor for an alternative visualizer selector.
49
49
  * @see registerAltVisualizerSelector
@@ -7,7 +7,7 @@ export declare class VisualizationMatrixDropdown extends VisualizerBase {
7
7
  [index: string]: any;
8
8
  }>, options?: {
9
9
  [index: string]: any;
10
- }, name?: string);
10
+ }, type?: string);
11
11
  get canGroupColumns(): boolean;
12
12
  protected setLocale(newLocale: string): void;
13
13
  get contentVisualizer(): VisualizerBase;
@@ -16,6 +16,7 @@ export declare class VisualizationMatrixDropdown extends VisualizerBase {
16
16
  [index: string]: any;
17
17
  }>): void;
18
18
  getQuestions(): Array<Question>;
19
+ protected onThemeChanged(): void;
19
20
  destroyContent(container: HTMLElement): void;
20
21
  renderContent(container: HTMLElement): void;
21
22
  destroy(): void;
@@ -3,6 +3,6 @@ import { VisualizationPanelDynamic } from "./visualizationPanelDynamic";
3
3
  export declare class VisualizationMatrixDynamic extends VisualizationPanelDynamic {
4
4
  constructor(question: Question, data: Array<{
5
5
  [index: string]: any;
6
- }>, options?: Object, name?: string);
6
+ }>, options?: Object, type?: string);
7
7
  getQuestions(): Question[];
8
8
  }
@@ -1,9 +1,10 @@
1
1
  import { Event, SurveyModel } from "survey-core";
2
- import { VisualizerBase } from "./visualizerBase";
2
+ import { ICalculationResult, VisualizerBase } from "./visualizerBase";
3
3
  import { AlternativeVisualizersWrapper } from "./alternativeVizualizersWrapper";
4
4
  import { IVisualizerPanelElement, IState, IPermission } from "./config";
5
- import { LayoutEngine } from "./layoutEngine";
5
+ import { LayoutEngine } from "./layout-engine";
6
6
  import { DataProvider } from "./dataProvider";
7
+ import { IDateRangeChangedOptions } from "./utils/dateRangeModel";
7
8
  import "./visualizationPanel.scss";
8
9
  export interface IVisualizerPanelRenderedElement extends IVisualizerPanelElement {
9
10
  renderedElement?: HTMLElement;
@@ -242,6 +243,7 @@ export interface IVisualizationPanelOptions {
242
243
  * Default value: `true`
243
244
  */
244
245
  allowChangeVisualizerType?: boolean;
246
+ legendPosition?: "left" | "right" | "top" | "bottom";
245
247
  }
246
248
  /**
247
249
  * An object that visualizes survey results and allows users to analyze them.
@@ -261,8 +263,15 @@ export declare class VisualizationPanel extends VisualizerBase {
261
263
  protected questions: Array<any>;
262
264
  private _elements;
263
265
  private isRoot;
266
+ static LayoutEngine: new (allowed: boolean, itemSelector: string, dragEnabled?: boolean) => LayoutEngine;
264
267
  visualizers: Array<VisualizerBase>;
265
268
  private renderedQuestionsCount;
269
+ private static counter;
270
+ private resetFilterButton;
271
+ private _dateRangeWidget;
272
+ private _dateRangeModel;
273
+ private static getVisualizerName;
274
+ private updateResetFilterButtonDisabled;
266
275
  constructor(questions: Array<any>, data: Array<{
267
276
  [index: string]: any;
268
277
  }>, options?: IVisualizationPanelOptions, _elements?: Array<IVisualizerPanelRenderedElement>, isRoot?: boolean);
@@ -283,6 +292,9 @@ export declare class VisualizationPanel extends VisualizerBase {
283
292
  **/
284
293
  onAlternativeVisualizerChanged: Event<(sender: AlternativeVisualizersWrapper, options: any) => any, AlternativeVisualizersWrapper, any>;
285
294
  private onAlternativeVisualizerChangedCallback;
295
+ private createHideButtonElement;
296
+ private createDragAreaElement;
297
+ private createHeaderElement;
286
298
  protected onDataChanged(): void;
287
299
  protected showElementCore(element: IVisualizerPanelRenderedElement, elementIndex?: number): void;
288
300
  showElement(elementName: string): void;
@@ -321,6 +333,7 @@ export declare class VisualizationPanel extends VisualizerBase {
321
333
  */
322
334
  get allowHideQuestions(): boolean;
323
335
  get allowMakeQuestionsPrivate(): boolean;
336
+ get haveSeveralChildren(): boolean;
324
337
  private _layoutEngine;
325
338
  /**
326
339
  * Returns a [`LayoutEngine`](https://surveyjs.io/dashboard/documentation/api-reference/layoutengine) instance used to arrange visualization items on `VisualizationPanel`.
@@ -412,9 +425,12 @@ export declare class VisualizationPanel extends VisualizerBase {
412
425
  * A visualization item that has been moved.
413
426
  */
414
427
  onElementMoved: Event<(sender: VisualizationPanel, options: any) => any, VisualizationPanel, any>;
428
+ onDateRangeChanged: Event<(sender: VisualizationPanel, options: IDateRangeChangedOptions) => any, VisualizationPanel, any>;
429
+ createDateRangeWidget(): void;
415
430
  protected visibleElementsChanged(element: IVisualizerPanelElement, reason: string): void;
416
431
  onPermissionsChangedCallback: any;
417
432
  protected renderPanelElement(element: IVisualizerPanelRenderedElement, container: HTMLElement): HTMLElement;
433
+ protected renderBanner(container: HTMLElement): void;
418
434
  protected renderToolbar(container: HTMLElement): void;
419
435
  renderContent(container: HTMLElement): void;
420
436
  protected destroyContent(container: HTMLElement): void;
@@ -442,6 +458,7 @@ export declare class VisualizationPanel extends VisualizerBase {
442
458
  resetState(): void;
443
459
  get permissions(): IPermission[];
444
460
  set permissions(permissions: IPermission[]);
445
- protected getCalculatedValuesCore(): Array<any>;
461
+ protected getCalculatedValuesCore(): ICalculationResult;
462
+ protected onThemeChanged(): void;
446
463
  destroy(): void;
447
464
  }
@@ -7,12 +7,13 @@ export declare class VisualizationPanelDynamic extends VisualizerBase {
7
7
  [index: string]: any;
8
8
  }>, options?: {
9
9
  [index: string]: any;
10
- }, name?: string);
10
+ }, type?: string);
11
11
  get contentVisualizer(): VisualizationPanel;
12
12
  protected setLocale(newLocale: string): void;
13
13
  private onAfterRenderPanelCallback;
14
14
  resetFilter(): void;
15
15
  getQuestions(): IQuestion[];
16
+ protected onThemeChanged(): void;
16
17
  destroyContent(container: HTMLElement): void;
17
18
  renderContent(container: HTMLElement): void;
18
19
  destroy(): void;
@@ -1,5 +1,6 @@
1
1
  import { Question, Event } from "survey-core";
2
2
  import { DataProvider, GetDataFn } from "./dataProvider";
3
+ import { DashboardTheme, IDashboardTheme } from "./theme";
3
4
  import "./visualizerBase.scss";
4
5
  export interface IChartAdapter {
5
6
  getChartTypes(): string[];
@@ -7,6 +8,28 @@ export interface IChartAdapter {
7
8
  update(chartNode: HTMLElement): Promise<any>;
8
9
  destroy(node: HTMLElement): void;
9
10
  }
11
+ export interface ICalculatedDataInfo {
12
+ dataPath?: string;
13
+ valueNames: Array<string>;
14
+ seriesNames?: Array<string>;
15
+ getLabel?(value: string): string;
16
+ getSeriesLabel?(series: string): string;
17
+ }
18
+ export declare type ICalculationResult<T = number> = {
19
+ data: Array<Array<T>>;
20
+ values: Array<string>;
21
+ series?: Array<string>;
22
+ };
23
+ export interface IAnswersData {
24
+ datasets: Array<Array<any>>;
25
+ values: Array<string>;
26
+ labels: Array<string>;
27
+ colors: Array<string>;
28
+ texts: Array<Array<any>>;
29
+ seriesLabels: Array<string>;
30
+ labelsTitle?: string;
31
+ valuesTitle?: string;
32
+ }
10
33
  export interface IDataInfo {
11
34
  name: string;
12
35
  dataPath?: string;
@@ -16,12 +39,24 @@ export interface IDataInfo {
16
39
  getSeriesValues(): Array<string>;
17
40
  getSeriesLabels(): Array<string>;
18
41
  }
42
+ export type ToolbarItemType = "button" | "dropdown" | "filter" | "license";
19
43
  type ToolbarItemCreators = {
20
44
  [name: string]: {
21
45
  creator: (toolbar?: HTMLDivElement) => HTMLElement;
22
- order: number;
46
+ type: ToolbarItemType;
47
+ index: number;
48
+ groupIndex: number;
23
49
  };
24
50
  };
51
+ export interface IVisualizerOptions {
52
+ dataField: string;
53
+ type?: string;
54
+ availableTypes?: string[];
55
+ title?: string;
56
+ allowChangeType?: boolean;
57
+ answersOrder?: "default" | "asc" | "desc";
58
+ [key: string]: any;
59
+ }
25
60
  export declare class PostponeHelper {
26
61
  static postponeFunction: (fn: () => void, timeout?: number) => any;
27
62
  static postpone(fn: () => void, timeout?: number): any;
@@ -61,6 +96,8 @@ export declare class VisualizerBase implements IDataInfo {
61
96
  static haveCommercialLicense: boolean;
62
97
  static suppressVisualizerStubRendering: boolean;
63
98
  static chartAdapterType: any;
99
+ private _appliedTheme;
100
+ private _theme;
64
101
  private _showToolbar;
65
102
  private _footerVisualizer;
66
103
  private _dataProvider;
@@ -135,6 +172,8 @@ export declare class VisualizerBase implements IDataInfo {
135
172
  }, _type?: string);
136
173
  protected get questionOptions(): any;
137
174
  protected onDataChanged(): void;
175
+ protected getName(): string;
176
+ protected get allowChangeType(): any;
138
177
  /**
139
178
  * Returns the identifier of a visualized question.
140
179
  */
@@ -167,6 +206,7 @@ export declare class VisualizerBase implements IDataInfo {
167
206
  getSeriesLabels(): Array<string>;
168
207
  getValues(): Array<any>;
169
208
  getLabels(): Array<string>;
209
+ getChartAdapter(): IChartAdapter;
170
210
  /**
171
211
  * Registers a function used to create a toolbar item for this visualizer.
172
212
  *
@@ -211,7 +251,7 @@ export declare class VisualizerBase implements IDataInfo {
211
251
  * @param creator A function that accepts the toolbar and should return an `HTMLElement` with the toolbar item.
212
252
  * @see unregisterToolbarItem
213
253
  */
214
- registerToolbarItem(name: string, creator: (toolbar?: HTMLDivElement) => HTMLElement, order?: number): void;
254
+ registerToolbarItem(name: string, creator: (toolbar?: HTMLDivElement) => HTMLElement, type: ToolbarItemType, index?: number, groupIndex?: number): void;
215
255
  /**
216
256
  *
217
257
  * Unregisters a function used to create a toolbar item. Allows you to remove a toolbar item.
@@ -229,6 +269,7 @@ export declare class VisualizerBase implements IDataInfo {
229
269
  * Returns the visualizer's type.
230
270
  */
231
271
  get type(): string;
272
+ get dataType(): string;
232
273
  /**
233
274
  * @deprecated Use [`surveyData`](https://surveyjs.io/dashboard/documentation/api-reference/visualizationpanel#surveyData) instead.
234
275
  */
@@ -260,8 +301,10 @@ export declare class VisualizerBase implements IDataInfo {
260
301
  * If you want to empty and delete the visualizer and all its elements from the DOM, call the [`destroy()`](https://surveyjs.io/dashboard/documentation/api-reference/visualizerbase#destroy) method instead.
261
302
  */
262
303
  clear(): void;
304
+ getSortedToolbarItemCreators(): Array<any>;
263
305
  protected createToolbarItems(toolbar: HTMLDivElement): void;
264
306
  protected getCorrectAnswerText(): string;
307
+ protected renderBanner(container: HTMLElement): void;
265
308
  protected destroyToolbar(container: HTMLElement): void;
266
309
  protected renderToolbar(container: HTMLElement): void;
267
310
  protected destroyHeader(container: HTMLElement): void;
@@ -278,7 +321,7 @@ export declare class VisualizerBase implements IDataInfo {
278
321
  * Renders the visualizer in a specified container.
279
322
  * @param targetElement An `HTMLElement` or an `id` of a page element in which you want to render the visualizer.
280
323
  */
281
- render(targetElement: HTMLElement | string): void;
324
+ render(targetElement: HTMLElement | string, isRoot?: boolean): void;
282
325
  updateToolbar(): void;
283
326
  protected isSupportSoftUpdateContent(): boolean;
284
327
  protected softUpdateContent(): void;
@@ -288,16 +331,21 @@ export declare class VisualizerBase implements IDataInfo {
288
331
  * Re-renders the visualizer and its content.
289
332
  */
290
333
  refresh(): void;
334
+ refreshContent(): void;
291
335
  protected processText(text: string): string;
292
336
  getRandomColor(): any;
293
337
  private _backgroundColor;
294
- get backgroundColor(): string;
295
- set backgroundColor(value: string);
296
- protected getBackgroundColorCore(): string;
338
+ get backgroundColor(): any;
339
+ set backgroundColor(value: any);
340
+ protected getBackgroundColorCore(): any;
297
341
  protected setBackgroundColorCore(color: string): void;
342
+ protected onThemeChanged(): void;
343
+ get theme(): DashboardTheme;
344
+ set theme(theme: DashboardTheme);
345
+ applyTheme(theme: IDashboardTheme): void;
298
346
  static customColors: string[];
299
347
  private static colors;
300
- getColors(count?: number): any;
348
+ static getColors(count?: number): any;
301
349
  /**
302
350
  * Gets or sets the visibility of the visualizer's toolbar.
303
351
  *
@@ -310,17 +358,23 @@ export declare class VisualizerBase implements IDataInfo {
310
358
  */
311
359
  getData(): any;
312
360
  private _calculationsCache;
313
- protected getCalculatedValuesCore(): Array<any>;
361
+ protected getCalculatedValuesCore(): ICalculationResult;
314
362
  protected loadingData: boolean;
315
363
  renderLoadingIndicator(contentContainer: HTMLElement): void;
316
- convertFromExternalData(externalCalculatedData: any): any[];
364
+ convertFromExternalData(externalCalculatedData: any): ICalculationResult;
365
+ /**
366
+ * Returns object with all infotmation for data visualization: datasets, labels, colors, additional texts (percentage).
367
+ */
368
+ getAnswersData(): Promise<IAnswersData>;
317
369
  /**
318
370
  * Returns an array of calculated and visualized values. If a user applies a filter, the array is also filtered.
319
371
  *
320
372
  * To get an array of source survey results, use the [`surveyData`](https://surveyjs.io/dashboard/documentation/api-reference/visualizerbase#surveyData) property.
321
373
  */
322
- getCalculatedValues(): Promise<Array<Object>>;
374
+ getCalculatedValues(): Promise<ICalculationResult>;
323
375
  protected _settingState: boolean;
376
+ protected _defaultStateValue: any;
377
+ getDefaultState(): any;
324
378
  /**
325
379
  * Returns an object with properties that describe a current visualizer state. The properties are different for each individual visualizer.
326
380
  *
@@ -330,6 +384,7 @@ export declare class VisualizerBase implements IDataInfo {
330
384
  * @see onStateChanged
331
385
  */
332
386
  getState(): any;
387
+ protected setStateCore(state: any): void;
333
388
  /**
334
389
  * Sets the visualizer's state.
335
390
  *