survey-analytics 1.12.19 → 1.12.21

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
@@ -20,7 +20,7 @@
20
20
  "lint": "eslint ./src --quiet",
21
21
  "pre-push-check": "npm run lint && npm run test"
22
22
  },
23
- "version": "1.12.19",
23
+ "version": "1.12.21",
24
24
  "name": "survey-analytics",
25
25
  "description": "SurveyJS analytics Library.",
26
26
  "main": "survey.analytics.js",
@@ -102,7 +102,7 @@
102
102
  },
103
103
  "peerDependencies": {
104
104
  "@types/plotly.js-dist-min": "^2.3.0",
105
- "survey-core": "1.12.19"
105
+ "survey-core": "1.12.21"
106
106
  },
107
107
  "husky": {
108
108
  "hooks": {
@@ -1,4 +1,4 @@
1
- import { MatrixRowModel, Question, QuestionCompositeModel, QuestionCustomModel, QuestionFileModel, QuestionMatrixDropdownModel, QuestionMatrixModel } from "survey-core";
1
+ import { MatrixRowModel, Question, QuestionCompositeModel, QuestionCustomModel, QuestionFileModel, QuestionMatrixDropdownModel, QuestionMatrixModel, QuestionSelectBase } from "survey-core";
2
2
  import { ICellData, IColumn, ColumnDataType, QuestionLocation, IColumnData } from "./config";
3
3
  import { ITableOptions, Table } from "./table";
4
4
  export declare class BaseColumn<T extends Question = Question> implements IColumn {
@@ -32,11 +32,14 @@ export declare class BaseColumn<T extends Question = Question> implements IColum
32
32
  export declare class DefaultColumn extends BaseColumn {
33
33
  protected getDisplayValue(data: any, table: Table, options: ITableOptions): any;
34
34
  }
35
- export declare class CommentColumn extends BaseColumn {
35
+ export declare class CommentColumn<T extends Question = Question> extends BaseColumn<T> {
36
36
  protected getName(): string;
37
37
  protected getDisplayName(): string;
38
38
  protected getDisplayValue(data: any, table: Table, options: ITableOptions): string;
39
39
  }
40
+ export declare class OtherColumn extends CommentColumn<QuestionSelectBase> {
41
+ protected getDisplayName(): string;
42
+ }
40
43
  export declare class MatrixColumn extends BaseColumn<QuestionMatrixModel> {
41
44
  private row;
42
45
  private valueName;
@@ -1,4 +1,4 @@
1
- import { MatrixRowModel, Question, QuestionCompositeModel, QuestionCustomModel, QuestionFileModel, QuestionMatrixDropdownModel, QuestionMatrixModel } from "survey-core";
1
+ import { MatrixRowModel, Question, QuestionCompositeModel, QuestionCustomModel, QuestionFileModel, QuestionMatrixDropdownModel, QuestionMatrixModel, QuestionSelectBase } from "survey-core";
2
2
  import { ICellData, IColumn, ColumnDataType, QuestionLocation, IColumnData } from "./config";
3
3
  import { ITableOptions, Table } from "./table";
4
4
  export declare class BaseColumn<T extends Question = Question> implements IColumn {
@@ -32,11 +32,14 @@ export declare class BaseColumn<T extends Question = Question> implements IColum
32
32
  export declare class DefaultColumn extends BaseColumn {
33
33
  protected getDisplayValue(data: any, table: Table, options: ITableOptions): any;
34
34
  }
35
- export declare class CommentColumn extends BaseColumn {
35
+ export declare class CommentColumn<T extends Question = Question> extends BaseColumn<T> {
36
36
  protected getName(): string;
37
37
  protected getDisplayName(): string;
38
38
  protected getDisplayValue(data: any, table: Table, options: ITableOptions): string;
39
39
  }
40
+ export declare class OtherColumn extends CommentColumn<QuestionSelectBase> {
41
+ protected getDisplayName(): string;
42
+ }
40
43
  export declare class MatrixColumn extends BaseColumn<QuestionMatrixModel> {
41
44
  private row;
42
45
  private valueName;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v1.12.19
2
+ * surveyjs - SurveyJS Dashboard library v1.12.21
3
3
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v1.12.19
2
+ * surveyjs - SurveyJS Dashboard library v1.12.21
3
3
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS Dashboard library v1.12.19
2
+ * surveyjs - SurveyJS Dashboard library v1.12.21
3
3
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1432,10 +1432,12 @@ var DefaultColumnsBuilder = /** @class */ (function () {
1432
1432
  };
1433
1433
  DefaultColumnsBuilder.prototype.buildColumns = function (question, table) {
1434
1434
  var columns = this.buildColumnsCore(question, table);
1435
- if (question.hasComment ||
1436
- (question.hasOther && question["getStoreOthersAsComment"]())) {
1435
+ if (question.hasComment) {
1437
1436
  columns.push(new _columns__WEBPACK_IMPORTED_MODULE_1__.CommentColumn(question, table));
1438
1437
  }
1438
+ if (question.hasOther && question["getStoreOthersAsComment"]()) {
1439
+ columns.push(new _columns__WEBPACK_IMPORTED_MODULE_1__.OtherColumn(question, table));
1440
+ }
1439
1441
  return columns;
1440
1442
  };
1441
1443
  return DefaultColumnsBuilder;
@@ -1560,7 +1562,8 @@ __webpack_require__.r(__webpack_exports__);
1560
1562
  /* harmony export */ FileColumn: () => (/* binding */ FileColumn),
1561
1563
  /* harmony export */ ImageColumn: () => (/* binding */ ImageColumn),
1562
1564
  /* harmony export */ MatrixColumn: () => (/* binding */ MatrixColumn),
1563
- /* harmony export */ MatrixDropdownColumn: () => (/* binding */ MatrixDropdownColumn)
1565
+ /* harmony export */ MatrixDropdownColumn: () => (/* binding */ MatrixDropdownColumn),
1566
+ /* harmony export */ OtherColumn: () => (/* binding */ OtherColumn)
1564
1567
  /* harmony export */ });
1565
1568
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/utils/helpers.ts");
1566
1569
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
@@ -1697,9 +1700,7 @@ var CommentColumn = /** @class */ (function (_super) {
1697
1700
  return "".concat(this.question.name).concat(survey_core__WEBPACK_IMPORTED_MODULE_1__.settings.commentPrefix);
1698
1701
  };
1699
1702
  CommentColumn.prototype.getDisplayName = function () {
1700
- return this.question.hasOther
1701
- ? this.question.otherText
1702
- : this.question.commentText;
1703
+ return this.question.commentText;
1703
1704
  };
1704
1705
  CommentColumn.prototype.getDisplayValue = function (data, table, options) {
1705
1706
  return this.question.comment;
@@ -1707,6 +1708,17 @@ var CommentColumn = /** @class */ (function (_super) {
1707
1708
  return CommentColumn;
1708
1709
  }(BaseColumn));
1709
1710
 
1711
+ var OtherColumn = /** @class */ (function (_super) {
1712
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(OtherColumn, _super);
1713
+ function OtherColumn() {
1714
+ return _super !== null && _super.apply(this, arguments) || this;
1715
+ }
1716
+ OtherColumn.prototype.getDisplayName = function () {
1717
+ return this.question.otherText;
1718
+ };
1719
+ return OtherColumn;
1720
+ }(CommentColumn));
1721
+
1710
1722
  var MatrixColumn = /** @class */ (function (_super) {
1711
1723
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(MatrixColumn, _super);
1712
1724
  function MatrixColumn(question, row, table) {