survey-react 1.11.4 → 1.11.6
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 +130 -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 +133 -82
- package/survey.react.js +307 -125
- 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.6
|
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
|
};
|
@@ -1138,6 +1147,23 @@ var Action = /** @class */ (function (_super) {
|
|
1138
1147
|
this.locTooltipChanged();
|
1139
1148
|
this.locStrChangedInPopupModel();
|
1140
1149
|
};
|
1150
|
+
Action.prototype.doAction = function (args) {
|
1151
|
+
var evt = !!args.originalEvent ? args.originalEvent : args;
|
1152
|
+
this.action(this, evt.isTrusted);
|
1153
|
+
evt.preventDefault();
|
1154
|
+
evt.stopPropagation();
|
1155
|
+
return true;
|
1156
|
+
};
|
1157
|
+
Action.prototype.doMouseDown = function () {
|
1158
|
+
this.isMouseDown = true;
|
1159
|
+
};
|
1160
|
+
Action.prototype.doFocus = function (args) {
|
1161
|
+
if (!!this.onFocus) {
|
1162
|
+
var evt = !!args.originalEvent ? args.originalEvent : args;
|
1163
|
+
this.onFocus(this.isMouseDown, evt);
|
1164
|
+
}
|
1165
|
+
this.isMouseDown = false;
|
1166
|
+
};
|
1141
1167
|
Action.prototype.locStrChangedInPopupModel = function () {
|
1142
1168
|
if (!this.popupModel || !this.popupModel.contentComponentData || !this.popupModel.contentComponentData.model)
|
1143
1169
|
return;
|
@@ -1218,6 +1244,9 @@ var Action = /** @class */ (function (_super) {
|
|
1218
1244
|
__decorate([
|
1219
1245
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
1220
1246
|
], Action.prototype, "action", void 0);
|
1247
|
+
__decorate([
|
1248
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
1249
|
+
], Action.prototype, "onFocus", void 0);
|
1221
1250
|
__decorate([
|
1222
1251
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
1223
1252
|
], Action.prototype, "_component", void 0);
|
@@ -1650,9 +1679,6 @@ var ActionContainer = /** @class */ (function (_super) {
|
|
1650
1679
|
itemValue.showPopupDelayed(_this.subItemsShowDelay);
|
1651
1680
|
_this.popupAfterShowCallback(itemValue);
|
1652
1681
|
}
|
1653
|
-
else if (!!action.popupModel && action.popupModel.isVisible) {
|
1654
|
-
action.hidePopupDelayed(_this.subItemsHideDelay);
|
1655
|
-
}
|
1656
1682
|
});
|
1657
1683
|
};
|
1658
1684
|
ActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
|
@@ -5610,6 +5636,7 @@ var defaultV2Css = {
|
|
5610
5636
|
titleExpanded: "sd-element__title--expanded",
|
5611
5637
|
titleCollapsed: "sd-element__title--collapsed",
|
5612
5638
|
titleDisabled: "sd-element__title--disabled",
|
5639
|
+
titleHidden: "sd-element__title--hidden",
|
5613
5640
|
titleOnExpand: "sd-panel__title--expanded",
|
5614
5641
|
titleOnError: "sd-panel__title--error",
|
5615
5642
|
titleBar: "sd-action-title-bar",
|
@@ -6943,12 +6970,12 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
6943
6970
|
if (!draggedElementShortcut)
|
6944
6971
|
return;
|
6945
6972
|
// draggedElementShortcut.innerText = text;
|
6946
|
-
draggedElementShortcut.
|
6973
|
+
draggedElementShortcut.className = "sv-drag-drop-choices-shortcut";
|
6947
6974
|
var isDeepClone = true;
|
6948
6975
|
var clone = (draggedElementNode
|
6949
6976
|
.closest("[data-sv-drop-target-item-value]")
|
6950
6977
|
.cloneNode(isDeepClone));
|
6951
|
-
clone.
|
6978
|
+
clone.classList.add("sv-drag-drop-choices-shortcut__content");
|
6952
6979
|
var dragIcon = clone.querySelector(".svc-item-value-controls__drag-icon");
|
6953
6980
|
dragIcon.style.visibility = "visible";
|
6954
6981
|
var removeIcon = clone.querySelector(".svc-item-value-controls__remove");
|
@@ -6962,6 +6989,9 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
6962
6989
|
draggedElementShortcut.shortcutXOffset = event.clientX - rect.x;
|
6963
6990
|
draggedElementShortcut.shortcutYOffset = event.clientY - rect.y;
|
6964
6991
|
this.isBottom = null;
|
6992
|
+
if (typeof this.onShortcutCreated === "function") {
|
6993
|
+
this.onShortcutCreated(draggedElementShortcut);
|
6994
|
+
}
|
6965
6995
|
return draggedElementShortcut;
|
6966
6996
|
};
|
6967
6997
|
DragDropChoices.prototype.createImagePickerShortcut = function (item, text, draggedElementNode, event) {
|
@@ -7916,9 +7946,13 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7916
7946
|
}
|
7917
7947
|
return _super.prototype.calculateIsBottom.call(this, clientY);
|
7918
7948
|
};
|
7919
|
-
DragDropRankingChoices.prototype.
|
7949
|
+
DragDropRankingChoices.prototype.getIndices = function (model, fromChoicesArray, toChoicesArray) {
|
7920
7950
|
var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
7921
7951
|
var toIndex = toChoicesArray.indexOf(this.dropTarget);
|
7952
|
+
if (fromIndex < 0 && !!this.draggedElement) {
|
7953
|
+
this.draggedElement = _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].getItemByValue(fromChoicesArray, this.draggedElement.value) || this.draggedElement;
|
7954
|
+
fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
7955
|
+
}
|
7922
7956
|
if (toIndex === -1) {
|
7923
7957
|
var length_1 = model.value.length;
|
7924
7958
|
toIndex = length_1;
|
@@ -7936,7 +7970,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7936
7970
|
return { fromIndex: fromIndex, toIndex: toIndex };
|
7937
7971
|
};
|
7938
7972
|
DragDropRankingChoices.prototype.afterDragOver = function (dropTargetNode) {
|
7939
|
-
var _a = this.
|
7973
|
+
var _a = this.getIndices(this.parentElement, this.parentElement.rankingChoices, this.parentElement.rankingChoices), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
|
7940
7974
|
this.reorderRankedItem(this.parentElement, fromIndex, toIndex);
|
7941
7975
|
};
|
7942
7976
|
DragDropRankingChoices.prototype.updateDraggedElementShortcut = function (newIndex) {
|
@@ -8066,7 +8100,7 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
8066
8100
|
};
|
8067
8101
|
DragDropRankingSelectToRank.prototype.doRankBetween = function (dropTargetNode, fromChoicesArray, toChoicesArray, rankFunction) {
|
8068
8102
|
var questionModel = this.parentElement;
|
8069
|
-
var _a = this.
|
8103
|
+
var _a = this.getIndices(questionModel, fromChoicesArray, toChoicesArray), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
|
8070
8104
|
rankFunction(questionModel, fromIndex, toIndex, dropTargetNode);
|
8071
8105
|
};
|
8072
8106
|
Object.defineProperty(DragDropRankingSelectToRank.prototype, "isDraggedElementRanked", {
|
@@ -8171,7 +8205,6 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8171
8205
|
_this.selectedItemSelector = ".sv-list__item--selected";
|
8172
8206
|
_this.itemSelector = ".sv-list__item";
|
8173
8207
|
_this.itemsSettings = { skip: 0, take: 0, totalCount: 0, items: [] };
|
8174
|
-
_this.isRunningLoadQuestionChoices = false;
|
8175
8208
|
_this.popupCssClasses = "sv-single-select-list";
|
8176
8209
|
_this.listModelFilterStringChanged = function (newValue) {
|
8177
8210
|
if (_this.filterString !== newValue) {
|
@@ -8222,14 +8255,12 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8222
8255
|
};
|
8223
8256
|
DropdownListModel.prototype.loadQuestionChoices = function (callbackAfterItemsLoaded) {
|
8224
8257
|
var _this = this;
|
8225
|
-
this.isRunningLoadQuestionChoices = true;
|
8226
8258
|
this.question.survey.loadQuestionChoices({
|
8227
8259
|
question: this.question,
|
8228
8260
|
filter: this.filterString,
|
8229
8261
|
skip: this.itemsSettings.skip,
|
8230
8262
|
take: this.itemsSettings.take,
|
8231
8263
|
setItems: function (items, totalCount) {
|
8232
|
-
_this.isRunningLoadQuestionChoices = false;
|
8233
8264
|
_this.setItems(items || [], totalCount || 0);
|
8234
8265
|
_this.popupRecalculatePosition(_this.itemsSettings.skip === _this.itemsSettings.take);
|
8235
8266
|
if (!!callbackAfterItemsLoaded) {
|
@@ -8241,8 +8272,6 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8241
8272
|
};
|
8242
8273
|
DropdownListModel.prototype.updateQuestionChoices = function (callbackAfterItemsLoaded) {
|
8243
8274
|
var _this = this;
|
8244
|
-
if (this.isRunningLoadQuestionChoices)
|
8245
|
-
return;
|
8246
8275
|
var isUpdate = (this.itemsSettings.skip + 1) < this.itemsSettings.totalCount;
|
8247
8276
|
if (!this.itemsSettings.skip || isUpdate) {
|
8248
8277
|
if (!!this.filterString && _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].dropdownSearchDelay > 0) {
|
@@ -8599,7 +8628,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8599
8628
|
this.listModel.setItems(this.getAvailableItems());
|
8600
8629
|
};
|
8601
8630
|
DropdownListModel.prototype.onClick = function (event) {
|
8602
|
-
if (this.question.readOnly || this.question.isDesignMode || this.question.isPreviewStyle)
|
8631
|
+
if (this.question.readOnly || this.question.isDesignMode || this.question.isPreviewStyle || this.question.isReadOnlyAttr)
|
8603
8632
|
return;
|
8604
8633
|
this._popupModel.toggleVisibility();
|
8605
8634
|
this.focusItemOnClickAndPopup();
|
@@ -9924,8 +9953,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9924
9953
|
|
9925
9954
|
var Version;
|
9926
9955
|
var ReleaseDate;
|
9927
|
-
Version = "" + "1.11.
|
9928
|
-
ReleaseDate = "" + "2024-
|
9956
|
+
Version = "" + "1.11.6";
|
9957
|
+
ReleaseDate = "" + "2024-07-10";
|
9929
9958
|
function checkLibraryVersion(ver, libraryName) {
|
9930
9959
|
if (Version != ver) {
|
9931
9960
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -18681,7 +18710,7 @@ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\
|
|
18681
18710
|
/*! no static exports found */
|
18682
18711
|
/***/ (function(module, exports) {
|
18683
18712
|
|
18684
|
-
module.exports = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><
|
18713
|
+
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
18714
|
|
18686
18715
|
/***/ }),
|
18687
18716
|
|
@@ -21220,7 +21249,7 @@ var JsonObject = /** @class */ (function () {
|
|
21220
21249
|
JsonObject.prototype.toJsonObjectCore = function (obj, property, options) {
|
21221
21250
|
if (!obj || !obj.getType)
|
21222
21251
|
return obj;
|
21223
|
-
if (typeof obj.getData === "function")
|
21252
|
+
if (!obj.isSurvey && typeof obj.getData === "function")
|
21224
21253
|
return obj.getData();
|
21225
21254
|
var result = {};
|
21226
21255
|
if (property != null && !property.className) {
|
@@ -21546,6 +21575,7 @@ var defaultListCss = {
|
|
21546
21575
|
searchClearButtonIcon: "sv-list__filter-clear-button",
|
21547
21576
|
loadingIndicator: "sv-list__loading-indicator",
|
21548
21577
|
itemSelected: "sv-list__item--selected",
|
21578
|
+
itemGroup: "sv-list__item--group",
|
21549
21579
|
itemWithIcon: "sv-list__item--with-icon",
|
21550
21580
|
itemDisabled: "sv-list__item--disabled",
|
21551
21581
|
itemFocused: "sv-list__item--focused",
|
@@ -21611,6 +21641,7 @@ var ListModel = /** @class */ (function (_super) {
|
|
21611
21641
|
.append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
|
21612
21642
|
.append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
|
21613
21643
|
.append(_this.cssClasses.itemSelected, _this.isItemSelected(itemValue))
|
21644
|
+
.append(_this.cssClasses.itemGroup, itemValue.hasSubItems)
|
21614
21645
|
.append(_this.cssClasses.itemHovered, itemValue.isHovered)
|
21615
21646
|
.append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
|
21616
21647
|
.append(itemValue.css)
|
@@ -22715,6 +22746,7 @@ var arabicSurveyStrings = {
|
|
22715
22746
|
};
|
22716
22747
|
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["ar"] = arabicSurveyStrings;
|
22717
22748
|
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["ar"] = "العربية";
|
22749
|
+
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeDirections["ar"] = "rtl";
|
22718
22750
|
// The following strings have been translated by a machine translation service
|
22719
22751
|
// Remove those strings that you have corrected manually
|
22720
22752
|
// indexText: "{0} of {1}" => "{0} من {1}"
|
@@ -23801,7 +23833,7 @@ var dutchSurveyStrings = {
|
|
23801
23833
|
choices_Item: "onderwerp",
|
23802
23834
|
matrix_column: "Kolom",
|
23803
23835
|
matrix_row: "Rij",
|
23804
|
-
multipletext_itemname: "
|
23836
|
+
multipletext_itemname: "Tekst",
|
23805
23837
|
savingData: "De resultaten worden bewaard op de server...",
|
23806
23838
|
savingDataError: "Er was een probleem en we konden de resultaten niet bewaren.",
|
23807
23839
|
savingDataSuccess: "De resultaten werden succesvol bewaard!",
|
@@ -30515,11 +30547,15 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
30515
30547
|
};
|
30516
30548
|
QuestionMatrixBaseModel.prototype.updateVisibilityBasedOnRows = function () {
|
30517
30549
|
if (this.hideIfRowsEmpty) {
|
30518
|
-
this.
|
30519
|
-
this.rows.length > 0 &&
|
30520
|
-
(!this.filteredRows || this.filteredRows.length > 0);
|
30550
|
+
this.onVisibleChanged();
|
30521
30551
|
}
|
30522
30552
|
};
|
30553
|
+
QuestionMatrixBaseModel.prototype.isVisibleCore = function () {
|
30554
|
+
var res = _super.prototype.isVisibleCore.call(this);
|
30555
|
+
if (!res || !this.hideIfRowsEmpty)
|
30556
|
+
return res;
|
30557
|
+
return this.rows.length > 0 && (!this.filteredRows || this.filteredRows.length > 0);
|
30558
|
+
};
|
30523
30559
|
QuestionMatrixBaseModel.prototype.shouldRunColumnExpression = function () {
|
30524
30560
|
return !this.survey || !this.survey.areInvisibleElementsShowing;
|
30525
30561
|
};
|
@@ -30562,6 +30598,7 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
30562
30598
|
: null;
|
30563
30599
|
this.filteredRows = [];
|
30564
30600
|
var hasChanged = _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].runConditionsForItems(this.rows, this.filteredRows, runner, values, properties, !showInvisibile);
|
30601
|
+
_itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].runEnabledConditionsForItems(this.rows, undefined, values, properties);
|
30565
30602
|
if (this.filteredRows.length === this.rows.length) {
|
30566
30603
|
this.filteredRows = null;
|
30567
30604
|
}
|
@@ -31921,6 +31958,8 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
31921
31958
|
InputMaskNumeric.prototype.validateNumber = function (number, matchWholeMask) {
|
31922
31959
|
var min = this.min || Number.MIN_SAFE_INTEGER;
|
31923
31960
|
var max = this.max || Number.MAX_SAFE_INTEGER;
|
31961
|
+
if (this.numericalCompositionIsEmpty(number))
|
31962
|
+
return true;
|
31924
31963
|
if (this.min !== undefined || this.max !== undefined) {
|
31925
31964
|
var value = this.convertNumber(number);
|
31926
31965
|
if (Number.isNaN(value)) {
|
@@ -34196,6 +34235,23 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
34196
34235
|
return this.parent.getQuestionTitleLocation();
|
34197
34236
|
return this.survey ? this.survey.questionTitleLocation : "top";
|
34198
34237
|
};
|
34238
|
+
PanelModelBase.prototype.availableQuestionTitleWidth = function () {
|
34239
|
+
var questionTitleLocation = this.getQuestionTitleLocation();
|
34240
|
+
if (questionTitleLocation === "left")
|
34241
|
+
return true;
|
34242
|
+
return this.hasElementWithTitleLocationLeft();
|
34243
|
+
};
|
34244
|
+
PanelModelBase.prototype.hasElementWithTitleLocationLeft = function () {
|
34245
|
+
var result = this.elements.some(function (el) {
|
34246
|
+
if (el instanceof PanelModelBase) {
|
34247
|
+
return el.hasElementWithTitleLocationLeft();
|
34248
|
+
}
|
34249
|
+
else if (el instanceof _question__WEBPACK_IMPORTED_MODULE_4__["Question"]) {
|
34250
|
+
return el.getTitleLocation() === "left";
|
34251
|
+
}
|
34252
|
+
});
|
34253
|
+
return result;
|
34254
|
+
};
|
34199
34255
|
PanelModelBase.prototype.getQuestionTitleWidth = function () {
|
34200
34256
|
return this.questionTitleWidth || this.parent && this.parent.getQuestionTitleWidth();
|
34201
34257
|
};
|
@@ -35148,7 +35204,7 @@ var PanelModel = /** @class */ (function (_super) {
|
|
35148
35204
|
var _this = this;
|
35149
35205
|
var locTitleValue = _super.prototype.createLocTitleProperty.call(this);
|
35150
35206
|
locTitleValue.onGetTextCallback = function (text) {
|
35151
|
-
if (!text && (_this.state !== "default")) {
|
35207
|
+
if (!text && (_this.state !== "default" || (_this.isDesignMode && _this.isDefaultV2Theme))) {
|
35152
35208
|
text = _this.name;
|
35153
35209
|
}
|
35154
35210
|
return text;
|
@@ -35311,7 +35367,10 @@ var PanelModel = /** @class */ (function (_super) {
|
|
35311
35367
|
};
|
35312
35368
|
Object.defineProperty(PanelModel.prototype, "cssTitle", {
|
35313
35369
|
get: function () {
|
35314
|
-
return
|
35370
|
+
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
|
35371
|
+
.append(this.getCssTitle(this.cssClasses.panel))
|
35372
|
+
.append(this.cssClasses.panel.titleHidden, !this.title && this.isDesignMode)
|
35373
|
+
.toString();
|
35315
35374
|
},
|
35316
35375
|
enumerable: false,
|
35317
35376
|
configurable: true
|
@@ -35406,7 +35465,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panelbase", [
|
|
35406
35465
|
{
|
35407
35466
|
name: "questionTitleWidth",
|
35408
35467
|
visibleIf: function (obj) {
|
35409
|
-
return !!obj && obj["
|
35468
|
+
return !!obj && obj["availableQuestionTitleWidth"]();
|
35410
35469
|
}
|
35411
35470
|
},
|
35412
35471
|
{
|
@@ -38510,7 +38569,7 @@ var ProgressButtons = /** @class */ (function (_super) {
|
|
38510
38569
|
Object.defineProperty(ProgressButtons.prototype, "progressWidth", {
|
38511
38570
|
get: function () {
|
38512
38571
|
if (this.isFitToSurveyWidth) {
|
38513
|
-
return this.survey.
|
38572
|
+
return this.survey.renderedWidth;
|
38514
38573
|
}
|
38515
38574
|
return "";
|
38516
38575
|
},
|
@@ -38690,6 +38749,9 @@ var TriggerExpressionInfo = /** @class */ (function () {
|
|
38690
38749
|
}
|
38691
38750
|
return TriggerExpressionInfo;
|
38692
38751
|
}());
|
38752
|
+
function querySelectorIncludingSelf(el, selector) {
|
38753
|
+
return el.querySelector(selector) || el != _global_variables_utils__WEBPACK_IMPORTED_MODULE_14__["DomWindowHelper"].getWindow() && el.matches(selector) && el;
|
38754
|
+
}
|
38693
38755
|
/**
|
38694
38756
|
* A base class for all questions.
|
38695
38757
|
*/
|
@@ -39193,9 +39255,7 @@ var Question = /** @class */ (function (_super) {
|
|
39193
39255
|
if (!this.setValueExpressionRunner) {
|
39194
39256
|
this.setValueExpressionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_6__["ExpressionRunner"](this.setValueExpression);
|
39195
39257
|
this.setValueExpressionRunner.onRunComplete = function (res) {
|
39196
|
-
|
39197
|
-
_this.value = res;
|
39198
|
-
}
|
39258
|
+
_this.runExpressionSetValue(res);
|
39199
39259
|
};
|
39200
39260
|
}
|
39201
39261
|
else {
|
@@ -40254,7 +40314,8 @@ var Question = /** @class */ (function (_super) {
|
|
40254
40314
|
var isParentReadOnly = !!this.parent && this.parent.isReadOnly;
|
40255
40315
|
var isPareQuestionReadOnly = !!this.parentQuestion && this.parentQuestion.isReadOnly;
|
40256
40316
|
var isSurveyReadOnly = !!this.survey && this.survey.isDisplayMode;
|
40257
|
-
|
40317
|
+
var callbackVal = !!this.readOnlyCallback && this.readOnlyCallback();
|
40318
|
+
return this.readOnly || isParentReadOnly || isSurveyReadOnly || isPareQuestionReadOnly || callbackVal;
|
40258
40319
|
},
|
40259
40320
|
enumerable: false,
|
40260
40321
|
configurable: true
|
@@ -40413,6 +40474,13 @@ var Question = /** @class */ (function (_super) {
|
|
40413
40474
|
return undefined;
|
40414
40475
|
return this.survey.runExpression(expression);
|
40415
40476
|
};
|
40477
|
+
Object.defineProperty(Question.prototype, "commentAreaRows", {
|
40478
|
+
get: function () {
|
40479
|
+
return this.survey && this.survey.commentAreaRows;
|
40480
|
+
},
|
40481
|
+
enumerable: false,
|
40482
|
+
configurable: true
|
40483
|
+
});
|
40416
40484
|
Object.defineProperty(Question.prototype, "autoGrowComment", {
|
40417
40485
|
get: function () {
|
40418
40486
|
return this.survey && this.survey.autoGrowComment;
|
@@ -40967,7 +41035,7 @@ var Question = /** @class */ (function (_super) {
|
|
40967
41035
|
if (values === void 0) { values = null; }
|
40968
41036
|
if (properties === void 0) { properties = null; }
|
40969
41037
|
var func = function (val) {
|
40970
|
-
_this.
|
41038
|
+
_this.runExpressionSetValueCore(val, setFunc);
|
40971
41039
|
};
|
40972
41040
|
if (!this.runDefaultValueExpression(runner, values, properties, func)) {
|
40973
41041
|
func(defaultValue);
|
@@ -40976,9 +41044,17 @@ var Question = /** @class */ (function (_super) {
|
|
40976
41044
|
Question.prototype.convertFuncValuetoQuestionValue = function (val) {
|
40977
41045
|
return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].convertValToQuestionVal(val);
|
40978
41046
|
};
|
40979
|
-
Question.prototype.
|
41047
|
+
Question.prototype.runExpressionSetValueCore = function (val, setFunc) {
|
40980
41048
|
setFunc(this.convertFuncValuetoQuestionValue(val));
|
40981
41049
|
};
|
41050
|
+
Question.prototype.runExpressionSetValue = function (val) {
|
41051
|
+
var _this = this;
|
41052
|
+
this.runExpressionSetValueCore(val, function (val) {
|
41053
|
+
if (!_this.isTwoValueEquals(_this.value, val)) {
|
41054
|
+
_this.value = val;
|
41055
|
+
}
|
41056
|
+
});
|
41057
|
+
};
|
40982
41058
|
Question.prototype.runDefaultValueExpression = function (runner, values, properties, setFunc) {
|
40983
41059
|
var _this = this;
|
40984
41060
|
if (values === void 0) { values = null; }
|
@@ -40987,11 +41063,7 @@ var Question = /** @class */ (function (_super) {
|
|
40987
41063
|
return false;
|
40988
41064
|
if (!setFunc) {
|
40989
41065
|
setFunc = function (val) {
|
40990
|
-
_this.runExpressionSetValue(val
|
40991
|
-
if (!_this.isTwoValueEquals(_this.value, val)) {
|
40992
|
-
_this.value = val;
|
40993
|
-
}
|
40994
|
-
});
|
41066
|
+
_this.runExpressionSetValue(val);
|
40995
41067
|
};
|
40996
41068
|
}
|
40997
41069
|
if (!values)
|
@@ -41608,7 +41680,7 @@ var Question = /** @class */ (function (_super) {
|
|
41608
41680
|
var scrollableSelector_1 = this.getObservedElementSelector();
|
41609
41681
|
if (!scrollableSelector_1)
|
41610
41682
|
return;
|
41611
|
-
var defaultRootEl = el
|
41683
|
+
var defaultRootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
|
41612
41684
|
if (!defaultRootEl)
|
41613
41685
|
return;
|
41614
41686
|
var isProcessed_1 = false;
|
@@ -41620,7 +41692,7 @@ var Question = /** @class */ (function (_super) {
|
|
41620
41692
|
isProcessed_1 = false;
|
41621
41693
|
}
|
41622
41694
|
var callback = function () {
|
41623
|
-
var rootEl = el
|
41695
|
+
var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
|
41624
41696
|
if (!requiredWidth_1 && _this.isDefaultRendering()) {
|
41625
41697
|
requiredWidth_1 = rootEl.scrollWidth;
|
41626
41698
|
}
|
@@ -41645,8 +41717,10 @@ var Question = /** @class */ (function (_super) {
|
|
41645
41717
|
});
|
41646
41718
|
this.onMobileChangedCallback = function () {
|
41647
41719
|
setTimeout(function () {
|
41648
|
-
var rootEl = el
|
41649
|
-
|
41720
|
+
var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
|
41721
|
+
if (rootEl) {
|
41722
|
+
_this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
|
41723
|
+
}
|
41650
41724
|
}, 0);
|
41651
41725
|
};
|
41652
41726
|
this.resizeObserver.observe(el);
|
@@ -42279,6 +42353,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
42279
42353
|
_this.isUpdatingChoicesDependedQuestions = false;
|
42280
42354
|
_this.headItemsCount = 0;
|
42281
42355
|
_this.footItemsCount = 0;
|
42356
|
+
_this.allowMultiColumns = true;
|
42282
42357
|
_this.prevIsOtherSelected = false;
|
42283
42358
|
_this.noneItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].noneItemValue, "noneText", "noneItemText");
|
42284
42359
|
_this.refuseItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].refuseItemValue, "refuseText", "refuseItemText");
|
@@ -44299,9 +44374,23 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
44299
44374
|
enumerable: false,
|
44300
44375
|
configurable: true
|
44301
44376
|
});
|
44377
|
+
QuestionSelectBase.prototype.getObservedElementSelector = function () {
|
44378
|
+
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["classesToSelector"])(this.cssClasses.mainRoot);
|
44379
|
+
};
|
44380
|
+
QuestionSelectBase.prototype.supportResponsiveness = function () {
|
44381
|
+
return true;
|
44382
|
+
};
|
44383
|
+
QuestionSelectBase.prototype.onBeforeSetCompactRenderer = function () {
|
44384
|
+
_super.prototype.onBeforeSetDesktopRenderer.call(this);
|
44385
|
+
this.allowMultiColumns = false;
|
44386
|
+
};
|
44387
|
+
QuestionSelectBase.prototype.onBeforeSetDesktopRenderer = function () {
|
44388
|
+
_super.prototype.onBeforeSetDesktopRenderer.call(this);
|
44389
|
+
this.allowMultiColumns = true;
|
44390
|
+
};
|
44302
44391
|
Object.defineProperty(QuestionSelectBase.prototype, "hasColumns", {
|
44303
44392
|
get: function () {
|
44304
|
-
return !this.isMobile &&
|
44393
|
+
return !this.isMobile && this.allowMultiColumns &&
|
44305
44394
|
(this.getCurrentColCount() > 1);
|
44306
44395
|
},
|
44307
44396
|
enumerable: false,
|
@@ -44418,6 +44507,10 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
44418
44507
|
Object.defineProperty(QuestionSelectBase.prototype, "itemComponent", {
|
44419
44508
|
/**
|
44420
44509
|
* The name of a component used to render items.
|
44510
|
+
*
|
44511
|
+
* [View Dropdown Demo](https://surveyjs.io/form-library/examples/dropdown-box-with-custom-items/ (linkStyle))
|
44512
|
+
*
|
44513
|
+
* [View Ranking Demo](https://surveyjs.io/form-library/examples/dropdown-box-with-custom-items/ (linkStyle))
|
44421
44514
|
*/
|
44422
44515
|
get: function () {
|
44423
44516
|
return this.getPropertyValue("itemComponent", this.getDefaultItemComponent());
|
@@ -44455,6 +44548,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
44455
44548
|
__decorate([
|
44456
44549
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ localizable: true })
|
44457
44550
|
], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
|
44551
|
+
__decorate([
|
44552
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
44553
|
+
], QuestionSelectBase.prototype, "allowMultiColumns", void 0);
|
44458
44554
|
return QuestionSelectBase;
|
44459
44555
|
}(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));
|
44460
44556
|
|
@@ -45684,7 +45780,8 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
45684
45780
|
if (!itemValues.length && !selectedItemValues) {
|
45685
45781
|
this.updateSelectedItemValues();
|
45686
45782
|
}
|
45687
|
-
|
45783
|
+
var validValues = this.validateItemValues(itemValues);
|
45784
|
+
return validValues;
|
45688
45785
|
},
|
45689
45786
|
enumerable: false,
|
45690
45787
|
configurable: true
|
@@ -46142,7 +46239,14 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
46142
46239
|
});
|
46143
46240
|
Object.defineProperty(QuestionCheckboxModel.prototype, "a11y_input_ariaRole", {
|
46144
46241
|
get: function () {
|
46145
|
-
return "
|
46242
|
+
return "group";
|
46243
|
+
},
|
46244
|
+
enumerable: false,
|
46245
|
+
configurable: true
|
46246
|
+
});
|
46247
|
+
Object.defineProperty(QuestionCheckboxModel.prototype, "a11y_input_ariaRequired", {
|
46248
|
+
get: function () {
|
46249
|
+
return null;
|
46146
46250
|
},
|
46147
46251
|
enumerable: false,
|
46148
46252
|
configurable: true
|
@@ -46494,9 +46598,12 @@ var ComponentQuestionJSON = /** @class */ (function () {
|
|
46494
46598
|
this.json.onUpdateQuestionCssClasses(question, element, css);
|
46495
46599
|
};
|
46496
46600
|
ComponentQuestionJSON.prototype.onSetQuestionValue = function (question, newValue) {
|
46497
|
-
if (
|
46498
|
-
|
46499
|
-
|
46601
|
+
if (this.json.onSetQuestionValue) {
|
46602
|
+
this.json.onSetQuestionValue(question, newValue);
|
46603
|
+
}
|
46604
|
+
if (this.json.onValueSet) {
|
46605
|
+
this.json.onValueSet(question, newValue);
|
46606
|
+
}
|
46500
46607
|
};
|
46501
46608
|
ComponentQuestionJSON.prototype.onPropertyChanged = function (question, propertyName, newValue) {
|
46502
46609
|
if (!this.json.onPropertyChanged)
|
@@ -47887,7 +47994,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
47887
47994
|
return _super.prototype.hasUnknownValue.call(this, val, true, false);
|
47888
47995
|
};
|
47889
47996
|
QuestionDropdownModel.prototype.getItemIfChoicesNotContainThisValue = function (value, text) {
|
47890
|
-
if (this.choicesLazyLoadEnabled
|
47997
|
+
if (this.choicesLazyLoadEnabled) {
|
47891
47998
|
return this.createItemValue(value, text);
|
47892
47999
|
}
|
47893
48000
|
else {
|
@@ -51986,6 +52093,8 @@ var MatrixDropdownRowModel = /** @class */ (function (_super) {
|
|
51986
52093
|
enumerable: false,
|
51987
52094
|
configurable: true
|
51988
52095
|
});
|
52096
|
+
MatrixDropdownRowModel.prototype.isRowEnabled = function () { return this.item.isEnabled; };
|
52097
|
+
MatrixDropdownRowModel.prototype.isRowHasEnabledCondition = function () { return !!this.item.enableIf; };
|
51989
52098
|
return MatrixDropdownRowModel;
|
51990
52099
|
}(_question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownRowModelBase"]));
|
51991
52100
|
|
@@ -52284,7 +52393,9 @@ var MatrixDropdownCell = /** @class */ (function () {
|
|
52284
52393
|
this.question.locStrsChanged();
|
52285
52394
|
};
|
52286
52395
|
MatrixDropdownCell.prototype.createQuestion = function (column, row, data) {
|
52396
|
+
var _this = this;
|
52287
52397
|
var res = data.createQuestion(this.row, this.column);
|
52398
|
+
res.readOnlyCallback = function () { return !_this.row.isRowEnabled(); };
|
52288
52399
|
res.validateValueCallback = function () {
|
52289
52400
|
return data.validateCell(row, column.name, row.value);
|
52290
52401
|
};
|
@@ -52470,6 +52581,8 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
52470
52581
|
enumerable: false,
|
52471
52582
|
configurable: true
|
52472
52583
|
});
|
52584
|
+
MatrixDropdownRowModelBase.prototype.isRowEnabled = function () { return true; };
|
52585
|
+
MatrixDropdownRowModelBase.prototype.isRowHasEnabledCondition = function () { return false; };
|
52473
52586
|
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "value", {
|
52474
52587
|
get: function () {
|
52475
52588
|
var result = {};
|
@@ -52646,6 +52759,9 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
52646
52759
|
if (!!this.detailPanel) {
|
52647
52760
|
this.detailPanel.runCondition(values, newProps);
|
52648
52761
|
}
|
52762
|
+
if (this.isRowHasEnabledCondition()) {
|
52763
|
+
this.onQuestionReadOnlyChanged();
|
52764
|
+
}
|
52649
52765
|
};
|
52650
52766
|
MatrixDropdownRowModelBase.prototype.getNamesWithDefaultValues = function () {
|
52651
52767
|
var res = [];
|
@@ -52900,14 +53016,15 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
52900
53016
|
return;
|
52901
53017
|
this.updateCellOnColumnItemValueChanged(cell, propertyName, obj, name, newValue, oldValue);
|
52902
53018
|
};
|
52903
|
-
MatrixDropdownRowModelBase.prototype.onQuestionReadOnlyChanged = function (
|
53019
|
+
MatrixDropdownRowModelBase.prototype.onQuestionReadOnlyChanged = function () {
|
52904
53020
|
var questions = this.questions;
|
52905
53021
|
for (var i = 0; i < questions.length; i++) {
|
52906
53022
|
var q = questions[i];
|
52907
53023
|
q.setPropertyValue("isReadOnly", q.isReadOnly);
|
52908
53024
|
}
|
52909
53025
|
if (!!this.detailPanel) {
|
52910
|
-
this.
|
53026
|
+
var parentIsReadOnly = !!this.data && this.data.isMatrixReadOnly();
|
53027
|
+
this.detailPanel.readOnly = parentIsReadOnly || !this.isRowEnabled();
|
52911
53028
|
}
|
52912
53029
|
};
|
52913
53030
|
MatrixDropdownRowModelBase.prototype.hasErrors = function (fireCallback, rec, raiseOnCompletedAsyncValidators) {
|
@@ -54170,7 +54287,8 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
54170
54287
|
return questionPlainData;
|
54171
54288
|
};
|
54172
54289
|
QuestionMatrixDropdownModelBase.prototype.addConditionObjectsByContext = function (objects, context) {
|
54173
|
-
var
|
54290
|
+
var hasColumnContext = !!context && this.columns.indexOf(context) > -1;
|
54291
|
+
var hasContext = context === true || hasColumnContext;
|
54174
54292
|
var rowsIndeces = this.getConditionObjectsRowIndeces();
|
54175
54293
|
if (hasContext) {
|
54176
54294
|
rowsIndeces.push(-1);
|
@@ -54197,6 +54315,11 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
54197
54315
|
if (index === -1 && context === true) {
|
54198
54316
|
obj.context = this;
|
54199
54317
|
}
|
54318
|
+
else {
|
54319
|
+
if (hasColumnContext && prefixName.startsWith("row.")) {
|
54320
|
+
obj.context = context;
|
54321
|
+
}
|
54322
|
+
}
|
54200
54323
|
objects.push(obj);
|
54201
54324
|
}
|
54202
54325
|
}
|
@@ -54462,14 +54585,17 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
54462
54585
|
var _this = this;
|
54463
54586
|
duplicatedRows.forEach(function (row) {
|
54464
54587
|
var question = row.getQuestionByName(columnName);
|
54465
|
-
|
54588
|
+
var inDetailPanel = _this.detailPanel.getQuestionByName(columnName);
|
54589
|
+
if (!question && inDetailPanel) {
|
54466
54590
|
row.showDetailPanel();
|
54467
54591
|
if (row.detailPanel) {
|
54468
54592
|
question = row.detailPanel.getQuestionByName(columnName);
|
54469
54593
|
}
|
54470
54594
|
}
|
54471
54595
|
if (question) {
|
54472
|
-
|
54596
|
+
if (inDetailPanel) {
|
54597
|
+
row.showDetailPanel();
|
54598
|
+
}
|
54473
54599
|
_this.addDuplicationError(question);
|
54474
54600
|
}
|
54475
54601
|
});
|
@@ -54531,7 +54657,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
54531
54657
|
if (!this.generateRows)
|
54532
54658
|
return;
|
54533
54659
|
for (var i = 0; i < this.visibleRows.length; i++) {
|
54534
|
-
this.visibleRows[i].onQuestionReadOnlyChanged(
|
54660
|
+
this.visibleRows[i].onQuestionReadOnlyChanged();
|
54535
54661
|
}
|
54536
54662
|
};
|
54537
54663
|
//IMatrixDropdownData
|
@@ -54757,7 +54883,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
54757
54883
|
if (this.isDesignMode)
|
54758
54884
|
return this.detailPanel;
|
54759
54885
|
var panel = this.createNewDetailPanel();
|
54760
|
-
panel.readOnly = this.isReadOnly;
|
54886
|
+
panel.readOnly = this.isReadOnly || !row.isRowEnabled();
|
54761
54887
|
panel.setSurveyImpl(row);
|
54762
54888
|
var json = this.detailPanel.toJSON();
|
54763
54889
|
new _jsonobject__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]().toObject(json, panel);
|
@@ -54797,6 +54923,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
54797
54923
|
return data.getTextProcessor();
|
54798
54924
|
return null;
|
54799
54925
|
};
|
54926
|
+
QuestionMatrixDropdownModelBase.prototype.isMatrixReadOnly = function () { return this.isReadOnly; };
|
54800
54927
|
QuestionMatrixDropdownModelBase.prototype.getQuestionFromArray = function (name, index) {
|
54801
54928
|
if (index >= this.visibleRows.length)
|
54802
54929
|
return null;
|
@@ -54875,6 +55002,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownb
|
|
54875
55002
|
visible: false,
|
54876
55003
|
isLightSerializable: false,
|
54877
55004
|
},
|
55005
|
+
{ name: "columnsVisibleIf", visible: false },
|
54878
55006
|
{
|
54879
55007
|
name: "detailPanelMode",
|
54880
55008
|
choices: ["none", "underRow", "underRowSingle"],
|
@@ -61569,9 +61697,10 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
61569
61697
|
}
|
61570
61698
|
return -1;
|
61571
61699
|
};
|
61572
|
-
QuestionPanelDynamicModel.prototype.
|
61573
|
-
|
61574
|
-
|
61700
|
+
QuestionPanelDynamicModel.prototype.getPanelVisibleIndexById = function (id) {
|
61701
|
+
var visPanels = this.visiblePanelsCore;
|
61702
|
+
for (var i = 0; i < visPanels.length; i++) {
|
61703
|
+
if (visPanels[i].id === id)
|
61575
61704
|
return i;
|
61576
61705
|
}
|
61577
61706
|
return -1;
|
@@ -62486,14 +62615,14 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
62486
62615
|
return options.title;
|
62487
62616
|
};
|
62488
62617
|
locTitle.sharedData = this.locTemplateTabTitle;
|
62489
|
-
var isActive = this.
|
62618
|
+
var isActive = this.getPanelVisibleIndexById(panel.id) === this.currentIndex;
|
62490
62619
|
var newItem = new _actions_action__WEBPACK_IMPORTED_MODULE_11__["Action"]({
|
62491
62620
|
id: panel.id,
|
62492
62621
|
pressed: isActive,
|
62493
62622
|
locTitle: locTitle,
|
62494
62623
|
disableHide: isActive,
|
62495
62624
|
action: function () {
|
62496
|
-
_this.currentIndex = _this.
|
62625
|
+
_this.currentIndex = _this.getPanelVisibleIndexById(newItem.id);
|
62497
62626
|
}
|
62498
62627
|
});
|
62499
62628
|
return newItem;
|
@@ -62990,13 +63119,14 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62990
63119
|
if (_this.allowStartDrag &&
|
62991
63120
|
_this.canStartDragDueMaxSelectedChoices(target) &&
|
62992
63121
|
_this.canStartDragDueItemEnabled(choice)) {
|
62993
|
-
_this.
|
63122
|
+
_this.draggedChoiceValue = choice.value;
|
62994
63123
|
_this.draggedTargetNode = node;
|
62995
63124
|
_this.dragOrClickHelper.onPointerDown(event);
|
62996
63125
|
}
|
62997
63126
|
};
|
62998
63127
|
_this.startDrag = function (event) {
|
62999
|
-
|
63128
|
+
var choice = _itemvalue__WEBPACK_IMPORTED_MODULE_2__["ItemValue"].getItemByValue(_this.activeChoices, _this.draggedChoiceValue);
|
63129
|
+
_this.dragDropRankingChoices.startDrag(event, choice, _this, _this.draggedTargetNode);
|
63000
63130
|
};
|
63001
63131
|
_this.handlePointerUp = function (event, choice, node) {
|
63002
63132
|
if (!_this.selectToRankEnabled)
|
@@ -63169,6 +63299,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
63169
63299
|
QuestionRankingModel.prototype.onSurveyLoad = function () {
|
63170
63300
|
this.blockAnimations();
|
63171
63301
|
_super.prototype.onSurveyLoad.call(this);
|
63302
|
+
this.updateRankingChoices();
|
63172
63303
|
this.releaseAnimations();
|
63173
63304
|
};
|
63174
63305
|
QuestionRankingModel.prototype.addToValueByVisibleChoices = function () {
|
@@ -63474,9 +63605,6 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
63474
63605
|
enumerable: false,
|
63475
63606
|
configurable: true
|
63476
63607
|
});
|
63477
|
-
/**
|
63478
|
-
* The name of a component used to render items.
|
63479
|
-
*/
|
63480
63608
|
QuestionRankingModel.prototype.getDefaultItemComponent = function () {
|
63481
63609
|
return "sv-ranking-item";
|
63482
63610
|
};
|
@@ -64441,20 +64569,11 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
64441
64569
|
if (this.scaleColorMode === "monochrome" && this.rateColorMode == "default" ||
|
64442
64570
|
this.isPreviewStyle ||
|
64443
64571
|
this.isReadOnlyStyle)
|
64444
|
-
return {
|
64572
|
+
return {};
|
64445
64573
|
var index = this.visibleRateValues.indexOf(item);
|
64446
64574
|
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
|
-
}
|
64575
|
+
var colorLight = highlight == "highlighted" && this.scaleColorMode === "colored" && this.getRenderedItemColor(index, true);
|
64576
|
+
return colorLight ? { "--sd-rating-item-color": color, "--sd-rating-item-color-light": colorLight } : { "--sd-rating-item-color": color };
|
64458
64577
|
};
|
64459
64578
|
QuestionRatingModel.prototype.getItemClass = function (item, highlight) {
|
64460
64579
|
var _this = this;
|
@@ -65640,8 +65759,7 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
65640
65759
|
}
|
65641
65760
|
};
|
65642
65761
|
QuestionTagboxModel.prototype.getItemIfChoicesNotContainThisValue = function (value, text) {
|
65643
|
-
|
65644
|
-
if (this.choicesLazyLoadEnabled && !((_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.isAllDataLoaded)) {
|
65762
|
+
if (this.choicesLazyLoadEnabled) {
|
65645
65763
|
return this.createItemValue(value, text);
|
65646
65764
|
}
|
65647
65765
|
else {
|
@@ -66464,7 +66582,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
66464
66582
|
if (this.inputTextAlignment !== "auto") {
|
66465
66583
|
style.textAlign = this.inputTextAlignment;
|
66466
66584
|
}
|
66467
|
-
else if (this.maskSettings.getTextAlignment() !== "auto") {
|
66585
|
+
else if (!this.maskTypeIsEmpty && this.maskSettings.getTextAlignment() !== "auto") {
|
66468
66586
|
style.textAlign = this.maskSettings.getTextAlignment();
|
66469
66587
|
}
|
66470
66588
|
};
|
@@ -67648,7 +67766,7 @@ var SurveyActionBarItem = /** @class */ (function (_super) {
|
|
67648
67766
|
var title = this.item.tooltip || this.item.title;
|
67649
67767
|
var buttonContent = this.renderButtonContent();
|
67650
67768
|
var tabIndex = this.item.disableTabStop ? -1 : undefined;
|
67651
|
-
var button = Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_3__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { className: className, type: "button", disabled: this.item.disabled,
|
67769
|
+
var button = Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_3__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { className: className, type: "button", disabled: this.item.disabled, onMouseDown: function () { return _this.item.doMouseDown(); }, onFocus: function (args) { return _this.item.doFocus(args); }, onClick: function (args) { return _this.item.doAction(args); }, title: title, tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
|
67652
67770
|
return button;
|
67653
67771
|
};
|
67654
67772
|
return SurveyActionBarItem;
|
@@ -69955,7 +70073,7 @@ var RatingItem = /** @class */ (function (_super) {
|
|
69955
70073
|
var itemText = this.renderLocString(this.item.locText);
|
69956
70074
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
|
69957
70075
|
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)));
|
70076
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.itemText, "data-text": this.item.text }, itemText)));
|
69959
70077
|
};
|
69960
70078
|
RatingItem.prototype.componentDidMount = function () {
|
69961
70079
|
_super.prototype.componentDidMount.call(this);
|
@@ -72696,7 +72814,7 @@ var Survey = /** @class */ (function (_super) {
|
|
72696
72814
|
}
|
72697
72815
|
var rootCss = this.survey.getRootCss();
|
72698
72816
|
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 },
|
72817
|
+
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
72818
|
this.survey.needRenderIcons ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_svgbundle__WEBPACK_IMPORTED_MODULE_10__["SvgBundleComponent"], null) : null,
|
72701
72819
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.survey.wrapperFormCss },
|
72702
72820
|
backgroundImage,
|
@@ -72875,7 +72993,7 @@ function attachKey2click(element, viewModel, options) {
|
|
72875
72993
|
return false;
|
72876
72994
|
},
|
72877
72995
|
onKeyDown: function (evt) { return Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickDown"])(evt, options); },
|
72878
|
-
onBlur: function (evt) { return Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickBlur"])(evt); }
|
72996
|
+
onBlur: function (evt) { return Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickBlur"])(evt); },
|
72879
72997
|
});
|
72880
72998
|
}
|
72881
72999
|
|
@@ -73732,7 +73850,7 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
|
|
73732
73850
|
var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
|
73733
73851
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
|
73734
73852
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: labelClass },
|
73735
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox",
|
73853
|
+
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
73854
|
this.cssClasses.materialDecorator ?
|
73737
73855
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
|
73738
73856
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
|
@@ -73881,7 +73999,7 @@ var SurveyQuestionCommentItem = /** @class */ (function (_super) {
|
|
73881
73999
|
var comment = this.getComment() || "";
|
73882
74000
|
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, comment);
|
73883
74001
|
}
|
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 } }));
|
74002
|
+
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
74003
|
};
|
73886
74004
|
return SurveyQuestionCommentItem;
|
73887
74005
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
@@ -78098,11 +78216,18 @@ var settings = {
|
|
78098
78216
|
*/
|
78099
78217
|
ratingMaximumRateValueCount: 20,
|
78100
78218
|
/**
|
78101
|
-
* Specifies whether to close the drop-down menu of a [
|
78219
|
+
* 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
78220
|
*
|
78103
|
-
* This setting applies to all
|
78221
|
+
* 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
78222
|
*/
|
78105
78223
|
tagboxCloseOnSelect: false,
|
78224
|
+
/**
|
78225
|
+
* 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`.
|
78226
|
+
*
|
78227
|
+
* Default value: 500
|
78228
|
+
*
|
78229
|
+
* [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
|
78230
|
+
*/
|
78106
78231
|
dropdownSearchDelay: 500,
|
78107
78232
|
/**
|
78108
78233
|
* A function that activates a browser confirm dialog.
|
@@ -78885,6 +79010,42 @@ var SurveyElementCore = /** @class */ (function (_super) {
|
|
78885
79010
|
SurveyElementCore.prototype.createLocTitleProperty = function () {
|
78886
79011
|
return this.createLocalizableString("title", this, true);
|
78887
79012
|
};
|
79013
|
+
Object.defineProperty(SurveyElementCore.prototype, "isPage", {
|
79014
|
+
/**
|
79015
|
+
* Returns `true` if the survey element is a page.
|
79016
|
+
* @see Base.getType
|
79017
|
+
*/
|
79018
|
+
get: function () { return false; },
|
79019
|
+
enumerable: false,
|
79020
|
+
configurable: true
|
79021
|
+
});
|
79022
|
+
Object.defineProperty(SurveyElementCore.prototype, "isPanel", {
|
79023
|
+
/**
|
79024
|
+
* Returns `true` if the survey element is a panel.
|
79025
|
+
* @see Base.getType
|
79026
|
+
*/
|
79027
|
+
get: function () { return false; },
|
79028
|
+
enumerable: false,
|
79029
|
+
configurable: true
|
79030
|
+
});
|
79031
|
+
Object.defineProperty(SurveyElementCore.prototype, "isQuestion", {
|
79032
|
+
/**
|
79033
|
+
* Returns `true` if the survey element is a question.
|
79034
|
+
* @see Base.getType
|
79035
|
+
*/
|
79036
|
+
get: function () { return false; },
|
79037
|
+
enumerable: false,
|
79038
|
+
configurable: true
|
79039
|
+
});
|
79040
|
+
Object.defineProperty(SurveyElementCore.prototype, "isSurvey", {
|
79041
|
+
/**
|
79042
|
+
* Returns `true` if the element is a survey.
|
79043
|
+
* @see Base.getType
|
79044
|
+
*/
|
79045
|
+
get: function () { return false; },
|
79046
|
+
enumerable: false,
|
79047
|
+
configurable: true
|
79048
|
+
});
|
78888
79049
|
Object.defineProperty(SurveyElementCore.prototype, "title", {
|
78889
79050
|
/**
|
78890
79051
|
* A title for the survey element. If `title` is undefined, the `name` property value is displayed instead.
|
@@ -79716,39 +79877,6 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
79716
79877
|
SurveyElement.prototype.setVisibleIndex = function (index) {
|
79717
79878
|
return 0;
|
79718
79879
|
};
|
79719
|
-
Object.defineProperty(SurveyElement.prototype, "isPage", {
|
79720
|
-
/**
|
79721
|
-
* Returns `true` if the survey element is a page.
|
79722
|
-
* @see Base.getType
|
79723
|
-
*/
|
79724
|
-
get: function () {
|
79725
|
-
return false;
|
79726
|
-
},
|
79727
|
-
enumerable: false,
|
79728
|
-
configurable: true
|
79729
|
-
});
|
79730
|
-
Object.defineProperty(SurveyElement.prototype, "isPanel", {
|
79731
|
-
/**
|
79732
|
-
* Returns `true` if the survey element is a panel.
|
79733
|
-
* @see Base.getType
|
79734
|
-
*/
|
79735
|
-
get: function () {
|
79736
|
-
return false;
|
79737
|
-
},
|
79738
|
-
enumerable: false,
|
79739
|
-
configurable: true
|
79740
|
-
});
|
79741
|
-
Object.defineProperty(SurveyElement.prototype, "isQuestion", {
|
79742
|
-
/**
|
79743
|
-
* Returns `true` if the survey element is a question.
|
79744
|
-
* @see Base.getType
|
79745
|
-
*/
|
79746
|
-
get: function () {
|
79747
|
-
return false;
|
79748
|
-
},
|
79749
|
-
enumerable: false,
|
79750
|
-
configurable: true
|
79751
|
-
});
|
79752
79880
|
SurveyElement.prototype.delete = function (doDispose) { };
|
79753
79881
|
/**
|
79754
79882
|
* Returns the survey's [locale](https://surveyjs.io/form-library/documentation/surveymodel#locale).
|
@@ -82216,6 +82344,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
82216
82344
|
*
|
82217
82345
|
* You can override this property for individual Long Text questions: [`autoGrow`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#autoGrow).
|
82218
82346
|
* @see allowResizeComment
|
82347
|
+
* @see commentAreaRows
|
82219
82348
|
*/
|
82220
82349
|
get: function () {
|
82221
82350
|
return this.getPropertyValue("autoGrowComment");
|
@@ -82234,6 +82363,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
82234
82363
|
*
|
82235
82364
|
* You can override this property for individual Long Text questions: [`allowResize`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#allowResize).
|
82236
82365
|
* @see autoGrowComment
|
82366
|
+
* @see commentAreaRows
|
82237
82367
|
*/
|
82238
82368
|
get: function () {
|
82239
82369
|
return this.getPropertyValue("allowResizeComment");
|
@@ -82244,6 +82374,25 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
82244
82374
|
enumerable: false,
|
82245
82375
|
configurable: true
|
82246
82376
|
});
|
82377
|
+
Object.defineProperty(SurveyModel.prototype, "commentAreaRows", {
|
82378
|
+
/**
|
82379
|
+
* 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.
|
82380
|
+
*
|
82381
|
+
* Default value: 2
|
82382
|
+
*
|
82383
|
+
* The value of this property is passed on to the `rows` attribute of the underlying `<textarea>` element.
|
82384
|
+
* @see autoGrowComment
|
82385
|
+
* @see allowResizeComment
|
82386
|
+
*/
|
82387
|
+
get: function () {
|
82388
|
+
return this.getPropertyValue("commentAreaRows");
|
82389
|
+
},
|
82390
|
+
set: function (val) {
|
82391
|
+
this.setPropertyValue("commentAreaRows", val);
|
82392
|
+
},
|
82393
|
+
enumerable: false,
|
82394
|
+
configurable: true
|
82395
|
+
});
|
82247
82396
|
Object.defineProperty(SurveyModel.prototype, "textUpdateMode", {
|
82248
82397
|
/**
|
82249
82398
|
* Specifies when to update the question value in questions with a text input field.
|
@@ -82375,6 +82524,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
82375
82524
|
this.localeChanged();
|
82376
82525
|
this.onLocaleChangedEvent.fire(this, this.locale);
|
82377
82526
|
};
|
82527
|
+
Object.defineProperty(SurveyModel.prototype, "localeDir", {
|
82528
|
+
get: function () {
|
82529
|
+
return _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].localeDirections[this.locale];
|
82530
|
+
},
|
82531
|
+
enumerable: false,
|
82532
|
+
configurable: true
|
82533
|
+
});
|
82378
82534
|
/**
|
82379
82535
|
* Returns an array of locales whose translations are used in the survey.
|
82380
82536
|
*
|
@@ -83606,6 +83762,30 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
83606
83762
|
this.runConditions();
|
83607
83763
|
this.updateAllQuestionsValue(clearData);
|
83608
83764
|
};
|
83765
|
+
Object.defineProperty(SurveyModel.prototype, "isSurvey", {
|
83766
|
+
get: function () { return true; },
|
83767
|
+
enumerable: false,
|
83768
|
+
configurable: true
|
83769
|
+
});
|
83770
|
+
/**
|
83771
|
+
* Returns an object with survey results.
|
83772
|
+
*
|
83773
|
+
* If you want to get a survey results object that mirrors the survey structure, call the `getData()` method with an object that has the `includePages` and `includePanels` properties enabled. Without this object, the `getData()` method returns the [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property value.
|
83774
|
+
*
|
83775
|
+
* ```js
|
83776
|
+
* import { Model } from "survey-core";
|
83777
|
+
*
|
83778
|
+
* const surveyJson = { ... };
|
83779
|
+
* const survey = new Model(surveyJson);
|
83780
|
+
* survey.getData({ includePages: true, includePanels: true });
|
83781
|
+
* ```
|
83782
|
+
*/
|
83783
|
+
SurveyModel.prototype.getData = function (options) {
|
83784
|
+
var opt = options || { includePages: false, includePanels: false };
|
83785
|
+
if (!opt.includePages && !opt.includePanels)
|
83786
|
+
return this.data;
|
83787
|
+
return this.getStructuredData(!!opt.includePages, !opt.includePanels ? (opt.includePages ? 1 : 0) : -1);
|
83788
|
+
};
|
83609
83789
|
SurveyModel.prototype.getStructuredData = function (includePages, level) {
|
83610
83790
|
if (includePages === void 0) { includePages = true; }
|
83611
83791
|
if (level === void 0) { level = -1; }
|
@@ -88996,6 +89176,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
88996
89176
|
},
|
88997
89177
|
{ name: "autoGrowComment:boolean", default: false },
|
88998
89178
|
{ name: "allowResizeComment:boolean", default: true },
|
89179
|
+
{ name: "commentAreaRows:number", minValue: 1 },
|
88999
89180
|
{
|
89000
89181
|
name: "startSurveyText",
|
89001
89182
|
serializationProperty: "locStartSurveyText",
|
@@ -89147,6 +89328,7 @@ var surveyLocalization = {
|
|
89147
89328
|
defaultLocaleValue: "en",
|
89148
89329
|
locales: {},
|
89149
89330
|
localeNames: {},
|
89331
|
+
localeDirections: {},
|
89150
89332
|
supportedLocales: [],
|
89151
89333
|
get currentLocale() {
|
89152
89334
|
return this.currentLocaleValue === this.defaultLocaleValue ? "" : this.currentLocaleValue;
|