survey-analytics 2.5.40 → 2.5.42

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
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.5.40",
2
+ "version": "2.5.42",
3
3
  "name": "survey-analytics",
4
4
  "scripts": {
5
5
  "start": "http-server --silent",
@@ -85,7 +85,7 @@
85
85
  "@types/mongodb": "^4.0.6",
86
86
  "@types/plotly.js-dist-min": "^2.3.0",
87
87
  "@types/tabulator-tables": "^6.2.3",
88
- "survey-core": "2.5.40"
88
+ "survey-core": "2.5.42"
89
89
  },
90
90
  "husky": {
91
91
  "hooks": {
@@ -4,6 +4,7 @@ import { Details } from "./extensions/detailsextensions";
4
4
  import { ITableExtension, TableExtensions } from "./extensions/tableextensions";
5
5
  export interface ITableOptions {
6
6
  [index: string]: any;
7
+ stripHtmlFromTitles?: boolean;
7
8
  /**
8
9
  * Specifies whether to use question names instead of question titles as column headings.
9
10
  *
@@ -36,4 +36,5 @@ export declare function createImagesContainer(links: Array<{
36
36
  name: string;
37
37
  content: any;
38
38
  }>): HTMLElement;
39
+ export declare function stripHtml(html: string): string;
39
40
  export declare function toPrecision(value: number, precision?: number): number;
@@ -36,4 +36,5 @@ export declare function createImagesContainer(links: Array<{
36
36
  name: string;
37
37
  content: any;
38
38
  }>): HTMLElement;
39
+ export declare function stripHtml(html: string): string;
39
40
  export declare function toPrecision(value: number, precision?: number): number;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- surveyjs - SurveyJS Dashboard library v2.5.40
2
+ surveyjs - SurveyJS Dashboard library v2.5.42
3
3
  Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  License: SEE LICENSE IN LICENSE
5
5
  */
@@ -3430,6 +3430,9 @@ License: SEE LICENSE IN LICENSE
3430
3430
  };
3431
3431
  return DataHelper;
3432
3432
  }());
3433
+ function stripHtml(html) {
3434
+ return (html || "").replace(/(<([^>]+)>)/gi, "");
3435
+ }
3433
3436
  function toPrecision(value, precision) {
3434
3437
  if (precision === void 0) { precision = 2; }
3435
3438
  var base = Math.pow(10, precision);
@@ -4245,9 +4248,7 @@ License: SEE LICENSE IN LICENSE
4245
4248
  };
4246
4249
  VisualizerBase.prototype.processText = function (text) {
4247
4250
  if (this.options.stripHtmlFromTitles !== false) {
4248
- var originalText = text || "";
4249
- var processedText = originalText.replace(/(<([^>]+)>)/gi, "");
4250
- return processedText;
4251
+ return stripHtml(text);
4251
4252
  }
4252
4253
  return text;
4253
4254
  };