survey-core 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.fontless.css +130 -39
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +2 -1
- package/i18n/arabic.js.map +1 -1
- package/i18n/arabic.min.js +2 -2
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +2 -2
- package/i18n/dutch.js.map +1 -1
- package/i18n/dutch.min.js +2 -2
- package/i18n/english.js +1 -1
- package/i18n/english.min.js +1 -1
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/index.js +3 -2
- package/i18n/index.js.map +1 -1
- package/i18n/index.min.js +2 -2
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/nl-BE.js +2 -2
- package/i18n/nl-BE.js.map +1 -1
- package/i18n/nl-BE.min.js +2 -2
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/philippines.js +1 -1
- package/i18n/philippines.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js +1 -1
- package/modern.css +26 -1
- package/modern.css.map +1 -1
- package/modern.fontless.css +26 -1
- package/modern.fontless.css.map +1 -1
- package/modern.fontless.min.css +2 -2
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/plugins/bootstrap-integration.js +1 -1
- package/plugins/bootstrap-integration.min.js +1 -1
- package/plugins/bootstrap-material-integration.js +1 -1
- package/plugins/bootstrap-material-integration.min.js +1 -1
- package/survey.core.js +299 -118
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +33 -1
- package/survey.css.map +1 -1
- package/survey.i18n.js +3 -2
- package/survey.i18n.js.map +1 -1
- package/survey.i18n.min.js +2 -2
- package/survey.min.css +2 -2
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js +1 -1
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js +1 -1
- package/themes/borderless-light-panelless..js +1 -1
- package/themes/borderless-light-panelless..min.js +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js +1 -1
- package/ts3.4/typings/actions/action.d.ts +8 -1
- package/ts3.4/typings/base-interfaces.d.ts +1 -0
- package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +1 -0
- package/ts3.4/typings/dragdrop/choices.d.ts +1 -0
- package/ts3.4/typings/dragdrop/ranking-choices.d.ts +1 -1
- package/ts3.4/typings/dropdownListModel.d.ts +0 -1
- package/ts3.4/typings/list.d.ts +2 -0
- package/ts3.4/typings/martixBase.d.ts +1 -0
- package/ts3.4/typings/panel.d.ts +2 -0
- package/ts3.4/typings/question.d.ts +4 -1
- package/ts3.4/typings/question_baseselect.d.ts +9 -0
- package/ts3.4/typings/question_checkbox.d.ts +1 -0
- package/ts3.4/typings/question_custom.d.ts +19 -2
- package/ts3.4/typings/question_expression.d.ts +1 -1
- package/ts3.4/typings/question_matrixdropdown.d.ts +2 -0
- package/ts3.4/typings/question_matrixdropdownbase.d.ts +5 -1
- package/ts3.4/typings/question_paneldynamic.d.ts +1 -1
- package/ts3.4/typings/question_ranking.d.ts +1 -4
- package/ts3.4/typings/question_rating.d.ts +8 -3
- package/ts3.4/typings/settings.d.ts +9 -2
- package/ts3.4/typings/survey-element.d.ts +20 -15
- package/ts3.4/typings/survey-events-api.d.ts +1 -0
- package/ts3.4/typings/survey.d.ts +31 -0
- package/ts3.4/typings/surveyStrings.d.ts +3 -0
- package/typings/actions/action.d.ts +8 -1
- package/typings/base-interfaces.d.ts +1 -0
- package/typings/defaultCss/defaultV2Css.d.ts +1 -0
- package/typings/dragdrop/choices.d.ts +1 -0
- package/typings/dragdrop/ranking-choices.d.ts +1 -1
- package/typings/dropdownListModel.d.ts +0 -1
- package/typings/knockout/kobase.d.ts +8 -8
- package/typings/knockout/kopage.d.ts +37 -37
- package/typings/list.d.ts +2 -0
- package/typings/martixBase.d.ts +1 -0
- package/typings/panel.d.ts +2 -0
- package/typings/question.d.ts +4 -1
- package/typings/question_baseselect.d.ts +9 -0
- package/typings/question_checkbox.d.ts +1 -0
- package/typings/question_custom.d.ts +19 -2
- package/typings/question_expression.d.ts +1 -1
- package/typings/question_matrixdropdown.d.ts +2 -0
- package/typings/question_matrixdropdownbase.d.ts +5 -1
- package/typings/question_paneldynamic.d.ts +1 -1
- package/typings/question_ranking.d.ts +1 -4
- package/typings/question_rating.d.ts +8 -3
- package/typings/settings.d.ts +9 -2
- package/typings/survey-element.d.ts +20 -15
- package/typings/survey-events-api.d.ts +1 -0
- package/typings/survey.d.ts +32 -0
- package/typings/surveyStrings.d.ts +3 -0
package/survey.core.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();
|
|
@@ -9811,8 +9840,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9811
9840
|
|
|
9812
9841
|
var Version;
|
|
9813
9842
|
var ReleaseDate;
|
|
9814
|
-
Version = "" + "1.11.
|
|
9815
|
-
ReleaseDate = "" + "2024-
|
|
9843
|
+
Version = "" + "1.11.6";
|
|
9844
|
+
ReleaseDate = "" + "2024-07-10";
|
|
9816
9845
|
function checkLibraryVersion(ver, libraryName) {
|
|
9817
9846
|
if (Version != ver) {
|
|
9818
9847
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -17442,7 +17471,7 @@ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\
|
|
|
17442
17471
|
/*! no static exports found */
|
|
17443
17472
|
/***/ (function(module, exports) {
|
|
17444
17473
|
|
|
17445
|
-
module.exports = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><
|
|
17474
|
+
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>"
|
|
17446
17475
|
|
|
17447
17476
|
/***/ }),
|
|
17448
17477
|
|
|
@@ -19981,7 +20010,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
19981
20010
|
JsonObject.prototype.toJsonObjectCore = function (obj, property, options) {
|
|
19982
20011
|
if (!obj || !obj.getType)
|
|
19983
20012
|
return obj;
|
|
19984
|
-
if (typeof obj.getData === "function")
|
|
20013
|
+
if (!obj.isSurvey && typeof obj.getData === "function")
|
|
19985
20014
|
return obj.getData();
|
|
19986
20015
|
var result = {};
|
|
19987
20016
|
if (property != null && !property.className) {
|
|
@@ -20307,6 +20336,7 @@ var defaultListCss = {
|
|
|
20307
20336
|
searchClearButtonIcon: "sv-list__filter-clear-button",
|
|
20308
20337
|
loadingIndicator: "sv-list__loading-indicator",
|
|
20309
20338
|
itemSelected: "sv-list__item--selected",
|
|
20339
|
+
itemGroup: "sv-list__item--group",
|
|
20310
20340
|
itemWithIcon: "sv-list__item--with-icon",
|
|
20311
20341
|
itemDisabled: "sv-list__item--disabled",
|
|
20312
20342
|
itemFocused: "sv-list__item--focused",
|
|
@@ -20372,6 +20402,7 @@ var ListModel = /** @class */ (function (_super) {
|
|
|
20372
20402
|
.append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
|
|
20373
20403
|
.append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
|
|
20374
20404
|
.append(_this.cssClasses.itemSelected, _this.isItemSelected(itemValue))
|
|
20405
|
+
.append(_this.cssClasses.itemGroup, itemValue.hasSubItems)
|
|
20375
20406
|
.append(_this.cssClasses.itemHovered, itemValue.isHovered)
|
|
20376
20407
|
.append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
|
|
20377
20408
|
.append(itemValue.css)
|
|
@@ -21700,11 +21731,15 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
21700
21731
|
};
|
|
21701
21732
|
QuestionMatrixBaseModel.prototype.updateVisibilityBasedOnRows = function () {
|
|
21702
21733
|
if (this.hideIfRowsEmpty) {
|
|
21703
|
-
this.
|
|
21704
|
-
this.rows.length > 0 &&
|
|
21705
|
-
(!this.filteredRows || this.filteredRows.length > 0);
|
|
21734
|
+
this.onVisibleChanged();
|
|
21706
21735
|
}
|
|
21707
21736
|
};
|
|
21737
|
+
QuestionMatrixBaseModel.prototype.isVisibleCore = function () {
|
|
21738
|
+
var res = _super.prototype.isVisibleCore.call(this);
|
|
21739
|
+
if (!res || !this.hideIfRowsEmpty)
|
|
21740
|
+
return res;
|
|
21741
|
+
return this.rows.length > 0 && (!this.filteredRows || this.filteredRows.length > 0);
|
|
21742
|
+
};
|
|
21708
21743
|
QuestionMatrixBaseModel.prototype.shouldRunColumnExpression = function () {
|
|
21709
21744
|
return !this.survey || !this.survey.areInvisibleElementsShowing;
|
|
21710
21745
|
};
|
|
@@ -21747,6 +21782,7 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
21747
21782
|
: null;
|
|
21748
21783
|
this.filteredRows = [];
|
|
21749
21784
|
var hasChanged = _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].runConditionsForItems(this.rows, this.filteredRows, runner, values, properties, !showInvisibile);
|
|
21785
|
+
_itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].runEnabledConditionsForItems(this.rows, undefined, values, properties);
|
|
21750
21786
|
if (this.filteredRows.length === this.rows.length) {
|
|
21751
21787
|
this.filteredRows = null;
|
|
21752
21788
|
}
|
|
@@ -23106,6 +23142,8 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
|
23106
23142
|
InputMaskNumeric.prototype.validateNumber = function (number, matchWholeMask) {
|
|
23107
23143
|
var min = this.min || Number.MIN_SAFE_INTEGER;
|
|
23108
23144
|
var max = this.max || Number.MAX_SAFE_INTEGER;
|
|
23145
|
+
if (this.numericalCompositionIsEmpty(number))
|
|
23146
|
+
return true;
|
|
23109
23147
|
if (this.min !== undefined || this.max !== undefined) {
|
|
23110
23148
|
var value = this.convertNumber(number);
|
|
23111
23149
|
if (Number.isNaN(value)) {
|
|
@@ -25381,6 +25419,23 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
25381
25419
|
return this.parent.getQuestionTitleLocation();
|
|
25382
25420
|
return this.survey ? this.survey.questionTitleLocation : "top";
|
|
25383
25421
|
};
|
|
25422
|
+
PanelModelBase.prototype.availableQuestionTitleWidth = function () {
|
|
25423
|
+
var questionTitleLocation = this.getQuestionTitleLocation();
|
|
25424
|
+
if (questionTitleLocation === "left")
|
|
25425
|
+
return true;
|
|
25426
|
+
return this.hasElementWithTitleLocationLeft();
|
|
25427
|
+
};
|
|
25428
|
+
PanelModelBase.prototype.hasElementWithTitleLocationLeft = function () {
|
|
25429
|
+
var result = this.elements.some(function (el) {
|
|
25430
|
+
if (el instanceof PanelModelBase) {
|
|
25431
|
+
return el.hasElementWithTitleLocationLeft();
|
|
25432
|
+
}
|
|
25433
|
+
else if (el instanceof _question__WEBPACK_IMPORTED_MODULE_4__["Question"]) {
|
|
25434
|
+
return el.getTitleLocation() === "left";
|
|
25435
|
+
}
|
|
25436
|
+
});
|
|
25437
|
+
return result;
|
|
25438
|
+
};
|
|
25384
25439
|
PanelModelBase.prototype.getQuestionTitleWidth = function () {
|
|
25385
25440
|
return this.questionTitleWidth || this.parent && this.parent.getQuestionTitleWidth();
|
|
25386
25441
|
};
|
|
@@ -26333,7 +26388,7 @@ var PanelModel = /** @class */ (function (_super) {
|
|
|
26333
26388
|
var _this = this;
|
|
26334
26389
|
var locTitleValue = _super.prototype.createLocTitleProperty.call(this);
|
|
26335
26390
|
locTitleValue.onGetTextCallback = function (text) {
|
|
26336
|
-
if (!text && (_this.state !== "default")) {
|
|
26391
|
+
if (!text && (_this.state !== "default" || (_this.isDesignMode && _this.isDefaultV2Theme))) {
|
|
26337
26392
|
text = _this.name;
|
|
26338
26393
|
}
|
|
26339
26394
|
return text;
|
|
@@ -26496,7 +26551,10 @@ var PanelModel = /** @class */ (function (_super) {
|
|
|
26496
26551
|
};
|
|
26497
26552
|
Object.defineProperty(PanelModel.prototype, "cssTitle", {
|
|
26498
26553
|
get: function () {
|
|
26499
|
-
return
|
|
26554
|
+
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
|
|
26555
|
+
.append(this.getCssTitle(this.cssClasses.panel))
|
|
26556
|
+
.append(this.cssClasses.panel.titleHidden, !this.title && this.isDesignMode)
|
|
26557
|
+
.toString();
|
|
26500
26558
|
},
|
|
26501
26559
|
enumerable: false,
|
|
26502
26560
|
configurable: true
|
|
@@ -26591,7 +26649,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panelbase", [
|
|
|
26591
26649
|
{
|
|
26592
26650
|
name: "questionTitleWidth",
|
|
26593
26651
|
visibleIf: function (obj) {
|
|
26594
|
-
return !!obj && obj["
|
|
26652
|
+
return !!obj && obj["availableQuestionTitleWidth"]();
|
|
26595
26653
|
}
|
|
26596
26654
|
},
|
|
26597
26655
|
{
|
|
@@ -28337,7 +28395,7 @@ var ProgressButtons = /** @class */ (function (_super) {
|
|
|
28337
28395
|
Object.defineProperty(ProgressButtons.prototype, "progressWidth", {
|
|
28338
28396
|
get: function () {
|
|
28339
28397
|
if (this.isFitToSurveyWidth) {
|
|
28340
|
-
return this.survey.
|
|
28398
|
+
return this.survey.renderedWidth;
|
|
28341
28399
|
}
|
|
28342
28400
|
return "";
|
|
28343
28401
|
},
|
|
@@ -28517,6 +28575,9 @@ var TriggerExpressionInfo = /** @class */ (function () {
|
|
|
28517
28575
|
}
|
|
28518
28576
|
return TriggerExpressionInfo;
|
|
28519
28577
|
}());
|
|
28578
|
+
function querySelectorIncludingSelf(el, selector) {
|
|
28579
|
+
return el.querySelector(selector) || el != _global_variables_utils__WEBPACK_IMPORTED_MODULE_14__["DomWindowHelper"].getWindow() && el.matches(selector) && el;
|
|
28580
|
+
}
|
|
28520
28581
|
/**
|
|
28521
28582
|
* A base class for all questions.
|
|
28522
28583
|
*/
|
|
@@ -29020,9 +29081,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
29020
29081
|
if (!this.setValueExpressionRunner) {
|
|
29021
29082
|
this.setValueExpressionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_6__["ExpressionRunner"](this.setValueExpression);
|
|
29022
29083
|
this.setValueExpressionRunner.onRunComplete = function (res) {
|
|
29023
|
-
|
|
29024
|
-
_this.value = res;
|
|
29025
|
-
}
|
|
29084
|
+
_this.runExpressionSetValue(res);
|
|
29026
29085
|
};
|
|
29027
29086
|
}
|
|
29028
29087
|
else {
|
|
@@ -30081,7 +30140,8 @@ var Question = /** @class */ (function (_super) {
|
|
|
30081
30140
|
var isParentReadOnly = !!this.parent && this.parent.isReadOnly;
|
|
30082
30141
|
var isPareQuestionReadOnly = !!this.parentQuestion && this.parentQuestion.isReadOnly;
|
|
30083
30142
|
var isSurveyReadOnly = !!this.survey && this.survey.isDisplayMode;
|
|
30084
|
-
|
|
30143
|
+
var callbackVal = !!this.readOnlyCallback && this.readOnlyCallback();
|
|
30144
|
+
return this.readOnly || isParentReadOnly || isSurveyReadOnly || isPareQuestionReadOnly || callbackVal;
|
|
30085
30145
|
},
|
|
30086
30146
|
enumerable: false,
|
|
30087
30147
|
configurable: true
|
|
@@ -30240,6 +30300,13 @@ var Question = /** @class */ (function (_super) {
|
|
|
30240
30300
|
return undefined;
|
|
30241
30301
|
return this.survey.runExpression(expression);
|
|
30242
30302
|
};
|
|
30303
|
+
Object.defineProperty(Question.prototype, "commentAreaRows", {
|
|
30304
|
+
get: function () {
|
|
30305
|
+
return this.survey && this.survey.commentAreaRows;
|
|
30306
|
+
},
|
|
30307
|
+
enumerable: false,
|
|
30308
|
+
configurable: true
|
|
30309
|
+
});
|
|
30243
30310
|
Object.defineProperty(Question.prototype, "autoGrowComment", {
|
|
30244
30311
|
get: function () {
|
|
30245
30312
|
return this.survey && this.survey.autoGrowComment;
|
|
@@ -30794,7 +30861,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
30794
30861
|
if (values === void 0) { values = null; }
|
|
30795
30862
|
if (properties === void 0) { properties = null; }
|
|
30796
30863
|
var func = function (val) {
|
|
30797
|
-
_this.
|
|
30864
|
+
_this.runExpressionSetValueCore(val, setFunc);
|
|
30798
30865
|
};
|
|
30799
30866
|
if (!this.runDefaultValueExpression(runner, values, properties, func)) {
|
|
30800
30867
|
func(defaultValue);
|
|
@@ -30803,9 +30870,17 @@ var Question = /** @class */ (function (_super) {
|
|
|
30803
30870
|
Question.prototype.convertFuncValuetoQuestionValue = function (val) {
|
|
30804
30871
|
return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].convertValToQuestionVal(val);
|
|
30805
30872
|
};
|
|
30806
|
-
Question.prototype.
|
|
30873
|
+
Question.prototype.runExpressionSetValueCore = function (val, setFunc) {
|
|
30807
30874
|
setFunc(this.convertFuncValuetoQuestionValue(val));
|
|
30808
30875
|
};
|
|
30876
|
+
Question.prototype.runExpressionSetValue = function (val) {
|
|
30877
|
+
var _this = this;
|
|
30878
|
+
this.runExpressionSetValueCore(val, function (val) {
|
|
30879
|
+
if (!_this.isTwoValueEquals(_this.value, val)) {
|
|
30880
|
+
_this.value = val;
|
|
30881
|
+
}
|
|
30882
|
+
});
|
|
30883
|
+
};
|
|
30809
30884
|
Question.prototype.runDefaultValueExpression = function (runner, values, properties, setFunc) {
|
|
30810
30885
|
var _this = this;
|
|
30811
30886
|
if (values === void 0) { values = null; }
|
|
@@ -30814,11 +30889,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
30814
30889
|
return false;
|
|
30815
30890
|
if (!setFunc) {
|
|
30816
30891
|
setFunc = function (val) {
|
|
30817
|
-
_this.runExpressionSetValue(val
|
|
30818
|
-
if (!_this.isTwoValueEquals(_this.value, val)) {
|
|
30819
|
-
_this.value = val;
|
|
30820
|
-
}
|
|
30821
|
-
});
|
|
30892
|
+
_this.runExpressionSetValue(val);
|
|
30822
30893
|
};
|
|
30823
30894
|
}
|
|
30824
30895
|
if (!values)
|
|
@@ -31435,7 +31506,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
31435
31506
|
var scrollableSelector_1 = this.getObservedElementSelector();
|
|
31436
31507
|
if (!scrollableSelector_1)
|
|
31437
31508
|
return;
|
|
31438
|
-
var defaultRootEl = el
|
|
31509
|
+
var defaultRootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
|
|
31439
31510
|
if (!defaultRootEl)
|
|
31440
31511
|
return;
|
|
31441
31512
|
var isProcessed_1 = false;
|
|
@@ -31447,7 +31518,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
31447
31518
|
isProcessed_1 = false;
|
|
31448
31519
|
}
|
|
31449
31520
|
var callback = function () {
|
|
31450
|
-
var rootEl = el
|
|
31521
|
+
var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
|
|
31451
31522
|
if (!requiredWidth_1 && _this.isDefaultRendering()) {
|
|
31452
31523
|
requiredWidth_1 = rootEl.scrollWidth;
|
|
31453
31524
|
}
|
|
@@ -31472,8 +31543,10 @@ var Question = /** @class */ (function (_super) {
|
|
|
31472
31543
|
});
|
|
31473
31544
|
this.onMobileChangedCallback = function () {
|
|
31474
31545
|
setTimeout(function () {
|
|
31475
|
-
var rootEl = el
|
|
31476
|
-
|
|
31546
|
+
var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
|
|
31547
|
+
if (rootEl) {
|
|
31548
|
+
_this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
|
|
31549
|
+
}
|
|
31477
31550
|
}, 0);
|
|
31478
31551
|
};
|
|
31479
31552
|
this.resizeObserver.observe(el);
|
|
@@ -32106,6 +32179,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
32106
32179
|
_this.isUpdatingChoicesDependedQuestions = false;
|
|
32107
32180
|
_this.headItemsCount = 0;
|
|
32108
32181
|
_this.footItemsCount = 0;
|
|
32182
|
+
_this.allowMultiColumns = true;
|
|
32109
32183
|
_this.prevIsOtherSelected = false;
|
|
32110
32184
|
_this.noneItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].noneItemValue, "noneText", "noneItemText");
|
|
32111
32185
|
_this.refuseItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].refuseItemValue, "refuseText", "refuseItemText");
|
|
@@ -34126,9 +34200,23 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
34126
34200
|
enumerable: false,
|
|
34127
34201
|
configurable: true
|
|
34128
34202
|
});
|
|
34203
|
+
QuestionSelectBase.prototype.getObservedElementSelector = function () {
|
|
34204
|
+
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["classesToSelector"])(this.cssClasses.mainRoot);
|
|
34205
|
+
};
|
|
34206
|
+
QuestionSelectBase.prototype.supportResponsiveness = function () {
|
|
34207
|
+
return true;
|
|
34208
|
+
};
|
|
34209
|
+
QuestionSelectBase.prototype.onBeforeSetCompactRenderer = function () {
|
|
34210
|
+
_super.prototype.onBeforeSetDesktopRenderer.call(this);
|
|
34211
|
+
this.allowMultiColumns = false;
|
|
34212
|
+
};
|
|
34213
|
+
QuestionSelectBase.prototype.onBeforeSetDesktopRenderer = function () {
|
|
34214
|
+
_super.prototype.onBeforeSetDesktopRenderer.call(this);
|
|
34215
|
+
this.allowMultiColumns = true;
|
|
34216
|
+
};
|
|
34129
34217
|
Object.defineProperty(QuestionSelectBase.prototype, "hasColumns", {
|
|
34130
34218
|
get: function () {
|
|
34131
|
-
return !this.isMobile &&
|
|
34219
|
+
return !this.isMobile && this.allowMultiColumns &&
|
|
34132
34220
|
(this.getCurrentColCount() > 1);
|
|
34133
34221
|
},
|
|
34134
34222
|
enumerable: false,
|
|
@@ -34245,6 +34333,10 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
34245
34333
|
Object.defineProperty(QuestionSelectBase.prototype, "itemComponent", {
|
|
34246
34334
|
/**
|
|
34247
34335
|
* The name of a component used to render items.
|
|
34336
|
+
*
|
|
34337
|
+
* [View Dropdown Demo](https://surveyjs.io/form-library/examples/dropdown-box-with-custom-items/ (linkStyle))
|
|
34338
|
+
*
|
|
34339
|
+
* [View Ranking Demo](https://surveyjs.io/form-library/examples/dropdown-box-with-custom-items/ (linkStyle))
|
|
34248
34340
|
*/
|
|
34249
34341
|
get: function () {
|
|
34250
34342
|
return this.getPropertyValue("itemComponent", this.getDefaultItemComponent());
|
|
@@ -34282,6 +34374,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
34282
34374
|
__decorate([
|
|
34283
34375
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ localizable: true })
|
|
34284
34376
|
], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
|
|
34377
|
+
__decorate([
|
|
34378
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
34379
|
+
], QuestionSelectBase.prototype, "allowMultiColumns", void 0);
|
|
34285
34380
|
return QuestionSelectBase;
|
|
34286
34381
|
}(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));
|
|
34287
34382
|
|
|
@@ -35511,7 +35606,8 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
35511
35606
|
if (!itemValues.length && !selectedItemValues) {
|
|
35512
35607
|
this.updateSelectedItemValues();
|
|
35513
35608
|
}
|
|
35514
|
-
|
|
35609
|
+
var validValues = this.validateItemValues(itemValues);
|
|
35610
|
+
return validValues;
|
|
35515
35611
|
},
|
|
35516
35612
|
enumerable: false,
|
|
35517
35613
|
configurable: true
|
|
@@ -35969,7 +36065,14 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
35969
36065
|
});
|
|
35970
36066
|
Object.defineProperty(QuestionCheckboxModel.prototype, "a11y_input_ariaRole", {
|
|
35971
36067
|
get: function () {
|
|
35972
|
-
return "
|
|
36068
|
+
return "group";
|
|
36069
|
+
},
|
|
36070
|
+
enumerable: false,
|
|
36071
|
+
configurable: true
|
|
36072
|
+
});
|
|
36073
|
+
Object.defineProperty(QuestionCheckboxModel.prototype, "a11y_input_ariaRequired", {
|
|
36074
|
+
get: function () {
|
|
36075
|
+
return null;
|
|
35973
36076
|
},
|
|
35974
36077
|
enumerable: false,
|
|
35975
36078
|
configurable: true
|
|
@@ -36321,9 +36424,12 @@ var ComponentQuestionJSON = /** @class */ (function () {
|
|
|
36321
36424
|
this.json.onUpdateQuestionCssClasses(question, element, css);
|
|
36322
36425
|
};
|
|
36323
36426
|
ComponentQuestionJSON.prototype.onSetQuestionValue = function (question, newValue) {
|
|
36324
|
-
if (
|
|
36325
|
-
|
|
36326
|
-
|
|
36427
|
+
if (this.json.onSetQuestionValue) {
|
|
36428
|
+
this.json.onSetQuestionValue(question, newValue);
|
|
36429
|
+
}
|
|
36430
|
+
if (this.json.onValueSet) {
|
|
36431
|
+
this.json.onValueSet(question, newValue);
|
|
36432
|
+
}
|
|
36327
36433
|
};
|
|
36328
36434
|
ComponentQuestionJSON.prototype.onPropertyChanged = function (question, propertyName, newValue) {
|
|
36329
36435
|
if (!this.json.onPropertyChanged)
|
|
@@ -37714,7 +37820,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
|
37714
37820
|
return _super.prototype.hasUnknownValue.call(this, val, true, false);
|
|
37715
37821
|
};
|
|
37716
37822
|
QuestionDropdownModel.prototype.getItemIfChoicesNotContainThisValue = function (value, text) {
|
|
37717
|
-
if (this.choicesLazyLoadEnabled
|
|
37823
|
+
if (this.choicesLazyLoadEnabled) {
|
|
37718
37824
|
return this.createItemValue(value, text);
|
|
37719
37825
|
}
|
|
37720
37826
|
else {
|
|
@@ -41813,6 +41919,8 @@ var MatrixDropdownRowModel = /** @class */ (function (_super) {
|
|
|
41813
41919
|
enumerable: false,
|
|
41814
41920
|
configurable: true
|
|
41815
41921
|
});
|
|
41922
|
+
MatrixDropdownRowModel.prototype.isRowEnabled = function () { return this.item.isEnabled; };
|
|
41923
|
+
MatrixDropdownRowModel.prototype.isRowHasEnabledCondition = function () { return !!this.item.enableIf; };
|
|
41816
41924
|
return MatrixDropdownRowModel;
|
|
41817
41925
|
}(_question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownRowModelBase"]));
|
|
41818
41926
|
|
|
@@ -42111,7 +42219,9 @@ var MatrixDropdownCell = /** @class */ (function () {
|
|
|
42111
42219
|
this.question.locStrsChanged();
|
|
42112
42220
|
};
|
|
42113
42221
|
MatrixDropdownCell.prototype.createQuestion = function (column, row, data) {
|
|
42222
|
+
var _this = this;
|
|
42114
42223
|
var res = data.createQuestion(this.row, this.column);
|
|
42224
|
+
res.readOnlyCallback = function () { return !_this.row.isRowEnabled(); };
|
|
42115
42225
|
res.validateValueCallback = function () {
|
|
42116
42226
|
return data.validateCell(row, column.name, row.value);
|
|
42117
42227
|
};
|
|
@@ -42297,6 +42407,8 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
42297
42407
|
enumerable: false,
|
|
42298
42408
|
configurable: true
|
|
42299
42409
|
});
|
|
42410
|
+
MatrixDropdownRowModelBase.prototype.isRowEnabled = function () { return true; };
|
|
42411
|
+
MatrixDropdownRowModelBase.prototype.isRowHasEnabledCondition = function () { return false; };
|
|
42300
42412
|
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "value", {
|
|
42301
42413
|
get: function () {
|
|
42302
42414
|
var result = {};
|
|
@@ -42473,6 +42585,9 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
42473
42585
|
if (!!this.detailPanel) {
|
|
42474
42586
|
this.detailPanel.runCondition(values, newProps);
|
|
42475
42587
|
}
|
|
42588
|
+
if (this.isRowHasEnabledCondition()) {
|
|
42589
|
+
this.onQuestionReadOnlyChanged();
|
|
42590
|
+
}
|
|
42476
42591
|
};
|
|
42477
42592
|
MatrixDropdownRowModelBase.prototype.getNamesWithDefaultValues = function () {
|
|
42478
42593
|
var res = [];
|
|
@@ -42727,14 +42842,15 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
42727
42842
|
return;
|
|
42728
42843
|
this.updateCellOnColumnItemValueChanged(cell, propertyName, obj, name, newValue, oldValue);
|
|
42729
42844
|
};
|
|
42730
|
-
MatrixDropdownRowModelBase.prototype.onQuestionReadOnlyChanged = function (
|
|
42845
|
+
MatrixDropdownRowModelBase.prototype.onQuestionReadOnlyChanged = function () {
|
|
42731
42846
|
var questions = this.questions;
|
|
42732
42847
|
for (var i = 0; i < questions.length; i++) {
|
|
42733
42848
|
var q = questions[i];
|
|
42734
42849
|
q.setPropertyValue("isReadOnly", q.isReadOnly);
|
|
42735
42850
|
}
|
|
42736
42851
|
if (!!this.detailPanel) {
|
|
42737
|
-
this.
|
|
42852
|
+
var parentIsReadOnly = !!this.data && this.data.isMatrixReadOnly();
|
|
42853
|
+
this.detailPanel.readOnly = parentIsReadOnly || !this.isRowEnabled();
|
|
42738
42854
|
}
|
|
42739
42855
|
};
|
|
42740
42856
|
MatrixDropdownRowModelBase.prototype.hasErrors = function (fireCallback, rec, raiseOnCompletedAsyncValidators) {
|
|
@@ -43997,7 +44113,8 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
43997
44113
|
return questionPlainData;
|
|
43998
44114
|
};
|
|
43999
44115
|
QuestionMatrixDropdownModelBase.prototype.addConditionObjectsByContext = function (objects, context) {
|
|
44000
|
-
var
|
|
44116
|
+
var hasColumnContext = !!context && this.columns.indexOf(context) > -1;
|
|
44117
|
+
var hasContext = context === true || hasColumnContext;
|
|
44001
44118
|
var rowsIndeces = this.getConditionObjectsRowIndeces();
|
|
44002
44119
|
if (hasContext) {
|
|
44003
44120
|
rowsIndeces.push(-1);
|
|
@@ -44024,6 +44141,11 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
44024
44141
|
if (index === -1 && context === true) {
|
|
44025
44142
|
obj.context = this;
|
|
44026
44143
|
}
|
|
44144
|
+
else {
|
|
44145
|
+
if (hasColumnContext && prefixName.startsWith("row.")) {
|
|
44146
|
+
obj.context = context;
|
|
44147
|
+
}
|
|
44148
|
+
}
|
|
44027
44149
|
objects.push(obj);
|
|
44028
44150
|
}
|
|
44029
44151
|
}
|
|
@@ -44289,14 +44411,17 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
44289
44411
|
var _this = this;
|
|
44290
44412
|
duplicatedRows.forEach(function (row) {
|
|
44291
44413
|
var question = row.getQuestionByName(columnName);
|
|
44292
|
-
|
|
44414
|
+
var inDetailPanel = _this.detailPanel.getQuestionByName(columnName);
|
|
44415
|
+
if (!question && inDetailPanel) {
|
|
44293
44416
|
row.showDetailPanel();
|
|
44294
44417
|
if (row.detailPanel) {
|
|
44295
44418
|
question = row.detailPanel.getQuestionByName(columnName);
|
|
44296
44419
|
}
|
|
44297
44420
|
}
|
|
44298
44421
|
if (question) {
|
|
44299
|
-
|
|
44422
|
+
if (inDetailPanel) {
|
|
44423
|
+
row.showDetailPanel();
|
|
44424
|
+
}
|
|
44300
44425
|
_this.addDuplicationError(question);
|
|
44301
44426
|
}
|
|
44302
44427
|
});
|
|
@@ -44358,7 +44483,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
44358
44483
|
if (!this.generateRows)
|
|
44359
44484
|
return;
|
|
44360
44485
|
for (var i = 0; i < this.visibleRows.length; i++) {
|
|
44361
|
-
this.visibleRows[i].onQuestionReadOnlyChanged(
|
|
44486
|
+
this.visibleRows[i].onQuestionReadOnlyChanged();
|
|
44362
44487
|
}
|
|
44363
44488
|
};
|
|
44364
44489
|
//IMatrixDropdownData
|
|
@@ -44584,7 +44709,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
44584
44709
|
if (this.isDesignMode)
|
|
44585
44710
|
return this.detailPanel;
|
|
44586
44711
|
var panel = this.createNewDetailPanel();
|
|
44587
|
-
panel.readOnly = this.isReadOnly;
|
|
44712
|
+
panel.readOnly = this.isReadOnly || !row.isRowEnabled();
|
|
44588
44713
|
panel.setSurveyImpl(row);
|
|
44589
44714
|
var json = this.detailPanel.toJSON();
|
|
44590
44715
|
new _jsonobject__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]().toObject(json, panel);
|
|
@@ -44624,6 +44749,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
44624
44749
|
return data.getTextProcessor();
|
|
44625
44750
|
return null;
|
|
44626
44751
|
};
|
|
44752
|
+
QuestionMatrixDropdownModelBase.prototype.isMatrixReadOnly = function () { return this.isReadOnly; };
|
|
44627
44753
|
QuestionMatrixDropdownModelBase.prototype.getQuestionFromArray = function (name, index) {
|
|
44628
44754
|
if (index >= this.visibleRows.length)
|
|
44629
44755
|
return null;
|
|
@@ -44702,6 +44828,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownb
|
|
|
44702
44828
|
visible: false,
|
|
44703
44829
|
isLightSerializable: false,
|
|
44704
44830
|
},
|
|
44831
|
+
{ name: "columnsVisibleIf", visible: false },
|
|
44705
44832
|
{
|
|
44706
44833
|
name: "detailPanelMode",
|
|
44707
44834
|
choices: ["none", "underRow", "underRowSingle"],
|
|
@@ -51396,9 +51523,10 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
51396
51523
|
}
|
|
51397
51524
|
return -1;
|
|
51398
51525
|
};
|
|
51399
|
-
QuestionPanelDynamicModel.prototype.
|
|
51400
|
-
|
|
51401
|
-
|
|
51526
|
+
QuestionPanelDynamicModel.prototype.getPanelVisibleIndexById = function (id) {
|
|
51527
|
+
var visPanels = this.visiblePanelsCore;
|
|
51528
|
+
for (var i = 0; i < visPanels.length; i++) {
|
|
51529
|
+
if (visPanels[i].id === id)
|
|
51402
51530
|
return i;
|
|
51403
51531
|
}
|
|
51404
51532
|
return -1;
|
|
@@ -52313,14 +52441,14 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
52313
52441
|
return options.title;
|
|
52314
52442
|
};
|
|
52315
52443
|
locTitle.sharedData = this.locTemplateTabTitle;
|
|
52316
|
-
var isActive = this.
|
|
52444
|
+
var isActive = this.getPanelVisibleIndexById(panel.id) === this.currentIndex;
|
|
52317
52445
|
var newItem = new _actions_action__WEBPACK_IMPORTED_MODULE_11__["Action"]({
|
|
52318
52446
|
id: panel.id,
|
|
52319
52447
|
pressed: isActive,
|
|
52320
52448
|
locTitle: locTitle,
|
|
52321
52449
|
disableHide: isActive,
|
|
52322
52450
|
action: function () {
|
|
52323
|
-
_this.currentIndex = _this.
|
|
52451
|
+
_this.currentIndex = _this.getPanelVisibleIndexById(newItem.id);
|
|
52324
52452
|
}
|
|
52325
52453
|
});
|
|
52326
52454
|
return newItem;
|
|
@@ -52817,13 +52945,14 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52817
52945
|
if (_this.allowStartDrag &&
|
|
52818
52946
|
_this.canStartDragDueMaxSelectedChoices(target) &&
|
|
52819
52947
|
_this.canStartDragDueItemEnabled(choice)) {
|
|
52820
|
-
_this.
|
|
52948
|
+
_this.draggedChoiceValue = choice.value;
|
|
52821
52949
|
_this.draggedTargetNode = node;
|
|
52822
52950
|
_this.dragOrClickHelper.onPointerDown(event);
|
|
52823
52951
|
}
|
|
52824
52952
|
};
|
|
52825
52953
|
_this.startDrag = function (event) {
|
|
52826
|
-
|
|
52954
|
+
var choice = _itemvalue__WEBPACK_IMPORTED_MODULE_2__["ItemValue"].getItemByValue(_this.activeChoices, _this.draggedChoiceValue);
|
|
52955
|
+
_this.dragDropRankingChoices.startDrag(event, choice, _this, _this.draggedTargetNode);
|
|
52827
52956
|
};
|
|
52828
52957
|
_this.handlePointerUp = function (event, choice, node) {
|
|
52829
52958
|
if (!_this.selectToRankEnabled)
|
|
@@ -52996,6 +53125,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52996
53125
|
QuestionRankingModel.prototype.onSurveyLoad = function () {
|
|
52997
53126
|
this.blockAnimations();
|
|
52998
53127
|
_super.prototype.onSurveyLoad.call(this);
|
|
53128
|
+
this.updateRankingChoices();
|
|
52999
53129
|
this.releaseAnimations();
|
|
53000
53130
|
};
|
|
53001
53131
|
QuestionRankingModel.prototype.addToValueByVisibleChoices = function () {
|
|
@@ -53301,9 +53431,6 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
53301
53431
|
enumerable: false,
|
|
53302
53432
|
configurable: true
|
|
53303
53433
|
});
|
|
53304
|
-
/**
|
|
53305
|
-
* The name of a component used to render items.
|
|
53306
|
-
*/
|
|
53307
53434
|
QuestionRankingModel.prototype.getDefaultItemComponent = function () {
|
|
53308
53435
|
return "sv-ranking-item";
|
|
53309
53436
|
};
|
|
@@ -54268,20 +54395,11 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
54268
54395
|
if (this.scaleColorMode === "monochrome" && this.rateColorMode == "default" ||
|
|
54269
54396
|
this.isPreviewStyle ||
|
|
54270
54397
|
this.isReadOnlyStyle)
|
|
54271
|
-
return {
|
|
54398
|
+
return {};
|
|
54272
54399
|
var index = this.visibleRateValues.indexOf(item);
|
|
54273
54400
|
var color = this.getRenderedItemColor(index, false);
|
|
54274
|
-
|
|
54275
|
-
|
|
54276
|
-
if (highlight == "highlighted" && this.scaleColorMode === "colored")
|
|
54277
|
-
return { borderColor: color, fill: color, backgroundColor: colorLight };
|
|
54278
|
-
if (this.scaleColorMode === "colored" && this.errors.length == 0)
|
|
54279
|
-
return { borderColor: color, fill: color, backgroundColor: null };
|
|
54280
|
-
return { borderColor: null, fill: null, backgroundColor: null };
|
|
54281
|
-
}
|
|
54282
|
-
else {
|
|
54283
|
-
return { borderColor: color, fill: null, backgroundColor: color };
|
|
54284
|
-
}
|
|
54401
|
+
var colorLight = highlight == "highlighted" && this.scaleColorMode === "colored" && this.getRenderedItemColor(index, true);
|
|
54402
|
+
return colorLight ? { "--sd-rating-item-color": color, "--sd-rating-item-color-light": colorLight } : { "--sd-rating-item-color": color };
|
|
54285
54403
|
};
|
|
54286
54404
|
QuestionRatingModel.prototype.getItemClass = function (item, highlight) {
|
|
54287
54405
|
var _this = this;
|
|
@@ -55467,8 +55585,7 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
55467
55585
|
}
|
|
55468
55586
|
};
|
|
55469
55587
|
QuestionTagboxModel.prototype.getItemIfChoicesNotContainThisValue = function (value, text) {
|
|
55470
|
-
|
|
55471
|
-
if (this.choicesLazyLoadEnabled && !((_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.isAllDataLoaded)) {
|
|
55588
|
+
if (this.choicesLazyLoadEnabled) {
|
|
55472
55589
|
return this.createItemValue(value, text);
|
|
55473
55590
|
}
|
|
55474
55591
|
else {
|
|
@@ -56291,7 +56408,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
56291
56408
|
if (this.inputTextAlignment !== "auto") {
|
|
56292
56409
|
style.textAlign = this.inputTextAlignment;
|
|
56293
56410
|
}
|
|
56294
|
-
else if (this.maskSettings.getTextAlignment() !== "auto") {
|
|
56411
|
+
else if (!this.maskTypeIsEmpty && this.maskSettings.getTextAlignment() !== "auto") {
|
|
56295
56412
|
style.textAlign = this.maskSettings.getTextAlignment();
|
|
56296
56413
|
}
|
|
56297
56414
|
};
|
|
@@ -57506,11 +57623,18 @@ var settings = {
|
|
|
57506
57623
|
*/
|
|
57507
57624
|
ratingMaximumRateValueCount: 20,
|
|
57508
57625
|
/**
|
|
57509
|
-
* Specifies whether to close the drop-down menu of a [
|
|
57626
|
+
* 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.
|
|
57510
57627
|
*
|
|
57511
|
-
* This setting applies to all
|
|
57628
|
+
* 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.
|
|
57512
57629
|
*/
|
|
57513
57630
|
tagboxCloseOnSelect: false,
|
|
57631
|
+
/**
|
|
57632
|
+
* 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`.
|
|
57633
|
+
*
|
|
57634
|
+
* Default value: 500
|
|
57635
|
+
*
|
|
57636
|
+
* [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
|
|
57637
|
+
*/
|
|
57514
57638
|
dropdownSearchDelay: 500,
|
|
57515
57639
|
/**
|
|
57516
57640
|
* A function that activates a browser confirm dialog.
|
|
@@ -58293,6 +58417,42 @@ var SurveyElementCore = /** @class */ (function (_super) {
|
|
|
58293
58417
|
SurveyElementCore.prototype.createLocTitleProperty = function () {
|
|
58294
58418
|
return this.createLocalizableString("title", this, true);
|
|
58295
58419
|
};
|
|
58420
|
+
Object.defineProperty(SurveyElementCore.prototype, "isPage", {
|
|
58421
|
+
/**
|
|
58422
|
+
* Returns `true` if the survey element is a page.
|
|
58423
|
+
* @see Base.getType
|
|
58424
|
+
*/
|
|
58425
|
+
get: function () { return false; },
|
|
58426
|
+
enumerable: false,
|
|
58427
|
+
configurable: true
|
|
58428
|
+
});
|
|
58429
|
+
Object.defineProperty(SurveyElementCore.prototype, "isPanel", {
|
|
58430
|
+
/**
|
|
58431
|
+
* Returns `true` if the survey element is a panel.
|
|
58432
|
+
* @see Base.getType
|
|
58433
|
+
*/
|
|
58434
|
+
get: function () { return false; },
|
|
58435
|
+
enumerable: false,
|
|
58436
|
+
configurable: true
|
|
58437
|
+
});
|
|
58438
|
+
Object.defineProperty(SurveyElementCore.prototype, "isQuestion", {
|
|
58439
|
+
/**
|
|
58440
|
+
* Returns `true` if the survey element is a question.
|
|
58441
|
+
* @see Base.getType
|
|
58442
|
+
*/
|
|
58443
|
+
get: function () { return false; },
|
|
58444
|
+
enumerable: false,
|
|
58445
|
+
configurable: true
|
|
58446
|
+
});
|
|
58447
|
+
Object.defineProperty(SurveyElementCore.prototype, "isSurvey", {
|
|
58448
|
+
/**
|
|
58449
|
+
* Returns `true` if the element is a survey.
|
|
58450
|
+
* @see Base.getType
|
|
58451
|
+
*/
|
|
58452
|
+
get: function () { return false; },
|
|
58453
|
+
enumerable: false,
|
|
58454
|
+
configurable: true
|
|
58455
|
+
});
|
|
58296
58456
|
Object.defineProperty(SurveyElementCore.prototype, "title", {
|
|
58297
58457
|
/**
|
|
58298
58458
|
* A title for the survey element. If `title` is undefined, the `name` property value is displayed instead.
|
|
@@ -59124,39 +59284,6 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
59124
59284
|
SurveyElement.prototype.setVisibleIndex = function (index) {
|
|
59125
59285
|
return 0;
|
|
59126
59286
|
};
|
|
59127
|
-
Object.defineProperty(SurveyElement.prototype, "isPage", {
|
|
59128
|
-
/**
|
|
59129
|
-
* Returns `true` if the survey element is a page.
|
|
59130
|
-
* @see Base.getType
|
|
59131
|
-
*/
|
|
59132
|
-
get: function () {
|
|
59133
|
-
return false;
|
|
59134
|
-
},
|
|
59135
|
-
enumerable: false,
|
|
59136
|
-
configurable: true
|
|
59137
|
-
});
|
|
59138
|
-
Object.defineProperty(SurveyElement.prototype, "isPanel", {
|
|
59139
|
-
/**
|
|
59140
|
-
* Returns `true` if the survey element is a panel.
|
|
59141
|
-
* @see Base.getType
|
|
59142
|
-
*/
|
|
59143
|
-
get: function () {
|
|
59144
|
-
return false;
|
|
59145
|
-
},
|
|
59146
|
-
enumerable: false,
|
|
59147
|
-
configurable: true
|
|
59148
|
-
});
|
|
59149
|
-
Object.defineProperty(SurveyElement.prototype, "isQuestion", {
|
|
59150
|
-
/**
|
|
59151
|
-
* Returns `true` if the survey element is a question.
|
|
59152
|
-
* @see Base.getType
|
|
59153
|
-
*/
|
|
59154
|
-
get: function () {
|
|
59155
|
-
return false;
|
|
59156
|
-
},
|
|
59157
|
-
enumerable: false,
|
|
59158
|
-
configurable: true
|
|
59159
|
-
});
|
|
59160
59287
|
SurveyElement.prototype.delete = function (doDispose) { };
|
|
59161
59288
|
/**
|
|
59162
59289
|
* Returns the survey's [locale](https://surveyjs.io/form-library/documentation/surveymodel#locale).
|
|
@@ -61624,6 +61751,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61624
61751
|
*
|
|
61625
61752
|
* You can override this property for individual Long Text questions: [`autoGrow`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#autoGrow).
|
|
61626
61753
|
* @see allowResizeComment
|
|
61754
|
+
* @see commentAreaRows
|
|
61627
61755
|
*/
|
|
61628
61756
|
get: function () {
|
|
61629
61757
|
return this.getPropertyValue("autoGrowComment");
|
|
@@ -61642,6 +61770,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61642
61770
|
*
|
|
61643
61771
|
* You can override this property for individual Long Text questions: [`allowResize`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#allowResize).
|
|
61644
61772
|
* @see autoGrowComment
|
|
61773
|
+
* @see commentAreaRows
|
|
61645
61774
|
*/
|
|
61646
61775
|
get: function () {
|
|
61647
61776
|
return this.getPropertyValue("allowResizeComment");
|
|
@@ -61652,6 +61781,25 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61652
61781
|
enumerable: false,
|
|
61653
61782
|
configurable: true
|
|
61654
61783
|
});
|
|
61784
|
+
Object.defineProperty(SurveyModel.prototype, "commentAreaRows", {
|
|
61785
|
+
/**
|
|
61786
|
+
* 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.
|
|
61787
|
+
*
|
|
61788
|
+
* Default value: 2
|
|
61789
|
+
*
|
|
61790
|
+
* The value of this property is passed on to the `rows` attribute of the underlying `<textarea>` element.
|
|
61791
|
+
* @see autoGrowComment
|
|
61792
|
+
* @see allowResizeComment
|
|
61793
|
+
*/
|
|
61794
|
+
get: function () {
|
|
61795
|
+
return this.getPropertyValue("commentAreaRows");
|
|
61796
|
+
},
|
|
61797
|
+
set: function (val) {
|
|
61798
|
+
this.setPropertyValue("commentAreaRows", val);
|
|
61799
|
+
},
|
|
61800
|
+
enumerable: false,
|
|
61801
|
+
configurable: true
|
|
61802
|
+
});
|
|
61655
61803
|
Object.defineProperty(SurveyModel.prototype, "textUpdateMode", {
|
|
61656
61804
|
/**
|
|
61657
61805
|
* Specifies when to update the question value in questions with a text input field.
|
|
@@ -61783,6 +61931,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61783
61931
|
this.localeChanged();
|
|
61784
61932
|
this.onLocaleChangedEvent.fire(this, this.locale);
|
|
61785
61933
|
};
|
|
61934
|
+
Object.defineProperty(SurveyModel.prototype, "localeDir", {
|
|
61935
|
+
get: function () {
|
|
61936
|
+
return _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].localeDirections[this.locale];
|
|
61937
|
+
},
|
|
61938
|
+
enumerable: false,
|
|
61939
|
+
configurable: true
|
|
61940
|
+
});
|
|
61786
61941
|
/**
|
|
61787
61942
|
* Returns an array of locales whose translations are used in the survey.
|
|
61788
61943
|
*
|
|
@@ -63014,6 +63169,30 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
63014
63169
|
this.runConditions();
|
|
63015
63170
|
this.updateAllQuestionsValue(clearData);
|
|
63016
63171
|
};
|
|
63172
|
+
Object.defineProperty(SurveyModel.prototype, "isSurvey", {
|
|
63173
|
+
get: function () { return true; },
|
|
63174
|
+
enumerable: false,
|
|
63175
|
+
configurable: true
|
|
63176
|
+
});
|
|
63177
|
+
/**
|
|
63178
|
+
* Returns an object with survey results.
|
|
63179
|
+
*
|
|
63180
|
+
* 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.
|
|
63181
|
+
*
|
|
63182
|
+
* ```js
|
|
63183
|
+
* import { Model } from "survey-core";
|
|
63184
|
+
*
|
|
63185
|
+
* const surveyJson = { ... };
|
|
63186
|
+
* const survey = new Model(surveyJson);
|
|
63187
|
+
* survey.getData({ includePages: true, includePanels: true });
|
|
63188
|
+
* ```
|
|
63189
|
+
*/
|
|
63190
|
+
SurveyModel.prototype.getData = function (options) {
|
|
63191
|
+
var opt = options || { includePages: false, includePanels: false };
|
|
63192
|
+
if (!opt.includePages && !opt.includePanels)
|
|
63193
|
+
return this.data;
|
|
63194
|
+
return this.getStructuredData(!!opt.includePages, !opt.includePanels ? (opt.includePages ? 1 : 0) : -1);
|
|
63195
|
+
};
|
|
63017
63196
|
SurveyModel.prototype.getStructuredData = function (includePages, level) {
|
|
63018
63197
|
if (includePages === void 0) { includePages = true; }
|
|
63019
63198
|
if (level === void 0) { level = -1; }
|
|
@@ -68404,6 +68583,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
|
68404
68583
|
},
|
|
68405
68584
|
{ name: "autoGrowComment:boolean", default: false },
|
|
68406
68585
|
{ name: "allowResizeComment:boolean", default: true },
|
|
68586
|
+
{ name: "commentAreaRows:number", minValue: 1 },
|
|
68407
68587
|
{
|
|
68408
68588
|
name: "startSurveyText",
|
|
68409
68589
|
serializationProperty: "locStartSurveyText",
|
|
@@ -68555,6 +68735,7 @@ var surveyLocalization = {
|
|
|
68555
68735
|
defaultLocaleValue: "en",
|
|
68556
68736
|
locales: {},
|
|
68557
68737
|
localeNames: {},
|
|
68738
|
+
localeDirections: {},
|
|
68558
68739
|
supportedLocales: [],
|
|
68559
68740
|
get currentLocale() {
|
|
68560
68741
|
return this.currentLocaleValue === this.defaultLocaleValue ? "" : this.currentLocaleValue;
|