survey-core 1.9.116 → 1.9.117
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/README.md +4 -0
- package/defaultV2.css +3 -3
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +3 -3
- 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 +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 +1 -1
- package/i18n/index.min.js +1 -1
- 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 +221 -76
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.i18n.js +1 -1
- package/survey.i18n.min.js +1 -1
- 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/console-warnings.d.ts +1 -0
- package/ts3.4/typings/dropdownListModel.d.ts +2 -1
- package/ts3.4/typings/localizablestring.d.ts +0 -1
- package/ts3.4/typings/martixBase.d.ts +1 -0
- package/ts3.4/typings/question.d.ts +2 -0
- package/ts3.4/typings/question_baseselect.d.ts +12 -2
- package/ts3.4/typings/question_checkbox.d.ts +5 -2
- package/ts3.4/typings/question_custom.d.ts +7 -1
- package/ts3.4/typings/question_imagepicker.d.ts +2 -1
- package/ts3.4/typings/settings.d.ts +5 -0
- package/ts3.4/typings/survey-events-api.d.ts +2 -2
- package/ts3.4/typings/survey.d.ts +1 -1
- package/typings/console-warnings.d.ts +1 -0
- package/typings/dropdownListModel.d.ts +2 -1
- package/typings/localizablestring.d.ts +0 -1
- package/typings/martixBase.d.ts +1 -0
- package/typings/question.d.ts +2 -0
- package/typings/question_baseselect.d.ts +12 -2
- package/typings/question_checkbox.d.ts +5 -2
- package/typings/question_custom.d.ts +7 -1
- package/typings/question_imagepicker.d.ts +2 -1
- package/typings/settings.d.ts +5 -0
- package/typings/survey-events-api.d.ts +2 -2
- package/typings/survey.d.ts +1 -1
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.117
|
|
3
3
|
* Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -4380,6 +4380,10 @@ var ConsoleWarnings = /** @class */ (function () {
|
|
|
4380
4380
|
// eslint-disable-next-line no-console
|
|
4381
4381
|
console.warn(text);
|
|
4382
4382
|
};
|
|
4383
|
+
ConsoleWarnings.error = function (text) {
|
|
4384
|
+
// eslint-disable-next-line no-console
|
|
4385
|
+
console.error(text);
|
|
4386
|
+
};
|
|
4383
4387
|
return ConsoleWarnings;
|
|
4384
4388
|
}());
|
|
4385
4389
|
|
|
@@ -8086,13 +8090,20 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8086
8090
|
enumerable: false,
|
|
8087
8091
|
configurable: true
|
|
8088
8092
|
});
|
|
8089
|
-
Object.defineProperty(DropdownListModel.prototype, "
|
|
8093
|
+
Object.defineProperty(DropdownListModel.prototype, "noTabIndex", {
|
|
8090
8094
|
get: function () {
|
|
8091
8095
|
return this.question.isInputReadOnly || this.searchEnabled;
|
|
8092
8096
|
},
|
|
8093
8097
|
enumerable: false,
|
|
8094
8098
|
configurable: true
|
|
8095
8099
|
});
|
|
8100
|
+
Object.defineProperty(DropdownListModel.prototype, "filterReadOnly", {
|
|
8101
|
+
get: function () {
|
|
8102
|
+
return this.question.isInputReadOnly || !this.searchEnabled || !this.focused;
|
|
8103
|
+
},
|
|
8104
|
+
enumerable: false,
|
|
8105
|
+
configurable: true
|
|
8106
|
+
});
|
|
8096
8107
|
Object.defineProperty(DropdownListModel.prototype, "filterStringEnabled", {
|
|
8097
8108
|
get: function () {
|
|
8098
8109
|
return !this.question.isInputReadOnly && this.searchEnabled;
|
|
@@ -8299,6 +8310,9 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8299
8310
|
DropdownListModel.prototype.scrollToFocusedItem = function () {
|
|
8300
8311
|
this.listModel.scrollToFocusedItem();
|
|
8301
8312
|
};
|
|
8313
|
+
__decorate([
|
|
8314
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
|
|
8315
|
+
], DropdownListModel.prototype, "focused", void 0);
|
|
8302
8316
|
__decorate([
|
|
8303
8317
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: true })
|
|
8304
8318
|
], DropdownListModel.prototype, "searchEnabled", void 0);
|
|
@@ -9259,8 +9273,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9259
9273
|
//import "../../modern.scss";
|
|
9260
9274
|
var Version;
|
|
9261
9275
|
var ReleaseDate;
|
|
9262
|
-
Version = "" + "1.9.
|
|
9263
|
-
ReleaseDate = "" + "2023-11-
|
|
9276
|
+
Version = "" + "1.9.117";
|
|
9277
|
+
ReleaseDate = "" + "2023-11-14";
|
|
9264
9278
|
function checkLibraryVersion(ver, libraryName) {
|
|
9265
9279
|
if (Version != ver) {
|
|
9266
9280
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -9304,6 +9318,8 @@ function _slk(k, lh, rd) {
|
|
|
9304
9318
|
var index = v.indexOf(";");
|
|
9305
9319
|
if (index < 0)
|
|
9306
9320
|
return;
|
|
9321
|
+
if (!checkPrefix(v.substring(0, index)))
|
|
9322
|
+
return;
|
|
9307
9323
|
v = v.substring(index + 1);
|
|
9308
9324
|
v.split(",").forEach(function (s) {
|
|
9309
9325
|
var i = s.indexOf("=");
|
|
@@ -9312,6 +9328,27 @@ function _slk(k, lh, rd) {
|
|
|
9312
9328
|
}
|
|
9313
9329
|
});
|
|
9314
9330
|
}
|
|
9331
|
+
function checkPrefix(prefix) {
|
|
9332
|
+
if (!prefix)
|
|
9333
|
+
return true;
|
|
9334
|
+
var s = "domains:";
|
|
9335
|
+
var index = prefix.indexOf(s);
|
|
9336
|
+
if (index < 0)
|
|
9337
|
+
return true;
|
|
9338
|
+
var ds = prefix.substring(index + s.length).toLowerCase().split(",");
|
|
9339
|
+
if (!Array.isArray(ds) || ds.length === 0)
|
|
9340
|
+
return true;
|
|
9341
|
+
if (typeof window !== "undefined" && !!window.location && !!window.location.hostname) {
|
|
9342
|
+
var hn = window.location.hostname.toLowerCase();
|
|
9343
|
+
ds.push("localhost");
|
|
9344
|
+
for (var i = 0; i < ds.length; i++) {
|
|
9345
|
+
if (hn.indexOf(ds[i]) > -1)
|
|
9346
|
+
return true;
|
|
9347
|
+
}
|
|
9348
|
+
return false;
|
|
9349
|
+
}
|
|
9350
|
+
return true;
|
|
9351
|
+
}
|
|
9315
9352
|
|
|
9316
9353
|
|
|
9317
9354
|
|
|
@@ -14462,8 +14499,8 @@ var OperandMaker = /** @class */ (function () {
|
|
|
14462
14499
|
right = OperandMaker.convertValForDateCompare(right, left);
|
|
14463
14500
|
return OperandMaker.isTwoValueEquals(left, right, strictCompare !== true);
|
|
14464
14501
|
},
|
|
14465
|
-
notequal: function (left, right) {
|
|
14466
|
-
return !OperandMaker.binaryFunctions.equal(left, right);
|
|
14502
|
+
notequal: function (left, right, strictCompare) {
|
|
14503
|
+
return !OperandMaker.binaryFunctions.equal(left, right, strictCompare);
|
|
14467
14504
|
},
|
|
14468
14505
|
contains: function (left, right) {
|
|
14469
14506
|
return OperandMaker.binaryFunctions.containsCore(left, right, true);
|
|
@@ -17345,6 +17382,10 @@ function property(options) {
|
|
|
17345
17382
|
if (!options || !options.localizable) {
|
|
17346
17383
|
Object.defineProperty(target, key, {
|
|
17347
17384
|
get: function () {
|
|
17385
|
+
// const serializationProperty = Serializer.getProperty(target.getType(), key);
|
|
17386
|
+
// if(!!serializationProperty && options.defaultValue !== undefined) {
|
|
17387
|
+
// ConsoleWarnings.error("remove defaultValue from @property for class " + target.getType() + " property name is " + key);
|
|
17388
|
+
// }
|
|
17348
17389
|
var defaultVal = null;
|
|
17349
17390
|
if (!!options) {
|
|
17350
17391
|
if (typeof options.getDefaultValue === "function") {
|
|
@@ -19752,9 +19793,6 @@ var LocalizableString = /** @class */ (function () {
|
|
|
19752
19793
|
};
|
|
19753
19794
|
LocalizableString.prototype.isLocaleTextEqualsWithDefault = function (loc, val) {
|
|
19754
19795
|
var res = this.getLocaleTextCore(loc);
|
|
19755
|
-
if (!res && this.onGetDefaultTextCallback) {
|
|
19756
|
-
res = this.onGetDefaultTextCallback();
|
|
19757
|
-
}
|
|
19758
19796
|
if (res === val)
|
|
19759
19797
|
return true;
|
|
19760
19798
|
return this.isValueEmpty(res) && this.isValueEmpty(val);
|
|
@@ -20639,8 +20677,11 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
20639
20677
|
enumerable: false,
|
|
20640
20678
|
configurable: true
|
|
20641
20679
|
});
|
|
20680
|
+
QuestionMatrixBaseModel.prototype.getCellAriaLabel = function (rowTitle, columnTitle) {
|
|
20681
|
+
return "row " + rowTitle + ", column " + columnTitle;
|
|
20682
|
+
};
|
|
20642
20683
|
__decorate([
|
|
20643
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])(
|
|
20684
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
20644
20685
|
], QuestionMatrixBaseModel.prototype, "verticalAlign", void 0);
|
|
20645
20686
|
__decorate([
|
|
20646
20687
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
@@ -24589,7 +24630,9 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
24589
24630
|
}
|
|
24590
24631
|
currentElement = currentElement.parentElement;
|
|
24591
24632
|
}
|
|
24592
|
-
event.
|
|
24633
|
+
if (event.cancelable) {
|
|
24634
|
+
event.preventDefault();
|
|
24635
|
+
}
|
|
24593
24636
|
};
|
|
24594
24637
|
PopupBaseViewModel.SubscriptionId = 0;
|
|
24595
24638
|
__decorate([
|
|
@@ -24909,10 +24952,6 @@ var Question = /** @class */ (function (_super) {
|
|
|
24909
24952
|
_this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
|
|
24910
24953
|
_this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
|
|
24911
24954
|
_this.createLocalizableString("commentText", _this, true, "otherItemText");
|
|
24912
|
-
_this.locTitle.onGetDefaultTextCallback = function () {
|
|
24913
|
-
return _this.name;
|
|
24914
|
-
};
|
|
24915
|
-
_this.locTitle.storeDefaultText = true;
|
|
24916
24955
|
_this.createLocalizableString("requiredErrorText", _this);
|
|
24917
24956
|
_this.addTriggerInfo("resetValueIf", function () { return !_this.isEmpty(); }, function () {
|
|
24918
24957
|
_this.clearValue();
|
|
@@ -24961,12 +25000,14 @@ var Question = /** @class */ (function (_super) {
|
|
|
24961
25000
|
this.isMobile = val && (this.allowMobileInDesignMode() || !this.isDesignMode);
|
|
24962
25001
|
};
|
|
24963
25002
|
Question.prototype.themeChanged = function (theme) { };
|
|
25003
|
+
Question.prototype.getDefaultTitle = function () { return this.name; };
|
|
24964
25004
|
Question.prototype.createLocTitleProperty = function () {
|
|
24965
25005
|
var _this = this;
|
|
24966
25006
|
var locTitleValue = _super.prototype.createLocTitleProperty.call(this);
|
|
25007
|
+
locTitleValue.storeDefaultText = true;
|
|
24967
25008
|
locTitleValue.onGetTextCallback = function (text) {
|
|
24968
25009
|
if (!text) {
|
|
24969
|
-
text = _this.
|
|
25010
|
+
text = _this.getDefaultTitle();
|
|
24970
25011
|
}
|
|
24971
25012
|
if (!_this.survey)
|
|
24972
25013
|
return text;
|
|
@@ -25846,6 +25887,16 @@ var Question = /** @class */ (function (_super) {
|
|
|
25846
25887
|
this.updateCommentElements();
|
|
25847
25888
|
}
|
|
25848
25889
|
};
|
|
25890
|
+
Question.prototype.onCompositionUpdateComment = function (event) {
|
|
25891
|
+
var _this = this;
|
|
25892
|
+
if (this.isInputTextUpdate) {
|
|
25893
|
+
setTimeout(function () {
|
|
25894
|
+
if (event.target) {
|
|
25895
|
+
_this.comment = event.target.value;
|
|
25896
|
+
}
|
|
25897
|
+
}, 1);
|
|
25898
|
+
}
|
|
25899
|
+
};
|
|
25849
25900
|
Question.prototype.onCommentChange = function (event) {
|
|
25850
25901
|
this.comment = event.target.value;
|
|
25851
25902
|
if (this.comment !== event.target.value) {
|
|
@@ -26442,6 +26493,9 @@ var Question = /** @class */ (function (_super) {
|
|
|
26442
26493
|
Question.prototype.onReadOnlyChanged = function () {
|
|
26443
26494
|
this.setPropertyValue("isInputReadOnly", this.isInputReadOnly);
|
|
26444
26495
|
_super.prototype.onReadOnlyChanged.call(this);
|
|
26496
|
+
if (this.isReadOnly) {
|
|
26497
|
+
this.clearErrors();
|
|
26498
|
+
}
|
|
26445
26499
|
this.updateQuestionCss();
|
|
26446
26500
|
this.calcRenderedCommentPlaceholder();
|
|
26447
26501
|
};
|
|
@@ -28358,6 +28412,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
28358
28412
|
_this.isRunningChoices = false;
|
|
28359
28413
|
_this.isFirstLoadChoicesFromUrl = true;
|
|
28360
28414
|
_this.isUpdatingChoicesDependedQuestions = false;
|
|
28415
|
+
_this.headItemsCount = 0;
|
|
28416
|
+
_this.footItemsCount = 0;
|
|
28361
28417
|
_this.prevIsOtherSelected = false;
|
|
28362
28418
|
var noneItemText = _this.createLocalizableString("noneText", _this.noneItemValue, true, "noneItemText");
|
|
28363
28419
|
_this.noneItemValue.locOwner = _this;
|
|
@@ -29337,22 +29393,51 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29337
29393
|
configurable: true
|
|
29338
29394
|
});
|
|
29339
29395
|
QuestionSelectBase.prototype.addToVisibleChoices = function (items, isAddAll) {
|
|
29340
|
-
|
|
29341
|
-
|
|
29342
|
-
|
|
29343
|
-
|
|
29396
|
+
this.headItemsCount = 0;
|
|
29397
|
+
this.footItemsCount = 0;
|
|
29398
|
+
this.addNewItemToVisibleChoices(items, isAddAll);
|
|
29399
|
+
var dict = new Array();
|
|
29400
|
+
this.addNonChoicesItems(dict, isAddAll);
|
|
29401
|
+
dict.sort(function (a, b) {
|
|
29402
|
+
if (a.index === b.index)
|
|
29403
|
+
return 0;
|
|
29404
|
+
return a.index < b.index ? -1 : 1;
|
|
29405
|
+
});
|
|
29406
|
+
for (var i = 0; i < dict.length; i++) {
|
|
29407
|
+
var rec = dict[i];
|
|
29408
|
+
if (rec.index < 0) {
|
|
29409
|
+
items.splice(i, 0, rec.item);
|
|
29410
|
+
this.headItemsCount++;
|
|
29344
29411
|
}
|
|
29345
|
-
|
|
29346
|
-
items.push(
|
|
29412
|
+
else {
|
|
29413
|
+
items.push(rec.item);
|
|
29414
|
+
this.footItemsCount++;
|
|
29347
29415
|
}
|
|
29348
29416
|
}
|
|
29417
|
+
};
|
|
29418
|
+
QuestionSelectBase.prototype.addNewItemToVisibleChoices = function (items, isAddAll) {
|
|
29419
|
+
if (!isAddAll)
|
|
29420
|
+
return;
|
|
29421
|
+
if (!this.newItemValue) {
|
|
29422
|
+
this.newItemValue = this.createItemValue("newitem"); //TODO
|
|
29423
|
+
this.newItemValue.isGhost = true;
|
|
29424
|
+
}
|
|
29425
|
+
if (!this.isUsingCarryForward && this.canShowOptionItem(this.newItemValue, isAddAll, false)) {
|
|
29426
|
+
this.footItemsCount = 1;
|
|
29427
|
+
items.push(this.newItemValue);
|
|
29428
|
+
}
|
|
29429
|
+
};
|
|
29430
|
+
QuestionSelectBase.prototype.addNonChoicesItems = function (dict, isAddAll) {
|
|
29349
29431
|
if (this.supportNone() && this.canShowOptionItem(this.noneItem, isAddAll, this.hasNone)) {
|
|
29350
|
-
|
|
29432
|
+
this.addNonChoiceItem(dict, this.noneItem, _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].specialChoicesOrder.noneItem);
|
|
29351
29433
|
}
|
|
29352
29434
|
if (this.supportOther() && this.canShowOptionItem(this.otherItem, isAddAll, this.hasOther)) {
|
|
29353
|
-
|
|
29435
|
+
this.addNonChoiceItem(dict, this.otherItem, _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].specialChoicesOrder.otherItem);
|
|
29354
29436
|
}
|
|
29355
29437
|
};
|
|
29438
|
+
QuestionSelectBase.prototype.addNonChoiceItem = function (dict, item, order) {
|
|
29439
|
+
order.forEach(function (val) { return dict.push({ index: val, item: item }); });
|
|
29440
|
+
};
|
|
29356
29441
|
QuestionSelectBase.prototype.canShowOptionItem = function (item, isAddAll, hasItem) {
|
|
29357
29442
|
var res = (isAddAll && (!!this.canShowOptionItemCallback ? this.canShowOptionItemCallback(item) : true)) || hasItem;
|
|
29358
29443
|
if (this.canSurveyChangeItemVisibility()) {
|
|
@@ -29584,17 +29669,11 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29584
29669
|
enumerable: false,
|
|
29585
29670
|
configurable: true
|
|
29586
29671
|
});
|
|
29587
|
-
QuestionSelectBase.prototype.
|
|
29588
|
-
return false;
|
|
29589
|
-
};
|
|
29590
|
-
QuestionSelectBase.prototype.isFootChoice = function (item, question) {
|
|
29672
|
+
QuestionSelectBase.prototype.isBuiltInChoice = function (item, question) {
|
|
29591
29673
|
return (item === question.noneItem ||
|
|
29592
29674
|
item === question.otherItem ||
|
|
29593
29675
|
item === question.newItemValue);
|
|
29594
29676
|
};
|
|
29595
|
-
QuestionSelectBase.prototype.isBuiltInChoice = function (item, question) {
|
|
29596
|
-
return this.isHeadChoice(item, question) || this.isFootChoice(item, question);
|
|
29597
|
-
};
|
|
29598
29677
|
QuestionSelectBase.prototype.getChoices = function () {
|
|
29599
29678
|
return this.choices;
|
|
29600
29679
|
};
|
|
@@ -29695,6 +29774,16 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29695
29774
|
this.updateCommentElements();
|
|
29696
29775
|
}
|
|
29697
29776
|
};
|
|
29777
|
+
QuestionSelectBase.prototype.onCompositionUpdateOtherValue = function (event) {
|
|
29778
|
+
var _this = this;
|
|
29779
|
+
if (this.isInputTextUpdate) {
|
|
29780
|
+
setTimeout(function () {
|
|
29781
|
+
if (event.target) {
|
|
29782
|
+
_this.otherValue = event.target.value;
|
|
29783
|
+
}
|
|
29784
|
+
}, 1);
|
|
29785
|
+
}
|
|
29786
|
+
};
|
|
29698
29787
|
QuestionSelectBase.prototype.onOtherValueChange = function (event) {
|
|
29699
29788
|
this.otherValue = event.target.value;
|
|
29700
29789
|
if (this.otherValue !== event.target.value) {
|
|
@@ -30006,18 +30095,23 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
30006
30095
|
};
|
|
30007
30096
|
Object.defineProperty(QuestionSelectBase.prototype, "headItems", {
|
|
30008
30097
|
get: function () {
|
|
30009
|
-
var
|
|
30010
|
-
|
|
30011
|
-
|
|
30098
|
+
var count = (this.separateSpecialChoices || this.isDesignMode) ? this.headItemsCount : 0;
|
|
30099
|
+
var res = [];
|
|
30100
|
+
for (var i = 0; i < count; i++)
|
|
30101
|
+
res.push(this.visibleChoices[i]);
|
|
30102
|
+
return res;
|
|
30012
30103
|
},
|
|
30013
30104
|
enumerable: false,
|
|
30014
30105
|
configurable: true
|
|
30015
30106
|
});
|
|
30016
30107
|
Object.defineProperty(QuestionSelectBase.prototype, "footItems", {
|
|
30017
30108
|
get: function () {
|
|
30018
|
-
var
|
|
30019
|
-
|
|
30020
|
-
|
|
30109
|
+
var count = (this.separateSpecialChoices || this.isDesignMode) ? this.footItemsCount : 0;
|
|
30110
|
+
var res = [];
|
|
30111
|
+
var items = this.visibleChoices;
|
|
30112
|
+
for (var i = 0; i < count; i++)
|
|
30113
|
+
res.push(items[items.length - count + i]);
|
|
30114
|
+
return res;
|
|
30021
30115
|
},
|
|
30022
30116
|
enumerable: false,
|
|
30023
30117
|
configurable: true
|
|
@@ -30262,7 +30356,7 @@ var QuestionCheckboxBase = /** @class */ (function (_super) {
|
|
|
30262
30356
|
* @see separateSpecialChoices
|
|
30263
30357
|
*/
|
|
30264
30358
|
get: function () {
|
|
30265
|
-
return this.getPropertyValue("colCount", this.isFlowLayout ? 0 :
|
|
30359
|
+
return this.getPropertyValue("colCount", this.isFlowLayout ? 0 : undefined);
|
|
30266
30360
|
},
|
|
30267
30361
|
set: function (value) {
|
|
30268
30362
|
if (value < 0 || value > 5 || this.isFlowLayout)
|
|
@@ -31088,6 +31182,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
31088
31182
|
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
|
|
31089
31183
|
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
|
31090
31184
|
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./error */ "./src/error.ts");
|
|
31185
|
+
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
|
31091
31186
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
31092
31187
|
var extendStatics = function (d, b) {
|
|
31093
31188
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -31110,6 +31205,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
31110
31205
|
|
|
31111
31206
|
|
|
31112
31207
|
|
|
31208
|
+
|
|
31113
31209
|
/**
|
|
31114
31210
|
* A class that describes the Checkboxes question type.
|
|
31115
31211
|
*
|
|
@@ -31237,12 +31333,13 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
31237
31333
|
if (this.isItemSelected(this.noneItem))
|
|
31238
31334
|
return false;
|
|
31239
31335
|
var allItemCount = this.visibleChoices.length;
|
|
31336
|
+
var order = _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].specialChoicesOrder;
|
|
31240
31337
|
if (this.hasOther)
|
|
31241
|
-
allItemCount
|
|
31338
|
+
allItemCount -= order.otherItem.length;
|
|
31242
31339
|
if (this.hasNone)
|
|
31243
|
-
allItemCount
|
|
31340
|
+
allItemCount -= order.noneItem.length;
|
|
31244
31341
|
if (this.hasSelectAll)
|
|
31245
|
-
allItemCount
|
|
31342
|
+
allItemCount -= order.selectAllItem.length;
|
|
31246
31343
|
var selectedCount = val.length;
|
|
31247
31344
|
if (this.isOtherSelected)
|
|
31248
31345
|
selectedCount--;
|
|
@@ -31535,14 +31632,14 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
31535
31632
|
QuestionCheckboxModel.prototype.supportSelectAll = function () {
|
|
31536
31633
|
return this.isSupportProperty("showSelectAllItem");
|
|
31537
31634
|
};
|
|
31538
|
-
QuestionCheckboxModel.prototype.
|
|
31635
|
+
QuestionCheckboxModel.prototype.addNonChoicesItems = function (dict, isAddAll) {
|
|
31636
|
+
_super.prototype.addNonChoicesItems.call(this, dict, isAddAll);
|
|
31539
31637
|
if (this.supportSelectAll() && this.canShowOptionItem(this.selectAllItem, isAddAll, this.hasSelectAll)) {
|
|
31540
|
-
|
|
31638
|
+
this.addNonChoiceItem(dict, this.selectAllItem, _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].specialChoicesOrder.selectAllItem);
|
|
31541
31639
|
}
|
|
31542
|
-
_super.prototype.addToVisibleChoices.call(this, items, isAddAll);
|
|
31543
31640
|
};
|
|
31544
|
-
QuestionCheckboxModel.prototype.
|
|
31545
|
-
return
|
|
31641
|
+
QuestionCheckboxModel.prototype.isBuiltInChoice = function (item, question) {
|
|
31642
|
+
return item === question.selectAllItem || _super.prototype.isBuiltInChoice.call(this, item, question);
|
|
31546
31643
|
};
|
|
31547
31644
|
QuestionCheckboxModel.prototype.isItemInList = function (item) {
|
|
31548
31645
|
if (item == this.selectAllItem)
|
|
@@ -32165,6 +32262,15 @@ var ComponentCollection = /** @class */ (function () {
|
|
|
32165
32262
|
this.onAddingJson(name, customQuestion.isComposite);
|
|
32166
32263
|
this.customQuestionValues.push(customQuestion);
|
|
32167
32264
|
};
|
|
32265
|
+
ComponentCollection.prototype.remove = function (componentName) {
|
|
32266
|
+
if (!componentName)
|
|
32267
|
+
return false;
|
|
32268
|
+
var index = this.getCustomQuestionIndex(componentName.toLowerCase());
|
|
32269
|
+
if (index < 0)
|
|
32270
|
+
return false;
|
|
32271
|
+
this.removeByIndex(index);
|
|
32272
|
+
return true;
|
|
32273
|
+
};
|
|
32168
32274
|
Object.defineProperty(ComponentCollection.prototype, "items", {
|
|
32169
32275
|
get: function () {
|
|
32170
32276
|
return this.customQuestionValues;
|
|
@@ -32173,17 +32279,26 @@ var ComponentCollection = /** @class */ (function () {
|
|
|
32173
32279
|
configurable: true
|
|
32174
32280
|
});
|
|
32175
32281
|
ComponentCollection.prototype.getCustomQuestionByName = function (name) {
|
|
32282
|
+
var index = this.getCustomQuestionIndex(name);
|
|
32283
|
+
return index >= 0 ? this.customQuestionValues[index] : undefined;
|
|
32284
|
+
};
|
|
32285
|
+
ComponentCollection.prototype.getCustomQuestionIndex = function (name) {
|
|
32176
32286
|
for (var i = 0; i < this.customQuestionValues.length; i++) {
|
|
32177
|
-
if (this.customQuestionValues[i].name
|
|
32178
|
-
return
|
|
32287
|
+
if (this.customQuestionValues[i].name === name)
|
|
32288
|
+
return i;
|
|
32179
32289
|
}
|
|
32180
|
-
return
|
|
32290
|
+
return -1;
|
|
32181
32291
|
};
|
|
32182
|
-
ComponentCollection.prototype.
|
|
32183
|
-
|
|
32184
|
-
|
|
32292
|
+
ComponentCollection.prototype.removeByIndex = function (index) {
|
|
32293
|
+
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].removeClass(this.customQuestionValues[index].name);
|
|
32294
|
+
this.customQuestionValues.splice(index, 1);
|
|
32295
|
+
};
|
|
32296
|
+
ComponentCollection.prototype.clear = function (includeInternal) {
|
|
32297
|
+
for (var i = this.customQuestionValues.length - 1; i >= 0; i--) {
|
|
32298
|
+
if (includeInternal || !this.customQuestionValues[i].json.internal) {
|
|
32299
|
+
this.removeByIndex(i);
|
|
32300
|
+
}
|
|
32185
32301
|
}
|
|
32186
|
-
this.customQuestionValues = [];
|
|
32187
32302
|
};
|
|
32188
32303
|
ComponentCollection.prototype.createQuestion = function (name, questionJSON) {
|
|
32189
32304
|
if (!!questionJSON.isComposite)
|
|
@@ -32451,6 +32566,11 @@ var QuestionCustomModel = /** @class */ (function (_super) {
|
|
|
32451
32566
|
QuestionCustomModel.prototype.getQuestionByName = function (name) {
|
|
32452
32567
|
return this.contentQuestion;
|
|
32453
32568
|
};
|
|
32569
|
+
QuestionCustomModel.prototype.getDefaultTitle = function () {
|
|
32570
|
+
if (this.hasJSONTitle && this.contentQuestion)
|
|
32571
|
+
return this.contentQuestion.title;
|
|
32572
|
+
return _super.prototype.getDefaultTitle.call(this);
|
|
32573
|
+
};
|
|
32454
32574
|
QuestionCustomModel.prototype.setValue = function (name, newValue, locNotification, allowNotifyValueChanged) {
|
|
32455
32575
|
if (this.isValueChanging(name, newValue))
|
|
32456
32576
|
return;
|
|
@@ -32505,6 +32625,7 @@ var QuestionCustomModel = /** @class */ (function (_super) {
|
|
|
32505
32625
|
var json = this.customQuestion.json;
|
|
32506
32626
|
var res = null;
|
|
32507
32627
|
if (!!json.questionJSON) {
|
|
32628
|
+
this.hasJSONTitle = !!json.questionJSON.title;
|
|
32508
32629
|
var qType = json.questionJSON.type;
|
|
32509
32630
|
if (!qType || !_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findClass(qType))
|
|
32510
32631
|
throw "type attribute in questionJSON is empty or incorrect";
|
|
@@ -33360,7 +33481,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
|
33360
33481
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
33361
33482
|
], QuestionDropdownModel.prototype, "choicesLazyLoadEnabled", void 0);
|
|
33362
33483
|
__decorate([
|
|
33363
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])(
|
|
33484
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
33364
33485
|
], QuestionDropdownModel.prototype, "choicesLazyLoadPageSize", void 0);
|
|
33365
33486
|
__decorate([
|
|
33366
33487
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
@@ -33643,7 +33764,7 @@ var QuestionExpressionModel = /** @class */ (function (_super) {
|
|
|
33643
33764
|
this.updateFormatedValue();
|
|
33644
33765
|
};
|
|
33645
33766
|
QuestionExpressionModel.prototype.getDisplayValueCore = function (keysAsText, value) {
|
|
33646
|
-
var val =
|
|
33767
|
+
var val = value === undefined || value === null ? this.defaultValue : value;
|
|
33647
33768
|
var res = "";
|
|
33648
33769
|
if (!this.isValueEmpty(val)) {
|
|
33649
33770
|
var str = this.getValueAsStr(val);
|
|
@@ -35350,7 +35471,16 @@ var QuestionHtmlModel = /** @class */ (function (_super) {
|
|
|
35350
35471
|
return QuestionHtmlModel;
|
|
35351
35472
|
}(_questionnonvalue__WEBPACK_IMPORTED_MODULE_0__["QuestionNonValue"]));
|
|
35352
35473
|
|
|
35353
|
-
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("html", [
|
|
35474
|
+
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("html", [
|
|
35475
|
+
{ name: "html:html", serializationProperty: "locHtml" },
|
|
35476
|
+
{ name: "hideNumber", visible: false },
|
|
35477
|
+
{ name: "state", visible: false },
|
|
35478
|
+
{ name: "titleLocation", visible: false },
|
|
35479
|
+
{ name: "descriptionLocation", visible: false },
|
|
35480
|
+
{ name: "errorLocation", visible: false },
|
|
35481
|
+
{ name: "indent", visible: false },
|
|
35482
|
+
{ name: "width", visible: false },
|
|
35483
|
+
], function () {
|
|
35354
35484
|
return new QuestionHtmlModel("");
|
|
35355
35485
|
}, "nonvalue");
|
|
35356
35486
|
_questionfactory__WEBPACK_IMPORTED_MODULE_2__["QuestionFactory"].Instance.registerQuestion("html", function (name) {
|
|
@@ -36110,9 +36240,12 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
|
|
|
36110
36240
|
enumerable: false,
|
|
36111
36241
|
configurable: true
|
|
36112
36242
|
});
|
|
36113
|
-
QuestionImagePickerModel.prototype.
|
|
36243
|
+
QuestionImagePickerModel.prototype.isBuiltInChoice = function (item, question) {
|
|
36114
36244
|
return false;
|
|
36115
36245
|
};
|
|
36246
|
+
QuestionImagePickerModel.prototype.addToVisibleChoices = function (items, isAddAll) {
|
|
36247
|
+
this.addNewItemToVisibleChoices(items, isAddAll);
|
|
36248
|
+
};
|
|
36116
36249
|
QuestionImagePickerModel.prototype.getSelectBaseRootCss = function () {
|
|
36117
36250
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(_super.prototype.getSelectBaseRootCss.call(this)).append(this.cssClasses.rootColumn, this.getCurrentColCount() == 1).toString();
|
|
36118
36251
|
};
|
|
@@ -39266,6 +39399,8 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
39266
39399
|
this.collectNestedQuestonsInRows(this.visibleRows, questions, visibleOnly);
|
|
39267
39400
|
};
|
|
39268
39401
|
QuestionMatrixDropdownModelBase.prototype.collectNestedQuestonsInRows = function (rows, questions, visibleOnly) {
|
|
39402
|
+
if (!Array.isArray(rows))
|
|
39403
|
+
return;
|
|
39269
39404
|
rows.forEach(function (row) {
|
|
39270
39405
|
row.questions.forEach(function (q) { return q.collectNestedQuestions(questions, visibleOnly); });
|
|
39271
39406
|
});
|
|
@@ -42937,7 +43072,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
42937
43072
|
var lastDelRow = this.lastDeletedRow;
|
|
42938
43073
|
this.lastDeletedRow = undefined;
|
|
42939
43074
|
var rows = this.generatedVisibleRows;
|
|
42940
|
-
if (!Array.isArray(val) || Math.abs(rows.length - val.length) > 1)
|
|
43075
|
+
if (!Array.isArray(val) || Math.abs(rows.length - val.length) > 1 || rows.length === val.length)
|
|
42941
43076
|
return false;
|
|
42942
43077
|
var index = this.getInsertedDeletedIndex(rows, val);
|
|
42943
43078
|
if (rows.length > val.length) {
|
|
@@ -48612,10 +48747,10 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
48612
48747
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
|
|
48613
48748
|
], QuestionRatingModel.prototype, "inputHasValue", void 0);
|
|
48614
48749
|
__decorate([
|
|
48615
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])(
|
|
48750
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
48616
48751
|
], QuestionRatingModel.prototype, "autoGenerate", void 0);
|
|
48617
48752
|
__decorate([
|
|
48618
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])(
|
|
48753
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
48619
48754
|
], QuestionRatingModel.prototype, "rateCount", void 0);
|
|
48620
48755
|
__decorate([
|
|
48621
48756
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["propertyArray"])()
|
|
@@ -48627,11 +48762,10 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
48627
48762
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
|
|
48628
48763
|
], QuestionRatingModel.prototype, "hasMaxRateDescription", void 0);
|
|
48629
48764
|
__decorate([
|
|
48630
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])(
|
|
48765
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
48631
48766
|
], QuestionRatingModel.prototype, "displayRateDescriptionsAsExtremeItems", void 0);
|
|
48632
48767
|
__decorate([
|
|
48633
48768
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({
|
|
48634
|
-
defaultValue: "auto",
|
|
48635
48769
|
onSet: function (val, target) {
|
|
48636
48770
|
if (!target.isDesignMode) {
|
|
48637
48771
|
if (val === "dropdown") {
|
|
@@ -48645,13 +48779,13 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
48645
48779
|
})
|
|
48646
48780
|
], QuestionRatingModel.prototype, "displayMode", void 0);
|
|
48647
48781
|
__decorate([
|
|
48648
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])(
|
|
48782
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
48649
48783
|
], QuestionRatingModel.prototype, "rateType", void 0);
|
|
48650
48784
|
__decorate([
|
|
48651
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])(
|
|
48785
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
48652
48786
|
], QuestionRatingModel.prototype, "scaleColorMode", void 0);
|
|
48653
48787
|
__decorate([
|
|
48654
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])(
|
|
48788
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
48655
48789
|
], QuestionRatingModel.prototype, "rateColorMode", void 0);
|
|
48656
48790
|
return QuestionRatingModel;
|
|
48657
48791
|
}(_question__WEBPACK_IMPORTED_MODULE_1__["Question"]));
|
|
@@ -49170,13 +49304,13 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
|
|
|
49170
49304
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
|
49171
49305
|
], QuestionSignaturePadModel.prototype, "isDrawingValue", void 0);
|
|
49172
49306
|
__decorate([
|
|
49173
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])(
|
|
49307
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
49174
49308
|
], QuestionSignaturePadModel.prototype, "signatureAutoScaleEnabled", void 0);
|
|
49175
49309
|
__decorate([
|
|
49176
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])(
|
|
49310
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
49177
49311
|
], QuestionSignaturePadModel.prototype, "penMinWidth", void 0);
|
|
49178
49312
|
__decorate([
|
|
49179
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])(
|
|
49313
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
49180
49314
|
], QuestionSignaturePadModel.prototype, "penMaxWidth", void 0);
|
|
49181
49315
|
__decorate([
|
|
49182
49316
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({})
|
|
@@ -49527,7 +49661,6 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
49527
49661
|
], QuestionTagboxModel.prototype, "allowClear", void 0);
|
|
49528
49662
|
__decorate([
|
|
49529
49663
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
|
|
49530
|
-
defaultValue: true,
|
|
49531
49664
|
onSet: function (newValue, target) {
|
|
49532
49665
|
if (!!target.dropdownListModel) {
|
|
49533
49666
|
target.dropdownListModel.setSearchEnabled(newValue);
|
|
@@ -49548,7 +49681,7 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
49548
49681
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
49549
49682
|
], QuestionTagboxModel.prototype, "choicesLazyLoadEnabled", void 0);
|
|
49550
49683
|
__decorate([
|
|
49551
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])(
|
|
49684
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
49552
49685
|
], QuestionTagboxModel.prototype, "choicesLazyLoadPageSize", void 0);
|
|
49553
49686
|
__decorate([
|
|
49554
49687
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ getDefaultValue: function () { return _settings__WEBPACK_IMPORTED_MODULE_5__["settings"].tagboxCloseOnSelect; } })
|
|
@@ -50590,6 +50723,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
50590
50723
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementFactory", function() { return ElementFactory; });
|
|
50591
50724
|
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
|
|
50592
50725
|
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
|
|
50726
|
+
/* harmony import */ var _question_custom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question_custom */ "./src/question_custom.ts");
|
|
50727
|
+
|
|
50593
50728
|
|
|
50594
50729
|
|
|
50595
50730
|
var QuestionFactory = /** @class */ (function () {
|
|
@@ -50691,6 +50826,9 @@ var ElementFactory = /** @class */ (function () {
|
|
|
50691
50826
|
var creator = this.creatorHash[elementType];
|
|
50692
50827
|
if (!!creator)
|
|
50693
50828
|
return creator(name);
|
|
50829
|
+
var compJSON = _question_custom__WEBPACK_IMPORTED_MODULE_2__["ComponentCollection"].Instance.getCustomQuestionByName(elementType);
|
|
50830
|
+
if (!!compJSON)
|
|
50831
|
+
return _question_custom__WEBPACK_IMPORTED_MODULE_2__["ComponentCollection"].Instance.createQuestion(name, compJSON);
|
|
50694
50832
|
return null;
|
|
50695
50833
|
};
|
|
50696
50834
|
ElementFactory.Instance = new ElementFactory();
|
|
@@ -51433,6 +51571,11 @@ var settings = {
|
|
|
51433
51571
|
* Default value: `"none"`
|
|
51434
51572
|
*/
|
|
51435
51573
|
noneItemValue: "none",
|
|
51574
|
+
specialChoicesOrder: {
|
|
51575
|
+
selectAllItem: [-1],
|
|
51576
|
+
noneItem: [1],
|
|
51577
|
+
otherItem: [2]
|
|
51578
|
+
},
|
|
51436
51579
|
/**
|
|
51437
51580
|
* A list of supported validators by question type.
|
|
51438
51581
|
*/
|
|
@@ -57090,13 +57233,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
57090
57233
|
}
|
|
57091
57234
|
this.setPropertyValue("completedStateText", text);
|
|
57092
57235
|
if (this.state === "completed" && this.showCompletedPage && !!this.completedState) {
|
|
57093
|
-
this.notify(this.completedStateText, this.completedState,
|
|
57236
|
+
this.notify(this.completedStateText, this.completedState, value === "error");
|
|
57094
57237
|
}
|
|
57095
57238
|
};
|
|
57096
57239
|
SurveyModel.prototype.notify = function (message, type, showActions) {
|
|
57097
57240
|
if (showActions === void 0) { showActions = false; }
|
|
57098
57241
|
this.notifier.showActions = showActions;
|
|
57099
|
-
this.notifier.notify(message, type,
|
|
57242
|
+
this.notifier.notify(message, type, showActions);
|
|
57100
57243
|
};
|
|
57101
57244
|
/**
|
|
57102
57245
|
* Resets the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) and, optionally, [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data). If `state` is `"completed"`, it becomes `"running"`.
|
|
@@ -57886,7 +58029,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
57886
58029
|
}
|
|
57887
58030
|
else {
|
|
57888
58031
|
if (this.runningPages) {
|
|
57889
|
-
this.
|
|
58032
|
+
this.restoreOriginalPages(this.runningPages);
|
|
57890
58033
|
}
|
|
57891
58034
|
this.runningPages = undefined;
|
|
57892
58035
|
}
|
|
@@ -57914,7 +58057,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
57914
58057
|
return;
|
|
57915
58058
|
if (this.questionsOnPageMode == "standard" || this.isDesignMode) {
|
|
57916
58059
|
if (this.origionalPages) {
|
|
57917
|
-
this.
|
|
58060
|
+
this.restoreOriginalPages(this.origionalPages);
|
|
57918
58061
|
}
|
|
57919
58062
|
this.origionalPages = undefined;
|
|
57920
58063
|
}
|
|
@@ -57927,11 +58070,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
57927
58070
|
this.runConditions();
|
|
57928
58071
|
this.updateVisibleIndexes();
|
|
57929
58072
|
};
|
|
57930
|
-
SurveyModel.prototype.
|
|
58073
|
+
SurveyModel.prototype.restoreOriginalPages = function (originalPages) {
|
|
57931
58074
|
this.questionHashesClear();
|
|
57932
58075
|
this.pages.splice(0, this.pages.length);
|
|
57933
58076
|
for (var i = 0; i < originalPages.length; i++) {
|
|
57934
|
-
|
|
58077
|
+
var page = originalPages[i];
|
|
58078
|
+
page.setWasShown(false);
|
|
58079
|
+
this.pages.push(page);
|
|
57935
58080
|
}
|
|
57936
58081
|
};
|
|
57937
58082
|
SurveyModel.prototype.getPageStartIndex = function () {
|