survey-js-ui 2.3.9 → 2.3.11
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/fesm/survey-js-ui.mjs +148 -205
- package/fesm/survey-js-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-js-ui.js +385 -419
- package/survey-js-ui.js.map +1 -1
- package/survey-js-ui.min.js +1 -1
- package/survey-js-ui.min.js.LICENSE.txt +1 -1
- package/typings/survey-react-ui/src/components/title/title-actions.d.ts +1 -0
- package/typings/survey-react-ui/src/imagepicker.d.ts +1 -1
- package/typings/survey-react-ui/src/reactquestion_checkbox.d.ts +8 -30
- package/typings/survey-react-ui/src/reactquestion_comment.d.ts +2 -2
- package/typings/survey-react-ui/src/reactquestion_element.d.ts +1 -0
- package/typings/survey-react-ui/src/reactquestion_radiogroup.d.ts +9 -26
- package/typings/survey-react-ui/src/reactquestion_selectbase.d.ts +42 -0
package/survey-js-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v2.3.
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.3.11
|
|
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.
|
|
26
|
+
* surveyjs - Survey JavaScript library v2.3.11
|
|
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,
|
|
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
|
|
111
|
+
return __nested_webpack_require_870__(id);
|
|
112
112
|
}
|
|
113
113
|
function webpackContextResolve(req) {
|
|
114
|
-
if(!
|
|
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
|
|
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,
|
|
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
|
-
/******/
|
|
770
|
+
/******/ __nested_webpack_require_51424__.d = (exports, definition) => {
|
|
771
771
|
/******/ for(var key in definition) {
|
|
772
|
-
/******/ if(
|
|
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
|
-
/******/
|
|
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
|
-
/******/
|
|
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
|
-
|
|
804
|
-
/* harmony export */
|
|
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 =
|
|
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.
|
|
833
|
+
* surveyjs - Survey JavaScript library v2.3.11
|
|
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,
|
|
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
|
|
918
|
+
return __nested_webpack_require_870__(id);
|
|
919
919
|
}
|
|
920
920
|
function webpackContextResolve(req) {
|
|
921
|
-
if(!
|
|
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
|
|
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,
|
|
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
|
-
/******/
|
|
1577
|
+
/******/ __nested_webpack_require_64536__.d = (exports, definition) => {
|
|
1578
1578
|
/******/ for(var key in definition) {
|
|
1579
|
-
/******/ if(
|
|
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
|
-
/******/
|
|
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
|
-
/******/
|
|
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
|
-
|
|
1611
|
-
/* harmony export */
|
|
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 =
|
|
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
|
-
|
|
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
|
+
}
|
|
5308
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: this.item.uniqueId, 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.
|
|
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));
|
|
@@ -5731,13 +5742,20 @@ var TitleActions = /** @class */ (function (_super) {
|
|
|
5731
5742
|
enumerable: false,
|
|
5732
5743
|
configurable: true
|
|
5733
5744
|
});
|
|
5745
|
+
Object.defineProperty(TitleActions.prototype, "renderActions", {
|
|
5746
|
+
get: function () {
|
|
5747
|
+
return this.props.renderActions === undefined ? true : this.props.renderActions;
|
|
5748
|
+
},
|
|
5749
|
+
enumerable: false,
|
|
5750
|
+
configurable: true
|
|
5751
|
+
});
|
|
5734
5752
|
TitleActions.prototype.render = function () {
|
|
5735
5753
|
var titleContent = react__WEBPACK_IMPORTED_MODULE_0__.createElement(_title_content__WEBPACK_IMPORTED_MODULE_4__.TitleContent, { element: this.element, cssClasses: this.cssClasses });
|
|
5736
5754
|
if (!this.element.hasTitleActions)
|
|
5737
5755
|
return titleContent;
|
|
5738
5756
|
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "sv-title-actions" },
|
|
5739
5757
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "sv-title-actions__title" }, titleContent),
|
|
5740
|
-
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_3__.SurveyActionBar, { model: this.element.getTitleToolbar() })));
|
|
5758
|
+
(this.renderActions ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_3__.SurveyActionBar, { model: this.element.getTitleToolbar() }) : null)));
|
|
5741
5759
|
};
|
|
5742
5760
|
return TitleActions;
|
|
5743
5761
|
}(react__WEBPACK_IMPORTED_MODULE_0__.Component));
|
|
@@ -5899,7 +5917,7 @@ var TitleElement = /** @class */ (function (_super) {
|
|
|
5899
5917
|
return null;
|
|
5900
5918
|
var ariaLabel = element.titleAriaLabel || undefined;
|
|
5901
5919
|
var titleExpandableSvg = this.renderTitleExpandableSvg();
|
|
5902
|
-
var titleContent = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(_title_actions__WEBPACK_IMPORTED_MODULE_2__.TitleActions, { element: element, cssClasses: element.cssClasses }));
|
|
5920
|
+
var titleContent = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(_title_actions__WEBPACK_IMPORTED_MODULE_2__.TitleActions, { element: element, cssClasses: element.cssClasses, renderActions: this.props.renderActions }));
|
|
5903
5921
|
var onClick = undefined;
|
|
5904
5922
|
var onKeyUp = undefined;
|
|
5905
5923
|
if (element.hasTitleEvents) {
|
|
@@ -6172,7 +6190,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
6172
6190
|
SurveyQuestionDropdownBase.prototype.renderOther = function (item, cssClasses) {
|
|
6173
6191
|
if (!item || !item.isCommentShowing)
|
|
6174
6192
|
return null;
|
|
6175
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: item.
|
|
6193
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: item.uniqueId, className: this.question.getCommentAreaCss(true) },
|
|
6176
6194
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_4__.SurveyQuestionCommentValueItem, { question: this.question, item: item, cssClasses: this.question.cssClasses })));
|
|
6177
6195
|
};
|
|
6178
6196
|
SurveyQuestionDropdownBase.prototype.renderEditorButtons = function () {
|
|
@@ -6348,7 +6366,7 @@ var SurveyQuestionDropdownSelect = /** @class */ (function (_super) {
|
|
|
6348
6366
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { id: this.question.inputId, className: this.question.getControlClass(), disabled: true }, this.question.readOnlyText)) :
|
|
6349
6367
|
(react__WEBPACK_IMPORTED_MODULE_0__.createElement("select", { id: this.question.inputId, className: this.question.getControlClass(), ref: function (select) { return (_this.setControl(select)); }, autoComplete: this.question.autocomplete, onChange: this.updateValueOnEvent, onInput: this.updateValueOnEvent, onClick: click, onKeyUp: keyup, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage, required: this.question.isRequired },
|
|
6350
6368
|
this.question.allowClear ? (react__WEBPACK_IMPORTED_MODULE_0__.createElement("option", { value: "" }, this.question.placeholder)) : null,
|
|
6351
|
-
this.question.visibleChoices.map(function (item
|
|
6369
|
+
this.question.visibleChoices.map(function (item) { return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_dropdown_item__WEBPACK_IMPORTED_MODULE_4__.SurveyQuestionOptionItem, { key: item.uniqueId, item: item }); })));
|
|
6352
6370
|
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.selectWrapper },
|
|
6353
6371
|
selectElement,
|
|
6354
6372
|
this.createChevronButton()));
|
|
@@ -6949,7 +6967,7 @@ var SurveyQuestionImagePicker = /** @class */ (function (_super) {
|
|
|
6949
6967
|
var _this = this;
|
|
6950
6968
|
return this.question.columns.map(function (column, ci) {
|
|
6951
6969
|
var items = column.map(function (item, ii) {
|
|
6952
|
-
return _this.renderItem(
|
|
6970
|
+
return _this.renderItem(item, cssClasses);
|
|
6953
6971
|
});
|
|
6954
6972
|
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
|
|
6955
6973
|
});
|
|
@@ -6958,8 +6976,7 @@ var SurveyQuestionImagePicker = /** @class */ (function (_super) {
|
|
|
6958
6976
|
var items = [];
|
|
6959
6977
|
for (var i = 0; i < this.question.visibleChoices.length; i++) {
|
|
6960
6978
|
var item = this.question.visibleChoices[i];
|
|
6961
|
-
|
|
6962
|
-
items.push(this.renderItem(key, item, cssClasses));
|
|
6979
|
+
items.push(this.renderItem(item, cssClasses));
|
|
6963
6980
|
}
|
|
6964
6981
|
return items;
|
|
6965
6982
|
};
|
|
@@ -6970,8 +6987,8 @@ var SurveyQuestionImagePicker = /** @class */ (function (_super) {
|
|
|
6970
6987
|
enumerable: false,
|
|
6971
6988
|
configurable: true
|
|
6972
6989
|
});
|
|
6973
|
-
SurveyQuestionImagePicker.prototype.renderItem = function (
|
|
6974
|
-
var renderedItem = react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionImagePickerItem, { key:
|
|
6990
|
+
SurveyQuestionImagePicker.prototype.renderItem = function (item, cssClasses) {
|
|
6991
|
+
var renderedItem = react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionImagePickerItem, { key: item.uniqueId, question: this.question, item: item, cssClasses: cssClasses });
|
|
6975
6992
|
var survey = this.question.survey;
|
|
6976
6993
|
var wrappedItem = null;
|
|
6977
6994
|
if (!!survey) {
|
|
@@ -8531,7 +8548,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
|
|
|
8531
8548
|
var descriptionUnderInput = question.hasDescriptionUnderInput
|
|
8532
8549
|
? this.renderDescription()
|
|
8533
8550
|
: null;
|
|
8534
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: question.cssContent || undefined, style: contentStyle, "aria-hidden": question.contentAriaHidden, role: "presentation" },
|
|
8551
|
+
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
8552
|
questionRender,
|
|
8536
8553
|
comment,
|
|
8537
8554
|
descriptionUnderInput));
|
|
@@ -8973,11 +8990,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8973
8990
|
/* harmony export */ SurveyQuestionCheckboxItem: () => (/* binding */ SurveyQuestionCheckboxItem)
|
|
8974
8991
|
/* harmony export */ });
|
|
8975
8992
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact/compat/dist/compat.module.js");
|
|
8976
|
-
/* harmony import */ var
|
|
8977
|
-
/* harmony import */ var
|
|
8978
|
-
/* harmony import */ var
|
|
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");
|
|
8993
|
+
/* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_factory */ "../survey-react-ui/src/reactquestion_factory.tsx");
|
|
8994
|
+
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-factory */ "../survey-react-ui/src/element-factory.tsx");
|
|
8995
|
+
/* harmony import */ var _reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_selectbase */ "../survey-react-ui/src/reactquestion_selectbase.tsx");
|
|
8981
8996
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
8982
8997
|
var extendStatics = function (d, b) {
|
|
8983
8998
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -8997,8 +9012,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
8997
9012
|
|
|
8998
9013
|
|
|
8999
9014
|
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
9015
|
var SurveyQuestionCheckbox = /** @class */ (function (_super) {
|
|
9003
9016
|
__extends(SurveyQuestionCheckbox, _super);
|
|
9004
9017
|
function SurveyQuestionCheckbox(props) {
|
|
@@ -9011,16 +9024,10 @@ var SurveyQuestionCheckbox = /** @class */ (function (_super) {
|
|
|
9011
9024
|
enumerable: false,
|
|
9012
9025
|
configurable: true
|
|
9013
9026
|
});
|
|
9014
|
-
SurveyQuestionCheckbox.prototype.
|
|
9015
|
-
|
|
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 },
|
|
9027
|
+
SurveyQuestionCheckbox.prototype.renderHeader = function () {
|
|
9028
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
|
|
9018
9029
|
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()));
|
|
9030
|
+
this.getHeader());
|
|
9024
9031
|
};
|
|
9025
9032
|
SurveyQuestionCheckbox.prototype.getHeader = function () {
|
|
9026
9033
|
var _this = this;
|
|
@@ -9029,163 +9036,22 @@ var SurveyQuestionCheckbox = /** @class */ (function (_super) {
|
|
|
9029
9036
|
return _this.renderItem(item, false, _this.question.cssClasses);
|
|
9030
9037
|
});
|
|
9031
9038
|
}
|
|
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;
|
|
9039
|
+
return null;
|
|
9096
9040
|
};
|
|
9097
9041
|
return SurveyQuestionCheckbox;
|
|
9098
|
-
}(
|
|
9042
|
+
}(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectbase));
|
|
9099
9043
|
|
|
9100
9044
|
var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
|
|
9101
9045
|
__extends(SurveyQuestionCheckboxItem, _super);
|
|
9102
9046
|
function SurveyQuestionCheckboxItem(props) {
|
|
9103
|
-
|
|
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;
|
|
9047
|
+
return _super.call(this, props) || this;
|
|
9109
9048
|
}
|
|
9110
|
-
SurveyQuestionCheckboxItem.prototype.
|
|
9111
|
-
|
|
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;
|
|
9049
|
+
SurveyQuestionCheckboxItem.prototype.doOnItemChange = function (event) {
|
|
9050
|
+
this.question.clickItemHandler(this.item, event.target.checked);
|
|
9183
9051
|
};
|
|
9184
|
-
SurveyQuestionCheckboxItem.prototype.
|
|
9052
|
+
SurveyQuestionCheckboxItem.prototype.renderElementContent = function () {
|
|
9185
9053
|
var isChecked = this.question.isItemSelected(this.item);
|
|
9186
|
-
return
|
|
9187
|
-
this.renderCheckbox(isChecked, null),
|
|
9188
|
-
this.renderComment());
|
|
9054
|
+
return this.renderCheckbox(isChecked);
|
|
9189
9055
|
};
|
|
9190
9056
|
Object.defineProperty(SurveyQuestionCheckboxItem.prototype, "inputStyle", {
|
|
9191
9057
|
get: function () {
|
|
@@ -9194,13 +9060,7 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
|
|
|
9194
9060
|
enumerable: false,
|
|
9195
9061
|
configurable: true
|
|
9196
9062
|
});
|
|
9197
|
-
SurveyQuestionCheckboxItem.prototype.
|
|
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) {
|
|
9063
|
+
SurveyQuestionCheckboxItem.prototype.renderCheckbox = function (isChecked) {
|
|
9204
9064
|
var id = this.question.getItemId(this.item);
|
|
9205
9065
|
var itemClass = this.question.getItemClass(this.item);
|
|
9206
9066
|
var labelClass = this.question.getLabelClass(this.item);
|
|
@@ -9214,28 +9074,15 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
|
|
|
9214
9074
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("use", { xlinkHref: this.question.itemSvgIcon })) :
|
|
9215
9075
|
null) :
|
|
9216
9076
|
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
|
-
}
|
|
9077
|
+
itemLabel)));
|
|
9231
9078
|
};
|
|
9232
9079
|
return SurveyQuestionCheckboxItem;
|
|
9233
|
-
}(
|
|
9080
|
+
}(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectBaseItem));
|
|
9234
9081
|
|
|
9235
|
-
|
|
9082
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.registerElement("survey-checkbox-item", function (props) {
|
|
9236
9083
|
return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionCheckboxItem, props);
|
|
9237
9084
|
});
|
|
9238
|
-
|
|
9085
|
+
_reactquestion_factory__WEBPACK_IMPORTED_MODULE_1__.ReactQuestionFactory.Instance.registerQuestion("checkbox", function (props) {
|
|
9239
9086
|
return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionCheckbox, props);
|
|
9240
9087
|
});
|
|
9241
9088
|
|
|
@@ -9338,7 +9185,7 @@ var SurveyQuestionCommentValueItem = /** @class */ (function (_super) {
|
|
|
9338
9185
|
SurveyQuestionCommentValueItem.prototype.getTextAreaModel = function () {
|
|
9339
9186
|
return this.props.question.getCommentTextAreaModel(this.props.item);
|
|
9340
9187
|
};
|
|
9341
|
-
SurveyQuestionCommentValueItem.prototype.getKey = function () { return this.props.item.
|
|
9188
|
+
SurveyQuestionCommentValueItem.prototype.getKey = function () { return this.props.item.uniqueId; };
|
|
9342
9189
|
return SurveyQuestionCommentValueItem;
|
|
9343
9190
|
}(SurveyQuestionCommentItem));
|
|
9344
9191
|
|
|
@@ -9542,6 +9389,16 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
9542
9389
|
});
|
|
9543
9390
|
}
|
|
9544
9391
|
};
|
|
9392
|
+
_this.onArrayChangedCallback = function (stateElement, options) {
|
|
9393
|
+
if (_this.isRendering)
|
|
9394
|
+
return;
|
|
9395
|
+
_this.changedStatePropNameValue = options.name;
|
|
9396
|
+
_this.setState(function (state) {
|
|
9397
|
+
var newState = {};
|
|
9398
|
+
newState[options.name] = options.newValue;
|
|
9399
|
+
return newState;
|
|
9400
|
+
});
|
|
9401
|
+
};
|
|
9545
9402
|
return _this;
|
|
9546
9403
|
}
|
|
9547
9404
|
SurveyElementBase.renderLocString = function (locStr, style, key) {
|
|
@@ -9697,16 +9554,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
9697
9554
|
var val = hash[key];
|
|
9698
9555
|
if (Array.isArray(val)) {
|
|
9699
9556
|
var val = val;
|
|
9700
|
-
val
|
|
9701
|
-
if (_this.isRendering)
|
|
9702
|
-
return;
|
|
9703
|
-
_this.changedStatePropNameValue = key;
|
|
9704
|
-
_this.setState(function (state) {
|
|
9705
|
-
var newState = {};
|
|
9706
|
-
newState[key] = val;
|
|
9707
|
-
return newState;
|
|
9708
|
-
});
|
|
9709
|
-
};
|
|
9557
|
+
stateElement.addOnArrayChangedCallback(val, _this.onArrayChangedCallback);
|
|
9710
9558
|
}
|
|
9711
9559
|
});
|
|
9712
9560
|
stateElement.setPropertyValueCoreHandler = this.propertyValueChangedHandler;
|
|
@@ -9715,6 +9563,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
9715
9563
|
return true;
|
|
9716
9564
|
};
|
|
9717
9565
|
SurveyElementBase.prototype.unMakeBaseElementReact = function (stateElement) {
|
|
9566
|
+
var _this = this;
|
|
9718
9567
|
if (!this.canMakeReact(stateElement))
|
|
9719
9568
|
return;
|
|
9720
9569
|
if (!this.isCurrentStateElement(stateElement)) {
|
|
@@ -9727,7 +9576,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
9727
9576
|
var val = hash[key];
|
|
9728
9577
|
if (Array.isArray(val)) {
|
|
9729
9578
|
var val = val;
|
|
9730
|
-
val
|
|
9579
|
+
stateElement.removeOnArrayChangedCallback(val, _this.onArrayChangedCallback);
|
|
9731
9580
|
}
|
|
9732
9581
|
});
|
|
9733
9582
|
};
|
|
@@ -10308,21 +10157,19 @@ var SurveyQuestionMatrix = /** @class */ (function (_super) {
|
|
|
10308
10157
|
var headers = [];
|
|
10309
10158
|
for (var i = 0; i < this.question.visibleColumns.length; i++) {
|
|
10310
10159
|
var column = this.question.visibleColumns[i];
|
|
10311
|
-
var key = "column" + i;
|
|
10312
10160
|
var columText = this.renderLocString(column.locText);
|
|
10313
10161
|
var style = {};
|
|
10314
10162
|
if (!!this.question.columnMinWidth) {
|
|
10315
10163
|
style.minWidth = this.question.columnMinWidth;
|
|
10316
10164
|
style.width = this.question.columnMinWidth;
|
|
10317
10165
|
}
|
|
10318
|
-
headers.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement("th", { className: this.question.cssClasses.headerCell, style: style, key:
|
|
10166
|
+
headers.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement("th", { className: this.question.cssClasses.headerCell, style: style, key: column.uniqueId }, this.wrapCell({ column: column }, columText, "column-header")));
|
|
10319
10167
|
}
|
|
10320
10168
|
var rows = [];
|
|
10321
10169
|
var visibleRows = this.question.visibleRows;
|
|
10322
10170
|
for (var i = 0; i < visibleRows.length; i++) {
|
|
10323
10171
|
var row = visibleRows[i];
|
|
10324
|
-
|
|
10325
|
-
rows.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionMatrixRow, { key: key, question: this.question, cssClasses: cssClasses, row: row, isFirst: i == 0 }));
|
|
10172
|
+
rows.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionMatrixRow, { key: row.uniqueId, question: this.question, cssClasses: cssClasses, row: row, isFirst: i == 0 }));
|
|
10326
10173
|
}
|
|
10327
10174
|
var header = !this.question.showHeader ? null : (react__WEBPACK_IMPORTED_MODULE_0__.createElement("thead", { role: "presentation" },
|
|
10328
10175
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr", null,
|
|
@@ -10400,7 +10247,7 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
|
|
|
10400
10247
|
var _loop_1 = function () {
|
|
10401
10248
|
var td = null;
|
|
10402
10249
|
var column = this_1.question.visibleColumns[i];
|
|
10403
|
-
var key =
|
|
10250
|
+
var key = column.uniqueId;
|
|
10404
10251
|
var itemClass = this_1.question.getItemClass(row, column);
|
|
10405
10252
|
if (this_1.question.hasCellText) {
|
|
10406
10253
|
var getHandler = function (column) { return function () { return _this.cellClick(row, column); }; };
|
|
@@ -10807,7 +10654,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
|
|
|
10807
10654
|
};
|
|
10808
10655
|
SurveyQuestionMatrixDropdownBase.prototype.renderTableDiv = function () {
|
|
10809
10656
|
var _this = this;
|
|
10810
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.tableWrapper,
|
|
10657
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.tableWrapper, ref: function (root) { return (_this.setControl(root)); } },
|
|
10811
10658
|
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
10659
|
};
|
|
10813
10660
|
return SurveyQuestionMatrixDropdownBase;
|
|
@@ -11228,7 +11075,7 @@ var SurveyQuestionMultipleText = /** @class */ (function (_super) {
|
|
|
11228
11075
|
else {
|
|
11229
11076
|
cellContent = react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyMultipleTextItem, { question: this.question, item: cell.item, creator: this.creator, cssClasses: cssClasses });
|
|
11230
11077
|
}
|
|
11231
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("td", { key:
|
|
11078
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("td", { key: cell.item.id, className: cell.className, onFocus: focusIn }, cellContent));
|
|
11232
11079
|
};
|
|
11233
11080
|
SurveyQuestionMultipleText.prototype.renderRow = function (rowIndex, cells, cssClasses) {
|
|
11234
11081
|
var key = "item" + rowIndex;
|
|
@@ -11518,11 +11365,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11518
11365
|
/* harmony export */ SurveyQuestionRadiogroup: () => (/* binding */ SurveyQuestionRadiogroup)
|
|
11519
11366
|
/* harmony export */ });
|
|
11520
11367
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact/compat/dist/compat.module.js");
|
|
11521
|
-
/* harmony import */ var
|
|
11522
|
-
/* harmony import */ var
|
|
11523
|
-
/* harmony import */ var
|
|
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");
|
|
11368
|
+
/* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_factory */ "../survey-react-ui/src/reactquestion_factory.tsx");
|
|
11369
|
+
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-factory */ "../survey-react-ui/src/element-factory.tsx");
|
|
11370
|
+
/* harmony import */ var _reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_selectbase */ "../survey-react-ui/src/reactquestion_selectbase.tsx");
|
|
11526
11371
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
11527
11372
|
var extendStatics = function (d, b) {
|
|
11528
11373
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -11542,8 +11387,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
11542
11387
|
|
|
11543
11388
|
|
|
11544
11389
|
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
11390
|
var SurveyQuestionRadiogroup = /** @class */ (function (_super) {
|
|
11548
11391
|
__extends(SurveyQuestionRadiogroup, _super);
|
|
11549
11392
|
function SurveyQuestionRadiogroup(props) {
|
|
@@ -11556,97 +11399,29 @@ var SurveyQuestionRadiogroup = /** @class */ (function (_super) {
|
|
|
11556
11399
|
enumerable: false,
|
|
11557
11400
|
configurable: true
|
|
11558
11401
|
});
|
|
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
11402
|
SurveyQuestionRadiogroup.prototype.getFooter = function () {
|
|
11575
|
-
|
|
11576
|
-
|
|
11577
|
-
|
|
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)));
|
|
11403
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
|
|
11404
|
+
_super.prototype.getFooter.call(this),
|
|
11405
|
+
this.renderClearButton());
|
|
11584
11406
|
};
|
|
11585
|
-
SurveyQuestionRadiogroup.prototype.
|
|
11407
|
+
SurveyQuestionRadiogroup.prototype.renderClearButton = function () {
|
|
11586
11408
|
var _this = this;
|
|
11587
|
-
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
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;
|
|
11409
|
+
if (!this.question.showClearButtonInContent)
|
|
11410
|
+
return null;
|
|
11411
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null,
|
|
11412
|
+
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
11413
|
};
|
|
11638
11414
|
SurveyQuestionRadiogroup.prototype.getStateValue = function () {
|
|
11639
11415
|
return !this.question.isEmpty() ? this.question.renderedValue : "";
|
|
11640
11416
|
};
|
|
11417
|
+
SurveyQuestionRadiogroup.prototype.isItemChecked = function (item, value) { return item.value === value; };
|
|
11641
11418
|
return SurveyQuestionRadiogroup;
|
|
11642
|
-
}(
|
|
11419
|
+
}(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectbase));
|
|
11643
11420
|
|
|
11644
11421
|
var SurveyQuestionRadioItem = /** @class */ (function (_super) {
|
|
11645
11422
|
__extends(SurveyQuestionRadioItem, _super);
|
|
11646
11423
|
function SurveyQuestionRadioItem(props) {
|
|
11647
11424
|
var _this = _super.call(this, props) || this;
|
|
11648
|
-
_this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
|
|
11649
|
-
_this.handleOnChange = _this.handleOnChange.bind(_this);
|
|
11650
11425
|
_this.handleOnMouseDown = _this.handleOnMouseDown.bind(_this);
|
|
11651
11426
|
return _this;
|
|
11652
11427
|
}
|
|
@@ -11660,27 +11435,6 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
|
|
|
11660
11435
|
enumerable: false,
|
|
11661
11436
|
configurable: true
|
|
11662
11437
|
});
|
|
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
11438
|
Object.defineProperty(SurveyQuestionRadioItem.prototype, "isChecked", {
|
|
11685
11439
|
get: function () {
|
|
11686
11440
|
return this.props.isChecked;
|
|
@@ -11688,60 +11442,14 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
|
|
|
11688
11442
|
enumerable: false,
|
|
11689
11443
|
configurable: true
|
|
11690
11444
|
});
|
|
11691
|
-
|
|
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) {
|
|
11445
|
+
SurveyQuestionRadioItem.prototype.doOnItemChange = function (event) {
|
|
11716
11446
|
this.question.clickItemHandler(this.item);
|
|
11717
11447
|
};
|
|
11718
11448
|
SurveyQuestionRadioItem.prototype.handleOnMouseDown = function (event) {
|
|
11719
11449
|
this.question.onMouseDown();
|
|
11720
11450
|
};
|
|
11721
|
-
SurveyQuestionRadioItem.prototype.
|
|
11722
|
-
return
|
|
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 }));
|
|
11451
|
+
SurveyQuestionRadioItem.prototype.renderElementContent = function () {
|
|
11452
|
+
return this.renderRadioButton();
|
|
11745
11453
|
};
|
|
11746
11454
|
SurveyQuestionRadioItem.prototype.renderRadioButton = function () {
|
|
11747
11455
|
var itemClass = this.question.getItemClass(this.item);
|
|
@@ -11759,25 +11467,13 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
|
|
|
11759
11467
|
null,
|
|
11760
11468
|
itemLabel)));
|
|
11761
11469
|
};
|
|
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
11470
|
return SurveyQuestionRadioItem;
|
|
11775
|
-
}(
|
|
11471
|
+
}(_reactquestion_selectbase__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionSelectBaseItem));
|
|
11776
11472
|
|
|
11777
|
-
|
|
11473
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.registerElement("survey-radiogroup-item", function (props) {
|
|
11778
11474
|
return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRadioItem, props);
|
|
11779
11475
|
});
|
|
11780
|
-
|
|
11476
|
+
_reactquestion_factory__WEBPACK_IMPORTED_MODULE_1__.ReactQuestionFactory.Instance.registerQuestion("radiogroup", function (props) {
|
|
11781
11477
|
return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRadiogroup, props);
|
|
11782
11478
|
});
|
|
11783
11479
|
|
|
@@ -11887,7 +11583,7 @@ var SurveyQuestionRanking = /** @class */ (function (_super) {
|
|
|
11887
11583
|
var index = i;
|
|
11888
11584
|
var indexText = this.question.getNumberByIndex(index);
|
|
11889
11585
|
var tabIndex = this.question.getItemTabIndex(item);
|
|
11890
|
-
var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRankingItem, { key: item.
|
|
11586
|
+
var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRankingItem, { key: item.uniqueId, text: text, index: index, indexText: indexText, itemTabIndex: tabIndex, handleKeydown: handleKeydown, handlePointerDown: handlePointerDown, handlePointerUp: handlePointerUp, cssClasses: cssClasses, itemClass: itemClass, question: question, unrankedItem: unrankedItem, item: item }));
|
|
11891
11587
|
var survey = this.question.survey;
|
|
11892
11588
|
var wrappedItem = null;
|
|
11893
11589
|
if (!!survey) {
|
|
@@ -12130,6 +11826,276 @@ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__.ReactQuestionFactory.Instanc
|
|
|
12130
11826
|
});
|
|
12131
11827
|
|
|
12132
11828
|
|
|
11829
|
+
/***/ }),
|
|
11830
|
+
|
|
11831
|
+
/***/ "../survey-react-ui/src/reactquestion_selectbase.tsx":
|
|
11832
|
+
/*!***********************************************************!*\
|
|
11833
|
+
!*** ../survey-react-ui/src/reactquestion_selectbase.tsx ***!
|
|
11834
|
+
\***********************************************************/
|
|
11835
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11836
|
+
|
|
11837
|
+
"use strict";
|
|
11838
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11839
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11840
|
+
/* harmony export */ SurveyQuestionSelectBaseItem: () => (/* binding */ SurveyQuestionSelectBaseItem),
|
|
11841
|
+
/* harmony export */ SurveyQuestionSelectbase: () => (/* binding */ SurveyQuestionSelectbase)
|
|
11842
|
+
/* harmony export */ });
|
|
11843
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/preact/compat/dist/compat.module.js");
|
|
11844
|
+
/* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "../survey-react-ui/src/reactquestion_element.tsx");
|
|
11845
|
+
/* harmony import */ var _reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_comment */ "../survey-react-ui/src/reactquestion_comment.tsx");
|
|
11846
|
+
/* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactsurveymodel */ "../survey-react-ui/src/reactsurveymodel.tsx");
|
|
11847
|
+
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./element-factory */ "../survey-react-ui/src/element-factory.tsx");
|
|
11848
|
+
/* harmony import */ var _panel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./panel */ "../survey-react-ui/src/panel.tsx");
|
|
11849
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
11850
|
+
var extendStatics = function (d, b) {
|
|
11851
|
+
extendStatics = Object.setPrototypeOf ||
|
|
11852
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
11853
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
11854
|
+
return extendStatics(d, b);
|
|
11855
|
+
};
|
|
11856
|
+
return function (d, b) {
|
|
11857
|
+
if (typeof b !== "function" && b !== null)
|
|
11858
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11859
|
+
extendStatics(d, b);
|
|
11860
|
+
function __() { this.constructor = d; }
|
|
11861
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
11862
|
+
};
|
|
11863
|
+
})();
|
|
11864
|
+
|
|
11865
|
+
|
|
11866
|
+
|
|
11867
|
+
|
|
11868
|
+
|
|
11869
|
+
|
|
11870
|
+
var SurveyQuestionSelectbase = /** @class */ (function (_super) {
|
|
11871
|
+
__extends(SurveyQuestionSelectbase, _super);
|
|
11872
|
+
function SurveyQuestionSelectbase(props) {
|
|
11873
|
+
return _super.call(this, props) || this;
|
|
11874
|
+
}
|
|
11875
|
+
Object.defineProperty(SurveyQuestionSelectbase.prototype, "question", {
|
|
11876
|
+
get: function () {
|
|
11877
|
+
return this.questionBase;
|
|
11878
|
+
},
|
|
11879
|
+
enumerable: false,
|
|
11880
|
+
configurable: true
|
|
11881
|
+
});
|
|
11882
|
+
SurveyQuestionSelectbase.prototype.renderElement = function () {
|
|
11883
|
+
var _this = this;
|
|
11884
|
+
var cssClasses = this.question.cssClasses;
|
|
11885
|
+
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 },
|
|
11886
|
+
this.renderHeader(),
|
|
11887
|
+
this.question.hasColumns
|
|
11888
|
+
? this.getColumnedBody(cssClasses)
|
|
11889
|
+
: this.getBody(cssClasses),
|
|
11890
|
+
this.getFooter()));
|
|
11891
|
+
};
|
|
11892
|
+
SurveyQuestionSelectbase.prototype.renderHeader = function () { return null; };
|
|
11893
|
+
SurveyQuestionSelectbase.prototype.getFooter = function () {
|
|
11894
|
+
var _this = this;
|
|
11895
|
+
if (this.question.hasFootItems) {
|
|
11896
|
+
var items = this.question.footItems.map(function (item, ii) {
|
|
11897
|
+
return _this.renderItem(item, false, _this.question.cssClasses);
|
|
11898
|
+
});
|
|
11899
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, items);
|
|
11900
|
+
}
|
|
11901
|
+
return null;
|
|
11902
|
+
};
|
|
11903
|
+
SurveyQuestionSelectbase.prototype.getStateValue = function () { return undefined; };
|
|
11904
|
+
SurveyQuestionSelectbase.prototype.isItemChecked = function (item, value) { return false; };
|
|
11905
|
+
SurveyQuestionSelectbase.prototype.getColumnedBody = function (cssClasses) {
|
|
11906
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootMultiColumn }, this.getColumns(cssClasses)));
|
|
11907
|
+
};
|
|
11908
|
+
SurveyQuestionSelectbase.prototype.getColumns = function (cssClasses) {
|
|
11909
|
+
var _this = this;
|
|
11910
|
+
var value = this.getStateValue();
|
|
11911
|
+
return this.question.columns.map(function (column, ci) {
|
|
11912
|
+
var items = column.map(function (item, ii) {
|
|
11913
|
+
return _this.renderItem(item, ci === 0 && ii === 0, cssClasses, "" + ci + ii, _this.isItemChecked(item, value));
|
|
11914
|
+
});
|
|
11915
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
|
|
11916
|
+
});
|
|
11917
|
+
};
|
|
11918
|
+
SurveyQuestionSelectbase.prototype.getBody = function (cssClasses) {
|
|
11919
|
+
if (this.question.blockedRow) {
|
|
11920
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
|
|
11921
|
+
}
|
|
11922
|
+
else {
|
|
11923
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, this.getItems(cssClasses, this.question.bodyItems));
|
|
11924
|
+
}
|
|
11925
|
+
};
|
|
11926
|
+
SurveyQuestionSelectbase.prototype.getItems = function (cssClasses, choices) {
|
|
11927
|
+
var items = [];
|
|
11928
|
+
var value = this.getStateValue();
|
|
11929
|
+
for (var i = 0; i < choices.length; i++) {
|
|
11930
|
+
var item = choices[i];
|
|
11931
|
+
var renderedItem = this.renderItem(item, i == 0, cssClasses, "" + i, this.isItemChecked(item, value));
|
|
11932
|
+
if (!!renderedItem) {
|
|
11933
|
+
items.push(renderedItem);
|
|
11934
|
+
}
|
|
11935
|
+
}
|
|
11936
|
+
return items;
|
|
11937
|
+
};
|
|
11938
|
+
Object.defineProperty(SurveyQuestionSelectbase.prototype, "textStyle", {
|
|
11939
|
+
get: function () {
|
|
11940
|
+
return null;
|
|
11941
|
+
},
|
|
11942
|
+
enumerable: false,
|
|
11943
|
+
configurable: true
|
|
11944
|
+
});
|
|
11945
|
+
SurveyQuestionSelectbase.prototype.renderItem = function (item, isFirst, cssClasses, index, isChecked) {
|
|
11946
|
+
var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_4__.ReactElementFactory.Instance.createElement(this.question.itemComponent, {
|
|
11947
|
+
key: item.uniqueId,
|
|
11948
|
+
question: this.question,
|
|
11949
|
+
cssClasses: cssClasses,
|
|
11950
|
+
isDisplayMode: this.isDisplayMode,
|
|
11951
|
+
item: item,
|
|
11952
|
+
textStyle: this.textStyle,
|
|
11953
|
+
index: index,
|
|
11954
|
+
isFirst: isFirst,
|
|
11955
|
+
isChecked: isChecked,
|
|
11956
|
+
creator: this.props.creator,
|
|
11957
|
+
});
|
|
11958
|
+
var survey = this.question.survey;
|
|
11959
|
+
var wrappedItem = null;
|
|
11960
|
+
if (!!survey && !!renderedItem) {
|
|
11961
|
+
wrappedItem = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_3__.ReactSurveyElementsWrapper.wrapItemValue(survey, renderedItem, this.question, item);
|
|
11962
|
+
}
|
|
11963
|
+
return wrappedItem !== null && wrappedItem !== void 0 ? wrappedItem : renderedItem;
|
|
11964
|
+
};
|
|
11965
|
+
return SurveyQuestionSelectbase;
|
|
11966
|
+
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.SurveyQuestionElementBase));
|
|
11967
|
+
|
|
11968
|
+
var SurveyQuestionSelectBaseItem = /** @class */ (function (_super) {
|
|
11969
|
+
__extends(SurveyQuestionSelectBaseItem, _super);
|
|
11970
|
+
function SurveyQuestionSelectBaseItem(props) {
|
|
11971
|
+
var _this = _super.call(this, props) || this;
|
|
11972
|
+
_this.handleOnChange = function (event) {
|
|
11973
|
+
_this.doOnItemChange(event);
|
|
11974
|
+
};
|
|
11975
|
+
_this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
|
|
11976
|
+
return _this;
|
|
11977
|
+
}
|
|
11978
|
+
SurveyQuestionSelectBaseItem.prototype.getStateElement = function () {
|
|
11979
|
+
return this.item;
|
|
11980
|
+
};
|
|
11981
|
+
Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "question", {
|
|
11982
|
+
get: function () {
|
|
11983
|
+
return this.props.question;
|
|
11984
|
+
},
|
|
11985
|
+
enumerable: false,
|
|
11986
|
+
configurable: true
|
|
11987
|
+
});
|
|
11988
|
+
Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "item", {
|
|
11989
|
+
get: function () {
|
|
11990
|
+
return this.props.item;
|
|
11991
|
+
},
|
|
11992
|
+
enumerable: false,
|
|
11993
|
+
configurable: true
|
|
11994
|
+
});
|
|
11995
|
+
Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "textStyle", {
|
|
11996
|
+
get: function () {
|
|
11997
|
+
return this.props.textStyle;
|
|
11998
|
+
},
|
|
11999
|
+
enumerable: false,
|
|
12000
|
+
configurable: true
|
|
12001
|
+
});
|
|
12002
|
+
Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "isFirst", {
|
|
12003
|
+
get: function () {
|
|
12004
|
+
return this.props.isFirst;
|
|
12005
|
+
},
|
|
12006
|
+
enumerable: false,
|
|
12007
|
+
configurable: true
|
|
12008
|
+
});
|
|
12009
|
+
Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "index", {
|
|
12010
|
+
get: function () {
|
|
12011
|
+
return this.props.index;
|
|
12012
|
+
},
|
|
12013
|
+
enumerable: false,
|
|
12014
|
+
configurable: true
|
|
12015
|
+
});
|
|
12016
|
+
Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "hideCaption", {
|
|
12017
|
+
get: function () {
|
|
12018
|
+
return this.props.hideCaption === true;
|
|
12019
|
+
},
|
|
12020
|
+
enumerable: false,
|
|
12021
|
+
configurable: true
|
|
12022
|
+
});
|
|
12023
|
+
Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "ariaLabel", {
|
|
12024
|
+
get: function () {
|
|
12025
|
+
return this.props.ariaLabel || null;
|
|
12026
|
+
},
|
|
12027
|
+
enumerable: false,
|
|
12028
|
+
configurable: true
|
|
12029
|
+
});
|
|
12030
|
+
SurveyQuestionSelectBaseItem.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
12031
|
+
_super.prototype.componentDidUpdate.call(this, prevProps, prevState);
|
|
12032
|
+
if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
|
|
12033
|
+
if (this.props.item) {
|
|
12034
|
+
this.props.item.setRootElement(this.rootRef.current);
|
|
12035
|
+
}
|
|
12036
|
+
if (prevProps.item) {
|
|
12037
|
+
prevProps.item.setRootElement(undefined);
|
|
12038
|
+
}
|
|
12039
|
+
}
|
|
12040
|
+
};
|
|
12041
|
+
SurveyQuestionSelectBaseItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
|
12042
|
+
if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
|
|
12043
|
+
return false;
|
|
12044
|
+
return (!this.question.customWidget ||
|
|
12045
|
+
!!this.question.customWidgetData.isNeedRender ||
|
|
12046
|
+
!!this.question.customWidget.widgetJson.isDefaultRender ||
|
|
12047
|
+
!!this.question.customWidget.widgetJson.render);
|
|
12048
|
+
};
|
|
12049
|
+
SurveyQuestionSelectBaseItem.prototype.doOnItemChange = function (event) { };
|
|
12050
|
+
SurveyQuestionSelectBaseItem.prototype.canRender = function () {
|
|
12051
|
+
return !!this.item && !!this.question;
|
|
12052
|
+
};
|
|
12053
|
+
SurveyQuestionSelectBaseItem.prototype.renderElement = function () {
|
|
12054
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
|
|
12055
|
+
this.renderElementContent(),
|
|
12056
|
+
this.renderPanel(),
|
|
12057
|
+
this.renderComment());
|
|
12058
|
+
};
|
|
12059
|
+
SurveyQuestionSelectBaseItem.prototype.renderElementContent = function () {
|
|
12060
|
+
return null;
|
|
12061
|
+
};
|
|
12062
|
+
Object.defineProperty(SurveyQuestionSelectBaseItem.prototype, "inputStyle", {
|
|
12063
|
+
get: function () {
|
|
12064
|
+
return null; //{ marginRight: "3px" };
|
|
12065
|
+
},
|
|
12066
|
+
enumerable: false,
|
|
12067
|
+
configurable: true
|
|
12068
|
+
});
|
|
12069
|
+
SurveyQuestionSelectBaseItem.prototype.renderComment = function () {
|
|
12070
|
+
if (!this.item.isCommentShowing)
|
|
12071
|
+
return null;
|
|
12072
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
|
|
12073
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__.SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
|
|
12074
|
+
};
|
|
12075
|
+
SurveyQuestionSelectBaseItem.prototype.renderPanel = function () {
|
|
12076
|
+
if (this.item.isPanelShowing) {
|
|
12077
|
+
var panel = this.item.panel;
|
|
12078
|
+
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 }));
|
|
12079
|
+
}
|
|
12080
|
+
return null;
|
|
12081
|
+
};
|
|
12082
|
+
SurveyQuestionSelectBaseItem.prototype.componentDidMount = function () {
|
|
12083
|
+
_super.prototype.componentDidMount.call(this);
|
|
12084
|
+
if (!this.question.isDesignMode) {
|
|
12085
|
+
this.item.setRootElement(this.rootRef.current);
|
|
12086
|
+
}
|
|
12087
|
+
};
|
|
12088
|
+
SurveyQuestionSelectBaseItem.prototype.componentWillUnmount = function () {
|
|
12089
|
+
_super.prototype.componentWillUnmount.call(this);
|
|
12090
|
+
if (!this.question.isDesignMode) {
|
|
12091
|
+
this.item.setRootElement(undefined);
|
|
12092
|
+
}
|
|
12093
|
+
};
|
|
12094
|
+
return SurveyQuestionSelectBaseItem;
|
|
12095
|
+
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.ReactSurveyElement));
|
|
12096
|
+
|
|
12097
|
+
|
|
12098
|
+
|
|
12133
12099
|
/***/ }),
|
|
12134
12100
|
|
|
12135
12101
|
/***/ "../survey-react-ui/src/reactquestion_singleinputsummary.tsx":
|
|
@@ -12910,7 +12876,7 @@ var SurveyQuestionSignaturePad = /** @class */ (function (_super) {
|
|
|
12910
12876
|
return null;
|
|
12911
12877
|
var cssClasses = this.question.cssClasses;
|
|
12912
12878
|
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.
|
|
12879
|
+
react__WEBPACK_IMPORTED_MODULE_0__.createElement("button", { type: "button", className: cssClasses.clearButton, title: this.question.clearButtonCaption, onClick: function () { return _this.question.clearValueFromUI(); } },
|
|
12914
12880
|
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
12881
|
" "));
|
|
12916
12882
|
};
|
|
@@ -13829,7 +13795,7 @@ var preact = react__WEBPACK_IMPORTED_MODULE_0__;
|
|
|
13829
13795
|
|
|
13830
13796
|
|
|
13831
13797
|
|
|
13832
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.3.
|
|
13798
|
+
(0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.3.11"), "survey-js-ui");
|
|
13833
13799
|
|
|
13834
13800
|
})();
|
|
13835
13801
|
|