survey-react 1.11.4 → 1.11.5
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/defaultV2.css +126 -39
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +26 -1
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +33 -1
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +87 -16
- package/survey.react.js +203 -74
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.11.
|
2
|
+
* surveyjs - Survey JavaScript library v1.11.5
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -909,6 +909,13 @@ var BaseAction = /** @class */ (function (_super) {
|
|
909
909
|
enumerable: false,
|
910
910
|
configurable: true
|
911
911
|
});
|
912
|
+
Object.defineProperty(BaseAction.prototype, "hasSubItems", {
|
913
|
+
get: function () {
|
914
|
+
return !!this.items && this.items.length > 0;
|
915
|
+
},
|
916
|
+
enumerable: false,
|
917
|
+
configurable: true
|
918
|
+
});
|
912
919
|
BaseAction.prototype.getActionBarItemTitleCss = function () {
|
913
920
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
|
914
921
|
.append(this.cssClasses.itemTitle)
|
@@ -1095,11 +1102,13 @@ var Action = /** @class */ (function (_super) {
|
|
1095
1102
|
Action.prototype.createLocTitle = function () {
|
1096
1103
|
return this.createLocalizableString("title", this, true);
|
1097
1104
|
};
|
1098
|
-
Action.prototype.
|
1105
|
+
Action.prototype.setSubItems = function (options) {
|
1099
1106
|
this.markerIconName = "icon-next_16x16";
|
1100
1107
|
this.component = "sv-list-item-group";
|
1101
|
-
this.items = __spreadArray([], items);
|
1102
|
-
var
|
1108
|
+
this.items = __spreadArray([], options.items);
|
1109
|
+
var listOptions = Object.assign({}, options);
|
1110
|
+
listOptions.searchEnabled = false;
|
1111
|
+
var popupModel = createPopupModelWithListModel(listOptions, { horizontalPosition: "right", showPointer: false, canShrink: false });
|
1103
1112
|
popupModel.cssClass = "sv-popup-inner";
|
1104
1113
|
this.popupModel = popupModel;
|
1105
1114
|
};
|
@@ -1650,9 +1659,6 @@ var ActionContainer = /** @class */ (function (_super) {
|
|
1650
1659
|
itemValue.showPopupDelayed(_this.subItemsShowDelay);
|
1651
1660
|
_this.popupAfterShowCallback(itemValue);
|
1652
1661
|
}
|
1653
|
-
else if (!!action.popupModel && action.popupModel.isVisible) {
|
1654
|
-
action.hidePopupDelayed(_this.subItemsHideDelay);
|
1655
|
-
}
|
1656
1662
|
});
|
1657
1663
|
};
|
1658
1664
|
ActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
|
@@ -6943,12 +6949,12 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
6943
6949
|
if (!draggedElementShortcut)
|
6944
6950
|
return;
|
6945
6951
|
// draggedElementShortcut.innerText = text;
|
6946
|
-
draggedElementShortcut.
|
6952
|
+
draggedElementShortcut.className = "sv-drag-drop-choices-shortcut";
|
6947
6953
|
var isDeepClone = true;
|
6948
6954
|
var clone = (draggedElementNode
|
6949
6955
|
.closest("[data-sv-drop-target-item-value]")
|
6950
6956
|
.cloneNode(isDeepClone));
|
6951
|
-
clone.
|
6957
|
+
clone.classList.add("sv-drag-drop-choices-shortcut__content");
|
6952
6958
|
var dragIcon = clone.querySelector(".svc-item-value-controls__drag-icon");
|
6953
6959
|
dragIcon.style.visibility = "visible";
|
6954
6960
|
var removeIcon = clone.querySelector(".svc-item-value-controls__remove");
|
@@ -6962,6 +6968,9 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
6962
6968
|
draggedElementShortcut.shortcutXOffset = event.clientX - rect.x;
|
6963
6969
|
draggedElementShortcut.shortcutYOffset = event.clientY - rect.y;
|
6964
6970
|
this.isBottom = null;
|
6971
|
+
if (typeof this.onShortcutCreated === "function") {
|
6972
|
+
this.onShortcutCreated(draggedElementShortcut);
|
6973
|
+
}
|
6965
6974
|
return draggedElementShortcut;
|
6966
6975
|
};
|
6967
6976
|
DragDropChoices.prototype.createImagePickerShortcut = function (item, text, draggedElementNode, event) {
|
@@ -7916,9 +7925,13 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7916
7925
|
}
|
7917
7926
|
return _super.prototype.calculateIsBottom.call(this, clientY);
|
7918
7927
|
};
|
7919
|
-
DragDropRankingChoices.prototype.
|
7928
|
+
DragDropRankingChoices.prototype.getIndices = function (model, fromChoicesArray, toChoicesArray) {
|
7920
7929
|
var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
7921
7930
|
var toIndex = toChoicesArray.indexOf(this.dropTarget);
|
7931
|
+
if (fromIndex < 0 && !!this.draggedElement) {
|
7932
|
+
this.draggedElement = _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].getItemByValue(fromChoicesArray, this.draggedElement.value) || this.draggedElement;
|
7933
|
+
fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
7934
|
+
}
|
7922
7935
|
if (toIndex === -1) {
|
7923
7936
|
var length_1 = model.value.length;
|
7924
7937
|
toIndex = length_1;
|
@@ -7936,7 +7949,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7936
7949
|
return { fromIndex: fromIndex, toIndex: toIndex };
|
7937
7950
|
};
|
7938
7951
|
DragDropRankingChoices.prototype.afterDragOver = function (dropTargetNode) {
|
7939
|
-
var _a = this.
|
7952
|
+
var _a = this.getIndices(this.parentElement, this.parentElement.rankingChoices, this.parentElement.rankingChoices), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
|
7940
7953
|
this.reorderRankedItem(this.parentElement, fromIndex, toIndex);
|
7941
7954
|
};
|
7942
7955
|
DragDropRankingChoices.prototype.updateDraggedElementShortcut = function (newIndex) {
|
@@ -8066,7 +8079,7 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
8066
8079
|
};
|
8067
8080
|
DragDropRankingSelectToRank.prototype.doRankBetween = function (dropTargetNode, fromChoicesArray, toChoicesArray, rankFunction) {
|
8068
8081
|
var questionModel = this.parentElement;
|
8069
|
-
var _a = this.
|
8082
|
+
var _a = this.getIndices(questionModel, fromChoicesArray, toChoicesArray), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
|
8070
8083
|
rankFunction(questionModel, fromIndex, toIndex, dropTargetNode);
|
8071
8084
|
};
|
8072
8085
|
Object.defineProperty(DragDropRankingSelectToRank.prototype, "isDraggedElementRanked", {
|
@@ -8599,7 +8612,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8599
8612
|
this.listModel.setItems(this.getAvailableItems());
|
8600
8613
|
};
|
8601
8614
|
DropdownListModel.prototype.onClick = function (event) {
|
8602
|
-
if (this.question.readOnly || this.question.isDesignMode || this.question.isPreviewStyle)
|
8615
|
+
if (this.question.readOnly || this.question.isDesignMode || this.question.isPreviewStyle || this.question.isReadOnlyAttr)
|
8603
8616
|
return;
|
8604
8617
|
this._popupModel.toggleVisibility();
|
8605
8618
|
this.focusItemOnClickAndPopup();
|
@@ -9924,8 +9937,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9924
9937
|
|
9925
9938
|
var Version;
|
9926
9939
|
var ReleaseDate;
|
9927
|
-
Version = "" + "1.11.
|
9928
|
-
ReleaseDate = "" + "2024-
|
9940
|
+
Version = "" + "1.11.5";
|
9941
|
+
ReleaseDate = "" + "2024-07-03";
|
9929
9942
|
function checkLibraryVersion(ver, libraryName) {
|
9930
9943
|
if (Version != ver) {
|
9931
9944
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -18681,7 +18694,7 @@ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\
|
|
18681
18694
|
/*! no static exports found */
|
18682
18695
|
/***/ (function(module, exports) {
|
18683
18696
|
|
18684
|
-
module.exports = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><
|
18697
|
+
module.exports = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M24 39.5057L11.7226 45.9839C10.4095 46.6739 8.87606 45.5622 9.12525 44.096L11.4734 30.373L1.54411 20.6556C0.480254 19.6207 1.06489 17.8095 2.53128 17.5986L16.2559 15.5957L22.3994 3.10891C23.0512 1.77685 24.9488 1.77685 25.6102 3.10891L31.7441 15.5957L45.4687 17.5986C46.9351 17.8095 47.5197 19.6207 46.4559 20.6556L36.5266 30.373L38.8748 44.096C39.1239 45.5622 37.5905 46.6835 36.2774 45.9839L24 39.5057Z\" fill=\"none\" stroke-width=\"2\"></path><path d=\"M24.3981 33.1305L24 32.9206L23.6019 33.1305L15.8715 37.2059L17.3542 28.5663L17.43 28.1246L17.1095 27.8113L10.83 21.6746L19.4965 20.4049L19.9405 20.3399L20.1387 19.9373L24 12.0936L27.8613 19.9373L28.0595 20.3399L28.5035 20.4049L37.17 21.6746L30.8905 27.8113L30.57 28.1246L30.6458 28.5663L32.1285 37.2059L24.3981 33.1305Z\" stroke-width=\"1.70746\"></path></svg>"
|
18685
18698
|
|
18686
18699
|
/***/ }),
|
18687
18700
|
|
@@ -21546,6 +21559,7 @@ var defaultListCss = {
|
|
21546
21559
|
searchClearButtonIcon: "sv-list__filter-clear-button",
|
21547
21560
|
loadingIndicator: "sv-list__loading-indicator",
|
21548
21561
|
itemSelected: "sv-list__item--selected",
|
21562
|
+
itemGroup: "sv-list__item--group",
|
21549
21563
|
itemWithIcon: "sv-list__item--with-icon",
|
21550
21564
|
itemDisabled: "sv-list__item--disabled",
|
21551
21565
|
itemFocused: "sv-list__item--focused",
|
@@ -21611,6 +21625,7 @@ var ListModel = /** @class */ (function (_super) {
|
|
21611
21625
|
.append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
|
21612
21626
|
.append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
|
21613
21627
|
.append(_this.cssClasses.itemSelected, _this.isItemSelected(itemValue))
|
21628
|
+
.append(_this.cssClasses.itemGroup, itemValue.hasSubItems)
|
21614
21629
|
.append(_this.cssClasses.itemHovered, itemValue.isHovered)
|
21615
21630
|
.append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
|
21616
21631
|
.append(itemValue.css)
|
@@ -22715,6 +22730,7 @@ var arabicSurveyStrings = {
|
|
22715
22730
|
};
|
22716
22731
|
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["ar"] = arabicSurveyStrings;
|
22717
22732
|
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["ar"] = "العربية";
|
22733
|
+
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeDirections["ar"] = "rtl";
|
22718
22734
|
// The following strings have been translated by a machine translation service
|
22719
22735
|
// Remove those strings that you have corrected manually
|
22720
22736
|
// indexText: "{0} of {1}" => "{0} من {1}"
|
@@ -30515,11 +30531,15 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
30515
30531
|
};
|
30516
30532
|
QuestionMatrixBaseModel.prototype.updateVisibilityBasedOnRows = function () {
|
30517
30533
|
if (this.hideIfRowsEmpty) {
|
30518
|
-
this.
|
30519
|
-
this.rows.length > 0 &&
|
30520
|
-
(!this.filteredRows || this.filteredRows.length > 0);
|
30534
|
+
this.onVisibleChanged();
|
30521
30535
|
}
|
30522
30536
|
};
|
30537
|
+
QuestionMatrixBaseModel.prototype.isVisibleCore = function () {
|
30538
|
+
var res = _super.prototype.isVisibleCore.call(this);
|
30539
|
+
if (!res || !this.hideIfRowsEmpty)
|
30540
|
+
return res;
|
30541
|
+
return this.rows.length > 0 && (!this.filteredRows || this.filteredRows.length > 0);
|
30542
|
+
};
|
30523
30543
|
QuestionMatrixBaseModel.prototype.shouldRunColumnExpression = function () {
|
30524
30544
|
return !this.survey || !this.survey.areInvisibleElementsShowing;
|
30525
30545
|
};
|
@@ -30562,6 +30582,7 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
30562
30582
|
: null;
|
30563
30583
|
this.filteredRows = [];
|
30564
30584
|
var hasChanged = _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].runConditionsForItems(this.rows, this.filteredRows, runner, values, properties, !showInvisibile);
|
30585
|
+
_itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].runEnabledConditionsForItems(this.rows, undefined, values, properties);
|
30565
30586
|
if (this.filteredRows.length === this.rows.length) {
|
30566
30587
|
this.filteredRows = null;
|
30567
30588
|
}
|
@@ -34196,6 +34217,23 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
34196
34217
|
return this.parent.getQuestionTitleLocation();
|
34197
34218
|
return this.survey ? this.survey.questionTitleLocation : "top";
|
34198
34219
|
};
|
34220
|
+
PanelModelBase.prototype.availableQuestionTitleWidth = function () {
|
34221
|
+
var questionTitleLocation = this.getQuestionTitleLocation();
|
34222
|
+
if (questionTitleLocation === "left")
|
34223
|
+
return true;
|
34224
|
+
return this.hasElementWithTitleLocationLeft();
|
34225
|
+
};
|
34226
|
+
PanelModelBase.prototype.hasElementWithTitleLocationLeft = function () {
|
34227
|
+
var result = this.elements.some(function (el) {
|
34228
|
+
if (el instanceof PanelModelBase) {
|
34229
|
+
return el.hasElementWithTitleLocationLeft();
|
34230
|
+
}
|
34231
|
+
else if (el instanceof _question__WEBPACK_IMPORTED_MODULE_4__["Question"]) {
|
34232
|
+
return el.getTitleLocation() === "left";
|
34233
|
+
}
|
34234
|
+
});
|
34235
|
+
return result;
|
34236
|
+
};
|
34199
34237
|
PanelModelBase.prototype.getQuestionTitleWidth = function () {
|
34200
34238
|
return this.questionTitleWidth || this.parent && this.parent.getQuestionTitleWidth();
|
34201
34239
|
};
|
@@ -35406,7 +35444,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panelbase", [
|
|
35406
35444
|
{
|
35407
35445
|
name: "questionTitleWidth",
|
35408
35446
|
visibleIf: function (obj) {
|
35409
|
-
return !!obj && obj["
|
35447
|
+
return !!obj && obj["availableQuestionTitleWidth"]();
|
35410
35448
|
}
|
35411
35449
|
},
|
35412
35450
|
{
|
@@ -38510,7 +38548,7 @@ var ProgressButtons = /** @class */ (function (_super) {
|
|
38510
38548
|
Object.defineProperty(ProgressButtons.prototype, "progressWidth", {
|
38511
38549
|
get: function () {
|
38512
38550
|
if (this.isFitToSurveyWidth) {
|
38513
|
-
return this.survey.
|
38551
|
+
return this.survey.renderedWidth;
|
38514
38552
|
}
|
38515
38553
|
return "";
|
38516
38554
|
},
|
@@ -38690,6 +38728,9 @@ var TriggerExpressionInfo = /** @class */ (function () {
|
|
38690
38728
|
}
|
38691
38729
|
return TriggerExpressionInfo;
|
38692
38730
|
}());
|
38731
|
+
function querySelectorIncludingSelf(el, selector) {
|
38732
|
+
return el.querySelector(selector) || el != _global_variables_utils__WEBPACK_IMPORTED_MODULE_14__["DomWindowHelper"].getWindow() && el.matches(selector) && el;
|
38733
|
+
}
|
38693
38734
|
/**
|
38694
38735
|
* A base class for all questions.
|
38695
38736
|
*/
|
@@ -39193,9 +39234,7 @@ var Question = /** @class */ (function (_super) {
|
|
39193
39234
|
if (!this.setValueExpressionRunner) {
|
39194
39235
|
this.setValueExpressionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_6__["ExpressionRunner"](this.setValueExpression);
|
39195
39236
|
this.setValueExpressionRunner.onRunComplete = function (res) {
|
39196
|
-
|
39197
|
-
_this.value = res;
|
39198
|
-
}
|
39237
|
+
_this.runExpressionSetValue(res);
|
39199
39238
|
};
|
39200
39239
|
}
|
39201
39240
|
else {
|
@@ -40254,7 +40293,8 @@ var Question = /** @class */ (function (_super) {
|
|
40254
40293
|
var isParentReadOnly = !!this.parent && this.parent.isReadOnly;
|
40255
40294
|
var isPareQuestionReadOnly = !!this.parentQuestion && this.parentQuestion.isReadOnly;
|
40256
40295
|
var isSurveyReadOnly = !!this.survey && this.survey.isDisplayMode;
|
40257
|
-
|
40296
|
+
var callbackVal = !!this.readOnlyCallback && this.readOnlyCallback();
|
40297
|
+
return this.readOnly || isParentReadOnly || isSurveyReadOnly || isPareQuestionReadOnly || callbackVal;
|
40258
40298
|
},
|
40259
40299
|
enumerable: false,
|
40260
40300
|
configurable: true
|
@@ -40413,6 +40453,13 @@ var Question = /** @class */ (function (_super) {
|
|
40413
40453
|
return undefined;
|
40414
40454
|
return this.survey.runExpression(expression);
|
40415
40455
|
};
|
40456
|
+
Object.defineProperty(Question.prototype, "commentAreaRows", {
|
40457
|
+
get: function () {
|
40458
|
+
return this.survey && this.survey.commentAreaRows;
|
40459
|
+
},
|
40460
|
+
enumerable: false,
|
40461
|
+
configurable: true
|
40462
|
+
});
|
40416
40463
|
Object.defineProperty(Question.prototype, "autoGrowComment", {
|
40417
40464
|
get: function () {
|
40418
40465
|
return this.survey && this.survey.autoGrowComment;
|
@@ -40967,7 +41014,7 @@ var Question = /** @class */ (function (_super) {
|
|
40967
41014
|
if (values === void 0) { values = null; }
|
40968
41015
|
if (properties === void 0) { properties = null; }
|
40969
41016
|
var func = function (val) {
|
40970
|
-
_this.
|
41017
|
+
_this.runExpressionSetValueCore(val, setFunc);
|
40971
41018
|
};
|
40972
41019
|
if (!this.runDefaultValueExpression(runner, values, properties, func)) {
|
40973
41020
|
func(defaultValue);
|
@@ -40976,9 +41023,17 @@ var Question = /** @class */ (function (_super) {
|
|
40976
41023
|
Question.prototype.convertFuncValuetoQuestionValue = function (val) {
|
40977
41024
|
return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].convertValToQuestionVal(val);
|
40978
41025
|
};
|
40979
|
-
Question.prototype.
|
41026
|
+
Question.prototype.runExpressionSetValueCore = function (val, setFunc) {
|
40980
41027
|
setFunc(this.convertFuncValuetoQuestionValue(val));
|
40981
41028
|
};
|
41029
|
+
Question.prototype.runExpressionSetValue = function (val) {
|
41030
|
+
var _this = this;
|
41031
|
+
this.runExpressionSetValueCore(val, function (val) {
|
41032
|
+
if (!_this.isTwoValueEquals(_this.value, val)) {
|
41033
|
+
_this.value = val;
|
41034
|
+
}
|
41035
|
+
});
|
41036
|
+
};
|
40982
41037
|
Question.prototype.runDefaultValueExpression = function (runner, values, properties, setFunc) {
|
40983
41038
|
var _this = this;
|
40984
41039
|
if (values === void 0) { values = null; }
|
@@ -40987,11 +41042,7 @@ var Question = /** @class */ (function (_super) {
|
|
40987
41042
|
return false;
|
40988
41043
|
if (!setFunc) {
|
40989
41044
|
setFunc = function (val) {
|
40990
|
-
_this.runExpressionSetValue(val
|
40991
|
-
if (!_this.isTwoValueEquals(_this.value, val)) {
|
40992
|
-
_this.value = val;
|
40993
|
-
}
|
40994
|
-
});
|
41045
|
+
_this.runExpressionSetValue(val);
|
40995
41046
|
};
|
40996
41047
|
}
|
40997
41048
|
if (!values)
|
@@ -41608,7 +41659,7 @@ var Question = /** @class */ (function (_super) {
|
|
41608
41659
|
var scrollableSelector_1 = this.getObservedElementSelector();
|
41609
41660
|
if (!scrollableSelector_1)
|
41610
41661
|
return;
|
41611
|
-
var defaultRootEl = el
|
41662
|
+
var defaultRootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
|
41612
41663
|
if (!defaultRootEl)
|
41613
41664
|
return;
|
41614
41665
|
var isProcessed_1 = false;
|
@@ -41620,7 +41671,7 @@ var Question = /** @class */ (function (_super) {
|
|
41620
41671
|
isProcessed_1 = false;
|
41621
41672
|
}
|
41622
41673
|
var callback = function () {
|
41623
|
-
var rootEl = el
|
41674
|
+
var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
|
41624
41675
|
if (!requiredWidth_1 && _this.isDefaultRendering()) {
|
41625
41676
|
requiredWidth_1 = rootEl.scrollWidth;
|
41626
41677
|
}
|
@@ -41645,8 +41696,10 @@ var Question = /** @class */ (function (_super) {
|
|
41645
41696
|
});
|
41646
41697
|
this.onMobileChangedCallback = function () {
|
41647
41698
|
setTimeout(function () {
|
41648
|
-
var rootEl = el
|
41649
|
-
|
41699
|
+
var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
|
41700
|
+
if (rootEl) {
|
41701
|
+
_this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
|
41702
|
+
}
|
41650
41703
|
}, 0);
|
41651
41704
|
};
|
41652
41705
|
this.resizeObserver.observe(el);
|
@@ -42279,6 +42332,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
42279
42332
|
_this.isUpdatingChoicesDependedQuestions = false;
|
42280
42333
|
_this.headItemsCount = 0;
|
42281
42334
|
_this.footItemsCount = 0;
|
42335
|
+
_this.allowMultiColumns = true;
|
42282
42336
|
_this.prevIsOtherSelected = false;
|
42283
42337
|
_this.noneItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].noneItemValue, "noneText", "noneItemText");
|
42284
42338
|
_this.refuseItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].refuseItemValue, "refuseText", "refuseItemText");
|
@@ -44299,9 +44353,23 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
44299
44353
|
enumerable: false,
|
44300
44354
|
configurable: true
|
44301
44355
|
});
|
44356
|
+
QuestionSelectBase.prototype.getObservedElementSelector = function () {
|
44357
|
+
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["classesToSelector"])(this.cssClasses.mainRoot);
|
44358
|
+
};
|
44359
|
+
QuestionSelectBase.prototype.supportResponsiveness = function () {
|
44360
|
+
return true;
|
44361
|
+
};
|
44362
|
+
QuestionSelectBase.prototype.onBeforeSetCompactRenderer = function () {
|
44363
|
+
_super.prototype.onBeforeSetDesktopRenderer.call(this);
|
44364
|
+
this.allowMultiColumns = false;
|
44365
|
+
};
|
44366
|
+
QuestionSelectBase.prototype.onBeforeSetDesktopRenderer = function () {
|
44367
|
+
_super.prototype.onBeforeSetDesktopRenderer.call(this);
|
44368
|
+
this.allowMultiColumns = true;
|
44369
|
+
};
|
44302
44370
|
Object.defineProperty(QuestionSelectBase.prototype, "hasColumns", {
|
44303
44371
|
get: function () {
|
44304
|
-
return !this.isMobile &&
|
44372
|
+
return !this.isMobile && this.allowMultiColumns &&
|
44305
44373
|
(this.getCurrentColCount() > 1);
|
44306
44374
|
},
|
44307
44375
|
enumerable: false,
|
@@ -44418,6 +44486,10 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
44418
44486
|
Object.defineProperty(QuestionSelectBase.prototype, "itemComponent", {
|
44419
44487
|
/**
|
44420
44488
|
* The name of a component used to render items.
|
44489
|
+
*
|
44490
|
+
* [View Dropdown Demo](https://surveyjs.io/form-library/examples/dropdown-box-with-custom-items/ (linkStyle))
|
44491
|
+
*
|
44492
|
+
* [View Ranking Demo](https://surveyjs.io/form-library/examples/dropdown-box-with-custom-items/ (linkStyle))
|
44421
44493
|
*/
|
44422
44494
|
get: function () {
|
44423
44495
|
return this.getPropertyValue("itemComponent", this.getDefaultItemComponent());
|
@@ -44455,6 +44527,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
44455
44527
|
__decorate([
|
44456
44528
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ localizable: true })
|
44457
44529
|
], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
|
44530
|
+
__decorate([
|
44531
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
44532
|
+
], QuestionSelectBase.prototype, "allowMultiColumns", void 0);
|
44458
44533
|
return QuestionSelectBase;
|
44459
44534
|
}(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));
|
44460
44535
|
|
@@ -45684,7 +45759,8 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
45684
45759
|
if (!itemValues.length && !selectedItemValues) {
|
45685
45760
|
this.updateSelectedItemValues();
|
45686
45761
|
}
|
45687
|
-
|
45762
|
+
var validValues = this.validateItemValues(itemValues);
|
45763
|
+
return validValues;
|
45688
45764
|
},
|
45689
45765
|
enumerable: false,
|
45690
45766
|
configurable: true
|
@@ -46142,7 +46218,14 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
46142
46218
|
});
|
46143
46219
|
Object.defineProperty(QuestionCheckboxModel.prototype, "a11y_input_ariaRole", {
|
46144
46220
|
get: function () {
|
46145
|
-
return "
|
46221
|
+
return "group";
|
46222
|
+
},
|
46223
|
+
enumerable: false,
|
46224
|
+
configurable: true
|
46225
|
+
});
|
46226
|
+
Object.defineProperty(QuestionCheckboxModel.prototype, "a11y_input_ariaRequired", {
|
46227
|
+
get: function () {
|
46228
|
+
return null;
|
46146
46229
|
},
|
46147
46230
|
enumerable: false,
|
46148
46231
|
configurable: true
|
@@ -46494,9 +46577,12 @@ var ComponentQuestionJSON = /** @class */ (function () {
|
|
46494
46577
|
this.json.onUpdateQuestionCssClasses(question, element, css);
|
46495
46578
|
};
|
46496
46579
|
ComponentQuestionJSON.prototype.onSetQuestionValue = function (question, newValue) {
|
46497
|
-
if (
|
46498
|
-
|
46499
|
-
|
46580
|
+
if (this.json.onSetQuestionValue) {
|
46581
|
+
this.json.onSetQuestionValue(question, newValue);
|
46582
|
+
}
|
46583
|
+
if (this.json.onValueSet) {
|
46584
|
+
this.json.onValueSet(question, newValue);
|
46585
|
+
}
|
46500
46586
|
};
|
46501
46587
|
ComponentQuestionJSON.prototype.onPropertyChanged = function (question, propertyName, newValue) {
|
46502
46588
|
if (!this.json.onPropertyChanged)
|
@@ -47887,7 +47973,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
47887
47973
|
return _super.prototype.hasUnknownValue.call(this, val, true, false);
|
47888
47974
|
};
|
47889
47975
|
QuestionDropdownModel.prototype.getItemIfChoicesNotContainThisValue = function (value, text) {
|
47890
|
-
if (this.choicesLazyLoadEnabled
|
47976
|
+
if (this.choicesLazyLoadEnabled) {
|
47891
47977
|
return this.createItemValue(value, text);
|
47892
47978
|
}
|
47893
47979
|
else {
|
@@ -51986,6 +52072,8 @@ var MatrixDropdownRowModel = /** @class */ (function (_super) {
|
|
51986
52072
|
enumerable: false,
|
51987
52073
|
configurable: true
|
51988
52074
|
});
|
52075
|
+
MatrixDropdownRowModel.prototype.isRowEnabled = function () { return this.item.isEnabled; };
|
52076
|
+
MatrixDropdownRowModel.prototype.isRowHasEnabledCondition = function () { return !!this.item.enableIf; };
|
51989
52077
|
return MatrixDropdownRowModel;
|
51990
52078
|
}(_question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownRowModelBase"]));
|
51991
52079
|
|
@@ -52284,7 +52372,9 @@ var MatrixDropdownCell = /** @class */ (function () {
|
|
52284
52372
|
this.question.locStrsChanged();
|
52285
52373
|
};
|
52286
52374
|
MatrixDropdownCell.prototype.createQuestion = function (column, row, data) {
|
52375
|
+
var _this = this;
|
52287
52376
|
var res = data.createQuestion(this.row, this.column);
|
52377
|
+
res.readOnlyCallback = function () { return !_this.row.isRowEnabled(); };
|
52288
52378
|
res.validateValueCallback = function () {
|
52289
52379
|
return data.validateCell(row, column.name, row.value);
|
52290
52380
|
};
|
@@ -52470,6 +52560,8 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
52470
52560
|
enumerable: false,
|
52471
52561
|
configurable: true
|
52472
52562
|
});
|
52563
|
+
MatrixDropdownRowModelBase.prototype.isRowEnabled = function () { return true; };
|
52564
|
+
MatrixDropdownRowModelBase.prototype.isRowHasEnabledCondition = function () { return false; };
|
52473
52565
|
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "value", {
|
52474
52566
|
get: function () {
|
52475
52567
|
var result = {};
|
@@ -52646,6 +52738,9 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
52646
52738
|
if (!!this.detailPanel) {
|
52647
52739
|
this.detailPanel.runCondition(values, newProps);
|
52648
52740
|
}
|
52741
|
+
if (this.isRowHasEnabledCondition()) {
|
52742
|
+
this.onQuestionReadOnlyChanged();
|
52743
|
+
}
|
52649
52744
|
};
|
52650
52745
|
MatrixDropdownRowModelBase.prototype.getNamesWithDefaultValues = function () {
|
52651
52746
|
var res = [];
|
@@ -52900,14 +52995,15 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
52900
52995
|
return;
|
52901
52996
|
this.updateCellOnColumnItemValueChanged(cell, propertyName, obj, name, newValue, oldValue);
|
52902
52997
|
};
|
52903
|
-
MatrixDropdownRowModelBase.prototype.onQuestionReadOnlyChanged = function (
|
52998
|
+
MatrixDropdownRowModelBase.prototype.onQuestionReadOnlyChanged = function () {
|
52904
52999
|
var questions = this.questions;
|
52905
53000
|
for (var i = 0; i < questions.length; i++) {
|
52906
53001
|
var q = questions[i];
|
52907
53002
|
q.setPropertyValue("isReadOnly", q.isReadOnly);
|
52908
53003
|
}
|
52909
53004
|
if (!!this.detailPanel) {
|
52910
|
-
this.
|
53005
|
+
var parentIsReadOnly = !!this.data && this.data.isMatrixReadOnly();
|
53006
|
+
this.detailPanel.readOnly = parentIsReadOnly || !this.isRowEnabled();
|
52911
53007
|
}
|
52912
53008
|
};
|
52913
53009
|
MatrixDropdownRowModelBase.prototype.hasErrors = function (fireCallback, rec, raiseOnCompletedAsyncValidators) {
|
@@ -54170,7 +54266,8 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
54170
54266
|
return questionPlainData;
|
54171
54267
|
};
|
54172
54268
|
QuestionMatrixDropdownModelBase.prototype.addConditionObjectsByContext = function (objects, context) {
|
54173
|
-
var
|
54269
|
+
var hasColumnContext = !!context && this.columns.indexOf(context) > -1;
|
54270
|
+
var hasContext = context === true || hasColumnContext;
|
54174
54271
|
var rowsIndeces = this.getConditionObjectsRowIndeces();
|
54175
54272
|
if (hasContext) {
|
54176
54273
|
rowsIndeces.push(-1);
|
@@ -54197,6 +54294,11 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
54197
54294
|
if (index === -1 && context === true) {
|
54198
54295
|
obj.context = this;
|
54199
54296
|
}
|
54297
|
+
else {
|
54298
|
+
if (hasColumnContext && prefixName.startsWith("row.")) {
|
54299
|
+
obj.context = context;
|
54300
|
+
}
|
54301
|
+
}
|
54200
54302
|
objects.push(obj);
|
54201
54303
|
}
|
54202
54304
|
}
|
@@ -54531,7 +54633,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
54531
54633
|
if (!this.generateRows)
|
54532
54634
|
return;
|
54533
54635
|
for (var i = 0; i < this.visibleRows.length; i++) {
|
54534
|
-
this.visibleRows[i].onQuestionReadOnlyChanged(
|
54636
|
+
this.visibleRows[i].onQuestionReadOnlyChanged();
|
54535
54637
|
}
|
54536
54638
|
};
|
54537
54639
|
//IMatrixDropdownData
|
@@ -54757,7 +54859,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
54757
54859
|
if (this.isDesignMode)
|
54758
54860
|
return this.detailPanel;
|
54759
54861
|
var panel = this.createNewDetailPanel();
|
54760
|
-
panel.readOnly = this.isReadOnly;
|
54862
|
+
panel.readOnly = this.isReadOnly || !row.isRowEnabled();
|
54761
54863
|
panel.setSurveyImpl(row);
|
54762
54864
|
var json = this.detailPanel.toJSON();
|
54763
54865
|
new _jsonobject__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]().toObject(json, panel);
|
@@ -54797,6 +54899,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
54797
54899
|
return data.getTextProcessor();
|
54798
54900
|
return null;
|
54799
54901
|
};
|
54902
|
+
QuestionMatrixDropdownModelBase.prototype.isMatrixReadOnly = function () { return this.isReadOnly; };
|
54800
54903
|
QuestionMatrixDropdownModelBase.prototype.getQuestionFromArray = function (name, index) {
|
54801
54904
|
if (index >= this.visibleRows.length)
|
54802
54905
|
return null;
|
@@ -54875,6 +54978,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownb
|
|
54875
54978
|
visible: false,
|
54876
54979
|
isLightSerializable: false,
|
54877
54980
|
},
|
54981
|
+
{ name: "columnsVisibleIf", visible: false },
|
54878
54982
|
{
|
54879
54983
|
name: "detailPanelMode",
|
54880
54984
|
choices: ["none", "underRow", "underRowSingle"],
|
@@ -62990,13 +63094,14 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62990
63094
|
if (_this.allowStartDrag &&
|
62991
63095
|
_this.canStartDragDueMaxSelectedChoices(target) &&
|
62992
63096
|
_this.canStartDragDueItemEnabled(choice)) {
|
62993
|
-
_this.
|
63097
|
+
_this.draggedChoiceValue = choice.value;
|
62994
63098
|
_this.draggedTargetNode = node;
|
62995
63099
|
_this.dragOrClickHelper.onPointerDown(event);
|
62996
63100
|
}
|
62997
63101
|
};
|
62998
63102
|
_this.startDrag = function (event) {
|
62999
|
-
|
63103
|
+
var choice = _itemvalue__WEBPACK_IMPORTED_MODULE_2__["ItemValue"].getItemByValue(_this.activeChoices, _this.draggedChoiceValue);
|
63104
|
+
_this.dragDropRankingChoices.startDrag(event, choice, _this, _this.draggedTargetNode);
|
63000
63105
|
};
|
63001
63106
|
_this.handlePointerUp = function (event, choice, node) {
|
63002
63107
|
if (!_this.selectToRankEnabled)
|
@@ -63474,9 +63579,6 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
63474
63579
|
enumerable: false,
|
63475
63580
|
configurable: true
|
63476
63581
|
});
|
63477
|
-
/**
|
63478
|
-
* The name of a component used to render items.
|
63479
|
-
*/
|
63480
63582
|
QuestionRankingModel.prototype.getDefaultItemComponent = function () {
|
63481
63583
|
return "sv-ranking-item";
|
63482
63584
|
};
|
@@ -64441,20 +64543,11 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
64441
64543
|
if (this.scaleColorMode === "monochrome" && this.rateColorMode == "default" ||
|
64442
64544
|
this.isPreviewStyle ||
|
64443
64545
|
this.isReadOnlyStyle)
|
64444
|
-
return {
|
64546
|
+
return {};
|
64445
64547
|
var index = this.visibleRateValues.indexOf(item);
|
64446
64548
|
var color = this.getRenderedItemColor(index, false);
|
64447
|
-
|
64448
|
-
|
64449
|
-
if (highlight == "highlighted" && this.scaleColorMode === "colored")
|
64450
|
-
return { borderColor: color, fill: color, backgroundColor: colorLight };
|
64451
|
-
if (this.scaleColorMode === "colored" && this.errors.length == 0)
|
64452
|
-
return { borderColor: color, fill: color, backgroundColor: null };
|
64453
|
-
return { borderColor: null, fill: null, backgroundColor: null };
|
64454
|
-
}
|
64455
|
-
else {
|
64456
|
-
return { borderColor: color, fill: null, backgroundColor: color };
|
64457
|
-
}
|
64549
|
+
var colorLight = highlight == "highlighted" && this.scaleColorMode === "colored" && this.getRenderedItemColor(index, true);
|
64550
|
+
return colorLight ? { "--sd-rating-item-color": color, "--sd-rating-item-color-light": colorLight } : { "--sd-rating-item-color": color };
|
64458
64551
|
};
|
64459
64552
|
QuestionRatingModel.prototype.getItemClass = function (item, highlight) {
|
64460
64553
|
var _this = this;
|
@@ -65640,8 +65733,7 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
65640
65733
|
}
|
65641
65734
|
};
|
65642
65735
|
QuestionTagboxModel.prototype.getItemIfChoicesNotContainThisValue = function (value, text) {
|
65643
|
-
|
65644
|
-
if (this.choicesLazyLoadEnabled && !((_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.isAllDataLoaded)) {
|
65736
|
+
if (this.choicesLazyLoadEnabled) {
|
65645
65737
|
return this.createItemValue(value, text);
|
65646
65738
|
}
|
65647
65739
|
else {
|
@@ -66464,7 +66556,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
66464
66556
|
if (this.inputTextAlignment !== "auto") {
|
66465
66557
|
style.textAlign = this.inputTextAlignment;
|
66466
66558
|
}
|
66467
|
-
else if (this.maskSettings.getTextAlignment() !== "auto") {
|
66559
|
+
else if (!this.maskTypeIsEmpty && this.maskSettings.getTextAlignment() !== "auto") {
|
66468
66560
|
style.textAlign = this.maskSettings.getTextAlignment();
|
66469
66561
|
}
|
66470
66562
|
};
|
@@ -69955,7 +70047,7 @@ var RatingItem = /** @class */ (function (_super) {
|
|
69955
70047
|
var itemText = this.renderLocString(this.item.locText);
|
69956
70048
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
|
69957
70049
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
69958
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.itemText }, itemText)));
|
70050
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.itemText, "data-text": this.item.text }, itemText)));
|
69959
70051
|
};
|
69960
70052
|
RatingItem.prototype.componentDidMount = function () {
|
69961
70053
|
_super.prototype.componentDidMount.call(this);
|
@@ -72696,7 +72788,7 @@ var Survey = /** @class */ (function (_super) {
|
|
72696
72788
|
}
|
72697
72789
|
var rootCss = this.survey.getRootCss();
|
72698
72790
|
var cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
|
72699
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables },
|
72791
|
+
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 },
|
72700
72792
|
this.survey.needRenderIcons ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_svgbundle__WEBPACK_IMPORTED_MODULE_10__["SvgBundleComponent"], null) : null,
|
72701
72793
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.survey.wrapperFormCss },
|
72702
72794
|
backgroundImage,
|
@@ -73732,7 +73824,7 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
|
|
73732
73824
|
var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
|
73733
73825
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
|
73734
73826
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: labelClass },
|
73735
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox",
|
73827
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, required: this.question.hasRequiredError() }),
|
73736
73828
|
this.cssClasses.materialDecorator ?
|
73737
73829
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
|
73738
73830
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
|
@@ -73881,7 +73973,7 @@ var SurveyQuestionCommentItem = /** @class */ (function (_super) {
|
|
73881
73973
|
var comment = this.getComment() || "";
|
73882
73974
|
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, comment);
|
73883
73975
|
}
|
73884
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.getId(), className: className, ref: function (textarea) { return (_this.setControl(textarea)); }, disabled: this.isDisplayMode, maxLength: question.getOthersMaxLength(), placeholder: this.getPlaceholder(), onBlur: function (e) { _this.onCommentChange(e); }, onInput: function (e) { return _this.onCommentInput(e); }, "aria-required": question.isRequired || question.a11y_input_ariaRequired, "aria-label": question.ariaLabel || question.a11y_input_ariaLabel, style: { resize: question.resizeStyle } }));
|
73976
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.getId(), className: className, ref: function (textarea) { return (_this.setControl(textarea)); }, disabled: this.isDisplayMode, maxLength: question.getOthersMaxLength(), rows: question.commentAreaRows, placeholder: this.getPlaceholder(), onBlur: function (e) { _this.onCommentChange(e); }, onInput: function (e) { return _this.onCommentInput(e); }, "aria-required": question.isRequired || question.a11y_input_ariaRequired, "aria-label": question.ariaLabel || question.a11y_input_ariaLabel, style: { resize: question.resizeStyle } }));
|
73885
73977
|
};
|
73886
73978
|
return SurveyQuestionCommentItem;
|
73887
73979
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
@@ -78098,11 +78190,18 @@ var settings = {
|
|
78098
78190
|
*/
|
78099
78191
|
ratingMaximumRateValueCount: 20,
|
78100
78192
|
/**
|
78101
|
-
* Specifies whether to close the drop-down menu of a [
|
78193
|
+
* Specifies whether to close the drop-down menu of a [Multi-Select Dropdown (Tag Box)](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/) question after a user selects a value.
|
78102
78194
|
*
|
78103
|
-
* This setting applies to all
|
78195
|
+
* This setting applies to all Multi-Select Dropdown questions on a web page. You can use the [`closeOnSelect`](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model#closeOnSelect) property to specify the same setting for an individual Multi-Select Dropdown question.
|
78104
78196
|
*/
|
78105
78197
|
tagboxCloseOnSelect: false,
|
78198
|
+
/**
|
78199
|
+
* A time interval in milliseconds between the last entered character and the beginning of search in [Single-](https://surveyjs.io/form-library/examples/create-dropdown-menu-in-javascript/) and [Multi-Select Dropdown](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/) questions. Applies only to questions with the [`choicesLazyLoadEnabled`](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model#choicesLazyLoadEnabled) property set to `true`.
|
78200
|
+
*
|
78201
|
+
* Default value: 500
|
78202
|
+
*
|
78203
|
+
* [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
|
78204
|
+
*/
|
78106
78205
|
dropdownSearchDelay: 500,
|
78107
78206
|
/**
|
78108
78207
|
* A function that activates a browser confirm dialog.
|
@@ -82216,6 +82315,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
82216
82315
|
*
|
82217
82316
|
* You can override this property for individual Long Text questions: [`autoGrow`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#autoGrow).
|
82218
82317
|
* @see allowResizeComment
|
82318
|
+
* @see commentAreaRows
|
82219
82319
|
*/
|
82220
82320
|
get: function () {
|
82221
82321
|
return this.getPropertyValue("autoGrowComment");
|
@@ -82234,6 +82334,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
82234
82334
|
*
|
82235
82335
|
* You can override this property for individual Long Text questions: [`allowResize`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#allowResize).
|
82236
82336
|
* @see autoGrowComment
|
82337
|
+
* @see commentAreaRows
|
82237
82338
|
*/
|
82238
82339
|
get: function () {
|
82239
82340
|
return this.getPropertyValue("allowResizeComment");
|
@@ -82244,6 +82345,25 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
82244
82345
|
enumerable: false,
|
82245
82346
|
configurable: true
|
82246
82347
|
});
|
82348
|
+
Object.defineProperty(SurveyModel.prototype, "commentAreaRows", {
|
82349
|
+
/**
|
82350
|
+
* Specifies the visible height of comment areas, measured in lines. Applies to the questions with the [`showCommentArea`](https://surveyjs.io/form-library/documentation/api-reference/question#showCommentArea) or [`showOtherItem`](https://surveyjs.io/form-library/documentation/api-reference/question#showOtherItem) property enabled.
|
82351
|
+
*
|
82352
|
+
* Default value: 2
|
82353
|
+
*
|
82354
|
+
* The value of this property is passed on to the `rows` attribute of the underlying `<textarea>` element.
|
82355
|
+
* @see autoGrowComment
|
82356
|
+
* @see allowResizeComment
|
82357
|
+
*/
|
82358
|
+
get: function () {
|
82359
|
+
return this.getPropertyValue("commentAreaRows");
|
82360
|
+
},
|
82361
|
+
set: function (val) {
|
82362
|
+
this.setPropertyValue("commentAreaRows", val);
|
82363
|
+
},
|
82364
|
+
enumerable: false,
|
82365
|
+
configurable: true
|
82366
|
+
});
|
82247
82367
|
Object.defineProperty(SurveyModel.prototype, "textUpdateMode", {
|
82248
82368
|
/**
|
82249
82369
|
* Specifies when to update the question value in questions with a text input field.
|
@@ -82375,6 +82495,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
82375
82495
|
this.localeChanged();
|
82376
82496
|
this.onLocaleChangedEvent.fire(this, this.locale);
|
82377
82497
|
};
|
82498
|
+
Object.defineProperty(SurveyModel.prototype, "localeDir", {
|
82499
|
+
get: function () {
|
82500
|
+
return _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].localeDirections[this.locale];
|
82501
|
+
},
|
82502
|
+
enumerable: false,
|
82503
|
+
configurable: true
|
82504
|
+
});
|
82378
82505
|
/**
|
82379
82506
|
* Returns an array of locales whose translations are used in the survey.
|
82380
82507
|
*
|
@@ -88996,6 +89123,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
88996
89123
|
},
|
88997
89124
|
{ name: "autoGrowComment:boolean", default: false },
|
88998
89125
|
{ name: "allowResizeComment:boolean", default: true },
|
89126
|
+
{ name: "commentAreaRows:number", minValue: 1 },
|
88999
89127
|
{
|
89000
89128
|
name: "startSurveyText",
|
89001
89129
|
serializationProperty: "locStartSurveyText",
|
@@ -89147,6 +89275,7 @@ var surveyLocalization = {
|
|
89147
89275
|
defaultLocaleValue: "en",
|
89148
89276
|
locales: {},
|
89149
89277
|
localeNames: {},
|
89278
|
+
localeDirections: {},
|
89150
89279
|
supportedLocales: [],
|
89151
89280
|
get currentLocale() {
|
89152
89281
|
return this.currentLocaleValue === this.defaultLocaleValue ? "" : this.currentLocaleValue;
|