survey-core 1.11.4 → 1.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/defaultV2.css +126 -39
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +126 -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 +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 +198 -70
- 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/dragdrop/choices.d.ts +1 -0
- package/ts3.4/typings/dragdrop/ranking-choices.d.ts +1 -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_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-events-api.d.ts +1 -0
- package/ts3.4/typings/survey.d.ts +13 -0
- package/ts3.4/typings/surveyStrings.d.ts +3 -0
- package/typings/actions/action.d.ts +2 -1
- package/typings/base-interfaces.d.ts +1 -0
- package/typings/dragdrop/choices.d.ts +1 -0
- package/typings/dragdrop/ranking-choices.d.ts +1 -1
- 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_ranking.d.ts +1 -4
- package/typings/question_rating.d.ts +8 -3
- package/typings/settings.d.ts +9 -2
- package/typings/survey-events-api.d.ts +1 -0
- package/typings/survey.d.ts +14 -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.5
|
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -909,6 +909,13 @@ var BaseAction = /** @class */ (function (_super) {
|
|
|
909
909
|
enumerable: false,
|
|
910
910
|
configurable: true
|
|
911
911
|
});
|
|
912
|
+
Object.defineProperty(BaseAction.prototype, "hasSubItems", {
|
|
913
|
+
get: function () {
|
|
914
|
+
return !!this.items && this.items.length > 0;
|
|
915
|
+
},
|
|
916
|
+
enumerable: false,
|
|
917
|
+
configurable: true
|
|
918
|
+
});
|
|
912
919
|
BaseAction.prototype.getActionBarItemTitleCss = function () {
|
|
913
920
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
|
|
914
921
|
.append(this.cssClasses.itemTitle)
|
|
@@ -1095,11 +1102,13 @@ var Action = /** @class */ (function (_super) {
|
|
|
1095
1102
|
Action.prototype.createLocTitle = function () {
|
|
1096
1103
|
return this.createLocalizableString("title", this, true);
|
|
1097
1104
|
};
|
|
1098
|
-
Action.prototype.
|
|
1105
|
+
Action.prototype.setSubItems = function (options) {
|
|
1099
1106
|
this.markerIconName = "icon-next_16x16";
|
|
1100
1107
|
this.component = "sv-list-item-group";
|
|
1101
|
-
this.items = __spreadArray([], items);
|
|
1102
|
-
var
|
|
1108
|
+
this.items = __spreadArray([], options.items);
|
|
1109
|
+
var listOptions = Object.assign({}, options);
|
|
1110
|
+
listOptions.searchEnabled = false;
|
|
1111
|
+
var popupModel = createPopupModelWithListModel(listOptions, { horizontalPosition: "right", showPointer: false, canShrink: false });
|
|
1103
1112
|
popupModel.cssClass = "sv-popup-inner";
|
|
1104
1113
|
this.popupModel = popupModel;
|
|
1105
1114
|
};
|
|
@@ -1650,9 +1659,6 @@ var ActionContainer = /** @class */ (function (_super) {
|
|
|
1650
1659
|
itemValue.showPopupDelayed(_this.subItemsShowDelay);
|
|
1651
1660
|
_this.popupAfterShowCallback(itemValue);
|
|
1652
1661
|
}
|
|
1653
|
-
else if (!!action.popupModel && action.popupModel.isVisible) {
|
|
1654
|
-
action.hidePopupDelayed(_this.subItemsHideDelay);
|
|
1655
|
-
}
|
|
1656
1662
|
});
|
|
1657
1663
|
};
|
|
1658
1664
|
ActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
|
|
@@ -6943,12 +6949,12 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
|
6943
6949
|
if (!draggedElementShortcut)
|
|
6944
6950
|
return;
|
|
6945
6951
|
// draggedElementShortcut.innerText = text;
|
|
6946
|
-
draggedElementShortcut.
|
|
6952
|
+
draggedElementShortcut.className = "sv-drag-drop-choices-shortcut";
|
|
6947
6953
|
var isDeepClone = true;
|
|
6948
6954
|
var clone = (draggedElementNode
|
|
6949
6955
|
.closest("[data-sv-drop-target-item-value]")
|
|
6950
6956
|
.cloneNode(isDeepClone));
|
|
6951
|
-
clone.
|
|
6957
|
+
clone.classList.add("sv-drag-drop-choices-shortcut__content");
|
|
6952
6958
|
var dragIcon = clone.querySelector(".svc-item-value-controls__drag-icon");
|
|
6953
6959
|
dragIcon.style.visibility = "visible";
|
|
6954
6960
|
var removeIcon = clone.querySelector(".svc-item-value-controls__remove");
|
|
@@ -6962,6 +6968,9 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
|
6962
6968
|
draggedElementShortcut.shortcutXOffset = event.clientX - rect.x;
|
|
6963
6969
|
draggedElementShortcut.shortcutYOffset = event.clientY - rect.y;
|
|
6964
6970
|
this.isBottom = null;
|
|
6971
|
+
if (typeof this.onShortcutCreated === "function") {
|
|
6972
|
+
this.onShortcutCreated(draggedElementShortcut);
|
|
6973
|
+
}
|
|
6965
6974
|
return draggedElementShortcut;
|
|
6966
6975
|
};
|
|
6967
6976
|
DragDropChoices.prototype.createImagePickerShortcut = function (item, text, draggedElementNode, event) {
|
|
@@ -7916,9 +7925,13 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7916
7925
|
}
|
|
7917
7926
|
return _super.prototype.calculateIsBottom.call(this, clientY);
|
|
7918
7927
|
};
|
|
7919
|
-
DragDropRankingChoices.prototype.
|
|
7928
|
+
DragDropRankingChoices.prototype.getIndices = function (model, fromChoicesArray, toChoicesArray) {
|
|
7920
7929
|
var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
|
7921
7930
|
var toIndex = toChoicesArray.indexOf(this.dropTarget);
|
|
7931
|
+
if (fromIndex < 0 && !!this.draggedElement) {
|
|
7932
|
+
this.draggedElement = _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].getItemByValue(fromChoicesArray, this.draggedElement.value) || this.draggedElement;
|
|
7933
|
+
fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
|
7934
|
+
}
|
|
7922
7935
|
if (toIndex === -1) {
|
|
7923
7936
|
var length_1 = model.value.length;
|
|
7924
7937
|
toIndex = length_1;
|
|
@@ -7936,7 +7949,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7936
7949
|
return { fromIndex: fromIndex, toIndex: toIndex };
|
|
7937
7950
|
};
|
|
7938
7951
|
DragDropRankingChoices.prototype.afterDragOver = function (dropTargetNode) {
|
|
7939
|
-
var _a = this.
|
|
7952
|
+
var _a = this.getIndices(this.parentElement, this.parentElement.rankingChoices, this.parentElement.rankingChoices), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
|
|
7940
7953
|
this.reorderRankedItem(this.parentElement, fromIndex, toIndex);
|
|
7941
7954
|
};
|
|
7942
7955
|
DragDropRankingChoices.prototype.updateDraggedElementShortcut = function (newIndex) {
|
|
@@ -8066,7 +8079,7 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
|
8066
8079
|
};
|
|
8067
8080
|
DragDropRankingSelectToRank.prototype.doRankBetween = function (dropTargetNode, fromChoicesArray, toChoicesArray, rankFunction) {
|
|
8068
8081
|
var questionModel = this.parentElement;
|
|
8069
|
-
var _a = this.
|
|
8082
|
+
var _a = this.getIndices(questionModel, fromChoicesArray, toChoicesArray), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
|
|
8070
8083
|
rankFunction(questionModel, fromIndex, toIndex, dropTargetNode);
|
|
8071
8084
|
};
|
|
8072
8085
|
Object.defineProperty(DragDropRankingSelectToRank.prototype, "isDraggedElementRanked", {
|
|
@@ -8599,7 +8612,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8599
8612
|
this.listModel.setItems(this.getAvailableItems());
|
|
8600
8613
|
};
|
|
8601
8614
|
DropdownListModel.prototype.onClick = function (event) {
|
|
8602
|
-
if (this.question.readOnly || this.question.isDesignMode || this.question.isPreviewStyle)
|
|
8615
|
+
if (this.question.readOnly || this.question.isDesignMode || this.question.isPreviewStyle || this.question.isReadOnlyAttr)
|
|
8603
8616
|
return;
|
|
8604
8617
|
this._popupModel.toggleVisibility();
|
|
8605
8618
|
this.focusItemOnClickAndPopup();
|
|
@@ -9811,8 +9824,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9811
9824
|
|
|
9812
9825
|
var Version;
|
|
9813
9826
|
var ReleaseDate;
|
|
9814
|
-
Version = "" + "1.11.
|
|
9815
|
-
ReleaseDate = "" + "2024-
|
|
9827
|
+
Version = "" + "1.11.5";
|
|
9828
|
+
ReleaseDate = "" + "2024-07-03";
|
|
9816
9829
|
function checkLibraryVersion(ver, libraryName) {
|
|
9817
9830
|
if (Version != ver) {
|
|
9818
9831
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -17442,7 +17455,7 @@ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\
|
|
|
17442
17455
|
/*! no static exports found */
|
|
17443
17456
|
/***/ (function(module, exports) {
|
|
17444
17457
|
|
|
17445
|
-
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>"
|
|
17446
17459
|
|
|
17447
17460
|
/***/ }),
|
|
17448
17461
|
|
|
@@ -20307,6 +20320,7 @@ var defaultListCss = {
|
|
|
20307
20320
|
searchClearButtonIcon: "sv-list__filter-clear-button",
|
|
20308
20321
|
loadingIndicator: "sv-list__loading-indicator",
|
|
20309
20322
|
itemSelected: "sv-list__item--selected",
|
|
20323
|
+
itemGroup: "sv-list__item--group",
|
|
20310
20324
|
itemWithIcon: "sv-list__item--with-icon",
|
|
20311
20325
|
itemDisabled: "sv-list__item--disabled",
|
|
20312
20326
|
itemFocused: "sv-list__item--focused",
|
|
@@ -20372,6 +20386,7 @@ var ListModel = /** @class */ (function (_super) {
|
|
|
20372
20386
|
.append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
|
|
20373
20387
|
.append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
|
|
20374
20388
|
.append(_this.cssClasses.itemSelected, _this.isItemSelected(itemValue))
|
|
20389
|
+
.append(_this.cssClasses.itemGroup, itemValue.hasSubItems)
|
|
20375
20390
|
.append(_this.cssClasses.itemHovered, itemValue.isHovered)
|
|
20376
20391
|
.append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
|
|
20377
20392
|
.append(itemValue.css)
|
|
@@ -21700,11 +21715,15 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
21700
21715
|
};
|
|
21701
21716
|
QuestionMatrixBaseModel.prototype.updateVisibilityBasedOnRows = function () {
|
|
21702
21717
|
if (this.hideIfRowsEmpty) {
|
|
21703
|
-
this.
|
|
21704
|
-
this.rows.length > 0 &&
|
|
21705
|
-
(!this.filteredRows || this.filteredRows.length > 0);
|
|
21718
|
+
this.onVisibleChanged();
|
|
21706
21719
|
}
|
|
21707
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
|
+
};
|
|
21708
21727
|
QuestionMatrixBaseModel.prototype.shouldRunColumnExpression = function () {
|
|
21709
21728
|
return !this.survey || !this.survey.areInvisibleElementsShowing;
|
|
21710
21729
|
};
|
|
@@ -21747,6 +21766,7 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
21747
21766
|
: null;
|
|
21748
21767
|
this.filteredRows = [];
|
|
21749
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);
|
|
21750
21770
|
if (this.filteredRows.length === this.rows.length) {
|
|
21751
21771
|
this.filteredRows = null;
|
|
21752
21772
|
}
|
|
@@ -25381,6 +25401,23 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
25381
25401
|
return this.parent.getQuestionTitleLocation();
|
|
25382
25402
|
return this.survey ? this.survey.questionTitleLocation : "top";
|
|
25383
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
|
+
};
|
|
25384
25421
|
PanelModelBase.prototype.getQuestionTitleWidth = function () {
|
|
25385
25422
|
return this.questionTitleWidth || this.parent && this.parent.getQuestionTitleWidth();
|
|
25386
25423
|
};
|
|
@@ -26591,7 +26628,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panelbase", [
|
|
|
26591
26628
|
{
|
|
26592
26629
|
name: "questionTitleWidth",
|
|
26593
26630
|
visibleIf: function (obj) {
|
|
26594
|
-
return !!obj && obj["
|
|
26631
|
+
return !!obj && obj["availableQuestionTitleWidth"]();
|
|
26595
26632
|
}
|
|
26596
26633
|
},
|
|
26597
26634
|
{
|
|
@@ -28337,7 +28374,7 @@ var ProgressButtons = /** @class */ (function (_super) {
|
|
|
28337
28374
|
Object.defineProperty(ProgressButtons.prototype, "progressWidth", {
|
|
28338
28375
|
get: function () {
|
|
28339
28376
|
if (this.isFitToSurveyWidth) {
|
|
28340
|
-
return this.survey.
|
|
28377
|
+
return this.survey.renderedWidth;
|
|
28341
28378
|
}
|
|
28342
28379
|
return "";
|
|
28343
28380
|
},
|
|
@@ -28517,6 +28554,9 @@ var TriggerExpressionInfo = /** @class */ (function () {
|
|
|
28517
28554
|
}
|
|
28518
28555
|
return TriggerExpressionInfo;
|
|
28519
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
|
+
}
|
|
28520
28560
|
/**
|
|
28521
28561
|
* A base class for all questions.
|
|
28522
28562
|
*/
|
|
@@ -29020,9 +29060,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
29020
29060
|
if (!this.setValueExpressionRunner) {
|
|
29021
29061
|
this.setValueExpressionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_6__["ExpressionRunner"](this.setValueExpression);
|
|
29022
29062
|
this.setValueExpressionRunner.onRunComplete = function (res) {
|
|
29023
|
-
|
|
29024
|
-
_this.value = res;
|
|
29025
|
-
}
|
|
29063
|
+
_this.runExpressionSetValue(res);
|
|
29026
29064
|
};
|
|
29027
29065
|
}
|
|
29028
29066
|
else {
|
|
@@ -30081,7 +30119,8 @@ var Question = /** @class */ (function (_super) {
|
|
|
30081
30119
|
var isParentReadOnly = !!this.parent && this.parent.isReadOnly;
|
|
30082
30120
|
var isPareQuestionReadOnly = !!this.parentQuestion && this.parentQuestion.isReadOnly;
|
|
30083
30121
|
var isSurveyReadOnly = !!this.survey && this.survey.isDisplayMode;
|
|
30084
|
-
|
|
30122
|
+
var callbackVal = !!this.readOnlyCallback && this.readOnlyCallback();
|
|
30123
|
+
return this.readOnly || isParentReadOnly || isSurveyReadOnly || isPareQuestionReadOnly || callbackVal;
|
|
30085
30124
|
},
|
|
30086
30125
|
enumerable: false,
|
|
30087
30126
|
configurable: true
|
|
@@ -30240,6 +30279,13 @@ var Question = /** @class */ (function (_super) {
|
|
|
30240
30279
|
return undefined;
|
|
30241
30280
|
return this.survey.runExpression(expression);
|
|
30242
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
|
+
});
|
|
30243
30289
|
Object.defineProperty(Question.prototype, "autoGrowComment", {
|
|
30244
30290
|
get: function () {
|
|
30245
30291
|
return this.survey && this.survey.autoGrowComment;
|
|
@@ -30794,7 +30840,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
30794
30840
|
if (values === void 0) { values = null; }
|
|
30795
30841
|
if (properties === void 0) { properties = null; }
|
|
30796
30842
|
var func = function (val) {
|
|
30797
|
-
_this.
|
|
30843
|
+
_this.runExpressionSetValueCore(val, setFunc);
|
|
30798
30844
|
};
|
|
30799
30845
|
if (!this.runDefaultValueExpression(runner, values, properties, func)) {
|
|
30800
30846
|
func(defaultValue);
|
|
@@ -30803,9 +30849,17 @@ var Question = /** @class */ (function (_super) {
|
|
|
30803
30849
|
Question.prototype.convertFuncValuetoQuestionValue = function (val) {
|
|
30804
30850
|
return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].convertValToQuestionVal(val);
|
|
30805
30851
|
};
|
|
30806
|
-
Question.prototype.
|
|
30852
|
+
Question.prototype.runExpressionSetValueCore = function (val, setFunc) {
|
|
30807
30853
|
setFunc(this.convertFuncValuetoQuestionValue(val));
|
|
30808
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
|
+
};
|
|
30809
30863
|
Question.prototype.runDefaultValueExpression = function (runner, values, properties, setFunc) {
|
|
30810
30864
|
var _this = this;
|
|
30811
30865
|
if (values === void 0) { values = null; }
|
|
@@ -30814,11 +30868,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
30814
30868
|
return false;
|
|
30815
30869
|
if (!setFunc) {
|
|
30816
30870
|
setFunc = function (val) {
|
|
30817
|
-
_this.runExpressionSetValue(val
|
|
30818
|
-
if (!_this.isTwoValueEquals(_this.value, val)) {
|
|
30819
|
-
_this.value = val;
|
|
30820
|
-
}
|
|
30821
|
-
});
|
|
30871
|
+
_this.runExpressionSetValue(val);
|
|
30822
30872
|
};
|
|
30823
30873
|
}
|
|
30824
30874
|
if (!values)
|
|
@@ -31435,7 +31485,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
31435
31485
|
var scrollableSelector_1 = this.getObservedElementSelector();
|
|
31436
31486
|
if (!scrollableSelector_1)
|
|
31437
31487
|
return;
|
|
31438
|
-
var defaultRootEl = el
|
|
31488
|
+
var defaultRootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
|
|
31439
31489
|
if (!defaultRootEl)
|
|
31440
31490
|
return;
|
|
31441
31491
|
var isProcessed_1 = false;
|
|
@@ -31447,7 +31497,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
31447
31497
|
isProcessed_1 = false;
|
|
31448
31498
|
}
|
|
31449
31499
|
var callback = function () {
|
|
31450
|
-
var rootEl = el
|
|
31500
|
+
var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
|
|
31451
31501
|
if (!requiredWidth_1 && _this.isDefaultRendering()) {
|
|
31452
31502
|
requiredWidth_1 = rootEl.scrollWidth;
|
|
31453
31503
|
}
|
|
@@ -31472,8 +31522,10 @@ var Question = /** @class */ (function (_super) {
|
|
|
31472
31522
|
});
|
|
31473
31523
|
this.onMobileChangedCallback = function () {
|
|
31474
31524
|
setTimeout(function () {
|
|
31475
|
-
var rootEl = el
|
|
31476
|
-
|
|
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
|
+
}
|
|
31477
31529
|
}, 0);
|
|
31478
31530
|
};
|
|
31479
31531
|
this.resizeObserver.observe(el);
|
|
@@ -32106,6 +32158,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
32106
32158
|
_this.isUpdatingChoicesDependedQuestions = false;
|
|
32107
32159
|
_this.headItemsCount = 0;
|
|
32108
32160
|
_this.footItemsCount = 0;
|
|
32161
|
+
_this.allowMultiColumns = true;
|
|
32109
32162
|
_this.prevIsOtherSelected = false;
|
|
32110
32163
|
_this.noneItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].noneItemValue, "noneText", "noneItemText");
|
|
32111
32164
|
_this.refuseItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].refuseItemValue, "refuseText", "refuseItemText");
|
|
@@ -34126,9 +34179,23 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
34126
34179
|
enumerable: false,
|
|
34127
34180
|
configurable: true
|
|
34128
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
|
+
};
|
|
34129
34196
|
Object.defineProperty(QuestionSelectBase.prototype, "hasColumns", {
|
|
34130
34197
|
get: function () {
|
|
34131
|
-
return !this.isMobile &&
|
|
34198
|
+
return !this.isMobile && this.allowMultiColumns &&
|
|
34132
34199
|
(this.getCurrentColCount() > 1);
|
|
34133
34200
|
},
|
|
34134
34201
|
enumerable: false,
|
|
@@ -34245,6 +34312,10 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
34245
34312
|
Object.defineProperty(QuestionSelectBase.prototype, "itemComponent", {
|
|
34246
34313
|
/**
|
|
34247
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))
|
|
34248
34319
|
*/
|
|
34249
34320
|
get: function () {
|
|
34250
34321
|
return this.getPropertyValue("itemComponent", this.getDefaultItemComponent());
|
|
@@ -34282,6 +34353,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
34282
34353
|
__decorate([
|
|
34283
34354
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ localizable: true })
|
|
34284
34355
|
], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
|
|
34356
|
+
__decorate([
|
|
34357
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
34358
|
+
], QuestionSelectBase.prototype, "allowMultiColumns", void 0);
|
|
34285
34359
|
return QuestionSelectBase;
|
|
34286
34360
|
}(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));
|
|
34287
34361
|
|
|
@@ -35511,7 +35585,8 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
35511
35585
|
if (!itemValues.length && !selectedItemValues) {
|
|
35512
35586
|
this.updateSelectedItemValues();
|
|
35513
35587
|
}
|
|
35514
|
-
|
|
35588
|
+
var validValues = this.validateItemValues(itemValues);
|
|
35589
|
+
return validValues;
|
|
35515
35590
|
},
|
|
35516
35591
|
enumerable: false,
|
|
35517
35592
|
configurable: true
|
|
@@ -35969,7 +36044,14 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
35969
36044
|
});
|
|
35970
36045
|
Object.defineProperty(QuestionCheckboxModel.prototype, "a11y_input_ariaRole", {
|
|
35971
36046
|
get: function () {
|
|
35972
|
-
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;
|
|
35973
36055
|
},
|
|
35974
36056
|
enumerable: false,
|
|
35975
36057
|
configurable: true
|
|
@@ -36321,9 +36403,12 @@ var ComponentQuestionJSON = /** @class */ (function () {
|
|
|
36321
36403
|
this.json.onUpdateQuestionCssClasses(question, element, css);
|
|
36322
36404
|
};
|
|
36323
36405
|
ComponentQuestionJSON.prototype.onSetQuestionValue = function (question, newValue) {
|
|
36324
|
-
if (
|
|
36325
|
-
|
|
36326
|
-
|
|
36406
|
+
if (this.json.onSetQuestionValue) {
|
|
36407
|
+
this.json.onSetQuestionValue(question, newValue);
|
|
36408
|
+
}
|
|
36409
|
+
if (this.json.onValueSet) {
|
|
36410
|
+
this.json.onValueSet(question, newValue);
|
|
36411
|
+
}
|
|
36327
36412
|
};
|
|
36328
36413
|
ComponentQuestionJSON.prototype.onPropertyChanged = function (question, propertyName, newValue) {
|
|
36329
36414
|
if (!this.json.onPropertyChanged)
|
|
@@ -37714,7 +37799,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
|
37714
37799
|
return _super.prototype.hasUnknownValue.call(this, val, true, false);
|
|
37715
37800
|
};
|
|
37716
37801
|
QuestionDropdownModel.prototype.getItemIfChoicesNotContainThisValue = function (value, text) {
|
|
37717
|
-
if (this.choicesLazyLoadEnabled
|
|
37802
|
+
if (this.choicesLazyLoadEnabled) {
|
|
37718
37803
|
return this.createItemValue(value, text);
|
|
37719
37804
|
}
|
|
37720
37805
|
else {
|
|
@@ -41813,6 +41898,8 @@ var MatrixDropdownRowModel = /** @class */ (function (_super) {
|
|
|
41813
41898
|
enumerable: false,
|
|
41814
41899
|
configurable: true
|
|
41815
41900
|
});
|
|
41901
|
+
MatrixDropdownRowModel.prototype.isRowEnabled = function () { return this.item.isEnabled; };
|
|
41902
|
+
MatrixDropdownRowModel.prototype.isRowHasEnabledCondition = function () { return !!this.item.enableIf; };
|
|
41816
41903
|
return MatrixDropdownRowModel;
|
|
41817
41904
|
}(_question_matrixdropdownbase__WEBPACK_IMPORTED_MODULE_0__["MatrixDropdownRowModelBase"]));
|
|
41818
41905
|
|
|
@@ -42111,7 +42198,9 @@ var MatrixDropdownCell = /** @class */ (function () {
|
|
|
42111
42198
|
this.question.locStrsChanged();
|
|
42112
42199
|
};
|
|
42113
42200
|
MatrixDropdownCell.prototype.createQuestion = function (column, row, data) {
|
|
42201
|
+
var _this = this;
|
|
42114
42202
|
var res = data.createQuestion(this.row, this.column);
|
|
42203
|
+
res.readOnlyCallback = function () { return !_this.row.isRowEnabled(); };
|
|
42115
42204
|
res.validateValueCallback = function () {
|
|
42116
42205
|
return data.validateCell(row, column.name, row.value);
|
|
42117
42206
|
};
|
|
@@ -42297,6 +42386,8 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
42297
42386
|
enumerable: false,
|
|
42298
42387
|
configurable: true
|
|
42299
42388
|
});
|
|
42389
|
+
MatrixDropdownRowModelBase.prototype.isRowEnabled = function () { return true; };
|
|
42390
|
+
MatrixDropdownRowModelBase.prototype.isRowHasEnabledCondition = function () { return false; };
|
|
42300
42391
|
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "value", {
|
|
42301
42392
|
get: function () {
|
|
42302
42393
|
var result = {};
|
|
@@ -42473,6 +42564,9 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
42473
42564
|
if (!!this.detailPanel) {
|
|
42474
42565
|
this.detailPanel.runCondition(values, newProps);
|
|
42475
42566
|
}
|
|
42567
|
+
if (this.isRowHasEnabledCondition()) {
|
|
42568
|
+
this.onQuestionReadOnlyChanged();
|
|
42569
|
+
}
|
|
42476
42570
|
};
|
|
42477
42571
|
MatrixDropdownRowModelBase.prototype.getNamesWithDefaultValues = function () {
|
|
42478
42572
|
var res = [];
|
|
@@ -42727,14 +42821,15 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
42727
42821
|
return;
|
|
42728
42822
|
this.updateCellOnColumnItemValueChanged(cell, propertyName, obj, name, newValue, oldValue);
|
|
42729
42823
|
};
|
|
42730
|
-
MatrixDropdownRowModelBase.prototype.onQuestionReadOnlyChanged = function (
|
|
42824
|
+
MatrixDropdownRowModelBase.prototype.onQuestionReadOnlyChanged = function () {
|
|
42731
42825
|
var questions = this.questions;
|
|
42732
42826
|
for (var i = 0; i < questions.length; i++) {
|
|
42733
42827
|
var q = questions[i];
|
|
42734
42828
|
q.setPropertyValue("isReadOnly", q.isReadOnly);
|
|
42735
42829
|
}
|
|
42736
42830
|
if (!!this.detailPanel) {
|
|
42737
|
-
this.
|
|
42831
|
+
var parentIsReadOnly = !!this.data && this.data.isMatrixReadOnly();
|
|
42832
|
+
this.detailPanel.readOnly = parentIsReadOnly || !this.isRowEnabled();
|
|
42738
42833
|
}
|
|
42739
42834
|
};
|
|
42740
42835
|
MatrixDropdownRowModelBase.prototype.hasErrors = function (fireCallback, rec, raiseOnCompletedAsyncValidators) {
|
|
@@ -43997,7 +44092,8 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
43997
44092
|
return questionPlainData;
|
|
43998
44093
|
};
|
|
43999
44094
|
QuestionMatrixDropdownModelBase.prototype.addConditionObjectsByContext = function (objects, context) {
|
|
44000
|
-
var
|
|
44095
|
+
var hasColumnContext = !!context && this.columns.indexOf(context) > -1;
|
|
44096
|
+
var hasContext = context === true || hasColumnContext;
|
|
44001
44097
|
var rowsIndeces = this.getConditionObjectsRowIndeces();
|
|
44002
44098
|
if (hasContext) {
|
|
44003
44099
|
rowsIndeces.push(-1);
|
|
@@ -44024,6 +44120,11 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
44024
44120
|
if (index === -1 && context === true) {
|
|
44025
44121
|
obj.context = this;
|
|
44026
44122
|
}
|
|
44123
|
+
else {
|
|
44124
|
+
if (hasColumnContext && prefixName.startsWith("row.")) {
|
|
44125
|
+
obj.context = context;
|
|
44126
|
+
}
|
|
44127
|
+
}
|
|
44027
44128
|
objects.push(obj);
|
|
44028
44129
|
}
|
|
44029
44130
|
}
|
|
@@ -44358,7 +44459,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
44358
44459
|
if (!this.generateRows)
|
|
44359
44460
|
return;
|
|
44360
44461
|
for (var i = 0; i < this.visibleRows.length; i++) {
|
|
44361
|
-
this.visibleRows[i].onQuestionReadOnlyChanged(
|
|
44462
|
+
this.visibleRows[i].onQuestionReadOnlyChanged();
|
|
44362
44463
|
}
|
|
44363
44464
|
};
|
|
44364
44465
|
//IMatrixDropdownData
|
|
@@ -44584,7 +44685,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
44584
44685
|
if (this.isDesignMode)
|
|
44585
44686
|
return this.detailPanel;
|
|
44586
44687
|
var panel = this.createNewDetailPanel();
|
|
44587
|
-
panel.readOnly = this.isReadOnly;
|
|
44688
|
+
panel.readOnly = this.isReadOnly || !row.isRowEnabled();
|
|
44588
44689
|
panel.setSurveyImpl(row);
|
|
44589
44690
|
var json = this.detailPanel.toJSON();
|
|
44590
44691
|
new _jsonobject__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]().toObject(json, panel);
|
|
@@ -44624,6 +44725,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
44624
44725
|
return data.getTextProcessor();
|
|
44625
44726
|
return null;
|
|
44626
44727
|
};
|
|
44728
|
+
QuestionMatrixDropdownModelBase.prototype.isMatrixReadOnly = function () { return this.isReadOnly; };
|
|
44627
44729
|
QuestionMatrixDropdownModelBase.prototype.getQuestionFromArray = function (name, index) {
|
|
44628
44730
|
if (index >= this.visibleRows.length)
|
|
44629
44731
|
return null;
|
|
@@ -44702,6 +44804,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownb
|
|
|
44702
44804
|
visible: false,
|
|
44703
44805
|
isLightSerializable: false,
|
|
44704
44806
|
},
|
|
44807
|
+
{ name: "columnsVisibleIf", visible: false },
|
|
44705
44808
|
{
|
|
44706
44809
|
name: "detailPanelMode",
|
|
44707
44810
|
choices: ["none", "underRow", "underRowSingle"],
|
|
@@ -52817,13 +52920,14 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52817
52920
|
if (_this.allowStartDrag &&
|
|
52818
52921
|
_this.canStartDragDueMaxSelectedChoices(target) &&
|
|
52819
52922
|
_this.canStartDragDueItemEnabled(choice)) {
|
|
52820
|
-
_this.
|
|
52923
|
+
_this.draggedChoiceValue = choice.value;
|
|
52821
52924
|
_this.draggedTargetNode = node;
|
|
52822
52925
|
_this.dragOrClickHelper.onPointerDown(event);
|
|
52823
52926
|
}
|
|
52824
52927
|
};
|
|
52825
52928
|
_this.startDrag = function (event) {
|
|
52826
|
-
|
|
52929
|
+
var choice = _itemvalue__WEBPACK_IMPORTED_MODULE_2__["ItemValue"].getItemByValue(_this.activeChoices, _this.draggedChoiceValue);
|
|
52930
|
+
_this.dragDropRankingChoices.startDrag(event, choice, _this, _this.draggedTargetNode);
|
|
52827
52931
|
};
|
|
52828
52932
|
_this.handlePointerUp = function (event, choice, node) {
|
|
52829
52933
|
if (!_this.selectToRankEnabled)
|
|
@@ -53301,9 +53405,6 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
53301
53405
|
enumerable: false,
|
|
53302
53406
|
configurable: true
|
|
53303
53407
|
});
|
|
53304
|
-
/**
|
|
53305
|
-
* The name of a component used to render items.
|
|
53306
|
-
*/
|
|
53307
53408
|
QuestionRankingModel.prototype.getDefaultItemComponent = function () {
|
|
53308
53409
|
return "sv-ranking-item";
|
|
53309
53410
|
};
|
|
@@ -54268,20 +54369,11 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
54268
54369
|
if (this.scaleColorMode === "monochrome" && this.rateColorMode == "default" ||
|
|
54269
54370
|
this.isPreviewStyle ||
|
|
54270
54371
|
this.isReadOnlyStyle)
|
|
54271
|
-
return {
|
|
54372
|
+
return {};
|
|
54272
54373
|
var index = this.visibleRateValues.indexOf(item);
|
|
54273
54374
|
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
|
-
}
|
|
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 };
|
|
54285
54377
|
};
|
|
54286
54378
|
QuestionRatingModel.prototype.getItemClass = function (item, highlight) {
|
|
54287
54379
|
var _this = this;
|
|
@@ -55467,8 +55559,7 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
55467
55559
|
}
|
|
55468
55560
|
};
|
|
55469
55561
|
QuestionTagboxModel.prototype.getItemIfChoicesNotContainThisValue = function (value, text) {
|
|
55470
|
-
|
|
55471
|
-
if (this.choicesLazyLoadEnabled && !((_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.isAllDataLoaded)) {
|
|
55562
|
+
if (this.choicesLazyLoadEnabled) {
|
|
55472
55563
|
return this.createItemValue(value, text);
|
|
55473
55564
|
}
|
|
55474
55565
|
else {
|
|
@@ -56291,7 +56382,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
56291
56382
|
if (this.inputTextAlignment !== "auto") {
|
|
56292
56383
|
style.textAlign = this.inputTextAlignment;
|
|
56293
56384
|
}
|
|
56294
|
-
else if (this.maskSettings.getTextAlignment() !== "auto") {
|
|
56385
|
+
else if (!this.maskTypeIsEmpty && this.maskSettings.getTextAlignment() !== "auto") {
|
|
56295
56386
|
style.textAlign = this.maskSettings.getTextAlignment();
|
|
56296
56387
|
}
|
|
56297
56388
|
};
|
|
@@ -57506,11 +57597,18 @@ var settings = {
|
|
|
57506
57597
|
*/
|
|
57507
57598
|
ratingMaximumRateValueCount: 20,
|
|
57508
57599
|
/**
|
|
57509
|
-
* 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.
|
|
57510
57601
|
*
|
|
57511
|
-
* 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.
|
|
57512
57603
|
*/
|
|
57513
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
|
+
*/
|
|
57514
57612
|
dropdownSearchDelay: 500,
|
|
57515
57613
|
/**
|
|
57516
57614
|
* A function that activates a browser confirm dialog.
|
|
@@ -61624,6 +61722,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61624
61722
|
*
|
|
61625
61723
|
* You can override this property for individual Long Text questions: [`autoGrow`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#autoGrow).
|
|
61626
61724
|
* @see allowResizeComment
|
|
61725
|
+
* @see commentAreaRows
|
|
61627
61726
|
*/
|
|
61628
61727
|
get: function () {
|
|
61629
61728
|
return this.getPropertyValue("autoGrowComment");
|
|
@@ -61642,6 +61741,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61642
61741
|
*
|
|
61643
61742
|
* You can override this property for individual Long Text questions: [`allowResize`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#allowResize).
|
|
61644
61743
|
* @see autoGrowComment
|
|
61744
|
+
* @see commentAreaRows
|
|
61645
61745
|
*/
|
|
61646
61746
|
get: function () {
|
|
61647
61747
|
return this.getPropertyValue("allowResizeComment");
|
|
@@ -61652,6 +61752,25 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61652
61752
|
enumerable: false,
|
|
61653
61753
|
configurable: true
|
|
61654
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
|
+
});
|
|
61655
61774
|
Object.defineProperty(SurveyModel.prototype, "textUpdateMode", {
|
|
61656
61775
|
/**
|
|
61657
61776
|
* Specifies when to update the question value in questions with a text input field.
|
|
@@ -61783,6 +61902,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61783
61902
|
this.localeChanged();
|
|
61784
61903
|
this.onLocaleChangedEvent.fire(this, this.locale);
|
|
61785
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
|
+
});
|
|
61786
61912
|
/**
|
|
61787
61913
|
* Returns an array of locales whose translations are used in the survey.
|
|
61788
61914
|
*
|
|
@@ -68404,6 +68530,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
|
68404
68530
|
},
|
|
68405
68531
|
{ name: "autoGrowComment:boolean", default: false },
|
|
68406
68532
|
{ name: "allowResizeComment:boolean", default: true },
|
|
68533
|
+
{ name: "commentAreaRows:number", minValue: 1 },
|
|
68407
68534
|
{
|
|
68408
68535
|
name: "startSurveyText",
|
|
68409
68536
|
serializationProperty: "locStartSurveyText",
|
|
@@ -68555,6 +68682,7 @@ var surveyLocalization = {
|
|
|
68555
68682
|
defaultLocaleValue: "en",
|
|
68556
68683
|
locales: {},
|
|
68557
68684
|
localeNames: {},
|
|
68685
|
+
localeDirections: {},
|
|
68558
68686
|
supportedLocales: [],
|
|
68559
68687
|
get currentLocale() {
|
|
68560
68688
|
return this.currentLocaleValue === this.defaultLocaleValue ? "" : this.currentLocaleValue;
|