survey-js-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.
package/survey-js-ui.js CHANGED
@@ -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
  */
@@ -23,7 +23,7 @@ return /******/ (() => { // webpackBootstrap
23
23
  /***/ (function(module) {
24
24
 
25
25
  /*!
26
- * surveyjs - Survey JavaScript library v2.3.8
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.8
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);
@@ -3504,11 +3504,12 @@ var __extends = (undefined && undefined.__extends) || (function () {
3504
3504
 
3505
3505
  var ListItem = /** @class */ (function (_super) {
3506
3506
  __extends(ListItem, _super);
3507
- function ListItem() {
3508
- var _this = _super !== null && _super.apply(this, arguments) || this;
3507
+ function ListItem(props) {
3508
+ var _this = _super.call(this, props) || this;
3509
3509
  _this.handleKeydown = function (event) {
3510
3510
  _this.model.onKeyDown(event);
3511
3511
  };
3512
+ _this.elementRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
3512
3513
  return _this;
3513
3514
  }
3514
3515
  Object.defineProperty(ListItem.prototype, "model", {
@@ -3535,7 +3536,7 @@ var ListItem = /** @class */ (function (_super) {
3535
3536
  var className = this.model.getItemClass(this.item);
3536
3537
  var itemContent = this.item.component || this.model.itemComponent;
3537
3538
  var newElement = _element_factory__WEBPACK_IMPORTED_MODULE_1__.ReactElementFactory.Instance.createElement(itemContent, { item: this.item, key: this.item.id, model: this.model });
3538
- 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);
3539
+ 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);
3539
3540
  var separator = this.item.needSeparator ? react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.model.cssClasses.itemSeparator }) : null;
3540
3541
  var isVisible = this.model.isItemVisible(this.item);
3541
3542
  var style = {
@@ -3549,8 +3550,9 @@ var ListItem = /** @class */ (function (_super) {
3549
3550
  contentWrap), this.item);
3550
3551
  };
3551
3552
  ListItem.prototype.componentDidMount = function () {
3553
+ var _a;
3552
3554
  _super.prototype.componentDidMount.call(this);
3553
- this.model.onLastItemRended(this.item);
3555
+ this.model.onItemRended(this.item, (_a = this.elementRef) === null || _a === void 0 ? void 0 : _a.current);
3554
3556
  };
3555
3557
  return ListItem;
3556
3558
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
@@ -5294,9 +5296,20 @@ var SliderLabelItem = /** @class */ (function (_super) {
5294
5296
  SliderLabelItem.prototype.renderElement = function () {
5295
5297
  var _a = this.question, cssClasses = _a.cssClasses, handleLabelPointerUp = _a.handleLabelPointerUp, getLabelCss = _a.getLabelCss, getPercent = _a.getPercent;
5296
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
+ }
5297
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); } },
5298
5309
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelTick }),
5299
- 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));
5300
5313
  };
5301
5314
  return SliderLabelItem;
5302
5315
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
@@ -7113,6 +7126,7 @@ __webpack_require__.r(__webpack_exports__);
7113
7126
  /* harmony import */ var _panel_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./panel-base */ "../survey-react-ui/src/panel-base.tsx");
7114
7127
  /* harmony import */ var _components_title_title_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/title/title-element */ "../survey-react-ui/src/components/title/title-element.tsx");
7115
7128
  /* harmony import */ var _reactquestion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactquestion */ "../survey-react-ui/src/reactquestion.tsx");
7129
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./element-factory */ "../survey-react-ui/src/element-factory.tsx");
7116
7130
  var __extends = (undefined && undefined.__extends) || (function () {
7117
7131
  var extendStatics = function (d, b) {
7118
7132
  extendStatics = Object.setPrototypeOf ||
@@ -7133,6 +7147,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
7133
7147
 
7134
7148
 
7135
7149
 
7150
+
7136
7151
  var SurveyPage = /** @class */ (function (_super) {
7137
7152
  __extends(SurveyPage, _super);
7138
7153
  function SurveyPage(props) {
@@ -7171,6 +7186,9 @@ var SurveyPage = /** @class */ (function (_super) {
7171
7186
  return SurveyPage;
7172
7187
  }(_panel_base__WEBPACK_IMPORTED_MODULE_2__.SurveyPanelBase));
7173
7188
 
7189
+ _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.registerElement("sv-page", function (props) {
7190
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyPage, props);
7191
+ });
7174
7192
 
7175
7193
 
7176
7194
  /***/ }),
@@ -7979,21 +7997,20 @@ __webpack_require__.r(__webpack_exports__);
7979
7997
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact/compat/dist/compat.module.js");
7980
7998
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
7981
7999
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
7982
- /* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./page */ "../survey-react-ui/src/page.tsx");
7983
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_element */ "../survey-react-ui/src/reactquestion_element.tsx");
7984
- /* harmony import */ var _components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/survey-header/survey-header */ "../survey-react-ui/src/components/survey-header/survey-header.tsx");
7985
- /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./reactquestion_factory */ "../survey-react-ui/src/reactquestion_factory.tsx");
7986
- /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./element-factory */ "../survey-react-ui/src/element-factory.tsx");
7987
- /* harmony import */ var _components_brand_info__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/brand-info */ "../survey-react-ui/src/components/brand-info.tsx");
7988
- /* harmony import */ var _components_notifier__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/notifier */ "../survey-react-ui/src/components/notifier.tsx");
7989
- /* harmony import */ var _components_components_container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./components/components-container */ "../survey-react-ui/src/components/components-container.tsx");
7990
- /* harmony import */ var _svgbundle__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./svgbundle */ "../survey-react-ui/src/svgbundle.tsx");
7991
- /* harmony import */ var _components_popup_popup_modal__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./components/popup/popup-modal */ "../survey-react-ui/src/components/popup/popup-modal.tsx");
7992
- /* harmony import */ var survey_core_icons_iconsV1__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! survey-core/icons/iconsV1 */ "../survey-core/build/icons/iconsV1.js");
7993
- /* harmony import */ var survey_core_icons_iconsV1__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(survey_core_icons_iconsV1__WEBPACK_IMPORTED_MODULE_12__);
7994
- /* harmony import */ var survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! survey-core/icons/iconsV2 */ "../survey-core/build/icons/iconsV2.js");
7995
- /* harmony import */ var survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_13__);
7996
- /* harmony import */ var _components_scroll__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./components/scroll */ "../survey-react-ui/src/components/scroll.tsx");
8000
+ /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_element */ "../survey-react-ui/src/reactquestion_element.tsx");
8001
+ /* harmony import */ var _components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/survey-header/survey-header */ "../survey-react-ui/src/components/survey-header/survey-header.tsx");
8002
+ /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactquestion_factory */ "../survey-react-ui/src/reactquestion_factory.tsx");
8003
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./element-factory */ "../survey-react-ui/src/element-factory.tsx");
8004
+ /* harmony import */ var _components_brand_info__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/brand-info */ "../survey-react-ui/src/components/brand-info.tsx");
8005
+ /* harmony import */ var _components_notifier__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/notifier */ "../survey-react-ui/src/components/notifier.tsx");
8006
+ /* harmony import */ var _components_components_container__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/components-container */ "../survey-react-ui/src/components/components-container.tsx");
8007
+ /* harmony import */ var _svgbundle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./svgbundle */ "../survey-react-ui/src/svgbundle.tsx");
8008
+ /* harmony import */ var _components_popup_popup_modal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./components/popup/popup-modal */ "../survey-react-ui/src/components/popup/popup-modal.tsx");
8009
+ /* harmony import */ var survey_core_icons_iconsV1__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! survey-core/icons/iconsV1 */ "../survey-core/build/icons/iconsV1.js");
8010
+ /* harmony import */ var survey_core_icons_iconsV1__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(survey_core_icons_iconsV1__WEBPACK_IMPORTED_MODULE_11__);
8011
+ /* harmony import */ var survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! survey-core/icons/iconsV2 */ "../survey-core/build/icons/iconsV2.js");
8012
+ /* harmony import */ var survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_12__);
8013
+ /* harmony import */ var _components_scroll__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./components/scroll */ "../survey-react-ui/src/components/scroll.tsx");
7997
8014
  var __extends = (undefined && undefined.__extends) || (function () {
7998
8015
  var extendStatics = function (d, b) {
7999
8016
  extendStatics = Object.setPrototypeOf ||
@@ -8034,10 +8051,9 @@ var __assign = (undefined && undefined.__assign) || function () {
8034
8051
 
8035
8052
 
8036
8053
 
8037
-
8038
- (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.addIconsToThemeSet)("v1", survey_core_icons_iconsV1__WEBPACK_IMPORTED_MODULE_12__.icons);
8039
- (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.addIconsToThemeSet)("v2", survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_13__.icons);
8040
- survey_core__WEBPACK_IMPORTED_MODULE_1__.SvgRegistry.registerIcons(survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_13__.icons);
8054
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.addIconsToThemeSet)("v1", survey_core_icons_iconsV1__WEBPACK_IMPORTED_MODULE_11__.icons);
8055
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.addIconsToThemeSet)("v2", survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_12__.icons);
8056
+ survey_core__WEBPACK_IMPORTED_MODULE_1__.SvgRegistry.registerIcons(survey_core_icons_iconsV2__WEBPACK_IMPORTED_MODULE_12__.icons);
8041
8057
  var Survey = /** @class */ (function (_super) {
8042
8058
  __extends(Survey, _super);
8043
8059
  function Survey(props) {
@@ -8116,7 +8132,7 @@ var Survey = /** @class */ (function (_super) {
8116
8132
  renderResult = this.renderSurvey();
8117
8133
  }
8118
8134
  var backgroundImage = !!this.survey.backgroundImage ? react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.css.rootBackgroundImage, style: this.survey.backgroundImageStyle }) : null;
8119
- 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;
8135
+ 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;
8120
8136
  var onSubmit = function (event) {
8121
8137
  event.preventDefault();
8122
8138
  };
@@ -8127,20 +8143,20 @@ var Survey = /** @class */ (function (_super) {
8127
8143
  var rootCss = this.survey.getRootCss();
8128
8144
  var cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
8129
8145
  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 },
8130
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_scroll__WEBPACK_IMPORTED_MODULE_14__.Scroll, { disabled: this.survey.rootScrollDisabled },
8131
- this.survey.needRenderIcons ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_svgbundle__WEBPACK_IMPORTED_MODULE_10__.SvgBundleComponent, null) : null,
8132
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_popup_popup_modal__WEBPACK_IMPORTED_MODULE_11__.PopupModal, null),
8146
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_scroll__WEBPACK_IMPORTED_MODULE_13__.Scroll, { disabled: this.survey.rootScrollDisabled },
8147
+ this.survey.needRenderIcons ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_svgbundle__WEBPACK_IMPORTED_MODULE_9__.SvgBundleComponent, null) : null,
8148
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_popup_popup_modal__WEBPACK_IMPORTED_MODULE_10__.PopupModal, null),
8133
8149
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.survey.wrapperFormCss },
8134
8150
  backgroundImage,
8135
8151
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("form", { onSubmit: onSubmit },
8136
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_scroll__WEBPACK_IMPORTED_MODULE_14__.Scroll, { disabled: this.survey.formScrollDisabled },
8152
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_scroll__WEBPACK_IMPORTED_MODULE_13__.Scroll, { disabled: this.survey.formScrollDisabled },
8137
8153
  customHeader,
8138
8154
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.css.container },
8139
8155
  header,
8140
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "header", needRenderWrapper: false }),
8156
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "header", needRenderWrapper: false }),
8141
8157
  renderResult,
8142
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "footer", needRenderWrapper: false })))),
8143
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_notifier__WEBPACK_IMPORTED_MODULE_8__.NotifierComponent, { notifier: this.survey.notifier })))));
8158
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "footer", needRenderWrapper: false })))),
8159
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_notifier__WEBPACK_IMPORTED_MODULE_7__.NotifierComponent, { notifier: this.survey.notifier })))));
8144
8160
  };
8145
8161
  Survey.prototype.renderElement = function () {
8146
8162
  return this.doRender();
@@ -8161,7 +8177,7 @@ var Survey = /** @class */ (function (_super) {
8161
8177
  var htmlValue = { __html: this.survey.processedCompletedHtml };
8162
8178
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
8163
8179
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { dangerouslySetInnerHTML: htmlValue, className: this.survey.completedCss }),
8164
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "completePage", needRenderWrapper: false })));
8180
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "completePage", needRenderWrapper: false })));
8165
8181
  };
8166
8182
  Survey.prototype.renderCompletedBefore = function () {
8167
8183
  var htmlValue = { __html: this.survey.processedCompletedBeforeHtml };
@@ -8183,18 +8199,23 @@ var Survey = /** @class */ (function (_super) {
8183
8199
  style.maxWidth = this.survey.renderedWidth;
8184
8200
  }
8185
8201
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.survey.bodyContainerCss },
8186
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "left" }),
8202
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "left" }),
8187
8203
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "sv-components-column sv-components-column--expandable" },
8188
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "center" }),
8204
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "center" }),
8189
8205
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { id: pageId, className: className, style: style },
8190
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "contentTop" }),
8206
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "contentTop" }),
8191
8207
  activePage,
8192
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "contentBottom" }),
8193
- this.survey.showBrandInfo ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_brand_info__WEBPACK_IMPORTED_MODULE_7__.BrandInfo, null) : null)),
8194
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_9__.ComponentsContainer, { survey: this.survey, container: "right" })));
8208
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "contentBottom" }),
8209
+ this.survey.showBrandInfo ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_brand_info__WEBPACK_IMPORTED_MODULE_6__.BrandInfo, null) : null)),
8210
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_components_container__WEBPACK_IMPORTED_MODULE_8__.ComponentsContainer, { survey: this.survey, container: "right" })));
8195
8211
  };
8196
8212
  Survey.prototype.renderPage = function (page) {
8197
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(_page__WEBPACK_IMPORTED_MODULE_2__.SurveyPage, { survey: this.survey, page: page, css: this.css, creator: this }));
8213
+ return _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.createElement(this.survey.pageComponent || "sv-page", {
8214
+ survey: this.survey,
8215
+ page: page,
8216
+ css: this.css,
8217
+ creator: this,
8218
+ });
8198
8219
  };
8199
8220
  Survey.prototype.renderEmptySurvey = function () {
8200
8221
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.css.bodyEmpty }, this.survey.emptySurveyText);
@@ -8271,14 +8292,14 @@ var Survey = /** @class */ (function (_super) {
8271
8292
  };
8272
8293
  //ISurveyCreator
8273
8294
  Survey.prototype.createQuestionElement = function (question) {
8274
- return _reactquestion_factory__WEBPACK_IMPORTED_MODULE_5__.ReactQuestionFactory.Instance.createQuestion(question.isDefaultRendering() ? question.getTemplate() : question.getComponentName(), {
8295
+ return _reactquestion_factory__WEBPACK_IMPORTED_MODULE_4__.ReactQuestionFactory.Instance.createQuestion(question.isDefaultRendering() ? question.getTemplate() : question.getComponentName(), {
8275
8296
  question: question,
8276
8297
  isDisplayMode: question.isInputReadOnly,
8277
8298
  creator: this,
8278
8299
  });
8279
8300
  };
8280
8301
  Survey.prototype.renderError = function (key, error, cssClasses, element) {
8281
- return _element_factory__WEBPACK_IMPORTED_MODULE_6__.ReactElementFactory.Instance.createElement(this.survey.questionErrorComponent, { key: key, error: error, cssClasses: cssClasses, element: element });
8302
+ return _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.createElement(this.survey.questionErrorComponent, { key: key, error: error, cssClasses: cssClasses, element: element });
8282
8303
  };
8283
8304
  Survey.prototype.questionTitleLocation = function () {
8284
8305
  return this.survey.questionTitleLocation;
@@ -8287,9 +8308,9 @@ var Survey = /** @class */ (function (_super) {
8287
8308
  return this.survey.questionErrorLocation;
8288
8309
  };
8289
8310
  return Survey;
8290
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__.SurveyElementBase));
8311
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
8291
8312
 
8292
- _element_factory__WEBPACK_IMPORTED_MODULE_6__.ReactElementFactory.Instance.registerElement("survey", function (props) {
8313
+ _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.registerElement("survey", function (props) {
8293
8314
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Survey, props);
8294
8315
  });
8295
8316
  function attachKey2click(element, viewModel, options) {
@@ -8521,7 +8542,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
8521
8542
  var descriptionUnderInput = question.hasDescriptionUnderInput
8522
8543
  ? this.renderDescription()
8523
8544
  : null;
8524
- 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 },
8525
8546
  questionRender,
8526
8547
  comment,
8527
8548
  descriptionUnderInput));
@@ -8963,11 +8984,9 @@ __webpack_require__.r(__webpack_exports__);
8963
8984
  /* harmony export */ SurveyQuestionCheckboxItem: () => (/* binding */ SurveyQuestionCheckboxItem)
8964
8985
  /* harmony export */ });
8965
8986
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact/compat/dist/compat.module.js");
8966
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "../survey-react-ui/src/reactquestion_element.tsx");
8967
- /* harmony import */ var _reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_comment */ "../survey-react-ui/src/reactquestion_comment.tsx");
8968
- /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_factory */ "../survey-react-ui/src/reactquestion_factory.tsx");
8969
- /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactsurveymodel */ "../survey-react-ui/src/reactsurveymodel.tsx");
8970
- /* 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");
8971
8990
  var __extends = (undefined && undefined.__extends) || (function () {
8972
8991
  var extendStatics = function (d, b) {
8973
8992
  extendStatics = Object.setPrototypeOf ||
@@ -8987,8 +9006,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
8987
9006
 
8988
9007
 
8989
9008
 
8990
-
8991
-
8992
9009
  var SurveyQuestionCheckbox = /** @class */ (function (_super) {
8993
9010
  __extends(SurveyQuestionCheckbox, _super);
8994
9011
  function SurveyQuestionCheckbox(props) {
@@ -9001,16 +9018,10 @@ var SurveyQuestionCheckbox = /** @class */ (function (_super) {
9001
9018
  enumerable: false,
9002
9019
  configurable: true
9003
9020
  });
9004
- SurveyQuestionCheckbox.prototype.renderElement = function () {
9005
- var _this = this;
9006
- var cssClasses = this.question.cssClasses;
9007
- 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,
9008
9023
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
9009
- this.getHeader(),
9010
- this.question.hasColumns
9011
- ? this.getColumnedBody(cssClasses)
9012
- : this.getBody(cssClasses),
9013
- this.getFooter()));
9024
+ this.getHeader());
9014
9025
  };
9015
9026
  SurveyQuestionCheckbox.prototype.getHeader = function () {
9016
9027
  var _this = this;
@@ -9019,163 +9030,22 @@ var SurveyQuestionCheckbox = /** @class */ (function (_super) {
9019
9030
  return _this.renderItem(item, false, _this.question.cssClasses);
9020
9031
  });
9021
9032
  }
9022
- };
9023
- SurveyQuestionCheckbox.prototype.getFooter = function () {
9024
- var _this = this;
9025
- if (this.question.hasFootItems) {
9026
- return this.question.footItems.map(function (item, ii) {
9027
- return _this.renderItem(item, false, _this.question.cssClasses);
9028
- });
9029
- }
9030
- };
9031
- SurveyQuestionCheckbox.prototype.getColumnedBody = function (cssClasses) {
9032
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootMultiColumn }, this.getColumns(cssClasses)));
9033
- };
9034
- SurveyQuestionCheckbox.prototype.getColumns = function (cssClasses) {
9035
- var _this = this;
9036
- return this.question.columns.map(function (column, ci) {
9037
- var items = column.map(function (item, ii) {
9038
- return _this.renderItem(item, ci === 0 && ii === 0, cssClasses, "" + ci + ii);
9039
- });
9040
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
9041
- });
9042
- };
9043
- SurveyQuestionCheckbox.prototype.getBody = function (cssClasses) {
9044
- if (this.question.blockedRow) {
9045
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
9046
- }
9047
- else {
9048
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, this.getItems(cssClasses, this.question.bodyItems));
9049
- }
9050
- };
9051
- SurveyQuestionCheckbox.prototype.getItems = function (cssClasses, choices) {
9052
- var renderedItems = [];
9053
- for (var i = 0; i < choices.length; i++) {
9054
- var item = choices[i];
9055
- var renderedItem = this.renderItem(item, i == 0, cssClasses, "" + i);
9056
- if (!!renderedItem) {
9057
- renderedItems.push(renderedItem);
9058
- }
9059
- }
9060
- return renderedItems;
9061
- };
9062
- Object.defineProperty(SurveyQuestionCheckbox.prototype, "textStyle", {
9063
- get: function () {
9064
- return null;
9065
- },
9066
- enumerable: false,
9067
- configurable: true
9068
- });
9069
- SurveyQuestionCheckbox.prototype.renderItem = function (item, isFirst, cssClasses, index) {
9070
- var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.createElement(this.question.itemComponent, {
9071
- key: item.value,
9072
- question: this.question,
9073
- cssClasses: cssClasses,
9074
- isDisplayMode: this.isDisplayMode,
9075
- item: item,
9076
- textStyle: this.textStyle,
9077
- index: index,
9078
- isFirst: isFirst,
9079
- });
9080
- var survey = this.question.survey;
9081
- var wrappedItem = null;
9082
- if (!!survey && !!renderedItem) {
9083
- wrappedItem = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__.ReactSurveyElementsWrapper.wrapItemValue(survey, renderedItem, this.question, item);
9084
- }
9085
- return wrappedItem !== null && wrappedItem !== void 0 ? wrappedItem : renderedItem;
9033
+ return null;
9086
9034
  };
9087
9035
  return SurveyQuestionCheckbox;
9088
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.SurveyQuestionElementBase));
9036
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectbase));
9089
9037
 
9090
9038
  var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
9091
9039
  __extends(SurveyQuestionCheckboxItem, _super);
9092
9040
  function SurveyQuestionCheckboxItem(props) {
9093
- var _this = _super.call(this, props) || this;
9094
- _this.handleOnChange = function (event) {
9095
- _this.question.clickItemHandler(_this.item, event.target.checked);
9096
- };
9097
- _this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
9098
- return _this;
9041
+ return _super.call(this, props) || this;
9099
9042
  }
9100
- SurveyQuestionCheckboxItem.prototype.getStateElement = function () {
9101
- return this.item;
9102
- };
9103
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "question", {
9104
- get: function () {
9105
- return this.props.question;
9106
- },
9107
- enumerable: false,
9108
- configurable: true
9109
- });
9110
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "item", {
9111
- get: function () {
9112
- return this.props.item;
9113
- },
9114
- enumerable: false,
9115
- configurable: true
9116
- });
9117
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "textStyle", {
9118
- get: function () {
9119
- return this.props.textStyle;
9120
- },
9121
- enumerable: false,
9122
- configurable: true
9123
- });
9124
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "isFirst", {
9125
- get: function () {
9126
- return this.props.isFirst;
9127
- },
9128
- enumerable: false,
9129
- configurable: true
9130
- });
9131
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "index", {
9132
- get: function () {
9133
- return this.props.index;
9134
- },
9135
- enumerable: false,
9136
- configurable: true
9137
- });
9138
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "hideCaption", {
9139
- get: function () {
9140
- return this.props.hideCaption === true;
9141
- },
9142
- enumerable: false,
9143
- configurable: true
9144
- });
9145
- Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "ariaLabel", {
9146
- get: function () {
9147
- return this.props.ariaLabel || null;
9148
- },
9149
- enumerable: false,
9150
- configurable: true
9151
- });
9152
- SurveyQuestionCheckboxItem.prototype.componentDidUpdate = function (prevProps, prevState) {
9153
- _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
9154
- if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
9155
- if (this.props.item) {
9156
- this.props.item.setRootElement(this.rootRef.current);
9157
- }
9158
- if (prevProps.item) {
9159
- prevProps.item.setRootElement(undefined);
9160
- }
9161
- }
9162
- };
9163
- SurveyQuestionCheckboxItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
9164
- if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
9165
- return false;
9166
- return (!this.question.customWidget ||
9167
- !!this.question.customWidgetData.isNeedRender ||
9168
- !!this.question.customWidget.widgetJson.isDefaultRender ||
9169
- !!this.question.customWidget.widgetJson.render);
9170
- };
9171
- SurveyQuestionCheckboxItem.prototype.canRender = function () {
9172
- return !!this.item && !!this.question;
9043
+ SurveyQuestionCheckboxItem.prototype.doOnItemChange = function (event) {
9044
+ this.question.clickItemHandler(this.item, event.target.checked);
9173
9045
  };
9174
- SurveyQuestionCheckboxItem.prototype.renderElement = function () {
9046
+ SurveyQuestionCheckboxItem.prototype.renderElementContent = function () {
9175
9047
  var isChecked = this.question.isItemSelected(this.item);
9176
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
9177
- this.renderCheckbox(isChecked, null),
9178
- this.renderComment());
9048
+ return this.renderCheckbox(isChecked);
9179
9049
  };
9180
9050
  Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "inputStyle", {
9181
9051
  get: function () {
@@ -9184,13 +9054,7 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
9184
9054
  enumerable: false,
9185
9055
  configurable: true
9186
9056
  });
9187
- SurveyQuestionCheckboxItem.prototype.renderComment = function () {
9188
- if (!this.item.isCommentShowing)
9189
- return null;
9190
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
9191
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__.SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
9192
- };
9193
- SurveyQuestionCheckboxItem.prototype.renderCheckbox = function (isChecked, otherItem) {
9057
+ SurveyQuestionCheckboxItem.prototype.renderCheckbox = function (isChecked) {
9194
9058
  var id = this.question.getItemId(this.item);
9195
9059
  var itemClass = this.question.getItemClass(this.item);
9196
9060
  var labelClass = this.question.getLabelClass(this.item);
@@ -9204,28 +9068,15 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
9204
9068
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("use", { xlinkHref: this.question.itemSvgIcon })) :
9205
9069
  null) :
9206
9070
  null,
9207
- itemLabel),
9208
- otherItem));
9209
- };
9210
- SurveyQuestionCheckboxItem.prototype.componentDidMount = function () {
9211
- _super.prototype.componentDidMount.call(this);
9212
- if (!this.question.isDesignMode) {
9213
- this.item.setRootElement(this.rootRef.current);
9214
- }
9215
- };
9216
- SurveyQuestionCheckboxItem.prototype.componentWillUnmount = function () {
9217
- _super.prototype.componentWillUnmount.call(this);
9218
- if (!this.question.isDesignMode) {
9219
- this.item.setRootElement(undefined);
9220
- }
9071
+ itemLabel)));
9221
9072
  };
9222
9073
  return SurveyQuestionCheckboxItem;
9223
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.ReactSurveyElement));
9074
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectBaseItem));
9224
9075
 
9225
- _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) {
9226
9077
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionCheckboxItem, props);
9227
9078
  });
9228
- _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) {
9229
9080
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionCheckbox, props);
9230
9081
  });
9231
9082
 
@@ -10797,7 +10648,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
10797
10648
  };
10798
10649
  SurveyQuestionMatrixDropdownBase.prototype.renderTableDiv = function () {
10799
10650
  var _this = this;
10800
- 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)); } },
10801
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); } })));
10802
10653
  };
10803
10654
  return SurveyQuestionMatrixDropdownBase;
@@ -11109,7 +10960,8 @@ var SurveyQuestionMatrixDynamicAddButton = /** @class */ (function (_super) {
11109
10960
  var addRowText = this.renderLocString(this.matrix.locAddRowText);
11110
10961
  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 },
11111
10962
  addRowText,
11112
- react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: this.props.cssClasses.iconAdd })));
10963
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: this.props.cssClasses.iconAdd }, this.cssClasses.iconAddId && react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", null,
10964
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("use", { xlinkHref: this.cssClasses.iconAddId })))));
11113
10965
  return (this.props.isEmptySection ? addButton : react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.props.cssClasses.footer }, addButton));
11114
10966
  };
11115
10967
  return SurveyQuestionMatrixDynamicAddButton;
@@ -11507,11 +11359,9 @@ __webpack_require__.r(__webpack_exports__);
11507
11359
  /* harmony export */ SurveyQuestionRadiogroup: () => (/* binding */ SurveyQuestionRadiogroup)
11508
11360
  /* harmony export */ });
11509
11361
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact/compat/dist/compat.module.js");
11510
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "../survey-react-ui/src/reactquestion_element.tsx");
11511
- /* harmony import */ var _reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_comment */ "../survey-react-ui/src/reactquestion_comment.tsx");
11512
- /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_factory */ "../survey-react-ui/src/reactquestion_factory.tsx");
11513
- /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactsurveymodel */ "../survey-react-ui/src/reactsurveymodel.tsx");
11514
- /* 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");
11515
11365
  var __extends = (undefined && undefined.__extends) || (function () {
11516
11366
  var extendStatics = function (d, b) {
11517
11367
  extendStatics = Object.setPrototypeOf ||
@@ -11531,8 +11381,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
11531
11381
 
11532
11382
 
11533
11383
 
11534
-
11535
-
11536
11384
  var SurveyQuestionRadiogroup = /** @class */ (function (_super) {
11537
11385
  __extends(SurveyQuestionRadiogroup, _super);
11538
11386
  function SurveyQuestionRadiogroup(props) {
@@ -11545,97 +11393,29 @@ var SurveyQuestionRadiogroup = /** @class */ (function (_super) {
11545
11393
  enumerable: false,
11546
11394
  configurable: true
11547
11395
  });
11548
- SurveyQuestionRadiogroup.prototype.renderElement = function () {
11549
- var _this = this;
11550
- var cssClasses = this.question.cssClasses;
11551
- var clearButton = null;
11552
- if (this.question.showClearButtonInContent) {
11553
- clearButton = (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null,
11554
- 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 })));
11555
- }
11556
- 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 },
11557
- this.question.hasColumns
11558
- ? this.getColumnedBody(cssClasses)
11559
- : this.getBody(cssClasses),
11560
- this.getFooter(),
11561
- clearButton));
11562
- };
11563
11396
  SurveyQuestionRadiogroup.prototype.getFooter = function () {
11564
- var _this = this;
11565
- if (this.question.hasFootItems) {
11566
- return this.question.footItems.map(function (item, ii) {
11567
- return _this.renderItem(item, false, _this.question.cssClasses);
11568
- });
11569
- }
11570
- };
11571
- SurveyQuestionRadiogroup.prototype.getColumnedBody = function (cssClasses) {
11572
- 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());
11573
11400
  };
11574
- SurveyQuestionRadiogroup.prototype.getColumns = function (cssClasses) {
11401
+ SurveyQuestionRadiogroup.prototype.renderClearButton = function () {
11575
11402
  var _this = this;
11576
- var value = this.getStateValue();
11577
- return this.question.columns.map(function (column, ci) {
11578
- var items = column.map(function (item, ii) {
11579
- return _this.renderItem(item, value, cssClasses, "" + ci + ii);
11580
- });
11581
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
11582
- });
11583
- };
11584
- SurveyQuestionRadiogroup.prototype.getBody = function (cssClasses) {
11585
- if (this.question.blockedRow) {
11586
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
11587
- }
11588
- else {
11589
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, this.getItems(cssClasses, this.question.bodyItems));
11590
- }
11591
- };
11592
- SurveyQuestionRadiogroup.prototype.getItems = function (cssClasses, choices) {
11593
- var items = [];
11594
- var value = this.getStateValue();
11595
- for (var i = 0; i < choices.length; i++) {
11596
- var item = choices[i];
11597
- var renderedItem = this.renderItem(item, value, cssClasses, "" + i);
11598
- items.push(renderedItem);
11599
- }
11600
- return items;
11601
- };
11602
- Object.defineProperty(SurveyQuestionRadiogroup.prototype, "textStyle", {
11603
- get: function () {
11604
- return null; //{ display: "inline", position: "static" };
11605
- },
11606
- enumerable: false,
11607
- configurable: true
11608
- });
11609
- SurveyQuestionRadiogroup.prototype.renderItem = function (item, value, cssClasses, index) {
11610
- var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_5__.ReactElementFactory.Instance.createElement(this.question.itemComponent, {
11611
- key: item.value,
11612
- question: this.question,
11613
- cssClasses: cssClasses,
11614
- isDisplayMode: this.isDisplayMode,
11615
- item: item,
11616
- textStyle: this.textStyle,
11617
- index: index,
11618
- isChecked: value === item.value,
11619
- });
11620
- var survey = this.question.survey;
11621
- var wrappedItem = null;
11622
- if (!!survey) {
11623
- wrappedItem = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_4__.ReactSurveyElementsWrapper.wrapItemValue(survey, renderedItem, this.question, item);
11624
- }
11625
- 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 })));
11626
11407
  };
11627
11408
  SurveyQuestionRadiogroup.prototype.getStateValue = function () {
11628
11409
  return !this.question.isEmpty() ? this.question.renderedValue : "";
11629
11410
  };
11411
+ SurveyQuestionRadiogroup.prototype.isItemChecked = function (item, value) { return item.value === value; };
11630
11412
  return SurveyQuestionRadiogroup;
11631
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.SurveyQuestionElementBase));
11413
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectbase));
11632
11414
 
11633
11415
  var SurveyQuestionRadioItem = /** @class */ (function (_super) {
11634
11416
  __extends(SurveyQuestionRadioItem, _super);
11635
11417
  function SurveyQuestionRadioItem(props) {
11636
11418
  var _this = _super.call(this, props) || this;
11637
- _this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
11638
- _this.handleOnChange = _this.handleOnChange.bind(_this);
11639
11419
  _this.handleOnMouseDown = _this.handleOnMouseDown.bind(_this);
11640
11420
  return _this;
11641
11421
  }
@@ -11649,88 +11429,21 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
11649
11429
  enumerable: false,
11650
11430
  configurable: true
11651
11431
  });
11652
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "item", {
11653
- get: function () {
11654
- return this.props.item;
11655
- },
11656
- enumerable: false,
11657
- configurable: true
11658
- });
11659
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "textStyle", {
11432
+ Object.defineProperty(SurveyQuestionRadioItem.prototype, "isChecked", {
11660
11433
  get: function () {
11661
- return this.props.textStyle;
11434
+ return this.props.isChecked;
11662
11435
  },
11663
11436
  enumerable: false,
11664
11437
  configurable: true
11665
11438
  });
11666
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "index", {
11667
- get: function () {
11668
- return this.props.index;
11669
- },
11670
- enumerable: false,
11671
- configurable: true
11672
- });
11673
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "isChecked", {
11674
- get: function () {
11675
- return this.props.isChecked;
11676
- },
11677
- enumerable: false,
11678
- configurable: true
11679
- });
11680
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "hideCaption", {
11681
- get: function () {
11682
- return this.props.hideCaption === true;
11683
- },
11684
- enumerable: false,
11685
- configurable: true
11686
- });
11687
- Object.defineProperty(SurveyQuestionRadioItem.prototype, "ariaLabel", {
11688
- get: function () {
11689
- return this.props.ariaLabel || null;
11690
- },
11691
- enumerable: false,
11692
- configurable: true
11693
- });
11694
- SurveyQuestionRadioItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
11695
- if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
11696
- return false;
11697
- if (!this.question)
11698
- return false;
11699
- return (!this.question.customWidget ||
11700
- !!this.question.customWidgetData.isNeedRender ||
11701
- !!this.question.customWidget.widgetJson.isDefaultRender ||
11702
- !!this.question.customWidget.widgetJson.render);
11703
- };
11704
- SurveyQuestionRadioItem.prototype.handleOnChange = function (event) {
11439
+ SurveyQuestionRadioItem.prototype.doOnItemChange = function (event) {
11705
11440
  this.question.clickItemHandler(this.item);
11706
11441
  };
11707
11442
  SurveyQuestionRadioItem.prototype.handleOnMouseDown = function (event) {
11708
11443
  this.question.onMouseDown();
11709
11444
  };
11710
- SurveyQuestionRadioItem.prototype.canRender = function () {
11711
- return !!this.question && !!this.item;
11712
- };
11713
- SurveyQuestionRadioItem.prototype.componentDidUpdate = function (prevProps, prevState) {
11714
- _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
11715
- if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
11716
- if (this.props.item) {
11717
- this.props.item.setRootElement(this.rootRef.current);
11718
- }
11719
- if (prevProps.item) {
11720
- prevProps.item.setRootElement(undefined);
11721
- }
11722
- }
11723
- };
11724
- SurveyQuestionRadioItem.prototype.renderElement = function () {
11725
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
11726
- this.renderRadioButton(),
11727
- this.renderComment());
11728
- };
11729
- SurveyQuestionRadioItem.prototype.renderComment = function () {
11730
- if (!this.item.isCommentShowing)
11731
- return null;
11732
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
11733
- 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();
11734
11447
  };
11735
11448
  SurveyQuestionRadioItem.prototype.renderRadioButton = function () {
11736
11449
  var itemClass = this.question.getItemClass(this.item);
@@ -11748,25 +11461,13 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
11748
11461
  null,
11749
11462
  itemLabel)));
11750
11463
  };
11751
- SurveyQuestionRadioItem.prototype.componentDidMount = function () {
11752
- _super.prototype.componentDidMount.call(this);
11753
- if (!this.question.isDesignMode) {
11754
- this.item.setRootElement(this.rootRef.current);
11755
- }
11756
- };
11757
- SurveyQuestionRadioItem.prototype.componentWillUnmount = function () {
11758
- _super.prototype.componentWillUnmount.call(this);
11759
- if (!this.question.isDesignMode) {
11760
- this.item.setRootElement(undefined);
11761
- }
11762
- };
11763
11464
  return SurveyQuestionRadioItem;
11764
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.ReactSurveyElement));
11465
+ }(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectBaseItem));
11765
11466
 
11766
- _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) {
11767
11468
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRadioItem, props);
11768
11469
  });
11769
- _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) {
11770
11471
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRadiogroup, props);
11771
11472
  });
11772
11473
 
@@ -12119,6 +11820,276 @@ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__.ReactQuestionFactory.Instanc
12119
11820
  });
12120
11821
 
12121
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
+
12122
12093
  /***/ }),
12123
12094
 
12124
12095
  /***/ "../survey-react-ui/src/reactquestion_singleinputsummary.tsx":
@@ -12899,7 +12870,7 @@ var SurveyQuestionSignaturePad = /** @class */ (function (_super) {
12899
12870
  return null;
12900
12871
  var cssClasses = this.question.cssClasses;
12901
12872
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.controls },
12902
- 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(); } },
12903
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"),
12904
12875
  " "));
12905
12876
  };
@@ -13818,7 +13789,7 @@ var preact = react__WEBPACK_IMPORTED_MODULE_0__;
13818
13789
 
13819
13790
 
13820
13791
 
13821
- (0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.3.8"), "survey-js-ui");
13792
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.3.10"), "survey-js-ui");
13822
13793
 
13823
13794
  })();
13824
13795