survey-js-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.
package/survey-js-ui.js CHANGED
@@ -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
  */
@@ -23,7 +23,7 @@ return /******/ (() => { // webpackBootstrap
23
23
  /***/ (function(module) {
24
24
 
25
25
  /*!
26
- * surveyjs - Survey JavaScript library v2.3.9
26
+ * surveyjs - Survey JavaScript library v2.3.10
27
27
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
28
28
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
29
29
  */
@@ -39,7 +39,7 @@ return /******/ (() => { // webpackBootstrap
39
39
  /*!************************************!*\
40
40
  !*** ./src/images-v1/ sync \.svg$ ***!
41
41
  \************************************/
42
- /***/ ((module, __unused_webpack_exports, __nested_webpack_require_869__) => {
42
+ /***/ ((module, __unused_webpack_exports, __nested_webpack_require_870__) => {
43
43
 
44
44
  var map = {
45
45
  "./ModernBooleanCheckChecked.svg": "./src/images-v1/ModernBooleanCheckChecked.svg",
@@ -108,10 +108,10 @@ var map = {
108
108
 
109
109
  function webpackContext(req) {
110
110
  var id = webpackContextResolve(req);
111
- return __nested_webpack_require_869__(id);
111
+ return __nested_webpack_require_870__(id);
112
112
  }
113
113
  function webpackContextResolve(req) {
114
- if(!__nested_webpack_require_869__.o(map, req)) {
114
+ if(!__nested_webpack_require_870__.o(map, req)) {
115
115
  var e = new Error("Cannot find module '" + req + "'");
116
116
  e.code = 'MODULE_NOT_FOUND';
117
117
  throw e;
@@ -743,7 +743,7 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
743
743
  /******/ var __webpack_module_cache__ = {};
744
744
  /******/
745
745
  /******/ // The require function
746
- /******/ function __nested_webpack_require_51423__(moduleId) {
746
+ /******/ function __nested_webpack_require_51424__(moduleId) {
747
747
  /******/ // Check if module is in cache
748
748
  /******/ var cachedModule = __webpack_module_cache__[moduleId];
749
749
  /******/ if (cachedModule !== undefined) {
@@ -757,7 +757,7 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
757
757
  /******/ };
758
758
  /******/
759
759
  /******/ // Execute the module function
760
- /******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_51423__);
760
+ /******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_51424__);
761
761
  /******/
762
762
  /******/ // Return the exports of the module
763
763
  /******/ return module.exports;
@@ -767,9 +767,9 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
767
767
  /******/ /* webpack/runtime/define property getters */
768
768
  /******/ (() => {
769
769
  /******/ // define getter functions for harmony exports
770
- /******/ __nested_webpack_require_51423__.d = (exports, definition) => {
770
+ /******/ __nested_webpack_require_51424__.d = (exports, definition) => {
771
771
  /******/ for(var key in definition) {
772
- /******/ if(__nested_webpack_require_51423__.o(definition, key) && !__nested_webpack_require_51423__.o(exports, key)) {
772
+ /******/ if(__nested_webpack_require_51424__.o(definition, key) && !__nested_webpack_require_51424__.o(exports, key)) {
773
773
  /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
774
774
  /******/ }
775
775
  /******/ }
@@ -778,13 +778,13 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
778
778
  /******/
779
779
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
780
780
  /******/ (() => {
781
- /******/ __nested_webpack_require_51423__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
781
+ /******/ __nested_webpack_require_51424__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
782
782
  /******/ })();
783
783
  /******/
784
784
  /******/ /* webpack/runtime/make namespace object */
785
785
  /******/ (() => {
786
786
  /******/ // define __esModule on exports
787
- /******/ __nested_webpack_require_51423__.r = (exports) => {
787
+ /******/ __nested_webpack_require_51424__.r = (exports) => {
788
788
  /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
789
789
  /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
790
790
  /******/ }
@@ -800,13 +800,13 @@ var __nested_webpack_exports__ = {};
800
800
  /*!************************!*\
801
801
  !*** ./src/iconsV1.ts ***!
802
802
  \************************/
803
- __nested_webpack_require_51423__.r(__nested_webpack_exports__);
804
- /* harmony export */ __nested_webpack_require_51423__.d(__nested_webpack_exports__, {
803
+ __nested_webpack_require_51424__.r(__nested_webpack_exports__);
804
+ /* harmony export */ __nested_webpack_require_51424__.d(__nested_webpack_exports__, {
805
805
  /* harmony export */ icons: () => (/* binding */ icons)
806
806
  /* harmony export */ });
807
807
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
808
808
  //@ts-ignore
809
- var path = __nested_webpack_require_51423__("./src/images-v1 sync recursive \\.svg$");
809
+ var path = __nested_webpack_require_51424__("./src/images-v1 sync recursive \\.svg$");
810
810
  var icons = {};
811
811
  path.keys().forEach(function (key) {
812
812
  icons[key.substring(2, key.length - 4).toLowerCase()] = path(key);
@@ -830,7 +830,7 @@ path.keys().forEach(function (key) {
830
830
  /***/ (function(module) {
831
831
 
832
832
  /*!
833
- * surveyjs - Survey JavaScript library v2.3.9
833
+ * surveyjs - Survey JavaScript library v2.3.10
834
834
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
835
835
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
836
836
  */
@@ -846,7 +846,7 @@ return /******/ (() => { // webpackBootstrap
846
846
  /*!************************************!*\
847
847
  !*** ./src/images-v2/ sync \.svg$ ***!
848
848
  \************************************/
849
- /***/ ((module, __unused_webpack_exports, __nested_webpack_require_869__) => {
849
+ /***/ ((module, __unused_webpack_exports, __nested_webpack_require_870__) => {
850
850
 
851
851
  var map = {
852
852
  "./ModernBooleanCheckChecked.svg": "./src/images-v2/ModernBooleanCheckChecked.svg",
@@ -915,10 +915,10 @@ var map = {
915
915
 
916
916
  function webpackContext(req) {
917
917
  var id = webpackContextResolve(req);
918
- return __nested_webpack_require_869__(id);
918
+ return __nested_webpack_require_870__(id);
919
919
  }
920
920
  function webpackContextResolve(req) {
921
- if(!__nested_webpack_require_869__.o(map, req)) {
921
+ if(!__nested_webpack_require_870__.o(map, req)) {
922
922
  var e = new Error("Cannot find module '" + req + "'");
923
923
  e.code = 'MODULE_NOT_FOUND';
924
924
  throw e;
@@ -1550,7 +1550,7 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
1550
1550
  /******/ var __webpack_module_cache__ = {};
1551
1551
  /******/
1552
1552
  /******/ // The require function
1553
- /******/ function __nested_webpack_require_64535__(moduleId) {
1553
+ /******/ function __nested_webpack_require_64536__(moduleId) {
1554
1554
  /******/ // Check if module is in cache
1555
1555
  /******/ var cachedModule = __webpack_module_cache__[moduleId];
1556
1556
  /******/ if (cachedModule !== undefined) {
@@ -1564,7 +1564,7 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
1564
1564
  /******/ };
1565
1565
  /******/
1566
1566
  /******/ // Execute the module function
1567
- /******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_64535__);
1567
+ /******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_64536__);
1568
1568
  /******/
1569
1569
  /******/ // Return the exports of the module
1570
1570
  /******/ return module.exports;
@@ -1574,9 +1574,9 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
1574
1574
  /******/ /* webpack/runtime/define property getters */
1575
1575
  /******/ (() => {
1576
1576
  /******/ // define getter functions for harmony exports
1577
- /******/ __nested_webpack_require_64535__.d = (exports, definition) => {
1577
+ /******/ __nested_webpack_require_64536__.d = (exports, definition) => {
1578
1578
  /******/ for(var key in definition) {
1579
- /******/ if(__nested_webpack_require_64535__.o(definition, key) && !__nested_webpack_require_64535__.o(exports, key)) {
1579
+ /******/ if(__nested_webpack_require_64536__.o(definition, key) && !__nested_webpack_require_64536__.o(exports, key)) {
1580
1580
  /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1581
1581
  /******/ }
1582
1582
  /******/ }
@@ -1585,13 +1585,13 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
1585
1585
  /******/
1586
1586
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
1587
1587
  /******/ (() => {
1588
- /******/ __nested_webpack_require_64535__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1588
+ /******/ __nested_webpack_require_64536__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1589
1589
  /******/ })();
1590
1590
  /******/
1591
1591
  /******/ /* webpack/runtime/make namespace object */
1592
1592
  /******/ (() => {
1593
1593
  /******/ // define __esModule on exports
1594
- /******/ __nested_webpack_require_64535__.r = (exports) => {
1594
+ /******/ __nested_webpack_require_64536__.r = (exports) => {
1595
1595
  /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1596
1596
  /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1597
1597
  /******/ }
@@ -1607,13 +1607,13 @@ var __nested_webpack_exports__ = {};
1607
1607
  /*!************************!*\
1608
1608
  !*** ./src/iconsV2.ts ***!
1609
1609
  \************************/
1610
- __nested_webpack_require_64535__.r(__nested_webpack_exports__);
1611
- /* harmony export */ __nested_webpack_require_64535__.d(__nested_webpack_exports__, {
1610
+ __nested_webpack_require_64536__.r(__nested_webpack_exports__);
1611
+ /* harmony export */ __nested_webpack_require_64536__.d(__nested_webpack_exports__, {
1612
1612
  /* harmony export */ icons: () => (/* binding */ icons)
1613
1613
  /* harmony export */ });
1614
1614
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1615
1615
  //@ts-ignore
1616
- var path = __nested_webpack_require_64535__("./src/images-v2 sync recursive \\.svg$");
1616
+ var path = __nested_webpack_require_64536__("./src/images-v2 sync recursive \\.svg$");
1617
1617
  var icons = {};
1618
1618
  path.keys().forEach(function (key) {
1619
1619
  icons[key.substring(2, key.length - 4).toLowerCase()] = path(key);
@@ -5296,9 +5296,20 @@ var SliderLabelItem = /** @class */ (function (_super) {
5296
5296
  SliderLabelItem.prototype.renderElement = function () {
5297
5297
  var _a = this.question, cssClasses = _a.cssClasses, handleLabelPointerUp = _a.handleLabelPointerUp, getLabelCss = _a.getLabelCss, getPercent = _a.getPercent;
5298
5298
  var _b = this.item, value = _b.value, locText = _b.locText;
5299
+ var labelText = null;
5300
+ var labelTextSecondary = null;
5301
+ if (this.item.showValue) {
5302
+ labelText = react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelText }, this.item.value);
5303
+ labelTextSecondary = react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelTextSecondaryMode }, this.renderLocString(locText));
5304
+ }
5305
+ else {
5306
+ labelText = react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelText }, this.renderLocString(locText));
5307
+ }
5299
5308
  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); } },
5300
5309
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelTick }),
5301
- react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelText }, this.renderLocString(locText)));
5310
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelTextContainer },
5311
+ labelText,
5312
+ labelTextSecondary));
5302
5313
  };
5303
5314
  return SliderLabelItem;
5304
5315
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
@@ -8531,7 +8542,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
8531
8542
  var descriptionUnderInput = question.hasDescriptionUnderInput
8532
8543
  ? this.renderDescription()
8533
8544
  : null;
8534
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: question.cssContent || undefined, style: contentStyle, "aria-hidden": question.contentAriaHidden, role: "presentation" },
8545
+ 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 },
8535
8546
  questionRender,
8536
8547
  comment,
8537
8548
  descriptionUnderInput));
@@ -8973,11 +8984,9 @@ __webpack_require__.r(__webpack_exports__);
8973
8984
  /* harmony export */ SurveyQuestionCheckboxItem: () => (/* binding */ SurveyQuestionCheckboxItem)
8974
8985
  /* harmony export */ });
8975
8986
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact/compat/dist/compat.module.js");
8976
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "../survey-react-ui/src/reactquestion_element.tsx");
8977
- /* harmony import */ var _reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_comment */ "../survey-react-ui/src/reactquestion_comment.tsx");
8978
- /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_factory */ "../survey-react-ui/src/reactquestion_factory.tsx");
8979
- /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactsurveymodel */ "../survey-react-ui/src/reactsurveymodel.tsx");
8980
- /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./element-factory */ "../survey-react-ui/src/element-factory.tsx");
8987
+ /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_factory */ "../survey-react-ui/src/reactquestion_factory.tsx");
8988
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-factory */ "../survey-react-ui/src/element-factory.tsx");
8989
+ /* harmony import */ var _reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_selectbase */ "../survey-react-ui/src/reactquestion_selectbase.tsx");
8981
8990
  var __extends = (undefined && undefined.__extends) || (function () {
8982
8991
  var extendStatics = function (d, b) {
8983
8992
  extendStatics = Object.setPrototypeOf ||
@@ -8997,8 +9006,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
8997
9006
 
8998
9007
 
8999
9008
 
9000
-
9001
-
9002
9009
  var SurveyQuestionCheckbox = /** @class */ (function (_super) {
9003
9010
  __extends(SurveyQuestionCheckbox, _super);
9004
9011
  function SurveyQuestionCheckbox(props) {
@@ -9011,16 +9018,10 @@ var SurveyQuestionCheckbox = /** @class */ (function (_super) {
9011
9018
  enumerable: false,
9012
9019
  configurable: true
9013
9020
  });
9014
- SurveyQuestionCheckbox.prototype.renderElement = function () {
9015
- var _this = this;
9016
- var cssClasses = this.question.cssClasses;
9017
- 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 },
9021
+ SurveyQuestionCheckbox.prototype.renderHeader = function () {
9022
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
9018
9023
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
9019
- this.getHeader(),
9020
- this.question.hasColumns
9021
- ? this.getColumnedBody(cssClasses)
9022
- : this.getBody(cssClasses),
9023
- this.getFooter()));
9024
+ this.getHeader());
9024
9025
  };
9025
9026
  SurveyQuestionCheckbox.prototype.getHeader = function () {
9026
9027
  var _this = this;
@@ -9029,163 +9030,22 @@ var SurveyQuestionCheckbox = /** @class */ (function (_super) {
9029
9030
  return _this.renderItem(item, false, _this.question.cssClasses);
9030
9031
  });
9031
9032
  }
9032
- };
9033
- SurveyQuestionCheckbox.prototype.getFooter = function () {
9034
- var _this = this;
9035
- if (this.question.hasFootItems) {
9036
- return this.question.footItems.map(function (item, ii) {
9037
- return _this.renderItem(item, false, _this.question.cssClasses);
9038
- });
9039
- }
9040
- };
9041
- SurveyQuestionCheckbox.prototype.getColumnedBody = function (cssClasses) {
9042
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootMultiColumn }, this.getColumns(cssClasses)));
9043
- };
9044
- SurveyQuestionCheckbox.prototype.getColumns = function (cssClasses) {
9045
- var _this = this;
9046
- return this.question.columns.map(function (column, ci) {
9047
- var items = column.map(function (item, ii) {
9048
- return _this.renderItem(item, ci === 0 && ii === 0, cssClasses, "" + ci + ii);
9049
- });
9050
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
9051
- });
9052
- };
9053
- SurveyQuestionCheckbox.prototype.getBody = function (cssClasses) {
9054
- if (this.question.blockedRow) {
9055
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
9056
- }
9057
- else {
9058
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, this.getItems(cssClasses, this.question.bodyItems));
9059
- }
9060
- };
9061
- SurveyQuestionCheckbox.prototype.getItems = function (cssClasses, choices) {
9062
- var renderedItems = [];
9063
- for (var i = 0; i < choices.length; i++) {
9064
- var item = choices[i];
9065
- var renderedItem = this.renderItem(item, i == 0, cssClasses, "" + i);
9066
- if (!!renderedItem) {
9067
- renderedItems.push(renderedItem);
9068
- }
9069
- }
9070
- return renderedItems;
9071
- };
9072
- Object.defineProperty(SurveyQuestionCheckbox.prototype, "textStyle", {
9073
- get: function () {
9074
- return null;
9075
- },
9076
- enumerable: false,
9077
- configurable: true
9078
- });
9079
- SurveyQuestionCheckbox.prototype.renderItem = function (item, isFirst, cssClasses, index) {
9080
- var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.createElement(this.question.itemComponent, {
9081
- key: item.value,
9082
- question: this.question,
9083
- cssClasses: cssClasses,
9084
- isDisplayMode: this.isDisplayMode,
9085
- item: item,
9086
- textStyle: this.textStyle,
9087
- index: index,
9088
- isFirst: isFirst,
9089
- });
9090
- var survey = this.question.survey;
9091
- var wrappedItem = null;
9092
- if (!!survey && !!renderedItem) {
9093
- wrappedItem = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__.ReactSurveyElementsWrapper.wrapItemValue(survey, renderedItem, this.question, item);
9094
- }
9095
- return wrappedItem !== null && wrappedItem !== void 0 ? wrappedItem : renderedItem;
9033
+ return null;
9096
9034
  };
9097
9035
  return SurveyQuestionCheckbox;
9098
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.SurveyQuestionElementBase));
9036
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectbase));
9099
9037
 
9100
9038
  var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
9101
9039
  __extends(SurveyQuestionCheckboxItem, _super);
9102
9040
  function SurveyQuestionCheckboxItem(props) {
9103
- var _this = _super.call(this, props) || this;
9104
- _this.handleOnChange = function (event) {
9105
- _this.question.clickItemHandler(_this.item, event.target.checked);
9106
- };
9107
- _this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
9108
- return _this;
9041
+ return _super.call(this, props) || this;
9109
9042
  }
9110
- SurveyQuestionCheckboxItem.prototype.getStateElement = function () {
9111
- return this.item;
9112
- };
9113
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "question", {
9114
- get: function () {
9115
- return this.props.question;
9116
- },
9117
- enumerable: false,
9118
- configurable: true
9119
- });
9120
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "item", {
9121
- get: function () {
9122
- return this.props.item;
9123
- },
9124
- enumerable: false,
9125
- configurable: true
9126
- });
9127
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "textStyle", {
9128
- get: function () {
9129
- return this.props.textStyle;
9130
- },
9131
- enumerable: false,
9132
- configurable: true
9133
- });
9134
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "isFirst", {
9135
- get: function () {
9136
- return this.props.isFirst;
9137
- },
9138
- enumerable: false,
9139
- configurable: true
9140
- });
9141
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "index", {
9142
- get: function () {
9143
- return this.props.index;
9144
- },
9145
- enumerable: false,
9146
- configurable: true
9147
- });
9148
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "hideCaption", {
9149
- get: function () {
9150
- return this.props.hideCaption === true;
9151
- },
9152
- enumerable: false,
9153
- configurable: true
9154
- });
9155
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "ariaLabel", {
9156
- get: function () {
9157
- return this.props.ariaLabel || null;
9158
- },
9159
- enumerable: false,
9160
- configurable: true
9161
- });
9162
- SurveyQuestionCheckboxItem.prototype.componentDidUpdate = function (prevProps, prevState) {
9163
- _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
9164
- if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
9165
- if (this.props.item) {
9166
- this.props.item.setRootElement(this.rootRef.current);
9167
- }
9168
- if (prevProps.item) {
9169
- prevProps.item.setRootElement(undefined);
9170
- }
9171
- }
9172
- };
9173
- SurveyQuestionCheckboxItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
9174
- if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
9175
- return false;
9176
- return (!this.question.customWidget ||
9177
- !!this.question.customWidgetData.isNeedRender ||
9178
- !!this.question.customWidget.widgetJson.isDefaultRender ||
9179
- !!this.question.customWidget.widgetJson.render);
9180
- };
9181
- SurveyQuestionCheckboxItem.prototype.canRender = function () {
9182
- return !!this.item && !!this.question;
9043
+ SurveyQuestionCheckboxItem.prototype.doOnItemChange = function (event) {
9044
+ this.question.clickItemHandler(this.item, event.target.checked);
9183
9045
  };
9184
- SurveyQuestionCheckboxItem.prototype.renderElement = function () {
9046
+ SurveyQuestionCheckboxItem.prototype.renderElementContent = function () {
9185
9047
  var isChecked = this.question.isItemSelected(this.item);
9186
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
9187
- this.renderCheckbox(isChecked, null),
9188
- this.renderComment());
9048
+ return this.renderCheckbox(isChecked);
9189
9049
  };
9190
9050
  Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "inputStyle", {
9191
9051
  get: function () {
@@ -9194,13 +9054,7 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
9194
9054
  enumerable: false,
9195
9055
  configurable: true
9196
9056
  });
9197
- SurveyQuestionCheckboxItem.prototype.renderComment = function () {
9198
- if (!this.item.isCommentShowing)
9199
- return null;
9200
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
9201
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__.SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
9202
- };
9203
- SurveyQuestionCheckboxItem.prototype.renderCheckbox = function (isChecked, otherItem) {
9057
+ SurveyQuestionCheckboxItem.prototype.renderCheckbox = function (isChecked) {
9204
9058
  var id = this.question.getItemId(this.item);
9205
9059
  var itemClass = this.question.getItemClass(this.item);
9206
9060
  var labelClass = this.question.getLabelClass(this.item);
@@ -9214,28 +9068,15 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
9214
9068
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("use", { xlinkHref: this.question.itemSvgIcon })) :
9215
9069
  null) :
9216
9070
  null,
9217
- itemLabel),
9218
- otherItem));
9219
- };
9220
- SurveyQuestionCheckboxItem.prototype.componentDidMount = function () {
9221
- _super.prototype.componentDidMount.call(this);
9222
- if (!this.question.isDesignMode) {
9223
- this.item.setRootElement(this.rootRef.current);
9224
- }
9225
- };
9226
- SurveyQuestionCheckboxItem.prototype.componentWillUnmount = function () {
9227
- _super.prototype.componentWillUnmount.call(this);
9228
- if (!this.question.isDesignMode) {
9229
- this.item.setRootElement(undefined);
9230
- }
9071
+ itemLabel)));
9231
9072
  };
9232
9073
  return SurveyQuestionCheckboxItem;
9233
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.ReactSurveyElement));
9074
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectBaseItem));
9234
9075
 
9235
- _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.registerElement("survey-checkbox-item", function (props) {
9076
+ _element_factory__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.registerElement("survey-checkbox-item", function (props) {
9236
9077
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionCheckboxItem, props);
9237
9078
  });
9238
- _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__.ReactQuestionFactory.Instance.registerQuestion("checkbox", function (props) {
9079
+ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_1__.ReactQuestionFactory.Instance.registerQuestion("checkbox", function (props) {
9239
9080
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionCheckbox, props);
9240
9081
  });
9241
9082
 
@@ -10807,7 +10648,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
10807
10648
  };
10808
10649
  SurveyQuestionMatrixDropdownBase.prototype.renderTableDiv = function () {
10809
10650
  var _this = this;
10810
- 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)); } },
10651
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.tableWrapper, ref: function (root) { return (_this.setControl(root)); } },
10811
10652
  react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionMatrixTable, { question: this.question, creator: this.creator, wrapCell: function (cell, element, reason) { return _this.wrapCell(cell, element, reason); } })));
10812
10653
  };
10813
10654
  return SurveyQuestionMatrixDropdownBase;
@@ -11518,11 +11359,9 @@ __webpack_require__.r(__webpack_exports__);
11518
11359
  /* harmony export */ SurveyQuestionRadiogroup: () => (/* binding */ SurveyQuestionRadiogroup)
11519
11360
  /* harmony export */ });
11520
11361
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact/compat/dist/compat.module.js");
11521
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "../survey-react-ui/src/reactquestion_element.tsx");
11522
- /* harmony import */ var _reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_comment */ "../survey-react-ui/src/reactquestion_comment.tsx");
11523
- /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_factory */ "../survey-react-ui/src/reactquestion_factory.tsx");
11524
- /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactsurveymodel */ "../survey-react-ui/src/reactsurveymodel.tsx");
11525
- /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./element-factory */ "../survey-react-ui/src/element-factory.tsx");
11362
+ /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_factory */ "../survey-react-ui/src/reactquestion_factory.tsx");
11363
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-factory */ "../survey-react-ui/src/element-factory.tsx");
11364
+ /* harmony import */ var _reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_selectbase */ "../survey-react-ui/src/reactquestion_selectbase.tsx");
11526
11365
  var __extends = (undefined && undefined.__extends) || (function () {
11527
11366
  var extendStatics = function (d, b) {
11528
11367
  extendStatics = Object.setPrototypeOf ||
@@ -11542,8 +11381,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
11542
11381
 
11543
11382
 
11544
11383
 
11545
-
11546
-
11547
11384
  var SurveyQuestionRadiogroup = /** @class */ (function (_super) {
11548
11385
  __extends(SurveyQuestionRadiogroup, _super);
11549
11386
  function SurveyQuestionRadiogroup(props) {
@@ -11556,97 +11393,29 @@ var SurveyQuestionRadiogroup = /** @class */ (function (_super) {
11556
11393
  enumerable: false,
11557
11394
  configurable: true
11558
11395
  });
11559
- SurveyQuestionRadiogroup.prototype.renderElement = function () {
11560
- var _this = this;
11561
- var cssClasses = this.question.cssClasses;
11562
- var clearButton = null;
11563
- if (this.question.showClearButtonInContent) {
11564
- clearButton = (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null,
11565
- 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 })));
11566
- }
11567
- 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 },
11568
- this.question.hasColumns
11569
- ? this.getColumnedBody(cssClasses)
11570
- : this.getBody(cssClasses),
11571
- this.getFooter(),
11572
- clearButton));
11573
- };
11574
11396
  SurveyQuestionRadiogroup.prototype.getFooter = function () {
11575
- var _this = this;
11576
- if (this.question.hasFootItems) {
11577
- return this.question.footItems.map(function (item, ii) {
11578
- return _this.renderItem(item, false, _this.question.cssClasses);
11579
- });
11580
- }
11581
- };
11582
- SurveyQuestionRadiogroup.prototype.getColumnedBody = function (cssClasses) {
11583
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootMultiColumn }, this.getColumns(cssClasses)));
11397
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
11398
+ _super.prototype.getFooter.call(this),
11399
+ this.renderClearButton());
11584
11400
  };
11585
- SurveyQuestionRadiogroup.prototype.getColumns = function (cssClasses) {
11401
+ SurveyQuestionRadiogroup.prototype.renderClearButton = function () {
11586
11402
  var _this = this;
11587
- var value = this.getStateValue();
11588
- return this.question.columns.map(function (column, ci) {
11589
- var items = column.map(function (item, ii) {
11590
- return _this.renderItem(item, value, cssClasses, "" + ci + ii);
11591
- });
11592
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
11593
- });
11594
- };
11595
- SurveyQuestionRadiogroup.prototype.getBody = function (cssClasses) {
11596
- if (this.question.blockedRow) {
11597
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
11598
- }
11599
- else {
11600
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, this.getItems(cssClasses, this.question.bodyItems));
11601
- }
11602
- };
11603
- SurveyQuestionRadiogroup.prototype.getItems = function (cssClasses, choices) {
11604
- var items = [];
11605
- var value = this.getStateValue();
11606
- for (var i = 0; i < choices.length; i++) {
11607
- var item = choices[i];
11608
- var renderedItem = this.renderItem(item, value, cssClasses, "" + i);
11609
- items.push(renderedItem);
11610
- }
11611
- return items;
11612
- };
11613
- Object.defineProperty(SurveyQuestionRadiogroup.prototype, "textStyle", {
11614
- get: function () {
11615
- return null; //{ display: "inline", position: "static" };
11616
- },
11617
- enumerable: false,
11618
- configurable: true
11619
- });
11620
- SurveyQuestionRadiogroup.prototype.renderItem = function (item, value, cssClasses, index) {
11621
- var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.createElement(this.question.itemComponent, {
11622
- key: item.value,
11623
- question: this.question,
11624
- cssClasses: cssClasses,
11625
- isDisplayMode: this.isDisplayMode,
11626
- item: item,
11627
- textStyle: this.textStyle,
11628
- index: index,
11629
- isChecked: value === item.value,
11630
- });
11631
- var survey = this.question.survey;
11632
- var wrappedItem = null;
11633
- if (!!survey) {
11634
- wrappedItem = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__.ReactSurveyElementsWrapper.wrapItemValue(survey, renderedItem, this.question, item);
11635
- }
11636
- return wrappedItem !== null && wrappedItem !== void 0 ? wrappedItem : renderedItem;
11403
+ if (!this.question.showClearButtonInContent)
11404
+ return null;
11405
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null,
11406
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", { type: "button", className: this.question.cssClasses.clearButton, onClick: function () { return _this.question.clearValueFromUI(); }, value: this.question.clearButtonCaption })));
11637
11407
  };
11638
11408
  SurveyQuestionRadiogroup.prototype.getStateValue = function () {
11639
11409
  return !this.question.isEmpty() ? this.question.renderedValue : "";
11640
11410
  };
11411
+ SurveyQuestionRadiogroup.prototype.isItemChecked = function (item, value) { return item.value === value; };
11641
11412
  return SurveyQuestionRadiogroup;
11642
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.SurveyQuestionElementBase));
11413
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectbase));
11643
11414
 
11644
11415
  var SurveyQuestionRadioItem = /** @class */ (function (_super) {
11645
11416
  __extends(SurveyQuestionRadioItem, _super);
11646
11417
  function SurveyQuestionRadioItem(props) {
11647
11418
  var _this = _super.call(this, props) || this;
11648
- _this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
11649
- _this.handleOnChange = _this.handleOnChange.bind(_this);
11650
11419
  _this.handleOnMouseDown = _this.handleOnMouseDown.bind(_this);
11651
11420
  return _this;
11652
11421
  }
@@ -11660,27 +11429,6 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
11660
11429
  enumerable: false,
11661
11430
  configurable: true
11662
11431
  });
11663
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "item", {
11664
- get: function () {
11665
- return this.props.item;
11666
- },
11667
- enumerable: false,
11668
- configurable: true
11669
- });
11670
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "textStyle", {
11671
- get: function () {
11672
- return this.props.textStyle;
11673
- },
11674
- enumerable: false,
11675
- configurable: true
11676
- });
11677
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "index", {
11678
- get: function () {
11679
- return this.props.index;
11680
- },
11681
- enumerable: false,
11682
- configurable: true
11683
- });
11684
11432
  Object.defineProperty(SurveyQuestionRadioItem.prototype, "isChecked", {
11685
11433
  get: function () {
11686
11434
  return this.props.isChecked;
@@ -11688,60 +11436,14 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
11688
11436
  enumerable: false,
11689
11437
  configurable: true
11690
11438
  });
11691
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "hideCaption", {
11692
- get: function () {
11693
- return this.props.hideCaption === true;
11694
- },
11695
- enumerable: false,
11696
- configurable: true
11697
- });
11698
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "ariaLabel", {
11699
- get: function () {
11700
- return this.props.ariaLabel || null;
11701
- },
11702
- enumerable: false,
11703
- configurable: true
11704
- });
11705
- SurveyQuestionRadioItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
11706
- if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
11707
- return false;
11708
- if (!this.question)
11709
- return false;
11710
- return (!this.question.customWidget ||
11711
- !!this.question.customWidgetData.isNeedRender ||
11712
- !!this.question.customWidget.widgetJson.isDefaultRender ||
11713
- !!this.question.customWidget.widgetJson.render);
11714
- };
11715
- SurveyQuestionRadioItem.prototype.handleOnChange = function (event) {
11439
+ SurveyQuestionRadioItem.prototype.doOnItemChange = function (event) {
11716
11440
  this.question.clickItemHandler(this.item);
11717
11441
  };
11718
11442
  SurveyQuestionRadioItem.prototype.handleOnMouseDown = function (event) {
11719
11443
  this.question.onMouseDown();
11720
11444
  };
11721
- SurveyQuestionRadioItem.prototype.canRender = function () {
11722
- return !!this.question && !!this.item;
11723
- };
11724
- SurveyQuestionRadioItem.prototype.componentDidUpdate = function (prevProps, prevState) {
11725
- _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
11726
- if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
11727
- if (this.props.item) {
11728
- this.props.item.setRootElement(this.rootRef.current);
11729
- }
11730
- if (prevProps.item) {
11731
- prevProps.item.setRootElement(undefined);
11732
- }
11733
- }
11734
- };
11735
- SurveyQuestionRadioItem.prototype.renderElement = function () {
11736
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
11737
- this.renderRadioButton(),
11738
- this.renderComment());
11739
- };
11740
- SurveyQuestionRadioItem.prototype.renderComment = function () {
11741
- if (!this.item.isCommentShowing)
11742
- return null;
11743
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
11744
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__.SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
11445
+ SurveyQuestionRadioItem.prototype.renderElementContent = function () {
11446
+ return this.renderRadioButton();
11745
11447
  };
11746
11448
  SurveyQuestionRadioItem.prototype.renderRadioButton = function () {
11747
11449
  var itemClass = this.question.getItemClass(this.item);
@@ -11759,25 +11461,13 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
11759
11461
  null,
11760
11462
  itemLabel)));
11761
11463
  };
11762
- SurveyQuestionRadioItem.prototype.componentDidMount = function () {
11763
- _super.prototype.componentDidMount.call(this);
11764
- if (!this.question.isDesignMode) {
11765
- this.item.setRootElement(this.rootRef.current);
11766
- }
11767
- };
11768
- SurveyQuestionRadioItem.prototype.componentWillUnmount = function () {
11769
- _super.prototype.componentWillUnmount.call(this);
11770
- if (!this.question.isDesignMode) {
11771
- this.item.setRootElement(undefined);
11772
- }
11773
- };
11774
11464
  return SurveyQuestionRadioItem;
11775
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.ReactSurveyElement));
11465
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectBaseItem));
11776
11466
 
11777
- _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.registerElement("survey-radiogroup-item", function (props) {
11467
+ _element_factory__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.registerElement("survey-radiogroup-item", function (props) {
11778
11468
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRadioItem, props);
11779
11469
  });
11780
- _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__.ReactQuestionFactory.Instance.registerQuestion("radiogroup", function (props) {
11470
+ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_1__.ReactQuestionFactory.Instance.registerQuestion("radiogroup", function (props) {
11781
11471
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRadiogroup, props);
11782
11472
  });
11783
11473
 
@@ -12130,6 +11820,276 @@ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__.ReactQuestionFactory.Instanc
12130
11820
  });
12131
11821
 
12132
11822
 
11823
+ /***/ }),
11824
+
11825
+ /***/ "../survey-react-ui/src/reactquestion_selectbase.tsx":
11826
+ /*!***********************************************************!*\
11827
+ !*** ../survey-react-ui/src/reactquestion_selectbase.tsx ***!
11828
+ \***********************************************************/
11829
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11830
+
11831
+ "use strict";
11832
+ __webpack_require__.r(__webpack_exports__);
11833
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11834
+ /* harmony export */ SurveyQuestionSelectBaseItem: () => (/* binding */ SurveyQuestionSelectBaseItem),
11835
+ /* harmony export */ SurveyQuestionSelectbase: () => (/* binding */ SurveyQuestionSelectbase)
11836
+ /* harmony export */ });
11837
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact/compat/dist/compat.module.js");
11838
+ /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "../survey-react-ui/src/reactquestion_element.tsx");
11839
+ /* harmony import */ var _reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_comment */ "../survey-react-ui/src/reactquestion_comment.tsx");
11840
+ /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactsurveymodel */ "../survey-react-ui/src/reactsurveymodel.tsx");
11841
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./element-factory */ "../survey-react-ui/src/element-factory.tsx");
11842
+ /* harmony import */ var _panel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./panel */ "../survey-react-ui/src/panel.tsx");
11843
+ var __extends = (undefined && undefined.__extends) || (function () {
11844
+ var extendStatics = function (d, b) {
11845
+ extendStatics = Object.setPrototypeOf ||
11846
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11847
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
11848
+ return extendStatics(d, b);
11849
+ };
11850
+ return function (d, b) {
11851
+ if (typeof b !== "function" && b !== null)
11852
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11853
+ extendStatics(d, b);
11854
+ function __() { this.constructor = d; }
11855
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11856
+ };
11857
+ })();
11858
+
11859
+
11860
+
11861
+
11862
+
11863
+
11864
+ var SurveyQuestionSelectbase = /** @class */ (function (_super) {
11865
+ __extends(SurveyQuestionSelectbase, _super);
11866
+ function SurveyQuestionSelectbase(props) {
11867
+ return _super.call(this, props) || this;
11868
+ }
11869
+ Object.defineProperty(SurveyQuestionSelectbase.prototype, "question", {
11870
+ get: function () {
11871
+ return this.questionBase;
11872
+ },
11873
+ enumerable: false,
11874
+ configurable: true
11875
+ });
11876
+ SurveyQuestionSelectbase.prototype.renderElement = function () {
11877
+ var _this = this;
11878
+ var cssClasses = this.question.cssClasses;
11879
+ 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 },
11880
+ this.renderHeader(),
11881
+ this.question.hasColumns
11882
+ ? this.getColumnedBody(cssClasses)
11883
+ : this.getBody(cssClasses),
11884
+ this.getFooter()));
11885
+ };
11886
+ SurveyQuestionSelectbase.prototype.renderHeader = function () { return null; };
11887
+ SurveyQuestionSelectbase.prototype.getFooter = function () {
11888
+ var _this = this;
11889
+ if (this.question.hasFootItems) {
11890
+ var items = this.question.footItems.map(function (item, ii) {
11891
+ return _this.renderItem(item, false, _this.question.cssClasses);
11892
+ });
11893
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, items);
11894
+ }
11895
+ return null;
11896
+ };
11897
+ SurveyQuestionSelectbase.prototype.getStateValue = function () { return undefined; };
11898
+ SurveyQuestionSelectbase.prototype.isItemChecked = function (item, value) { return false; };
11899
+ SurveyQuestionSelectbase.prototype.getColumnedBody = function (cssClasses) {
11900
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootMultiColumn }, this.getColumns(cssClasses)));
11901
+ };
11902
+ SurveyQuestionSelectbase.prototype.getColumns = function (cssClasses) {
11903
+ var _this = this;
11904
+ var value = this.getStateValue();
11905
+ return this.question.columns.map(function (column, ci) {
11906
+ var items = column.map(function (item, ii) {
11907
+ return _this.renderItem(item, ci === 0 && ii === 0, cssClasses, "" + ci + ii, _this.isItemChecked(item, value));
11908
+ });
11909
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
11910
+ });
11911
+ };
11912
+ SurveyQuestionSelectbase.prototype.getBody = function (cssClasses) {
11913
+ if (this.question.blockedRow) {
11914
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
11915
+ }
11916
+ else {
11917
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, this.getItems(cssClasses, this.question.bodyItems));
11918
+ }
11919
+ };
11920
+ SurveyQuestionSelectbase.prototype.getItems = function (cssClasses, choices) {
11921
+ var items = [];
11922
+ var value = this.getStateValue();
11923
+ for (var i = 0; i < choices.length; i++) {
11924
+ var item = choices[i];
11925
+ var renderedItem = this.renderItem(item, i == 0, cssClasses, "" + i, this.isItemChecked(item, value));
11926
+ if (!!renderedItem) {
11927
+ items.push(renderedItem);
11928
+ }
11929
+ }
11930
+ return items;
11931
+ };
11932
+ Object.defineProperty(SurveyQuestionSelectbase.prototype, "textStyle", {
11933
+ get: function () {
11934
+ return null;
11935
+ },
11936
+ enumerable: false,
11937
+ configurable: true
11938
+ });
11939
+ SurveyQuestionSelectbase.prototype.renderItem = function (item, isFirst, cssClasses, index, isChecked) {
11940
+ var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_4__.ReactElementFactory.Instance.createElement(this.question.itemComponent, {
11941
+ key: item.value,
11942
+ question: this.question,
11943
+ cssClasses: cssClasses,
11944
+ isDisplayMode: this.isDisplayMode,
11945
+ item: item,
11946
+ textStyle: this.textStyle,
11947
+ index: index,
11948
+ isFirst: isFirst,
11949
+ isChecked: isChecked,
11950
+ creator: this.props.creator,
11951
+ });
11952
+ var survey = this.question.survey;
11953
+ var wrappedItem = null;
11954
+ if (!!survey && !!renderedItem) {
11955
+ wrappedItem = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_3__.ReactSurveyElementsWrapper.wrapItemValue(survey, renderedItem, this.question, item);
11956
+ }
11957
+ return wrappedItem !== null && wrappedItem !== void 0 ? wrappedItem : renderedItem;
11958
+ };
11959
+ return SurveyQuestionSelectbase;
11960
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.SurveyQuestionElementBase));
11961
+
11962
+ var SurveyQuestionSelectBaseItem = /** @class */ (function (_super) {
11963
+ __extends(SurveyQuestionSelectBaseItem, _super);
11964
+ function SurveyQuestionSelectBaseItem(props) {
11965
+ var _this = _super.call(this, props) || this;
11966
+ _this.handleOnChange = function (event) {
11967
+ _this.doOnItemChange(event);
11968
+ };
11969
+ _this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
11970
+ return _this;
11971
+ }
11972
+ SurveyQuestionSelectBaseItem.prototype.getStateElement = function () {
11973
+ return this.item;
11974
+ };
11975
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "question", {
11976
+ get: function () {
11977
+ return this.props.question;
11978
+ },
11979
+ enumerable: false,
11980
+ configurable: true
11981
+ });
11982
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "item", {
11983
+ get: function () {
11984
+ return this.props.item;
11985
+ },
11986
+ enumerable: false,
11987
+ configurable: true
11988
+ });
11989
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "textStyle", {
11990
+ get: function () {
11991
+ return this.props.textStyle;
11992
+ },
11993
+ enumerable: false,
11994
+ configurable: true
11995
+ });
11996
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "isFirst", {
11997
+ get: function () {
11998
+ return this.props.isFirst;
11999
+ },
12000
+ enumerable: false,
12001
+ configurable: true
12002
+ });
12003
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "index", {
12004
+ get: function () {
12005
+ return this.props.index;
12006
+ },
12007
+ enumerable: false,
12008
+ configurable: true
12009
+ });
12010
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "hideCaption", {
12011
+ get: function () {
12012
+ return this.props.hideCaption === true;
12013
+ },
12014
+ enumerable: false,
12015
+ configurable: true
12016
+ });
12017
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "ariaLabel", {
12018
+ get: function () {
12019
+ return this.props.ariaLabel || null;
12020
+ },
12021
+ enumerable: false,
12022
+ configurable: true
12023
+ });
12024
+ SurveyQuestionSelectBaseItem.prototype.componentDidUpdate = function (prevProps, prevState) {
12025
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
12026
+ if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
12027
+ if (this.props.item) {
12028
+ this.props.item.setRootElement(this.rootRef.current);
12029
+ }
12030
+ if (prevProps.item) {
12031
+ prevProps.item.setRootElement(undefined);
12032
+ }
12033
+ }
12034
+ };
12035
+ SurveyQuestionSelectBaseItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
12036
+ if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
12037
+ return false;
12038
+ return (!this.question.customWidget ||
12039
+ !!this.question.customWidgetData.isNeedRender ||
12040
+ !!this.question.customWidget.widgetJson.isDefaultRender ||
12041
+ !!this.question.customWidget.widgetJson.render);
12042
+ };
12043
+ SurveyQuestionSelectBaseItem.prototype.doOnItemChange = function (event) { };
12044
+ SurveyQuestionSelectBaseItem.prototype.canRender = function () {
12045
+ return !!this.item && !!this.question;
12046
+ };
12047
+ SurveyQuestionSelectBaseItem.prototype.renderElement = function () {
12048
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
12049
+ this.renderElementContent(),
12050
+ this.renderPanel(),
12051
+ this.renderComment());
12052
+ };
12053
+ SurveyQuestionSelectBaseItem.prototype.renderElementContent = function () {
12054
+ return null;
12055
+ };
12056
+ Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "inputStyle", {
12057
+ get: function () {
12058
+ return null; //{ marginRight: "3px" };
12059
+ },
12060
+ enumerable: false,
12061
+ configurable: true
12062
+ });
12063
+ SurveyQuestionSelectBaseItem.prototype.renderComment = function () {
12064
+ if (!this.item.isCommentShowing)
12065
+ return null;
12066
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
12067
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__.SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
12068
+ };
12069
+ SurveyQuestionSelectBaseItem.prototype.renderPanel = function () {
12070
+ if (this.item.isPanelShowing) {
12071
+ var panel = this.item.panel;
12072
+ 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 }));
12073
+ }
12074
+ return null;
12075
+ };
12076
+ SurveyQuestionSelectBaseItem.prototype.componentDidMount = function () {
12077
+ _super.prototype.componentDidMount.call(this);
12078
+ if (!this.question.isDesignMode) {
12079
+ this.item.setRootElement(this.rootRef.current);
12080
+ }
12081
+ };
12082
+ SurveyQuestionSelectBaseItem.prototype.componentWillUnmount = function () {
12083
+ _super.prototype.componentWillUnmount.call(this);
12084
+ if (!this.question.isDesignMode) {
12085
+ this.item.setRootElement(undefined);
12086
+ }
12087
+ };
12088
+ return SurveyQuestionSelectBaseItem;
12089
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.ReactSurveyElement));
12090
+
12091
+
12092
+
12133
12093
  /***/ }),
12134
12094
 
12135
12095
  /***/ "../survey-react-ui/src/reactquestion_singleinputsummary.tsx":
@@ -12910,7 +12870,7 @@ var SurveyQuestionSignaturePad = /** @class */ (function (_super) {
12910
12870
  return null;
12911
12871
  var cssClasses = this.question.cssClasses;
12912
12872
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.controls },
12913
- react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", { type: "button", className: cssClasses.clearButton, title: this.question.clearButtonCaption, onClick: function () { return _this.question.clearValue(true); } },
12873
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", { type: "button", className: cssClasses.clearButton, title: this.question.clearButtonCaption, onClick: function () { return _this.question.clearValueFromUI(); } },
12914
12874
  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"),
12915
12875
  " "));
12916
12876
  };
@@ -13829,7 +13789,7 @@ var preact = react__WEBPACK_IMPORTED_MODULE_0__;
13829
13789
 
13830
13790
 
13831
13791
 
13832
- (0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.3.9"), "survey-js-ui");
13792
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.3.10"), "survey-js-ui");
13833
13793
 
13834
13794
  })();
13835
13795