survey-analytics 2.5.16 → 3.0.0-beta.1

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 (237) hide show
  1. package/fesm/shared.mjs +759 -3180
  2. package/fesm/shared.mjs.map +1 -1
  3. package/fesm/shared2.mjs +10561 -8296
  4. package/fesm/shared2.mjs.map +1 -1
  5. package/fesm/shared3.mjs +4844 -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 +1082 -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 +341 -193
  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 +39 -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 +142 -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/axisDescription.d.ts +6 -0
  39. package/survey-analytics-plotly.types/boolean.d.ts +15 -0
  40. package/survey-analytics-plotly.types/card.d.ts +29 -0
  41. package/survey-analytics-plotly.types/chartConfig.d.ts +9 -0
  42. package/survey-analytics-plotly.types/config.d.ts +35 -0
  43. package/survey-analytics-plotly.types/dashboard.d.ts +51 -0
  44. package/survey-analytics-plotly.types/dataProvider.d.ts +69 -0
  45. package/survey-analytics-plotly.types/entries/plotly.d.ts +2 -0
  46. package/survey-analytics-plotly.types/entries/summary.core.d.ts +46 -0
  47. package/survey-analytics-plotly.types/filterInfo.d.ts +11 -0
  48. package/survey-analytics-plotly.types/histogram.d.ts +102 -0
  49. package/{survey-analytics.types/layoutEngine.d.ts → survey-analytics-plotly.types/layout-engine.d.ts} +0 -12
  50. package/survey-analytics-plotly.types/localizationManager.d.ts +164 -0
  51. package/survey-analytics-plotly.types/matrix.d.ts +17 -0
  52. package/survey-analytics-plotly.types/matrixDropdownGrouped.d.ts +15 -0
  53. package/survey-analytics-plotly.types/muuri-layout-engine.d.ts +13 -0
  54. package/survey-analytics-plotly.types/nps.d.ts +37 -0
  55. package/survey-analytics-plotly.types/number.d.ts +27 -0
  56. package/survey-analytics-plotly.types/pivot.d.ts +71 -0
  57. package/{survey-analytics.types → survey-analytics-plotly.types}/plotly/chart-adapter.d.ts +11 -2
  58. package/survey-analytics-plotly.types/plotly/setup.d.ts +150 -0
  59. package/survey-analytics-plotly.types/ranking.d.ts +12 -0
  60. package/survey-analytics-plotly.types/selectBase.d.ts +117 -0
  61. package/survey-analytics-plotly.types/sideBarItemCreators.d.ts +7 -0
  62. package/survey-analytics-plotly.types/statisticCalculators.d.ts +9 -0
  63. package/survey-analytics-plotly.types/statistics-table.d.ts +28 -0
  64. package/survey-analytics-plotly.types/svgbundle.d.ts +2 -0
  65. package/survey-analytics-plotly.types/text.d.ts +25 -0
  66. package/survey-analytics-plotly.types/theme.d.ts +51 -0
  67. package/survey-analytics-plotly.types/themes/default-light.d.ts +965 -0
  68. package/survey-analytics-plotly.types/utils/calculationDateRanges.d.ts +35 -0
  69. package/survey-analytics-plotly.types/utils/dateRangeModel.d.ts +32 -0
  70. package/survey-analytics-plotly.types/utils/dateRangeWidget.d.ts +38 -0
  71. package/survey-analytics-plotly.types/utils/documentHelper.d.ts +28 -0
  72. package/survey-analytics-plotly.types/utils/dropdownActionWidget.d.ts +34 -0
  73. package/survey-analytics-plotly.types/utils/dropdownBase.d.ts +48 -0
  74. package/survey-analytics-plotly.types/utils/dropdownWidget.d.ts +46 -0
  75. package/survey-analytics-plotly.types/utils/editableSeriesListWidget.d.ts +34 -0
  76. package/survey-analytics-plotly.types/utils/elementVisibilityAction.d.ts +22 -0
  77. package/survey-analytics-plotly.types/utils/index.d.ts +25 -0
  78. package/survey-analytics-plotly.types/utils/sidebarWidget.d.ts +48 -0
  79. package/survey-analytics-plotly.types/utils/toggle.d.ts +17 -0
  80. package/survey-analytics-plotly.types/utils/utils.d.ts +9 -0
  81. package/survey-analytics-plotly.types/visualizationComposite.d.ts +8 -0
  82. package/survey-analytics-plotly.types/visualizationManager.d.ts +61 -0
  83. package/survey-analytics-plotly.types/visualizationMatrixDropdown.d.ts +23 -0
  84. package/survey-analytics-plotly.types/visualizationMatrixDynamic.d.ts +8 -0
  85. package/survey-analytics-plotly.types/visualizationPanel.d.ts +464 -0
  86. package/survey-analytics-plotly.types/visualizationPanelDynamic.d.ts +20 -0
  87. package/survey-analytics-plotly.types/visualizer-interfaces.d.ts +25 -0
  88. package/survey-analytics-plotly.types/visualizerBase.d.ts +435 -0
  89. package/survey-analytics-plotly.types/visualizerDescription.d.ts +4 -0
  90. package/survey-analytics-plotly.types/visualizerFactory.d.ts +41 -0
  91. package/survey-analytics-plotly.types/wordcloud/stopwords/dutch.d.ts +1 -0
  92. package/survey-analytics-plotly.types/wordcloud/stopwords/english.d.ts +1 -0
  93. package/survey-analytics-plotly.types/wordcloud/stopwords/index.d.ts +3 -0
  94. package/survey-analytics-plotly.types/wordcloud/stopwords/norwegian.d.ts +1 -0
  95. package/survey-analytics-plotly.types/wordcloud/stopwords/spanish.d.ts +1 -0
  96. package/survey-analytics-plotly.types/wordcloud/widget.d.ts +38 -0
  97. package/survey-analytics-plotly.types/wordcloud/wordcloud.d.ts +28 -0
  98. package/survey-analytics-tabulator.types/analytics-localization/english.d.ts +40 -0
  99. package/survey-analytics-tabulator.types/entries/tabulator.d.ts +2 -25
  100. package/survey-analytics-tabulator.types/entries/tabulator.fontless.d.ts +26 -0
  101. package/survey-analytics-tabulator.types/localizationManager.d.ts +40 -0
  102. package/survey-analytics-tabulator.types/tables/columnbuilder.d.ts +16 -16
  103. package/survey-analytics-tabulator.types/tables/columns.d.ts +18 -18
  104. package/survey-analytics-tabulator.types/tables/config.d.ts +2 -2
  105. package/survey-analytics-tabulator.types/tables/extensions/footerextensions.d.ts +1 -0
  106. package/survey-analytics-tabulator.types/tables/extensions/tableextensions.d.ts +2 -1
  107. package/survey-analytics-tabulator.types/tables/table-interfaces.d.ts +56 -0
  108. package/survey-analytics-tabulator.types/tables/table.d.ts +4 -48
  109. package/survey-analytics-tabulator.types/tables/tabulator.d.ts +9 -1
  110. package/survey-analytics-tabulator.types/theme.d.ts +51 -0
  111. package/survey-analytics-tabulator.types/themes/default-light.d.ts +965 -0
  112. package/survey-analytics-tabulator.types/utils/documentHelper.d.ts +28 -0
  113. package/survey-analytics-tabulator.types/utils/dropdownActionWidget.d.ts +34 -0
  114. package/survey-analytics-tabulator.types/utils/dropdownBase.d.ts +48 -0
  115. package/survey-analytics-tabulator.types/utils/index.d.ts +1 -15
  116. package/survey-analytics.types/alternativeVizualizersWrapper.d.ts +9 -4
  117. package/survey-analytics.types/analytics-localization/english.d.ts +40 -0
  118. package/survey-analytics.types/apexcharts/chart-adapter.d.ts +29 -0
  119. package/survey-analytics.types/apexcharts/index.d.ts +2 -0
  120. package/survey-analytics.types/apexcharts/setup.d.ts +200 -0
  121. package/survey-analytics.types/axisDescription.d.ts +6 -0
  122. package/survey-analytics.types/boolean.d.ts +1 -1
  123. package/survey-analytics.types/card.d.ts +29 -0
  124. package/survey-analytics.types/chartConfig.d.ts +9 -0
  125. package/survey-analytics.types/config.d.ts +1 -33
  126. package/survey-analytics.types/dashboard.d.ts +51 -0
  127. package/survey-analytics.types/dataProvider.d.ts +17 -0
  128. package/survey-analytics.types/entries/apexcharts.d.ts +2 -0
  129. package/survey-analytics.types/entries/apexcharts.fontless.d.ts +2 -0
  130. package/survey-analytics.types/entries/summary.core.d.ts +9 -1
  131. package/survey-analytics.types/histogram.d.ts +29 -13
  132. package/survey-analytics.types/layout-engine.d.ts +29 -0
  133. package/survey-analytics.types/localizationManager.d.ts +40 -0
  134. package/survey-analytics.types/matrix.d.ts +3 -2
  135. package/survey-analytics.types/matrixDropdownGrouped.d.ts +3 -2
  136. package/survey-analytics.types/muuri-layout-engine.d.ts +13 -0
  137. package/survey-analytics.types/nps.d.ts +5 -10
  138. package/survey-analytics.types/number.d.ts +8 -7
  139. package/survey-analytics.types/pivot.d.ts +42 -40
  140. package/survey-analytics.types/ranking.d.ts +3 -2
  141. package/survey-analytics.types/selectBase.d.ts +13 -15
  142. package/survey-analytics.types/sideBarItemCreators.d.ts +7 -0
  143. package/survey-analytics.types/statisticCalculators.d.ts +8 -13
  144. package/survey-analytics.types/statistics-table.d.ts +2 -2
  145. package/survey-analytics.types/text.d.ts +4 -3
  146. package/survey-analytics.types/theme.d.ts +51 -0
  147. package/survey-analytics.types/themes/default-light.d.ts +965 -0
  148. package/survey-analytics.types/utils/calculationDateRanges.d.ts +35 -0
  149. package/survey-analytics.types/utils/dateRangeModel.d.ts +32 -0
  150. package/survey-analytics.types/utils/dateRangeWidget.d.ts +38 -0
  151. package/survey-analytics.types/utils/documentHelper.d.ts +28 -0
  152. package/survey-analytics.types/utils/dropdownActionWidget.d.ts +34 -0
  153. package/survey-analytics.types/utils/dropdownBase.d.ts +48 -0
  154. package/survey-analytics.types/utils/dropdownWidget.d.ts +46 -0
  155. package/survey-analytics.types/utils/editableSeriesListWidget.d.ts +34 -0
  156. package/survey-analytics.types/utils/elementVisibilityAction.d.ts +22 -0
  157. package/survey-analytics.types/utils/index.d.ts +1 -15
  158. package/survey-analytics.types/utils/sidebarWidget.d.ts +48 -0
  159. package/survey-analytics.types/utils/toggle.d.ts +17 -0
  160. package/survey-analytics.types/utils/utils.d.ts +9 -0
  161. package/survey-analytics.types/visualizationComposite.d.ts +1 -1
  162. package/survey-analytics.types/visualizationManager.d.ts +6 -5
  163. package/survey-analytics.types/visualizationMatrixDropdown.d.ts +2 -1
  164. package/survey-analytics.types/visualizationMatrixDynamic.d.ts +1 -1
  165. package/survey-analytics.types/visualizationPanel.d.ts +20 -3
  166. package/survey-analytics.types/visualizationPanelDynamic.d.ts +4 -3
  167. package/survey-analytics.types/visualizer-interfaces.d.ts +25 -0
  168. package/survey-analytics.types/visualizerBase.d.ts +80 -12
  169. package/survey-analytics.types/visualizerDescription.d.ts +4 -0
  170. package/survey-analytics.types/visualizerFactory.d.ts +11 -2
  171. package/survey-analytics.types/wordcloud/wordcloud.d.ts +6 -4
  172. package/survey.analytics.core.css +1534 -122
  173. package/survey.analytics.core.css.map +1 -1
  174. package/survey.analytics.core.d.ts +1 -0
  175. package/survey.analytics.core.js +6118 -1229
  176. package/survey.analytics.core.js.map +1 -1
  177. package/survey.analytics.core.min.css +11 -6
  178. package/survey.analytics.core.min.js +1 -1
  179. package/survey.analytics.core.min.js.LICENSE.txt +1 -1
  180. package/survey.analytics.css +1900 -129
  181. package/survey.analytics.css.map +1 -1
  182. package/survey.analytics.d.ts +2 -2
  183. package/survey.analytics.fontless.css +2009 -0
  184. package/survey.analytics.fontless.css.map +1 -0
  185. package/survey.analytics.fontless.min.css +16 -0
  186. package/survey.analytics.js +9764 -4539
  187. package/survey.analytics.js.map +1 -1
  188. package/survey.analytics.min.css +13 -6
  189. package/survey.analytics.min.js +1 -1
  190. package/survey.analytics.min.js.LICENSE.txt +1 -1
  191. package/survey.analytics.mongo.d.ts +1 -0
  192. package/survey.analytics.mongo.js +2 -2
  193. package/survey.analytics.mongo.js.map +1 -1
  194. package/survey.analytics.mongo.min.js +1 -1
  195. package/survey.analytics.mongo.min.js.LICENSE.txt +1 -1
  196. package/survey.analytics.plotly.css +2094 -0
  197. package/survey.analytics.plotly.css.map +1 -0
  198. package/survey.analytics.plotly.d.ts +2 -0
  199. package/survey.analytics.plotly.fontless.css +1872 -0
  200. package/survey.analytics.plotly.fontless.css.map +1 -0
  201. package/survey.analytics.plotly.fontless.min.css +15 -0
  202. package/survey.analytics.plotly.js +24673 -0
  203. package/survey.analytics.plotly.js.map +1 -0
  204. package/survey.analytics.plotly.min.css +16 -0
  205. package/survey.analytics.plotly.min.js +2 -0
  206. package/survey.analytics.plotly.min.js.LICENSE.txt +22 -0
  207. package/survey.analytics.tabulator.css +1005 -132
  208. package/survey.analytics.tabulator.css.map +1 -1
  209. package/survey.analytics.tabulator.d.ts +1 -0
  210. package/survey.analytics.tabulator.fontless.css +1134 -0
  211. package/survey.analytics.tabulator.fontless.css.map +1 -0
  212. package/survey.analytics.tabulator.fontless.min.css +6 -0
  213. package/survey.analytics.tabulator.js +2719 -476
  214. package/survey.analytics.tabulator.js.map +1 -1
  215. package/survey.analytics.tabulator.min.css +3 -2
  216. package/survey.analytics.tabulator.min.js +1 -1
  217. package/survey.analytics.tabulator.min.js.LICENSE.txt +1 -1
  218. package/themes/default-dark.js +1032 -0
  219. package/themes/default-dark.js.map +1 -0
  220. package/themes/default-dark.min.js +2 -0
  221. package/themes/default-dark.min.js.LICENSE.txt +5 -0
  222. package/themes/default-light.js +1032 -0
  223. package/themes/default-light.js.map +1 -0
  224. package/themes/default-light.min.js +2 -0
  225. package/themes/default-light.min.js.LICENSE.txt +5 -0
  226. package/themes/index.js +2063 -0
  227. package/themes/index.js.map +1 -0
  228. package/themes/index.min.js +2 -0
  229. package/themes/index.min.js.LICENSE.txt +5 -0
  230. package/themes/themes/default-dark.d.ts +965 -0
  231. package/themes/themes/default-light.d.ts +965 -0
  232. package/themes/themes/index.d.ts +1934 -0
  233. package/themes/utils/helpers.d.ts +8 -0
  234. package/survey-analytics.types/plotly/setup.d.ts +0 -32
  235. /package/{survey-analytics.types/entries/summary.d.ts → survey-analytics-plotly.types/entries/plotly.fontless.d.ts} +0 -0
  236. /package/{survey-analytics.types → survey-analytics-plotly.types}/plotly/index.d.ts +0 -0
  237. /package/{survey-analytics.types → survey-analytics-plotly.types}/plotly/legacy.d.ts +0 -0
@@ -0,0 +1,28 @@
1
+ export declare class DocumentHelper {
2
+ static createSelector(options: Array<{
3
+ value: string;
4
+ text: string;
5
+ }> | Function, isSelected: (option: {
6
+ value: string;
7
+ text: string;
8
+ }) => boolean, handler: (e: any) => void, title?: string | Function): HTMLDivElement;
9
+ /**
10
+ * Destroys dropdown and removes all event handlers
11
+ * @param {HTMLElement} dropdownElement - Root dropdown element
12
+ */
13
+ static destroyDropdown(dropdownElement: any): void;
14
+ static createButton(handler: (e: any) => void, text?: string, className?: string, icon?: string): HTMLDivElement;
15
+ static setStyles(element: HTMLElement, styles: Record<string, any>): void;
16
+ static createElement(tagName: string, className?: string, attrs?: any): HTMLElement;
17
+ static createSvgElement(path: string): SVGSVGElement;
18
+ static createSvgButton(path: string, title?: string): HTMLButtonElement;
19
+ static createSvgToggleButton(svgPath1: string, svPpath2: string, text1: string, text2: string, handler1: (e: any) => any, handler2: (e: any) => any, state?: string, className?: string): HTMLElement;
20
+ static createInput(className: string, placeholder?: string, defaultValue?: string): HTMLInputElement;
21
+ static createTextEditor(options?: {
22
+ showIcon?: boolean;
23
+ placeholder?: string;
24
+ className?: string;
25
+ inputValue?: string;
26
+ onchange?: (val: any) => void;
27
+ }): HTMLElement;
28
+ }
@@ -0,0 +1,34 @@
1
+ import { DropdownBase, IDropdownItemOption } from "./dropdownBase";
2
+ export declare function createActionDropdown(options: IActionDropdownOptions): HTMLDivElement;
3
+ export interface IActionDropdownOptions {
4
+ options: Array<IDropdownItemOption> | (() => Array<IDropdownItemOption>);
5
+ isSelected: (option: {
6
+ value: string;
7
+ text: string;
8
+ icon?: string;
9
+ }) => boolean;
10
+ updateOption?: (option: IDropdownItemOption) => void;
11
+ handler: (value: string) => boolean;
12
+ title: string | (() => string) | Function;
13
+ className?: string;
14
+ showArrow?: boolean;
15
+ direction?: "up" | "down";
16
+ }
17
+ export declare class ActionDropdownWidget extends DropdownBase {
18
+ private options;
19
+ private headerText;
20
+ constructor(options: IActionDropdownOptions);
21
+ get direction(): "up" | "down";
22
+ protected createHeader(): HTMLDivElement;
23
+ private getTitleText;
24
+ protected getOptions(): IDropdownItemOption[];
25
+ protected isOptionSelected(option: IDropdownItemOption): boolean;
26
+ protected updateOption(option: IDropdownItemOption, item: HTMLLIElement): void;
27
+ protected onOptionSelect(option: IDropdownItemOption, dropdownItem: HTMLLIElement): void;
28
+ protected onBeforePopupShow(): void;
29
+ private updateHeaderLabel;
30
+ protected updateSelect(): void;
31
+ protected attachMethodsToElement(): void;
32
+ setValues(values: string[]): void;
33
+ getValues(): string[];
34
+ }
@@ -0,0 +1,48 @@
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 updateOption(option: IDropdownItemOption, item: HTMLLIElement): void;
41
+ protected shouldUpdateAriaSelectedOnFocus(): boolean;
42
+ protected abstract createHeader(): HTMLDivElement;
43
+ protected abstract getOptions(): IDropdownItemOption[];
44
+ protected abstract isOptionSelected(option: IDropdownItemOption): boolean;
45
+ protected abstract onOptionSelect(option: IDropdownItemOption, dropdownItem: HTMLLIElement): void;
46
+ protected abstract updateSelect(): void;
47
+ protected abstract attachMethodsToElement(): void;
48
+ }
@@ -1,18 +1,3 @@
1
- export declare class DocumentHelper {
2
- static createSelector(options: Array<{
3
- value: string;
4
- text: string;
5
- }> | Function, isSelected: (option: {
6
- value: string;
7
- text: string;
8
- }) => boolean, handler: (e: any) => void, title?: string | Function): HTMLDivElement;
9
- static createButton(handler: (e: any) => void, text?: string, className?: string): HTMLElement;
10
- static createElement(tagName: string, className?: string, attrs?: any): HTMLElement;
11
- static createSvgElement(path: string): SVGSVGElement;
12
- static createSvgButton(path: string): HTMLButtonElement;
13
- static createSvgToggleButton(svgPath1: string, svPpath2: string, text1: string, text2: string, handler1: (e: any) => any, handler2: (e: any) => any, state?: string, className?: string): HTMLElement;
14
- static createInput(className: string, placeholder?: string, defaultValue?: string): HTMLInputElement;
15
- }
16
1
  export declare var options: {
17
2
  runningInBrowser: boolean;
18
3
  };
@@ -37,3 +22,4 @@ export declare function createImagesContainer(links: Array<{
37
22
  content: any;
38
23
  }>): HTMLElement;
39
24
  export declare function toPrecision(value: number, precision?: number): number;
25
+ export declare function getDiffsFromDefaults(obj: any, defaultObj?: any): any;
@@ -1,17 +1,21 @@
1
- import { Question, ItemValue } from "survey-core";
2
- import { VisualizerBase } from "./visualizerBase";
1
+ import { Question, ItemValue, Event } from "survey-core";
2
+ import { ICalculationResult, IChartAdapter, VisualizerBase } from "./visualizerBase";
3
3
  import { IVisualizerWithSelection } from "./selectBase";
4
- import { Event } from "survey-core";
5
4
  export declare class AlternativeVisualizersWrapper extends VisualizerBase implements IVisualizerWithSelection {
6
5
  private visualizers;
7
6
  private visualizerSelector;
8
7
  private updateVisualizerSelector;
8
+ private getVisualizerSwitchItems;
9
+ private _setVisualizer;
9
10
  constructor(visualizers: Array<VisualizerBase>, question: Question, data: Array<{
10
11
  [index: string]: any;
11
12
  }>, options?: Object);
12
13
  protected visualizerContainer: HTMLElement;
14
+ protected onDataChanged(): void;
15
+ protected get allowChangeType(): any;
13
16
  get hasFooter(): boolean;
14
17
  getVisualizers(): VisualizerBase[];
18
+ getChartAdapter(): IChartAdapter;
15
19
  private visualizersWithSelection;
16
20
  private selectedItem;
17
21
  private visualizer;
@@ -63,6 +67,7 @@ export declare class AlternativeVisualizersWrapper extends VisualizerBase implem
63
67
  resetState(): void;
64
68
  getValues(): Array<any>;
65
69
  getLabels(): Array<string>;
66
- getCalculatedValues(): Promise<Array<Object>>;
70
+ getCalculatedValues(): Promise<ICalculationResult>;
71
+ protected onThemeChanged(): void;
67
72
  destroy(): void;
68
73
  }
@@ -2,8 +2,10 @@ export declare var englishStrings: {
2
2
  groupButton: string;
3
3
  ungroupButton: string;
4
4
  selectButton: string;
5
+ columnReorder: string;
5
6
  hideColumn: string;
6
7
  showColumn: string;
8
+ columns: string;
7
9
  makePrivateColumn: string;
8
10
  makePublicColumn: string;
9
11
  moveToDetail: string;
@@ -12,10 +14,12 @@ export declare var englishStrings: {
12
14
  removeRows: string;
13
15
  showLabel: string;
14
16
  entriesLabel: string;
17
+ entriesOnPageLabel: string;
15
18
  visualizer_text: string;
16
19
  visualizer_wordcloud: string;
17
20
  visualizer_histogram: string;
18
21
  visualizer_number: string;
22
+ visualizer_average: string;
19
23
  visualizer_choices: string;
20
24
  visualizer_selectBase: string;
21
25
  visualizer_matrix: string;
@@ -29,6 +33,9 @@ export declare var englishStrings: {
29
33
  chartType_bullet: string;
30
34
  chartType_line: string;
31
35
  chartType_radar: string;
36
+ chartType_histogram: string;
37
+ chartType_vhistogram: string;
38
+ chartType_stackedhistogram: string;
32
39
  hideButton: string;
33
40
  makePrivateButton: string;
34
41
  makePublicButton: string;
@@ -38,6 +45,9 @@ export declare var englishStrings: {
38
45
  changeLocale: string;
39
46
  clearButton: string;
40
47
  addElement: string;
48
+ allQuestions: string;
49
+ selectAll: string;
50
+ clearSelection: string;
41
51
  defaultOrder: string;
42
52
  ascOrder: string;
43
53
  descOrder: string;
@@ -46,10 +56,30 @@ export declare var englishStrings: {
46
56
  otherCommentTitle: string;
47
57
  showPercentages: string;
48
58
  hidePercentages: string;
59
+ exportAs: string;
49
60
  pdfDownloadCaption: string;
50
61
  xlsxDownloadCaption: string;
51
62
  csvDownloadCaption: string;
52
63
  saveDiagramAsPNG: string;
64
+ responsesText: string;
65
+ noData: string;
66
+ selectDateRange: string;
67
+ includeToday: string;
68
+ reportingPeriodCustom: string;
69
+ reportingPeriodLast7days: string;
70
+ reportingPeriodLast14days: string;
71
+ reportingPeriodLast28days: string;
72
+ reportingPeriodLast30days: string;
73
+ reportingPeriodLastWeekMon: string;
74
+ reportingPeriodLastWeekSun: string;
75
+ reportingPeriodLastMonth: string;
76
+ reportingPeriodLastQuarter: string;
77
+ reportingPeriodLastYear: string;
78
+ reportingPeriodWtdSun: string;
79
+ reportingPeriodWtdMon: string;
80
+ reportingPeriodMtd: string;
81
+ reportingPeriodQtd: string;
82
+ reportingPeriodYtd: string;
53
83
  hideEmptyAnswers: string;
54
84
  showEmptyAnswers: string;
55
85
  "topNValueText-1": string;
@@ -80,6 +110,7 @@ export declare var englishStrings: {
80
110
  axisYSelectorTitle: string;
81
111
  axisXAlternativeSelectorTitle: string;
82
112
  axisYAlternativeSelectorTitle: string;
113
+ secondYAxisToggleTitle: string;
83
114
  notSelected: string;
84
115
  intervalMode_default: string;
85
116
  intervalMode_decades: string;
@@ -99,4 +130,13 @@ export declare var englishStrings: {
99
130
  groupedYearsAxisTitle: string;
100
131
  license: string;
101
132
  license2: string;
133
+ seriesListLegendSeries: string;
134
+ seriesListValuesLabel: string;
135
+ seriesListRemove: string;
136
+ seriesListAdd: string;
137
+ seriesListMoveToSecondAxis: string;
138
+ seriesListMoveToFirstAxis: string;
139
+ aggregationCount: string;
140
+ aggregationSum: string;
141
+ aggregationAverage: string;
102
142
  };
@@ -0,0 +1,29 @@
1
+ import ApexCharts from "apexcharts";
2
+ import { SelectBase } from "../selectBase";
3
+ import { ApexChartsOptions } from "./setup";
4
+ import { IChartAdapter, VisualizerBase } from "../visualizerBase";
5
+ export declare const chartTypes: {
6
+ boolean: string[];
7
+ number: string[];
8
+ average: string[];
9
+ selectBase: string[];
10
+ histogram: string[];
11
+ matrix: string[];
12
+ matrixDropdownGrouped: string[];
13
+ pivot: string[];
14
+ ranking: string[];
15
+ };
16
+ export declare class ApexChartsAdapter implements IChartAdapter {
17
+ protected model: SelectBase | VisualizerBase;
18
+ private _chart;
19
+ private _pieCharts;
20
+ static getChartTypesByVisualizerType(vType: string): Array<string>;
21
+ private updatePieCharts;
22
+ constructor(model: SelectBase | VisualizerBase);
23
+ protected patchConfigParameters(chartNode: object, options: object): void;
24
+ get chart(): ApexCharts;
25
+ getChartTypes(): string[];
26
+ create(chartNode: HTMLElement): Promise<any>;
27
+ update(chartNode: HTMLElement): Promise<ApexChartsOptions>;
28
+ destroy(node: HTMLElement): void;
29
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./setup";
2
+ export * from "./chart-adapter";
@@ -0,0 +1,200 @@
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
+ import "./styles.scss";
7
+ export interface ApexChartsOptions {
8
+ series: Array<any>;
9
+ chart: any;
10
+ labels: Array<string>;
11
+ colors: Array<string>;
12
+ plotOptions: any;
13
+ dataLabels?: any;
14
+ legend?: any;
15
+ tooltip?: any;
16
+ hasSeries?: boolean;
17
+ xaxis?: any;
18
+ yaxis?: any;
19
+ grid?: any;
20
+ title?: any;
21
+ noData?: any;
22
+ responsive?: Array<any>;
23
+ }
24
+ export declare class ApexChartsSetup {
25
+ static imageExportFormat: string;
26
+ static defaultChartHeight: number;
27
+ static defaultBarGap: number;
28
+ static defaultToolbarConfig: {
29
+ show: boolean;
30
+ tools: {
31
+ download: boolean;
32
+ selection: boolean;
33
+ zoom: boolean;
34
+ zoomin: boolean;
35
+ zoomout: boolean;
36
+ pan: boolean;
37
+ reset: boolean;
38
+ };
39
+ };
40
+ static defaultDataLabelsConfig(theme: DashboardTheme): {
41
+ enabled: boolean;
42
+ style: {
43
+ colors: string[];
44
+ fontSize: string;
45
+ fontFamily: string;
46
+ fontWeight: number;
47
+ };
48
+ };
49
+ static defaultTooltipConfig(theme: DashboardTheme): {
50
+ enabled: boolean;
51
+ fillSeriesColor: boolean;
52
+ style: {
53
+ fontSize: string;
54
+ fontFamily: string;
55
+ };
56
+ marker: {
57
+ show: boolean;
58
+ };
59
+ x: {
60
+ formatter: () => string;
61
+ };
62
+ y: {
63
+ formatter: (val: number) => string;
64
+ title: {
65
+ formatter: () => string;
66
+ };
67
+ };
68
+ };
69
+ static defaultLegendConfig(model: SelectBase): {
70
+ position: "left" | "right" | "top" | "bottom";
71
+ horizontalAlign: string;
72
+ verticalAlign: string;
73
+ fontSize: string;
74
+ fontFamily: string;
75
+ fontWeight: number;
76
+ labels: {
77
+ colors: string;
78
+ };
79
+ markers: {
80
+ size: number;
81
+ strokeWidth: number;
82
+ shape: string;
83
+ };
84
+ };
85
+ static defaultAxisZerolineConfig(theme: DashboardTheme): {
86
+ show: boolean;
87
+ color: string;
88
+ };
89
+ static defaultGridConfig(theme: DashboardTheme): {
90
+ borderColor: string;
91
+ strokeDashArray: number;
92
+ position: string;
93
+ xaxis: {
94
+ lines: {
95
+ show: boolean;
96
+ };
97
+ };
98
+ yaxis: {
99
+ lines: {
100
+ show: boolean;
101
+ };
102
+ };
103
+ };
104
+ static defaultAxisTitleFont(theme: DashboardTheme): {
105
+ colors: string;
106
+ fontSize: string;
107
+ fontFamily: string;
108
+ fontWeight: number;
109
+ };
110
+ static defaultAxisLabelFont(theme: DashboardTheme): {
111
+ colors: string;
112
+ fontSize: string;
113
+ fontFamily: string;
114
+ fontWeight: number;
115
+ };
116
+ static defaultAxisConfig(theme: DashboardTheme): {
117
+ title: {
118
+ style: {
119
+ colors: string;
120
+ fontSize: string;
121
+ fontFamily: string;
122
+ fontWeight: number;
123
+ };
124
+ };
125
+ min: number;
126
+ labels: {
127
+ trim: boolean;
128
+ hideOverlappingLabels: boolean;
129
+ style: {
130
+ colors: string;
131
+ fontSize: string;
132
+ fontFamily: string;
133
+ fontWeight: number;
134
+ };
135
+ };
136
+ };
137
+ static defaultGaugeValueFont(theme: DashboardTheme): {
138
+ colors: string;
139
+ fontSize: string;
140
+ fontFamily: string;
141
+ fontWeight: number;
142
+ };
143
+ static defaultGaugeTickFont(theme: DashboardTheme): {
144
+ colors: string;
145
+ fontSize: string;
146
+ fontFamily: string;
147
+ fontWeight: number;
148
+ };
149
+ static defaultNoDataConfig(theme: DashboardTheme): {
150
+ text: any;
151
+ align: string;
152
+ verticalAlign: string;
153
+ offsetX: number;
154
+ offsetY: number;
155
+ style: {
156
+ color: string;
157
+ fontSize: string;
158
+ fontFamily: string;
159
+ };
160
+ };
161
+ static defaultStrokeConfig: {
162
+ width: number;
163
+ curve: string;
164
+ };
165
+ static defaultFillConfig: {
166
+ type: string;
167
+ opacity: number;
168
+ };
169
+ static defaultResponsive: {
170
+ breakpoint: number;
171
+ options: {
172
+ legend: {
173
+ position: string;
174
+ };
175
+ };
176
+ };
177
+ /**
178
+ * Fires when end user clicks on the 'save as image' button.
179
+ */
180
+ static onImageSaving: Event<(sender: VisualizerBase, options: any) => any, VisualizerBase, any>;
181
+ /**
182
+ * Fires before chart will be created. User can change series, chart options and config of the chart.
183
+ * Options is an object with the following fields: series, chart, xaxis, yaxis, labels, colors, plotOptions, dataLabels, legend, tooltip, grid and hasSeries.
184
+ */
185
+ static onChartCreating: Event<(sender: VisualizerBase, options: any) => any, VisualizerBase, any>;
186
+ static dataListFormatter(model: SelectBase, text: string, value: string): string;
187
+ static setups: {
188
+ [type: string]: (model: VisualizerBase, answersData: IAnswersData) => ApexChartsOptions;
189
+ };
190
+ static setup(charType: string, model: VisualizerBase, answersData: IAnswersData): ApexChartsOptions;
191
+ static setupPie(model: SelectBase, answersData: IAnswersData): ApexChartsOptions;
192
+ static setupBar(model: SelectBase, answersData: IAnswersData): ApexChartsOptions;
193
+ static setupVBar(model: SelectBase, answersData: IAnswersData): ApexChartsOptions;
194
+ static setupLine(model: SelectBase, answersData: IAnswersData): ApexChartsOptions;
195
+ static setupStackedBar(model: SelectBase, answersData: IAnswersData): ApexChartsOptions;
196
+ static setupScatter(model: SelectBase, answersData: IAnswersData): ApexChartsOptions;
197
+ static setupGauge(model: NumberModel, answersData: IAnswersData): ApexChartsOptions;
198
+ static setupBullet(model: NumberModel, answersData: IAnswersData): ApexChartsOptions;
199
+ static setupRadar(model: SelectBase, answersData: IAnswersData): ApexChartsOptions;
200
+ }
@@ -0,0 +1,6 @@
1
+ export type SeriesAggregation = "count" | "sum" | "average";
2
+ export interface IAxisDescription {
3
+ dataName: string;
4
+ valueName?: string;
5
+ aggregation?: SeriesAggregation;
6
+ }
@@ -4,7 +4,7 @@ import { SelectBase } from "./selectBase";
4
4
  export declare class BooleanModel extends SelectBase {
5
5
  constructor(question: Question, data: Array<{
6
6
  [index: string]: any;
7
- }>, options?: Object, name?: string);
7
+ }>, options?: Object, type?: string);
8
8
  protected getCorrectAnswerText(): string;
9
9
  get booleanQuestion(): QuestionBooleanModel;
10
10
  static trueColor: string;
@@ -0,0 +1,29 @@
1
+ import { Question } from "survey-core";
2
+ import { ICalculationResult } from "./visualizerBase";
3
+ import { NumberModel } from "./number";
4
+ import "./card.scss";
5
+ export declare class CardVisualizerWidget {
6
+ private _model;
7
+ private _data;
8
+ private _renderedTarget;
9
+ constructor(_model: NumberModel, _data: ICalculationResult);
10
+ render(target: HTMLDivElement): void;
11
+ dispose(): void;
12
+ }
13
+ export declare class CardAdapter {
14
+ private model;
15
+ private _cardVisualizer;
16
+ constructor(model: CardVisualizer);
17
+ create(element: HTMLElement): Promise<any>;
18
+ destroy(node: HTMLElement): void;
19
+ }
20
+ export declare class CardVisualizer extends NumberModel {
21
+ precision: number;
22
+ private _cardAdapter;
23
+ constructor(question: Question, data: Array<{
24
+ [index: string]: any;
25
+ }>, options?: Object, type?: string);
26
+ protected destroyContent(container: HTMLElement): void;
27
+ protected renderContentAsync(container: HTMLElement): Promise<HTMLElement>;
28
+ destroy(): void;
29
+ }
@@ -0,0 +1,9 @@
1
+ export interface IChartConfigOption {
2
+ visualizerType: string;
3
+ chartType?: string;
4
+ }
5
+ export declare const chartConfig: {
6
+ [key: string]: IChartConfigOption;
7
+ };
8
+ export declare function getVisualizerTypes(chartKeys: Array<string>): Array<string>;
9
+ export declare function getChartTypes(chartKeys: Array<string>): any;
@@ -23,43 +23,11 @@ export interface IVisualizerPanelElement {
23
23
  */
24
24
  isVisible: boolean;
25
25
  isPublic: boolean;
26
- /**
27
- * Indicates the selected chart type.
28
- *
29
- * Possible values:
30
- *
31
- * - `"bar"`
32
- * - `"vbar"`
33
- * - `"stackedbar"`
34
- * - `"pie"`
35
- * - `"doughnut"`
36
- * - `"gauge"`
37
- * - `"bullet"`
38
- * - `"radar"`
39
- */
40
- chartType?: string;
41
- /**
42
- * Indicates the answer order in [bar charts](https://surveyjs.io/dashboard/documentation/chart-types#bar-chart), [histograms](https://surveyjs.io/dashboard/documentation/chart-types#histogram), and [statistics tables](https://surveyjs.io/dashboard/documentation/chart-types#statistics-table).
43
- *
44
- * Possible values:
45
- *
46
- * - `"default"` - Answers retain the initial sort order.
47
- * - `"asc"` - Answers are sorted by ascending answer count.
48
- * - `"desc"` - Answers are sorted by descending answer count.
49
- */
50
- answersOrder?: string;
51
- /**
52
- * Indicates whether answers with zero count are hidden in [bar charts](https://surveyjs.io/dashboard/documentation/chart-types#bar-chart), [histograms](https://surveyjs.io/dashboard/documentation/chart-types#histogram), and [statistics tables](https://surveyjs.io/dashboard/documentation/chart-types#statistics-table).
53
- */
54
- hideEmptyAnswers?: boolean;
55
- /**
56
- * Indicates whether the visualization item displays top 5, 10, or 20 answers by answer count. This property equals -1 if the Top N Answers feature is disabled.
57
- */
58
- topN?: number;
59
26
  }
60
27
  export interface IState {
61
28
  locale?: string;
62
29
  elements?: IVisualizerPanelElement[];
30
+ [key: string]: any;
63
31
  }
64
32
  export interface IPermission {
65
33
  name: string;
@@ -0,0 +1,51 @@
1
+ import { Question, SurveyModel, Event } from "survey-core";
2
+ import { IVisualizerOptions, ToolbarItemType, VisualizerBase } from "./visualizerBase";
3
+ import { VisualizationPanel } from "./visualizationPanel";
4
+ import { DataProvider, GetDataFn } from "./dataProvider";
5
+ import { IVisualizerDescription } from "./visualizer-interfaces";
6
+ import { LayoutEngine } from "./layout-engine";
7
+ import { IDashboardTheme } from "./theme";
8
+ import { IState } from "./config";
9
+ import { DatePeriodEnum, DateRangeTuple, IDateRangeChangedOptions } from "./utils/dateRangeModel";
10
+ export interface IDashboardOptions {
11
+ data?: any[];
12
+ questions?: Question[];
13
+ visualizers?: Array<string | IVisualizerOptions>;
14
+ survey?: SurveyModel;
15
+ dataProvider?: DataProvider;
16
+ allowHideQuestions?: boolean;
17
+ allowDynamicLayout?: boolean;
18
+ allowDragDrop?: boolean;
19
+ layoutEngine?: LayoutEngine;
20
+ stripHtmlFromTitles?: boolean;
21
+ showToolbar?: boolean;
22
+ dateFieldName?: string;
23
+ datePeriod?: DatePeriodEnum;
24
+ availableDatePeriods?: DatePeriodEnum[];
25
+ dateRange?: DateRangeTuple;
26
+ showAnswerCount?: boolean;
27
+ showDatePanel?: boolean;
28
+ [key: string]: any;
29
+ }
30
+ export declare function getVisualizerDescriptions(visualizers: Array<string | IVisualizerOptions>, questions?: Question[]): Array<Question | IVisualizerDescription>;
31
+ export declare class Dashboard extends VisualizerBase {
32
+ private readonly _options;
33
+ private _panel;
34
+ private _data;
35
+ private _questions;
36
+ private _visualizers;
37
+ onDateRangeChanged: Event<(sender: Dashboard, options: IDateRangeChangedOptions) => any, Dashboard, any>;
38
+ constructor(options: IDashboardOptions);
39
+ registerToolbarItem(name: string, creator: (toolbar?: HTMLDivElement) => HTMLElement, type: ToolbarItemType, index?: number, groupIndex?: number): void;
40
+ get state(): IState;
41
+ set state(newState: IState);
42
+ get locale(): string;
43
+ set locale(newLocale: string);
44
+ get panel(): VisualizationPanel;
45
+ render(targetElement: HTMLElement | string, isRoot?: boolean): void;
46
+ updateData(data: Array<{
47
+ [index: string]: any;
48
+ }> | GetDataFn): void;
49
+ applyTheme(theme: IDashboardTheme): void;
50
+ destroy(): void;
51
+ }