survey-react-ui 2.3.8 → 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.8
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.8
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.8
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
  */
@@ -2064,11 +2064,12 @@ var __extends = (undefined && undefined.__extends) || (function () {
2064
2064
 
2065
2065
  var ListItem = /** @class */ (function (_super) {
2066
2066
  __extends(ListItem, _super);
2067
- function ListItem() {
2068
- var _this = _super !== null && _super.apply(this, arguments) || this;
2067
+ function ListItem(props) {
2068
+ var _this = _super.call(this, props) || this;
2069
2069
  _this.handleKeydown = function (event) {
2070
2070
  _this.model.onKeyDown(event);
2071
2071
  };
2072
+ _this.elementRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
2072
2073
  return _this;
2073
2074
  }
2074
2075
  Object.defineProperty(ListItem.prototype, "model", {
@@ -2095,7 +2096,7 @@ var ListItem = /** @class */ (function (_super) {
2095
2096
  var className = this.model.getItemClass(this.item);
2096
2097
  var itemContent = this.item.component || this.model.itemComponent;
2097
2098
  var newElement = _element_factory__WEBPACK_IMPORTED_MODULE_1__.ReactElementFactory.Instance.createElement(itemContent, { item: this.item, key: this.item.id, model: this.model });
2098
- var contentWrap = react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { style: this.model.getItemStyle(this.item), className: this.model.cssClasses.itemBody, title: this.item.getTooltip(), onMouseOver: function (event) { _this.model.onItemHover(_this.item); }, onMouseLeave: function (event) { _this.model.onItemLeave(_this.item); } }, newElement);
2099
+ var contentWrap = react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { ref: this.elementRef, style: this.model.getItemStyle(this.item), className: this.model.cssClasses.itemBody, title: this.item.getTooltip(), onMouseOver: function (event) { _this.model.onItemHover(_this.item); }, onMouseLeave: function (event) { _this.model.onItemLeave(_this.item); } }, newElement);
2099
2100
  var separator = this.item.needSeparator ? react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.model.cssClasses.itemSeparator }) : null;
2100
2101
  var isVisible = this.model.isItemVisible(this.item);
2101
2102
  var style = {
@@ -2109,8 +2110,9 @@ var ListItem = /** @class */ (function (_super) {
2109
2110
  contentWrap), this.item);
2110
2111
  };
2111
2112
  ListItem.prototype.componentDidMount = function () {
2113
+ var _a;
2112
2114
  _super.prototype.componentDidMount.call(this);
2113
- this.model.onLastItemRended(this.item);
2115
+ this.model.onItemRended(this.item, (_a = this.elementRef) === null || _a === void 0 ? void 0 : _a.current);
2114
2116
  };
2115
2117
  return ListItem;
2116
2118
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
@@ -3856,9 +3858,20 @@ var SliderLabelItem = /** @class */ (function (_super) {
3856
3858
  SliderLabelItem.prototype.renderElement = function () {
3857
3859
  var _a = this.question, cssClasses = _a.cssClasses, handleLabelPointerUp = _a.handleLabelPointerUp, getLabelCss = _a.getLabelCss, getPercent = _a.getPercent;
3858
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
+ }
3859
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); } },
3860
3871
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelTick }),
3861
- 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));
3862
3875
  };
3863
3876
  return SliderLabelItem;
3864
3877
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
@@ -5674,6 +5687,7 @@ __webpack_require__.r(__webpack_exports__);
5674
5687
  /* harmony import */ var _panel_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./panel-base */ "./src/panel-base.tsx");
5675
5688
  /* harmony import */ var _components_title_title_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/title/title-element */ "./src/components/title/title-element.tsx");
5676
5689
  /* harmony import */ var _reactquestion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactquestion */ "./src/reactquestion.tsx");
5690
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./element-factory */ "./src/element-factory.tsx");
5677
5691
  var __extends = (undefined && undefined.__extends) || (function () {
5678
5692
  var extendStatics = function (d, b) {
5679
5693
  extendStatics = Object.setPrototypeOf ||
@@ -5694,6 +5708,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
5694
5708
 
5695
5709
 
5696
5710
 
5711
+
5697
5712
  var SurveyPage = /** @class */ (function (_super) {
5698
5713
  __extends(SurveyPage, _super);
5699
5714
  function SurveyPage(props) {
@@ -5732,6 +5747,9 @@ var SurveyPage = /** @class */ (function (_super) {
5732
5747
  return SurveyPage;
5733
5748
  }(_panel_base__WEBPACK_IMPORTED_MODULE_2__.SurveyPanelBase));
5734
5749
 
5750
+ _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.registerElement("sv-page", function (props) {
5751
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyPage, props);
5752
+ });
5735
5753
 
5736
5754
 
5737
5755
  /***/ }),
@@ -6540,19 +6558,18 @@ __webpack_require__.r(__webpack_exports__);
6540
6558
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
6541
6559
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
6542
6560
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
6543
- /* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./page */ "./src/page.tsx");
6544
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_element */ "./src/reactquestion_element.tsx");
6545
- /* harmony import */ var _components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/survey-header/survey-header */ "./src/components/survey-header/survey-header.tsx");
6546
- /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/reactquestion_factory.tsx");
6547
- /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./element-factory */ "./src/element-factory.tsx");
6548
- /* harmony import */ var _components_brand_info__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/brand-info */ "./src/components/brand-info.tsx");
6549
- /* harmony import */ var _components_notifier__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/notifier */ "./src/components/notifier.tsx");
6550
- /* harmony import */ var _components_components_container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./components/components-container */ "./src/components/components-container.tsx");
6551
- /* harmony import */ var _svgbundle__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./svgbundle */ "./src/svgbundle.tsx");
6552
- /* harmony import */ var _components_popup_popup_modal__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./components/popup/popup-modal */ "./src/components/popup/popup-modal.tsx");
6553
- /* harmony import */ var survey_core_icons_iconsV1__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! survey-core/icons/iconsV1 */ "../survey-core/build/fesm/icons/iconsV1.mjs");
6554
- /* harmony import */ var survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! survey-core/icons/iconsV2 */ "../survey-core/build/fesm/icons/iconsV2.mjs");
6555
- /* harmony import */ var _components_scroll__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./components/scroll */ "./src/components/scroll.tsx");
6561
+ /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_element */ "./src/reactquestion_element.tsx");
6562
+ /* harmony import */ var _components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/survey-header/survey-header */ "./src/components/survey-header/survey-header.tsx");
6563
+ /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/reactquestion_factory.tsx");
6564
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./element-factory */ "./src/element-factory.tsx");
6565
+ /* harmony import */ var _components_brand_info__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/brand-info */ "./src/components/brand-info.tsx");
6566
+ /* harmony import */ var _components_notifier__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/notifier */ "./src/components/notifier.tsx");
6567
+ /* harmony import */ var _components_components_container__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/components-container */ "./src/components/components-container.tsx");
6568
+ /* harmony import */ var _svgbundle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./svgbundle */ "./src/svgbundle.tsx");
6569
+ /* harmony import */ var _components_popup_popup_modal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./components/popup/popup-modal */ "./src/components/popup/popup-modal.tsx");
6570
+ /* harmony import */ var survey_core_icons_iconsV1__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! survey-core/icons/iconsV1 */ "../survey-core/build/fesm/icons/iconsV1.mjs");
6571
+ /* harmony import */ var survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! survey-core/icons/iconsV2 */ "../survey-core/build/fesm/icons/iconsV2.mjs");
6572
+ /* harmony import */ var _components_scroll__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./components/scroll */ "./src/components/scroll.tsx");
6556
6573
  var __extends = (undefined && undefined.__extends) || (function () {
6557
6574
  var extendStatics = function (d, b) {
6558
6575
  extendStatics = Object.setPrototypeOf ||
@@ -6593,10 +6610,9 @@ var __assign = (undefined && undefined.__assign) || function () {
6593
6610
 
6594
6611
 
6595
6612
 
6596
-
6597
- (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.addIconsToThemeSet)("v1", survey_core_icons_iconsV1__WEBPACK_IMPORTED_MODULE_12__.icons);
6598
- (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.addIconsToThemeSet)("v2", survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_13__.icons);
6599
- survey_core__WEBPACK_IMPORTED_MODULE_1__.SvgRegistry.registerIcons(survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_13__.icons);
6613
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.addIconsToThemeSet)("v1", survey_core_icons_iconsV1__WEBPACK_IMPORTED_MODULE_11__.icons);
6614
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.addIconsToThemeSet)("v2", survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_12__.icons);
6615
+ survey_core__WEBPACK_IMPORTED_MODULE_1__.SvgRegistry.registerIcons(survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_12__.icons);
6600
6616
  var Survey = /** @class */ (function (_super) {
6601
6617
  __extends(Survey, _super);
6602
6618
  function Survey(props) {
@@ -6675,7 +6691,7 @@ var Survey = /** @class */ (function (_super) {
6675
6691
  renderResult = this.renderSurvey();
6676
6692
  }
6677
6693
  var backgroundImage = !!this.survey.backgroundImage ? react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.css.rootBackgroundImage, style: this.survey.backgroundImageStyle }) : null;
6678
- var header = this.survey.headerView === "basic" ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_4__.SurveyHeader, { survey: this.survey }) : null;
6694
+ var header = this.survey.headerView === "basic" ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_3__.SurveyHeader, { survey: this.survey }) : null;
6679
6695
  var onSubmit = function (event) {
6680
6696
  event.preventDefault();
6681
6697
  };
@@ -6686,20 +6702,20 @@ var Survey = /** @class */ (function (_super) {
6686
6702
  var rootCss = this.survey.getRootCss();
6687
6703
  var cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
6688
6704
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables, lang: this.survey.locale || "en", dir: this.survey.localeDir },
6689
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_scroll__WEBPACK_IMPORTED_MODULE_14__.Scroll, { disabled: this.survey.rootScrollDisabled },
6690
- this.survey.needRenderIcons ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_svgbundle__WEBPACK_IMPORTED_MODULE_10__.SvgBundleComponent, null) : null,
6691
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_popup_popup_modal__WEBPACK_IMPORTED_MODULE_11__.PopupModal, null),
6705
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_scroll__WEBPACK_IMPORTED_MODULE_13__.Scroll, { disabled: this.survey.rootScrollDisabled },
6706
+ this.survey.needRenderIcons ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_svgbundle__WEBPACK_IMPORTED_MODULE_9__.SvgBundleComponent, null) : null,
6707
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_popup_popup_modal__WEBPACK_IMPORTED_MODULE_10__.PopupModal, null),
6692
6708
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.survey.wrapperFormCss },
6693
6709
  backgroundImage,
6694
6710
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("form", { onSubmit: onSubmit },
6695
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_scroll__WEBPACK_IMPORTED_MODULE_14__.Scroll, { disabled: this.survey.formScrollDisabled },
6711
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_scroll__WEBPACK_IMPORTED_MODULE_13__.Scroll, { disabled: this.survey.formScrollDisabled },
6696
6712
  customHeader,
6697
6713
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.css.container },
6698
6714
  header,
6699
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "header", needRenderWrapper: false }),
6715
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "header", needRenderWrapper: false }),
6700
6716
  renderResult,
6701
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "footer", needRenderWrapper: false })))),
6702
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_notifier__WEBPACK_IMPORTED_MODULE_8__.NotifierComponent, { notifier: this.survey.notifier })))));
6717
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "footer", needRenderWrapper: false })))),
6718
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_notifier__WEBPACK_IMPORTED_MODULE_7__.NotifierComponent, { notifier: this.survey.notifier })))));
6703
6719
  };
6704
6720
  Survey.prototype.renderElement = function () {
6705
6721
  return this.doRender();
@@ -6720,7 +6736,7 @@ var Survey = /** @class */ (function (_super) {
6720
6736
  var htmlValue = { __html: this.survey.processedCompletedHtml };
6721
6737
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
6722
6738
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { dangerouslySetInnerHTML: htmlValue, className: this.survey.completedCss }),
6723
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "completePage", needRenderWrapper: false })));
6739
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "completePage", needRenderWrapper: false })));
6724
6740
  };
6725
6741
  Survey.prototype.renderCompletedBefore = function () {
6726
6742
  var htmlValue = { __html: this.survey.processedCompletedBeforeHtml };
@@ -6742,18 +6758,23 @@ var Survey = /** @class */ (function (_super) {
6742
6758
  style.maxWidth = this.survey.renderedWidth;
6743
6759
  }
6744
6760
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.survey.bodyContainerCss },
6745
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "left" }),
6761
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "left" }),
6746
6762
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "sv-components-column sv-components-column--expandable" },
6747
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "center" }),
6763
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "center" }),
6748
6764
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { id: pageId, className: className, style: style },
6749
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "contentTop" }),
6765
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "contentTop" }),
6750
6766
  activePage,
6751
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "contentBottom" }),
6752
- this.survey.showBrandInfo ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_brand_info__WEBPACK_IMPORTED_MODULE_7__.BrandInfo, null) : null)),
6753
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "right" })));
6767
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "contentBottom" }),
6768
+ this.survey.showBrandInfo ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_brand_info__WEBPACK_IMPORTED_MODULE_6__.BrandInfo, null) : null)),
6769
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "right" })));
6754
6770
  };
6755
6771
  Survey.prototype.renderPage = function (page) {
6756
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(_page__WEBPACK_IMPORTED_MODULE_2__.SurveyPage, { survey: this.survey, page: page, css: this.css, creator: this }));
6772
+ return _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.createElement(this.survey.pageComponent || "sv-page", {
6773
+ survey: this.survey,
6774
+ page: page,
6775
+ css: this.css,
6776
+ creator: this,
6777
+ });
6757
6778
  };
6758
6779
  Survey.prototype.renderEmptySurvey = function () {
6759
6780
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.css.bodyEmpty }, this.survey.emptySurveyText);
@@ -6830,14 +6851,14 @@ var Survey = /** @class */ (function (_super) {
6830
6851
  };
6831
6852
  //ISurveyCreator
6832
6853
  Survey.prototype.createQuestionElement = function (question) {
6833
- return _reactquestion_factory__WEBPACK_IMPORTED_MODULE_5__.ReactQuestionFactory.Instance.createQuestion(question.isDefaultRendering() ? question.getTemplate() : question.getComponentName(), {
6854
+ return _reactquestion_factory__WEBPACK_IMPORTED_MODULE_4__.ReactQuestionFactory.Instance.createQuestion(question.isDefaultRendering() ? question.getTemplate() : question.getComponentName(), {
6834
6855
  question: question,
6835
6856
  isDisplayMode: question.isInputReadOnly,
6836
6857
  creator: this,
6837
6858
  });
6838
6859
  };
6839
6860
  Survey.prototype.renderError = function (key, error, cssClasses, element) {
6840
- return _element_factory__WEBPACK_IMPORTED_MODULE_6__.ReactElementFactory.Instance.createElement(this.survey.questionErrorComponent, { key: key, error: error, cssClasses: cssClasses, element: element });
6861
+ return _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.createElement(this.survey.questionErrorComponent, { key: key, error: error, cssClasses: cssClasses, element: element });
6841
6862
  };
6842
6863
  Survey.prototype.questionTitleLocation = function () {
6843
6864
  return this.survey.questionTitleLocation;
@@ -6846,9 +6867,9 @@ var Survey = /** @class */ (function (_super) {
6846
6867
  return this.survey.questionErrorLocation;
6847
6868
  };
6848
6869
  return Survey;
6849
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__.SurveyElementBase));
6870
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
6850
6871
 
6851
- _element_factory__WEBPACK_IMPORTED_MODULE_6__.ReactElementFactory.Instance.registerElement("survey", function (props) {
6872
+ _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.registerElement("survey", function (props) {
6852
6873
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Survey, props);
6853
6874
  });
6854
6875
  function attachKey2click(element, viewModel, options) {
@@ -7080,7 +7101,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
7080
7101
  var descriptionUnderInput = question.hasDescriptionUnderInput
7081
7102
  ? this.renderDescription()
7082
7103
  : null;
7083
- 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 },
7084
7105
  questionRender,
7085
7106
  comment,
7086
7107
  descriptionUnderInput));
@@ -7522,11 +7543,9 @@ __webpack_require__.r(__webpack_exports__);
7522
7543
  /* harmony export */ });
7523
7544
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
7524
7545
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
7525
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/reactquestion_element.tsx");
7526
- /* harmony import */ var _reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_comment */ "./src/reactquestion_comment.tsx");
7527
- /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/reactquestion_factory.tsx");
7528
- /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactsurveymodel */ "./src/reactsurveymodel.tsx");
7529
- /* 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");
7530
7549
  var __extends = (undefined && undefined.__extends) || (function () {
7531
7550
  var extendStatics = function (d, b) {
7532
7551
  extendStatics = Object.setPrototypeOf ||
@@ -7546,8 +7565,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
7546
7565
 
7547
7566
 
7548
7567
 
7549
-
7550
-
7551
7568
  var SurveyQuestionCheckbox = /** @class */ (function (_super) {
7552
7569
  __extends(SurveyQuestionCheckbox, _super);
7553
7570
  function SurveyQuestionCheckbox(props) {
@@ -7560,16 +7577,10 @@ var SurveyQuestionCheckbox = /** @class */ (function (_super) {
7560
7577
  enumerable: false,
7561
7578
  configurable: true
7562
7579
  });
7563
- SurveyQuestionCheckbox.prototype.renderElement = function () {
7564
- var _this = this;
7565
- var cssClasses = this.question.cssClasses;
7566
- 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,
7567
7582
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
7568
- this.getHeader(),
7569
- this.question.hasColumns
7570
- ? this.getColumnedBody(cssClasses)
7571
- : this.getBody(cssClasses),
7572
- this.getFooter()));
7583
+ this.getHeader());
7573
7584
  };
7574
7585
  SurveyQuestionCheckbox.prototype.getHeader = function () {
7575
7586
  var _this = this;
@@ -7578,163 +7589,22 @@ var SurveyQuestionCheckbox = /** @class */ (function (_super) {
7578
7589
  return _this.renderItem(item, false, _this.question.cssClasses);
7579
7590
  });
7580
7591
  }
7581
- };
7582
- SurveyQuestionCheckbox.prototype.getFooter = function () {
7583
- var _this = this;
7584
- if (this.question.hasFootItems) {
7585
- return this.question.footItems.map(function (item, ii) {
7586
- return _this.renderItem(item, false, _this.question.cssClasses);
7587
- });
7588
- }
7589
- };
7590
- SurveyQuestionCheckbox.prototype.getColumnedBody = function (cssClasses) {
7591
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootMultiColumn }, this.getColumns(cssClasses)));
7592
- };
7593
- SurveyQuestionCheckbox.prototype.getColumns = function (cssClasses) {
7594
- var _this = this;
7595
- return this.question.columns.map(function (column, ci) {
7596
- var items = column.map(function (item, ii) {
7597
- return _this.renderItem(item, ci === 0 && ii === 0, cssClasses, "" + ci + ii);
7598
- });
7599
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
7600
- });
7601
- };
7602
- SurveyQuestionCheckbox.prototype.getBody = function (cssClasses) {
7603
- if (this.question.blockedRow) {
7604
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
7605
- }
7606
- else {
7607
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, this.getItems(cssClasses, this.question.bodyItems));
7608
- }
7609
- };
7610
- SurveyQuestionCheckbox.prototype.getItems = function (cssClasses, choices) {
7611
- var renderedItems = [];
7612
- for (var i = 0; i < choices.length; i++) {
7613
- var item = choices[i];
7614
- var renderedItem = this.renderItem(item, i == 0, cssClasses, "" + i);
7615
- if (!!renderedItem) {
7616
- renderedItems.push(renderedItem);
7617
- }
7618
- }
7619
- return renderedItems;
7620
- };
7621
- Object.defineProperty(SurveyQuestionCheckbox.prototype, "textStyle", {
7622
- get: function () {
7623
- return null;
7624
- },
7625
- enumerable: false,
7626
- configurable: true
7627
- });
7628
- SurveyQuestionCheckbox.prototype.renderItem = function (item, isFirst, cssClasses, index) {
7629
- var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.createElement(this.question.itemComponent, {
7630
- key: item.value,
7631
- question: this.question,
7632
- cssClasses: cssClasses,
7633
- isDisplayMode: this.isDisplayMode,
7634
- item: item,
7635
- textStyle: this.textStyle,
7636
- index: index,
7637
- isFirst: isFirst,
7638
- });
7639
- var survey = this.question.survey;
7640
- var wrappedItem = null;
7641
- if (!!survey && !!renderedItem) {
7642
- wrappedItem = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__.ReactSurveyElementsWrapper.wrapItemValue(survey, renderedItem, this.question, item);
7643
- }
7644
- return wrappedItem !== null && wrappedItem !== void 0 ? wrappedItem : renderedItem;
7592
+ return null;
7645
7593
  };
7646
7594
  return SurveyQuestionCheckbox;
7647
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.SurveyQuestionElementBase));
7595
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectbase));
7648
7596
 
7649
7597
  var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
7650
7598
  __extends(SurveyQuestionCheckboxItem, _super);
7651
7599
  function SurveyQuestionCheckboxItem(props) {
7652
- var _this = _super.call(this, props) || this;
7653
- _this.handleOnChange = function (event) {
7654
- _this.question.clickItemHandler(_this.item, event.target.checked);
7655
- };
7656
- _this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
7657
- return _this;
7600
+ return _super.call(this, props) || this;
7658
7601
  }
7659
- SurveyQuestionCheckboxItem.prototype.getStateElement = function () {
7660
- return this.item;
7661
- };
7662
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "question", {
7663
- get: function () {
7664
- return this.props.question;
7665
- },
7666
- enumerable: false,
7667
- configurable: true
7668
- });
7669
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "item", {
7670
- get: function () {
7671
- return this.props.item;
7672
- },
7673
- enumerable: false,
7674
- configurable: true
7675
- });
7676
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "textStyle", {
7677
- get: function () {
7678
- return this.props.textStyle;
7679
- },
7680
- enumerable: false,
7681
- configurable: true
7682
- });
7683
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "isFirst", {
7684
- get: function () {
7685
- return this.props.isFirst;
7686
- },
7687
- enumerable: false,
7688
- configurable: true
7689
- });
7690
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "index", {
7691
- get: function () {
7692
- return this.props.index;
7693
- },
7694
- enumerable: false,
7695
- configurable: true
7696
- });
7697
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "hideCaption", {
7698
- get: function () {
7699
- return this.props.hideCaption === true;
7700
- },
7701
- enumerable: false,
7702
- configurable: true
7703
- });
7704
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "ariaLabel", {
7705
- get: function () {
7706
- return this.props.ariaLabel || null;
7707
- },
7708
- enumerable: false,
7709
- configurable: true
7710
- });
7711
- SurveyQuestionCheckboxItem.prototype.componentDidUpdate = function (prevProps, prevState) {
7712
- _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
7713
- if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
7714
- if (this.props.item) {
7715
- this.props.item.setRootElement(this.rootRef.current);
7716
- }
7717
- if (prevProps.item) {
7718
- prevProps.item.setRootElement(undefined);
7719
- }
7720
- }
7721
- };
7722
- SurveyQuestionCheckboxItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
7723
- if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
7724
- return false;
7725
- return (!this.question.customWidget ||
7726
- !!this.question.customWidgetData.isNeedRender ||
7727
- !!this.question.customWidget.widgetJson.isDefaultRender ||
7728
- !!this.question.customWidget.widgetJson.render);
7729
- };
7730
- SurveyQuestionCheckboxItem.prototype.canRender = function () {
7731
- return !!this.item && !!this.question;
7602
+ SurveyQuestionCheckboxItem.prototype.doOnItemChange = function (event) {
7603
+ this.question.clickItemHandler(this.item, event.target.checked);
7732
7604
  };
7733
- SurveyQuestionCheckboxItem.prototype.renderElement = function () {
7605
+ SurveyQuestionCheckboxItem.prototype.renderElementContent = function () {
7734
7606
  var isChecked = this.question.isItemSelected(this.item);
7735
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
7736
- this.renderCheckbox(isChecked, null),
7737
- this.renderComment());
7607
+ return this.renderCheckbox(isChecked);
7738
7608
  };
7739
7609
  Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "inputStyle", {
7740
7610
  get: function () {
@@ -7743,13 +7613,7 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
7743
7613
  enumerable: false,
7744
7614
  configurable: true
7745
7615
  });
7746
- SurveyQuestionCheckboxItem.prototype.renderComment = function () {
7747
- if (!this.item.isCommentShowing)
7748
- return null;
7749
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
7750
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__.SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
7751
- };
7752
- SurveyQuestionCheckboxItem.prototype.renderCheckbox = function (isChecked, otherItem) {
7616
+ SurveyQuestionCheckboxItem.prototype.renderCheckbox = function (isChecked) {
7753
7617
  var id = this.question.getItemId(this.item);
7754
7618
  var itemClass = this.question.getItemClass(this.item);
7755
7619
  var labelClass = this.question.getLabelClass(this.item);
@@ -7763,28 +7627,15 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
7763
7627
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("use", { xlinkHref: this.question.itemSvgIcon })) :
7764
7628
  null) :
7765
7629
  null,
7766
- itemLabel),
7767
- otherItem));
7768
- };
7769
- SurveyQuestionCheckboxItem.prototype.componentDidMount = function () {
7770
- _super.prototype.componentDidMount.call(this);
7771
- if (!this.question.isDesignMode) {
7772
- this.item.setRootElement(this.rootRef.current);
7773
- }
7774
- };
7775
- SurveyQuestionCheckboxItem.prototype.componentWillUnmount = function () {
7776
- _super.prototype.componentWillUnmount.call(this);
7777
- if (!this.question.isDesignMode) {
7778
- this.item.setRootElement(undefined);
7779
- }
7630
+ itemLabel)));
7780
7631
  };
7781
7632
  return SurveyQuestionCheckboxItem;
7782
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.ReactSurveyElement));
7633
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectBaseItem));
7783
7634
 
7784
- _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) {
7785
7636
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionCheckboxItem, props);
7786
7637
  });
7787
- _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) {
7788
7639
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionCheckbox, props);
7789
7640
  });
7790
7641
 
@@ -9355,7 +9206,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
9355
9206
  };
9356
9207
  SurveyQuestionMatrixDropdownBase.prototype.renderTableDiv = function () {
9357
9208
  var _this = this;
9358
- 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)); } },
9359
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); } })));
9360
9211
  };
9361
9212
  return SurveyQuestionMatrixDropdownBase;
@@ -9667,7 +9518,8 @@ var SurveyQuestionMatrixDynamicAddButton = /** @class */ (function (_super) {
9667
9518
  var addRowText = this.renderLocString(this.matrix.locAddRowText);
9668
9519
  var addButton = (react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", { className: this.matrix.getAddRowButtonCss(this.props.isEmptySection), type: "button", disabled: this.matrix.isInputReadOnly, onClick: this.matrix.isDesignMode ? undefined : this.handleOnRowAddClick },
9669
9520
  addRowText,
9670
- react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: this.props.cssClasses.iconAdd })));
9521
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: this.props.cssClasses.iconAdd }, this.cssClasses.iconAddId && react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", null,
9522
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("use", { xlinkHref: this.cssClasses.iconAddId })))));
9671
9523
  return (this.props.isEmptySection ? addButton : react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.props.cssClasses.footer }, addButton));
9672
9524
  };
9673
9525
  return SurveyQuestionMatrixDynamicAddButton;
@@ -10065,11 +9917,9 @@ __webpack_require__.r(__webpack_exports__);
10065
9917
  /* harmony export */ });
10066
9918
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
10067
9919
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
10068
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/reactquestion_element.tsx");
10069
- /* harmony import */ var _reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_comment */ "./src/reactquestion_comment.tsx");
10070
- /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/reactquestion_factory.tsx");
10071
- /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactsurveymodel */ "./src/reactsurveymodel.tsx");
10072
- /* 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");
10073
9923
  var __extends = (undefined && undefined.__extends) || (function () {
10074
9924
  var extendStatics = function (d, b) {
10075
9925
  extendStatics = Object.setPrototypeOf ||
@@ -10089,8 +9939,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
10089
9939
 
10090
9940
 
10091
9941
 
10092
-
10093
-
10094
9942
  var SurveyQuestionRadiogroup = /** @class */ (function (_super) {
10095
9943
  __extends(SurveyQuestionRadiogroup, _super);
10096
9944
  function SurveyQuestionRadiogroup(props) {
@@ -10103,97 +9951,29 @@ var SurveyQuestionRadiogroup = /** @class */ (function (_super) {
10103
9951
  enumerable: false,
10104
9952
  configurable: true
10105
9953
  });
10106
- SurveyQuestionRadiogroup.prototype.renderElement = function () {
10107
- var _this = this;
10108
- var cssClasses = this.question.cssClasses;
10109
- var clearButton = null;
10110
- if (this.question.showClearButtonInContent) {
10111
- clearButton = (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null,
10112
- 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 })));
10113
- }
10114
- 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 },
10115
- this.question.hasColumns
10116
- ? this.getColumnedBody(cssClasses)
10117
- : this.getBody(cssClasses),
10118
- this.getFooter(),
10119
- clearButton));
10120
- };
10121
9954
  SurveyQuestionRadiogroup.prototype.getFooter = function () {
10122
- var _this = this;
10123
- if (this.question.hasFootItems) {
10124
- return this.question.footItems.map(function (item, ii) {
10125
- return _this.renderItem(item, false, _this.question.cssClasses);
10126
- });
10127
- }
10128
- };
10129
- SurveyQuestionRadiogroup.prototype.getColumnedBody = function (cssClasses) {
10130
- 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());
10131
9958
  };
10132
- SurveyQuestionRadiogroup.prototype.getColumns = function (cssClasses) {
9959
+ SurveyQuestionRadiogroup.prototype.renderClearButton = function () {
10133
9960
  var _this = this;
10134
- var value = this.getStateValue();
10135
- return this.question.columns.map(function (column, ci) {
10136
- var items = column.map(function (item, ii) {
10137
- return _this.renderItem(item, value, cssClasses, "" + ci + ii);
10138
- });
10139
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
10140
- });
10141
- };
10142
- SurveyQuestionRadiogroup.prototype.getBody = function (cssClasses) {
10143
- if (this.question.blockedRow) {
10144
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
10145
- }
10146
- else {
10147
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, this.getItems(cssClasses, this.question.bodyItems));
10148
- }
10149
- };
10150
- SurveyQuestionRadiogroup.prototype.getItems = function (cssClasses, choices) {
10151
- var items = [];
10152
- var value = this.getStateValue();
10153
- for (var i = 0; i < choices.length; i++) {
10154
- var item = choices[i];
10155
- var renderedItem = this.renderItem(item, value, cssClasses, "" + i);
10156
- items.push(renderedItem);
10157
- }
10158
- return items;
10159
- };
10160
- Object.defineProperty(SurveyQuestionRadiogroup.prototype, "textStyle", {
10161
- get: function () {
10162
- return null; //{ display: "inline", position: "static" };
10163
- },
10164
- enumerable: false,
10165
- configurable: true
10166
- });
10167
- SurveyQuestionRadiogroup.prototype.renderItem = function (item, value, cssClasses, index) {
10168
- var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.createElement(this.question.itemComponent, {
10169
- key: item.value,
10170
- question: this.question,
10171
- cssClasses: cssClasses,
10172
- isDisplayMode: this.isDisplayMode,
10173
- item: item,
10174
- textStyle: this.textStyle,
10175
- index: index,
10176
- isChecked: value === item.value,
10177
- });
10178
- var survey = this.question.survey;
10179
- var wrappedItem = null;
10180
- if (!!survey) {
10181
- wrappedItem = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__.ReactSurveyElementsWrapper.wrapItemValue(survey, renderedItem, this.question, item);
10182
- }
10183
- 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 })));
10184
9965
  };
10185
9966
  SurveyQuestionRadiogroup.prototype.getStateValue = function () {
10186
9967
  return !this.question.isEmpty() ? this.question.renderedValue : "";
10187
9968
  };
9969
+ SurveyQuestionRadiogroup.prototype.isItemChecked = function (item, value) { return item.value === value; };
10188
9970
  return SurveyQuestionRadiogroup;
10189
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.SurveyQuestionElementBase));
9971
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectbase));
10190
9972
 
10191
9973
  var SurveyQuestionRadioItem = /** @class */ (function (_super) {
10192
9974
  __extends(SurveyQuestionRadioItem, _super);
10193
9975
  function SurveyQuestionRadioItem(props) {
10194
9976
  var _this = _super.call(this, props) || this;
10195
- _this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
10196
- _this.handleOnChange = _this.handleOnChange.bind(_this);
10197
9977
  _this.handleOnMouseDown = _this.handleOnMouseDown.bind(_this);
10198
9978
  return _this;
10199
9979
  }
@@ -10207,88 +9987,21 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
10207
9987
  enumerable: false,
10208
9988
  configurable: true
10209
9989
  });
10210
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "item", {
10211
- get: function () {
10212
- return this.props.item;
10213
- },
10214
- enumerable: false,
10215
- configurable: true
10216
- });
10217
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "textStyle", {
9990
+ Object.defineProperty(SurveyQuestionRadioItem.prototype, "isChecked", {
10218
9991
  get: function () {
10219
- return this.props.textStyle;
9992
+ return this.props.isChecked;
10220
9993
  },
10221
9994
  enumerable: false,
10222
9995
  configurable: true
10223
9996
  });
10224
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "index", {
10225
- get: function () {
10226
- return this.props.index;
10227
- },
10228
- enumerable: false,
10229
- configurable: true
10230
- });
10231
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "isChecked", {
10232
- get: function () {
10233
- return this.props.isChecked;
10234
- },
10235
- enumerable: false,
10236
- configurable: true
10237
- });
10238
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "hideCaption", {
10239
- get: function () {
10240
- return this.props.hideCaption === true;
10241
- },
10242
- enumerable: false,
10243
- configurable: true
10244
- });
10245
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "ariaLabel", {
10246
- get: function () {
10247
- return this.props.ariaLabel || null;
10248
- },
10249
- enumerable: false,
10250
- configurable: true
10251
- });
10252
- SurveyQuestionRadioItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
10253
- if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
10254
- return false;
10255
- if (!this.question)
10256
- return false;
10257
- return (!this.question.customWidget ||
10258
- !!this.question.customWidgetData.isNeedRender ||
10259
- !!this.question.customWidget.widgetJson.isDefaultRender ||
10260
- !!this.question.customWidget.widgetJson.render);
10261
- };
10262
- SurveyQuestionRadioItem.prototype.handleOnChange = function (event) {
9997
+ SurveyQuestionRadioItem.prototype.doOnItemChange = function (event) {
10263
9998
  this.question.clickItemHandler(this.item);
10264
9999
  };
10265
10000
  SurveyQuestionRadioItem.prototype.handleOnMouseDown = function (event) {
10266
10001
  this.question.onMouseDown();
10267
10002
  };
10268
- SurveyQuestionRadioItem.prototype.canRender = function () {
10269
- return !!this.question && !!this.item;
10270
- };
10271
- SurveyQuestionRadioItem.prototype.componentDidUpdate = function (prevProps, prevState) {
10272
- _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
10273
- if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
10274
- if (this.props.item) {
10275
- this.props.item.setRootElement(this.rootRef.current);
10276
- }
10277
- if (prevProps.item) {
10278
- prevProps.item.setRootElement(undefined);
10279
- }
10280
- }
10281
- };
10282
- SurveyQuestionRadioItem.prototype.renderElement = function () {
10283
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
10284
- this.renderRadioButton(),
10285
- this.renderComment());
10286
- };
10287
- SurveyQuestionRadioItem.prototype.renderComment = function () {
10288
- if (!this.item.isCommentShowing)
10289
- return null;
10290
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
10291
- 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();
10292
10005
  };
10293
10006
  SurveyQuestionRadioItem.prototype.renderRadioButton = function () {
10294
10007
  var itemClass = this.question.getItemClass(this.item);
@@ -10306,25 +10019,13 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
10306
10019
  null,
10307
10020
  itemLabel)));
10308
10021
  };
10309
- SurveyQuestionRadioItem.prototype.componentDidMount = function () {
10310
- _super.prototype.componentDidMount.call(this);
10311
- if (!this.question.isDesignMode) {
10312
- this.item.setRootElement(this.rootRef.current);
10313
- }
10314
- };
10315
- SurveyQuestionRadioItem.prototype.componentWillUnmount = function () {
10316
- _super.prototype.componentWillUnmount.call(this);
10317
- if (!this.question.isDesignMode) {
10318
- this.item.setRootElement(undefined);
10319
- }
10320
- };
10321
10022
  return SurveyQuestionRadioItem;
10322
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.ReactSurveyElement));
10023
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectBaseItem));
10323
10024
 
10324
- _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) {
10325
10026
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRadioItem, props);
10326
10027
  });
10327
- _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) {
10328
10029
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRadiogroup, props);
10329
10030
  });
10330
10031
 
@@ -10677,6 +10378,276 @@ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__.ReactQuestionFactory.Instanc
10677
10378
  });
10678
10379
 
10679
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
+
10680
10651
  /***/ }),
10681
10652
 
10682
10653
  /***/ "./src/reactquestion_singleinputsummary.tsx":
@@ -11456,7 +11427,7 @@ var SurveyQuestionSignaturePad = /** @class */ (function (_super) {
11456
11427
  return null;
11457
11428
  var cssClasses = this.question.cssClasses;
11458
11429
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.controls },
11459
- 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(); } },
11460
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"),
11461
11432
  " "));
11462
11433
  };
@@ -12144,7 +12115,7 @@ __webpack_require__.r(__webpack_exports__);
12144
12115
 
12145
12116
 
12146
12117
 
12147
- (0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.3.8"), "survey-react-ui");
12118
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.3.10"), "survey-react-ui");
12148
12119
 
12149
12120
  })();
12150
12121