survey-core 1.9.110 → 1.9.112
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 +784 -675
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +784 -675
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +256 -0
- package/i18n/arabic.js.map +1 -0
- package/i18n/arabic.min.js +6 -0
- package/i18n/basque.js +249 -0
- package/i18n/basque.js.map +1 -0
- package/i18n/basque.min.js +6 -0
- package/i18n/bulgarian.js +256 -0
- package/i18n/bulgarian.js.map +1 -0
- package/i18n/bulgarian.min.js +6 -0
- package/i18n/catalan.js +296 -0
- package/i18n/catalan.js.map +1 -0
- package/i18n/catalan.min.js +6 -0
- package/i18n/croatian.js +254 -0
- package/i18n/croatian.js.map +1 -0
- package/i18n/croatian.min.js +6 -0
- package/i18n/czech.js +256 -0
- package/i18n/czech.js.map +1 -0
- package/i18n/czech.min.js +6 -0
- package/i18n/danish.js +256 -0
- package/i18n/danish.js.map +1 -0
- package/i18n/danish.min.js +6 -0
- package/i18n/dutch.js +254 -0
- package/i18n/dutch.js.map +1 -0
- package/i18n/dutch.min.js +6 -0
- package/i18n/english.js +225 -0
- package/i18n/english.js.map +1 -0
- package/i18n/english.min.js +6 -0
- package/i18n/estonian.js +256 -0
- package/i18n/estonian.js.map +1 -0
- package/i18n/estonian.min.js +6 -0
- package/i18n/finnish.js +244 -0
- package/i18n/finnish.js.map +1 -0
- package/i18n/finnish.min.js +6 -0
- package/i18n/french.js +244 -0
- package/i18n/french.js.map +1 -0
- package/i18n/french.min.js +6 -0
- package/i18n/georgian.js +309 -0
- package/i18n/georgian.js.map +1 -0
- package/i18n/georgian.min.js +6 -0
- package/i18n/german.js +242 -0
- package/i18n/german.js.map +1 -0
- package/i18n/german.min.js +6 -0
- package/i18n/greek.js +241 -0
- package/i18n/greek.js.map +1 -0
- package/i18n/greek.min.js +6 -0
- package/i18n/hebrew.js +256 -0
- package/i18n/hebrew.js.map +1 -0
- package/i18n/hebrew.min.js +6 -0
- package/i18n/hindi.js +257 -0
- package/i18n/hindi.js.map +1 -0
- package/i18n/hindi.min.js +6 -0
- package/i18n/hungarian.js +255 -0
- package/i18n/hungarian.js.map +1 -0
- package/i18n/hungarian.min.js +6 -0
- package/i18n/icelandic.js +256 -0
- package/i18n/icelandic.js.map +1 -0
- package/i18n/icelandic.min.js +6 -0
- package/i18n/index.js +6871 -0
- package/i18n/index.js.map +1 -0
- package/i18n/index.min.js +6 -0
- package/i18n/indonesian.js +256 -0
- package/i18n/indonesian.js.map +1 -0
- package/i18n/indonesian.min.js +6 -0
- package/i18n/italian.js +244 -0
- package/i18n/italian.js.map +1 -0
- package/i18n/italian.min.js +6 -0
- package/i18n/japanese.js +256 -0
- package/i18n/japanese.js.map +1 -0
- package/i18n/japanese.min.js +6 -0
- package/i18n/kazakh.js +256 -0
- package/i18n/kazakh.js.map +1 -0
- package/i18n/kazakh.min.js +6 -0
- package/i18n/korean.js +243 -0
- package/i18n/korean.js.map +1 -0
- package/i18n/korean.min.js +6 -0
- package/i18n/latvian.js +244 -0
- package/i18n/latvian.js.map +1 -0
- package/i18n/latvian.min.js +6 -0
- package/i18n/lithuanian.js +256 -0
- package/i18n/lithuanian.js.map +1 -0
- package/i18n/lithuanian.min.js +6 -0
- package/i18n/macedonian.js +250 -0
- package/i18n/macedonian.js.map +1 -0
- package/i18n/macedonian.min.js +6 -0
- package/i18n/malay.js +246 -0
- package/i18n/malay.js.map +1 -0
- package/i18n/malay.min.js +6 -0
- package/i18n/nl-BE.js +279 -0
- package/i18n/nl-BE.js.map +1 -0
- package/i18n/nl-BE.min.js +6 -0
- package/i18n/norwegian.js +256 -0
- package/i18n/norwegian.js.map +1 -0
- package/i18n/norwegian.min.js +6 -0
- package/i18n/persian.js +256 -0
- package/i18n/persian.js.map +1 -0
- package/i18n/persian.min.js +6 -0
- package/i18n/polish.js +244 -0
- package/i18n/polish.js.map +1 -0
- package/i18n/polish.min.js +6 -0
- package/i18n/portuguese-br.js +306 -0
- package/i18n/portuguese-br.js.map +1 -0
- package/i18n/portuguese-br.min.js +6 -0
- package/i18n/portuguese.js +241 -0
- package/i18n/portuguese.js.map +1 -0
- package/i18n/portuguese.min.js +6 -0
- package/i18n/romanian.js +256 -0
- package/i18n/romanian.js.map +1 -0
- package/i18n/romanian.min.js +6 -0
- package/i18n/russian.js +244 -0
- package/i18n/russian.js.map +1 -0
- package/i18n/russian.min.js +6 -0
- package/i18n/serbian.js +251 -0
- package/i18n/serbian.js.map +1 -0
- package/i18n/serbian.min.js +6 -0
- package/i18n/simplified-chinese.js +250 -0
- package/i18n/simplified-chinese.js.map +1 -0
- package/i18n/simplified-chinese.min.js +6 -0
- package/i18n/slovak.js +246 -0
- package/i18n/slovak.js.map +1 -0
- package/i18n/slovak.min.js +6 -0
- package/i18n/spanish.js +244 -0
- package/i18n/spanish.js.map +1 -0
- package/i18n/spanish.min.js +6 -0
- package/i18n/swahili.js +256 -0
- package/i18n/swahili.js.map +1 -0
- package/i18n/swahili.min.js +6 -0
- package/i18n/swedish.js +244 -0
- package/i18n/swedish.js.map +1 -0
- package/i18n/swedish.min.js +6 -0
- package/i18n/tajik.js +225 -0
- package/i18n/tajik.js.map +1 -0
- package/i18n/tajik.min.js +6 -0
- package/i18n/telugu.js +257 -0
- package/i18n/telugu.js.map +1 -0
- package/i18n/telugu.min.js +6 -0
- package/i18n/thai.js +256 -0
- package/i18n/thai.js.map +1 -0
- package/i18n/thai.min.js +6 -0
- package/i18n/traditional-chinese.js +291 -0
- package/i18n/traditional-chinese.js.map +1 -0
- package/i18n/traditional-chinese.min.js +6 -0
- package/i18n/turkish.js +238 -0
- package/i18n/turkish.js.map +1 -0
- package/i18n/turkish.min.js +6 -0
- package/i18n/ukrainian.js +256 -0
- package/i18n/ukrainian.js.map +1 -0
- package/i18n/ukrainian.min.js +6 -0
- package/i18n/urdu.js +249 -0
- package/i18n/urdu.js.map +1 -0
- package/i18n/urdu.min.js +6 -0
- package/i18n/vietnamese.js +257 -0
- package/i18n/vietnamese.js.map +1 -0
- package/i18n/vietnamese.min.js +6 -0
- package/i18n/welsh.js +256 -0
- package/i18n/welsh.js.map +1 -0
- package/i18n/welsh.min.js +6 -0
- package/modern.css +310 -241
- package/modern.css.map +1 -1
- package/modern.fontless.css +310 -241
- 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 +2 -1
- package/plugins/bootstrap-integration.js.map +1 -1
- package/plugins/bootstrap-integration.min.js +2 -2
- package/plugins/bootstrap-material-integration.js +2 -1
- package/plugins/bootstrap-material-integration.js.map +1 -1
- package/plugins/bootstrap-material-integration.min.js +2 -2
- package/survey.core.js +534 -233
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +66 -53
- package/survey.css.map +1 -1
- package/survey.i18n.js +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/base.d.ts +2 -2
- package/ts3.4/typings/cover.d.ts +17 -11
- package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +2 -0
- package/ts3.4/typings/dropdownListModel.d.ts +1 -0
- package/ts3.4/typings/localization/english.d.ts +2 -0
- package/ts3.4/typings/notifier.d.ts +1 -0
- package/ts3.4/typings/panel.d.ts +2 -2
- package/ts3.4/typings/popup.d.ts +1 -0
- package/ts3.4/typings/question.d.ts +46 -22
- package/ts3.4/typings/question_custom.d.ts +7 -7
- package/ts3.4/typings/question_expression.d.ts +0 -1
- package/ts3.4/typings/question_file.d.ts +2 -1
- package/ts3.4/typings/question_html.d.ts +1 -0
- package/ts3.4/typings/question_matrixdropdowncolumn.d.ts +2 -0
- package/ts3.4/typings/question_matrixdynamic.d.ts +2 -2
- package/ts3.4/typings/question_paneldynamic.d.ts +10 -6
- package/ts3.4/typings/settings.d.ts +44 -33
- package/ts3.4/typings/survey-element.d.ts +0 -1
- package/ts3.4/typings/survey-events-api.d.ts +4 -0
- package/ts3.4/typings/survey.d.ts +37 -20
- package/ts3.4/typings/surveyStrings.d.ts +2 -0
- package/ts3.4/typings/surveyToc.d.ts +2 -1
- package/ts3.4/typings/themes.d.ts +53 -1
- package/ts3.4/typings/trigger.d.ts +4 -0
- package/ts3.4/typings/utils/utils.d.ts +1 -0
- package/typings/base.d.ts +2 -2
- package/typings/cover.d.ts +18 -11
- package/typings/defaultCss/defaultV2Css.d.ts +2 -0
- package/typings/dropdownListModel.d.ts +1 -0
- package/typings/localization/english.d.ts +2 -0
- package/typings/notifier.d.ts +1 -0
- package/typings/panel.d.ts +2 -2
- package/typings/popup.d.ts +1 -0
- package/typings/question.d.ts +48 -22
- package/typings/question_custom.d.ts +7 -7
- package/typings/question_expression.d.ts +0 -1
- package/typings/question_file.d.ts +2 -1
- package/typings/question_html.d.ts +1 -0
- package/typings/question_matrixdropdowncolumn.d.ts +4 -0
- package/typings/question_matrixdynamic.d.ts +2 -2
- package/typings/question_paneldynamic.d.ts +10 -6
- package/typings/settings.d.ts +44 -33
- package/typings/survey-element.d.ts +0 -1
- package/typings/survey-events-api.d.ts +4 -0
- package/typings/survey.d.ts +37 -20
- package/typings/surveyStrings.d.ts +2 -0
- package/typings/surveyToc.d.ts +2 -1
- package/typings/themes.d.ts +53 -1
- package/typings/trigger.d.ts +4 -0
- package/typings/utils/utils.d.ts +1 -0
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.112
|
|
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
|
*/
|
|
@@ -1816,7 +1816,7 @@ var Base = /** @class */ (function () {
|
|
|
1816
1816
|
*
|
|
1817
1817
|
* - `sender`: `this`\
|
|
1818
1818
|
* A SurveyJS object whose property has changed.
|
|
1819
|
-
* - `options.name`: `
|
|
1819
|
+
* - `options.name`: `string`\
|
|
1820
1820
|
* The name of the changed property.
|
|
1821
1821
|
* - `options.newValue`: `any`\
|
|
1822
1822
|
* A new value for the property.
|
|
@@ -1833,7 +1833,7 @@ var Base = /** @class */ (function () {
|
|
|
1833
1833
|
* A SurveyJS object whose property contains an array of `ItemValue` objects.
|
|
1834
1834
|
* - `options.obj`: [`ItemValue`](https://surveyjs.io/form-library/documentation/itemvalue)\
|
|
1835
1835
|
* An `ItemValue` object.
|
|
1836
|
-
* - `options.propertyName`: `
|
|
1836
|
+
* - `options.propertyName`: `string`\
|
|
1837
1837
|
* The name of the property to which an array of `ItemValue` objects is assigned (for example, `"choices"` or `"rows"`).
|
|
1838
1838
|
* - `options.name`: `"text"` | `"value"`\
|
|
1839
1839
|
* The name of the changed property.
|
|
@@ -3563,11 +3563,11 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
|
3563
3563
|
configurable: true
|
|
3564
3564
|
});
|
|
3565
3565
|
ChoicesRestful.prototype.clear = function () {
|
|
3566
|
-
this.url =
|
|
3567
|
-
this.path =
|
|
3568
|
-
this.valueName =
|
|
3569
|
-
this.titleName =
|
|
3570
|
-
this.imageLinkName =
|
|
3566
|
+
this.url = undefined;
|
|
3567
|
+
this.path = undefined;
|
|
3568
|
+
this.valueName = undefined;
|
|
3569
|
+
this.titleName = undefined;
|
|
3570
|
+
this.imageLinkName = undefined;
|
|
3571
3571
|
var properties = this.getCustomPropertiesNames();
|
|
3572
3572
|
for (var i = 0; i < properties.length; i++) {
|
|
3573
3573
|
if (this[properties[i]])
|
|
@@ -4077,7 +4077,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4077
4077
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConditionRunner", function() { return ConditionRunner; });
|
|
4078
4078
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpressionRunner", function() { return ExpressionRunner; });
|
|
4079
4079
|
/* harmony import */ var _conditionProcessValue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./conditionProcessValue */ "./src/conditionProcessValue.ts");
|
|
4080
|
-
/* harmony import */ var
|
|
4080
|
+
/* harmony import */ var _console_warnings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./console-warnings */ "./src/console-warnings.ts");
|
|
4081
|
+
/* harmony import */ var _conditionsParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conditionsParser */ "./src/conditionsParser.ts");
|
|
4081
4082
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
4082
4083
|
var extendStatics = function (d, b) {
|
|
4083
4084
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -4095,10 +4096,11 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
4095
4096
|
})();
|
|
4096
4097
|
|
|
4097
4098
|
|
|
4099
|
+
|
|
4098
4100
|
var ExpressionExecutor = /** @class */ (function () {
|
|
4099
4101
|
function ExpressionExecutor(expression) {
|
|
4100
4102
|
this.processValue = new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_0__["ProcessValue"]();
|
|
4101
|
-
this.parser = new
|
|
4103
|
+
this.parser = new _conditionsParser__WEBPACK_IMPORTED_MODULE_2__["ConditionsParser"]();
|
|
4102
4104
|
this.isAsyncValue = false;
|
|
4103
4105
|
this.hasFunctionValue = false;
|
|
4104
4106
|
this.setExpression(expression);
|
|
@@ -4143,8 +4145,12 @@ var ExpressionExecutor = /** @class */ (function () {
|
|
|
4143
4145
|
ExpressionExecutor.prototype.run = function (values, properties) {
|
|
4144
4146
|
var _this = this;
|
|
4145
4147
|
if (properties === void 0) { properties = null; }
|
|
4146
|
-
if (!this.operand)
|
|
4148
|
+
if (!this.operand) {
|
|
4149
|
+
if (!!this.expression) {
|
|
4150
|
+
_console_warnings__WEBPACK_IMPORTED_MODULE_1__["ConsoleWarnings"].warn("Invalid expression: " + this.expression);
|
|
4151
|
+
}
|
|
4147
4152
|
return null;
|
|
4153
|
+
}
|
|
4148
4154
|
this.processValue.values = values;
|
|
4149
4155
|
this.processValue.properties = properties;
|
|
4150
4156
|
if (!this.isAsync)
|
|
@@ -4497,12 +4503,12 @@ var CoverCell = /** @class */ (function () {
|
|
|
4497
4503
|
enumerable: false,
|
|
4498
4504
|
configurable: true
|
|
4499
4505
|
});
|
|
4500
|
-
Object.defineProperty(CoverCell.prototype, "
|
|
4506
|
+
Object.defineProperty(CoverCell.prototype, "textAreaWidth", {
|
|
4501
4507
|
get: function () {
|
|
4502
|
-
if (!this.cover.
|
|
4508
|
+
if (!this.cover.textAreaWidth) {
|
|
4503
4509
|
return "";
|
|
4504
4510
|
}
|
|
4505
|
-
return "" + this.cover.
|
|
4511
|
+
return "" + this.cover.textAreaWidth + "px";
|
|
4506
4512
|
},
|
|
4507
4513
|
enumerable: false,
|
|
4508
4514
|
configurable: true
|
|
@@ -4520,6 +4526,9 @@ var Cover = /** @class */ (function (_super) {
|
|
|
4520
4526
|
["top", "middle", "bottom"].forEach(function (positionY) {
|
|
4521
4527
|
return ["left", "center", "right"].forEach(function (positionX) { return _this.cells.push(new CoverCell(_this, positionX, positionY)); });
|
|
4522
4528
|
});
|
|
4529
|
+
_this.updateCoverClasses();
|
|
4530
|
+
_this.updateContentClasses();
|
|
4531
|
+
_this.updateBackgroundImageClasses();
|
|
4523
4532
|
return _this;
|
|
4524
4533
|
}
|
|
4525
4534
|
Cover.prototype.calcBackgroundSize = function (backgroundImageFit) {
|
|
@@ -4527,10 +4536,37 @@ var Cover = /** @class */ (function (_super) {
|
|
|
4527
4536
|
return "100% 100%";
|
|
4528
4537
|
}
|
|
4529
4538
|
if (backgroundImageFit === "tile") {
|
|
4530
|
-
return "
|
|
4539
|
+
return "auto";
|
|
4531
4540
|
}
|
|
4532
4541
|
return backgroundImageFit;
|
|
4533
4542
|
};
|
|
4543
|
+
Cover.prototype.updateCoverClasses = function () {
|
|
4544
|
+
this.coverClasses = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
|
|
4545
|
+
.append("sv-cover")
|
|
4546
|
+
.append("sv-conver__without-background", (!this.backgroundColor || this.backgroundColor === "trasparent") && !this.backgroundImage)
|
|
4547
|
+
.append("sv-conver__overlap", this.overlapEnabled)
|
|
4548
|
+
.toString();
|
|
4549
|
+
};
|
|
4550
|
+
Cover.prototype.updateContentClasses = function () {
|
|
4551
|
+
this.contentClasses = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
|
|
4552
|
+
.append("sv-conver__content")
|
|
4553
|
+
.append("sv-conver__content--static", this.inheritWidthFrom === "survey" && !!this.survey && this.survey.calculateWidthMode() === "static")
|
|
4554
|
+
.append("sv-conver__content--responsive", this.inheritWidthFrom === "page" || (!!this.survey && this.survey.calculateWidthMode() === "responsive"))
|
|
4555
|
+
.toString();
|
|
4556
|
+
};
|
|
4557
|
+
Cover.prototype.updateBackgroundImageClasses = function () {
|
|
4558
|
+
this.backgroundImageClasses = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
|
|
4559
|
+
.append("sv-cover__background-image")
|
|
4560
|
+
.append("sv-cover__background-image--contain", this.backgroundImageFit === "contain")
|
|
4561
|
+
.append("sv-cover__background-image--tile", this.backgroundImageFit === "tile")
|
|
4562
|
+
.toString();
|
|
4563
|
+
};
|
|
4564
|
+
Cover.prototype.fromTheme = function (theme) {
|
|
4565
|
+
_super.prototype.fromJSON.call(this, theme.header);
|
|
4566
|
+
if (!!theme.cssVariables) {
|
|
4567
|
+
this.backgroundColor = theme.cssVariables["--sjs-cover-backcolor"];
|
|
4568
|
+
}
|
|
4569
|
+
};
|
|
4534
4570
|
Cover.prototype.getType = function () {
|
|
4535
4571
|
return "cover";
|
|
4536
4572
|
};
|
|
@@ -4541,41 +4577,30 @@ var Cover = /** @class */ (function (_super) {
|
|
|
4541
4577
|
enumerable: false,
|
|
4542
4578
|
configurable: true
|
|
4543
4579
|
});
|
|
4544
|
-
Object.defineProperty(Cover.prototype, "
|
|
4545
|
-
get: function () {
|
|
4546
|
-
return this.textWidth ? this.textWidth + "px" : undefined;
|
|
4547
|
-
},
|
|
4548
|
-
enumerable: false,
|
|
4549
|
-
configurable: true
|
|
4550
|
-
});
|
|
4551
|
-
Object.defineProperty(Cover.prototype, "coverClasses", {
|
|
4580
|
+
Object.defineProperty(Cover.prototype, "renderedtextAreaWidth", {
|
|
4552
4581
|
get: function () {
|
|
4553
|
-
return
|
|
4554
|
-
.append("sv-cover")
|
|
4555
|
-
.append("sv-conver__without-background", !this.backgroundColor && !this.backgroundImage)
|
|
4556
|
-
.toString();
|
|
4582
|
+
return this.textAreaWidth ? this.textAreaWidth + "px" : undefined;
|
|
4557
4583
|
},
|
|
4558
4584
|
enumerable: false,
|
|
4559
4585
|
configurable: true
|
|
4560
4586
|
});
|
|
4561
|
-
Object.defineProperty(Cover.prototype, "
|
|
4587
|
+
Object.defineProperty(Cover.prototype, "survey", {
|
|
4562
4588
|
get: function () {
|
|
4563
|
-
return
|
|
4564
|
-
.append("sv-conver__content")
|
|
4565
|
-
.append("sv-conver__content--static", this.areaWidth === "survey" && this.survey.calculateWidthMode() === "static")
|
|
4566
|
-
.append("sv-conver__content--responsive", this.areaWidth === "container" || this.survey.calculateWidthMode() === "responsive")
|
|
4567
|
-
.toString();
|
|
4589
|
+
return this._survey;
|
|
4568
4590
|
},
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
.
|
|
4576
|
-
.
|
|
4577
|
-
|
|
4578
|
-
|
|
4591
|
+
set: function (newValue) {
|
|
4592
|
+
var _this = this;
|
|
4593
|
+
if (this._survey === newValue)
|
|
4594
|
+
return;
|
|
4595
|
+
this._survey = newValue;
|
|
4596
|
+
if (!!newValue) {
|
|
4597
|
+
this.updateContentClasses();
|
|
4598
|
+
this._survey.onPropertyChanged.add(function (sender, options) {
|
|
4599
|
+
if (options.name == "widthMode") {
|
|
4600
|
+
_this.updateContentClasses();
|
|
4601
|
+
}
|
|
4602
|
+
});
|
|
4603
|
+
}
|
|
4579
4604
|
},
|
|
4580
4605
|
enumerable: false,
|
|
4581
4606
|
configurable: true
|
|
@@ -4593,24 +4618,33 @@ var Cover = /** @class */ (function (_super) {
|
|
|
4593
4618
|
enumerable: false,
|
|
4594
4619
|
configurable: true
|
|
4595
4620
|
});
|
|
4621
|
+
Cover.prototype.propertyValueChanged = function (name, oldValue, newValue) {
|
|
4622
|
+
_super.prototype.propertyValueChanged.call(this, name, oldValue, newValue);
|
|
4623
|
+
if (name === "backgroundColor" || name === "backgroundImage" || name === "overlapEnabled") {
|
|
4624
|
+
this.updateCoverClasses();
|
|
4625
|
+
}
|
|
4626
|
+
if (name === "inheritWidthFrom") {
|
|
4627
|
+
this.updateContentClasses();
|
|
4628
|
+
}
|
|
4629
|
+
if (name === "backgroundImageFit") {
|
|
4630
|
+
this.updateBackgroundImageClasses();
|
|
4631
|
+
}
|
|
4632
|
+
};
|
|
4596
4633
|
__decorate([
|
|
4597
4634
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
4598
4635
|
], Cover.prototype, "height", void 0);
|
|
4599
4636
|
__decorate([
|
|
4600
4637
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
4601
|
-
], Cover.prototype, "
|
|
4638
|
+
], Cover.prototype, "inheritWidthFrom", void 0);
|
|
4602
4639
|
__decorate([
|
|
4603
4640
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
4604
|
-
], Cover.prototype, "
|
|
4641
|
+
], Cover.prototype, "textAreaWidth", void 0);
|
|
4605
4642
|
__decorate([
|
|
4606
4643
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
4607
|
-
], Cover.prototype, "
|
|
4644
|
+
], Cover.prototype, "textGlowEnabled", void 0);
|
|
4608
4645
|
__decorate([
|
|
4609
4646
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
4610
|
-
], Cover.prototype, "
|
|
4611
|
-
__decorate([
|
|
4612
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
4613
|
-
], Cover.prototype, "overlap", void 0);
|
|
4647
|
+
], Cover.prototype, "overlapEnabled", void 0);
|
|
4614
4648
|
__decorate([
|
|
4615
4649
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
4616
4650
|
], Cover.prototype, "backgroundColor", void 0);
|
|
@@ -4657,18 +4691,25 @@ var Cover = /** @class */ (function (_super) {
|
|
|
4657
4691
|
__decorate([
|
|
4658
4692
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
4659
4693
|
], Cover.prototype, "descriptionStyle", void 0);
|
|
4694
|
+
__decorate([
|
|
4695
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
4696
|
+
], Cover.prototype, "coverClasses", void 0);
|
|
4697
|
+
__decorate([
|
|
4698
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
4699
|
+
], Cover.prototype, "contentClasses", void 0);
|
|
4700
|
+
__decorate([
|
|
4701
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
4702
|
+
], Cover.prototype, "backgroundImageClasses", void 0);
|
|
4660
4703
|
return Cover;
|
|
4661
4704
|
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));
|
|
4662
4705
|
|
|
4663
4706
|
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("cover", [
|
|
4664
4707
|
{ name: "height:number", minValue: 0, default: 256 },
|
|
4665
|
-
{ name: "
|
|
4666
|
-
{ name: "
|
|
4667
|
-
{ name: "
|
|
4668
|
-
{ name: "
|
|
4669
|
-
{ name: "
|
|
4670
|
-
{ name: "backgroundColor" },
|
|
4671
|
-
{ name: "backgroundImage" },
|
|
4708
|
+
{ name: "inheritWidthFrom", default: "survey" },
|
|
4709
|
+
{ name: "textAreaWidth:number", minValue: 0, default: 512 },
|
|
4710
|
+
{ name: "textGlowEnabled:boolean" },
|
|
4711
|
+
{ name: "overlapEnabled:boolean" },
|
|
4712
|
+
{ name: "backgroundImage:file" },
|
|
4672
4713
|
{ name: "backgroundImageOpacity:number", minValue: 0, maxValue: 1, default: 1 },
|
|
4673
4714
|
{ name: "backgroundImageFit", default: "cover", choices: ["cover", "fill", "contain"] },
|
|
4674
4715
|
{ name: "logoPositionX", default: "right" },
|
|
@@ -5590,6 +5631,8 @@ var defaultV2Css = {
|
|
|
5590
5631
|
rootReadOnly: "sd-root--readonly",
|
|
5591
5632
|
rootCompact: "sd-root--compact",
|
|
5592
5633
|
rootFitToContainer: "sd-root-modern--full-container",
|
|
5634
|
+
rootWrapper: "sd-root-modern__wrapper",
|
|
5635
|
+
rootWrapperFixed: "sd-root-modern__wrapper--fixed",
|
|
5593
5636
|
rootBackgroundImage: "sd-root_background-image",
|
|
5594
5637
|
container: "sd-container-modern",
|
|
5595
5638
|
header: "sd-title sd-container-modern__title",
|
|
@@ -7677,7 +7720,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7677
7720
|
DragDropRankingChoices.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
|
|
7678
7721
|
var draggedElementShortcut = document.createElement("div");
|
|
7679
7722
|
draggedElementShortcut.className = this.shortcutClass + " sv-ranking-shortcut";
|
|
7680
|
-
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 10000;\n border-radius: calc(12.5 * var(--sjs-base-unit, var(--base-unit, 8px)));\n min-width: 100px;\n box-shadow: var(--sjs-shadow-medium, 0px 2px 6px 0px rgba(0, 0, 0, 0.1)), var(--sjs-shadow-large, 0px 8px 16px 0px rgba(0, 0, 0, 0.1));\n background-color: var(--sjs-general-backcolor, var(--background, #fff));\n font-family: var(--font-family, 'Open Sans');\n ";
|
|
7723
|
+
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 10000;\n border-radius: calc(12.5 * var(--sjs-base-unit, var(--base-unit, 8px)));\n min-width: 100px;\n max-width: 400px;\n box-shadow: var(--sjs-shadow-medium, 0px 2px 6px 0px rgba(0, 0, 0, 0.1)), var(--sjs-shadow-large, 0px 8px 16px 0px rgba(0, 0, 0, 0.1));\n background-color: var(--sjs-general-backcolor, var(--background, #fff));\n font-family: var(--font-family, 'Open Sans');\n ";
|
|
7681
7724
|
var isDeepClone = true;
|
|
7682
7725
|
var clone = draggedElementNode.cloneNode(isDeepClone);
|
|
7683
7726
|
draggedElementShortcut.appendChild(clone);
|
|
@@ -8197,6 +8240,8 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8197
8240
|
};
|
|
8198
8241
|
DropdownListModel.prototype.onSetFilterString = function () {
|
|
8199
8242
|
var _this = this;
|
|
8243
|
+
if (!this.filterString && !this.popupModel.isVisible)
|
|
8244
|
+
return;
|
|
8200
8245
|
if (!!this.filterString && !this.popupModel.isVisible) {
|
|
8201
8246
|
this.popupModel.isVisible = true;
|
|
8202
8247
|
}
|
|
@@ -8382,11 +8427,11 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8382
8427
|
return;
|
|
8383
8428
|
this._popupModel.toggleVisibility();
|
|
8384
8429
|
this.focusItemOnClickAndPopup();
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8430
|
+
this.question.focus();
|
|
8431
|
+
};
|
|
8432
|
+
DropdownListModel.prototype.chevronPointerDown = function (event) {
|
|
8433
|
+
if (this._popupModel.isVisible) {
|
|
8434
|
+
event.preventDefault();
|
|
8390
8435
|
}
|
|
8391
8436
|
};
|
|
8392
8437
|
DropdownListModel.prototype.onPropertyChangedHandler = function (sender, options) {
|
|
@@ -8526,11 +8571,11 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8526
8571
|
this._popupModel.isVisible = true;
|
|
8527
8572
|
return;
|
|
8528
8573
|
}
|
|
8574
|
+
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["doKey2ClickBlur"])(event);
|
|
8575
|
+
this._popupModel.isVisible = false;
|
|
8529
8576
|
this.resetFilterString();
|
|
8530
8577
|
this.inputString = null;
|
|
8531
8578
|
this.hintString = "";
|
|
8532
|
-
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["doKey2ClickBlur"])(event);
|
|
8533
|
-
this._popupModel.isVisible = false;
|
|
8534
8579
|
event.stopPropagation();
|
|
8535
8580
|
};
|
|
8536
8581
|
DropdownListModel.prototype.onFocus = function (event) {
|
|
@@ -9520,8 +9565,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9520
9565
|
//import "../../modern.scss";
|
|
9521
9566
|
var Version;
|
|
9522
9567
|
var ReleaseDate;
|
|
9523
|
-
Version = "" + "1.9.
|
|
9524
|
-
ReleaseDate = "" + "2023-
|
|
9568
|
+
Version = "" + "1.9.112";
|
|
9569
|
+
ReleaseDate = "" + "2023-10-10";
|
|
9525
9570
|
function checkLibraryVersion(ver, libraryName) {
|
|
9526
9571
|
if (Version != ver) {
|
|
9527
9572
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -15000,6 +15045,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15000
15045
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerFunction", function() { return registerFunction; });
|
|
15001
15046
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
|
|
15002
15047
|
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
|
15048
|
+
/* harmony import */ var _console_warnings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./console-warnings */ "./src/console-warnings.ts");
|
|
15049
|
+
|
|
15003
15050
|
|
|
15004
15051
|
|
|
15005
15052
|
var FunctionFactory = /** @class */ (function () {
|
|
@@ -15036,8 +15083,10 @@ var FunctionFactory = /** @class */ (function () {
|
|
|
15036
15083
|
FunctionFactory.prototype.run = function (name, params, properties) {
|
|
15037
15084
|
if (properties === void 0) { properties = null; }
|
|
15038
15085
|
var func = this.functionHash[name];
|
|
15039
|
-
if (!func)
|
|
15086
|
+
if (!func) {
|
|
15087
|
+
_console_warnings__WEBPACK_IMPORTED_MODULE_2__["ConsoleWarnings"].warn("Unknown function name: " + name);
|
|
15040
15088
|
return null;
|
|
15089
|
+
}
|
|
15041
15090
|
var classRunner = {
|
|
15042
15091
|
func: func,
|
|
15043
15092
|
};
|
|
@@ -20032,6 +20081,8 @@ var englishStrings = {
|
|
|
20032
20081
|
tagboxDoneButtonCaption: "OK",
|
|
20033
20082
|
selectToRankEmptyRankedAreaText: "All choices are ranked",
|
|
20034
20083
|
selectToRankEmptyUnrankedAreaText: "Drag and drop choices here to rank them",
|
|
20084
|
+
ok: "OK",
|
|
20085
|
+
cancel: "Cancel",
|
|
20035
20086
|
};
|
|
20036
20087
|
// Uncomment the lines below if you create a custom dictionary.
|
|
20037
20088
|
// Replace "en" with a custom locale code (for example, "fr" or "de"),
|
|
@@ -20584,6 +20635,7 @@ var Notifier = /** @class */ (function (_super) {
|
|
|
20584
20635
|
_this.timeout = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].notifications.lifetime;
|
|
20585
20636
|
_this.timer = undefined;
|
|
20586
20637
|
_this.actionsVisibility = {};
|
|
20638
|
+
_this.showActions = true;
|
|
20587
20639
|
_this.actionBar = new _actions_container__WEBPACK_IMPORTED_MODULE_4__["ActionContainer"]();
|
|
20588
20640
|
_this.actionBar.updateCallback = function (isResetInitialized) {
|
|
20589
20641
|
_this.actionBar.actions.forEach(function (action) { return action.cssClasses = {}; });
|
|
@@ -20602,7 +20654,7 @@ var Notifier = /** @class */ (function (_super) {
|
|
|
20602
20654
|
};
|
|
20603
20655
|
Notifier.prototype.updateActionsVisibility = function (type) {
|
|
20604
20656
|
var _this = this;
|
|
20605
|
-
this.actionBar.actions.forEach(function (action) { return action.visible = (_this.actionsVisibility[action.id] === type); });
|
|
20657
|
+
this.actionBar.actions.forEach(function (action) { return action.visible = _this.showActions && (_this.actionsVisibility[action.id] === type); });
|
|
20606
20658
|
};
|
|
20607
20659
|
Notifier.prototype.notify = function (message, type, waitUserAction) {
|
|
20608
20660
|
var _this = this;
|
|
@@ -21910,8 +21962,8 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
21910
21962
|
};
|
|
21911
21963
|
/**
|
|
21912
21964
|
* Validates questions within this panel or page and returns `false` if the validation fails.
|
|
21913
|
-
* @param fireCallback *Optional
|
|
21914
|
-
* @param focusOnFirstError *Optional
|
|
21965
|
+
* @param fireCallback *(Optional)* Pass `false` if you do not want to show validation errors in the UI.
|
|
21966
|
+
* @param focusOnFirstError *(Optional)* Pass `true` if you want to focus the first question with a validation error.
|
|
21915
21967
|
* @see [Data Validation](https://surveyjs.io/form-library/documentation/data-validation)
|
|
21916
21968
|
*/
|
|
21917
21969
|
PanelModelBase.prototype.validate = function (fireCallback, focusOnFirstError, rec) {
|
|
@@ -23983,6 +24035,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23983
24035
|
|
|
23984
24036
|
|
|
23985
24037
|
function createPopupModalViewModel(options, rootElement) {
|
|
24038
|
+
var _a;
|
|
23986
24039
|
var popupModel = new _popup__WEBPACK_IMPORTED_MODULE_0__["PopupModel"](options.componentName, options.data, "top", "left", false, true, options.onCancel, options.onApply, function () {
|
|
23987
24040
|
options.onHide();
|
|
23988
24041
|
if (!!container) {
|
|
@@ -23990,6 +24043,7 @@ function createPopupModalViewModel(options, rootElement) {
|
|
|
23990
24043
|
}
|
|
23991
24044
|
}, options.onShow, options.cssClass, options.title);
|
|
23992
24045
|
popupModel.displayMode = options.displayMode || "popup";
|
|
24046
|
+
popupModel.isFocusedContent = (_a = options.isFocusedContent) !== null && _a !== void 0 ? _a : true;
|
|
23993
24047
|
var popupViewModel = new _popup_modal_view_model__WEBPACK_IMPORTED_MODULE_2__["PopupModalViewModel"](popupModel);
|
|
23994
24048
|
if (!!rootElement && !!rootElement.appendChild) {
|
|
23995
24049
|
var container = document.createElement("div");
|
|
@@ -24630,6 +24684,14 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
24630
24684
|
|
|
24631
24685
|
|
|
24632
24686
|
|
|
24687
|
+
var TriggerExpressionInfo = /** @class */ (function () {
|
|
24688
|
+
function TriggerExpressionInfo(name, canRun, doComplete) {
|
|
24689
|
+
this.name = name;
|
|
24690
|
+
this.canRun = canRun;
|
|
24691
|
+
this.doComplete = doComplete;
|
|
24692
|
+
}
|
|
24693
|
+
return TriggerExpressionInfo;
|
|
24694
|
+
}());
|
|
24633
24695
|
/**
|
|
24634
24696
|
* A base class for all questions.
|
|
24635
24697
|
*/
|
|
@@ -24647,12 +24709,13 @@ var Question = /** @class */ (function (_super) {
|
|
|
24647
24709
|
*
|
|
24648
24710
|
* - `sender`: `SurveyModel`\
|
|
24649
24711
|
* A survey instance that contains the question whose ready state has changed.
|
|
24650
|
-
* - `options.isReady`: `
|
|
24712
|
+
* - `options.isReady`: `boolean`\
|
|
24651
24713
|
* Indicates whether the question is ready.
|
|
24652
|
-
* - `options.oldIsReady`: `
|
|
24714
|
+
* - `options.oldIsReady`: `boolean`\
|
|
24653
24715
|
* Indicates the previous ready state.
|
|
24654
24716
|
*/
|
|
24655
24717
|
_this.onReadyChanged = _this.addEvent();
|
|
24718
|
+
_this.triggersInfo = [];
|
|
24656
24719
|
_this.isRunningValidatorsValue = false;
|
|
24657
24720
|
_this.isValueChangedInSurvey = false;
|
|
24658
24721
|
_this.allowNotifyValueChanged = true;
|
|
@@ -24670,6 +24733,11 @@ var Question = /** @class */ (function (_super) {
|
|
|
24670
24733
|
};
|
|
24671
24734
|
_this.locTitle.storeDefaultText = true;
|
|
24672
24735
|
_this.createLocalizableString("requiredErrorText", _this);
|
|
24736
|
+
_this.addTriggerInfo("resetValueIf", function () { return !_this.isEmpty(); }, function () {
|
|
24737
|
+
_this.clearValue();
|
|
24738
|
+
_this.updateValueWithDefaults();
|
|
24739
|
+
});
|
|
24740
|
+
_this.addTriggerInfo("setValueIf", function () { return true; }, function () { return _this.runSetValueExpression(); });
|
|
24673
24741
|
_this.registerPropertyChangedHandlers(["width"], function () {
|
|
24674
24742
|
_this.updateQuestionCss();
|
|
24675
24743
|
if (!!_this.parent) {
|
|
@@ -24709,7 +24777,6 @@ var Question = /** @class */ (function (_super) {
|
|
|
24709
24777
|
};
|
|
24710
24778
|
Question.prototype.setIsMobile = function (val) {
|
|
24711
24779
|
this.isMobile = val && (this.allowMobileInDesignMode() || !this.isDesignMode);
|
|
24712
|
-
this.renderMinWidth = !val;
|
|
24713
24780
|
};
|
|
24714
24781
|
Question.prototype.createLocTitleProperty = function () {
|
|
24715
24782
|
var _this = this;
|
|
@@ -25122,31 +25189,60 @@ var Question = /** @class */ (function (_super) {
|
|
|
25122
25189
|
requiredAnsweredQuestionCount: !this.isEmpty() && this.isRequired ? 1 : 0,
|
|
25123
25190
|
};
|
|
25124
25191
|
};
|
|
25125
|
-
Question.prototype.
|
|
25192
|
+
Question.prototype.runSetValueExpression = function () {
|
|
25126
25193
|
var _this = this;
|
|
25127
|
-
if (
|
|
25128
|
-
|
|
25129
|
-
|
|
25194
|
+
if (!this.setValueExpression) {
|
|
25195
|
+
this.clearValue();
|
|
25196
|
+
}
|
|
25197
|
+
else {
|
|
25198
|
+
if (!this.setValueExpressionRunner) {
|
|
25199
|
+
this.setValueExpressionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_6__["ExpressionRunner"](this.setValueExpression);
|
|
25200
|
+
this.setValueExpressionRunner.onRunComplete = function (res) {
|
|
25201
|
+
if (!_this.isTwoValueEquals(_this.value, res)) {
|
|
25202
|
+
_this.value = res;
|
|
25203
|
+
}
|
|
25204
|
+
};
|
|
25205
|
+
}
|
|
25206
|
+
else {
|
|
25207
|
+
this.setValueExpressionRunner.expression = this.setValueExpression;
|
|
25208
|
+
}
|
|
25209
|
+
this.setValueExpressionRunner.run(this.getDataFilteredValues(), this.getDataFilteredProperties());
|
|
25210
|
+
}
|
|
25211
|
+
};
|
|
25212
|
+
Question.prototype.addTriggerInfo = function (name, canRun, doComplete) {
|
|
25213
|
+
this.triggersInfo.push(new TriggerExpressionInfo(name, canRun, doComplete));
|
|
25214
|
+
};
|
|
25215
|
+
Question.prototype.runTriggerInfo = function (info, name, value) {
|
|
25216
|
+
var expression = this[info.name];
|
|
25217
|
+
if (!expression || info.isRunning || !info.canRun())
|
|
25130
25218
|
return;
|
|
25131
|
-
if (!
|
|
25132
|
-
|
|
25133
|
-
|
|
25134
|
-
_this.isRunningResetValueIf = false;
|
|
25219
|
+
if (!info.runner) {
|
|
25220
|
+
info.runner = new _conditions__WEBPACK_IMPORTED_MODULE_6__["ExpressionRunner"](expression);
|
|
25221
|
+
info.runner.onRunComplete = function (res) {
|
|
25135
25222
|
if (res === true) {
|
|
25136
|
-
|
|
25137
|
-
_this.updateValueWithDefaults();
|
|
25223
|
+
info.doComplete();
|
|
25138
25224
|
}
|
|
25225
|
+
info.isRunning = false;
|
|
25139
25226
|
};
|
|
25140
25227
|
}
|
|
25141
25228
|
else {
|
|
25142
|
-
|
|
25229
|
+
info.runner.expression = expression;
|
|
25143
25230
|
}
|
|
25144
25231
|
var keys = {};
|
|
25145
25232
|
keys[name] = value;
|
|
25146
|
-
if (!new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_13__["ProcessValue"]().isAnyKeyChanged(keys,
|
|
25233
|
+
if (!new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_13__["ProcessValue"]().isAnyKeyChanged(keys, info.runner.getVariables()))
|
|
25147
25234
|
return;
|
|
25148
|
-
|
|
25149
|
-
|
|
25235
|
+
info.isRunning = true;
|
|
25236
|
+
info.runner.run(this.getDataFilteredValues(), this.getDataFilteredProperties());
|
|
25237
|
+
};
|
|
25238
|
+
Question.prototype.runTriggers = function (name, value) {
|
|
25239
|
+
var _this = this;
|
|
25240
|
+
if (this.isReadOnly || this.isSettingQuestionValue ||
|
|
25241
|
+
(this.parentQuestion && this.parentQuestion.getValueName() === name))
|
|
25242
|
+
return;
|
|
25243
|
+
this.triggersInfo.forEach(function (info) {
|
|
25244
|
+
_this.runTriggerInfo(info, name, value);
|
|
25245
|
+
});
|
|
25150
25246
|
};
|
|
25151
25247
|
Question.prototype.runConditions = function () {
|
|
25152
25248
|
if (this.data && !this.isLoadingFromJson) {
|
|
@@ -25565,6 +25661,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
25565
25661
|
};
|
|
25566
25662
|
Question.prototype.afterRender = function (el) {
|
|
25567
25663
|
var _this = this;
|
|
25664
|
+
this.afterRenderCore(el);
|
|
25568
25665
|
if (!this.survey)
|
|
25569
25666
|
return;
|
|
25570
25667
|
this.survey.afterRenderQuestion(this, el);
|
|
@@ -25583,6 +25680,8 @@ var Question = /** @class */ (function (_super) {
|
|
|
25583
25680
|
}
|
|
25584
25681
|
this.checkForResponsiveness(el);
|
|
25585
25682
|
};
|
|
25683
|
+
Question.prototype.afterRenderCore = function (el) {
|
|
25684
|
+
};
|
|
25586
25685
|
Question.prototype.getCommentElementsId = function () {
|
|
25587
25686
|
return [this.commentId];
|
|
25588
25687
|
};
|
|
@@ -26294,27 +26393,27 @@ var Question = /** @class */ (function (_super) {
|
|
|
26294
26393
|
*
|
|
26295
26394
|
* | Question type | Value type(s) |
|
|
26296
26395
|
* | ------------- | ------------- |
|
|
26297
|
-
* | Checkboxes | `Array<
|
|
26298
|
-
* | Dropdown | `
|
|
26299
|
-
* | Dynamic Matrix | `Array<
|
|
26300
|
-
* | Dynamic Panel | `Array<
|
|
26301
|
-
* | Expression | `
|
|
26396
|
+
* | Checkboxes | `Array<string \| number>` |
|
|
26397
|
+
* | Dropdown | `string` \| `number` |
|
|
26398
|
+
* | Dynamic Matrix | `Array<object>` |
|
|
26399
|
+
* | Dynamic Panel | `Array<object>` |
|
|
26400
|
+
* | Expression | `string` \| `number` \| `boolean` |
|
|
26302
26401
|
* | File Upload | `File` \| `Array<File>` |
|
|
26303
26402
|
* | HTML | (no value) |
|
|
26304
26403
|
* | Image | (no value) |
|
|
26305
|
-
* | Image Picker | `Array<
|
|
26306
|
-
* | Long Text | `
|
|
26307
|
-
* | Multi-Select Dropdown | `
|
|
26308
|
-
* | Multi-Select Matrix | `
|
|
26309
|
-
* | Multiple Textboxes | `Array<
|
|
26404
|
+
* | Image Picker | `Array<string \| number>` |
|
|
26405
|
+
* | Long Text | `string` |
|
|
26406
|
+
* | Multi-Select Dropdown | `object` |
|
|
26407
|
+
* | Multi-Select Matrix | `object` |
|
|
26408
|
+
* | Multiple Textboxes | `Array<string>` |
|
|
26310
26409
|
* | Panel | (no value) |
|
|
26311
|
-
* | Radio Button Group | `
|
|
26312
|
-
* | Ranking | `Array<
|
|
26313
|
-
* | Rating Scale | `
|
|
26314
|
-
* | Signature | `
|
|
26315
|
-
* | Single-Line Input | `
|
|
26316
|
-
* | Single-Select Matrix | `
|
|
26317
|
-
* | Yes/No (Boolean) | `
|
|
26410
|
+
* | Radio Button Group | `string` \| `number` |
|
|
26411
|
+
* | Ranking | `Array<string \| number>` |
|
|
26412
|
+
* | Rating Scale | `number` \| `string` |
|
|
26413
|
+
* | Signature | `string` (base64-encoded image) |
|
|
26414
|
+
* | Single-Line Input | `string` \| `number` \| `Date` |
|
|
26415
|
+
* | Single-Select Matrix | `object` |
|
|
26416
|
+
* | Yes/No (Boolean) | `boolean` \| `string` |
|
|
26318
26417
|
*/
|
|
26319
26418
|
get: function () {
|
|
26320
26419
|
return this.getValueCore();
|
|
@@ -26529,6 +26628,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
26529
26628
|
*
|
|
26530
26629
|
* An expression can also include built-in and custom functions for advanced calculations. For example, if the `defaultValue` should be today's date, set the `defaultValueExpression` to `"today()"`, and the corresponding built-in function will be executed each time the survey is loaded. Refer to the following help topic for more information: [Built-In Functions](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#built-in-functions).
|
|
26531
26630
|
* @see defaultValue
|
|
26631
|
+
* @see setValueExpression
|
|
26532
26632
|
*/
|
|
26533
26633
|
get: function () {
|
|
26534
26634
|
return this.getPropertyValue("defaultValueExpression");
|
|
@@ -26548,6 +26648,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
26548
26648
|
* A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
|
|
26549
26649
|
*
|
|
26550
26650
|
* [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
|
|
26651
|
+
* @see setValueIf
|
|
26551
26652
|
*/
|
|
26552
26653
|
get: function () {
|
|
26553
26654
|
return this.getPropertyValue("resetValueIf");
|
|
@@ -26558,6 +26659,41 @@ var Question = /** @class */ (function (_super) {
|
|
|
26558
26659
|
enumerable: false,
|
|
26559
26660
|
configurable: true
|
|
26560
26661
|
});
|
|
26662
|
+
Object.defineProperty(Question.prototype, "setValueIf", {
|
|
26663
|
+
/**
|
|
26664
|
+
* A Boolean expression. If it evaluates to `true`, the question value is set to a value calculated using the [`setValueExpression`](#setValueExpression).
|
|
26665
|
+
*
|
|
26666
|
+
* A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
|
|
26667
|
+
*
|
|
26668
|
+
* [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
|
|
26669
|
+
* @see resetValueIf
|
|
26670
|
+
*/
|
|
26671
|
+
get: function () {
|
|
26672
|
+
return this.getPropertyValue("setValueIf");
|
|
26673
|
+
},
|
|
26674
|
+
set: function (val) {
|
|
26675
|
+
this.setPropertyValue("setValueIf", val);
|
|
26676
|
+
},
|
|
26677
|
+
enumerable: false,
|
|
26678
|
+
configurable: true
|
|
26679
|
+
});
|
|
26680
|
+
Object.defineProperty(Question.prototype, "setValueExpression", {
|
|
26681
|
+
/**
|
|
26682
|
+
* An expression used to calculate the question value. Applies only when the [`setValueIf`](#setValueIf) expression evaluates to `true`.
|
|
26683
|
+
*
|
|
26684
|
+
* [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
|
|
26685
|
+
* @see defaultValueExpression
|
|
26686
|
+
* @see resetValueIf
|
|
26687
|
+
*/
|
|
26688
|
+
get: function () {
|
|
26689
|
+
return this.getPropertyValue("setValueExpression");
|
|
26690
|
+
},
|
|
26691
|
+
set: function (val) {
|
|
26692
|
+
this.setPropertyValue("setValueExpression", val);
|
|
26693
|
+
},
|
|
26694
|
+
enumerable: false,
|
|
26695
|
+
configurable: true
|
|
26696
|
+
});
|
|
26561
26697
|
Object.defineProperty(Question.prototype, "resizeStyle", {
|
|
26562
26698
|
get: function () {
|
|
26563
26699
|
return this.allowResizeComment ? "both" : "none";
|
|
@@ -26948,7 +27084,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
26948
27084
|
};
|
|
26949
27085
|
/**
|
|
26950
27086
|
* Validates this question and returns `false` if the validation fails.
|
|
26951
|
-
* @param fireCallback *Optional
|
|
27087
|
+
* @param fireCallback *(Optional)* Pass `false` if you do not want to show validation errors in the UI.
|
|
26952
27088
|
* @see [Data Validation](https://surveyjs.io/form-library/documentation/data-validation)
|
|
26953
27089
|
*/
|
|
26954
27090
|
Question.prototype.validate = function (fireCallback, rec) {
|
|
@@ -27089,8 +27225,10 @@ var Question = /** @class */ (function (_super) {
|
|
|
27089
27225
|
if (!this.checkIsValueCorrect(newValue))
|
|
27090
27226
|
return;
|
|
27091
27227
|
this.isOldAnswered = this.isAnswered;
|
|
27228
|
+
this.isSettingQuestionValue = true;
|
|
27092
27229
|
this.setNewValueInData(newValue);
|
|
27093
27230
|
this.allowNotifyValueChanged && this.onValueChanged();
|
|
27231
|
+
this.isSettingQuestionValue = false;
|
|
27094
27232
|
if (this.isAnswered !== this.isOldAnswered) {
|
|
27095
27233
|
this.updateQuestionCss();
|
|
27096
27234
|
}
|
|
@@ -27673,10 +27811,9 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("question", [
|
|
|
27673
27811
|
},
|
|
27674
27812
|
{ name: "valueName", onSettingValue: function (obj, val) { return makeNameValid(val); } },
|
|
27675
27813
|
"enableIf:condition",
|
|
27676
|
-
|
|
27677
|
-
|
|
27678
|
-
|
|
27679
|
-
},
|
|
27814
|
+
"resetValueIf:condition",
|
|
27815
|
+
"setValueIf:condition",
|
|
27816
|
+
{ name: "setValueExpression:expression", visibleIf: function (obj) { return !!obj.setValueIf; } },
|
|
27680
27817
|
"defaultValue:value",
|
|
27681
27818
|
{
|
|
27682
27819
|
name: "defaultValueExpression:expression",
|
|
@@ -28597,8 +28734,10 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
28597
28734
|
customValues[_i - 1] = arguments[_i];
|
|
28598
28735
|
}
|
|
28599
28736
|
_this.waitingGetChoiceDisplayValueResponse = false;
|
|
28600
|
-
if (!displayValues || !displayValues.length)
|
|
28737
|
+
if (!displayValues || !displayValues.length) {
|
|
28738
|
+
_this.updateIsReady();
|
|
28601
28739
|
return;
|
|
28740
|
+
}
|
|
28602
28741
|
var items = displayValues.map(function (displayValue, index) { return _this.createItemValue(valueArray[index], displayValue); });
|
|
28603
28742
|
_this.setCustomValuesIntoItems(items, customValues);
|
|
28604
28743
|
if (Array.isArray(value)) {
|
|
@@ -31911,8 +32050,8 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
|
31911
32050
|
QuestionCustomModelBase.prototype.afterRenderQuestionElement = function (el) {
|
|
31912
32051
|
//Do nothing
|
|
31913
32052
|
};
|
|
31914
|
-
QuestionCustomModelBase.prototype.
|
|
31915
|
-
_super.prototype.
|
|
32053
|
+
QuestionCustomModelBase.prototype.afterRenderCore = function (el) {
|
|
32054
|
+
_super.prototype.afterRenderCore.call(this, el);
|
|
31916
32055
|
if (!!this.customQuestion) {
|
|
31917
32056
|
this.customQuestion.onAfterRender(this, el);
|
|
31918
32057
|
}
|
|
@@ -32109,8 +32248,8 @@ var QuestionCustomModel = /** @class */ (function (_super) {
|
|
|
32109
32248
|
_super.prototype.focus.call(this, onError);
|
|
32110
32249
|
}
|
|
32111
32250
|
};
|
|
32112
|
-
QuestionCustomModel.prototype.
|
|
32113
|
-
_super.prototype.
|
|
32251
|
+
QuestionCustomModel.prototype.afterRenderCore = function (el) {
|
|
32252
|
+
_super.prototype.afterRenderCore.call(this, el);
|
|
32114
32253
|
if (!!this.contentQuestion) {
|
|
32115
32254
|
this.contentQuestion.afterRender(el);
|
|
32116
32255
|
}
|
|
@@ -33370,11 +33509,6 @@ var QuestionExpressionModel = /** @class */ (function (_super) {
|
|
|
33370
33509
|
}
|
|
33371
33510
|
return val.toString();
|
|
33372
33511
|
};
|
|
33373
|
-
QuestionExpressionModel.prototype.convertToCorrectValue = function (val) {
|
|
33374
|
-
if (Array.isArray(val))
|
|
33375
|
-
return val.join(", ");
|
|
33376
|
-
return val;
|
|
33377
|
-
};
|
|
33378
33512
|
return QuestionExpressionModel;
|
|
33379
33513
|
}(_question__WEBPACK_IMPORTED_MODULE_1__["Question"]));
|
|
33380
33514
|
|
|
@@ -33669,7 +33803,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
33669
33803
|
*
|
|
33670
33804
|
* - `sender`: `SurveyModel`\
|
|
33671
33805
|
* A survey instance that raised the event.
|
|
33672
|
-
* - `options.state`: `
|
|
33806
|
+
* - `options.state`: `string`\
|
|
33673
33807
|
* The current upload state: `"empty"`, `"loading"`, `"loaded"`, or `"error"`.
|
|
33674
33808
|
*/
|
|
33675
33809
|
_this.onUploadStateChanged = _this.addEvent();
|
|
@@ -34277,7 +34411,14 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34277
34411
|
get: function () {
|
|
34278
34412
|
var isShowLoadingIndicator = this.showLoadingIndicator;
|
|
34279
34413
|
var isPlayingVideo = this.isPlayingVideo;
|
|
34280
|
-
return
|
|
34414
|
+
return !isShowLoadingIndicator && !isPlayingVideo;
|
|
34415
|
+
},
|
|
34416
|
+
enumerable: false,
|
|
34417
|
+
configurable: true
|
|
34418
|
+
});
|
|
34419
|
+
Object.defineProperty(QuestionFileModel.prototype, "showPreviewContainer", {
|
|
34420
|
+
get: function () {
|
|
34421
|
+
return this.previewValue && this.previewValue.length > 0;
|
|
34281
34422
|
},
|
|
34282
34423
|
enumerable: false,
|
|
34283
34424
|
configurable: true
|
|
@@ -34928,6 +35069,13 @@ var QuestionHtmlModel = /** @class */ (function (_super) {
|
|
|
34928
35069
|
QuestionHtmlModel.prototype.processHtml = function (html) {
|
|
34929
35070
|
return this.survey ? this.survey.processHtml(html, "html-question") : this.html;
|
|
34930
35071
|
};
|
|
35072
|
+
Object.defineProperty(QuestionHtmlModel.prototype, "isNewA11yStructure", {
|
|
35073
|
+
get: function () {
|
|
35074
|
+
return true;
|
|
35075
|
+
},
|
|
35076
|
+
enumerable: false,
|
|
35077
|
+
configurable: true
|
|
35078
|
+
});
|
|
34931
35079
|
return QuestionHtmlModel;
|
|
34932
35080
|
}(_questionnonvalue__WEBPACK_IMPORTED_MODULE_0__["QuestionNonValue"]));
|
|
34933
35081
|
|
|
@@ -35254,7 +35402,7 @@ function getCorrectImageLink(val) {
|
|
|
35254
35402
|
return youtubeUrl + youtubeEmbed + "/" + id;
|
|
35255
35403
|
}
|
|
35256
35404
|
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("image", [
|
|
35257
|
-
{ name: "imageLink", serializationProperty: "locImageLink" },
|
|
35405
|
+
{ name: "imageLink:file", serializationProperty: "locImageLink" },
|
|
35258
35406
|
{ name: "altText", serializationProperty: "locAltText", alternativeName: "text", category: "general" },
|
|
35259
35407
|
{
|
|
35260
35408
|
name: "contentMode",
|
|
@@ -35831,7 +35979,7 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
|
|
|
35831
35979
|
return QuestionImagePickerModel;
|
|
35832
35980
|
}(_question_baseselect__WEBPACK_IMPORTED_MODULE_2__["QuestionCheckboxBase"]));
|
|
35833
35981
|
|
|
35834
|
-
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("imageitemvalue", [{ name: "imageLink", serializationProperty: "locImageLink" }], function (value) { return new ImageItemValue(value); }, "itemvalue");
|
|
35982
|
+
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("imageitemvalue", [{ name: "imageLink:file", serializationProperty: "locImageLink" }], function (value) { return new ImageItemValue(value); }, "itemvalue");
|
|
35835
35983
|
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("responsiveImageSize", [], undefined, "number");
|
|
35836
35984
|
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("imagepicker", [
|
|
35837
35985
|
{ name: "showOtherItem", visible: false },
|
|
@@ -39065,7 +39213,10 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
39065
39213
|
return false;
|
|
39066
39214
|
};
|
|
39067
39215
|
QuestionMatrixDropdownModelBase.prototype.addDuplicationError = function (question) {
|
|
39068
|
-
question.
|
|
39216
|
+
var keyError = question.errors.find(function (error) { return error.getErrorType() === "keyduplicationerror"; });
|
|
39217
|
+
if (!keyError) {
|
|
39218
|
+
question.addError(new _error__WEBPACK_IMPORTED_MODULE_10__["KeyDuplicationError"](this.keyDuplicationError, this));
|
|
39219
|
+
}
|
|
39069
39220
|
};
|
|
39070
39221
|
QuestionMatrixDropdownModelBase.prototype.getFirstQuestionToFocus = function (withError) {
|
|
39071
39222
|
return this.getFirstCellQuestion(withError);
|
|
@@ -39897,6 +40048,26 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
|
39897
40048
|
enumerable: false,
|
|
39898
40049
|
configurable: true
|
|
39899
40050
|
});
|
|
40051
|
+
Object.defineProperty(MatrixDropdownColumn.prototype, "setValueIf", {
|
|
40052
|
+
get: function () {
|
|
40053
|
+
return this.templateQuestion.setValueIf;
|
|
40054
|
+
},
|
|
40055
|
+
set: function (val) {
|
|
40056
|
+
this.templateQuestion.setValueIf = val;
|
|
40057
|
+
},
|
|
40058
|
+
enumerable: false,
|
|
40059
|
+
configurable: true
|
|
40060
|
+
});
|
|
40061
|
+
Object.defineProperty(MatrixDropdownColumn.prototype, "setValueExpession", {
|
|
40062
|
+
get: function () {
|
|
40063
|
+
return this.templateQuestion.setValueExpession;
|
|
40064
|
+
},
|
|
40065
|
+
set: function (val) {
|
|
40066
|
+
this.templateQuestion.setValueExpession = val;
|
|
40067
|
+
},
|
|
40068
|
+
enumerable: false,
|
|
40069
|
+
configurable: true
|
|
40070
|
+
});
|
|
39900
40071
|
Object.defineProperty(MatrixDropdownColumn.prototype, "isUnique", {
|
|
39901
40072
|
get: function () {
|
|
39902
40073
|
return this.getPropertyValue("isUnique");
|
|
@@ -40347,12 +40518,13 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownc
|
|
|
40347
40518
|
"visibleIf:condition",
|
|
40348
40519
|
"enableIf:condition",
|
|
40349
40520
|
"requiredIf:condition",
|
|
40521
|
+
"resetValueIf:condition",
|
|
40522
|
+
"setValueIf:condition",
|
|
40523
|
+
{ name: "setValueExpression:expression", visibleIf: function (obj) { return !!obj.setValueIf; } },
|
|
40350
40524
|
{
|
|
40351
40525
|
name: "showInMultipleColumns:boolean",
|
|
40352
40526
|
dependsOn: "cellType",
|
|
40353
40527
|
visibleIf: function (obj) {
|
|
40354
|
-
if (!obj)
|
|
40355
|
-
return false;
|
|
40356
40528
|
return obj.isSupportMultipleColumns;
|
|
40357
40529
|
},
|
|
40358
40530
|
},
|
|
@@ -41205,9 +41377,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41205
41377
|
var renderedCell = this.createTextCell(row.locText);
|
|
41206
41378
|
renderedCell.row = row;
|
|
41207
41379
|
res.cells.push(renderedCell);
|
|
41208
|
-
|
|
41209
|
-
this.setHeaderCellWidth(null, renderedCell);
|
|
41210
|
-
}
|
|
41380
|
+
this.setHeaderCellWidth(null, renderedCell);
|
|
41211
41381
|
renderedCell.className = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
|
|
41212
41382
|
.append(renderedCell.className)
|
|
41213
41383
|
.append(this.cssClasses.rowTextCell)
|
|
@@ -42031,7 +42201,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
42031
42201
|
};
|
|
42032
42202
|
/**
|
|
42033
42203
|
* Creates and adds a new row to the matrix.
|
|
42034
|
-
* @param setFocus *Optional
|
|
42204
|
+
* @param setFocus *(Optional)* Pass `true` to focus the cell in the first column.
|
|
42035
42205
|
*/
|
|
42036
42206
|
QuestionMatrixDynamicModel.prototype.addRow = function (setFocus) {
|
|
42037
42207
|
var oldRowCount = this.rowCount;
|
|
@@ -42169,7 +42339,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
42169
42339
|
/**
|
|
42170
42340
|
* Removes a matrix row with a specified index.
|
|
42171
42341
|
* @param index A zero-based row index.
|
|
42172
|
-
* @param confirmDelete *Optional
|
|
42342
|
+
* @param confirmDelete *(Optional)* A Boolean value that specifies whether to display a confirmation dialog. If you do not specify this parameter, the [`confirmDelete`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#confirmDelete) property value is used.
|
|
42173
42343
|
*/
|
|
42174
42344
|
QuestionMatrixDynamicModel.prototype.removeRow = function (index, confirmDelete) {
|
|
42175
42345
|
var _this = this;
|
|
@@ -44103,8 +44273,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
44103
44273
|
*
|
|
44104
44274
|
* The template can contain the following placeholders:
|
|
44105
44275
|
*
|
|
44106
|
-
* - `{panelIndex}` - A
|
|
44107
|
-
* - `{visiblePanelIndex}` - A
|
|
44276
|
+
* - `{panelIndex}` - A panel index within the collection of all panels. Starts with 1.
|
|
44277
|
+
* - `{visiblePanelIndex}` - A panel index within the collection of visible panels. Starts with 1.
|
|
44108
44278
|
* @see template
|
|
44109
44279
|
* @see templateDescription
|
|
44110
44280
|
* @see templateElements
|
|
@@ -44133,8 +44303,12 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
44133
44303
|
*
|
|
44134
44304
|
* The template can contain the following placeholders:
|
|
44135
44305
|
*
|
|
44136
|
-
* - `{panelIndex}` - A
|
|
44137
|
-
* - `{visiblePanelIndex}` - A
|
|
44306
|
+
* - `{panelIndex}` - A panel index within the collection of all panels. Starts with 1.
|
|
44307
|
+
* - `{visiblePanelIndex}` - A panel index within the collection of visible panels. Starts with 1.
|
|
44308
|
+
*
|
|
44309
|
+
* If you want to customize individual tab titles, handle `SurveyModel`'s [`onGetDynamicPanelTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetDynamicPanelTabTitle) event.
|
|
44310
|
+
*
|
|
44311
|
+
* [View Demo](/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
|
|
44138
44312
|
* @see templateTitle
|
|
44139
44313
|
* @see renderMode
|
|
44140
44314
|
*/
|
|
@@ -44600,10 +44774,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
44600
44774
|
};
|
|
44601
44775
|
QuestionPanelDynamicModel.prototype.setIsMobile = function (val) {
|
|
44602
44776
|
_super.prototype.setIsMobile.call(this, val);
|
|
44603
|
-
(this.panels || []).forEach(function (panel) { return panel.
|
|
44604
|
-
|
|
44605
|
-
element.isMobile = val;
|
|
44606
|
-
}
|
|
44777
|
+
(this.panels || []).forEach(function (panel) { return panel.getQuestions(true).forEach(function (question) {
|
|
44778
|
+
question.setIsMobile(val);
|
|
44607
44779
|
}); });
|
|
44608
44780
|
};
|
|
44609
44781
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelCount", {
|
|
@@ -44911,11 +45083,11 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
44911
45083
|
*
|
|
44912
45084
|
* Possible values:
|
|
44913
45085
|
*
|
|
44914
|
-
* - `"list"` - Renders panels one under the other. [View Demo](https://surveyjs.io/form-library/examples/how-to-use-expressions-in-dynamic-panel/)
|
|
45086
|
+
* - `"list"` (default) - Renders panels one under the other. [View Demo](https://surveyjs.io/form-library/examples/how-to-use-expressions-in-dynamic-panel/)
|
|
44915
45087
|
* - `"progressTop"` - Renders each panel as a card and displays a progress bar at the top. [View Demo](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/)
|
|
44916
45088
|
* - `"progressBottom"` - Renders each panel panel as a card and displays a progress bar at the bottom.
|
|
44917
45089
|
* - `"progressTopBottom"` - Renders each panel as a card and displays a progress bar at the top and bottom.
|
|
44918
|
-
* - `"tab"` - Renders each panel within a tab. Use the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) to specify a template for tab titles.
|
|
45090
|
+
* - `"tab"` - Renders each panel within a tab. Use the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) to specify a template for tab titles. [View Demo](/form-library/examples/tabbed-interface-for-duplicate-group-option/)
|
|
44919
45091
|
*/
|
|
44920
45092
|
get: function () {
|
|
44921
45093
|
return this.getPropertyValue("renderMode");
|
|
@@ -47150,6 +47322,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
47150
47322
|
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
|
47151
47323
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./base */ "./src/base.ts");
|
|
47152
47324
|
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
|
47325
|
+
/* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
|
|
47153
47326
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
47154
47327
|
var extendStatics = function (d, b) {
|
|
47155
47328
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -47180,6 +47353,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
47180
47353
|
|
|
47181
47354
|
|
|
47182
47355
|
|
|
47356
|
+
|
|
47183
47357
|
var RenderedRatingItem = /** @class */ (function (_super) {
|
|
47184
47358
|
__extends(RenderedRatingItem, _super);
|
|
47185
47359
|
function RenderedRatingItem(itemValue, locString) {
|
|
@@ -47692,6 +47866,8 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
47692
47866
|
}
|
|
47693
47867
|
};
|
|
47694
47868
|
QuestionRatingModel.prototype.onItemMouseIn = function (item) {
|
|
47869
|
+
if (_utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"])
|
|
47870
|
+
return;
|
|
47695
47871
|
if (this.isReadOnly || !item.itemValue.isEnabled || this.isDesignMode)
|
|
47696
47872
|
return;
|
|
47697
47873
|
var high = true;
|
|
@@ -47709,6 +47885,8 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
47709
47885
|
}
|
|
47710
47886
|
};
|
|
47711
47887
|
QuestionRatingModel.prototype.onItemMouseOut = function (item) {
|
|
47888
|
+
if (_utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"])
|
|
47889
|
+
return;
|
|
47712
47890
|
this.renderedRateItems.forEach(function (item) { return item.highlight = "none"; });
|
|
47713
47891
|
};
|
|
47714
47892
|
Object.defineProperty(QuestionRatingModel.prototype, "itemSmallMode", {
|
|
@@ -48582,7 +48760,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("signaturepad",
|
|
|
48582
48760
|
default: true,
|
|
48583
48761
|
},
|
|
48584
48762
|
{
|
|
48585
|
-
name: "backgroundImage",
|
|
48763
|
+
name: "backgroundImage:file",
|
|
48586
48764
|
category: "general",
|
|
48587
48765
|
},
|
|
48588
48766
|
{
|
|
@@ -50188,6 +50366,8 @@ var RendererFactory = /** @class */ (function () {
|
|
|
50188
50366
|
"use strict";
|
|
50189
50367
|
__webpack_require__.r(__webpack_exports__);
|
|
50190
50368
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; });
|
|
50369
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
|
50370
|
+
|
|
50191
50371
|
var document = globalThis.document;
|
|
50192
50372
|
var defaultEnvironment = (!!document ? {
|
|
50193
50373
|
root: document,
|
|
@@ -50229,10 +50409,10 @@ var settings = {
|
|
|
50229
50409
|
*
|
|
50230
50410
|
* Nested properties:
|
|
50231
50411
|
*
|
|
50232
|
-
* - `showEmptyDescriptions`: `
|
|
50412
|
+
* - `showEmptyDescriptions`: `boolean`\
|
|
50233
50413
|
* Specifies whether to display an empty description for pages and panels. Default value: `true`.
|
|
50234
50414
|
*
|
|
50235
|
-
* - `showEmptyTitles`: `
|
|
50415
|
+
* - `showEmptyTitles`: `boolean`\
|
|
50236
50416
|
* Specifies whether to display an empty title for pages and panels. Default value: `true`.
|
|
50237
50417
|
*/
|
|
50238
50418
|
designMode: {
|
|
@@ -50256,13 +50436,13 @@ var settings = {
|
|
|
50256
50436
|
*
|
|
50257
50437
|
* Nested properties:
|
|
50258
50438
|
*
|
|
50259
|
-
* - `useLocalTimeZone`: `
|
|
50439
|
+
* - `useLocalTimeZone`: `boolean`\
|
|
50260
50440
|
* Disable this property if you want internal SurveyJS functions to use methods that work with UTC date and time (`setUTCDate()` `setUTCHours()`, etc.) instead of methods that work with local date and time (`setYear`, `setHours()`, etc.). Default value: `true`.
|
|
50261
50441
|
*
|
|
50262
|
-
* - `defaultLocaleName`: `
|
|
50442
|
+
* - `defaultLocaleName`: `string`\
|
|
50263
50443
|
* A property key that stores a translation for the default locale. Default value: `"default"`.
|
|
50264
50444
|
*
|
|
50265
|
-
* - `storeDuplicatedTranslations`: `
|
|
50445
|
+
* - `storeDuplicatedTranslations`: `boolean`\
|
|
50266
50446
|
* Specifies whether surveys should store translation strings that equal the translation strings in the default locale. Default value: `false`.
|
|
50267
50447
|
*/
|
|
50268
50448
|
localization: {
|
|
@@ -50292,16 +50472,16 @@ var settings = {
|
|
|
50292
50472
|
*
|
|
50293
50473
|
* Nested properties:
|
|
50294
50474
|
*
|
|
50295
|
-
* - `encodeUrlParams`: `
|
|
50475
|
+
* - `encodeUrlParams`: `boolean`\
|
|
50296
50476
|
* Specifies whether to encode URL parameters when you access a web service. Default value: `true`.
|
|
50297
50477
|
*
|
|
50298
|
-
* - `cacheLoadedChoices`: `
|
|
50478
|
+
* - `cacheLoadedChoices`: `boolean`\
|
|
50299
50479
|
* Specifies whether to cache [choices](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model#choicesByUrl) loaded from a web service. Default value: `true`.
|
|
50300
50480
|
*
|
|
50301
|
-
* - `disableQuestionWhileLoadingChoices`: `
|
|
50481
|
+
* - `disableQuestionWhileLoadingChoices`: `boolean`\
|
|
50302
50482
|
* Disables a question while its choices are being loaded from a web service. Default value: `false`.
|
|
50303
50483
|
*
|
|
50304
|
-
* - `surveyServiceUrl`: `
|
|
50484
|
+
* - `surveyServiceUrl`: `string`\
|
|
50305
50485
|
* The URL of the SurveyJS Service API endpoint.
|
|
50306
50486
|
*/
|
|
50307
50487
|
web: {
|
|
@@ -50339,14 +50519,14 @@ var settings = {
|
|
|
50339
50519
|
*
|
|
50340
50520
|
* Nested properties:
|
|
50341
50521
|
*
|
|
50342
|
-
* - `changeNavigationButtonsOnComplete`: `
|
|
50522
|
+
* - `changeNavigationButtonsOnComplete`: `boolean`\
|
|
50343
50523
|
* Specifies whether to re-evaluate an expression associated with the [Complete trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete) immediately when a question value changes. If the expression evaluates to `true`, the trigger is executed. Default value: `false`.\
|
|
50344
50524
|
* Keep this property set to `false` if you want to re-evaluate the Complete trigger's expression only when the respondents navigate to another page.
|
|
50345
50525
|
*
|
|
50346
|
-
* - `executeCompleteOnValueChanged`: `
|
|
50526
|
+
* - `executeCompleteOnValueChanged`: `boolean`\
|
|
50347
50527
|
* Specifies whether to replace the Next button with the Complete button when the [Complete trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete) is going to be executed. Default value: `true`.
|
|
50348
50528
|
*
|
|
50349
|
-
* - `executeSkipOnValueChanged`: `
|
|
50529
|
+
* - `executeSkipOnValueChanged`: `boolean`\
|
|
50350
50530
|
* Specifies whether to re-evaluate an expression associated with the [Skip trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#skip) immediately when a question value changes. If the expression evaluates to `true`, the trigger is executed. Default value: `true`.\
|
|
50351
50531
|
* Disable this property if you want to re-evaluate the Skip trigger's expression only when respondents navigate to another page.
|
|
50352
50532
|
*/
|
|
@@ -50377,13 +50557,13 @@ var settings = {
|
|
|
50377
50557
|
*
|
|
50378
50558
|
* Nested properties:
|
|
50379
50559
|
*
|
|
50380
|
-
* - `itemValueSerializeAsObject`: `
|
|
50560
|
+
* - `itemValueSerializeAsObject`: `boolean`\
|
|
50381
50561
|
* Enable this property if you want to serialize [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) instances as objects even when they include only the `value` property. Default value: `false`. View an example below.
|
|
50382
50562
|
*
|
|
50383
|
-
* - `itemValueSerializeDisplayText`: `
|
|
50563
|
+
* - `itemValueSerializeDisplayText`: `boolean`\
|
|
50384
50564
|
* Enable this property if you want to serialize the `text` property of [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) objects even when it is empty or equal to the `value` property. Default value: `false`. View an example below.
|
|
50385
50565
|
*
|
|
50386
|
-
* - `localizableStringSerializeAsObject`: `
|
|
50566
|
+
* - `localizableStringSerializeAsObject`: `boolean`\
|
|
50387
50567
|
* Enable this property if you want to serialize [`LocalizableString`](https://surveyjs.io/form-library/documentation/api-reference/localizablestring) instances as objects even when they include only a translation string for the default locale. For example, `"Custom String"` will be serialized as `{ default: "Custom String" }`. Default value: `false`.
|
|
50388
50568
|
*
|
|
50389
50569
|
* ```js
|
|
@@ -50427,7 +50607,7 @@ var settings = {
|
|
|
50427
50607
|
*
|
|
50428
50608
|
* Nested properties:
|
|
50429
50609
|
*
|
|
50430
|
-
* - `enabled`: `
|
|
50610
|
+
* - `enabled`: `boolean`\
|
|
50431
50611
|
* Specifies whether to add questions to the DOM only when they get into the viewport. Default value: `false`.
|
|
50432
50612
|
*
|
|
50433
50613
|
* > Lazy rendering is an experimental feature that may not work as expected in all use cases.
|
|
@@ -50450,28 +50630,28 @@ var settings = {
|
|
|
50450
50630
|
*
|
|
50451
50631
|
* Nested properties:
|
|
50452
50632
|
*
|
|
50453
|
-
* - `defaultRowName`: `
|
|
50633
|
+
* - `defaultRowName`: `string`\
|
|
50454
50634
|
* A property key that stores an object with default cell values. Default value: "default".
|
|
50455
50635
|
*
|
|
50456
|
-
* - `defaultCellType`: `
|
|
50636
|
+
* - `defaultCellType`: `string`\
|
|
50457
50637
|
* The default type of matrix cells. Default value: `"dropdown"`.\
|
|
50458
50638
|
* You can specify this setting for individual questions or matrix columns: [`cellType`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#cellType). Refer to the `cellType` property description for information on possible values.
|
|
50459
50639
|
*
|
|
50460
|
-
* - `totalsSuffix`: `
|
|
50640
|
+
* - `totalsSuffix`: `string`\
|
|
50461
50641
|
* A suffix added to the name of the property that stores total values. The resulting property name consists of the matrix name and the suffix. Default value: `"-total"`.
|
|
50462
50642
|
*
|
|
50463
|
-
* - `maxRowCount`: `
|
|
50643
|
+
* - `maxRowCount`: `number`\
|
|
50464
50644
|
* A maximum number of rows in a Dynamic Matrix. Default value: 1000.\
|
|
50465
50645
|
* You can specify this setting for an individual Dynamic Matrix: [`maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#maxRowCount).
|
|
50466
50646
|
*
|
|
50467
|
-
* - `maxRowCountInCondition`: `
|
|
50647
|
+
* - `maxRowCountInCondition`: `number`\
|
|
50468
50648
|
* A maximum number of matrix rows included in the Condition drop-down menu in Survey Creator. This menu is used to configure conditional survey logic. Default value: 1.\
|
|
50469
50649
|
* If you set this property to 0, the Condition menu does not include any matrix rows. Users still can specify conditions that use matrix rows but only with Manual Entry.
|
|
50470
50650
|
*
|
|
50471
|
-
* - `renderRemoveAsIcon`: `
|
|
50651
|
+
* - `renderRemoveAsIcon`: `boolean`\
|
|
50472
50652
|
* Disable this property if you want to render the Remove action in Dynamic Matrix as a button. Otherwise, the action is rendered as an icon. Default value: `true`.
|
|
50473
50653
|
*
|
|
50474
|
-
* - `columnWidthsByType`: `
|
|
50654
|
+
* - `columnWidthsByType`: `object`\
|
|
50475
50655
|
* An object that specifies fixed and minimum column width based on the column type.\
|
|
50476
50656
|
* Example: `settings.matrix.columnWidthsByType = { "tagbox": { minWidth: "240px", width: "300px" } }`
|
|
50477
50657
|
*
|
|
@@ -50525,11 +50705,11 @@ var settings = {
|
|
|
50525
50705
|
*
|
|
50526
50706
|
* Nested properties:
|
|
50527
50707
|
*
|
|
50528
|
-
* - `maxPanelCount`: `
|
|
50708
|
+
* - `maxPanelCount`: `number`\
|
|
50529
50709
|
* A maximum number of panels in Dynamic Panel. Default value: 100.\
|
|
50530
50710
|
* You can specify this setting for an individual Dynamic Panel: [`maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#maxPanelCount).
|
|
50531
50711
|
*
|
|
50532
|
-
* - `maxPanelCountInCondition`: `
|
|
50712
|
+
* - `maxPanelCountInCondition`: `number`\
|
|
50533
50713
|
* A maximum number of Dynamic Panel panels included in the Condition drop-down menu in Survey Creator. This menu is used to configure conditional survey logic. Default value: 1.\
|
|
50534
50714
|
* If you set this property to 0, the Condition menu does not include any panel questions. Users still can specify conditions that use panel questions but only with Manual Entry.
|
|
50535
50715
|
*/
|
|
@@ -50582,10 +50762,10 @@ var settings = {
|
|
|
50582
50762
|
*
|
|
50583
50763
|
* Nested properties:
|
|
50584
50764
|
*
|
|
50585
|
-
* - `includeQuestionsWithHiddenNumber`: `
|
|
50765
|
+
* - `includeQuestionsWithHiddenNumber`: `boolean`\
|
|
50586
50766
|
* Specifies whether to number questions whose [`hideNumber`](https://surveyjs.io/form-library/documentation/api-reference/question#hideNumber) property is enabled. Default value: `false`.
|
|
50587
50767
|
*
|
|
50588
|
-
* - `includeQuestionsWithHiddenTitle`: `
|
|
50768
|
+
* - `includeQuestionsWithHiddenTitle`: `boolean`\
|
|
50589
50769
|
* Specifies whether to number questions whose [`titleLocation`](https://surveyjs.io/form-library/documentation/api-reference/question#titleLocation) property is set to `"hidden"`. Default value: `false`.
|
|
50590
50770
|
*/
|
|
50591
50771
|
numbering: {
|
|
@@ -50619,10 +50799,10 @@ var settings = {
|
|
|
50619
50799
|
*
|
|
50620
50800
|
* Nested properties:
|
|
50621
50801
|
*
|
|
50622
|
-
* - `trimStrings`: `
|
|
50802
|
+
* - `trimStrings`: `boolean`\
|
|
50623
50803
|
* Specifies whether to remove whitespace from both ends of a string before the comparison. Default value: `true`.
|
|
50624
50804
|
*
|
|
50625
|
-
* - `caseSensitive`: `
|
|
50805
|
+
* - `caseSensitive`: `boolean`\
|
|
50626
50806
|
* Specifies whether to differentiate between capital and lower-case letters. Default value: `false`.
|
|
50627
50807
|
*/
|
|
50628
50808
|
comparator: {
|
|
@@ -50660,7 +50840,7 @@ var settings = {
|
|
|
50660
50840
|
*/
|
|
50661
50841
|
tagboxCloseOnSelect: false,
|
|
50662
50842
|
/**
|
|
50663
|
-
* A property that allows you to display a custom confirm dialog
|
|
50843
|
+
* A property that allows you to display a custom confirm dialog.
|
|
50664
50844
|
*
|
|
50665
50845
|
* Set this property to a function that renders your custom dialog window. This function should return `true` if a user confirms an action or `false` otherwise.
|
|
50666
50846
|
* @param message A message to be displayed in the confirm dialog window.
|
|
@@ -50669,14 +50849,25 @@ var settings = {
|
|
|
50669
50849
|
return confirm(message);
|
|
50670
50850
|
},
|
|
50671
50851
|
/**
|
|
50672
|
-
* A property that allows you to display a custom confirm dialog
|
|
50852
|
+
* A property that allows you to display a custom confirm dialog in async mode or activate the standard browser dialog.
|
|
50853
|
+
*
|
|
50854
|
+
* To display a custom confirm dialog, set this property to a function that renders it. This function should return `true` to be enabled; otherwise, a survey executes the [`confirmActionFunc`](#confirmActionFunc) function. Pass the dialog result as the `callback` parameter: `true` if a user confirms an action, `false` otherwise.
|
|
50673
50855
|
*
|
|
50674
|
-
*
|
|
50856
|
+
* To activate the standard browser dialog, set the `confirmActionAsync` property to a function that returns `false`. With this configuration, a survey falls back to the [`confirmActionFunc`](#confirmActionFunc) function, which renders the standard browser dialog by default.
|
|
50857
|
+
*
|
|
50858
|
+
* ```js
|
|
50859
|
+
* import { settings } from "survey-core";
|
|
50860
|
+
*
|
|
50861
|
+
* // Display the standard browser dialog
|
|
50862
|
+
* settings.confirmActionAsync = () => {
|
|
50863
|
+
* return false;
|
|
50864
|
+
* }
|
|
50865
|
+
* ```
|
|
50675
50866
|
* @param message A message to be displayed in the confirm dialog window.
|
|
50676
50867
|
* @param callback A callback function that should be called with `true` if a user confirms an action or `false` otherwise.
|
|
50677
50868
|
*/
|
|
50678
50869
|
confirmActionAsync: function (message, callback) {
|
|
50679
|
-
return
|
|
50870
|
+
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["showConfirmDialog"])(message, callback);
|
|
50680
50871
|
},
|
|
50681
50872
|
/**
|
|
50682
50873
|
* A minimum width value for all survey elements.
|
|
@@ -50705,7 +50896,7 @@ var settings = {
|
|
|
50705
50896
|
*
|
|
50706
50897
|
* Nested properties:
|
|
50707
50898
|
*
|
|
50708
|
-
* - `lifetime`: `
|
|
50899
|
+
* - `lifetime`: `number`\
|
|
50709
50900
|
* Specifies a time period during which a notification is displayed; measured in milliseconds.
|
|
50710
50901
|
*/
|
|
50711
50902
|
notifications: {
|
|
@@ -52429,7 +52620,9 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
52429
52620
|
Object.defineProperty(SurveyElement.prototype, "rootStyle", {
|
|
52430
52621
|
get: function () {
|
|
52431
52622
|
var style = {};
|
|
52432
|
-
var minWidth = this.
|
|
52623
|
+
var minWidth = this.minWidth;
|
|
52624
|
+
if (minWidth != "auto")
|
|
52625
|
+
minWidth = "min(100%, " + this.minWidth + ")";
|
|
52433
52626
|
if (this.allowRootStyle && this.renderWidth) {
|
|
52434
52627
|
// style["width"] = this.renderWidth;
|
|
52435
52628
|
style["flexGrow"] = 1;
|
|
@@ -52539,9 +52732,6 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
52539
52732
|
__decorate([
|
|
52540
52733
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
|
|
52541
52734
|
], SurveyElement.prototype, "allowRootStyle", void 0);
|
|
52542
|
-
__decorate([
|
|
52543
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
|
|
52544
|
-
], SurveyElement.prototype, "renderMinWidth", void 0);
|
|
52545
52735
|
return SurveyElement;
|
|
52546
52736
|
}(SurveyElementCore));
|
|
52547
52737
|
|
|
@@ -52727,6 +52917,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
52727
52917
|
_this.valuesHash = {};
|
|
52728
52918
|
_this.variablesHash = {};
|
|
52729
52919
|
_this.onThemeApplying = new _base__WEBPACK_IMPORTED_MODULE_2__["EventBase"]();
|
|
52920
|
+
/**
|
|
52921
|
+
* An event that is raised after a [theme](/form-library/documentation/manage-default-themes-and-styles) is [applied](#applyTheme) to the survey.
|
|
52922
|
+
* @see applyTheme
|
|
52923
|
+
*/
|
|
52730
52924
|
_this.onThemeApplied = new _base__WEBPACK_IMPORTED_MODULE_2__["EventBase"]();
|
|
52731
52925
|
//#region Event declarations
|
|
52732
52926
|
/**
|
|
@@ -53292,6 +53486,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
53292
53486
|
_this.onDynamicPanelItemValueChanged = _this.addEvent();
|
|
53293
53487
|
/**
|
|
53294
53488
|
* An event that is raised before a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) renders [tab titles](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle). Use this event to change individual tab titles.
|
|
53489
|
+
*
|
|
53490
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
53491
|
+
*
|
|
53492
|
+
* [View Demo](/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
|
|
53295
53493
|
*/
|
|
53296
53494
|
_this.onGetDynamicPanelTabTitle = _this.addEvent();
|
|
53297
53495
|
/**
|
|
@@ -53314,10 +53512,12 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
53314
53512
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
53315
53513
|
*
|
|
53316
53514
|
* [View Demo](https://surveyjs.io/form-library/examples/survey-titleactions/ (linkStyle))
|
|
53515
|
+
* @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
|
|
53317
53516
|
*/
|
|
53318
53517
|
_this.onGetQuestionTitleActions = _this.addEvent();
|
|
53319
53518
|
/**
|
|
53320
53519
|
* An event that allows you to add, delete, or modify actions in a panel title.
|
|
53520
|
+
* @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
|
|
53321
53521
|
*/
|
|
53322
53522
|
_this.onGetPanelTitleActions = _this.addEvent();
|
|
53323
53523
|
/**
|
|
@@ -53326,10 +53526,12 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
53326
53526
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
53327
53527
|
*
|
|
53328
53528
|
* [View Demo](https://surveyjs.io/form-library/examples/modify-titles-of-survey-elements/ (linkStyle))
|
|
53529
|
+
* @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
|
|
53329
53530
|
*/
|
|
53330
53531
|
_this.onGetPageTitleActions = _this.addEvent();
|
|
53331
53532
|
/**
|
|
53332
53533
|
* An event that allows you to add, delete, or modify actions in the footer of a [Panel](https://surveyjs.io/form-library/documentation/panelmodel).
|
|
53534
|
+
* @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
|
|
53333
53535
|
*/
|
|
53334
53536
|
_this.onGetPanelFooterActions = _this.addEvent();
|
|
53335
53537
|
/**
|
|
@@ -53338,7 +53540,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
53338
53540
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
53339
53541
|
*
|
|
53340
53542
|
* [View Demo](https://surveyjs.io/form-library/examples/employee-information-form/ (linkStyle))
|
|
53341
|
-
* @see IAction
|
|
53543
|
+
* @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
|
|
53342
53544
|
*/
|
|
53343
53545
|
_this.onGetMatrixRowActions = _this.addEvent();
|
|
53344
53546
|
/**
|
|
@@ -53459,6 +53661,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
53459
53661
|
_this.registerPropertyChangedHandlers(["state", "currentPage", "showPreviewBeforeComplete"], function () { _this.onStateAndCurrentPageChanged(); });
|
|
53460
53662
|
_this.registerPropertyChangedHandlers(["logo", "logoPosition"], function () { _this.updateHasLogo(); });
|
|
53461
53663
|
_this.registerPropertyChangedHandlers(["backgroundImage"], function () { _this.updateRenderBackgroundImage(); });
|
|
53664
|
+
_this.registerPropertyChangedHandlers(["renderBackgroundImage", "backgroundOpacity", "backgroundImageFit", "fitToContainer", "backgroundImageAttachment"], function () {
|
|
53665
|
+
_this.updateBackgroundImageStyle();
|
|
53666
|
+
});
|
|
53462
53667
|
_this.onGetQuestionNo.onCallbacksChanged = function () {
|
|
53463
53668
|
_this.resetVisibleIndexes();
|
|
53464
53669
|
};
|
|
@@ -53707,6 +53912,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
53707
53912
|
this.rootCss = this.getRootCss();
|
|
53708
53913
|
this.updateNavigationCss();
|
|
53709
53914
|
this.updateCompletedPageCss();
|
|
53915
|
+
this.updateWrapperFormCss();
|
|
53710
53916
|
};
|
|
53711
53917
|
Object.defineProperty(SurveyModel.prototype, "css", {
|
|
53712
53918
|
/**
|
|
@@ -54941,18 +55147,20 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
54941
55147
|
enumerable: false,
|
|
54942
55148
|
configurable: true
|
|
54943
55149
|
});
|
|
54944
|
-
|
|
54945
|
-
|
|
54946
|
-
|
|
54947
|
-
|
|
54948
|
-
|
|
54949
|
-
|
|
54950
|
-
|
|
54951
|
-
|
|
54952
|
-
|
|
54953
|
-
|
|
54954
|
-
|
|
54955
|
-
|
|
55150
|
+
SurveyModel.prototype.updateBackgroundImageStyle = function () {
|
|
55151
|
+
this.backgroundImageStyle = {
|
|
55152
|
+
opacity: this.backgroundOpacity,
|
|
55153
|
+
backgroundImage: this.renderBackgroundImage,
|
|
55154
|
+
backgroundSize: this.backgroundImageFit,
|
|
55155
|
+
backgroundAttachment: !this.fitToContainer ? this.backgroundImageAttachment : undefined
|
|
55156
|
+
};
|
|
55157
|
+
};
|
|
55158
|
+
SurveyModel.prototype.updateWrapperFormCss = function () {
|
|
55159
|
+
this.wrapperFormCss = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]()
|
|
55160
|
+
.append(this.css.rootWrapper)
|
|
55161
|
+
.append(this.css.rootWrapperFixed, this.backgroundImageAttachment === "fixed")
|
|
55162
|
+
.toString();
|
|
55163
|
+
};
|
|
54956
55164
|
Object.defineProperty(SurveyModel.prototype, "completedHtml", {
|
|
54957
55165
|
/**
|
|
54958
55166
|
* HTML content displayed on the [complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page).
|
|
@@ -56368,16 +56576,18 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
56368
56576
|
}
|
|
56369
56577
|
this.setPropertyValue("completedStateText", text);
|
|
56370
56578
|
if (this.state === "completed" && this.showCompletedPage && !!this.completedState) {
|
|
56371
|
-
this.notify(this.completedStateText, this.completedState);
|
|
56579
|
+
this.notify(this.completedStateText, this.completedState, true);
|
|
56372
56580
|
}
|
|
56373
56581
|
};
|
|
56374
|
-
SurveyModel.prototype.notify = function (message, type) {
|
|
56582
|
+
SurveyModel.prototype.notify = function (message, type, showActions) {
|
|
56583
|
+
if (showActions === void 0) { showActions = false; }
|
|
56584
|
+
this.notifier.showActions = showActions;
|
|
56375
56585
|
this.notifier.notify(message, type, type === "error");
|
|
56376
56586
|
};
|
|
56377
56587
|
/**
|
|
56378
56588
|
* 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"`.
|
|
56379
|
-
* @param clearData *Optional
|
|
56380
|
-
* @param goToFirstPage *Optional
|
|
56589
|
+
* @param clearData *(Optional)* Specifies whether to clear survey data. Default value: `true`.
|
|
56590
|
+
* @param goToFirstPage *(Optional)* Specifies whether to switch the survey to the first page. Default value: `true`.
|
|
56381
56591
|
*/
|
|
56382
56592
|
SurveyModel.prototype.clear = function (clearData, goToFirstPage) {
|
|
56383
56593
|
if (clearData === void 0) { clearData = true; }
|
|
@@ -56761,7 +56971,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
56761
56971
|
* Validates all questions on the current page and returns `false` if the validation fails.
|
|
56762
56972
|
*
|
|
56763
56973
|
* If you use validation expressions and at least one of them calls an async function, the `validateCurrentPage` method returns `undefined`. In this case, you should pass a callback function as the `onAsyncValidation` parameter. The function's `hasErrors` Boolean parameter will contain the validation result.
|
|
56764
|
-
* @param onAsyncValidation *Optional
|
|
56974
|
+
* @param onAsyncValidation *(Optional)* Pass a callback function. It accepts a Boolean `hasErrors` parameter that equals `true` if the validation fails or `false` otherwise.
|
|
56765
56975
|
* @see currentPage
|
|
56766
56976
|
* @see validate
|
|
56767
56977
|
* @see validateCurrentPage
|
|
@@ -56780,7 +56990,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
56780
56990
|
*
|
|
56781
56991
|
* If you use validation expressions and at least one of them calls an async function, the `validatePage` method returns `undefined`. In this case, you should pass a callback function as the `onAsyncValidation` parameter. The function's `hasErrors` Boolean parameter will contain the validation result.
|
|
56782
56992
|
* @param page Pass the `PageModel` that you want to validate. You can pass `undefined` to validate the [`activePage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#activePage).
|
|
56783
|
-
* @param onAsyncValidation *Optional
|
|
56993
|
+
* @param onAsyncValidation *(Optional)* Pass a callback function. It accepts a Boolean `hasErrors` parameter that equals `true` if the validation fails or `false` otherwise.
|
|
56784
56994
|
* @see validate
|
|
56785
56995
|
* @see validateCurrentPage
|
|
56786
56996
|
*/
|
|
@@ -56810,9 +57020,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
56810
57020
|
* Validates all questions and returns `false` if the validation fails.
|
|
56811
57021
|
*
|
|
56812
57022
|
* If you use validation expressions and at least one of them calls an async function, the `validate` method returns `undefined`. In this case, you should pass a callback function as the `onAsyncValidation` parameter. The function's `hasErrors` Boolean parameter will contain the validation result.
|
|
56813
|
-
* @param fireCallback *Optional
|
|
56814
|
-
* @param focusOnFirstError *Optional
|
|
56815
|
-
* @param onAsyncValidation *Optional
|
|
57023
|
+
* @param fireCallback *(Optional)* Pass `false` if you do not want to show validation errors in the UI.
|
|
57024
|
+
* @param focusOnFirstError *(Optional)* Pass `true` if you want to focus the first question with a validation error. The survey will be switched to the page that contains this question if required.
|
|
57025
|
+
* @param onAsyncValidation *(Optional)* Pass a callback function. It accepts a Boolean `hasErrors` parameter that equals `true` if the validation fails or `false` otherwise.
|
|
56816
57026
|
* @see validateCurrentPage
|
|
56817
57027
|
* @see validatePage
|
|
56818
57028
|
*/
|
|
@@ -58875,7 +59085,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
58875
59085
|
SurveyModel.prototype.runQuestionsTriggers = function (name, value) {
|
|
58876
59086
|
if (this.isDisplayMode || this.isDesignMode)
|
|
58877
59087
|
return;
|
|
58878
|
-
var questions = this.getAllQuestions(
|
|
59088
|
+
var questions = this.getAllQuestions();
|
|
58879
59089
|
questions.forEach(function (q) { return q.runTriggers(name, value); });
|
|
58880
59090
|
};
|
|
58881
59091
|
SurveyModel.prototype.checkIfNewPagesBecomeVisible = function (oldCurrentPageIndex) {
|
|
@@ -60419,13 +60629,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60419
60629
|
*
|
|
60420
60630
|
* This method accepts an object with the following layout element properties:
|
|
60421
60631
|
*
|
|
60422
|
-
* - `id`: `
|
|
60632
|
+
* - `id`: `string` | `"timerpanel"` | `"progress-buttons"` | `"progress-questions"` | `"progress-pages"` | `"progress-correctquestions"` | `"progress-requiredquestions"` | `"toc-navigation"` | `"navigationbuttons"`\
|
|
60423
60633
|
* A layout element identifier. You can use possible values to access and relocate or customize predefined layout elements.
|
|
60424
60634
|
*
|
|
60425
60635
|
* - `container`: `"header"` | `"footer"` | `"left"` | `"right"` | `"contentTop"` | `"contentBottom"`\
|
|
60426
60636
|
* A layout container that holds the element. If you want to display the element within multiple containers, set this property to an array of possible values.
|
|
60427
60637
|
*
|
|
60428
|
-
* - `component`: `
|
|
60638
|
+
* - `component`: `string`\
|
|
60429
60639
|
* The name of the component that renders the layout element.
|
|
60430
60640
|
*
|
|
60431
60641
|
* - `data`: `any`\
|
|
@@ -60511,15 +60721,22 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60511
60721
|
SurveyModel.prototype.processPopupVisiblityChanged = function (question, popup, visible) {
|
|
60512
60722
|
this.onPopupVisibleChanged.fire(this, { question: question, popup: popup, visible: visible });
|
|
60513
60723
|
};
|
|
60724
|
+
/**
|
|
60725
|
+
* Applies a specified theme to the survey.
|
|
60726
|
+
*
|
|
60727
|
+
* [Themes & Styles](/form-library/documentation/manage-default-themes-and-styles (linkStyle))
|
|
60728
|
+
* @param theme An [`ITheme`](/form-library/documentation/api-reference/itheme) object with theme settings.
|
|
60729
|
+
* @see onThemeApplied
|
|
60730
|
+
*/
|
|
60514
60731
|
SurveyModel.prototype.applyTheme = function (theme) {
|
|
60515
60732
|
var _this = this;
|
|
60516
60733
|
if (!theme)
|
|
60517
60734
|
return;
|
|
60518
60735
|
Object.keys(theme).forEach(function (key) {
|
|
60519
|
-
if (key === "
|
|
60736
|
+
if (key === "header") {
|
|
60520
60737
|
_this.removeLayoutElement("cover");
|
|
60521
60738
|
var newCoverModel = new _cover__WEBPACK_IMPORTED_MODULE_20__["Cover"]();
|
|
60522
|
-
newCoverModel.
|
|
60739
|
+
newCoverModel.fromTheme(theme);
|
|
60523
60740
|
_this.layoutElements.push({
|
|
60524
60741
|
id: "cover",
|
|
60525
60742
|
container: "header",
|
|
@@ -60566,12 +60783,26 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60566
60783
|
};
|
|
60567
60784
|
SurveyModel.prototype.addScrollEventListener = function () {
|
|
60568
60785
|
var _this = this;
|
|
60786
|
+
var _a;
|
|
60569
60787
|
this.scrollHandler = function () { _this.onScroll(); };
|
|
60570
60788
|
this.rootElement.addEventListener("scroll", this.scrollHandler);
|
|
60789
|
+
if (!!this.rootElement.getElementsByTagName("form")[0]) {
|
|
60790
|
+
this.rootElement.getElementsByTagName("form")[0].addEventListener("scroll", this.scrollHandler);
|
|
60791
|
+
}
|
|
60792
|
+
if (!!this.css.rootWrapper) {
|
|
60793
|
+
(_a = this.rootElement.getElementsByClassName(this.css.rootWrapper)[0]) === null || _a === void 0 ? void 0 : _a.addEventListener("scroll", this.scrollHandler);
|
|
60794
|
+
}
|
|
60571
60795
|
};
|
|
60572
60796
|
SurveyModel.prototype.removeScrollEventListener = function () {
|
|
60797
|
+
var _a;
|
|
60573
60798
|
if (!!this.rootElement && !!this.scrollHandler) {
|
|
60574
60799
|
this.rootElement.removeEventListener("scroll", this.scrollHandler);
|
|
60800
|
+
if (!!this.rootElement.getElementsByTagName("form")[0]) {
|
|
60801
|
+
this.rootElement.getElementsByTagName("form")[0].removeEventListener("scroll", this.scrollHandler);
|
|
60802
|
+
}
|
|
60803
|
+
if (!!this.css.rootWrapper) {
|
|
60804
|
+
(_a = this.rootElement.getElementsByClassName(this.css.rootWrapper)[0]) === null || _a === void 0 ? void 0 : _a.removeEventListener("scroll", this.scrollHandler);
|
|
60805
|
+
}
|
|
60575
60806
|
}
|
|
60576
60807
|
};
|
|
60577
60808
|
SurveyModel.TemplateRendererComponentName = "sv-template-renderer";
|
|
@@ -60595,8 +60826,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60595
60826
|
__decorate([
|
|
60596
60827
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
|
|
60597
60828
|
onSet: function (newValue, target) {
|
|
60598
|
-
if (newValue === "
|
|
60599
|
-
var layoutElement = target.layoutElements.filter(function (a) { return a.id ===
|
|
60829
|
+
if (newValue === "advanced") {
|
|
60830
|
+
var layoutElement = target.layoutElements.filter(function (a) { return a.id === "cover"; })[0];
|
|
60600
60831
|
if (!layoutElement) {
|
|
60601
60832
|
var cover = new _cover__WEBPACK_IMPORTED_MODULE_20__["Cover"]();
|
|
60602
60833
|
cover.logoPositionX = target.logoPosition === "right" ? "right" : "left";
|
|
@@ -60619,7 +60850,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60619
60850
|
}
|
|
60620
60851
|
}
|
|
60621
60852
|
})
|
|
60622
|
-
], SurveyModel.prototype, "
|
|
60853
|
+
], SurveyModel.prototype, "headerView", void 0);
|
|
60623
60854
|
__decorate([
|
|
60624
60855
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
60625
60856
|
], SurveyModel.prototype, "showBrandInfo", void 0);
|
|
@@ -60645,8 +60876,18 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60645
60876
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
60646
60877
|
], SurveyModel.prototype, "backgroundImageFit", void 0);
|
|
60647
60878
|
__decorate([
|
|
60648
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])(
|
|
60879
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
|
|
60880
|
+
onSet: function (newValue, target) {
|
|
60881
|
+
target.updateCss();
|
|
60882
|
+
}
|
|
60883
|
+
})
|
|
60649
60884
|
], SurveyModel.prototype, "backgroundImageAttachment", void 0);
|
|
60885
|
+
__decorate([
|
|
60886
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
60887
|
+
], SurveyModel.prototype, "backgroundImageStyle", void 0);
|
|
60888
|
+
__decorate([
|
|
60889
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
60890
|
+
], SurveyModel.prototype, "wrapperFormCss", void 0);
|
|
60650
60891
|
__decorate([
|
|
60651
60892
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
60652
60893
|
], SurveyModel.prototype, "rootCss", void 0);
|
|
@@ -60682,7 +60923,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
|
60682
60923
|
serializationProperty: "locDescription",
|
|
60683
60924
|
dependsOn: "locale",
|
|
60684
60925
|
},
|
|
60685
|
-
{ name: "logo", serializationProperty: "locLogo" },
|
|
60926
|
+
{ name: "logo:file", serializationProperty: "locLogo" },
|
|
60686
60927
|
{ name: "logoWidth", default: "300px", minValue: 0 },
|
|
60687
60928
|
{ name: "logoHeight", default: "200px", minValue: 0 },
|
|
60688
60929
|
{
|
|
@@ -60898,8 +61139,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
|
60898
61139
|
},
|
|
60899
61140
|
{ name: "width", visibleIf: function (obj) { return obj.widthMode === "static"; } },
|
|
60900
61141
|
{ name: "fitToContainer:boolean", default: false },
|
|
60901
|
-
{ name: "
|
|
60902
|
-
{ name: "backgroundImage", visible: false },
|
|
61142
|
+
{ name: "headerView", default: "basic", choices: ["basic", "advanced"], visible: false },
|
|
61143
|
+
{ name: "backgroundImage:file", visible: false },
|
|
60903
61144
|
{ name: "backgroundImageFit", default: "cover", choices: ["auto", "contain", "cover"], visible: false },
|
|
60904
61145
|
{ name: "backgroundImageAttachment", default: "scroll", choices: ["scroll", "fixed"], visible: false },
|
|
60905
61146
|
{ name: "backgroundOpacity:number", minValue: 0, maxValue: 1, default: 1, visible: false },
|
|
@@ -61331,8 +61572,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61331
61572
|
/* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./list */ "./src/list.ts");
|
|
61332
61573
|
/* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./page */ "./src/page.ts");
|
|
61333
61574
|
/* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./popup */ "./src/popup.ts");
|
|
61334
|
-
/* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
|
|
61335
|
-
|
|
61336
61575
|
|
|
61337
61576
|
|
|
61338
61577
|
|
|
@@ -61404,15 +61643,21 @@ var TOCModel = /** @class */ (function () {
|
|
|
61404
61643
|
function TOCModel(survey) {
|
|
61405
61644
|
var _this = this;
|
|
61406
61645
|
this.survey = survey;
|
|
61407
|
-
this.isMobile = _utils_devices__WEBPACK_IMPORTED_MODULE_5__["IsTouch"];
|
|
61408
61646
|
this.icon = "icon-navmenu_24x24";
|
|
61409
61647
|
this.togglePopup = function () {
|
|
61410
61648
|
_this.popupModel.toggleVisibility();
|
|
61411
61649
|
};
|
|
61412
61650
|
this.listModel = createTOCListModel(survey, function () { _this.popupModel.isVisible = false; });
|
|
61413
61651
|
this.popupModel = new _popup__WEBPACK_IMPORTED_MODULE_4__["PopupModel"]("sv-list", { model: this.listModel });
|
|
61414
|
-
this.popupModel.displayMode =
|
|
61652
|
+
this.popupModel.displayMode = new _base__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return _this.isMobile ? "overlay" : "popup"; });
|
|
61415
61653
|
}
|
|
61654
|
+
Object.defineProperty(TOCModel.prototype, "isMobile", {
|
|
61655
|
+
get: function () {
|
|
61656
|
+
return this.survey.isMobile;
|
|
61657
|
+
},
|
|
61658
|
+
enumerable: false,
|
|
61659
|
+
configurable: true
|
|
61660
|
+
});
|
|
61416
61661
|
Object.defineProperty(TOCModel.prototype, "containerCss", {
|
|
61417
61662
|
get: function () {
|
|
61418
61663
|
return getTocRootCss(this.survey, this.isMobile);
|
|
@@ -61420,6 +61665,10 @@ var TOCModel = /** @class */ (function () {
|
|
|
61420
61665
|
enumerable: false,
|
|
61421
61666
|
configurable: true
|
|
61422
61667
|
});
|
|
61668
|
+
TOCModel.prototype.dispose = function () {
|
|
61669
|
+
this.popupModel.dispose();
|
|
61670
|
+
this.listModel.dispose();
|
|
61671
|
+
};
|
|
61423
61672
|
return TOCModel;
|
|
61424
61673
|
}());
|
|
61425
61674
|
|
|
@@ -62053,7 +62302,13 @@ var Trigger = /** @class */ (function (_super) {
|
|
|
62053
62302
|
if (!!this.conditionRunner) {
|
|
62054
62303
|
this.perform(values, properties);
|
|
62055
62304
|
}
|
|
62305
|
+
else {
|
|
62306
|
+
if (this.canSuccessOnEmptyExpression()) {
|
|
62307
|
+
this.triggerResult(true, values, properties);
|
|
62308
|
+
}
|
|
62309
|
+
}
|
|
62056
62310
|
};
|
|
62311
|
+
Trigger.prototype.canSuccessOnEmptyExpression = function () { return false; };
|
|
62057
62312
|
Trigger.prototype.check = function (value) {
|
|
62058
62313
|
var triggerResult = Trigger.operators[this.operator](value, this.value);
|
|
62059
62314
|
if (triggerResult) {
|
|
@@ -62113,9 +62368,14 @@ var Trigger = /** @class */ (function (_super) {
|
|
|
62113
62368
|
if (!keys)
|
|
62114
62369
|
return false;
|
|
62115
62370
|
this.createConditionRunner();
|
|
62116
|
-
if (this.conditionRunner.hasFunction() === true)
|
|
62371
|
+
if (this.conditionRunner && this.conditionRunner.hasFunction() === true)
|
|
62117
62372
|
return true;
|
|
62118
|
-
return new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_5__["ProcessValue"]().isAnyKeyChanged(keys, this.
|
|
62373
|
+
return new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_5__["ProcessValue"]().isAnyKeyChanged(keys, this.getUsedVariables());
|
|
62374
|
+
};
|
|
62375
|
+
Trigger.prototype.getUsedVariables = function () {
|
|
62376
|
+
if (!this.conditionRunner)
|
|
62377
|
+
return [];
|
|
62378
|
+
return this.conditionRunner.getVariables();
|
|
62119
62379
|
};
|
|
62120
62380
|
Trigger.prototype.createConditionRunner = function () {
|
|
62121
62381
|
if (!!this.conditionRunner)
|
|
@@ -62448,6 +62708,14 @@ var SurveyTriggerCopyValue = /** @class */ (function (_super) {
|
|
|
62448
62708
|
return;
|
|
62449
62709
|
this.owner.copyTriggerValue(this.setToName, this.fromName, this.copyDisplayValue);
|
|
62450
62710
|
};
|
|
62711
|
+
SurveyTriggerCopyValue.prototype.canSuccessOnEmptyExpression = function () { return true; };
|
|
62712
|
+
SurveyTriggerCopyValue.prototype.getUsedVariables = function () {
|
|
62713
|
+
var res = _super.prototype.getUsedVariables.call(this);
|
|
62714
|
+
if (res.length === 0 && !!this.fromName) {
|
|
62715
|
+
res.push(this.fromName);
|
|
62716
|
+
}
|
|
62717
|
+
return res;
|
|
62718
|
+
};
|
|
62451
62719
|
return SurveyTriggerCopyValue;
|
|
62452
62720
|
}(SurveyTrigger));
|
|
62453
62721
|
|
|
@@ -63180,7 +63448,7 @@ var VerticalResponsivityManager = /** @class */ (function (_super) {
|
|
|
63180
63448
|
/*!****************************!*\
|
|
63181
63449
|
!*** ./src/utils/utils.ts ***!
|
|
63182
63450
|
\****************************/
|
|
63183
|
-
/*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, confirmActionAsync, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, wrapUrlForBackgroundImage, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, getFirstVisibleChild */
|
|
63451
|
+
/*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, showConfirmDialog, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, confirmActionAsync, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, wrapUrlForBackgroundImage, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, getFirstVisibleChild */
|
|
63184
63452
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
63185
63453
|
|
|
63186
63454
|
"use strict";
|
|
@@ -63193,6 +63461,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
63193
63461
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "doKey2ClickDown", function() { return doKey2ClickDown; });
|
|
63194
63462
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sanitizeEditableContent", function() { return sanitizeEditableContent; });
|
|
63195
63463
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return Logger; });
|
|
63464
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showConfirmDialog", function() { return showConfirmDialog; });
|
|
63196
63465
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeValues", function() { return mergeValues; });
|
|
63197
63466
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementWidth", function() { return getElementWidth; });
|
|
63198
63467
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContainerVisible", function() { return isContainerVisible; });
|
|
@@ -63218,7 +63487,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
63218
63487
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "preventDefaults", function() { return preventDefaults; });
|
|
63219
63488
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findParentByClassNames", function() { return findParentByClassNames; });
|
|
63220
63489
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFirstVisibleChild", function() { return getFirstVisibleChild; });
|
|
63221
|
-
/* harmony import */ var
|
|
63490
|
+
/* harmony import */ var _localizablestring__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../localizablestring */ "./src/localizablestring.ts");
|
|
63491
|
+
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../settings */ "./src/settings.ts");
|
|
63492
|
+
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../surveyStrings */ "./src/surveyStrings.ts");
|
|
63493
|
+
|
|
63494
|
+
|
|
63222
63495
|
|
|
63223
63496
|
function compareVersions(a, b) {
|
|
63224
63497
|
var regExStrip0 = /(\.0+)+$/;
|
|
@@ -63234,8 +63507,8 @@ function compareVersions(a, b) {
|
|
|
63234
63507
|
return segmentsA.length - segmentsB.length;
|
|
63235
63508
|
}
|
|
63236
63509
|
function confirmAction(message) {
|
|
63237
|
-
if (!!
|
|
63238
|
-
return
|
|
63510
|
+
if (!!_settings__WEBPACK_IMPORTED_MODULE_1__["settings"] && !!_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionFunc)
|
|
63511
|
+
return _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionFunc(message);
|
|
63239
63512
|
return confirm(message);
|
|
63240
63513
|
}
|
|
63241
63514
|
function confirmActionAsync(message, funcOnYes, funcOnNo) {
|
|
@@ -63245,8 +63518,8 @@ function confirmActionAsync(message, funcOnYes, funcOnNo) {
|
|
|
63245
63518
|
else if (!!funcOnNo)
|
|
63246
63519
|
funcOnNo();
|
|
63247
63520
|
};
|
|
63248
|
-
if (!!
|
|
63249
|
-
if (
|
|
63521
|
+
if (!!_settings__WEBPACK_IMPORTED_MODULE_1__["settings"] && !!_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionAsync) {
|
|
63522
|
+
if (_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionAsync(message, callbackFunc))
|
|
63250
63523
|
return;
|
|
63251
63524
|
}
|
|
63252
63525
|
callbackFunc(confirmAction(message));
|
|
@@ -63302,15 +63575,15 @@ var isShadowDOM = function (rootElement) {
|
|
|
63302
63575
|
return !!rootElement && !!("host" in rootElement && rootElement.host);
|
|
63303
63576
|
};
|
|
63304
63577
|
var getElement = function (element) {
|
|
63305
|
-
var root =
|
|
63578
|
+
var root = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.root;
|
|
63306
63579
|
return typeof element === "string" ? root.getElementById(element) : element;
|
|
63307
63580
|
};
|
|
63308
63581
|
function isElementVisible(element, threshold) {
|
|
63309
63582
|
if (threshold === void 0) { threshold = 0; }
|
|
63310
|
-
if (typeof
|
|
63583
|
+
if (typeof _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].environment === "undefined") {
|
|
63311
63584
|
return false;
|
|
63312
63585
|
}
|
|
63313
|
-
var root =
|
|
63586
|
+
var root = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.root;
|
|
63314
63587
|
var clientHeight = isShadowDOM(root)
|
|
63315
63588
|
? root.host.clientHeight
|
|
63316
63589
|
: root.documentElement.clientHeight;
|
|
@@ -63325,7 +63598,7 @@ function isElementVisible(element, threshold) {
|
|
|
63325
63598
|
return maxTop <= minBottom;
|
|
63326
63599
|
}
|
|
63327
63600
|
function findScrollableParent(element) {
|
|
63328
|
-
var root =
|
|
63601
|
+
var root = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.root;
|
|
63329
63602
|
if (!element) {
|
|
63330
63603
|
return isShadowDOM(root)
|
|
63331
63604
|
? root.host
|
|
@@ -63344,7 +63617,7 @@ function findScrollableParent(element) {
|
|
|
63344
63617
|
return findScrollableParent(element.parentElement);
|
|
63345
63618
|
}
|
|
63346
63619
|
function scrollElementByChildId(id) {
|
|
63347
|
-
var environment =
|
|
63620
|
+
var environment = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].environment;
|
|
63348
63621
|
if (!environment)
|
|
63349
63622
|
return;
|
|
63350
63623
|
var root = environment.root;
|
|
@@ -63367,7 +63640,7 @@ function wrapUrlForBackgroundImage(url) {
|
|
|
63367
63640
|
function getIconNameFromProxy(iconName) {
|
|
63368
63641
|
if (!iconName)
|
|
63369
63642
|
return iconName;
|
|
63370
|
-
var proxyName =
|
|
63643
|
+
var proxyName = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].customIcons[iconName];
|
|
63371
63644
|
return !!proxyName ? proxyName : iconName;
|
|
63372
63645
|
}
|
|
63373
63646
|
function createSvg(size, width, height, iconName, svgElem, title) {
|
|
@@ -63590,6 +63863,34 @@ var Logger = /** @class */ (function () {
|
|
|
63590
63863
|
return Logger;
|
|
63591
63864
|
}());
|
|
63592
63865
|
|
|
63866
|
+
function showConfirmDialog(message, callback) {
|
|
63867
|
+
var locStr = new _localizablestring__WEBPACK_IMPORTED_MODULE_0__["LocalizableString"](undefined);
|
|
63868
|
+
var popupViewModel = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].showDialog({
|
|
63869
|
+
componentName: "sv-string-viewer",
|
|
63870
|
+
data: { locStr: locStr, locString: locStr, model: locStr },
|
|
63871
|
+
onApply: function () {
|
|
63872
|
+
callback(true);
|
|
63873
|
+
return true;
|
|
63874
|
+
},
|
|
63875
|
+
onCancel: function () {
|
|
63876
|
+
callback(false);
|
|
63877
|
+
return false;
|
|
63878
|
+
},
|
|
63879
|
+
title: message,
|
|
63880
|
+
displayMode: "popup",
|
|
63881
|
+
isFocusedContent: false,
|
|
63882
|
+
cssClass: "sv-popup--confirm-delete"
|
|
63883
|
+
}, /*settings.rootElement*/ document.body); //TODO survey root
|
|
63884
|
+
var toolbar = popupViewModel.footerToolbar;
|
|
63885
|
+
var applyBtn = toolbar.getActionById("apply");
|
|
63886
|
+
var cancelBtn = toolbar.getActionById("cancel");
|
|
63887
|
+
cancelBtn.title = _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("cancel");
|
|
63888
|
+
cancelBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small";
|
|
63889
|
+
applyBtn.title = _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("ok");
|
|
63890
|
+
applyBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger";
|
|
63891
|
+
popupViewModel.width = "452px";
|
|
63892
|
+
return true;
|
|
63893
|
+
}
|
|
63593
63894
|
|
|
63594
63895
|
|
|
63595
63896
|
|