survey-react-ui 1.9.80 → 1.9.82

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,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-react-ui",
3
- "version": "1.9.80",
3
+ "version": "1.9.82",
4
4
  "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
5
5
  "keywords": [
6
6
  "Survey",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "typings": "survey-react-ui.d.ts",
23
23
  "dependencies": {
24
- "survey-core": "1.9.80",
24
+ "survey-core": "1.9.82",
25
25
  "react": "^16.5.0 || ^17.0.1 || ^18.1.0",
26
26
  "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0"
27
27
  }
@@ -983,8 +983,8 @@ declare module "react/reactquestion_matrixdropdownbase" {
983
983
  renderHeader(): JSX.Element | null;
984
984
  renderFooter(): JSX.Element | null;
985
985
  renderRows(): JSX.Element;
986
- renderRow(keyValue: any, row: QuestionMatrixDropdownRenderedRow, cssClasses: any): JSX.Element;
987
- renderCell(cell: QuestionMatrixDropdownRenderedCell, index: number, cssClasses: any): JSX.Element;
986
+ renderRow(keyValue: any, row: QuestionMatrixDropdownRenderedRow, cssClasses: any, reason?: string): JSX.Element;
987
+ renderCell(cell: QuestionMatrixDropdownRenderedCell, index: number, cssClasses: any, reason?: string): JSX.Element;
988
988
  private renderCellContent;
989
989
  }
990
990
  export class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndErrorsCell {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.80
2
+ * surveyjs - Survey JavaScript library v1.9.82
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
  */
@@ -1189,7 +1189,7 @@ __webpack_require__.r(__webpack_exports__);
1189
1189
 
1190
1190
 
1191
1191
 
1192
- Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.80", "survey-react-ui");
1192
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.82", "survey-react-ui");
1193
1193
 
1194
1194
 
1195
1195
  /***/ }),
@@ -3902,7 +3902,7 @@ var TitleElement = /** @class */ (function (_super) {
3902
3902
  };
3903
3903
  }
3904
3904
  var CustomTag = element.titleTagName;
3905
- return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CustomTag, { className: element.cssTitle, id: element.ariaTitleId, "aria-label": ariaLabel, tabIndex: element.titleTabIndex, "aria-expanded": element.titleAriaExpanded, role: "button", onClick: onClick, onKeyUp: onKeyUp }, titleContent));
3905
+ return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CustomTag, { className: element.cssTitle, id: element.ariaTitleId, "aria-label": ariaLabel, tabIndex: element.titleTabIndex, "aria-expanded": element.titleAriaExpanded, role: element.titleAriaRole, onClick: onClick, onKeyUp: onKeyUp }, titleContent));
3906
3906
  };
3907
3907
  return TitleElement;
3908
3908
  }(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component));
@@ -4375,8 +4375,9 @@ __webpack_require__.r(__webpack_exports__);
4375
4375
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyElementHeader", function() { return SurveyElementHeader; });
4376
4376
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
4377
4377
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
4378
- /* harmony import */ var _components_title_title_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/title/title-element */ "./src/react/components/title/title-element.tsx");
4379
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
4378
+ /* harmony import */ var _components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/action-bar/action-bar */ "./src/react/components/action-bar/action-bar.tsx");
4379
+ /* harmony import */ var _components_title_title_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/title/title-element */ "./src/react/components/title/title-element.tsx");
4380
+ /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
4380
4381
  var __extends = (undefined && undefined.__extends) || (function () {
4381
4382
  var extendStatics = function (d, b) {
4382
4383
  extendStatics = Object.setPrototypeOf ||
@@ -4395,6 +4396,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
4395
4396
 
4396
4397
 
4397
4398
 
4399
+
4398
4400
  var SurveyElementHeader = /** @class */ (function (_super) {
4399
4401
  __extends(SurveyElementHeader, _super);
4400
4402
  function SurveyElementHeader() {
@@ -4409,13 +4411,15 @@ var SurveyElementHeader = /** @class */ (function (_super) {
4409
4411
  });
4410
4412
  SurveyElementHeader.prototype.render = function () {
4411
4413
  var element = this.element;
4412
- var title = element.hasTitle ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_title_title_element__WEBPACK_IMPORTED_MODULE_1__["TitleElement"], { element: element })) : null;
4414
+ var title = element.hasTitle ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_title_title_element__WEBPACK_IMPORTED_MODULE_2__["TitleElement"], { element: element })) : null;
4413
4415
  var description = element.hasDescriptionUnderTitle
4414
- ? _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"].renderQuestionDescription(this.element)
4416
+ ? _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"].renderQuestionDescription(this.element)
4415
4417
  : null;
4418
+ var additionalTitleToolbarElement = !!element.additionalTitleToolbar ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_1__["SurveyActionBar"], { model: element.additionalTitleToolbar }) : null;
4416
4419
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: element.cssHeader, onClick: element.clickTitleFunction },
4417
4420
  title,
4418
- description));
4421
+ description,
4422
+ additionalTitleToolbarElement));
4419
4423
  };
4420
4424
  return SurveyElementHeader;
4421
4425
  }(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component));
@@ -5551,8 +5555,14 @@ var Survey = /** @class */ (function (_super) {
5551
5555
  }
5552
5556
  var rootCss = this.survey.getRootCss();
5553
5557
  var cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
5554
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses },
5555
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("form", { onSubmit: onSubmit },
5558
+ var rootStyle = {
5559
+ backgroundImage: this.survey.renderBackgroundImage
5560
+ };
5561
+ var formStyle = {
5562
+ backgroundColor: this.survey.renderBackgroundOpacity
5563
+ };
5564
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: rootStyle },
5565
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("form", { onSubmit: onSubmit, style: formStyle },
5556
5566
  customHeader,
5557
5567
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.container },
5558
5568
  header,
@@ -5692,9 +5702,7 @@ var Survey = /** @class */ (function (_super) {
5692
5702
  };
5693
5703
  //ISurveyCreator
5694
5704
  Survey.prototype.createQuestionElement = function (question) {
5695
- return _reactquestion_factory__WEBPACK_IMPORTED_MODULE_6__["ReactQuestionFactory"].Instance.createQuestion(!question.isDefaultRendering || question.isDefaultRendering()
5696
- ? question.getTemplate()
5697
- : question.getComponentName(), {
5705
+ return _reactquestion_factory__WEBPACK_IMPORTED_MODULE_6__["ReactQuestionFactory"].Instance.createQuestion(question.isDefaultRendering() ? question.getTemplate() : question.getComponentName(), {
5698
5706
  question: question,
5699
5707
  isDisplayMode: question.isInputReadOnly,
5700
5708
  creator: this,
@@ -6058,7 +6066,8 @@ var SurveyProgressToc = /** @class */ (function (_super) {
6058
6066
  }
6059
6067
  SurveyProgressToc.prototype.render = function () {
6060
6068
  var listModel = Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["createTOCListModel"])(this.props.model);
6061
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.props.containerCss || "sv_progress-toc" },
6069
+ var rootCss = Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["getTocRootCss"])(this.props.model);
6070
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: rootCss },
6062
6071
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_list_list__WEBPACK_IMPORTED_MODULE_4__["List"], { model: listModel })));
6063
6072
  };
6064
6073
  return SurveyProgressToc;
@@ -6470,7 +6479,7 @@ var SurveyQuestionAndErrorsCell = /** @class */ (function (_super) {
6470
6479
  var survey = this.question.survey;
6471
6480
  var wrapper = null;
6472
6481
  if (survey) {
6473
- wrapper = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_2__["ReactSurveyElementsWrapper"].wrapMatrixCell(survey, element, cell);
6482
+ wrapper = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_2__["ReactSurveyElementsWrapper"].wrapMatrixCell(survey, element, cell, this.props.reason);
6474
6483
  }
6475
6484
  return wrapper !== null && wrapper !== void 0 ? wrapper : element;
6476
6485
  };
@@ -8275,7 +8284,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
8275
8284
  var table = this.question.renderedTable;
8276
8285
  if (!table.showFooter)
8277
8286
  return null;
8278
- var row = this.renderRow("footer", table.footerRow, this.question.cssClasses);
8287
+ var row = this.renderRow("footer", table.footerRow, this.question.cssClasses, "row-footer");
8279
8288
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tfoot", null, row);
8280
8289
  };
8281
8290
  SurveyQuestionMatrixDropdownBase.prototype.renderRows = function () {
@@ -8287,23 +8296,26 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
8287
8296
  }
8288
8297
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tbody", null, rows);
8289
8298
  };
8290
- SurveyQuestionMatrixDropdownBase.prototype.renderRow = function (keyValue, row, cssClasses) {
8299
+ SurveyQuestionMatrixDropdownBase.prototype.renderRow = function (keyValue, row, cssClasses, reason) {
8291
8300
  var matrixrow = [];
8292
8301
  var cells = row.cells;
8293
8302
  for (var i = 0; i < cells.length; i++) {
8294
- matrixrow.push(this.renderCell(cells[i], i, cssClasses));
8303
+ matrixrow.push(this.renderCell(cells[i], i, cssClasses, reason));
8295
8304
  }
8296
8305
  var key = "row" + keyValue;
8297
8306
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], { key: key },
8298
8307
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_matrix_row__WEBPACK_IMPORTED_MODULE_7__["MatrixRow"], { model: row, parentMatrix: this.question }, matrixrow)));
8299
8308
  };
8300
- SurveyQuestionMatrixDropdownBase.prototype.renderCell = function (cell, index, cssClasses) {
8309
+ SurveyQuestionMatrixDropdownBase.prototype.renderCell = function (cell, index, cssClasses, reason) {
8301
8310
  var key = "cell" + index;
8302
8311
  if (cell.hasQuestion) {
8303
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixDropdownCell, { key: key, cssClasses: cssClasses, cell: cell, creator: this.creator }));
8312
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixDropdownCell, { key: key, cssClasses: cssClasses, cell: cell, creator: this.creator, reason: reason }));
8313
+ }
8314
+ var calcReason = reason;
8315
+ if (!calcReason) {
8316
+ calcReason = cell.hasTitle ? "row-header" : "";
8304
8317
  }
8305
- var reason = cell.hasTitle ? "row-header" : "";
8306
- var cellContent = this.renderCellContent(cell, reason, cssClasses);
8318
+ var cellContent = this.renderCellContent(cell, calcReason, cssClasses);
8307
8319
  var cellStyle = null;
8308
8320
  if (!!cell.width || !!cell.minWidth) {
8309
8321
  cellStyle = {};
@@ -8923,10 +8935,10 @@ var SurveyQuestionPanelDynamic = /** @class */ (function (_super) {
8923
8935
  SurveyQuestionPanelDynamic.prototype.renderNavigatorV2 = function () {
8924
8936
  if (this.question.panelCount === 0 || this.question["showLegacyNavigation"])
8925
8937
  return null;
8926
- var range = this.question.isRangeShowing && !this.question.isProgressTopShowing ? this.renderRange() : null;
8927
8938
  if (!this.question.cssClasses.footer) {
8928
8939
  return null;
8929
8940
  }
8941
+ var range = this.question.isRangeShowing && this.question.isProgressBottomShowing ? this.renderRange() : null;
8930
8942
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.footer },
8931
8943
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("hr", { className: this.question.cssClasses.separator }),
8932
8944
  range,
@@ -10437,6 +10449,10 @@ var SurveyQuestionTagboxItem = /** @class */ (function (_super) {
10437
10449
  "use strict";
10438
10450
  __webpack_require__.r(__webpack_exports__);
10439
10451
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; });
10452
+ var columnWidthsByType = {
10453
+ "file": { minWidth: "240px" },
10454
+ "comment": { minWidth: "200px" }
10455
+ };
10440
10456
  /**
10441
10457
  * Global settings that apply to all surveys on the page. To specify one of the settings, use the code below:
10442
10458
  *
@@ -10447,6 +10463,16 @@ __webpack_require__.r(__webpack_exports__);
10447
10463
  * ```
10448
10464
  */
10449
10465
  var settings = {
10466
+ /**
10467
+ * Specifies an action to perform when users press the Enter key within a survey.
10468
+ *
10469
+ * Possible values:
10470
+ *
10471
+ * - `"moveToNextEditor"` - Moves focus to the next editor.
10472
+ * - `"loseFocus"` - Removes focus from the current editor.
10473
+ * - `"default"` - Behaves as a standard `<input>` element.
10474
+ */
10475
+ enterKeyAction: "default",
10450
10476
  /**
10451
10477
  * An object that configures string comparison.
10452
10478
  *
@@ -10883,6 +10909,18 @@ var settings = {
10883
10909
  "email",
10884
10910
  "impp",
10885
10911
  ]
10912
+ },
10913
+ /**
10914
+ * Contains properties that apply to [Single-Choice](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model), [Multiple-Choice](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list), and [Dynamic Matrix](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model) questions.
10915
+ *
10916
+ * Nested properties:
10917
+ *
10918
+ * - `columnWidthsByType`: `Object`\
10919
+ * An object that specifies fixed and minimum column width based on the column type.\
10920
+ * Example: `settings.matrix.columnWidthsByType = { "tagbox": { minWidth: "240px", width: "300px" } }`
10921
+ */
10922
+ matrix: {
10923
+ columnWidthsByType: columnWidthsByType
10886
10924
  }
10887
10925
  };
10888
10926