survey-react-ui 2.3.9 → 2.3.10

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 v2.3.9
2
+ * surveyjs - Survey JavaScript library v2.3.10
3
3
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -28,7 +28,7 @@ __webpack_require__.r(__webpack_exports__);
28
28
  /* harmony export */ icons: () => (/* binding */ iconsV1)
29
29
  /* harmony export */ });
30
30
  /*!
31
- * surveyjs - Survey JavaScript library v2.3.9
31
+ * surveyjs - Survey JavaScript library v2.3.10
32
32
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
33
33
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
34
34
  */
@@ -114,7 +114,7 @@ __webpack_require__.r(__webpack_exports__);
114
114
  /* harmony export */ icons: () => (/* binding */ iconsV2)
115
115
  /* harmony export */ });
116
116
  /*!
117
- * surveyjs - Survey JavaScript library v2.3.9
117
+ * surveyjs - Survey JavaScript library v2.3.10
118
118
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
119
119
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
120
120
  */
@@ -3858,9 +3858,20 @@ var SliderLabelItem = /** @class */ (function (_super) {
3858
3858
  SliderLabelItem.prototype.renderElement = function () {
3859
3859
  var _a = this.question, cssClasses = _a.cssClasses, handleLabelPointerUp = _a.handleLabelPointerUp, getLabelCss = _a.getLabelCss, getPercent = _a.getPercent;
3860
3860
  var _b = this.item, value = _b.value, locText = _b.locText;
3861
+ var labelText = null;
3862
+ var labelTextSecondary = null;
3863
+ if (this.item.showValue) {
3864
+ labelText = react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelText }, this.item.value);
3865
+ labelTextSecondary = react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelTextSecondaryMode }, this.renderLocString(locText));
3866
+ }
3867
+ else {
3868
+ labelText = react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelText }, this.renderLocString(locText));
3869
+ }
3861
3870
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: this.item.id, className: getLabelCss(locText), style: { left: getPercent(value) + "%" }, onPointerUp: function (e) { handleLabelPointerUp(e.nativeEvent, value); } },
3862
3871
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelTick }),
3863
- react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelText }, this.renderLocString(locText)));
3872
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelTextContainer },
3873
+ labelText,
3874
+ labelTextSecondary));
3864
3875
  };
3865
3876
  return SliderLabelItem;
3866
3877
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
@@ -7090,7 +7101,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
7090
7101
  var descriptionUnderInput = question.hasDescriptionUnderInput
7091
7102
  ? this.renderDescription()
7092
7103
  : null;
7093
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: question.cssContent || undefined, style: contentStyle, "aria-hidden": question.contentAriaHidden, role: "presentation" },
7104
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: question.cssContent || undefined, style: contentStyle, "aria-hidden": question.contentAriaHidden, role: "presentation", "data-sv-drop-target-matrix": this.question.dragDropMatrixAttribute, "data-sv-drop-target-matrix-row": this.question.dragDropMatrixAttribute },
7094
7105
  questionRender,
7095
7106
  comment,
7096
7107
  descriptionUnderInput));
@@ -7532,11 +7543,9 @@ __webpack_require__.r(__webpack_exports__);
7532
7543
  /* harmony export */ });
7533
7544
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
7534
7545
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
7535
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/reactquestion_element.tsx");
7536
- /* harmony import */ var _reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_comment */ "./src/reactquestion_comment.tsx");
7537
- /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/reactquestion_factory.tsx");
7538
- /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactsurveymodel */ "./src/reactsurveymodel.tsx");
7539
- /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./element-factory */ "./src/element-factory.tsx");
7546
+ /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/reactquestion_factory.tsx");
7547
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-factory */ "./src/element-factory.tsx");
7548
+ /* harmony import */ var _reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_selectbase */ "./src/reactquestion_selectbase.tsx");
7540
7549
  var __extends = (undefined && undefined.__extends) || (function () {
7541
7550
  var extendStatics = function (d, b) {
7542
7551
  extendStatics = Object.setPrototypeOf ||
@@ -7556,8 +7565,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
7556
7565
 
7557
7566
 
7558
7567
 
7559
-
7560
-
7561
7568
  var SurveyQuestionCheckbox = /** @class */ (function (_super) {
7562
7569
  __extends(SurveyQuestionCheckbox, _super);
7563
7570
  function SurveyQuestionCheckbox(props) {
@@ -7570,16 +7577,10 @@ var SurveyQuestionCheckbox = /** @class */ (function (_super) {
7570
7577
  enumerable: false,
7571
7578
  configurable: true
7572
7579
  });
7573
- SurveyQuestionCheckbox.prototype.renderElement = function () {
7574
- var _this = this;
7575
- var cssClasses = this.question.cssClasses;
7576
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("fieldset", { className: this.question.getSelectBaseRootCss(), ref: function (fieldset) { return (_this.setControl(fieldset)); }, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage },
7580
+ SurveyQuestionCheckbox.prototype.renderHeader = function () {
7581
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
7577
7582
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
7578
- this.getHeader(),
7579
- this.question.hasColumns
7580
- ? this.getColumnedBody(cssClasses)
7581
- : this.getBody(cssClasses),
7582
- this.getFooter()));
7583
+ this.getHeader());
7583
7584
  };
7584
7585
  SurveyQuestionCheckbox.prototype.getHeader = function () {
7585
7586
  var _this = this;
@@ -7588,163 +7589,22 @@ var SurveyQuestionCheckbox = /** @class */ (function (_super) {
7588
7589
  return _this.renderItem(item, false, _this.question.cssClasses);
7589
7590
  });
7590
7591
  }
7591
- };
7592
- SurveyQuestionCheckbox.prototype.getFooter = function () {
7593
- var _this = this;
7594
- if (this.question.hasFootItems) {
7595
- return this.question.footItems.map(function (item, ii) {
7596
- return _this.renderItem(item, false, _this.question.cssClasses);
7597
- });
7598
- }
7599
- };
7600
- SurveyQuestionCheckbox.prototype.getColumnedBody = function (cssClasses) {
7601
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootMultiColumn }, this.getColumns(cssClasses)));
7602
- };
7603
- SurveyQuestionCheckbox.prototype.getColumns = function (cssClasses) {
7604
- var _this = this;
7605
- return this.question.columns.map(function (column, ci) {
7606
- var items = column.map(function (item, ii) {
7607
- return _this.renderItem(item, ci === 0 && ii === 0, cssClasses, "" + ci + ii);
7608
- });
7609
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
7610
- });
7611
- };
7612
- SurveyQuestionCheckbox.prototype.getBody = function (cssClasses) {
7613
- if (this.question.blockedRow) {
7614
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
7615
- }
7616
- else {
7617
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, this.getItems(cssClasses, this.question.bodyItems));
7618
- }
7619
- };
7620
- SurveyQuestionCheckbox.prototype.getItems = function (cssClasses, choices) {
7621
- var renderedItems = [];
7622
- for (var i = 0; i < choices.length; i++) {
7623
- var item = choices[i];
7624
- var renderedItem = this.renderItem(item, i == 0, cssClasses, "" + i);
7625
- if (!!renderedItem) {
7626
- renderedItems.push(renderedItem);
7627
- }
7628
- }
7629
- return renderedItems;
7630
- };
7631
- Object.defineProperty(SurveyQuestionCheckbox.prototype, "textStyle", {
7632
- get: function () {
7633
- return null;
7634
- },
7635
- enumerable: false,
7636
- configurable: true
7637
- });
7638
- SurveyQuestionCheckbox.prototype.renderItem = function (item, isFirst, cssClasses, index) {
7639
- var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.createElement(this.question.itemComponent, {
7640
- key: item.value,
7641
- question: this.question,
7642
- cssClasses: cssClasses,
7643
- isDisplayMode: this.isDisplayMode,
7644
- item: item,
7645
- textStyle: this.textStyle,
7646
- index: index,
7647
- isFirst: isFirst,
7648
- });
7649
- var survey = this.question.survey;
7650
- var wrappedItem = null;
7651
- if (!!survey && !!renderedItem) {
7652
- wrappedItem = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__.ReactSurveyElementsWrapper.wrapItemValue(survey, renderedItem, this.question, item);
7653
- }
7654
- return wrappedItem !== null && wrappedItem !== void 0 ? wrappedItem : renderedItem;
7592
+ return null;
7655
7593
  };
7656
7594
  return SurveyQuestionCheckbox;
7657
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.SurveyQuestionElementBase));
7595
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectbase));
7658
7596
 
7659
7597
  var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
7660
7598
  __extends(SurveyQuestionCheckboxItem, _super);
7661
7599
  function SurveyQuestionCheckboxItem(props) {
7662
- var _this = _super.call(this, props) || this;
7663
- _this.handleOnChange = function (event) {
7664
- _this.question.clickItemHandler(_this.item, event.target.checked);
7665
- };
7666
- _this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
7667
- return _this;
7600
+ return _super.call(this, props) || this;
7668
7601
  }
7669
- SurveyQuestionCheckboxItem.prototype.getStateElement = function () {
7670
- return this.item;
7671
- };
7672
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "question", {
7673
- get: function () {
7674
- return this.props.question;
7675
- },
7676
- enumerable: false,
7677
- configurable: true
7678
- });
7679
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "item", {
7680
- get: function () {
7681
- return this.props.item;
7682
- },
7683
- enumerable: false,
7684
- configurable: true
7685
- });
7686
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "textStyle", {
7687
- get: function () {
7688
- return this.props.textStyle;
7689
- },
7690
- enumerable: false,
7691
- configurable: true
7692
- });
7693
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "isFirst", {
7694
- get: function () {
7695
- return this.props.isFirst;
7696
- },
7697
- enumerable: false,
7698
- configurable: true
7699
- });
7700
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "index", {
7701
- get: function () {
7702
- return this.props.index;
7703
- },
7704
- enumerable: false,
7705
- configurable: true
7706
- });
7707
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "hideCaption", {
7708
- get: function () {
7709
- return this.props.hideCaption === true;
7710
- },
7711
- enumerable: false,
7712
- configurable: true
7713
- });
7714
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "ariaLabel", {
7715
- get: function () {
7716
- return this.props.ariaLabel || null;
7717
- },
7718
- enumerable: false,
7719
- configurable: true
7720
- });
7721
- SurveyQuestionCheckboxItem.prototype.componentDidUpdate = function (prevProps, prevState) {
7722
- _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
7723
- if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
7724
- if (this.props.item) {
7725
- this.props.item.setRootElement(this.rootRef.current);
7726
- }
7727
- if (prevProps.item) {
7728
- prevProps.item.setRootElement(undefined);
7729
- }
7730
- }
7731
- };
7732
- SurveyQuestionCheckboxItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
7733
- if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
7734
- return false;
7735
- return (!this.question.customWidget ||
7736
- !!this.question.customWidgetData.isNeedRender ||
7737
- !!this.question.customWidget.widgetJson.isDefaultRender ||
7738
- !!this.question.customWidget.widgetJson.render);
7739
- };
7740
- SurveyQuestionCheckboxItem.prototype.canRender = function () {
7741
- return !!this.item && !!this.question;
7602
+ SurveyQuestionCheckboxItem.prototype.doOnItemChange = function (event) {
7603
+ this.question.clickItemHandler(this.item, event.target.checked);
7742
7604
  };
7743
- SurveyQuestionCheckboxItem.prototype.renderElement = function () {
7605
+ SurveyQuestionCheckboxItem.prototype.renderElementContent = function () {
7744
7606
  var isChecked = this.question.isItemSelected(this.item);
7745
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
7746
- this.renderCheckbox(isChecked, null),
7747
- this.renderComment());
7607
+ return this.renderCheckbox(isChecked);
7748
7608
  };
7749
7609
  Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "inputStyle", {
7750
7610
  get: function () {
@@ -7753,13 +7613,7 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
7753
7613
  enumerable: false,
7754
7614
  configurable: true
7755
7615
  });
7756
- SurveyQuestionCheckboxItem.prototype.renderComment = function () {
7757
- if (!this.item.isCommentShowing)
7758
- return null;
7759
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
7760
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__.SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
7761
- };
7762
- SurveyQuestionCheckboxItem.prototype.renderCheckbox = function (isChecked, otherItem) {
7616
+ SurveyQuestionCheckboxItem.prototype.renderCheckbox = function (isChecked) {
7763
7617
  var id = this.question.getItemId(this.item);
7764
7618
  var itemClass = this.question.getItemClass(this.item);
7765
7619
  var labelClass = this.question.getLabelClass(this.item);
@@ -7773,28 +7627,15 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
7773
7627
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("use", { xlinkHref: this.question.itemSvgIcon })) :
7774
7628
  null) :
7775
7629
  null,
7776
- itemLabel),
7777
- otherItem));
7778
- };
7779
- SurveyQuestionCheckboxItem.prototype.componentDidMount = function () {
7780
- _super.prototype.componentDidMount.call(this);
7781
- if (!this.question.isDesignMode) {
7782
- this.item.setRootElement(this.rootRef.current);
7783
- }
7784
- };
7785
- SurveyQuestionCheckboxItem.prototype.componentWillUnmount = function () {
7786
- _super.prototype.componentWillUnmount.call(this);
7787
- if (!this.question.isDesignMode) {
7788
- this.item.setRootElement(undefined);
7789
- }
7630
+ itemLabel)));
7790
7631
  };
7791
7632
  return SurveyQuestionCheckboxItem;
7792
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.ReactSurveyElement));
7633
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectBaseItem));
7793
7634
 
7794
- _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.registerElement("survey-checkbox-item", function (props) {
7635
+ _element_factory__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.registerElement("survey-checkbox-item", function (props) {
7795
7636
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionCheckboxItem, props);
7796
7637
  });
7797
- _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__.ReactQuestionFactory.Instance.registerQuestion("checkbox", function (props) {
7638
+ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_1__.ReactQuestionFactory.Instance.registerQuestion("checkbox", function (props) {
7798
7639
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionCheckbox, props);
7799
7640
  });
7800
7641
 
@@ -9365,7 +9206,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
9365
9206
  };
9366
9207
  SurveyQuestionMatrixDropdownBase.prototype.renderTableDiv = function () {
9367
9208
  var _this = this;
9368
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.tableWrapper, "data-sv-drop-target-matrix-row": this.question.renderedTable.wrapperDropTargetId, ref: function (root) { return (_this.setControl(root)); } },
9209
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.tableWrapper, ref: function (root) { return (_this.setControl(root)); } },
9369
9210
  react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionMatrixTable, { question: this.question, creator: this.creator, wrapCell: function (cell, element, reason) { return _this.wrapCell(cell, element, reason); } })));
9370
9211
  };
9371
9212
  return SurveyQuestionMatrixDropdownBase;
@@ -10076,11 +9917,9 @@ __webpack_require__.r(__webpack_exports__);
10076
9917
  /* harmony export */ });
10077
9918
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
10078
9919
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
10079
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/reactquestion_element.tsx");
10080
- /* harmony import */ var _reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_comment */ "./src/reactquestion_comment.tsx");
10081
- /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/reactquestion_factory.tsx");
10082
- /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactsurveymodel */ "./src/reactsurveymodel.tsx");
10083
- /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./element-factory */ "./src/element-factory.tsx");
9920
+ /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/reactquestion_factory.tsx");
9921
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-factory */ "./src/element-factory.tsx");
9922
+ /* harmony import */ var _reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_selectbase */ "./src/reactquestion_selectbase.tsx");
10084
9923
  var __extends = (undefined && undefined.__extends) || (function () {
10085
9924
  var extendStatics = function (d, b) {
10086
9925
  extendStatics = Object.setPrototypeOf ||
@@ -10100,8 +9939,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
10100
9939
 
10101
9940
 
10102
9941
 
10103
-
10104
-
10105
9942
  var SurveyQuestionRadiogroup = /** @class */ (function (_super) {
10106
9943
  __extends(SurveyQuestionRadiogroup, _super);
10107
9944
  function SurveyQuestionRadiogroup(props) {
@@ -10114,97 +9951,29 @@ var SurveyQuestionRadiogroup = /** @class */ (function (_super) {
10114
9951
  enumerable: false,
10115
9952
  configurable: true
10116
9953
  });
10117
- SurveyQuestionRadiogroup.prototype.renderElement = function () {
10118
- var _this = this;
10119
- var cssClasses = this.question.cssClasses;
10120
- var clearButton = null;
10121
- if (this.question.showClearButtonInContent) {
10122
- clearButton = (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null,
10123
- react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", { type: "button", className: this.question.cssClasses.clearButton, onClick: function () { return _this.question.clearValue(true); }, value: this.question.clearButtonCaption })));
10124
- }
10125
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("fieldset", { className: this.question.getSelectBaseRootCss(), ref: function (fieldset) { return (_this.setControl(fieldset)); }, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage },
10126
- this.question.hasColumns
10127
- ? this.getColumnedBody(cssClasses)
10128
- : this.getBody(cssClasses),
10129
- this.getFooter(),
10130
- clearButton));
10131
- };
10132
9954
  SurveyQuestionRadiogroup.prototype.getFooter = function () {
10133
- var _this = this;
10134
- if (this.question.hasFootItems) {
10135
- return this.question.footItems.map(function (item, ii) {
10136
- return _this.renderItem(item, false, _this.question.cssClasses);
10137
- });
10138
- }
10139
- };
10140
- SurveyQuestionRadiogroup.prototype.getColumnedBody = function (cssClasses) {
10141
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootMultiColumn }, this.getColumns(cssClasses)));
9955
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
9956
+ _super.prototype.getFooter.call(this),
9957
+ this.renderClearButton());
10142
9958
  };
10143
- SurveyQuestionRadiogroup.prototype.getColumns = function (cssClasses) {
9959
+ SurveyQuestionRadiogroup.prototype.renderClearButton = function () {
10144
9960
  var _this = this;
10145
- var value = this.getStateValue();
10146
- return this.question.columns.map(function (column, ci) {
10147
- var items = column.map(function (item, ii) {
10148
- return _this.renderItem(item, value, cssClasses, "" + ci + ii);
10149
- });
10150
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
10151
- });
10152
- };
10153
- SurveyQuestionRadiogroup.prototype.getBody = function (cssClasses) {
10154
- if (this.question.blockedRow) {
10155
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
10156
- }
10157
- else {
10158
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, this.getItems(cssClasses, this.question.bodyItems));
10159
- }
10160
- };
10161
- SurveyQuestionRadiogroup.prototype.getItems = function (cssClasses, choices) {
10162
- var items = [];
10163
- var value = this.getStateValue();
10164
- for (var i = 0; i < choices.length; i++) {
10165
- var item = choices[i];
10166
- var renderedItem = this.renderItem(item, value, cssClasses, "" + i);
10167
- items.push(renderedItem);
10168
- }
10169
- return items;
10170
- };
10171
- Object.defineProperty(SurveyQuestionRadiogroup.prototype, "textStyle", {
10172
- get: function () {
10173
- return null; //{ display: "inline", position: "static" };
10174
- },
10175
- enumerable: false,
10176
- configurable: true
10177
- });
10178
- SurveyQuestionRadiogroup.prototype.renderItem = function (item, value, cssClasses, index) {
10179
- var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.createElement(this.question.itemComponent, {
10180
- key: item.value,
10181
- question: this.question,
10182
- cssClasses: cssClasses,
10183
- isDisplayMode: this.isDisplayMode,
10184
- item: item,
10185
- textStyle: this.textStyle,
10186
- index: index,
10187
- isChecked: value === item.value,
10188
- });
10189
- var survey = this.question.survey;
10190
- var wrappedItem = null;
10191
- if (!!survey) {
10192
- wrappedItem = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__.ReactSurveyElementsWrapper.wrapItemValue(survey, renderedItem, this.question, item);
10193
- }
10194
- return wrappedItem !== null && wrappedItem !== void 0 ? wrappedItem : renderedItem;
9961
+ if (!this.question.showClearButtonInContent)
9962
+ return null;
9963
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null,
9964
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", { type: "button", className: this.question.cssClasses.clearButton, onClick: function () { return _this.question.clearValueFromUI(); }, value: this.question.clearButtonCaption })));
10195
9965
  };
10196
9966
  SurveyQuestionRadiogroup.prototype.getStateValue = function () {
10197
9967
  return !this.question.isEmpty() ? this.question.renderedValue : "";
10198
9968
  };
9969
+ SurveyQuestionRadiogroup.prototype.isItemChecked = function (item, value) { return item.value === value; };
10199
9970
  return SurveyQuestionRadiogroup;
10200
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.SurveyQuestionElementBase));
9971
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectbase));
10201
9972
 
10202
9973
  var SurveyQuestionRadioItem = /** @class */ (function (_super) {
10203
9974
  __extends(SurveyQuestionRadioItem, _super);
10204
9975
  function SurveyQuestionRadioItem(props) {
10205
9976
  var _this = _super.call(this, props) || this;
10206
- _this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
10207
- _this.handleOnChange = _this.handleOnChange.bind(_this);
10208
9977
  _this.handleOnMouseDown = _this.handleOnMouseDown.bind(_this);
10209
9978
  return _this;
10210
9979
  }
@@ -10218,27 +9987,6 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
10218
9987
  enumerable: false,
10219
9988
  configurable: true
10220
9989
  });
10221
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "item", {
10222
- get: function () {
10223
- return this.props.item;
10224
- },
10225
- enumerable: false,
10226
- configurable: true
10227
- });
10228
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "textStyle", {
10229
- get: function () {
10230
- return this.props.textStyle;
10231
- },
10232
- enumerable: false,
10233
- configurable: true
10234
- });
10235
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "index", {
10236
- get: function () {
10237
- return this.props.index;
10238
- },
10239
- enumerable: false,
10240
- configurable: true
10241
- });
10242
9990
  Object.defineProperty(SurveyQuestionRadioItem.prototype, "isChecked", {
10243
9991
  get: function () {
10244
9992
  return this.props.isChecked;
@@ -10246,60 +9994,14 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
10246
9994
  enumerable: false,
10247
9995
  configurable: true
10248
9996
  });
10249
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "hideCaption", {
10250
- get: function () {
10251
- return this.props.hideCaption === true;
10252
- },
10253
- enumerable: false,
10254
- configurable: true
10255
- });
10256
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "ariaLabel", {
10257
- get: function () {
10258
- return this.props.ariaLabel || null;
10259
- },
10260
- enumerable: false,
10261
- configurable: true
10262
- });
10263
- SurveyQuestionRadioItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
10264
- if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
10265
- return false;
10266
- if (!this.question)
10267
- return false;
10268
- return (!this.question.customWidget ||
10269
- !!this.question.customWidgetData.isNeedRender ||
10270
- !!this.question.customWidget.widgetJson.isDefaultRender ||
10271
- !!this.question.customWidget.widgetJson.render);
10272
- };
10273
- SurveyQuestionRadioItem.prototype.handleOnChange = function (event) {
9997
+ SurveyQuestionRadioItem.prototype.doOnItemChange = function (event) {
10274
9998
  this.question.clickItemHandler(this.item);
10275
9999
  };
10276
10000
  SurveyQuestionRadioItem.prototype.handleOnMouseDown = function (event) {
10277
10001
  this.question.onMouseDown();
10278
10002
  };
10279
- SurveyQuestionRadioItem.prototype.canRender = function () {
10280
- return !!this.question && !!this.item;
10281
- };
10282
- SurveyQuestionRadioItem.prototype.componentDidUpdate = function (prevProps, prevState) {
10283
- _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
10284
- if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
10285
- if (this.props.item) {
10286
- this.props.item.setRootElement(this.rootRef.current);
10287
- }
10288
- if (prevProps.item) {
10289
- prevProps.item.setRootElement(undefined);
10290
- }
10291
- }
10292
- };
10293
- SurveyQuestionRadioItem.prototype.renderElement = function () {
10294
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
10295
- this.renderRadioButton(),
10296
- this.renderComment());
10297
- };
10298
- SurveyQuestionRadioItem.prototype.renderComment = function () {
10299
- if (!this.item.isCommentShowing)
10300
- return null;
10301
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
10302
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__.SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
10003
+ SurveyQuestionRadioItem.prototype.renderElementContent = function () {
10004
+ return this.renderRadioButton();
10303
10005
  };
10304
10006
  SurveyQuestionRadioItem.prototype.renderRadioButton = function () {
10305
10007
  var itemClass = this.question.getItemClass(this.item);
@@ -10317,25 +10019,13 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
10317
10019
  null,
10318
10020
  itemLabel)));
10319
10021
  };
10320
- SurveyQuestionRadioItem.prototype.componentDidMount = function () {
10321
- _super.prototype.componentDidMount.call(this);
10322
- if (!this.question.isDesignMode) {
10323
- this.item.setRootElement(this.rootRef.current);
10324
- }
10325
- };
10326
- SurveyQuestionRadioItem.prototype.componentWillUnmount = function () {
10327
- _super.prototype.componentWillUnmount.call(this);
10328
- if (!this.question.isDesignMode) {
10329
- this.item.setRootElement(undefined);
10330
- }
10331
- };
10332
10022
  return SurveyQuestionRadioItem;
10333
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.ReactSurveyElement));
10023
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectBaseItem));
10334
10024
 
10335
- _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.registerElement("survey-radiogroup-item", function (props) {
10025
+ _element_factory__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.registerElement("survey-radiogroup-item", function (props) {
10336
10026
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRadioItem, props);
10337
10027
  });
10338
- _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__.ReactQuestionFactory.Instance.registerQuestion("radiogroup", function (props) {
10028
+ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_1__.ReactQuestionFactory.Instance.registerQuestion("radiogroup", function (props) {
10339
10029
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRadiogroup, props);
10340
10030
  });
10341
10031
 
@@ -10688,6 +10378,276 @@ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__.ReactQuestionFactory.Instanc
10688
10378
  });
10689
10379
 
10690
10380
 
10381
+ /***/ }),
10382
+
10383
+ /***/ "./src/reactquestion_selectbase.tsx":
10384
+ /*!******************************************!*\
10385
+ !*** ./src/reactquestion_selectbase.tsx ***!
10386
+ \******************************************/
10387
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10388
+
10389
+ __webpack_require__.r(__webpack_exports__);
10390
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10391
+ /* harmony export */ SurveyQuestionSelectBaseItem: () => (/* binding */ SurveyQuestionSelectBaseItem),
10392
+ /* harmony export */ SurveyQuestionSelectbase: () => (/* binding */ SurveyQuestionSelectbase)
10393
+ /* harmony export */ });
10394
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
10395
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
10396
+ /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/reactquestion_element.tsx");
10397
+ /* harmony import */ var _reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_comment */ "./src/reactquestion_comment.tsx");
10398
+ /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactsurveymodel */ "./src/reactsurveymodel.tsx");
10399
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./element-factory */ "./src/element-factory.tsx");
10400
+ /* harmony import */ var _panel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./panel */ "./src/panel.tsx");
10401
+ var __extends = (undefined && undefined.__extends) || (function () {
10402
+ var extendStatics = function (d, b) {
10403
+ extendStatics = Object.setPrototypeOf ||
10404
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
10405
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
10406
+ return extendStatics(d, b);
10407
+ };
10408
+ return function (d, b) {
10409
+ if (typeof b !== "function" && b !== null)
10410
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10411
+ extendStatics(d, b);
10412
+ function __() { this.constructor = d; }
10413
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10414
+ };
10415
+ })();
10416
+
10417
+
10418
+
10419
+
10420
+
10421
+
10422
+ var SurveyQuestionSelectbase = /** @class */ (function (_super) {
10423
+ __extends(SurveyQuestionSelectbase, _super);
10424
+ function SurveyQuestionSelectbase(props) {
10425
+ return _super.call(this, props) || this;
10426
+ }
10427
+ Object.defineProperty(SurveyQuestionSelectbase.prototype, "question", {
10428
+ get: function () {
10429
+ return this.questionBase;
10430
+ },
10431
+ enumerable: false,
10432
+ configurable: true
10433
+ });
10434
+ SurveyQuestionSelectbase.prototype.renderElement = function () {
10435
+ var _this = this;
10436
+ var cssClasses = this.question.cssClasses;
10437
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("fieldset", { className: this.question.getSelectBaseRootCss(), ref: function (fieldset) { return (_this.setControl(fieldset)); }, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage },
10438
+ this.renderHeader(),
10439
+ this.question.hasColumns
10440
+ ? this.getColumnedBody(cssClasses)
10441
+ : this.getBody(cssClasses),
10442
+ this.getFooter()));
10443
+ };
10444
+ SurveyQuestionSelectbase.prototype.renderHeader = function () { return null; };
10445
+ SurveyQuestionSelectbase.prototype.getFooter = function () {
10446
+ var _this = this;
10447
+ if (this.question.hasFootItems) {
10448
+ var items = this.question.footItems.map(function (item, ii) {
10449
+ return _this.renderItem(item, false, _this.question.cssClasses);
10450
+ });
10451
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, items);
10452
+ }
10453
+ return null;
10454
+ };
10455
+ SurveyQuestionSelectbase.prototype.getStateValue = function () { return undefined; };
10456
+ SurveyQuestionSelectbase.prototype.isItemChecked = function (item, value) { return false; };
10457
+ SurveyQuestionSelectbase.prototype.getColumnedBody = function (cssClasses) {
10458
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootMultiColumn }, this.getColumns(cssClasses)));
10459
+ };
10460
+ SurveyQuestionSelectbase.prototype.getColumns = function (cssClasses) {
10461
+ var _this = this;
10462
+ var value = this.getStateValue();
10463
+ return this.question.columns.map(function (column, ci) {
10464
+ var items = column.map(function (item, ii) {
10465
+ return _this.renderItem(item, ci === 0 && ii === 0, cssClasses, "" + ci + ii, _this.isItemChecked(item, value));
10466
+ });
10467
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
10468
+ });
10469
+ };
10470
+ SurveyQuestionSelectbase.prototype.getBody = function (cssClasses) {
10471
+ if (this.question.blockedRow) {
10472
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
10473
+ }
10474
+ else {
10475
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, this.getItems(cssClasses, this.question.bodyItems));
10476
+ }
10477
+ };
10478
+ SurveyQuestionSelectbase.prototype.getItems = function (cssClasses, choices) {
10479
+ var items = [];
10480
+ var value = this.getStateValue();
10481
+ for (var i = 0; i < choices.length; i++) {
10482
+ var item = choices[i];
10483
+ var renderedItem = this.renderItem(item, i == 0, cssClasses, "" + i, this.isItemChecked(item, value));
10484
+ if (!!renderedItem) {
10485
+ items.push(renderedItem);
10486
+ }
10487
+ }
10488
+ return items;
10489
+ };
10490
+ Object.defineProperty(SurveyQuestionSelectbase.prototype, "textStyle", {
10491
+ get: function () {
10492
+ return null;
10493
+ },
10494
+ enumerable: false,
10495
+ configurable: true
10496
+ });
10497
+ SurveyQuestionSelectbase.prototype.renderItem = function (item, isFirst, cssClasses, index, isChecked) {
10498
+ var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_4__.ReactElementFactory.Instance.createElement(this.question.itemComponent, {
10499
+ key: item.value,
10500
+ question: this.question,
10501
+ cssClasses: cssClasses,
10502
+ isDisplayMode: this.isDisplayMode,
10503
+ item: item,
10504
+ textStyle: this.textStyle,
10505
+ index: index,
10506
+ isFirst: isFirst,
10507
+ isChecked: isChecked,
10508
+ creator: this.props.creator,
10509
+ });
10510
+ var survey = this.question.survey;
10511
+ var wrappedItem = null;
10512
+ if (!!survey && !!renderedItem) {
10513
+ wrappedItem = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_3__.ReactSurveyElementsWrapper.wrapItemValue(survey, renderedItem, this.question, item);
10514
+ }
10515
+ return wrappedItem !== null && wrappedItem !== void 0 ? wrappedItem : renderedItem;
10516
+ };
10517
+ return SurveyQuestionSelectbase;
10518
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.SurveyQuestionElementBase));
10519
+
10520
+ var SurveyQuestionSelectBaseItem = /** @class */ (function (_super) {
10521
+ __extends(SurveyQuestionSelectBaseItem, _super);
10522
+ function SurveyQuestionSelectBaseItem(props) {
10523
+ var _this = _super.call(this, props) || this;
10524
+ _this.handleOnChange = function (event) {
10525
+ _this.doOnItemChange(event);
10526
+ };
10527
+ _this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
10528
+ return _this;
10529
+ }
10530
+ SurveyQuestionSelectBaseItem.prototype.getStateElement = function () {
10531
+ return this.item;
10532
+ };
10533
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "question", {
10534
+ get: function () {
10535
+ return this.props.question;
10536
+ },
10537
+ enumerable: false,
10538
+ configurable: true
10539
+ });
10540
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "item", {
10541
+ get: function () {
10542
+ return this.props.item;
10543
+ },
10544
+ enumerable: false,
10545
+ configurable: true
10546
+ });
10547
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "textStyle", {
10548
+ get: function () {
10549
+ return this.props.textStyle;
10550
+ },
10551
+ enumerable: false,
10552
+ configurable: true
10553
+ });
10554
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "isFirst", {
10555
+ get: function () {
10556
+ return this.props.isFirst;
10557
+ },
10558
+ enumerable: false,
10559
+ configurable: true
10560
+ });
10561
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "index", {
10562
+ get: function () {
10563
+ return this.props.index;
10564
+ },
10565
+ enumerable: false,
10566
+ configurable: true
10567
+ });
10568
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "hideCaption", {
10569
+ get: function () {
10570
+ return this.props.hideCaption === true;
10571
+ },
10572
+ enumerable: false,
10573
+ configurable: true
10574
+ });
10575
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "ariaLabel", {
10576
+ get: function () {
10577
+ return this.props.ariaLabel || null;
10578
+ },
10579
+ enumerable: false,
10580
+ configurable: true
10581
+ });
10582
+ SurveyQuestionSelectBaseItem.prototype.componentDidUpdate = function (prevProps, prevState) {
10583
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
10584
+ if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
10585
+ if (this.props.item) {
10586
+ this.props.item.setRootElement(this.rootRef.current);
10587
+ }
10588
+ if (prevProps.item) {
10589
+ prevProps.item.setRootElement(undefined);
10590
+ }
10591
+ }
10592
+ };
10593
+ SurveyQuestionSelectBaseItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
10594
+ if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
10595
+ return false;
10596
+ return (!this.question.customWidget ||
10597
+ !!this.question.customWidgetData.isNeedRender ||
10598
+ !!this.question.customWidget.widgetJson.isDefaultRender ||
10599
+ !!this.question.customWidget.widgetJson.render);
10600
+ };
10601
+ SurveyQuestionSelectBaseItem.prototype.doOnItemChange = function (event) { };
10602
+ SurveyQuestionSelectBaseItem.prototype.canRender = function () {
10603
+ return !!this.item && !!this.question;
10604
+ };
10605
+ SurveyQuestionSelectBaseItem.prototype.renderElement = function () {
10606
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
10607
+ this.renderElementContent(),
10608
+ this.renderPanel(),
10609
+ this.renderComment());
10610
+ };
10611
+ SurveyQuestionSelectBaseItem.prototype.renderElementContent = function () {
10612
+ return null;
10613
+ };
10614
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "inputStyle", {
10615
+ get: function () {
10616
+ return null; //{ marginRight: "3px" };
10617
+ },
10618
+ enumerable: false,
10619
+ configurable: true
10620
+ });
10621
+ SurveyQuestionSelectBaseItem.prototype.renderComment = function () {
10622
+ if (!this.item.isCommentShowing)
10623
+ return null;
10624
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
10625
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__.SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
10626
+ };
10627
+ SurveyQuestionSelectBaseItem.prototype.renderPanel = function () {
10628
+ if (this.item.isPanelShowing) {
10629
+ var panel = this.item.panel;
10630
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(_panel__WEBPACK_IMPORTED_MODULE_5__.SurveyPanel, { key: panel.id, element: panel, survey: this.question.survey, cssClasses: this.props.cssClasses, isDisplayMode: this.isDisplayMode, creator: this.props.creator }));
10631
+ }
10632
+ return null;
10633
+ };
10634
+ SurveyQuestionSelectBaseItem.prototype.componentDidMount = function () {
10635
+ _super.prototype.componentDidMount.call(this);
10636
+ if (!this.question.isDesignMode) {
10637
+ this.item.setRootElement(this.rootRef.current);
10638
+ }
10639
+ };
10640
+ SurveyQuestionSelectBaseItem.prototype.componentWillUnmount = function () {
10641
+ _super.prototype.componentWillUnmount.call(this);
10642
+ if (!this.question.isDesignMode) {
10643
+ this.item.setRootElement(undefined);
10644
+ }
10645
+ };
10646
+ return SurveyQuestionSelectBaseItem;
10647
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.ReactSurveyElement));
10648
+
10649
+
10650
+
10691
10651
  /***/ }),
10692
10652
 
10693
10653
  /***/ "./src/reactquestion_singleinputsummary.tsx":
@@ -11467,7 +11427,7 @@ var SurveyQuestionSignaturePad = /** @class */ (function (_super) {
11467
11427
  return null;
11468
11428
  var cssClasses = this.question.cssClasses;
11469
11429
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.controls },
11470
- react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", { type: "button", className: cssClasses.clearButton, title: this.question.clearButtonCaption, onClick: function () { return _this.question.clearValue(true); } },
11430
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", { type: "button", className: cssClasses.clearButton, title: this.question.clearButtonCaption, onClick: function () { return _this.question.clearValueFromUI(); } },
11471
11431
  this.question.cssClasses.clearButtonIconId ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { iconName: this.question.cssClasses.clearButtonIconId, size: "auto" }) : react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, "\u2716"),
11472
11432
  " "));
11473
11433
  };
@@ -12155,7 +12115,7 @@ __webpack_require__.r(__webpack_exports__);
12155
12115
 
12156
12116
 
12157
12117
 
12158
- (0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.3.9"), "survey-react-ui");
12118
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.3.10"), "survey-react-ui");
12159
12119
 
12160
12120
  })();
12161
12121