survey-core 1.11.3 → 1.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/defaultV2.css +175 -48
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +175 -48
- 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 +1 -1
- package/i18n/dutch.min.js +1 -1
- 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 +2 -1
- 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 +1 -1
- package/i18n/nl-BE.min.js +1 -1
- 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 +305 -143
- 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 +2 -1
- 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 +2 -1
- package/ts3.4/typings/base-interfaces.d.ts +1 -0
- package/ts3.4/typings/defaultCss/cssmodern.d.ts +1 -0
- package/ts3.4/typings/defaultCss/cssstandard.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 +2 -0
- package/ts3.4/typings/global_variables_utils.d.ts +3 -0
- package/ts3.4/typings/list.d.ts +2 -0
- package/ts3.4/typings/martixBase.d.ts +1 -0
- package/ts3.4/typings/mask/mask_base.d.ts +3 -0
- package/ts3.4/typings/panel.d.ts +4 -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_boolean.d.ts +0 -4
- 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_ranking.d.ts +2 -6
- package/ts3.4/typings/question_rating.d.ts +8 -3
- package/ts3.4/typings/settings.d.ts +10 -2
- package/ts3.4/typings/survey-events-api.d.ts +1 -0
- package/ts3.4/typings/survey.d.ts +16 -1
- package/ts3.4/typings/surveyStrings.d.ts +3 -0
- package/ts3.4/typings/utils/devices.d.ts +4 -0
- package/typings/actions/action.d.ts +2 -1
- package/typings/base-interfaces.d.ts +1 -0
- package/typings/defaultCss/cssmodern.d.ts +1 -0
- package/typings/defaultCss/cssstandard.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 +2 -0
- package/typings/global_variables_utils.d.ts +3 -0
- package/typings/list.d.ts +2 -0
- package/typings/martixBase.d.ts +1 -0
- package/typings/mask/mask_base.d.ts +3 -0
- package/typings/panel.d.ts +4 -0
- package/typings/question.d.ts +4 -1
- package/typings/question_baseselect.d.ts +9 -0
- package/typings/question_boolean.d.ts +0 -4
- 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_ranking.d.ts +2 -7
- package/typings/question_rating.d.ts +8 -3
- package/typings/settings.d.ts +10 -2
- package/typings/survey-events-api.d.ts +1 -0
- package/typings/survey.d.ts +17 -1
- package/typings/surveyStrings.d.ts +3 -0
- package/typings/utils/devices.d.ts +4 -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.5
|
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -909,6 +909,13 @@ var BaseAction = /** @class */ (function (_super) {
|
|
|
909
909
|
enumerable: false,
|
|
910
910
|
configurable: true
|
|
911
911
|
});
|
|
912
|
+
Object.defineProperty(BaseAction.prototype, "hasSubItems", {
|
|
913
|
+
get: function () {
|
|
914
|
+
return !!this.items && this.items.length > 0;
|
|
915
|
+
},
|
|
916
|
+
enumerable: false,
|
|
917
|
+
configurable: true
|
|
918
|
+
});
|
|
912
919
|
BaseAction.prototype.getActionBarItemTitleCss = function () {
|
|
913
920
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
|
|
914
921
|
.append(this.cssClasses.itemTitle)
|
|
@@ -1095,11 +1102,13 @@ var Action = /** @class */ (function (_super) {
|
|
|
1095
1102
|
Action.prototype.createLocTitle = function () {
|
|
1096
1103
|
return this.createLocalizableString("title", this, true);
|
|
1097
1104
|
};
|
|
1098
|
-
Action.prototype.
|
|
1105
|
+
Action.prototype.setSubItems = function (options) {
|
|
1099
1106
|
this.markerIconName = "icon-next_16x16";
|
|
1100
1107
|
this.component = "sv-list-item-group";
|
|
1101
|
-
this.items = __spreadArray([], items);
|
|
1102
|
-
var
|
|
1108
|
+
this.items = __spreadArray([], options.items);
|
|
1109
|
+
var listOptions = Object.assign({}, options);
|
|
1110
|
+
listOptions.searchEnabled = false;
|
|
1111
|
+
var popupModel = createPopupModelWithListModel(listOptions, { horizontalPosition: "right", showPointer: false, canShrink: false });
|
|
1103
1112
|
popupModel.cssClass = "sv-popup-inner";
|
|
1104
1113
|
this.popupModel = popupModel;
|
|
1105
1114
|
};
|
|
@@ -1650,9 +1659,6 @@ var ActionContainer = /** @class */ (function (_super) {
|
|
|
1650
1659
|
itemValue.showPopupDelayed(_this.subItemsShowDelay);
|
|
1651
1660
|
_this.popupAfterShowCallback(itemValue);
|
|
1652
1661
|
}
|
|
1653
|
-
else if (!!action.popupModel && action.popupModel.isVisible) {
|
|
1654
|
-
action.hidePopupDelayed(_this.subItemsHideDelay);
|
|
1655
|
-
}
|
|
1656
1662
|
});
|
|
1657
1663
|
};
|
|
1658
1664
|
ActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
|
|
@@ -2925,7 +2931,8 @@ var Base = /** @class */ (function () {
|
|
|
2925
2931
|
configurable: true
|
|
2926
2932
|
});
|
|
2927
2933
|
Base.prototype.afterRerender = function () {
|
|
2928
|
-
|
|
2934
|
+
var _a;
|
|
2935
|
+
(_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this, undefined);
|
|
2929
2936
|
};
|
|
2930
2937
|
Base.currentDependencis = undefined;
|
|
2931
2938
|
return Base;
|
|
@@ -4639,6 +4646,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4639
4646
|
|
|
4640
4647
|
var modernCss = {
|
|
4641
4648
|
root: "sv-root-modern",
|
|
4649
|
+
rootProgress: "sv-progress",
|
|
4642
4650
|
timerRoot: "sv-body__timer",
|
|
4643
4651
|
container: "sv-container-modern",
|
|
4644
4652
|
header: "sv-title sv-container-modern__title",
|
|
@@ -5106,6 +5114,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5106
5114
|
|
|
5107
5115
|
var defaultStandardCss = {
|
|
5108
5116
|
root: "sv_main sv_default_css",
|
|
5117
|
+
rootProgress: "sv_progress",
|
|
5109
5118
|
container: "sv_container",
|
|
5110
5119
|
header: "sv_header",
|
|
5111
5120
|
bodyContainer: "sv-components-row",
|
|
@@ -5549,6 +5558,7 @@ var surveyCss = {
|
|
|
5549
5558
|
};
|
|
5550
5559
|
var defaultV2Css = {
|
|
5551
5560
|
root: "sd-root-modern",
|
|
5561
|
+
rootProgress: "sd-progress",
|
|
5552
5562
|
rootMobile: "sd-root-modern--mobile",
|
|
5553
5563
|
rootAnimationDisabled: "sd-root-modern--animation-disabled",
|
|
5554
5564
|
rootReadOnly: "sd-root--readonly",
|
|
@@ -6939,12 +6949,12 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
|
6939
6949
|
if (!draggedElementShortcut)
|
|
6940
6950
|
return;
|
|
6941
6951
|
// draggedElementShortcut.innerText = text;
|
|
6942
|
-
draggedElementShortcut.
|
|
6952
|
+
draggedElementShortcut.className = "sv-drag-drop-choices-shortcut";
|
|
6943
6953
|
var isDeepClone = true;
|
|
6944
6954
|
var clone = (draggedElementNode
|
|
6945
6955
|
.closest("[data-sv-drop-target-item-value]")
|
|
6946
6956
|
.cloneNode(isDeepClone));
|
|
6947
|
-
clone.
|
|
6957
|
+
clone.classList.add("sv-drag-drop-choices-shortcut__content");
|
|
6948
6958
|
var dragIcon = clone.querySelector(".svc-item-value-controls__drag-icon");
|
|
6949
6959
|
dragIcon.style.visibility = "visible";
|
|
6950
6960
|
var removeIcon = clone.querySelector(".svc-item-value-controls__remove");
|
|
@@ -6958,6 +6968,9 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
|
6958
6968
|
draggedElementShortcut.shortcutXOffset = event.clientX - rect.x;
|
|
6959
6969
|
draggedElementShortcut.shortcutYOffset = event.clientY - rect.y;
|
|
6960
6970
|
this.isBottom = null;
|
|
6971
|
+
if (typeof this.onShortcutCreated === "function") {
|
|
6972
|
+
this.onShortcutCreated(draggedElementShortcut);
|
|
6973
|
+
}
|
|
6961
6974
|
return draggedElementShortcut;
|
|
6962
6975
|
};
|
|
6963
6976
|
DragDropChoices.prototype.createImagePickerShortcut = function (item, text, draggedElementNode, event) {
|
|
@@ -7912,9 +7925,13 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7912
7925
|
}
|
|
7913
7926
|
return _super.prototype.calculateIsBottom.call(this, clientY);
|
|
7914
7927
|
};
|
|
7915
|
-
DragDropRankingChoices.prototype.
|
|
7928
|
+
DragDropRankingChoices.prototype.getIndices = function (model, fromChoicesArray, toChoicesArray) {
|
|
7916
7929
|
var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
|
7917
7930
|
var toIndex = toChoicesArray.indexOf(this.dropTarget);
|
|
7931
|
+
if (fromIndex < 0 && !!this.draggedElement) {
|
|
7932
|
+
this.draggedElement = _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].getItemByValue(fromChoicesArray, this.draggedElement.value) || this.draggedElement;
|
|
7933
|
+
fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
|
7934
|
+
}
|
|
7918
7935
|
if (toIndex === -1) {
|
|
7919
7936
|
var length_1 = model.value.length;
|
|
7920
7937
|
toIndex = length_1;
|
|
@@ -7932,7 +7949,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7932
7949
|
return { fromIndex: fromIndex, toIndex: toIndex };
|
|
7933
7950
|
};
|
|
7934
7951
|
DragDropRankingChoices.prototype.afterDragOver = function (dropTargetNode) {
|
|
7935
|
-
var _a = this.
|
|
7952
|
+
var _a = this.getIndices(this.parentElement, this.parentElement.rankingChoices, this.parentElement.rankingChoices), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
|
|
7936
7953
|
this.reorderRankedItem(this.parentElement, fromIndex, toIndex);
|
|
7937
7954
|
};
|
|
7938
7955
|
DragDropRankingChoices.prototype.updateDraggedElementShortcut = function (newIndex) {
|
|
@@ -8062,7 +8079,7 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
|
8062
8079
|
};
|
|
8063
8080
|
DragDropRankingSelectToRank.prototype.doRankBetween = function (dropTargetNode, fromChoicesArray, toChoicesArray, rankFunction) {
|
|
8064
8081
|
var questionModel = this.parentElement;
|
|
8065
|
-
var _a = this.
|
|
8082
|
+
var _a = this.getIndices(questionModel, fromChoicesArray, toChoicesArray), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
|
|
8066
8083
|
rankFunction(questionModel, fromIndex, toIndex, dropTargetNode);
|
|
8067
8084
|
};
|
|
8068
8085
|
Object.defineProperty(DragDropRankingSelectToRank.prototype, "isDraggedElementRanked", {
|
|
@@ -8161,6 +8178,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8161
8178
|
_this.onSelectionChanged = onSelectionChanged;
|
|
8162
8179
|
_this.minPageSize = 25;
|
|
8163
8180
|
_this.loadingItemHeight = 40;
|
|
8181
|
+
_this.timer = undefined;
|
|
8164
8182
|
_this._markdownMode = false;
|
|
8165
8183
|
_this.filteredItems = undefined;
|
|
8166
8184
|
_this.selectedItemSelector = ".sv-list__item--selected";
|
|
@@ -8215,28 +8233,43 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8215
8233
|
this.listModel.isAllDataLoaded = this.question.choicesLazyLoadEnabled && this.itemsSettings.items.length == this.itemsSettings.totalCount;
|
|
8216
8234
|
this.question.choices = this.itemsSettings.items;
|
|
8217
8235
|
};
|
|
8236
|
+
DropdownListModel.prototype.loadQuestionChoices = function (callbackAfterItemsLoaded) {
|
|
8237
|
+
var _this = this;
|
|
8238
|
+
this.isRunningLoadQuestionChoices = true;
|
|
8239
|
+
this.question.survey.loadQuestionChoices({
|
|
8240
|
+
question: this.question,
|
|
8241
|
+
filter: this.filterString,
|
|
8242
|
+
skip: this.itemsSettings.skip,
|
|
8243
|
+
take: this.itemsSettings.take,
|
|
8244
|
+
setItems: function (items, totalCount) {
|
|
8245
|
+
_this.isRunningLoadQuestionChoices = false;
|
|
8246
|
+
_this.setItems(items || [], totalCount || 0);
|
|
8247
|
+
_this.popupRecalculatePosition(_this.itemsSettings.skip === _this.itemsSettings.take);
|
|
8248
|
+
if (!!callbackAfterItemsLoaded) {
|
|
8249
|
+
callbackAfterItemsLoaded();
|
|
8250
|
+
}
|
|
8251
|
+
}
|
|
8252
|
+
});
|
|
8253
|
+
this.itemsSettings.skip += this.itemsSettings.take;
|
|
8254
|
+
};
|
|
8218
8255
|
DropdownListModel.prototype.updateQuestionChoices = function (callbackAfterItemsLoaded) {
|
|
8219
8256
|
var _this = this;
|
|
8220
8257
|
if (this.isRunningLoadQuestionChoices)
|
|
8221
8258
|
return;
|
|
8222
8259
|
var isUpdate = (this.itemsSettings.skip + 1) < this.itemsSettings.totalCount;
|
|
8223
8260
|
if (!this.itemsSettings.skip || isUpdate) {
|
|
8224
|
-
this.
|
|
8225
|
-
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
skip: this.itemsSettings.skip,
|
|
8229
|
-
take: this.itemsSettings.take,
|
|
8230
|
-
setItems: function (items, totalCount) {
|
|
8231
|
-
_this.isRunningLoadQuestionChoices = false;
|
|
8232
|
-
_this.setItems(items || [], totalCount || 0);
|
|
8233
|
-
_this.popupRecalculatePosition(_this.itemsSettings.skip === _this.itemsSettings.take);
|
|
8234
|
-
if (!!callbackAfterItemsLoaded) {
|
|
8235
|
-
callbackAfterItemsLoaded();
|
|
8236
|
-
}
|
|
8261
|
+
if (!!this.filterString && _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].dropdownSearchDelay > 0) {
|
|
8262
|
+
if (!!this.timer) {
|
|
8263
|
+
clearTimeout(this.timer);
|
|
8264
|
+
this.timer = undefined;
|
|
8237
8265
|
}
|
|
8238
|
-
|
|
8239
|
-
|
|
8266
|
+
this.timer = setTimeout(function () {
|
|
8267
|
+
_this.loadQuestionChoices(callbackAfterItemsLoaded);
|
|
8268
|
+
}, _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].dropdownSearchDelay);
|
|
8269
|
+
}
|
|
8270
|
+
else {
|
|
8271
|
+
this.loadQuestionChoices(callbackAfterItemsLoaded);
|
|
8272
|
+
}
|
|
8240
8273
|
}
|
|
8241
8274
|
};
|
|
8242
8275
|
DropdownListModel.prototype.updatePopupFocusFirstInputSelector = function () {
|
|
@@ -8579,7 +8612,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8579
8612
|
this.listModel.setItems(this.getAvailableItems());
|
|
8580
8613
|
};
|
|
8581
8614
|
DropdownListModel.prototype.onClick = function (event) {
|
|
8582
|
-
if (this.question.readOnly || this.question.isDesignMode || this.question.isPreviewStyle)
|
|
8615
|
+
if (this.question.readOnly || this.question.isDesignMode || this.question.isPreviewStyle || this.question.isReadOnlyAttr)
|
|
8583
8616
|
return;
|
|
8584
8617
|
this._popupModel.toggleVisibility();
|
|
8585
8618
|
this.focusItemOnClickAndPopup();
|
|
@@ -9791,8 +9824,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9791
9824
|
|
|
9792
9825
|
var Version;
|
|
9793
9826
|
var ReleaseDate;
|
|
9794
|
-
Version = "" + "1.11.
|
|
9795
|
-
ReleaseDate = "" + "2024-
|
|
9827
|
+
Version = "" + "1.11.5";
|
|
9828
|
+
ReleaseDate = "" + "2024-07-03";
|
|
9796
9829
|
function checkLibraryVersion(ver, libraryName) {
|
|
9797
9830
|
if (Version != ver) {
|
|
9798
9831
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -15894,6 +15927,11 @@ var DomWindowHelper = /** @class */ (function () {
|
|
|
15894
15927
|
return;
|
|
15895
15928
|
window.removeEventListener(type, listener);
|
|
15896
15929
|
};
|
|
15930
|
+
DomWindowHelper.matchMedia = function (mediaQueryString) {
|
|
15931
|
+
if (!DomWindowHelper.isAvailable() || typeof window.matchMedia === "undefined")
|
|
15932
|
+
return null;
|
|
15933
|
+
return window.matchMedia(mediaQueryString);
|
|
15934
|
+
};
|
|
15897
15935
|
return DomWindowHelper;
|
|
15898
15936
|
}());
|
|
15899
15937
|
|
|
@@ -17417,7 +17455,7 @@ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\
|
|
|
17417
17455
|
/*! no static exports found */
|
|
17418
17456
|
/***/ (function(module, exports) {
|
|
17419
17457
|
|
|
17420
|
-
module.exports = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><
|
|
17458
|
+
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>"
|
|
17421
17459
|
|
|
17422
17460
|
/***/ }),
|
|
17423
17461
|
|
|
@@ -20282,6 +20320,7 @@ var defaultListCss = {
|
|
|
20282
20320
|
searchClearButtonIcon: "sv-list__filter-clear-button",
|
|
20283
20321
|
loadingIndicator: "sv-list__loading-indicator",
|
|
20284
20322
|
itemSelected: "sv-list__item--selected",
|
|
20323
|
+
itemGroup: "sv-list__item--group",
|
|
20285
20324
|
itemWithIcon: "sv-list__item--with-icon",
|
|
20286
20325
|
itemDisabled: "sv-list__item--disabled",
|
|
20287
20326
|
itemFocused: "sv-list__item--focused",
|
|
@@ -20347,6 +20386,7 @@ var ListModel = /** @class */ (function (_super) {
|
|
|
20347
20386
|
.append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
|
|
20348
20387
|
.append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
|
|
20349
20388
|
.append(_this.cssClasses.itemSelected, _this.isItemSelected(itemValue))
|
|
20389
|
+
.append(_this.cssClasses.itemGroup, itemValue.hasSubItems)
|
|
20350
20390
|
.append(_this.cssClasses.itemHovered, itemValue.isHovered)
|
|
20351
20391
|
.append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
|
|
20352
20392
|
.append(itemValue.css)
|
|
@@ -21675,11 +21715,15 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
21675
21715
|
};
|
|
21676
21716
|
QuestionMatrixBaseModel.prototype.updateVisibilityBasedOnRows = function () {
|
|
21677
21717
|
if (this.hideIfRowsEmpty) {
|
|
21678
|
-
this.
|
|
21679
|
-
this.rows.length > 0 &&
|
|
21680
|
-
(!this.filteredRows || this.filteredRows.length > 0);
|
|
21718
|
+
this.onVisibleChanged();
|
|
21681
21719
|
}
|
|
21682
21720
|
};
|
|
21721
|
+
QuestionMatrixBaseModel.prototype.isVisibleCore = function () {
|
|
21722
|
+
var res = _super.prototype.isVisibleCore.call(this);
|
|
21723
|
+
if (!res || !this.hideIfRowsEmpty)
|
|
21724
|
+
return res;
|
|
21725
|
+
return this.rows.length > 0 && (!this.filteredRows || this.filteredRows.length > 0);
|
|
21726
|
+
};
|
|
21683
21727
|
QuestionMatrixBaseModel.prototype.shouldRunColumnExpression = function () {
|
|
21684
21728
|
return !this.survey || !this.survey.areInvisibleElementsShowing;
|
|
21685
21729
|
};
|
|
@@ -21722,6 +21766,7 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
21722
21766
|
: null;
|
|
21723
21767
|
this.filteredRows = [];
|
|
21724
21768
|
var hasChanged = _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].runConditionsForItems(this.rows, this.filteredRows, runner, values, properties, !showInvisibile);
|
|
21769
|
+
_itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].runEnabledConditionsForItems(this.rows, undefined, values, properties);
|
|
21725
21770
|
if (this.filteredRows.length === this.rows.length) {
|
|
21726
21771
|
this.filteredRows = null;
|
|
21727
21772
|
}
|
|
@@ -22023,6 +22068,10 @@ var InputMaskBase = /** @class */ (function (_super) {
|
|
|
22023
22068
|
function InputMaskBase() {
|
|
22024
22069
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
22025
22070
|
}
|
|
22071
|
+
InputMaskBase.prototype.getSurvey = function (live) {
|
|
22072
|
+
if (live === void 0) { live = false; }
|
|
22073
|
+
return this.owner;
|
|
22074
|
+
};
|
|
22026
22075
|
InputMaskBase.prototype.getType = function () {
|
|
22027
22076
|
return "masksettings";
|
|
22028
22077
|
};
|
|
@@ -24558,11 +24607,22 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24558
24607
|
});
|
|
24559
24608
|
PanelModelBase.prototype.delete = function (doDispose) {
|
|
24560
24609
|
if (doDispose === void 0) { doDispose = true; }
|
|
24610
|
+
this.deletePanel();
|
|
24561
24611
|
this.removeFromParent();
|
|
24562
24612
|
if (doDispose) {
|
|
24563
24613
|
this.dispose();
|
|
24564
24614
|
}
|
|
24565
24615
|
};
|
|
24616
|
+
PanelModelBase.prototype.deletePanel = function () {
|
|
24617
|
+
var els = this.elements;
|
|
24618
|
+
for (var i = 0; i < els.length; i++) {
|
|
24619
|
+
var el = els[i];
|
|
24620
|
+
if (el.isPanel) {
|
|
24621
|
+
el.deletePanel();
|
|
24622
|
+
}
|
|
24623
|
+
this.onRemoveElementNotifySurvey(el);
|
|
24624
|
+
}
|
|
24625
|
+
};
|
|
24566
24626
|
PanelModelBase.prototype.removeFromParent = function () { };
|
|
24567
24627
|
PanelModelBase.prototype.canShowTitle = function () { return true; };
|
|
24568
24628
|
Object.defineProperty(PanelModelBase.prototype, "_showDescription", {
|
|
@@ -25341,6 +25401,23 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
25341
25401
|
return this.parent.getQuestionTitleLocation();
|
|
25342
25402
|
return this.survey ? this.survey.questionTitleLocation : "top";
|
|
25343
25403
|
};
|
|
25404
|
+
PanelModelBase.prototype.availableQuestionTitleWidth = function () {
|
|
25405
|
+
var questionTitleLocation = this.getQuestionTitleLocation();
|
|
25406
|
+
if (questionTitleLocation === "left")
|
|
25407
|
+
return true;
|
|
25408
|
+
return this.hasElementWithTitleLocationLeft();
|
|
25409
|
+
};
|
|
25410
|
+
PanelModelBase.prototype.hasElementWithTitleLocationLeft = function () {
|
|
25411
|
+
var result = this.elements.some(function (el) {
|
|
25412
|
+
if (el instanceof PanelModelBase) {
|
|
25413
|
+
return el.hasElementWithTitleLocationLeft();
|
|
25414
|
+
}
|
|
25415
|
+
else if (el instanceof _question__WEBPACK_IMPORTED_MODULE_4__["Question"]) {
|
|
25416
|
+
return el.getTitleLocation() === "left";
|
|
25417
|
+
}
|
|
25418
|
+
});
|
|
25419
|
+
return result;
|
|
25420
|
+
};
|
|
25344
25421
|
PanelModelBase.prototype.getQuestionTitleWidth = function () {
|
|
25345
25422
|
return this.questionTitleWidth || this.parent && this.parent.getQuestionTitleWidth();
|
|
25346
25423
|
};
|
|
@@ -25547,17 +25624,20 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
25547
25624
|
this.updateRowsOnElementRemoved(element);
|
|
25548
25625
|
if (this.isRandomizing)
|
|
25549
25626
|
return;
|
|
25627
|
+
this.onRemoveElementNotifySurvey(element);
|
|
25628
|
+
if (!!this.removeElementCallback)
|
|
25629
|
+
this.removeElementCallback(element);
|
|
25630
|
+
this.onElementVisibilityChanged(this);
|
|
25631
|
+
};
|
|
25632
|
+
PanelModelBase.prototype.onRemoveElementNotifySurvey = function (element) {
|
|
25633
|
+
if (!this.survey)
|
|
25634
|
+
return;
|
|
25550
25635
|
if (!element.isPanel) {
|
|
25551
|
-
|
|
25552
|
-
this.survey.questionRemoved(element);
|
|
25636
|
+
this.survey.questionRemoved(element);
|
|
25553
25637
|
}
|
|
25554
25638
|
else {
|
|
25555
|
-
|
|
25556
|
-
this.survey.panelRemoved(element);
|
|
25639
|
+
this.survey.panelRemoved(element);
|
|
25557
25640
|
}
|
|
25558
|
-
if (!!this.removeElementCallback)
|
|
25559
|
-
this.removeElementCallback(element);
|
|
25560
|
-
this.onElementVisibilityChanged(this);
|
|
25561
25641
|
};
|
|
25562
25642
|
PanelModelBase.prototype.onElementVisibilityChanged = function (element) {
|
|
25563
25643
|
if (this.isLoadingFromJson || this.isRandomizing)
|
|
@@ -26548,7 +26628,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panelbase", [
|
|
|
26548
26628
|
{
|
|
26549
26629
|
name: "questionTitleWidth",
|
|
26550
26630
|
visibleIf: function (obj) {
|
|
26551
|
-
return !!obj && obj["
|
|
26631
|
+
return !!obj && obj["availableQuestionTitleWidth"]();
|
|
26552
26632
|
}
|
|
26553
26633
|
},
|
|
26554
26634
|
{
|
|
@@ -28275,7 +28355,8 @@ var ProgressButtons = /** @class */ (function (_super) {
|
|
|
28275
28355
|
return;
|
|
28276
28356
|
var listContainerElements = element.querySelectorAll(".sd-progress-buttons__connector");
|
|
28277
28357
|
var circleWidth = this.showItemNumbers ? 17 : 5;
|
|
28278
|
-
var
|
|
28358
|
+
var sideCorrection = this.survey.isMobile ? 0 : listContainerElement.children[0].clientWidth;
|
|
28359
|
+
var connectorWidth = (listContainerElement.clientWidth - sideCorrection) / (listContainerElement.children.length - 1) - circleWidth;
|
|
28279
28360
|
for (var i = 0; i < listContainerElements.length; i++) {
|
|
28280
28361
|
listContainerElements[i].style.width = connectorWidth + "px";
|
|
28281
28362
|
}
|
|
@@ -28293,7 +28374,7 @@ var ProgressButtons = /** @class */ (function (_super) {
|
|
|
28293
28374
|
Object.defineProperty(ProgressButtons.prototype, "progressWidth", {
|
|
28294
28375
|
get: function () {
|
|
28295
28376
|
if (this.isFitToSurveyWidth) {
|
|
28296
|
-
return this.survey.
|
|
28377
|
+
return this.survey.renderedWidth;
|
|
28297
28378
|
}
|
|
28298
28379
|
return "";
|
|
28299
28380
|
},
|
|
@@ -28473,6 +28554,9 @@ var TriggerExpressionInfo = /** @class */ (function () {
|
|
|
28473
28554
|
}
|
|
28474
28555
|
return TriggerExpressionInfo;
|
|
28475
28556
|
}());
|
|
28557
|
+
function querySelectorIncludingSelf(el, selector) {
|
|
28558
|
+
return el.querySelector(selector) || el != _global_variables_utils__WEBPACK_IMPORTED_MODULE_14__["DomWindowHelper"].getWindow() && el.matches(selector) && el;
|
|
28559
|
+
}
|
|
28476
28560
|
/**
|
|
28477
28561
|
* A base class for all questions.
|
|
28478
28562
|
*/
|
|
@@ -28976,9 +29060,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
28976
29060
|
if (!this.setValueExpressionRunner) {
|
|
28977
29061
|
this.setValueExpressionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_6__["ExpressionRunner"](this.setValueExpression);
|
|
28978
29062
|
this.setValueExpressionRunner.onRunComplete = function (res) {
|
|
28979
|
-
|
|
28980
|
-
_this.value = res;
|
|
28981
|
-
}
|
|
29063
|
+
_this.runExpressionSetValue(res);
|
|
28982
29064
|
};
|
|
28983
29065
|
}
|
|
28984
29066
|
else {
|
|
@@ -30037,7 +30119,8 @@ var Question = /** @class */ (function (_super) {
|
|
|
30037
30119
|
var isParentReadOnly = !!this.parent && this.parent.isReadOnly;
|
|
30038
30120
|
var isPareQuestionReadOnly = !!this.parentQuestion && this.parentQuestion.isReadOnly;
|
|
30039
30121
|
var isSurveyReadOnly = !!this.survey && this.survey.isDisplayMode;
|
|
30040
|
-
|
|
30122
|
+
var callbackVal = !!this.readOnlyCallback && this.readOnlyCallback();
|
|
30123
|
+
return this.readOnly || isParentReadOnly || isSurveyReadOnly || isPareQuestionReadOnly || callbackVal;
|
|
30041
30124
|
},
|
|
30042
30125
|
enumerable: false,
|
|
30043
30126
|
configurable: true
|
|
@@ -30196,6 +30279,13 @@ var Question = /** @class */ (function (_super) {
|
|
|
30196
30279
|
return undefined;
|
|
30197
30280
|
return this.survey.runExpression(expression);
|
|
30198
30281
|
};
|
|
30282
|
+
Object.defineProperty(Question.prototype, "commentAreaRows", {
|
|
30283
|
+
get: function () {
|
|
30284
|
+
return this.survey && this.survey.commentAreaRows;
|
|
30285
|
+
},
|
|
30286
|
+
enumerable: false,
|
|
30287
|
+
configurable: true
|
|
30288
|
+
});
|
|
30199
30289
|
Object.defineProperty(Question.prototype, "autoGrowComment", {
|
|
30200
30290
|
get: function () {
|
|
30201
30291
|
return this.survey && this.survey.autoGrowComment;
|
|
@@ -30750,7 +30840,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
30750
30840
|
if (values === void 0) { values = null; }
|
|
30751
30841
|
if (properties === void 0) { properties = null; }
|
|
30752
30842
|
var func = function (val) {
|
|
30753
|
-
_this.
|
|
30843
|
+
_this.runExpressionSetValueCore(val, setFunc);
|
|
30754
30844
|
};
|
|
30755
30845
|
if (!this.runDefaultValueExpression(runner, values, properties, func)) {
|
|
30756
30846
|
func(defaultValue);
|
|
@@ -30759,9 +30849,17 @@ var Question = /** @class */ (function (_super) {
|
|
|
30759
30849
|
Question.prototype.convertFuncValuetoQuestionValue = function (val) {
|
|
30760
30850
|
return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].convertValToQuestionVal(val);
|
|
30761
30851
|
};
|
|
30762
|
-
Question.prototype.
|
|
30852
|
+
Question.prototype.runExpressionSetValueCore = function (val, setFunc) {
|
|
30763
30853
|
setFunc(this.convertFuncValuetoQuestionValue(val));
|
|
30764
30854
|
};
|
|
30855
|
+
Question.prototype.runExpressionSetValue = function (val) {
|
|
30856
|
+
var _this = this;
|
|
30857
|
+
this.runExpressionSetValueCore(val, function (val) {
|
|
30858
|
+
if (!_this.isTwoValueEquals(_this.value, val)) {
|
|
30859
|
+
_this.value = val;
|
|
30860
|
+
}
|
|
30861
|
+
});
|
|
30862
|
+
};
|
|
30765
30863
|
Question.prototype.runDefaultValueExpression = function (runner, values, properties, setFunc) {
|
|
30766
30864
|
var _this = this;
|
|
30767
30865
|
if (values === void 0) { values = null; }
|
|
@@ -30770,11 +30868,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
30770
30868
|
return false;
|
|
30771
30869
|
if (!setFunc) {
|
|
30772
30870
|
setFunc = function (val) {
|
|
30773
|
-
_this.runExpressionSetValue(val
|
|
30774
|
-
if (!_this.isTwoValueEquals(_this.value, val)) {
|
|
30775
|
-
_this.value = val;
|
|
30776
|
-
}
|
|
30777
|
-
});
|
|
30871
|
+
_this.runExpressionSetValue(val);
|
|
30778
30872
|
};
|
|
30779
30873
|
}
|
|
30780
30874
|
if (!values)
|
|
@@ -31391,7 +31485,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
31391
31485
|
var scrollableSelector_1 = this.getObservedElementSelector();
|
|
31392
31486
|
if (!scrollableSelector_1)
|
|
31393
31487
|
return;
|
|
31394
|
-
var defaultRootEl = el
|
|
31488
|
+
var defaultRootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
|
|
31395
31489
|
if (!defaultRootEl)
|
|
31396
31490
|
return;
|
|
31397
31491
|
var isProcessed_1 = false;
|
|
@@ -31403,7 +31497,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
31403
31497
|
isProcessed_1 = false;
|
|
31404
31498
|
}
|
|
31405
31499
|
var callback = function () {
|
|
31406
|
-
var rootEl = el
|
|
31500
|
+
var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
|
|
31407
31501
|
if (!requiredWidth_1 && _this.isDefaultRendering()) {
|
|
31408
31502
|
requiredWidth_1 = rootEl.scrollWidth;
|
|
31409
31503
|
}
|
|
@@ -31428,8 +31522,10 @@ var Question = /** @class */ (function (_super) {
|
|
|
31428
31522
|
});
|
|
31429
31523
|
this.onMobileChangedCallback = function () {
|
|
31430
31524
|
setTimeout(function () {
|
|
31431
|
-
var rootEl = el
|
|
31432
|
-
|
|
31525
|
+
var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
|
|
31526
|
+
if (rootEl) {
|
|
31527
|
+
_this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
|
|
31528
|
+
}
|
|
31433
31529
|
}, 0);
|
|
31434
31530
|
};
|
|
31435
31531
|
this.resizeObserver.observe(el);
|
|
@@ -32062,6 +32158,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
32062
32158
|
_this.isUpdatingChoicesDependedQuestions = false;
|
|
32063
32159
|
_this.headItemsCount = 0;
|
|
32064
32160
|
_this.footItemsCount = 0;
|
|
32161
|
+
_this.allowMultiColumns = true;
|
|
32065
32162
|
_this.prevIsOtherSelected = false;
|
|
32066
32163
|
_this.noneItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].noneItemValue, "noneText", "noneItemText");
|
|
32067
32164
|
_this.refuseItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].refuseItemValue, "refuseText", "refuseItemText");
|
|
@@ -34082,9 +34179,23 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
34082
34179
|
enumerable: false,
|
|
34083
34180
|
configurable: true
|
|
34084
34181
|
});
|
|
34182
|
+
QuestionSelectBase.prototype.getObservedElementSelector = function () {
|
|
34183
|
+
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["classesToSelector"])(this.cssClasses.mainRoot);
|
|
34184
|
+
};
|
|
34185
|
+
QuestionSelectBase.prototype.supportResponsiveness = function () {
|
|
34186
|
+
return true;
|
|
34187
|
+
};
|
|
34188
|
+
QuestionSelectBase.prototype.onBeforeSetCompactRenderer = function () {
|
|
34189
|
+
_super.prototype.onBeforeSetDesktopRenderer.call(this);
|
|
34190
|
+
this.allowMultiColumns = false;
|
|
34191
|
+
};
|
|
34192
|
+
QuestionSelectBase.prototype.onBeforeSetDesktopRenderer = function () {
|
|
34193
|
+
_super.prototype.onBeforeSetDesktopRenderer.call(this);
|
|
34194
|
+
this.allowMultiColumns = true;
|
|
34195
|
+
};
|
|
34085
34196
|
Object.defineProperty(QuestionSelectBase.prototype, "hasColumns", {
|
|
34086
34197
|
get: function () {
|
|
34087
|
-
return !this.isMobile &&
|
|
34198
|
+
return !this.isMobile && this.allowMultiColumns &&
|
|
34088
34199
|
(this.getCurrentColCount() > 1);
|
|
34089
34200
|
},
|
|
34090
34201
|
enumerable: false,
|
|
@@ -34201,6 +34312,10 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
34201
34312
|
Object.defineProperty(QuestionSelectBase.prototype, "itemComponent", {
|
|
34202
34313
|
/**
|
|
34203
34314
|
* The name of a component used to render items.
|
|
34315
|
+
*
|
|
34316
|
+
* [View Dropdown Demo](https://surveyjs.io/form-library/examples/dropdown-box-with-custom-items/ (linkStyle))
|
|
34317
|
+
*
|
|
34318
|
+
* [View Ranking Demo](https://surveyjs.io/form-library/examples/dropdown-box-with-custom-items/ (linkStyle))
|
|
34204
34319
|
*/
|
|
34205
34320
|
get: function () {
|
|
34206
34321
|
return this.getPropertyValue("itemComponent", this.getDefaultItemComponent());
|
|
@@ -34238,6 +34353,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
34238
34353
|
__decorate([
|
|
34239
34354
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ localizable: true })
|
|
34240
34355
|
], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
|
|
34356
|
+
__decorate([
|
|
34357
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
34358
|
+
], QuestionSelectBase.prototype, "allowMultiColumns", void 0);
|
|
34241
34359
|
return QuestionSelectBase;
|
|
34242
34360
|
}(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));
|
|
34243
34361
|
|
|
@@ -34588,23 +34706,6 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
|
34588
34706
|
enumerable: false,
|
|
34589
34707
|
configurable: true
|
|
34590
34708
|
});
|
|
34591
|
-
QuestionBooleanModel.prototype.updateThumbMargin = function () {
|
|
34592
|
-
var _this = this;
|
|
34593
|
-
if (!this.isIndeterminate && this.leftAnswerElement) {
|
|
34594
|
-
if (!this.swapOrder && this.value === this.getValueTrue() || this.swapOrder && this.value === this.getValueFalse()) {
|
|
34595
|
-
var el_1 = this.leftAnswerElement;
|
|
34596
|
-
setTimeout(function () {
|
|
34597
|
-
_this.thumbMargin = el_1.clientWidth + (_this.swapOrder ? 4 : 2) + "px";
|
|
34598
|
-
}, 50);
|
|
34599
|
-
}
|
|
34600
|
-
}
|
|
34601
|
-
this.thumbMargin = undefined;
|
|
34602
|
-
};
|
|
34603
|
-
QuestionBooleanModel.prototype.afterRender = function (el) {
|
|
34604
|
-
_super.prototype.afterRender.call(this, el);
|
|
34605
|
-
this.leftAnswerElement = el.querySelectorAll("." + this.cssClasses.sliderGhost)[0];
|
|
34606
|
-
this.updateThumbMargin();
|
|
34607
|
-
};
|
|
34608
34709
|
QuestionBooleanModel.prototype.beforeDestroyQuestionElement = function (el) {
|
|
34609
34710
|
_super.prototype.beforeDestroyQuestionElement.call(this, el);
|
|
34610
34711
|
this.leftAnswerElement = undefined;
|
|
@@ -34756,11 +34857,9 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
|
34756
34857
|
QuestionBooleanModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
|
|
34757
34858
|
if (clearData === void 0) { clearData = false; }
|
|
34758
34859
|
_super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
|
|
34759
|
-
this.updateThumbMargin();
|
|
34760
34860
|
};
|
|
34761
34861
|
QuestionBooleanModel.prototype.onValueChanged = function () {
|
|
34762
34862
|
_super.prototype.onValueChanged.call(this);
|
|
34763
|
-
this.updateThumbMargin();
|
|
34764
34863
|
};
|
|
34765
34864
|
Object.defineProperty(QuestionBooleanModel.prototype, "svgIcon", {
|
|
34766
34865
|
get: function () {
|
|
@@ -34888,12 +34987,6 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
|
34888
34987
|
__decorate([
|
|
34889
34988
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
34890
34989
|
], QuestionBooleanModel.prototype, "booleanValueRendered", void 0);
|
|
34891
|
-
__decorate([
|
|
34892
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
34893
|
-
], QuestionBooleanModel.prototype, "leftAnswerElement", void 0);
|
|
34894
|
-
__decorate([
|
|
34895
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
34896
|
-
], QuestionBooleanModel.prototype, "thumbMargin", void 0);
|
|
34897
34990
|
__decorate([
|
|
34898
34991
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
34899
34992
|
], QuestionBooleanModel.prototype, "showTitle", void 0);
|
|
@@ -35393,7 +35486,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
35393
35486
|
}
|
|
35394
35487
|
else {
|
|
35395
35488
|
if (this.isNoneItem(item)) {
|
|
35396
|
-
this.renderedValue = [item.value];
|
|
35489
|
+
this.renderedValue = checked ? [item.value] : [];
|
|
35397
35490
|
}
|
|
35398
35491
|
else {
|
|
35399
35492
|
var newValue = [].concat(this.renderedValue || []);
|
|
@@ -35492,7 +35585,8 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
35492
35585
|
if (!itemValues.length && !selectedItemValues) {
|
|
35493
35586
|
this.updateSelectedItemValues();
|
|
35494
35587
|
}
|
|
35495
|
-
|
|
35588
|
+
var validValues = this.validateItemValues(itemValues);
|
|
35589
|
+
return validValues;
|
|
35496
35590
|
},
|
|
35497
35591
|
enumerable: false,
|
|
35498
35592
|
configurable: true
|
|
@@ -35950,7 +36044,14 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
35950
36044
|
});
|
|
35951
36045
|
Object.defineProperty(QuestionCheckboxModel.prototype, "a11y_input_ariaRole", {
|
|
35952
36046
|
get: function () {
|
|
35953
|
-
return "
|
|
36047
|
+
return "group";
|
|
36048
|
+
},
|
|
36049
|
+
enumerable: false,
|
|
36050
|
+
configurable: true
|
|
36051
|
+
});
|
|
36052
|
+
Object.defineProperty(QuestionCheckboxModel.prototype, "a11y_input_ariaRequired", {
|
|
36053
|
+
get: function () {
|
|
36054
|
+
return null;
|
|
35954
36055
|
},
|
|
35955
36056
|
enumerable: false,
|
|
35956
36057
|
configurable: true
|
|
@@ -36302,9 +36403,12 @@ var ComponentQuestionJSON = /** @class */ (function () {
|
|
|
36302
36403
|
this.json.onUpdateQuestionCssClasses(question, element, css);
|
|
36303
36404
|
};
|
|
36304
36405
|
ComponentQuestionJSON.prototype.onSetQuestionValue = function (question, newValue) {
|
|
36305
|
-
if (
|
|
36306
|
-
|
|
36307
|
-
|
|
36406
|
+
if (this.json.onSetQuestionValue) {
|
|
36407
|
+
this.json.onSetQuestionValue(question, newValue);
|
|
36408
|
+
}
|
|
36409
|
+
if (this.json.onValueSet) {
|
|
36410
|
+
this.json.onValueSet(question, newValue);
|
|
36411
|
+
}
|
|
36308
36412
|
};
|
|
36309
36413
|
ComponentQuestionJSON.prototype.onPropertyChanged = function (question, propertyName, newValue) {
|
|
36310
36414
|
if (!this.json.onPropertyChanged)
|
|
@@ -37695,7 +37799,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
|
37695
37799
|
return _super.prototype.hasUnknownValue.call(this, val, true, false);
|
|
37696
37800
|
};
|
|
37697
37801
|
QuestionDropdownModel.prototype.getItemIfChoicesNotContainThisValue = function (value, text) {
|
|
37698
|
-
if (this.choicesLazyLoadEnabled
|
|
37802
|
+
if (this.choicesLazyLoadEnabled) {
|
|
37699
37803
|
return this.createItemValue(value, text);
|
|
37700
37804
|
}
|
|
37701
37805
|
else {
|
|
@@ -41794,6 +41898,8 @@ var MatrixDropdownRowModel = /** @class */ (function (_super) {
|
|
|
41794
41898
|
enumerable: false,
|
|
41795
41899
|
configurable: true
|
|
41796
41900
|
});
|
|
41901
|
+
MatrixDropdownRowModel.prototype.isRowEnabled = function () { return this.item.isEnabled; };
|
|
41902
|
+
MatrixDropdownRowModel.prototype.isRowHasEnabledCondition = function () { return !!this.item.enableIf; };
|
|
41797
41903
|
return MatrixDropdownRowModel;
|
|
41798
41904
|
}(_question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownRowModelBase"]));
|
|
41799
41905
|
|
|
@@ -42092,7 +42198,9 @@ var MatrixDropdownCell = /** @class */ (function () {
|
|
|
42092
42198
|
this.question.locStrsChanged();
|
|
42093
42199
|
};
|
|
42094
42200
|
MatrixDropdownCell.prototype.createQuestion = function (column, row, data) {
|
|
42201
|
+
var _this = this;
|
|
42095
42202
|
var res = data.createQuestion(this.row, this.column);
|
|
42203
|
+
res.readOnlyCallback = function () { return !_this.row.isRowEnabled(); };
|
|
42096
42204
|
res.validateValueCallback = function () {
|
|
42097
42205
|
return data.validateCell(row, column.name, row.value);
|
|
42098
42206
|
};
|
|
@@ -42278,6 +42386,8 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
42278
42386
|
enumerable: false,
|
|
42279
42387
|
configurable: true
|
|
42280
42388
|
});
|
|
42389
|
+
MatrixDropdownRowModelBase.prototype.isRowEnabled = function () { return true; };
|
|
42390
|
+
MatrixDropdownRowModelBase.prototype.isRowHasEnabledCondition = function () { return false; };
|
|
42281
42391
|
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "value", {
|
|
42282
42392
|
get: function () {
|
|
42283
42393
|
var result = {};
|
|
@@ -42454,6 +42564,9 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
42454
42564
|
if (!!this.detailPanel) {
|
|
42455
42565
|
this.detailPanel.runCondition(values, newProps);
|
|
42456
42566
|
}
|
|
42567
|
+
if (this.isRowHasEnabledCondition()) {
|
|
42568
|
+
this.onQuestionReadOnlyChanged();
|
|
42569
|
+
}
|
|
42457
42570
|
};
|
|
42458
42571
|
MatrixDropdownRowModelBase.prototype.getNamesWithDefaultValues = function () {
|
|
42459
42572
|
var res = [];
|
|
@@ -42708,14 +42821,15 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
42708
42821
|
return;
|
|
42709
42822
|
this.updateCellOnColumnItemValueChanged(cell, propertyName, obj, name, newValue, oldValue);
|
|
42710
42823
|
};
|
|
42711
|
-
MatrixDropdownRowModelBase.prototype.onQuestionReadOnlyChanged = function (
|
|
42824
|
+
MatrixDropdownRowModelBase.prototype.onQuestionReadOnlyChanged = function () {
|
|
42712
42825
|
var questions = this.questions;
|
|
42713
42826
|
for (var i = 0; i < questions.length; i++) {
|
|
42714
42827
|
var q = questions[i];
|
|
42715
42828
|
q.setPropertyValue("isReadOnly", q.isReadOnly);
|
|
42716
42829
|
}
|
|
42717
42830
|
if (!!this.detailPanel) {
|
|
42718
|
-
this.
|
|
42831
|
+
var parentIsReadOnly = !!this.data && this.data.isMatrixReadOnly();
|
|
42832
|
+
this.detailPanel.readOnly = parentIsReadOnly || !this.isRowEnabled();
|
|
42719
42833
|
}
|
|
42720
42834
|
};
|
|
42721
42835
|
MatrixDropdownRowModelBase.prototype.hasErrors = function (fireCallback, rec, raiseOnCompletedAsyncValidators) {
|
|
@@ -43978,7 +44092,8 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
43978
44092
|
return questionPlainData;
|
|
43979
44093
|
};
|
|
43980
44094
|
QuestionMatrixDropdownModelBase.prototype.addConditionObjectsByContext = function (objects, context) {
|
|
43981
|
-
var
|
|
44095
|
+
var hasColumnContext = !!context && this.columns.indexOf(context) > -1;
|
|
44096
|
+
var hasContext = context === true || hasColumnContext;
|
|
43982
44097
|
var rowsIndeces = this.getConditionObjectsRowIndeces();
|
|
43983
44098
|
if (hasContext) {
|
|
43984
44099
|
rowsIndeces.push(-1);
|
|
@@ -44005,6 +44120,11 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
44005
44120
|
if (index === -1 && context === true) {
|
|
44006
44121
|
obj.context = this;
|
|
44007
44122
|
}
|
|
44123
|
+
else {
|
|
44124
|
+
if (hasColumnContext && prefixName.startsWith("row.")) {
|
|
44125
|
+
obj.context = context;
|
|
44126
|
+
}
|
|
44127
|
+
}
|
|
44008
44128
|
objects.push(obj);
|
|
44009
44129
|
}
|
|
44010
44130
|
}
|
|
@@ -44339,7 +44459,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
44339
44459
|
if (!this.generateRows)
|
|
44340
44460
|
return;
|
|
44341
44461
|
for (var i = 0; i < this.visibleRows.length; i++) {
|
|
44342
|
-
this.visibleRows[i].onQuestionReadOnlyChanged(
|
|
44462
|
+
this.visibleRows[i].onQuestionReadOnlyChanged();
|
|
44343
44463
|
}
|
|
44344
44464
|
};
|
|
44345
44465
|
//IMatrixDropdownData
|
|
@@ -44565,7 +44685,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
44565
44685
|
if (this.isDesignMode)
|
|
44566
44686
|
return this.detailPanel;
|
|
44567
44687
|
var panel = this.createNewDetailPanel();
|
|
44568
|
-
panel.readOnly = this.isReadOnly;
|
|
44688
|
+
panel.readOnly = this.isReadOnly || !row.isRowEnabled();
|
|
44569
44689
|
panel.setSurveyImpl(row);
|
|
44570
44690
|
var json = this.detailPanel.toJSON();
|
|
44571
44691
|
new _jsonobject__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]().toObject(json, panel);
|
|
@@ -44605,6 +44725,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
44605
44725
|
return data.getTextProcessor();
|
|
44606
44726
|
return null;
|
|
44607
44727
|
};
|
|
44728
|
+
QuestionMatrixDropdownModelBase.prototype.isMatrixReadOnly = function () { return this.isReadOnly; };
|
|
44608
44729
|
QuestionMatrixDropdownModelBase.prototype.getQuestionFromArray = function (name, index) {
|
|
44609
44730
|
if (index >= this.visibleRows.length)
|
|
44610
44731
|
return null;
|
|
@@ -44683,6 +44804,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownb
|
|
|
44683
44804
|
visible: false,
|
|
44684
44805
|
isLightSerializable: false,
|
|
44685
44806
|
},
|
|
44807
|
+
{ name: "columnsVisibleIf", visible: false },
|
|
44686
44808
|
{
|
|
44687
44809
|
name: "detailPanelMode",
|
|
44688
44810
|
choices: ["none", "underRow", "underRowSingle"],
|
|
@@ -52798,13 +52920,14 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52798
52920
|
if (_this.allowStartDrag &&
|
|
52799
52921
|
_this.canStartDragDueMaxSelectedChoices(target) &&
|
|
52800
52922
|
_this.canStartDragDueItemEnabled(choice)) {
|
|
52801
|
-
_this.
|
|
52923
|
+
_this.draggedChoiceValue = choice.value;
|
|
52802
52924
|
_this.draggedTargetNode = node;
|
|
52803
52925
|
_this.dragOrClickHelper.onPointerDown(event);
|
|
52804
52926
|
}
|
|
52805
52927
|
};
|
|
52806
52928
|
_this.startDrag = function (event) {
|
|
52807
|
-
|
|
52929
|
+
var choice = _itemvalue__WEBPACK_IMPORTED_MODULE_2__["ItemValue"].getItemByValue(_this.activeChoices, _this.draggedChoiceValue);
|
|
52930
|
+
_this.dragDropRankingChoices.startDrag(event, choice, _this, _this.draggedTargetNode);
|
|
52808
52931
|
};
|
|
52809
52932
|
_this.handlePointerUp = function (event, choice, node) {
|
|
52810
52933
|
if (!_this.selectToRankEnabled)
|
|
@@ -52860,9 +52983,6 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52860
52983
|
_this.dragOrClickHelper = new _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_11__["DragOrClickHelper"](_this.startDrag);
|
|
52861
52984
|
return _this;
|
|
52862
52985
|
}
|
|
52863
|
-
QuestionRankingModel.prototype.getDefaultItemComponent = function () {
|
|
52864
|
-
return "";
|
|
52865
|
-
};
|
|
52866
52986
|
QuestionRankingModel.prototype.getType = function () {
|
|
52867
52987
|
return "ranking";
|
|
52868
52988
|
};
|
|
@@ -53285,19 +53405,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
53285
53405
|
enumerable: false,
|
|
53286
53406
|
configurable: true
|
|
53287
53407
|
});
|
|
53288
|
-
|
|
53289
|
-
|
|
53290
|
-
|
|
53291
|
-
*/
|
|
53292
|
-
get: function () {
|
|
53293
|
-
return this.getPropertyValue("itemContentComponent", "sv-ranking-item-content");
|
|
53294
|
-
},
|
|
53295
|
-
set: function (value) {
|
|
53296
|
-
this.setPropertyValue("itemContentComponent", value);
|
|
53297
|
-
},
|
|
53298
|
-
enumerable: false,
|
|
53299
|
-
configurable: true
|
|
53300
|
-
});
|
|
53408
|
+
QuestionRankingModel.prototype.getDefaultItemComponent = function () {
|
|
53409
|
+
return "sv-ranking-item";
|
|
53410
|
+
};
|
|
53301
53411
|
Object.defineProperty(QuestionRankingModel.prototype, "selectToRankEnabled", {
|
|
53302
53412
|
/**
|
|
53303
53413
|
* Specifies whether users can select choices they want to rank.
|
|
@@ -53490,8 +53600,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_3__["Serializer"].addClass("ranking", [
|
|
|
53490
53600
|
dependsOn: "selectToRankEnabled", visibleIf: function (obj) {
|
|
53491
53601
|
return !!obj.selectToRankEnabled;
|
|
53492
53602
|
}, isSerializable: true },
|
|
53493
|
-
{ name: "itemComponent", visible: false, default: "" },
|
|
53494
|
-
{ name: "itemContentComponent", visible: false, default: "sv-ranking-item-content" },
|
|
53603
|
+
{ name: "itemComponent", visible: false, default: "sv-ranking-item" },
|
|
53495
53604
|
], function () {
|
|
53496
53605
|
return new QuestionRankingModel("");
|
|
53497
53606
|
}, "checkbox");
|
|
@@ -54260,20 +54369,11 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
54260
54369
|
if (this.scaleColorMode === "monochrome" && this.rateColorMode == "default" ||
|
|
54261
54370
|
this.isPreviewStyle ||
|
|
54262
54371
|
this.isReadOnlyStyle)
|
|
54263
|
-
return {
|
|
54372
|
+
return {};
|
|
54264
54373
|
var index = this.visibleRateValues.indexOf(item);
|
|
54265
54374
|
var color = this.getRenderedItemColor(index, false);
|
|
54266
|
-
|
|
54267
|
-
|
|
54268
|
-
if (highlight == "highlighted" && this.scaleColorMode === "colored")
|
|
54269
|
-
return { borderColor: color, fill: color, backgroundColor: colorLight };
|
|
54270
|
-
if (this.scaleColorMode === "colored" && this.errors.length == 0)
|
|
54271
|
-
return { borderColor: color, fill: color, backgroundColor: null };
|
|
54272
|
-
return { borderColor: null, fill: null, backgroundColor: null };
|
|
54273
|
-
}
|
|
54274
|
-
else {
|
|
54275
|
-
return { borderColor: color, fill: null, backgroundColor: color };
|
|
54276
|
-
}
|
|
54375
|
+
var colorLight = highlight == "highlighted" && this.scaleColorMode === "colored" && this.getRenderedItemColor(index, true);
|
|
54376
|
+
return colorLight ? { "--sd-rating-item-color": color, "--sd-rating-item-color-light": colorLight } : { "--sd-rating-item-color": color };
|
|
54277
54377
|
};
|
|
54278
54378
|
QuestionRatingModel.prototype.getItemClass = function (item, highlight) {
|
|
54279
54379
|
var _this = this;
|
|
@@ -55459,8 +55559,7 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
55459
55559
|
}
|
|
55460
55560
|
};
|
|
55461
55561
|
QuestionTagboxModel.prototype.getItemIfChoicesNotContainThisValue = function (value, text) {
|
|
55462
|
-
|
|
55463
|
-
if (this.choicesLazyLoadEnabled && !((_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.isAllDataLoaded)) {
|
|
55562
|
+
if (this.choicesLazyLoadEnabled) {
|
|
55464
55563
|
return this.createItemValue(value, text);
|
|
55465
55564
|
}
|
|
55466
55565
|
else {
|
|
@@ -55741,7 +55840,11 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
55741
55840
|
};
|
|
55742
55841
|
Object.defineProperty(QuestionTextModel.prototype, "maskTypeIsEmpty", {
|
|
55743
55842
|
get: function () {
|
|
55744
|
-
|
|
55843
|
+
switch (this.inputType) {
|
|
55844
|
+
case "tel":
|
|
55845
|
+
case "text": return this.maskType === "none";
|
|
55846
|
+
default: return true;
|
|
55847
|
+
}
|
|
55745
55848
|
},
|
|
55746
55849
|
enumerable: false,
|
|
55747
55850
|
configurable: true
|
|
@@ -55783,6 +55886,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
55783
55886
|
maskClassName = "masksettings";
|
|
55784
55887
|
}
|
|
55785
55888
|
var inputMask = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass(maskClassName);
|
|
55889
|
+
inputMask.owner = this.survey;
|
|
55786
55890
|
return inputMask;
|
|
55787
55891
|
};
|
|
55788
55892
|
QuestionTextModel.prototype.isTextValue = function () {
|
|
@@ -56278,7 +56382,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
56278
56382
|
if (this.inputTextAlignment !== "auto") {
|
|
56279
56383
|
style.textAlign = this.inputTextAlignment;
|
|
56280
56384
|
}
|
|
56281
|
-
else if (this.maskSettings.getTextAlignment() !== "auto") {
|
|
56385
|
+
else if (!this.maskTypeIsEmpty && this.maskSettings.getTextAlignment() !== "auto") {
|
|
56282
56386
|
style.textAlign = this.maskSettings.getTextAlignment();
|
|
56283
56387
|
}
|
|
56284
56388
|
};
|
|
@@ -56479,7 +56583,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
|
|
|
56479
56583
|
visibleIndex: 0,
|
|
56480
56584
|
dependsOn: "inputType",
|
|
56481
56585
|
visibleIf: function (obj) {
|
|
56482
|
-
return obj.inputType === "text";
|
|
56586
|
+
return obj.inputType === "text" || obj.inputType === "tel";
|
|
56483
56587
|
}
|
|
56484
56588
|
},
|
|
56485
56589
|
{
|
|
@@ -56488,7 +56592,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
|
|
|
56488
56592
|
visibleIndex: 1,
|
|
56489
56593
|
dependsOn: "inputType",
|
|
56490
56594
|
visibleIf: function (obj) {
|
|
56491
|
-
return obj.inputType === "text";
|
|
56595
|
+
return obj.inputType === "text" || obj.inputType === "tel";
|
|
56492
56596
|
},
|
|
56493
56597
|
onGetValue: function (obj) {
|
|
56494
56598
|
return obj.maskSettings.getData();
|
|
@@ -57493,11 +57597,19 @@ var settings = {
|
|
|
57493
57597
|
*/
|
|
57494
57598
|
ratingMaximumRateValueCount: 20,
|
|
57495
57599
|
/**
|
|
57496
|
-
* Specifies whether to close the drop-down menu of a [
|
|
57600
|
+
* 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.
|
|
57497
57601
|
*
|
|
57498
|
-
* This setting applies to all
|
|
57602
|
+
* 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.
|
|
57499
57603
|
*/
|
|
57500
57604
|
tagboxCloseOnSelect: false,
|
|
57605
|
+
/**
|
|
57606
|
+
* 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`.
|
|
57607
|
+
*
|
|
57608
|
+
* Default value: 500
|
|
57609
|
+
*
|
|
57610
|
+
* [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
|
|
57611
|
+
*/
|
|
57612
|
+
dropdownSearchDelay: 500,
|
|
57501
57613
|
/**
|
|
57502
57614
|
* A function that activates a browser confirm dialog.
|
|
57503
57615
|
*
|
|
@@ -60257,7 +60369,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60257
60369
|
*/
|
|
60258
60370
|
_this.onUpdatePageCssClasses = _this.addEvent();
|
|
60259
60371
|
/**
|
|
60260
|
-
* An event that is raised before rendering a choice item in Radio Button Group
|
|
60372
|
+
* An event that is raised before rendering a choice item in Radio Button Group and Checkboxes questions. Use it to override default CSS classes applied to choice items.
|
|
60261
60373
|
*
|
|
60262
60374
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
60263
60375
|
*
|
|
@@ -61585,6 +61697,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61585
61697
|
* - `"onValueChanged"` - Triggers validation each time a question value is changed.
|
|
61586
61698
|
* - `"onComplete"` - Triggers validation when a user clicks the Complete button. If previous pages contain errors, the survey switches to the page with the first error.
|
|
61587
61699
|
*
|
|
61700
|
+
* > The `"onValueChanged"` doesn't work with date input fields because of the way browsers process date values. In most browsers, the value is considered changed as soon as a user starts entering the date in a text input field. This means that a user may only enter the day without having the chance to enter the month and year before validation is triggered. For this reason, date input fields are validated before the survey is switched to the next page or completed.
|
|
61701
|
+
*
|
|
61588
61702
|
* Refer to the following help topic for more information: [Data Validation](https://surveyjs.io/form-library/documentation/data-validation).
|
|
61589
61703
|
* @see validationEnabled
|
|
61590
61704
|
* @see validationAllowSwitchPages
|
|
@@ -61608,6 +61722,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61608
61722
|
*
|
|
61609
61723
|
* You can override this property for individual Long Text questions: [`autoGrow`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#autoGrow).
|
|
61610
61724
|
* @see allowResizeComment
|
|
61725
|
+
* @see commentAreaRows
|
|
61611
61726
|
*/
|
|
61612
61727
|
get: function () {
|
|
61613
61728
|
return this.getPropertyValue("autoGrowComment");
|
|
@@ -61626,6 +61741,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61626
61741
|
*
|
|
61627
61742
|
* You can override this property for individual Long Text questions: [`allowResize`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#allowResize).
|
|
61628
61743
|
* @see autoGrowComment
|
|
61744
|
+
* @see commentAreaRows
|
|
61629
61745
|
*/
|
|
61630
61746
|
get: function () {
|
|
61631
61747
|
return this.getPropertyValue("allowResizeComment");
|
|
@@ -61636,6 +61752,25 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61636
61752
|
enumerable: false,
|
|
61637
61753
|
configurable: true
|
|
61638
61754
|
});
|
|
61755
|
+
Object.defineProperty(SurveyModel.prototype, "commentAreaRows", {
|
|
61756
|
+
/**
|
|
61757
|
+
* 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.
|
|
61758
|
+
*
|
|
61759
|
+
* Default value: 2
|
|
61760
|
+
*
|
|
61761
|
+
* The value of this property is passed on to the `rows` attribute of the underlying `<textarea>` element.
|
|
61762
|
+
* @see autoGrowComment
|
|
61763
|
+
* @see allowResizeComment
|
|
61764
|
+
*/
|
|
61765
|
+
get: function () {
|
|
61766
|
+
return this.getPropertyValue("commentAreaRows");
|
|
61767
|
+
},
|
|
61768
|
+
set: function (val) {
|
|
61769
|
+
this.setPropertyValue("commentAreaRows", val);
|
|
61770
|
+
},
|
|
61771
|
+
enumerable: false,
|
|
61772
|
+
configurable: true
|
|
61773
|
+
});
|
|
61639
61774
|
Object.defineProperty(SurveyModel.prototype, "textUpdateMode", {
|
|
61640
61775
|
/**
|
|
61641
61776
|
* Specifies when to update the question value in questions with a text input field.
|
|
@@ -61767,6 +61902,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61767
61902
|
this.localeChanged();
|
|
61768
61903
|
this.onLocaleChangedEvent.fire(this, this.locale);
|
|
61769
61904
|
};
|
|
61905
|
+
Object.defineProperty(SurveyModel.prototype, "localeDir", {
|
|
61906
|
+
get: function () {
|
|
61907
|
+
return _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].localeDirections[this.locale];
|
|
61908
|
+
},
|
|
61909
|
+
enumerable: false,
|
|
61910
|
+
configurable: true
|
|
61911
|
+
});
|
|
61770
61912
|
/**
|
|
61771
61913
|
* Returns an array of locales whose translations are used in the survey.
|
|
61772
61914
|
*
|
|
@@ -65135,6 +65277,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
65135
65277
|
SurveyModel.prototype.getRootCss = function () {
|
|
65136
65278
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]()
|
|
65137
65279
|
.append(this.css.root)
|
|
65280
|
+
.append(this.css.rootProgress + "--" + this.progressBarType)
|
|
65138
65281
|
.append(this.css.rootMobile, this.isMobile)
|
|
65139
65282
|
.append(this.css.rootAnimationDisabled, !_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].animationEnabled)
|
|
65140
65283
|
.append(this.css.rootReadOnly, this.mode === "display" && !this.isDesignMode)
|
|
@@ -68037,6 +68180,15 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
68037
68180
|
}
|
|
68038
68181
|
};
|
|
68039
68182
|
SurveyModel.prototype.onScroll = function () {
|
|
68183
|
+
if (!!this.rootElement) {
|
|
68184
|
+
var topStickyContainer = this.rootElement.querySelector(".sv-components-container-center");
|
|
68185
|
+
if (!!topStickyContainer && topStickyContainer.getBoundingClientRect().y <= this.rootElement.getBoundingClientRect().y) {
|
|
68186
|
+
this.rootElement.classList && this.rootElement.classList.add("sv-root--sticky-top");
|
|
68187
|
+
}
|
|
68188
|
+
else {
|
|
68189
|
+
this.rootElement.classList && this.rootElement.classList.remove("sv-root--sticky-top");
|
|
68190
|
+
}
|
|
68191
|
+
}
|
|
68040
68192
|
if (this.onScrollCallback) {
|
|
68041
68193
|
this.onScrollCallback();
|
|
68042
68194
|
}
|
|
@@ -68378,6 +68530,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
|
68378
68530
|
},
|
|
68379
68531
|
{ name: "autoGrowComment:boolean", default: false },
|
|
68380
68532
|
{ name: "allowResizeComment:boolean", default: true },
|
|
68533
|
+
{ name: "commentAreaRows:number", minValue: 1 },
|
|
68381
68534
|
{
|
|
68382
68535
|
name: "startSurveyText",
|
|
68383
68536
|
serializationProperty: "locStartSurveyText",
|
|
@@ -68529,6 +68682,7 @@ var surveyLocalization = {
|
|
|
68529
68682
|
defaultLocaleValue: "en",
|
|
68530
68683
|
locales: {},
|
|
68531
68684
|
localeNames: {},
|
|
68685
|
+
localeDirections: {},
|
|
68532
68686
|
supportedLocales: [],
|
|
68533
68687
|
get currentLocale() {
|
|
68534
68688
|
return this.currentLocaleValue === this.defaultLocaleValue ? "" : this.currentLocaleValue;
|
|
@@ -69028,7 +69182,7 @@ var TOCModel = /** @class */ (function () {
|
|
|
69028
69182
|
var titleElement = rootElement.querySelector(titleSelector);
|
|
69029
69183
|
var titleElementHeight = titleElement ? titleElement.getBoundingClientRect().height : 0;
|
|
69030
69184
|
var scrollCompensationHeight = rootElement.scrollTop > titleElementHeight ? 0 : titleElementHeight - rootElement.scrollTop;
|
|
69031
|
-
tocRootElement.style.height = (rootHeight - scrollCompensationHeight -
|
|
69185
|
+
tocRootElement.style.height = (rootHeight - scrollCompensationHeight - 1) + "px";
|
|
69032
69186
|
}
|
|
69033
69187
|
}
|
|
69034
69188
|
};
|
|
@@ -70835,7 +70989,7 @@ var CssClassBuilder = /** @class */ (function () {
|
|
|
70835
70989
|
/*!******************************!*\
|
|
70836
70990
|
!*** ./src/utils/devices.ts ***!
|
|
70837
70991
|
\******************************/
|
|
70838
|
-
/*! exports provided: IsMobile, mouseInfo, IsTouch, _setIsTouch */
|
|
70992
|
+
/*! exports provided: IsMobile, mouseInfo, IsTouch, _setIsTouch, detectMouseSupport */
|
|
70839
70993
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
70840
70994
|
|
|
70841
70995
|
"use strict";
|
|
@@ -70844,6 +70998,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
70844
70998
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mouseInfo", function() { return mouseInfo; });
|
|
70845
70999
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsTouch", function() { return IsTouch; });
|
|
70846
71000
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_setIsTouch", function() { return _setIsTouch; });
|
|
71001
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectMouseSupport", function() { return detectMouseSupport; });
|
|
70847
71002
|
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
|
|
70848
71003
|
|
|
70849
71004
|
// isMobile
|
|
@@ -70873,13 +71028,20 @@ var mouseInfo = {
|
|
|
70873
71028
|
},
|
|
70874
71029
|
hasMouse: true
|
|
70875
71030
|
};
|
|
70876
|
-
var
|
|
70877
|
-
mouseInfo.hasMouse =
|
|
71031
|
+
var matchMediaMethod = _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].matchMedia;
|
|
71032
|
+
mouseInfo.hasMouse = detectMouseSupport(matchMediaMethod);
|
|
70878
71033
|
var IsTouch = mouseInfo.isTouch;
|
|
70879
71034
|
//for tests
|
|
70880
71035
|
function _setIsTouch(val) {
|
|
70881
71036
|
IsTouch = val;
|
|
70882
71037
|
}
|
|
71038
|
+
function detectMouseSupport(matchMedia) {
|
|
71039
|
+
if (!matchMedia)
|
|
71040
|
+
return false;
|
|
71041
|
+
var pointerQuery = matchMedia("(pointer:fine)");
|
|
71042
|
+
var hoverQuery = matchMedia("(any-hover:hover)");
|
|
71043
|
+
return !!pointerQuery && pointerQuery.matches || !!hoverQuery && hoverQuery.matches;
|
|
71044
|
+
}
|
|
70883
71045
|
|
|
70884
71046
|
|
|
70885
71047
|
/***/ }),
|