survey-react-ui 1.9.92 → 1.9.94

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.92
2
+ * surveyjs - Survey JavaScript library v1.9.94
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
  */
@@ -690,7 +690,7 @@ __webpack_require__.r(__webpack_exports__);
690
690
 
691
691
 
692
692
 
693
- Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.92", "survey-react-ui");
693
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.94", "survey-react-ui");
694
694
 
695
695
 
696
696
  /***/ }),
@@ -1002,11 +1002,11 @@ var SurveyActionBarItemDropdown = /** @class */ (function (_super) {
1002
1002
  _this.viewModel = new survey_core__WEBPACK_IMPORTED_MODULE_1__["ActionDropdownViewModel"](_this.item);
1003
1003
  return _this;
1004
1004
  }
1005
- SurveyActionBarItemDropdown.prototype.renderButtonContent = function () {
1006
- var buttonContent = _super.prototype.renderButtonContent.call(this);
1005
+ SurveyActionBarItemDropdown.prototype.renderInnerButton = function () {
1006
+ var button = _super.prototype.renderInnerButton.call(this);
1007
1007
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null,
1008
- buttonContent,
1009
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_popup_popup__WEBPACK_IMPORTED_MODULE_3__["Popup"], { model: this.item.popupModel })));
1008
+ button,
1009
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_popup_popup__WEBPACK_IMPORTED_MODULE_3__["Popup"], { model: this.item.popupModel, getTarget: survey_core__WEBPACK_IMPORTED_MODULE_1__["getActionDropdownButtonTarget"] })));
1010
1010
  };
1011
1011
  SurveyActionBarItemDropdown.prototype.componentWillUnmount = function () {
1012
1012
  _super.prototype.componentWillUnmount.call(this);
@@ -1655,7 +1655,7 @@ var List = /** @class */ (function (_super) {
1655
1655
  return null;
1656
1656
  var items = this.renderItems();
1657
1657
  var ulStyle = { display: this.model.isEmpty ? "none" : null };
1658
- return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("ul", { className: this.model.cssClasses.itemsContainer, style: ulStyle, role: "listbox", id: this.model.elementId, onMouseDown: function (e) {
1658
+ return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("ul", { className: this.model.getListClass(), style: ulStyle, role: "listbox", id: this.model.elementId, onMouseDown: function (e) {
1659
1659
  e.preventDefault();
1660
1660
  }, onKeyDown: this.handleKeydown, onMouseMove: this.handleMouseMove }, items));
1661
1661
  };
@@ -2435,30 +2435,19 @@ var Popup = /** @class */ (function (_super) {
2435
2435
  };
2436
2436
  Popup.prototype.createModel = function () {
2437
2437
  this.popup = Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["createPopupViewModel"])(this.props.model, undefined);
2438
- this.popup.initializePopupContainer();
2439
2438
  };
2440
2439
  Popup.prototype.setTargetElement = function () {
2441
- if (!!this.containerRef.current && !this.popup.isModal) {
2442
- var popupDropdownModel = this.popup;
2443
- if (!popupDropdownModel)
2444
- return;
2445
- if (!!this.containerRef.current.parentElement) {
2446
- popupDropdownModel.targetElement = this.containerRef.current.parentElement;
2447
- }
2448
- }
2440
+ var container = this.containerRef.current;
2441
+ this.popup.setComponentElement(container, this.props.getTarget ? this.props.getTarget(container) : undefined);
2449
2442
  };
2450
2443
  Popup.prototype.componentDidMount = function () {
2451
2444
  _super.prototype.componentDidMount.call(this);
2452
- this.popup.initializePopupContainer();
2453
2445
  this.setTargetElement();
2454
2446
  };
2455
2447
  Popup.prototype.componentDidUpdate = function (prevProps, prevState) {
2456
2448
  _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
2457
2449
  this.setTargetElement();
2458
2450
  };
2459
- Popup.prototype.componentWillUnmount = function () {
2460
- this.popup.unmountPopupContainer();
2461
- };
2462
2451
  Popup.prototype.shouldComponentUpdate = function (nextProps, nextState) {
2463
2452
  var _a;
2464
2453
  if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
@@ -2474,10 +2463,10 @@ var Popup = /** @class */ (function (_super) {
2474
2463
  this.popup.model = this.model;
2475
2464
  var popupContainer;
2476
2465
  if (this.model.isModal) {
2477
- popupContainer = react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.createPortal(react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(PopupContainer, { model: this.popup }), this.popup.container);
2466
+ popupContainer = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(PopupContainer, { model: this.popup });
2478
2467
  }
2479
2468
  else {
2480
- popupContainer = react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.createPortal(react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(PopupDropdownContainer, { model: this.popup }), this.popup.container);
2469
+ popupContainer = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(PopupDropdownContainer, { model: this.popup });
2481
2470
  }
2482
2471
  return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("div", { ref: this.containerRef }, popupContainer);
2483
2472
  };
@@ -2562,8 +2551,7 @@ var PopupContainer = /** @class */ (function (_super) {
2562
2551
  .toString();
2563
2552
  var style = { display: this.model.isVisible ? "" : "none", };
2564
2553
  return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("div", { tabIndex: -1, className: className, style: style, onClick: function (e) {
2565
- _this.model.clickOutside();
2566
- e.stopPropagation();
2554
+ _this.model.clickOutside(e);
2567
2555
  }, onKeyDown: this.handleKeydown }, container));
2568
2556
  };
2569
2557
  return PopupContainer;
@@ -2592,14 +2580,12 @@ function showModal(componentName, data, onApply, onCancel, cssClass, title, disp
2592
2580
  var options = Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["createDialogOptions"])(componentName, data, onApply, onCancel, undefined, undefined, cssClass, title, displayMode);
2593
2581
  return showDialog(options);
2594
2582
  }
2595
- function showDialog(dialogOptions) {
2583
+ function showDialog(dialogOptions, container) {
2596
2584
  dialogOptions.onHide = function () {
2597
- {
2598
- react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.unmountComponentAtNode(popupViewModel.container);
2599
- popupViewModel.unmountPopupContainer();
2600
- }
2585
+ react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.unmountComponentAtNode(popupViewModel.container);
2586
+ popupViewModel.dispose();
2601
2587
  };
2602
- var popupViewModel = Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["createPopupModalViewModel"])(dialogOptions);
2588
+ var popupViewModel = Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["createPopupModalViewModel"])(dialogOptions, container);
2603
2589
  react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.render(react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(PopupContainer, { model: popupViewModel }), popupViewModel.container);
2604
2590
  popupViewModel.model.isVisible = true;
2605
2591
  return popupViewModel;
@@ -2622,8 +2608,8 @@ __webpack_require__.r(__webpack_exports__);
2622
2608
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2623
2609
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2624
2610
  /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../element-factory */ "./src/react/element-factory.tsx");
2625
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../reactquestion_element */ "./src/react/reactquestion_element.tsx");
2626
- /* harmony import */ var _svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
2611
+ /* harmony import */ var _svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
2612
+ /* harmony import */ var _rating_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rating-item */ "./src/react/components/rating/rating-item.tsx");
2627
2613
  var __extends = (undefined && undefined.__extends) || (function () {
2628
2614
  var extendStatics = function (d, b) {
2629
2615
  extendStatics = Object.setPrototypeOf ||
@@ -2648,38 +2634,14 @@ var RatingItemSmiley = /** @class */ (function (_super) {
2648
2634
  function RatingItemSmiley() {
2649
2635
  return _super !== null && _super.apply(this, arguments) || this;
2650
2636
  }
2651
- Object.defineProperty(RatingItemSmiley.prototype, "question", {
2652
- get: function () {
2653
- return this.props.question;
2654
- },
2655
- enumerable: false,
2656
- configurable: true
2657
- });
2658
- Object.defineProperty(RatingItemSmiley.prototype, "item", {
2659
- get: function () {
2660
- return this.props.item;
2661
- },
2662
- enumerable: false,
2663
- configurable: true
2664
- });
2665
- Object.defineProperty(RatingItemSmiley.prototype, "index", {
2666
- get: function () {
2667
- return this.props.index;
2668
- },
2669
- enumerable: false,
2670
- configurable: true
2671
- });
2672
- RatingItemSmiley.prototype.getStateElement = function () {
2673
- return this.item;
2674
- };
2675
2637
  RatingItemSmiley.prototype.render = function () {
2676
2638
  var _this = this;
2677
- return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { style: this.question.getItemStyle(this.item.itemValue, this.item.highlight), className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); } },
2639
+ return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, style: this.question.getItemStyle(this.item.itemValue, this.item.highlight), className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); } },
2678
2640
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
2679
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { size: "auto", iconName: this.question.getItemSmileyIconName(this.item.itemValue), title: this.item.text })));
2641
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { size: "auto", iconName: this.question.getItemSmileyIconName(this.item.itemValue), title: this.item.text })));
2680
2642
  };
2681
2643
  return RatingItemSmiley;
2682
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"]));
2644
+ }(_rating_item__WEBPACK_IMPORTED_MODULE_3__["RatingItemBase"]));
2683
2645
 
2684
2646
  _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.registerElement("sv-rating-item-smiley", function (props) {
2685
2647
  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(RatingItemSmiley, props);
@@ -2701,8 +2663,8 @@ __webpack_require__.r(__webpack_exports__);
2701
2663
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2702
2664
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2703
2665
  /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../element-factory */ "./src/react/element-factory.tsx");
2704
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../reactquestion_element */ "./src/react/reactquestion_element.tsx");
2705
- /* harmony import */ var _svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
2666
+ /* harmony import */ var _svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
2667
+ /* harmony import */ var _rating_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rating-item */ "./src/react/components/rating/rating-item.tsx");
2706
2668
  var __extends = (undefined && undefined.__extends) || (function () {
2707
2669
  var extendStatics = function (d, b) {
2708
2670
  extendStatics = Object.setPrototypeOf ||
@@ -2727,39 +2689,15 @@ var RatingItemStar = /** @class */ (function (_super) {
2727
2689
  function RatingItemStar() {
2728
2690
  return _super !== null && _super.apply(this, arguments) || this;
2729
2691
  }
2730
- Object.defineProperty(RatingItemStar.prototype, "question", {
2731
- get: function () {
2732
- return this.props.question;
2733
- },
2734
- enumerable: false,
2735
- configurable: true
2736
- });
2737
- Object.defineProperty(RatingItemStar.prototype, "item", {
2738
- get: function () {
2739
- return this.props.item;
2740
- },
2741
- enumerable: false,
2742
- configurable: true
2743
- });
2744
- Object.defineProperty(RatingItemStar.prototype, "index", {
2745
- get: function () {
2746
- return this.props.index;
2747
- },
2748
- enumerable: false,
2749
- configurable: true
2750
- });
2751
- RatingItemStar.prototype.getStateElement = function () {
2752
- return this.item;
2753
- };
2754
2692
  RatingItemStar.prototype.render = function () {
2755
2693
  var _this = this;
2756
- return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); } },
2694
+ return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); } },
2757
2695
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
2758
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon, title: this.item.text }),
2759
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt, title: this.item.text })));
2696
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon, title: this.item.text }),
2697
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt, title: this.item.text })));
2760
2698
  };
2761
2699
  return RatingItemStar;
2762
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"]));
2700
+ }(_rating_item__WEBPACK_IMPORTED_MODULE_3__["RatingItemBase"]));
2763
2701
 
2764
2702
  _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.registerElement("sv-rating-item-star", function (props) {
2765
2703
  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(RatingItemStar, props);
@@ -2772,11 +2710,12 @@ _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.re
2772
2710
  /*!*****************************************************!*\
2773
2711
  !*** ./src/react/components/rating/rating-item.tsx ***!
2774
2712
  \*****************************************************/
2775
- /*! exports provided: RatingItem */
2713
+ /*! exports provided: RatingItemBase, RatingItem */
2776
2714
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2777
2715
 
2778
2716
  "use strict";
2779
2717
  __webpack_require__.r(__webpack_exports__);
2718
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RatingItemBase", function() { return RatingItemBase; });
2780
2719
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RatingItem", function() { return RatingItem; });
2781
2720
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2782
2721
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
@@ -2800,38 +2739,51 @@ var __extends = (undefined && undefined.__extends) || (function () {
2800
2739
 
2801
2740
 
2802
2741
 
2803
- var RatingItem = /** @class */ (function (_super) {
2804
- __extends(RatingItem, _super);
2805
- function RatingItem() {
2806
- return _super !== null && _super.apply(this, arguments) || this;
2742
+ var RatingItemBase = /** @class */ (function (_super) {
2743
+ __extends(RatingItemBase, _super);
2744
+ function RatingItemBase(props) {
2745
+ var _this = _super.call(this, props) || this;
2746
+ _this.handleOnMouseDown = _this.handleOnMouseDown.bind(_this);
2747
+ return _this;
2807
2748
  }
2808
- Object.defineProperty(RatingItem.prototype, "question", {
2749
+ Object.defineProperty(RatingItemBase.prototype, "question", {
2809
2750
  get: function () {
2810
2751
  return this.props.question;
2811
2752
  },
2812
2753
  enumerable: false,
2813
2754
  configurable: true
2814
2755
  });
2815
- Object.defineProperty(RatingItem.prototype, "item", {
2756
+ Object.defineProperty(RatingItemBase.prototype, "item", {
2816
2757
  get: function () {
2817
2758
  return this.props.item;
2818
2759
  },
2819
2760
  enumerable: false,
2820
2761
  configurable: true
2821
2762
  });
2822
- Object.defineProperty(RatingItem.prototype, "index", {
2763
+ Object.defineProperty(RatingItemBase.prototype, "index", {
2823
2764
  get: function () {
2824
2765
  return this.props.index;
2825
2766
  },
2826
2767
  enumerable: false,
2827
2768
  configurable: true
2828
2769
  });
2829
- RatingItem.prototype.getStateElement = function () {
2770
+ RatingItemBase.prototype.getStateElement = function () {
2830
2771
  return this.item;
2831
2772
  };
2773
+ RatingItemBase.prototype.handleOnMouseDown = function (event) {
2774
+ this.question.onMouseDown();
2775
+ };
2776
+ return RatingItemBase;
2777
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"]));
2778
+
2779
+ var RatingItem = /** @class */ (function (_super) {
2780
+ __extends(RatingItem, _super);
2781
+ function RatingItem() {
2782
+ return _super !== null && _super.apply(this, arguments) || this;
2783
+ }
2832
2784
  RatingItem.prototype.render = function () {
2833
2785
  var itemText = this.renderLocString(this.item.locText);
2834
- return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
2786
+ return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
2835
2787
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
2836
2788
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.itemText }, itemText)));
2837
2789
  };
@@ -2839,7 +2791,7 @@ var RatingItem = /** @class */ (function (_super) {
2839
2791
  _super.prototype.componentDidMount.call(this);
2840
2792
  };
2841
2793
  return RatingItem;
2842
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"]));
2794
+ }(RatingItemBase));
2843
2795
 
2844
2796
  _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.registerElement("sv-rating-item", function (props) {
2845
2797
  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(RatingItem, props);
@@ -7520,6 +7472,7 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
7520
7472
  function SurveyQuestionMatrixRow(props) {
7521
7473
  var _this = _super.call(this, props) || this;
7522
7474
  _this.handleOnChange = _this.handleOnChange.bind(_this);
7475
+ _this.handleOnMouseDown = _this.handleOnMouseDown.bind(_this);
7523
7476
  return _this;
7524
7477
  }
7525
7478
  Object.defineProperty(SurveyQuestionMatrixRow.prototype, "question", {
@@ -7540,6 +7493,9 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
7540
7493
  this.row.value = event.target.value;
7541
7494
  this.setState({ value: this.row.value });
7542
7495
  };
7496
+ SurveyQuestionMatrixRow.prototype.handleOnMouseDown = function (event) {
7497
+ this.question.onMouseDown();
7498
+ };
7543
7499
  SurveyQuestionMatrixRow.prototype.wrapCell = function (cell, element, reason) {
7544
7500
  if (!reason) {
7545
7501
  return element;
@@ -7590,7 +7546,7 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
7590
7546
  }
7591
7547
  else {
7592
7548
  td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, "data-responsive-title": column.locText.renderedHtml, className: this.question.cssClasses.cell },
7593
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: itemClass },
7549
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { onMouseDown: this.handleOnMouseDown, className: itemClass },
7594
7550
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: row.fullName, value: column.value, disabled: this.isDisplayMode, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": column.locText.renderedHtml, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
7595
7551
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
7596
7552
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
@@ -8679,6 +8635,7 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
8679
8635
  function SurveyQuestionRadioItem(props) {
8680
8636
  var _this = _super.call(this, props) || this;
8681
8637
  _this.handleOnChange = _this.handleOnChange.bind(_this);
8638
+ _this.handleOnMouseDown = _this.handleOnMouseDown.bind(_this);
8682
8639
  return _this;
8683
8640
  }
8684
8641
  SurveyQuestionRadioItem.prototype.getStateElement = function () {
@@ -8739,6 +8696,9 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
8739
8696
  SurveyQuestionRadioItem.prototype.handleOnChange = function (event) {
8740
8697
  this.question.clickItemHandler(this.item);
8741
8698
  };
8699
+ SurveyQuestionRadioItem.prototype.handleOnMouseDown = function (event) {
8700
+ this.question.onMouseDown();
8701
+ };
8742
8702
  SurveyQuestionRadioItem.prototype.canRender = function () {
8743
8703
  return !!this.question && !!this.item;
8744
8704
  };
@@ -8748,7 +8708,7 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
8748
8708
  var controlLabelClass = this.question.getControlLabelClass(this.item);
8749
8709
  var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: controlLabelClass }, this.renderLocString(this.item.locText, this.textStyle)) : null;
8750
8710
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
8751
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: labelClass, "aria-label": this.question.getAriaItemLabel(this.item) },
8711
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { onMouseDown: this.handleOnMouseDown, className: labelClass, "aria-label": this.question.getAriaItemLabel(this.item) },
8752
8712
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { "aria-describedby": this.question.ariaDescribedBy, className: this.cssClasses.itemControl, id: this.question.getItemId(this.item), type: "radio", name: this.question.questionName, checked: this.isChecked, value: this.item.value, disabled: !this.question.getItemEnabled(this.item), onChange: this.handleOnChange }),
8753
8713
  this.cssClasses.materialDecorator ?
8754
8714
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
@@ -8820,35 +8780,51 @@ var SurveyQuestionRanking = /** @class */ (function (_super) {
8820
8780
  });
8821
8781
  SurveyQuestionRanking.prototype.renderElement = function () {
8822
8782
  var _this = this;
8823
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.rootClass, ref: function (root) { return (_this.setControl(root)); } }, this.getItems()));
8824
- };
8825
- SurveyQuestionRanking.prototype.getItems = function () {
8783
+ if (!this.question.selectToRankEnabled) {
8784
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.rootClass, ref: function (root) { return (_this.setControl(root)); } }, this.getItems()));
8785
+ }
8786
+ else {
8787
+ var unrankedItem = true;
8788
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.rootClass, ref: function (root) { return (_this.setControl(root)); } },
8789
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getContainerClasses("from"), "data-ranking": "from-container" },
8790
+ this.getItems(this.question.unRankingChoices, unrankedItem),
8791
+ this.question.unRankingChoices.length === 0 ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containerPlaceholder },
8792
+ " ",
8793
+ this.question.selectToRankFromContainerPlaceholder,
8794
+ " ") : null),
8795
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containersDivider }),
8796
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getContainerClasses("to"), "data-ranking": "to-container" },
8797
+ this.getItems(),
8798
+ this.question.rankingChoices.length === 0 ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containerPlaceholder }, this.question.selectToRankToContainerPlaceholder) : null)));
8799
+ }
8800
+ };
8801
+ SurveyQuestionRanking.prototype.getItems = function (choices, unrankedItem) {
8826
8802
  var _this = this;
8803
+ if (choices === void 0) { choices = this.question.rankingChoices; }
8827
8804
  var items = [];
8828
- var rankingChoices = this.question.rankingChoices;
8829
8805
  var _loop_1 = function (i) {
8830
- var item = rankingChoices[i];
8806
+ var item = choices[i];
8831
8807
  items.push(this_1.renderItem(item, i, function (event) {
8832
8808
  _this.question.handleKeydown.call(_this.question, event, item);
8833
8809
  }, function (event) {
8834
8810
  event.persist();
8835
8811
  //event.preventDefault();
8836
8812
  _this.question.handlePointerDown.call(_this.question, event, item, event.currentTarget);
8837
- }, this_1.question.cssClasses, this_1.question.getItemClass(item), this_1.question));
8813
+ }, this_1.question.cssClasses, this_1.question.getItemClass(item), this_1.question, unrankedItem));
8838
8814
  };
8839
8815
  var this_1 = this;
8840
- for (var i = 0; i < rankingChoices.length; i++) {
8816
+ for (var i = 0; i < choices.length; i++) {
8841
8817
  _loop_1(i);
8842
8818
  }
8843
8819
  return items;
8844
8820
  };
8845
- SurveyQuestionRanking.prototype.renderItem = function (item, i, handleKeydown, handlePointerDown, cssClasses, itemClass, question) {
8821
+ SurveyQuestionRanking.prototype.renderItem = function (item, i, handleKeydown, handlePointerDown, cssClasses, itemClass, question, unrankedItem) {
8846
8822
  var key = item.value + "-" + i + "-item";
8847
8823
  var text = this.renderLocString(item.locText);
8848
8824
  var index = i;
8849
8825
  var indexText = this.question.getNumberByIndex(i);
8850
8826
  var tabIndex = this.question.getItemTabIndex(item);
8851
- var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionRankingItem, { key: key, text: text, index: index, indexText: indexText, itemTabIndex: tabIndex, handleKeydown: handleKeydown, handlePointerDown: handlePointerDown, cssClasses: cssClasses, itemClass: itemClass, question: question }));
8827
+ var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionRankingItem, { key: key, text: text, index: index, indexText: indexText, itemTabIndex: tabIndex, handleKeydown: handleKeydown, handlePointerDown: handlePointerDown, cssClasses: cssClasses, itemClass: itemClass, question: question, unrankedItem: unrankedItem, item: item }));
8852
8828
  var survey = this.question.survey;
8853
8829
  var wrappedItem = null;
8854
8830
  if (!!survey) {
@@ -8927,6 +8903,20 @@ var SurveyQuestionRankingItem = /** @class */ (function (_super) {
8927
8903
  enumerable: false,
8928
8904
  configurable: true
8929
8905
  });
8906
+ Object.defineProperty(SurveyQuestionRankingItem.prototype, "unrankedItem", {
8907
+ get: function () {
8908
+ return this.props.unrankedItem;
8909
+ },
8910
+ enumerable: false,
8911
+ configurable: true
8912
+ });
8913
+ Object.defineProperty(SurveyQuestionRankingItem.prototype, "item", {
8914
+ get: function () {
8915
+ return this.props.item;
8916
+ },
8917
+ enumerable: false,
8918
+ configurable: true
8919
+ });
8930
8920
  SurveyQuestionRankingItem.prototype.renderElement = function () {
8931
8921
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { tabIndex: this.itemTabIndex, className: this.itemClass, onKeyDown: this.handleKeydown, onPointerDown: this.handlePointerDown, "data-sv-drop-target-ranking-item": this.index },
8932
8922
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { tabIndex: -1, style: { outline: "none" } },
@@ -8938,7 +8928,7 @@ var SurveyQuestionRankingItem = /** @class */ (function (_super) {
8938
8928
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { width: "10", height: "24", viewBox: "0 0 10 24", className: this.question.getIconFocusCss(), xmlns: "http://www.w3.org/2000/svg" },
8939
8929
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M10 5L5 0L0 5H4V9H6V5H10Z" }),
8940
8930
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { d: "M6 19V15H4V19H0L5 24L10 19H6Z" }))),
8941
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getItemIndexClasses() }, this.indexText),
8931
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getItemIndexClasses(this.item) }, this.unrankedItem ? "" : this.indexText),
8942
8932
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.controlLabel }, this.text)))));
8943
8933
  };
8944
8934
  return SurveyQuestionRankingItem;
@@ -10014,254 +10004,438 @@ var columnWidthsByType = {
10014
10004
  */
10015
10005
  var settings = {
10016
10006
  /**
10017
- * Specifies an action to perform when users press the Enter key within a survey.
10007
+ * An object that configures survey appearance when the survey is being designed in Survey Creator.
10018
10008
  *
10019
- * Possible values:
10009
+ * Nested properties:
10020
10010
  *
10021
- * - `"moveToNextEditor"` - Moves focus to the next editor.
10022
- * - `"loseFocus"` - Removes focus from the current editor.
10023
- * - `"default"` - Behaves as a standard `<input>` element.
10011
+ * - `showEmptyDescriptions`: `Boolean`\
10012
+ * Specifies whether to display an empty description for pages and panels. Default value: `true`.
10013
+ *
10014
+ * - `showEmptyTitles`: `Boolean`\
10015
+ * Specifies whether to display an empty title for pages and panels. Default value: `true`.
10024
10016
  */
10025
- enterKeyAction: "default",
10017
+ designMode: {
10018
+ showEmptyDescriptions: true,
10019
+ showEmptyTitles: true
10020
+ },
10021
+ //#region designMode section, Obsolete properties
10026
10022
  /**
10027
- * An object that configures string comparison.
10023
+ * This property is obsolete. Use the [`settings.designMode.showEmptyDescriptions`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
10024
+ */
10025
+ get allowShowEmptyDescriptionInDesignMode() { return this.designMode.showEmptyDescriptions; },
10026
+ set allowShowEmptyDescriptionInDesignMode(val) { this.designMode.showEmptyDescriptions = val; },
10027
+ /**
10028
+ * This property is obsolete. Use the [`settings.designMode.showEmptyTitles`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
10029
+ */
10030
+ get allowShowEmptyTitleInDesignMode() { return this.designMode.showEmptyTitles; },
10031
+ set allowShowEmptyTitleInDesignMode(val) { this.designMode.showEmptyTitles = val; },
10032
+ //#endregion
10033
+ /**
10034
+ * An object that contains properties related to localization.
10028
10035
  *
10029
10036
  * Nested properties:
10030
10037
  *
10031
- * - `trimStrings`: `Boolean`\
10032
- * Specifies whether to remove whitespace from both ends of a string before the comparison. Default value: `true`.
10038
+ * - `useLocalTimeZone`: `Boolean`\
10039
+ * Disable this property if you want internal SurveyJS functions to use methods that work with UTC date and time (`setUTCDate()` `setUTCHours()`, etc.) instead of methods that work with local date and time (`setYear`, `setHours()`, etc.). Default value: `true`.
10033
10040
  *
10034
- * - `caseSensitive`: `Boolean`\
10035
- * Specifies whether to differentiate between capital and lower-case letters. Default value: `false`.
10041
+ * - `defaultLocaleName`: `String`\
10042
+ * A property key that stores a translation for the default locale. Default value: `"default"`.
10043
+ *
10044
+ * - `storeDuplicatedTranslations`: `Boolean`\
10045
+ * Specifies whether surveys should store translation strings that equal the translation strings in the default locale. Default value: `false`.
10036
10046
  */
10037
- comparator: {
10038
- trimStrings: true,
10039
- caseSensitive: false
10047
+ localization: {
10048
+ useLocalTimeZone: true,
10049
+ storeDuplicatedTranslations: false,
10050
+ defaultLocaleName: "default"
10040
10051
  },
10041
- expressionDisableConversionChar: "#",
10052
+ //#region localization section, obsolete properties
10042
10053
  /**
10043
- * Disable this property if you want internal SurveyJS functions to use methods that work with UTC date and time (`setUTCDate()` `setUTCHours()`, etc.) instead of methods that work with local date and time (`setYear`, `setHours()`, etc.).
10044
- *
10045
- * Default value: `true`
10054
+ * This property is obsolete. Use the [`settings.localization.useLocalTimeZone`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
10046
10055
  */
10047
- useLocalTimeZone: true,
10048
- get commentPrefix() { return settings.commentSuffix; },
10049
- set commentPrefix(val) { settings.commentSuffix = val; },
10056
+ get useLocalTimeZone() { return this.localization.useLocalTimeZone; },
10057
+ set useLocalTimeZone(val) { this.localization.useLocalTimeZone = val; },
10050
10058
  /**
10051
- * A suffix added to the name of the property that stores comments.
10052
- *
10053
- * Default value: "-Comment"
10054
- *
10055
- * You can specify this setting for an individual survey: [`commentSuffix`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#commentSuffix).
10059
+ * This property is obsolete. Use the [`settings.localization.storeDuplicatedTranslations`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
10056
10060
  */
10057
- commentSuffix: "-Comment",
10061
+ get storeDuplicatedTranslations() { return this.localization.storeDuplicatedTranslations; },
10062
+ set storeDuplicatedTranslations(val) { this.localization.storeDuplicatedTranslations = val; },
10058
10063
  /**
10059
- * Specifies whether to encode URL parameters when you access a web service.
10060
- *
10061
- * Default value: `true`
10064
+ * This property is obsolete. Use the [`settings.localization.defaultLocaleName`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
10062
10065
  */
10063
- webserviceEncodeParameters: true,
10066
+ get defaultLocaleName() { return this.localization.defaultLocaleName; },
10067
+ set defaultLocaleName(val) { this.localization.defaultLocaleName = val; },
10068
+ //#endregion
10064
10069
  /**
10065
- * Specifies whether to cache choices loaded from a web service.
10070
+ * An object with properties that configure surveys when they work with a web service.
10071
+ *
10072
+ * Nested properties:
10073
+ *
10074
+ * - `encodeUrlParams`: `Boolean`\
10075
+ * Specifies whether to encode URL parameters when you access a web service. Default value: `true`.
10076
+ *
10077
+ * - `cacheLoadedChoices`: `Boolean`\
10078
+ * Specifies whether to cache [choices](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#choicesByUrl) loaded from a web service. Default value: `true`.
10066
10079
  *
10067
- * Default value: `true`
10068
- * @see settings.disableOnGettingChoicesFromWeb
10080
+ * - `disableQuestionWhileLoadingChoices`: `Boolean`\
10081
+ * Disables a question while its choices are being loaded from a web service. Default value: `false`.
10082
+ *
10083
+ * - `surveyServiceUrl`: `String`\
10084
+ * The URL of the SurveyJS Service API endpoint.
10069
10085
  */
10070
- useCachingForChoicesRestful: true,
10071
- get useCachingForChoicesRestfull() {
10072
- return settings.useCachingForChoicesRestful;
10073
- },
10074
- set useCachingForChoicesRestfull(val) {
10075
- settings.useCachingForChoicesRestful = val;
10086
+ web: {
10087
+ encodeUrlParams: true,
10088
+ cacheLoadedChoices: true,
10089
+ disableQuestionWhileLoadingChoices: false,
10090
+ surveyServiceUrl: "https://api.surveyjs.io/public/v1/Survey"
10076
10091
  },
10092
+ //#region web section, obsolete properties
10077
10093
  /**
10078
- * The URL of the SurveyJS Service API endpoint.
10094
+ * This property is obsolete. Use the [`settings.web.encodeUrlParams`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
10079
10095
  */
10080
- surveyServiceUrl: "https://api.surveyjs.io/public/v1/Survey",
10096
+ get webserviceEncodeParameters() { return this.web.encodeUrlParams; },
10097
+ set webserviceEncodeParameters(val) { this.web.encodeUrlParams = val; },
10081
10098
  /**
10082
- * A separator used in a shorthand notation that specifies a value and display text for an [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) object: `"value|text"`.
10083
- *
10084
- * Default value: `"|"`
10099
+ * This property is obsolete. Use the [`settings.web.cacheLoadedChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
10085
10100
  */
10086
- itemValueSeparator: "|",
10101
+ get useCachingForChoicesRestful() { return this.web.cacheLoadedChoices; },
10102
+ set useCachingForChoicesRestful(val) { this.web.cacheLoadedChoices = val; },
10103
+ get useCachingForChoicesRestfull() { return this.web.cacheLoadedChoices; },
10104
+ set useCachingForChoicesRestfull(val) { this.web.cacheLoadedChoices = val; },
10087
10105
  /**
10088
- * Enable this property if you want to serialize [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) instances as objects even when they include only the `value` property.
10106
+ * This property is obsolete. Use the [`settings.web.disableQuestionWhileLoadingChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
10107
+ */
10108
+ get disableOnGettingChoicesFromWeb() { return this.web.disableQuestionWhileLoadingChoices; },
10109
+ set disableOnGettingChoicesFromWeb(val) { this.web.disableQuestionWhileLoadingChoices = val; },
10110
+ /**
10111
+ * This property is obsolete. Use the [`settings.web.surveyServiceUrl`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
10112
+ */
10113
+ get surveyServiceUrl() { return this.web.surveyServiceUrl; },
10114
+ set surveyServiceUrl(val) { this.web.surveyServiceUrl = val; },
10115
+ //#endregion
10116
+ /**
10117
+ * An object that contains properties related to [triggers](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers).
10089
10118
  *
10090
- * ```js
10091
- * import { ItemValue, settings } from "survey-core";
10119
+ * Nested properties:
10092
10120
  *
10093
- * settings.itemValueAlwaysSerializeAsObject = true;
10094
- * const item = new ItemValue(5);
10095
- * const itemString = item.toJSON(); // Produces { value: 5 } instead of 5
10096
- * ```
10121
+ * - `changeNavigationButtonsOnComplete`: `Boolean`\
10122
+ * Specifies whether to re-evaluate an expression associated with the [Complete trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete) immediately when a question value changes. If the expression evaluates to `true`, the trigger is executed. Default value: `false`.\
10123
+ * Keep this property set to `false` if you want to re-evaluate the Complete trigger's expression only when the respondents navigate to another page.
10124
+ *
10125
+ * - `executeCompleteOnValueChanged`: `Boolean`\
10126
+ * Specifies whether to replace the Next button with the Complete button when the [Complete trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete) is going to be executed. Default value: `true`.
10097
10127
  *
10098
- * @see settings.serializeLocalizableStringAsObject
10128
+ * - `executeSkipOnValueChanged`: `Boolean`\
10129
+ * Specifies whether to re-evaluate an expression associated with the [Skip trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#skip) immediately when a question value changes. If the expression evaluates to `true`, the trigger is executed. Default value: `true`.\
10130
+ * Disable this property if you want to re-evaluate the Skip trigger's expression only when respondents navigate to another page.
10131
+ */
10132
+ triggers: {
10133
+ changeNavigationButtonsOnComplete: true,
10134
+ executeCompleteOnValueChanged: false,
10135
+ executeSkipOnValueChanged: true
10136
+ },
10137
+ //#region triggers section, Obsolete properties
10138
+ /**
10139
+ * This property is obsolete. Use the [`settings.triggers.executeCompleteOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
10140
+ */
10141
+ get executeCompleteTriggerOnValueChanged() { return this.triggers.executeCompleteOnValueChanged; },
10142
+ set executeCompleteTriggerOnValueChanged(val) { this.triggers.executeCompleteOnValueChanged = val; },
10143
+ /**
10144
+ * This property is obsolete. Use the [`settings.triggers.changeNavigationButtonsOnComplete`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
10145
+ */
10146
+ get changeNavigationButtonsOnCompleteTrigger() { return this.triggers.changeNavigationButtonsOnComplete; },
10147
+ set changeNavigationButtonsOnCompleteTrigger(val) { this.triggers.changeNavigationButtonsOnComplete = val; },
10148
+ /**
10149
+ * This property is obsolete. Use the [`settings.triggers.executeSkipOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
10099
10150
  */
10100
- itemValueAlwaysSerializeAsObject: false,
10151
+ get executeSkipTriggerOnValueChanged() { return this.triggers.executeSkipOnValueChanged; },
10152
+ set executeSkipTriggerOnValueChanged(val) { this.triggers.executeSkipOnValueChanged = val; },
10153
+ //#endregion
10101
10154
  /**
10102
- * Enable this property if you want to serialize the `text` property of [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) objects even when it is empty or equal to the `value` property.
10155
+ * An object that contains properties related to JSON serialization.
10156
+ *
10157
+ * Nested properties:
10158
+ *
10159
+ * - `itemValueSerializeAsObject`: `Boolean`\
10160
+ * Enable this property if you want to serialize [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) instances as objects even when they include only the `value` property. Default value: `false`. View an example below.
10161
+ *
10162
+ * - `itemValueSerializeDisplayText`: `Boolean`\
10163
+ * Enable this property if you want to serialize the `text` property of [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) objects even when it is empty or equal to the `value` property. Default value: `false`. View an example below.
10164
+ *
10165
+ * - `localizableStringSerializeAsObject`: `Boolean`\
10166
+ * Enable this property if you want to serialize [`LocalizableString`](https://surveyjs.io/form-library/documentation/api-reference/localizablestring) instances as objects even when they include only a translation string for the default locale. For example, `"Custom String"` will be serialized as `{ default: "Custom String" }`. Default value: `false`.
10103
10167
  *
10104
10168
  * ```js
10105
10169
  * import { ItemValue, settings } from "survey-core";
10106
10170
  *
10107
- * settings.itemValueAlwaysSerializeText = true;
10171
+ * // `itemValueSerializeAsObject` example
10172
+ * settings.localization.itemValueSerializeAsObject = true;
10173
+ * const item = new ItemValue(5);
10174
+ * const itemString = item.toJSON(); // Produces { value: 5 } instead of 5
10175
+ *
10176
+ * // `itemValueSerializeDisplayText` example
10177
+ * settings.localization.itemValueSerializeDisplayText = true;
10108
10178
  * const item = new ItemValue("item1");
10109
10179
  * const itemString = item.toJSON(); // Produces { value: "item1", text: "item1" } instead of "item1"
10110
10180
  * ```
10111
10181
  */
10112
- itemValueAlwaysSerializeText: false,
10182
+ serialization: {
10183
+ itemValueSerializeAsObject: false,
10184
+ itemValueSerializeDisplayText: false,
10185
+ localizableStringSerializeAsObject: false
10186
+ },
10187
+ //#region serialization section, Obsolete properties
10113
10188
  /**
10114
- * Specifies a property key that stores a translation for the default locale.
10115
- *
10116
- * Default value: `"default"`
10117
- * @see storeDuplicatedTranslations
10189
+ * This property is obsolete. Use the [`settings.serialization.itemValueSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
10118
10190
  */
10119
- defaultLocaleName: "default",
10191
+ get itemValueAlwaysSerializeAsObject() { return this.serialization.itemValueSerializeAsObject; },
10192
+ set itemValueAlwaysSerializeAsObject(val) { this.serialization.itemValueSerializeAsObject = val; },
10120
10193
  /**
10121
- * Specifies whether surveys should store translation strings that equal the translation string specified by the `"default"` key.
10122
- *
10123
- * Default value: `false`
10124
- * @see settings.defaultLocaleName
10194
+ * This property is obsolete. Use the [`settings.serialization.itemValueSerializeDisplayText`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
10125
10195
  */
10126
- storeDuplicatedTranslations: false,
10196
+ get itemValueAlwaysSerializeText() { return this.serialization.itemValueSerializeDisplayText; },
10197
+ set itemValueAlwaysSerializeText(val) { this.serialization.itemValueSerializeDisplayText = val; },
10127
10198
  /**
10128
- * Specifies a property key that stores an object with default cell values in [Single-Choice Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model) questions.
10129
- *
10130
- * Default value: "default"
10199
+ * This property is obsolete. Use the [`settings.serialization.localizableStringSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
10131
10200
  */
10132
- matrixDefaultRowName: "default",
10201
+ get serializeLocalizableStringAsObject() { return this.serialization.localizableStringSerializeAsObject; },
10202
+ set serializeLocalizableStringAsObject(val) { this.serialization.localizableStringSerializeAsObject = val; },
10203
+ //#endregion
10133
10204
  /**
10134
- * The default type of matrix cells in the [Multiple-Choice Matrix](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) question types.
10205
+ * An object that configures lazy rendering.
10135
10206
  *
10136
- * Default value: `"dropdown"`
10207
+ * Nested properties:
10137
10208
  *
10138
- * You can specify this setting for individual questions or matrix columns: [`cellType`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#cellType). Refer to the `cellType` property description for information on possible values.
10209
+ * - `enabled`: `Boolean`\
10210
+ * Specifies whether to add questions to the DOM only when they get into the viewport. Default value: `false`.
10211
+ *
10212
+ * > Lazy rendering is an experimental feature that may not work as expected in all use cases.
10139
10213
  */
10140
- matrixDefaultCellType: "dropdown",
10214
+ lazyRender: {
10215
+ enabled: false,
10216
+ firstBatchSize: 3
10217
+ },
10218
+ //#region lazyRender section, Obsolete properties
10141
10219
  /**
10142
- * A suffix added to the name of the property that stores total values. The resulting property name consists of the matrix name and the suffix.
10143
- *
10144
- * Default value: `"-total"`
10220
+ * This property is obsolete. Use the [`settings.lazyRender.enabled`](https://surveyjs.io/form-library/documentation/api-reference/settings#lazyRender) property instead.
10145
10221
  */
10146
- matrixTotalValuePostFix: "-total",
10222
+ get lazyRowsRendering() { return this.lazyRender.enabled; },
10223
+ set lazyRowsRendering(val) { this.lazyRender.enabled = val; },
10224
+ get lazyRowsRenderingStartRow() { return this.lazyRender.firstBatchSize; },
10225
+ set lazyRowsRenderingStartRow(val) { this.lazyRender.firstBatchSize = val; },
10226
+ //#endregion
10147
10227
  /**
10148
- * A maximum number of rows in a [Dynamic Matrix](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model).
10228
+ * An object with 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.
10149
10229
  *
10150
- * Default value: 1000
10230
+ * Nested properties:
10151
10231
  *
10152
- * You can specify this setting for an individual Dynamic Matrix: [`maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#maxRowCount).
10153
- */
10154
- matrixMaximumRowCount: 1000,
10155
- /**
10156
- * A maximum number of matrix rows included in the Condition drop-down menu in Survey Creator. This menu is used to configure conditional survey logic.
10232
+ * - `defaultRowName`: `String`\
10233
+ * A property key that stores an object with default cell values. Default value: "default".
10157
10234
  *
10158
- * Default value: 1
10235
+ * - `defaultCellType`: `String`\
10236
+ * The default type of matrix cells. Default value: `"dropdown"`.\
10237
+ * You can specify this setting for individual questions or matrix columns: [`cellType`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#cellType). Refer to the `cellType` property description for information on possible values.
10238
+ *
10239
+ * - `totalsSuffix`: `String`\
10240
+ * A suffix added to the name of the property that stores total values. The resulting property name consists of the matrix name and the suffix. Default value: `"-total"`.
10241
+ *
10242
+ * - `maxRowCount`: `Number`\
10243
+ * A maximum number of rows in a Dynamic Matrix. Default value: 1000.\
10244
+ * You can specify this setting for an individual Dynamic Matrix: [`maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#maxRowCount).
10159
10245
  *
10246
+ * - `maxRowCountInCondition`: `Number`\
10247
+ * A maximum number of matrix rows included in the Condition drop-down menu in Survey Creator. This menu is used to configure conditional survey logic. Default value: 1.\
10160
10248
  * If you set this property to 0, the Condition menu does not include any matrix rows. Users still can specify conditions that use matrix rows but only with Manual Entry.
10161
- */
10162
- matrixMaxRowCountInCondition: 1,
10163
- /**
10164
- * A maximum number of panels from [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model) included in the Condition drop-down menu in Survey Creator. This menu is used to configure conditional survey logic.
10165
10249
  *
10166
- * Default value: 1
10250
+ * - `renderRemoveAsIcon`: `Boolean`\
10251
+ * Disable this property if you want to render the Remove action in Dynamic Matrix as a button. Otherwise, the action is rendered as an icon. Default value: `true`.
10167
10252
  *
10168
- * If you set this property to 0, the Condition menu does not include any panel questions. Users still can specify conditions that use panel questions but only with Manual Entry.
10253
+ * - `columnWidthsByType`: `Object`\
10254
+ * An object that specifies fixed and minimum column width based on the column type.\
10255
+ * Example: `settings.matrix.columnWidthsByType = { "tagbox": { minWidth: "240px", width: "300px" } }`
10256
+ *
10257
+ * - `rateSize`: `"small"` (default) | `"normal"`\
10258
+ * Specifies the size of rate values. Applies to [Rating Scale](https://surveyjs.io/form-library/examples/rating-scale/) questions within matrixes.
10169
10259
  */
10170
- panelDynamicMaxPanelCountInCondition: 1,
10260
+ matrix: {
10261
+ defaultCellType: "dropdown",
10262
+ defaultRowName: "default",
10263
+ totalsSuffix: "-total",
10264
+ maxRowCount: 1000,
10265
+ maxRowCountInCondition: 1,
10266
+ renderRemoveAsIcon: true,
10267
+ columnWidthsByType: columnWidthsByType,
10268
+ rateSize: "small",
10269
+ },
10270
+ //#region matrix section, Obsolete properties
10171
10271
  /**
10172
- * Disable this property if you want to render the Remove action in Dynamic Matrix as a button. Otherwise, the action is rendered as an icon.
10173
- *
10174
- * Default value: `true`
10272
+ * This property is obsolete. Use the [`settings.matrix.defaultRowName`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
10273
+ */
10274
+ get matrixDefaultRowName() { return this.matrix.defaultRowName; },
10275
+ set matrixDefaultRowName(val) { this.matrix.defaultRowName = val; },
10276
+ /**
10277
+ * This property is obsolete. Use the [`settings.matrix.defaultCellType`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
10278
+ */
10279
+ get matrixDefaultCellType() { return this.matrix.defaultCellType; },
10280
+ set matrixDefaultCellType(val) { this.matrix.defaultCellType = val; },
10281
+ /**
10282
+ * This property is obsolete. Use the [`settings.matrix.totalsSuffix`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
10175
10283
  */
10176
- matrixRenderRemoveAsIcon: true,
10284
+ get matrixTotalValuePostFix() { return this.matrix.totalsSuffix; },
10285
+ set matrixTotalValuePostFix(val) { this.matrix.totalsSuffix = val; },
10177
10286
  /**
10178
- * A maximum number of panels in [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model).
10287
+ * This property is obsolete. Use the [`settings.matrix.maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
10288
+ */
10289
+ get matrixMaximumRowCount() { return this.matrix.maxRowCount; },
10290
+ set matrixMaximumRowCount(val) { this.matrix.maxRowCount = val; },
10291
+ /**
10292
+ * This property is obsolete. Use the [`settings.matrix.maxRowCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
10293
+ */
10294
+ get matrixMaxRowCountInCondition() { return this.matrix.maxRowCountInCondition; },
10295
+ set matrixMaxRowCountInCondition(val) { this.matrix.maxRowCountInCondition = val; },
10296
+ /**
10297
+ * This property is obsolete. Use the [`settings.matrix.renderRemoveAsIcon`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
10298
+ */
10299
+ get matrixRenderRemoveAsIcon() { return this.matrix.renderRemoveAsIcon; },
10300
+ set matrixRenderRemoveAsIcon(val) { this.matrix.renderRemoveAsIcon = val; },
10301
+ //#endregion
10302
+ /**
10303
+ * An object with properties that apply to [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model) questions.
10179
10304
  *
10180
- * Default value: 100
10305
+ * Nested properties:
10181
10306
  *
10307
+ * - `maxPanelCount`: `Number`\
10308
+ * A maximum number of panels in Dynamic Panel. Default value: 100.\
10182
10309
  * You can specify this setting for an individual Dynamic Panel: [`maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#maxPanelCount).
10310
+ *
10311
+ * - `maxPanelCountInCondition`: `Number`\
10312
+ * A maximum number of Dynamic Panel panels included in the Condition drop-down menu in Survey Creator. This menu is used to configure conditional survey logic. Default value: 1.\
10313
+ * If you set this property to 0, the Condition menu does not include any panel questions. Users still can specify conditions that use panel questions but only with Manual Entry.
10183
10314
  */
10184
- panelMaximumPanelCount: 100,
10315
+ panel: {
10316
+ maxPanelCount: 100,
10317
+ maxPanelCountInCondition: 1
10318
+ },
10319
+ //#region panel section, Obsolete properties
10185
10320
  /**
10186
- * A maximum number of rate values in a [Rating](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model) question.
10187
- *
10188
- * Default value: 20
10321
+ * This property is obsolete. Use the [`settings.panel.maxPanelCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
10189
10322
  */
10190
- ratingMaximumRateValueCount: 20,
10323
+ get panelDynamicMaxPanelCountInCondition() { return this.panel.maxPanelCountInCondition; },
10324
+ set panelDynamicMaxPanelCountInCondition(val) { this.panel.maxPanelCountInCondition = val; },
10191
10325
  /**
10192
- * Specifies whether to close the drop-down menu of a [TagBox](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/) question after a user selects a value.
10193
- *
10194
- * This setting applies to all TagBox questions on a page. You can use the [closeOnSelect](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model#closeOnSelect) property to specify the same setting for an individual TagBox question.
10326
+ * This property is obsolete. Use the [`settings.panel.maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
10195
10327
  */
10196
- tagboxCloseOnSelect: false,
10328
+ get panelMaximumPanelCount() { return this.panel.maxPanelCount; },
10329
+ set panelMaximumPanelCount(val) { this.panel.maxPanelCount = val; },
10330
+ //#endregion
10197
10331
  /**
10198
- * Disables the question while choices are being loaded from a web service.
10332
+ * An object with properties that configure questions in read-only mode.
10199
10333
  *
10200
- * Default value: `false`
10201
- * @see settings.useCachingForChoicesRestful
10334
+ * Nested properties:
10335
+ *
10336
+ * - `commentRenderMode`: `"textarea"` (default) | `"div"`\
10337
+ * Specifies how to render the input field of [Comment](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model) questions in [read-only](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#readOnly) mode: as a disabled `<textarea>` element or as a `<div>` element with a non-editable question value within it.
10338
+ *
10339
+ * - `textRenderMode`: `"input"` (default) | `"div"`\
10340
+ * Specifies how to render the input field of [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) questions in [read-only](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#readOnly) mode: as a disabled `<input>` element or as a `<div>` element with a non-editable question value within it.
10202
10341
  */
10203
- disableOnGettingChoicesFromWeb: false,
10342
+ readOnly: {
10343
+ commentRenderMode: "textarea",
10344
+ textRenderMode: "input"
10345
+ },
10346
+ //#region readOnly section, Obsolete properties
10204
10347
  /**
10205
- * Enable this property if you want to serialize [`LocalizableString`](https://surveyjs.io/form-library/documentation/api-reference/localizablestring) instances as objects even when they include only a translation string for the default locale. For example, `"Custom String"` will be serialized as `{ default: "Custom String" }`.
10206
- *
10207
- * Default value: `false`
10208
- * @see settings.itemValueAlwaysSerializeAsObject
10348
+ * This property is obsolete. Use the [`settings.readOnly.commentRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
10209
10349
  */
10210
- serializeLocalizableStringAsObject: false,
10350
+ get readOnlyCommentRenderMode() { return this.readOnly.commentRenderMode; },
10351
+ set readOnlyCommentRenderMode(val) { this.readOnly.commentRenderMode = val; },
10211
10352
  /**
10212
- * Specifies whether to display an empty title for pages and panels when they are being designed in Survey Creator.
10213
- *
10214
- * Default value: `true`
10353
+ * This property is obsolete. Use the [`settings.readOnly.textRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
10215
10354
  */
10216
- allowShowEmptyTitleInDesignMode: true,
10355
+ get readOnlyTextRenderMode() { return this.readOnly.textRenderMode; },
10356
+ set readOnlyTextRenderMode(val) { this.readOnly.textRenderMode = val; },
10357
+ //#endregion
10217
10358
  /**
10218
- * Specifies whether to display an empty description for pages and panels when they are being designed in Survey Creator.
10359
+ * An object with properties that configure question numbering.
10360
+ *
10361
+ * Nested properties:
10362
+ *
10363
+ * - `includeQuestionsWithHiddenNumber`: `Boolean`\
10364
+ * Specifies whether to number questions whose [`hideNumber`](https://surveyjs.io/form-library/documentation/api-reference/question#hideNumber) property is enabled. Default value: `false`.
10219
10365
  *
10220
- * Default value: `true`
10366
+ * - `includeQuestionsWithHiddenTitle`: `Boolean`\
10367
+ * Specifies whether to number questions whose [`titleLocation`](https://surveyjs.io/form-library/documentation/api-reference/question#titleLocation) property is set to `"hidden"`. Default value: `false`.
10221
10368
  */
10222
- allowShowEmptyDescriptionInDesignMode: true,
10369
+ numbering: {
10370
+ includeQuestionsWithHiddenNumber: false,
10371
+ includeQuestionsWithHiddenTitle: false
10372
+ },
10373
+ //#region numbering section, Obsolete properties
10374
+ /**
10375
+ * This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenTitle`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
10376
+ */
10377
+ get setQuestionVisibleIndexForHiddenTitle() { return this.numbering.includeQuestionsWithHiddenTitle; },
10378
+ set setQuestionVisibleIndexForHiddenTitle(val) { this.numbering.includeQuestionsWithHiddenTitle = val; },
10379
+ /**
10380
+ * This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenNumber`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
10381
+ */
10382
+ get setQuestionVisibleIndexForHiddenNumber() { return this.numbering.includeQuestionsWithHiddenNumber; },
10383
+ set setQuestionVisibleIndexForHiddenNumber(val) { this.numbering.includeQuestionsWithHiddenNumber = val; },
10384
+ //#endregion
10223
10385
  /**
10224
- * Specifies whether to re-evaluate an expression associated with the [Complete trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete) immediately when a question value changes. If the expression evaluates to `true`, the trigger is executed.
10386
+ * Specifies an action to perform when users press the Enter key within a survey.
10225
10387
  *
10226
- * Keep this property set to `false` if you want to re-evaluate the Complete trigger's expression only when the respondents navigate to another page.
10388
+ * Possible values:
10227
10389
  *
10228
- * Default value: `false`
10229
- * @see settings.changeNavigationButtonsOnCompleteTrigger
10390
+ * - `"moveToNextEditor"` - Moves focus to the next editor.
10391
+ * - `"loseFocus"` - Removes focus from the current editor.
10392
+ * - `"default"` - Behaves as a standard `<input>` element.
10230
10393
  */
10231
- executeCompleteTriggerOnValueChanged: false,
10394
+ enterKeyAction: "default",
10232
10395
  /**
10233
- * Specifies whether to replace the Next button with the Complete button when the [Complete trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete) is going to be executed.
10396
+ * An object that configures string comparison.
10397
+ *
10398
+ * Nested properties:
10234
10399
  *
10235
- * Default value: `true`
10236
- * @see settings.executeCompleteTriggerOnValueChanged
10400
+ * - `trimStrings`: `Boolean`\
10401
+ * Specifies whether to remove whitespace from both ends of a string before the comparison. Default value: `true`.
10402
+ *
10403
+ * - `caseSensitive`: `Boolean`\
10404
+ * Specifies whether to differentiate between capital and lower-case letters. Default value: `false`.
10237
10405
  */
10238
- changeNavigationButtonsOnCompleteTrigger: true,
10406
+ comparator: {
10407
+ trimStrings: true,
10408
+ caseSensitive: false
10409
+ },
10410
+ expressionDisableConversionChar: "#",
10411
+ get commentPrefix() { return settings.commentSuffix; },
10412
+ set commentPrefix(val) { settings.commentSuffix = val; },
10239
10413
  /**
10240
- * Specifies whether to re-evaluate an expression associated with the [Skip trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#skip) immediately when a question value changes. If the expression evaluates to `true`, the trigger is executed.
10414
+ * A suffix added to the name of the property that stores comments.
10241
10415
  *
10242
- * Disable this property if you want to re-evaluate the Skip trigger's expression only when the respondents navigate to another page.
10416
+ * Default value: "-Comment"
10243
10417
  *
10244
- * Default value: `true`
10418
+ * You can specify this setting for an individual survey: [`commentSuffix`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#commentSuffix).
10245
10419
  */
10246
- executeSkipTriggerOnValueChanged: true,
10420
+ commentSuffix: "-Comment",
10247
10421
  /**
10248
- * Specifies how to render the input field of [Comment](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model) questions in [read-only](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#readOnly) mode.
10249
- *
10250
- * Possible values:
10422
+ * A separator used in a shorthand notation that specifies a value and display text for an [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) object: `"value|text"`.
10251
10423
  *
10252
- * - `"textarea"` (default) - Renders the input field as a disabled `<textarea>` element.
10253
- * - `"div"` - Renders the input field as a `<div>` element with a non-editable question value within it.
10424
+ * Default value: `"|"`
10254
10425
  */
10255
- readOnlyCommentRenderMode: "textarea",
10426
+ itemValueSeparator: "|",
10256
10427
  /**
10257
- * Specifies how to render the input field of [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) questions in [read-only](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#readOnly) mode.
10428
+ * A maximum number of rate values in a [Rating](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model) question.
10258
10429
  *
10259
- * Possible values:
10430
+ * Default value: 20
10431
+ */
10432
+ ratingMaximumRateValueCount: 20,
10433
+ /**
10434
+ * Specifies whether to close the drop-down menu of a [TagBox](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/) question after a user selects a value.
10260
10435
  *
10261
- * - `"input"` (default) - Renders the input field as a disabled `<input>` element.
10262
- * - `"div"` - Renders the input field as a `<div>` element with a non-editable question value within it.
10436
+ * This setting applies to all TagBox questions on a page. You can use the [closeOnSelect](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model#closeOnSelect) property to specify the same setting for an individual TagBox question.
10263
10437
  */
10264
- readOnlyTextRenderMode: "input",
10438
+ tagboxCloseOnSelect: false,
10265
10439
  /**
10266
10440
  * A property that allows you to display a custom confirm dialog instead of the standard browser dialog. Set this property to a function that renders your custom dialog window.
10267
10441
  * @param message A message to be displayed in the confirm dialog window.
@@ -10290,28 +10464,7 @@ var settings = {
10290
10464
  *
10291
10465
  * Default value: 10
10292
10466
  */
10293
- maximumConditionRunCountOnValueChanged: 10,
10294
- /**
10295
- * Specifies whether to number questions whose [`titleLocation`](https://surveyjs.io/form-library/documentation/api-reference/question#titleLocation) property is set to `"hidden"`.
10296
- *
10297
- * Default value: `false`
10298
- */
10299
- setQuestionVisibleIndexForHiddenTitle: false,
10300
- /**
10301
- * Specifies whether to number questions whose [`hideNumber`](https://surveyjs.io/form-library/documentation/api-reference/question#hideNumber) property is enabled.
10302
- *
10303
- * Default value: `false`
10304
- */
10305
- setQuestionVisibleIndexForHiddenNumber: false,
10306
- /**
10307
- * Specifies whether to add questions to the DOM only when they get into the viewport.
10308
- *
10309
- * Default value: `false`
10310
- *
10311
- * > This is an experimental feature that may not work as expected in all use cases.
10312
- */
10313
- lazyRowsRendering: false,
10314
- lazyRowsRenderingStartRow: 3,
10467
+ maxConditionRunCountOnValueChanged: 10,
10315
10468
  /**
10316
10469
  * An object that configures notifications.
10317
10470
  *
@@ -10384,6 +10537,7 @@ var settings = {
10384
10537
  * Specifies environment in which SurveyJS will exist
10385
10538
  */
10386
10539
  environment: defaultEnvironment,
10540
+ showMaxLengthIndicator: true,
10387
10541
  titleTags: {
10388
10542
  survey: "h3",
10389
10543
  page: "h4",
@@ -10462,22 +10616,6 @@ var settings = {
10462
10616
  "email",
10463
10617
  "impp",
10464
10618
  ]
10465
- },
10466
- /**
10467
- * 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.
10468
- *
10469
- * Nested properties:
10470
- *
10471
- * - `columnWidthsByType`: `Object`\
10472
- * An object that specifies fixed and minimum column width based on the column type.\
10473
- * Example: `settings.matrix.columnWidthsByType = { "tagbox": { minWidth: "240px", width: "300px" } }`
10474
- *
10475
- * - `rateSize`: `"small"` (default) | `"normal"`\
10476
- * Specifies the size of rate values. Applies to [Rating Scale](https://surveyjs.io/form-library/examples/rating-scale/) questions within matrixes.
10477
- */
10478
- matrix: {
10479
- columnWidthsByType: columnWidthsByType,
10480
- rateSize: "small",
10481
10619
  }
10482
10620
  };
10483
10621
 
@@ -10532,8 +10670,7 @@ var ResponsivityManager = /** @class */ (function () {
10532
10670
  this.model.updateCallback = function (isResetInitialized) {
10533
10671
  if (isResetInitialized)
10534
10672
  _this.isInitialized = false;
10535
- else
10536
- setTimeout(function () { _this.process(); }, 1);
10673
+ setTimeout(function () { _this.process(); }, 1);
10537
10674
  };
10538
10675
  if (typeof ResizeObserver !== "undefined") {
10539
10676
  this.resizeObserver = new ResizeObserver(function (_) { return _this.process(); });
@@ -10570,9 +10707,8 @@ var ResponsivityManager = /** @class */ (function () {
10570
10707
  ResponsivityManager.prototype.calcItemsSizes = function () {
10571
10708
  var _this = this;
10572
10709
  var actions = this.model.actions;
10573
- this.container
10574
- .querySelectorAll(this.itemsSelector)
10575
- .forEach(function (item, index) {
10710
+ var _items = this.container.querySelectorAll(this.itemsSelector);
10711
+ (_items || []).forEach(function (item, index) {
10576
10712
  var currentAction = actions[index];
10577
10713
  _this.calcActionDimensions(currentAction, item);
10578
10714
  });
@@ -10654,7 +10790,7 @@ var VerticalResponsivityManager = /** @class */ (function (_super) {
10654
10790
  /*!****************************!*\
10655
10791
  !*** ./src/utils/utils.ts ***!
10656
10792
  \****************************/
10657
- /*! exports provided: unwrap, getSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames */
10793
+ /*! exports provided: unwrap, getSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, getFirstVisibleChild */
10658
10794
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
10659
10795
 
10660
10796
  "use strict";
@@ -10688,6 +10824,7 @@ __webpack_require__.r(__webpack_exports__);
10688
10824
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOriginalEvent", function() { return getOriginalEvent; });
10689
10825
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "preventDefaults", function() { return preventDefaults; });
10690
10826
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findParentByClassNames", function() { return findParentByClassNames; });
10827
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFirstVisibleChild", function() { return getFirstVisibleChild; });
10691
10828
  /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../settings */ "./src/settings.ts");
10692
10829
 
10693
10830
  function compareVersions(a, b) {
@@ -10952,6 +11089,15 @@ function isContainerVisible(el) {
10952
11089
  el.offsetHeight ||
10953
11090
  el.getClientRects().length);
10954
11091
  }
11092
+ function getFirstVisibleChild(el) {
11093
+ var result;
11094
+ for (var index = 0; index < el.children.length; index++) {
11095
+ if (!result && getComputedStyle(el.children[index]).display !== "none") {
11096
+ result = el.children[index];
11097
+ }
11098
+ }
11099
+ return result;
11100
+ }
10955
11101
  function findParentByClassNames(element, classNames) {
10956
11102
  if (!!element) {
10957
11103
  if (classNames.every(function (className) { return !className || element.classList.contains(className); })) {