survey-core 1.10.1 → 1.10.2
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 +78 -2
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +78 -2
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- 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 +8 -25
- package/i18n/german.js.map +1 -1
- package/i18n/german.min.js +2 -2
- 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 +8 -25
- 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/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 +1 -1
- package/modern.fontless.css +1 -1
- package/modern.fontless.min.css +1 -1
- package/modern.min.css +1 -1
- 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 +141 -87
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.i18n.js +8 -25
- package/survey.i18n.js.map +1 -1
- package/survey.i18n.min.js +2 -2
- package/survey.min.css +1 -1
- 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/dropdownListModel.d.ts +1 -0
- package/ts3.4/typings/list.d.ts +2 -2
- package/ts3.4/typings/multiSelectListModel.d.ts +1 -1
- package/ts3.4/typings/page.d.ts +0 -2
- package/ts3.4/typings/panel.d.ts +2 -0
- package/ts3.4/typings/question_file.d.ts +2 -1
- package/ts3.4/typings/question_imagepicker.d.ts +1 -0
- package/ts3.4/typings/question_matrix.d.ts +3 -3
- package/ts3.4/typings/survey.d.ts +1 -0
- package/typings/dropdownListModel.d.ts +1 -0
- package/typings/list.d.ts +2 -2
- package/typings/multiSelectListModel.d.ts +1 -1
- package/typings/page.d.ts +0 -2
- package/typings/panel.d.ts +2 -0
- package/typings/question_file.d.ts +3 -1
- package/typings/question_imagepicker.d.ts +1 -0
- package/typings/question_matrix.d.ts +4 -3
- package/typings/survey.d.ts +1 -0
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.10.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.10.2
|
|
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
|
*/
|
|
@@ -742,8 +742,9 @@ function createDropdownActionModelAdvanced(actionOptions, listOptions, popupOpti
|
|
|
742
742
|
}
|
|
743
743
|
listOptions.onSelectionChanged(item);
|
|
744
744
|
innerPopupModel.toggleVisibility();
|
|
745
|
-
}, listOptions.allowSelection, listOptions.selectedItem
|
|
745
|
+
}, listOptions.allowSelection, listOptions.selectedItem);
|
|
746
746
|
listModel.locOwner = locOwner;
|
|
747
|
+
listModel.setOnFilterStringChangedCallback(listOptions.onFilterStringChangedCallback);
|
|
747
748
|
var innerPopupModel = new _popup__WEBPACK_IMPORTED_MODULE_4__["PopupModel"]("sv-list", { model: listModel }, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.verticalPosition, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.horizontalPosition, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.showPointer, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.isModal, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.onCancel, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.onApply, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.onHide, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.onShow, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.cssClass, popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.title, function () {
|
|
748
749
|
listModel.dispose();
|
|
749
750
|
});
|
|
@@ -994,9 +995,9 @@ var Action = /** @class */ (function (_super) {
|
|
|
994
995
|
//Object.assign(this, item) to support IE11
|
|
995
996
|
if (!!innerItem) {
|
|
996
997
|
for (var key in innerItem) {
|
|
997
|
-
if (key
|
|
998
|
-
|
|
999
|
-
|
|
998
|
+
if (key === "locTitle" || key === "title" && !!_this.locTitle && !!_this.title)
|
|
999
|
+
continue;
|
|
1000
|
+
_this[key] = innerItem[key];
|
|
1000
1001
|
}
|
|
1001
1002
|
}
|
|
1002
1003
|
if (!!_this.locTitleName) {
|
|
@@ -2242,8 +2243,6 @@ var Base = /** @class */ (function () {
|
|
|
2242
2243
|
* @param val A new value for the property.
|
|
2243
2244
|
*/
|
|
2244
2245
|
Base.prototype.setPropertyValue = function (name, val) {
|
|
2245
|
-
if (name) {
|
|
2246
|
-
}
|
|
2247
2246
|
if (!this.isLoadingFromJson) {
|
|
2248
2247
|
var prop = this.getPropertyByName(name);
|
|
2249
2248
|
if (!!prop) {
|
|
@@ -8097,6 +8096,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8097
8096
|
_this.showInputFieldComponent = _this.question.showInputFieldComponent;
|
|
8098
8097
|
_this.listModel = _this.createListModel();
|
|
8099
8098
|
_this.updateAfterListModelCreated(_this.listModel);
|
|
8099
|
+
_this.setChoicesLazyLoadEnabled(_this.question.choicesLazyLoadEnabled);
|
|
8100
8100
|
_this.setSearchEnabled(_this.question.searchEnabled);
|
|
8101
8101
|
_this.setTextWrapEnabled(_this.question.textWrapEnabled);
|
|
8102
8102
|
_this.createPopup();
|
|
@@ -8177,6 +8177,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8177
8177
|
}
|
|
8178
8178
|
if (option.isVisible && _this.question.choicesLazyLoadEnabled) {
|
|
8179
8179
|
_this.listModel.actions = [];
|
|
8180
|
+
_this.resetItemsSettings();
|
|
8180
8181
|
_this.updateQuestionChoices();
|
|
8181
8182
|
}
|
|
8182
8183
|
if (option.isVisible && !!_this.question.onOpenedCallBack) {
|
|
@@ -8247,7 +8248,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8247
8248
|
_this.popupModel.isVisible = false;
|
|
8248
8249
|
};
|
|
8249
8250
|
}
|
|
8250
|
-
var res = new _list__WEBPACK_IMPORTED_MODULE_4__["ListModel"](visibleItems, _onSelectionChanged, false, undefined, this.
|
|
8251
|
+
var res = new _list__WEBPACK_IMPORTED_MODULE_4__["ListModel"](visibleItems, _onSelectionChanged, false, undefined, this.listElementId);
|
|
8251
8252
|
this.setOnTextSearchCallbackForListModel(res);
|
|
8252
8253
|
res.renderElements = false;
|
|
8253
8254
|
res.forceShowFilter = true;
|
|
@@ -8480,6 +8481,9 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8480
8481
|
this.listModel.showSearchClearButton = _utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"];
|
|
8481
8482
|
this.searchEnabled = newValue;
|
|
8482
8483
|
};
|
|
8484
|
+
DropdownListModel.prototype.setChoicesLazyLoadEnabled = function (newValue) {
|
|
8485
|
+
this.listModel.setOnFilterStringChangedCallback(newValue ? this.listModelFilterStringChanged : undefined);
|
|
8486
|
+
};
|
|
8483
8487
|
DropdownListModel.prototype.updateItems = function () {
|
|
8484
8488
|
this.listModel.setItems(this.getAvailableItems());
|
|
8485
8489
|
};
|
|
@@ -8499,9 +8503,6 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8499
8503
|
if (options.name == "value") {
|
|
8500
8504
|
this.showInputFieldComponent = this.question.showInputFieldComponent;
|
|
8501
8505
|
}
|
|
8502
|
-
if (options.name == "choicesLazyLoadEnabled" && options.newValue) {
|
|
8503
|
-
this.listModel.setOnFilterStringChangedCallback(this.listModelFilterStringChanged);
|
|
8504
|
-
}
|
|
8505
8506
|
if (options.name == "textWrapEnabled") {
|
|
8506
8507
|
this.setTextWrapEnabled(options.newValue);
|
|
8507
8508
|
}
|
|
@@ -8830,7 +8831,7 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
|
|
|
8830
8831
|
}
|
|
8831
8832
|
};
|
|
8832
8833
|
}
|
|
8833
|
-
var res = new _multiSelectListModel__WEBPACK_IMPORTED_MODULE_3__["MultiSelectListModel"](visibleItems, _onSelectionChanged, false, undefined, this.
|
|
8834
|
+
var res = new _multiSelectListModel__WEBPACK_IMPORTED_MODULE_3__["MultiSelectListModel"](visibleItems, _onSelectionChanged, false, undefined, this.listElementId);
|
|
8834
8835
|
res.actions.forEach(function (a) { return a.disableTabStop = true; });
|
|
8835
8836
|
this.setOnTextSearchCallbackForListModel(res);
|
|
8836
8837
|
res.forceShowFilter = true;
|
|
@@ -9694,8 +9695,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9694
9695
|
|
|
9695
9696
|
var Version;
|
|
9696
9697
|
var ReleaseDate;
|
|
9697
|
-
Version = "" + "1.10.
|
|
9698
|
-
ReleaseDate = "" + "2024-04-
|
|
9698
|
+
Version = "" + "1.10.2";
|
|
9699
|
+
ReleaseDate = "" + "2024-04-30";
|
|
9699
9700
|
function checkLibraryVersion(ver, libraryName) {
|
|
9700
9701
|
if (Version != ver) {
|
|
9701
9702
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -20152,11 +20153,10 @@ var defaultListCss = {
|
|
|
20152
20153
|
};
|
|
20153
20154
|
var ListModel = /** @class */ (function (_super) {
|
|
20154
20155
|
__extends(ListModel, _super);
|
|
20155
|
-
function ListModel(items, onSelectionChanged, allowSelection, selectedItem,
|
|
20156
|
+
function ListModel(items, onSelectionChanged, allowSelection, selectedItem, elementId) {
|
|
20156
20157
|
var _this = _super.call(this) || this;
|
|
20157
20158
|
_this.onSelectionChanged = onSelectionChanged;
|
|
20158
20159
|
_this.allowSelection = allowSelection;
|
|
20159
|
-
_this.onFilterStringChangedCallback = onFilterStringChangedCallback;
|
|
20160
20160
|
_this.elementId = elementId;
|
|
20161
20161
|
_this.onItemClick = function (itemValue) {
|
|
20162
20162
|
if (_this.isItemDisabled(itemValue)) {
|
|
@@ -23272,8 +23272,8 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
23272
23272
|
|
|
23273
23273
|
var MultiSelectListModel = /** @class */ (function (_super) {
|
|
23274
23274
|
__extends(MultiSelectListModel, _super);
|
|
23275
|
-
function MultiSelectListModel(items, onSelectionChanged, allowSelection, selectedItems,
|
|
23276
|
-
var _this = _super.call(this, items, onSelectionChanged, allowSelection, undefined,
|
|
23275
|
+
function MultiSelectListModel(items, onSelectionChanged, allowSelection, selectedItems, elementId) {
|
|
23276
|
+
var _this = _super.call(this, items, onSelectionChanged, allowSelection, undefined, elementId) || this;
|
|
23277
23277
|
_this.onItemClick = function (item) {
|
|
23278
23278
|
if (_this.isItemDisabled(item))
|
|
23279
23279
|
return;
|
|
@@ -23507,7 +23507,6 @@ var PageModel = /** @class */ (function (_super) {
|
|
|
23507
23507
|
return _this.num + ". " + text;
|
|
23508
23508
|
return text;
|
|
23509
23509
|
};
|
|
23510
|
-
_this.createLocalizableString("navigationTitle", _this, true);
|
|
23511
23510
|
_this.createLocalizableString("navigationDescription", _this, true);
|
|
23512
23511
|
_this.dragDropPageHelper = new _drag_drop_page_helper_v1__WEBPACK_IMPORTED_MODULE_3__["DragDropPageHelperV1"](_this);
|
|
23513
23512
|
return _this;
|
|
@@ -23546,13 +23545,6 @@ var PageModel = /** @class */ (function (_super) {
|
|
|
23546
23545
|
enumerable: false,
|
|
23547
23546
|
configurable: true
|
|
23548
23547
|
});
|
|
23549
|
-
Object.defineProperty(PageModel.prototype, "locNavigationTitle", {
|
|
23550
|
-
get: function () {
|
|
23551
|
-
return this.getLocalizableString("navigationTitle");
|
|
23552
|
-
},
|
|
23553
|
-
enumerable: false,
|
|
23554
|
-
configurable: true
|
|
23555
|
-
});
|
|
23556
23548
|
Object.defineProperty(PageModel.prototype, "navigationDescription", {
|
|
23557
23549
|
/**
|
|
23558
23550
|
* Explanatory text displayed under a navigation button in the progress bar. Applies when the [progress bar is visible](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showProgressBar), `SurveyModel`'s [`progressBarType`](https://surveyjs.io/form-library/documentation/surveymodel#progressBarType) is set to `"pages"`, and [`progressBarShowPageTitles`](https://surveyjs.io/form-library/documentation/surveymodel#progressBarShowPageTitles) is `true`.
|
|
@@ -23574,16 +23566,12 @@ var PageModel = /** @class */ (function (_super) {
|
|
|
23574
23566
|
configurable: true
|
|
23575
23567
|
});
|
|
23576
23568
|
PageModel.prototype.navigationLocStrChanged = function () {
|
|
23569
|
+
if (this.locNavigationTitle.isEmpty) {
|
|
23570
|
+
this.locTitle.strChanged();
|
|
23571
|
+
}
|
|
23577
23572
|
this.locNavigationTitle.strChanged();
|
|
23578
23573
|
this.locNavigationDescription.strChanged();
|
|
23579
23574
|
};
|
|
23580
|
-
Object.defineProperty(PageModel.prototype, "renderedNavigationTitle", {
|
|
23581
|
-
get: function () {
|
|
23582
|
-
return this.locNavigationTitle.renderedHtml || this.title || this.name;
|
|
23583
|
-
},
|
|
23584
|
-
enumerable: false,
|
|
23585
|
-
configurable: true
|
|
23586
|
-
});
|
|
23587
23575
|
Object.defineProperty(PageModel.prototype, "passed", {
|
|
23588
23576
|
get: function () {
|
|
23589
23577
|
return this.getPropertyValue("passed", false);
|
|
@@ -24225,6 +24213,9 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24225
24213
|
_this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
|
|
24226
24214
|
_this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
|
|
24227
24215
|
_this.createLocalizableString("requiredErrorText", _this);
|
|
24216
|
+
_this.createLocalizableString("navigationTitle", _this, true).onGetTextCallback = function (text) {
|
|
24217
|
+
return text || _this.title || _this.name;
|
|
24218
|
+
};
|
|
24228
24219
|
_this.registerPropertyChangedHandlers(["questionTitleLocation"], function () {
|
|
24229
24220
|
_this.onVisibleChanged.bind(_this);
|
|
24230
24221
|
_this.updateElementCss(true);
|
|
@@ -24341,9 +24332,22 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24341
24332
|
this.elements[i].locStrsChanged();
|
|
24342
24333
|
}
|
|
24343
24334
|
};
|
|
24335
|
+
PanelModelBase.prototype.getMarkdownHtml = function (text, name) {
|
|
24336
|
+
if (name === "navigationTitle" && this.locNavigationTitle.isEmpty) {
|
|
24337
|
+
return this.locTitle.renderedHtml || this.name;
|
|
24338
|
+
}
|
|
24339
|
+
return _super.prototype.getMarkdownHtml.call(this, text, name);
|
|
24340
|
+
};
|
|
24341
|
+
Object.defineProperty(PanelModelBase.prototype, "locNavigationTitle", {
|
|
24342
|
+
get: function () {
|
|
24343
|
+
return this.getLocalizableString("navigationTitle");
|
|
24344
|
+
},
|
|
24345
|
+
enumerable: false,
|
|
24346
|
+
configurable: true
|
|
24347
|
+
});
|
|
24344
24348
|
Object.defineProperty(PanelModelBase.prototype, "renderedNavigationTitle", {
|
|
24345
24349
|
get: function () {
|
|
24346
|
-
return this.
|
|
24350
|
+
return this.locNavigationTitle.renderedHtml;
|
|
24347
24351
|
},
|
|
24348
24352
|
enumerable: false,
|
|
24349
24353
|
configurable: true
|
|
@@ -37335,7 +37339,13 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
|
37335
37339
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: "" })
|
|
37336
37340
|
], QuestionDropdownModel.prototype, "readOnlyText", void 0);
|
|
37337
37341
|
__decorate([
|
|
37338
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])(
|
|
37342
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
|
|
37343
|
+
onSet: function (newValue, target) {
|
|
37344
|
+
if (!!target.dropdownListModel) {
|
|
37345
|
+
target.dropdownListModel.setChoicesLazyLoadEnabled(newValue);
|
|
37346
|
+
}
|
|
37347
|
+
}
|
|
37348
|
+
})
|
|
37339
37349
|
], QuestionDropdownModel.prototype, "choicesLazyLoadEnabled", void 0);
|
|
37340
37350
|
__decorate([
|
|
37341
37351
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
@@ -38236,6 +38246,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
38236
38246
|
}
|
|
38237
38247
|
};
|
|
38238
38248
|
_this.createLocalizableString("takePhotoCaption", _this, false, true);
|
|
38249
|
+
_this.createLocalizableString("clearCaption", _this, false, true);
|
|
38239
38250
|
_this.actionsContainer = new _actions_container__WEBPACK_IMPORTED_MODULE_7__["ActionContainer"]();
|
|
38240
38251
|
_this.actionsContainer.locOwner = _this;
|
|
38241
38252
|
_this.fileIndexAction = new _actions_action__WEBPACK_IMPORTED_MODULE_8__["Action"]({
|
|
@@ -38312,7 +38323,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
38312
38323
|
iconName: "icon-clear",
|
|
38313
38324
|
id: "sv-file-clean",
|
|
38314
38325
|
iconSize: "auto",
|
|
38315
|
-
|
|
38326
|
+
locTitle: _this.locClearButtonCaption,
|
|
38316
38327
|
showTitle: false,
|
|
38317
38328
|
enabledIf: function () { return !_this.isInputReadOnly; },
|
|
38318
38329
|
innerCss: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return _this.cssClasses.removeButton; }),
|
|
@@ -38624,6 +38635,23 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
38624
38635
|
enumerable: false,
|
|
38625
38636
|
configurable: true
|
|
38626
38637
|
});
|
|
38638
|
+
Object.defineProperty(QuestionFileModel.prototype, "clearButtonCaption", {
|
|
38639
|
+
get: function () {
|
|
38640
|
+
return this.getLocalizableStringText("clearCaption");
|
|
38641
|
+
},
|
|
38642
|
+
set: function (value) {
|
|
38643
|
+
this.setLocalizableStringText("clearCaption", value);
|
|
38644
|
+
},
|
|
38645
|
+
enumerable: false,
|
|
38646
|
+
configurable: true
|
|
38647
|
+
});
|
|
38648
|
+
Object.defineProperty(QuestionFileModel.prototype, "locClearButtonCaption", {
|
|
38649
|
+
get: function () {
|
|
38650
|
+
return this.getLocalizableString("clearCaption");
|
|
38651
|
+
},
|
|
38652
|
+
enumerable: false,
|
|
38653
|
+
configurable: true
|
|
38654
|
+
});
|
|
38627
38655
|
Object.defineProperty(QuestionFileModel.prototype, "locRenderedPlaceholder", {
|
|
38628
38656
|
get: function () {
|
|
38629
38657
|
var _this = this;
|
|
@@ -39199,9 +39227,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
39199
39227
|
__decorate([
|
|
39200
39228
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "replaceFileCaption" } })
|
|
39201
39229
|
], QuestionFileModel.prototype, "replaceButtonCaption", void 0);
|
|
39202
|
-
__decorate([
|
|
39203
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "clearCaption" } })
|
|
39204
|
-
], QuestionFileModel.prototype, "clearButtonCaption", void 0);
|
|
39205
39230
|
__decorate([
|
|
39206
39231
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "removeFileCaption" } })
|
|
39207
39232
|
], QuestionFileModel.prototype, "removeFileCaption", void 0);
|
|
@@ -40223,6 +40248,9 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
|
|
|
40223
40248
|
QuestionImagePickerModel.prototype.needResponsiveness = function () {
|
|
40224
40249
|
return this.supportResponsiveness() && this.isDefaultV2Theme;
|
|
40225
40250
|
};
|
|
40251
|
+
QuestionImagePickerModel.prototype.needResponsiveWidth = function () {
|
|
40252
|
+
return this.colCount > 2;
|
|
40253
|
+
};
|
|
40226
40254
|
QuestionImagePickerModel.prototype.getCurrentColCount = function () {
|
|
40227
40255
|
if (this.responsiveColCount === undefined || this.colCount === 0) {
|
|
40228
40256
|
return this.colCount;
|
|
@@ -40454,6 +40482,9 @@ var MatrixRowModel = /** @class */ (function (_super) {
|
|
|
40454
40482
|
if (_this.data)
|
|
40455
40483
|
_this.data.onMatrixRowChanged(_this);
|
|
40456
40484
|
});
|
|
40485
|
+
if (_this.data && _this.data.hasErrorInRow(_this)) {
|
|
40486
|
+
_this.hasError = true;
|
|
40487
|
+
}
|
|
40457
40488
|
return _this;
|
|
40458
40489
|
}
|
|
40459
40490
|
Object.defineProperty(MatrixRowModel.prototype, "name", {
|
|
@@ -40504,11 +40535,21 @@ var MatrixRowModel = /** @class */ (function (_super) {
|
|
|
40504
40535
|
enumerable: false,
|
|
40505
40536
|
configurable: true
|
|
40506
40537
|
});
|
|
40538
|
+
Object.defineProperty(MatrixRowModel.prototype, "hasError", {
|
|
40539
|
+
get: function () {
|
|
40540
|
+
return this.getPropertyValue("hasError", false);
|
|
40541
|
+
},
|
|
40542
|
+
set: function (val) {
|
|
40543
|
+
this.setPropertyValue("hasError", val);
|
|
40544
|
+
},
|
|
40545
|
+
enumerable: false,
|
|
40546
|
+
configurable: true
|
|
40547
|
+
});
|
|
40507
40548
|
Object.defineProperty(MatrixRowModel.prototype, "rowClasses", {
|
|
40508
40549
|
get: function () {
|
|
40509
40550
|
var cssClasses = this.data.cssClasses;
|
|
40510
40551
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]().append(cssClasses.row)
|
|
40511
|
-
.append(cssClasses.rowError, this.
|
|
40552
|
+
.append(cssClasses.rowError, this.hasError)
|
|
40512
40553
|
.append(cssClasses.rowReadOnly, this.isReadOnly)
|
|
40513
40554
|
.append(cssClasses.rowDisabled, this.data.isDisabledStyle)
|
|
40514
40555
|
.toString();
|
|
@@ -40834,7 +40875,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
40834
40875
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]()
|
|
40835
40876
|
.append(css.cell, hasCellText)
|
|
40836
40877
|
.append(hasCellText ? css.cellText : css.label)
|
|
40837
|
-
.append(css.itemOnError, !hasCellText && (this.isAllRowRequired
|
|
40878
|
+
.append(css.itemOnError, !hasCellText && (this.isAllRowRequired || this.eachRowUnique ? row.hasError : this.hasCssError()))
|
|
40838
40879
|
.append(hasCellText ? css.cellTextSelected : css.itemChecked, isChecked)
|
|
40839
40880
|
.append(hasCellText ? css.cellTextDisabled : css.itemDisabled, this.isDisabledStyle)
|
|
40840
40881
|
.append(hasCellText ? css.cellTextReadOnly : css.itemReadOnly, this.isReadOnlyStyle)
|
|
@@ -40964,72 +41005,76 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
40964
41005
|
return loc ? loc : this.emptyLocalizableString;
|
|
40965
41006
|
};
|
|
40966
41007
|
QuestionMatrixModel.prototype.supportGoNextPageAutomatic = function () {
|
|
40967
|
-
return this.isMouseDown === true && this.hasValuesInAllRows(
|
|
41008
|
+
return this.isMouseDown === true && this.hasValuesInAllRows();
|
|
40968
41009
|
};
|
|
40969
41010
|
QuestionMatrixModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
|
40970
41011
|
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
|
40971
|
-
this.errorsInRow = undefined;
|
|
40972
41012
|
if (!isOnValueChanged || this.hasCssError()) {
|
|
40973
|
-
|
|
41013
|
+
var rowsErrors = { noValue: false, isNotUnique: false };
|
|
41014
|
+
this.checkErrorsAllRows(true, rowsErrors);
|
|
41015
|
+
if (rowsErrors.noValue) {
|
|
40974
41016
|
errors.push(new _error__WEBPACK_IMPORTED_MODULE_6__["RequiredInAllRowsError"](null, this));
|
|
40975
41017
|
}
|
|
40976
|
-
if (
|
|
41018
|
+
if (rowsErrors.isNotUnique) {
|
|
40977
41019
|
errors.push(new _error__WEBPACK_IMPORTED_MODULE_6__["EachRowUniqueError"](null, this));
|
|
40978
41020
|
}
|
|
40979
41021
|
}
|
|
40980
41022
|
};
|
|
40981
|
-
QuestionMatrixModel.prototype.
|
|
40982
|
-
|
|
40983
|
-
|
|
40984
|
-
|
|
40985
|
-
return this.eachRowUnique && this.hasNonUniqueValueInRow();
|
|
41023
|
+
QuestionMatrixModel.prototype.hasValuesInAllRows = function () {
|
|
41024
|
+
var rowsErrors = { noValue: false, isNotUnique: false };
|
|
41025
|
+
this.checkErrorsAllRows(false, rowsErrors, true);
|
|
41026
|
+
return !rowsErrors.noValue;
|
|
40986
41027
|
};
|
|
40987
|
-
QuestionMatrixModel.prototype.
|
|
41028
|
+
QuestionMatrixModel.prototype.checkErrorsAllRows = function (modifyErrors, res, allRowsRequired) {
|
|
41029
|
+
var _this = this;
|
|
40988
41030
|
var rows = this.generatedVisibleRows;
|
|
40989
41031
|
if (!rows)
|
|
40990
41032
|
rows = this.visibleRows;
|
|
40991
41033
|
if (!rows)
|
|
40992
|
-
return
|
|
40993
|
-
var
|
|
40994
|
-
|
|
40995
|
-
|
|
40996
|
-
|
|
40997
|
-
|
|
40998
|
-
|
|
40999
|
-
}
|
|
41000
|
-
res = res && hasValue;
|
|
41034
|
+
return;
|
|
41035
|
+
var rowsRequired = this.isAllRowRequired || allRowsRequired;
|
|
41036
|
+
var rowsUnique = this.eachRowUnique;
|
|
41037
|
+
res.noValue = false;
|
|
41038
|
+
res.isNotUnique = false;
|
|
41039
|
+
if (modifyErrors) {
|
|
41040
|
+
this.errorsInRow = undefined;
|
|
41001
41041
|
}
|
|
41002
|
-
|
|
41003
|
-
|
|
41004
|
-
QuestionMatrixModel.prototype.hasNonUniqueValueInRow = function () {
|
|
41005
|
-
var rows = this.generatedVisibleRows;
|
|
41006
|
-
if (!rows)
|
|
41007
|
-
rows = this.visibleRows;
|
|
41008
|
-
if (!rows)
|
|
41009
|
-
return false;
|
|
41042
|
+
if (!rowsRequired && !rowsUnique)
|
|
41043
|
+
return;
|
|
41010
41044
|
var hash = {};
|
|
41011
|
-
var res = true;
|
|
41012
41045
|
for (var i = 0; i < rows.length; i++) {
|
|
41013
41046
|
var val = rows[i].value;
|
|
41014
41047
|
var isEmpty = this.isValueEmpty(val);
|
|
41015
|
-
var
|
|
41016
|
-
|
|
41048
|
+
var isNotUnique = rowsUnique && (!isEmpty && hash[val] === true);
|
|
41049
|
+
isEmpty = isEmpty && rowsRequired;
|
|
41050
|
+
if (modifyErrors && (isEmpty || isNotUnique)) {
|
|
41017
41051
|
this.addErrorIntoRow(rows[i]);
|
|
41018
41052
|
}
|
|
41019
|
-
res = res && isUnique;
|
|
41020
41053
|
if (!isEmpty) {
|
|
41021
41054
|
hash[val] = true;
|
|
41022
41055
|
}
|
|
41056
|
+
res.noValue = res.noValue || isEmpty;
|
|
41057
|
+
res.isNotUnique = res.isNotUnique || isNotUnique;
|
|
41058
|
+
}
|
|
41059
|
+
if (modifyErrors) {
|
|
41060
|
+
rows.forEach(function (row) {
|
|
41061
|
+
row.hasError = _this.hasErrorInRow(row);
|
|
41062
|
+
});
|
|
41023
41063
|
}
|
|
41024
|
-
return !res;
|
|
41025
41064
|
};
|
|
41026
41065
|
QuestionMatrixModel.prototype.addErrorIntoRow = function (row) {
|
|
41027
41066
|
if (!this.errorsInRow)
|
|
41028
41067
|
this.errorsInRow = {};
|
|
41029
41068
|
this.errorsInRow[row.name] = true;
|
|
41069
|
+
row.hasError = true;
|
|
41070
|
+
};
|
|
41071
|
+
QuestionMatrixModel.prototype.refreshRowsErrors = function () {
|
|
41072
|
+
if (!this.errorsInRow)
|
|
41073
|
+
return;
|
|
41074
|
+
this.checkErrorsAllRows(true, { noValue: false, isNotUnique: false });
|
|
41030
41075
|
};
|
|
41031
41076
|
QuestionMatrixModel.prototype.getIsAnswered = function () {
|
|
41032
|
-
return _super.prototype.getIsAnswered.call(this) && this.hasValuesInAllRows(
|
|
41077
|
+
return _super.prototype.getIsAnswered.call(this) && this.hasValuesInAllRows();
|
|
41033
41078
|
};
|
|
41034
41079
|
QuestionMatrixModel.prototype.createMatrixRow = function (item, fullName, value) {
|
|
41035
41080
|
var row = new MatrixRowModel(item, fullName, this, value);
|
|
@@ -41058,6 +41103,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
41058
41103
|
this.generatedVisibleRows[i].setValueDirectly(rowVal);
|
|
41059
41104
|
}
|
|
41060
41105
|
}
|
|
41106
|
+
this.refreshRowsErrors();
|
|
41061
41107
|
this.updateIsAnswered();
|
|
41062
41108
|
this.isRowChanging = false;
|
|
41063
41109
|
};
|
|
@@ -50823,11 +50869,16 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
50823
50869
|
var prefixName = this.getValueName() + indexStr;
|
|
50824
50870
|
var prefixText = this.processedTitle + indexStr;
|
|
50825
50871
|
for (var i = 0; i < panelObjs.length; i++) {
|
|
50826
|
-
|
|
50827
|
-
|
|
50828
|
-
|
|
50829
|
-
|
|
50830
|
-
|
|
50872
|
+
if (!!panelObjs[i].context) {
|
|
50873
|
+
objects.push(panelObjs[i]);
|
|
50874
|
+
}
|
|
50875
|
+
else {
|
|
50876
|
+
objects.push({
|
|
50877
|
+
name: prefixName + panelObjs[i].name,
|
|
50878
|
+
text: prefixText + panelObjs[i].text,
|
|
50879
|
+
question: panelObjs[i].question,
|
|
50880
|
+
});
|
|
50881
|
+
}
|
|
50831
50882
|
}
|
|
50832
50883
|
}
|
|
50833
50884
|
if (hasContext) {
|
|
@@ -50841,9 +50892,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
50841
50892
|
text: prefixText + QuestionPanelDynamicItem.ItemVariableName + "." + panelObjs[i].text,
|
|
50842
50893
|
question: panelObjs[i].question
|
|
50843
50894
|
};
|
|
50844
|
-
|
|
50845
|
-
obj.context = this;
|
|
50846
|
-
}
|
|
50895
|
+
obj.context = this;
|
|
50847
50896
|
objects.push(obj);
|
|
50848
50897
|
}
|
|
50849
50898
|
}
|
|
@@ -54816,7 +54865,13 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
54816
54865
|
})
|
|
54817
54866
|
], QuestionTagboxModel.prototype, "hideSelectedItems", void 0);
|
|
54818
54867
|
__decorate([
|
|
54819
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])(
|
|
54868
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
|
|
54869
|
+
onSet: function (newValue, target) {
|
|
54870
|
+
if (!!target.dropdownListModel) {
|
|
54871
|
+
target.dropdownListModel.setChoicesLazyLoadEnabled(newValue);
|
|
54872
|
+
}
|
|
54873
|
+
}
|
|
54874
|
+
})
|
|
54820
54875
|
], QuestionTagboxModel.prototype, "choicesLazyLoadEnabled", void 0);
|
|
54821
54876
|
__decorate([
|
|
54822
54877
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
@@ -59803,6 +59858,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59803
59858
|
_this.skippedPages = [];
|
|
59804
59859
|
_this.skeletonComponentName = "sv-skeleton";
|
|
59805
59860
|
_this.taskManager = new _surveyTaskManager__WEBPACK_IMPORTED_MODULE_22__["SurveyTaskManagerModel"]();
|
|
59861
|
+
_this.questionErrorComponent = "sv-question-error";
|
|
59806
59862
|
if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_25__["DomDocumentHelper"].isAvailable()) {
|
|
59807
59863
|
SurveyModel.stylesManager = new _stylesmanager__WEBPACK_IMPORTED_MODULE_11__["StylesManager"]();
|
|
59808
59864
|
}
|
|
@@ -67467,7 +67523,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
|
67467
67523
|
{
|
|
67468
67524
|
name: "showProgressBar",
|
|
67469
67525
|
default: "off",
|
|
67470
|
-
choices: ["off", "auto", "
|
|
67526
|
+
choices: ["off", "auto", "aboveheader", "belowheader", "bottom", "topbottom"],
|
|
67471
67527
|
},
|
|
67472
67528
|
{
|
|
67473
67529
|
name: "progressBarType",
|
|
@@ -68106,11 +68162,9 @@ function createTOCListModel(survey, onAction) {
|
|
|
68106
68162
|
var _a;
|
|
68107
68163
|
var pagesSource = survey.questionsOnPageMode === "singlePage" ? (_a = survey.pages[0]) === null || _a === void 0 ? void 0 : _a.elements : survey.pages;
|
|
68108
68164
|
var items = (pagesSource || []).map(function (page) {
|
|
68109
|
-
var _a, _b;
|
|
68110
68165
|
return new _actions_action__WEBPACK_IMPORTED_MODULE_0__["Action"]({
|
|
68111
68166
|
id: page.name,
|
|
68112
|
-
locTitle:
|
|
68113
|
-
title: page.renderedNavigationTitle,
|
|
68167
|
+
locTitle: page.locNavigationTitle,
|
|
68114
68168
|
action: function () {
|
|
68115
68169
|
_global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomDocumentHelper"].activeElementBlur();
|
|
68116
68170
|
!!onAction && onAction();
|