survey-analytics 1.9.71 → 1.9.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "lint": "eslint ./src --quiet",
20
20
  "pre-push-check": "npm run lint && npm run test"
21
21
  },
22
- "version": "1.9.71",
22
+ "version": "1.9.74",
23
23
  "name": "survey-analytics",
24
24
  "description": "SurveyJS analytics Library.",
25
25
  "main": "survey.analytics.js",
@@ -71,7 +71,7 @@
71
71
  "jquery": "3.5.0",
72
72
  "muuri": "^0.8.0",
73
73
  "plotly.js-dist-min": "^2.11.1",
74
- "survey-core": "1.9.71",
74
+ "survey-core": "1.9.74",
75
75
  "tabulator-tables": "4.8.4",
76
76
  "wordcloud": "^1.2.2"
77
77
  },
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v1.9.71
2
+ * surveyjs - SurveyJS Dashboard library v1.9.74
3
3
  * Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -643,7 +643,7 @@ declare module "dataProvider" {
643
643
  /**
644
644
  * Fires when data has been changed.
645
645
  */
646
- onDataChanged: Event<(sender: DataProvider, options: any) => any, any>;
646
+ onDataChanged: Event<(sender: DataProvider, options: any) => any, DataProvider, any>;
647
647
  protected raiseDataChanged(): void;
648
648
  }
649
649
  }
@@ -783,8 +783,16 @@ declare module "visualizerBase" {
783
783
  /**
784
784
  * The event is fired right after a visualizer's content is rendered in DOM.
785
785
  **/
786
- onAfterRender: Event<(sender: VisualizerBase, options: any) => any, any>;
786
+ onAfterRender: Event<(sender: VisualizerBase, options: any) => any, VisualizerBase, any>;
787
787
  protected afterRender(contentContainer: HTMLElement): void;
788
+ /**
789
+ * Fires when visualizer locale changed.
790
+ * sender - this visualizer
791
+ * locale - new locale of the visualizer
792
+ */
793
+ onLocaleChanged: Event<(sender: VisualizerBase, options: {
794
+ locale: string;
795
+ }) => any, VisualizerBase, any>;
788
796
  protected toolbarItemCreators: {
789
797
  [name: string]: (toolbar?: HTMLDivElement) => HTMLElement;
790
798
  };
@@ -934,6 +942,17 @@ declare module "visualizerBase" {
934
942
  getData(): any;
935
943
  getState(): any;
936
944
  setState(state: any): void;
945
+ /**
946
+ * Returns current locale of the visualizer.
947
+ * If locales more than one, the language selection dropdown will be added in the toolbar
948
+ * In order to use survey locales the survey instance object should be passed as 'survey' option for visualizer
949
+ */
950
+ get locale(): string;
951
+ /**
952
+ * Sets locale for visualization panel.
953
+ */
954
+ set locale(newLocale: string);
955
+ protected setLocale(newLocale: string): void;
937
956
  }
938
957
  }
939
958
  declare module "number" {
@@ -1043,7 +1062,7 @@ declare module "selectBase" {
1043
1062
  * options - the answers data object containing: datasets, labels, colors, additional texts (percentage).
1044
1063
  * options fields can be modified
1045
1064
  */
1046
- onAnswersDataReady: Event<(sender: SelectBase, options: any) => any, any>;
1065
+ onAnswersDataReady: Event<(sender: SelectBase, options: any) => any, SelectBase, any>;
1047
1066
  /**
1048
1067
  * Returns object with all infotmation for data visualization: datasets, labels, colors, additional texts (percentage).
1049
1068
  */
@@ -1475,17 +1494,7 @@ declare module "visualizationPanel" {
1475
1494
  protected setBackgroundColorCore(color: string): void;
1476
1495
  private buildVisualizers;
1477
1496
  private destroyVisualizers;
1478
- /**
1479
- * Returns current locale of the visualization panel.
1480
- * If locales more than one, the language selection dropdown will be added in the toolbar
1481
- * In order to use survey locales the survey instance object should be passed as 'survey' option for visualizer
1482
- */
1483
- get locale(): string;
1484
- /**
1485
- * Sets locale for visualization panel.
1486
- */
1487
- set locale(newLocale: string);
1488
- private setLocale;
1497
+ protected setLocale(newLocale: string): void;
1489
1498
  /**
1490
1499
  * Returns whether the VisualizationPanel allows dynamic layouting - rearrange items via drap/drop. Set via options.
1491
1500
  */
@@ -1541,14 +1550,14 @@ declare module "visualizationPanel" {
1541
1550
  * changed - changed element
1542
1551
  * reason - reason (string) why event fired: "ADDED", "MOVED" or "REMOVED"
1543
1552
  */
1544
- onVisibleElementsChanged: Event<(sender: VisualizationPanel, options: any) => any, any>;
1553
+ onVisibleElementsChanged: Event<(sender: VisualizationPanel, options: any) => any, VisualizationPanel, any>;
1545
1554
  protected visibleElementsChanged(element: IVisualizerPanelElement, reason: string): void;
1546
1555
  /**
1547
1556
  * Fires when vizualization panel state changed.
1548
1557
  * sender - this panel
1549
1558
  * state - new state of the panel
1550
1559
  */
1551
- onStateChanged: Event<(sender: VisualizationPanel, state: IState) => any, any>;
1560
+ onStateChanged: Event<(sender: VisualizationPanel, state: IState) => any, VisualizationPanel, any>;
1552
1561
  /**
1553
1562
  * Fires when permissions changed
1554
1563
  */
@@ -1609,6 +1618,7 @@ declare module "visualizationPanelDynamic" {
1609
1618
  }>, options?: {
1610
1619
  [index: string]: any;
1611
1620
  }, name?: string);
1621
+ protected setLocale(newLocale: string): void;
1612
1622
  private onAfterRenderPanelCallback;
1613
1623
  get name(): string;
1614
1624
  private updatePanelVisualizerData;
@@ -1638,11 +1648,13 @@ declare module "visualizationMatrixDropdown" {
1638
1648
  import { VisualizerBase } from "visualizerBase";
1639
1649
  export class VisualizationMatrixDropdown extends VisualizerBase {
1640
1650
  protected _matrixDropdownVisualizer: VisualizerBase;
1651
+ private readonly _childOptions;
1641
1652
  constructor(question: QuestionMatrixDropdownModel, data: Array<{
1642
1653
  [index: string]: any;
1643
1654
  }>, options?: {
1644
1655
  [index: string]: any;
1645
1656
  }, name?: string);
1657
+ protected setLocale(newLocale: string): void;
1646
1658
  get matrixDropdownVisualizer(): VisualizerBase;
1647
1659
  private onPanelAfterRenderCallback;
1648
1660
  private updateDropdownVisualizerData;
@@ -1659,6 +1671,7 @@ declare module "visualizationMatrixDropdown" {
1659
1671
  declare module "plotly/setup" {
1660
1672
  import { Event } from "survey-core";
1661
1673
  import { SelectBase } from "selectBase";
1674
+ import { VisualizerBase } from "visualizerBase";
1662
1675
  export interface PlotlyOptions {
1663
1676
  traces: Array<any>;
1664
1677
  layout: any;
@@ -1669,12 +1682,12 @@ declare module "plotly/setup" {
1669
1682
  /**
1670
1683
  * Fires when end user clicks on the 'save as image' button.
1671
1684
  */
1672
- static onImageSaving: Event<(sender: SelectBase, options: any) => any, any>;
1685
+ static onImageSaving: Event<(sender: SelectBase, options: any) => any, SelectBase, any>;
1673
1686
  /**
1674
1687
  * Fires before plot will be created. User can change traces, layout and config of the plot.
1675
1688
  * Options is an object with the following fields: traces, layout and config of the plot.
1676
1689
  */
1677
- static onPlotCreating: Event<(sender: SelectBase, options: any) => any, any>;
1690
+ static onPlotCreating: Event<(sender: VisualizerBase, options: any) => any, VisualizerBase, any>;
1678
1691
  static setups: {
1679
1692
  [type: string]: (model: SelectBase) => PlotlyOptions;
1680
1693
  };
@@ -1853,7 +1866,7 @@ declare module "wordcloud/wordcloud" {
1853
1866
  static shrinkToFit: boolean;
1854
1867
  static abortThreshold: any;
1855
1868
  static weightFactor: number;
1856
- static onWordcloudCreating: Event<(sender: WordCloud, options: any) => any, any>;
1869
+ static onWordcloudCreating: Event<(sender: WordCloud, options: any) => any, WordCloud, any>;
1857
1870
  constructor(model: WordCloud);
1858
1871
  get wordcloud(): any;
1859
1872
  create(node: HTMLElement): any;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v1.9.71
2
+ * surveyjs - SurveyJS Dashboard library v1.9.74
3
3
  * Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -705,7 +705,7 @@ declare module "tables/columnbuilder" {
705
705
  }
706
706
  }
707
707
  declare module "tables/table" {
708
- import { SurveyModel, Question, Event } from "survey-core";
708
+ import { SurveyModel, Question, Event, EventBase } from "survey-core";
709
709
  import { IPermission, QuestionLocation, ITableState, IColumn, IColumnData } from "tables/config";
710
710
  import { Details } from "tables/extensions/detailsextensions";
711
711
  import { TableExtensions } from "tables/extensions/tableextensions";
@@ -726,6 +726,8 @@ declare module "tables/table" {
726
726
  displayValue: any;
727
727
  }) => void;
728
728
  }
729
+ export class TableEvent extends EventBase<Table> {
730
+ }
729
731
  export abstract class Table {
730
732
  protected _survey: SurveyModel;
731
733
  protected data: Array<Object>;
@@ -747,9 +749,9 @@ declare module "tables/table" {
747
749
  * Sets pagination selector content.
748
750
  */
749
751
  paginationSizeSelector: number[];
750
- onColumnsVisibilityChanged: Event<(sender: Table, options: any) => any, any>;
751
- onColumnsLocationChanged: Event<(sender: Table, options: any) => any, any>;
752
- onRowRemoved: Event<(sender: Table, options: any) => any, any>;
752
+ onColumnsVisibilityChanged: TableEvent;
753
+ onColumnsLocationChanged: TableEvent;
754
+ onRowRemoved: TableEvent;
753
755
  renderDetailActions: (container: HTMLElement, row: TableRow) => HTMLElement;
754
756
  getData(): Object[];
755
757
  get survey(): SurveyModel;
@@ -809,7 +811,7 @@ declare module "tables/table" {
809
811
  /**
810
812
  * Fires when table state changed.
811
813
  */
812
- onStateChanged: Event<(sender: Table, options: any) => any, any>;
814
+ onStateChanged: TableEvent;
813
815
  /**
814
816
  * Gets table permissions.
815
817
  */
@@ -832,7 +834,7 @@ declare module "tables/table" {
832
834
  extensions: TableExtensions;
833
835
  private detailedRowClass;
834
836
  private isDetailsExpanded;
835
- onToggleDetails: Event<(sender: TableRow, options: any) => any, any>;
837
+ onToggleDetails: Event<(sender: TableRow, options: any) => any, TableRow, any>;
836
838
  /**
837
839
  * Returns row's html element
838
840
  */
@@ -880,7 +882,7 @@ declare module "tables/datatables" {
880
882
  * <br/> options.survey current survey
881
883
  * @see getColumns
882
884
  */
883
- onColumnsReorder: Event<(sender: DataTables, options: any) => any, any>;
885
+ onColumnsReorder: Event<(sender: DataTables, options: any) => any, DataTables, any>;
884
886
  static initJQuery($: any): void;
885
887
  static set haveCommercialLicense(val: boolean);
886
888
  constructor(survey: SurveyModel, data: Array<Object>, options?: DataTablesOptions, _columnsData?: Array<IColumnData>);