survey-core 1.9.123 → 1.9.124
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 +9 -8
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +9 -8
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +3 -3
- package/defaultV2.min.css +3 -3
- package/i18n/arabic.js +2 -2
- package/i18n/arabic.min.js +2 -2
- package/i18n/basque.js +2 -2
- package/i18n/basque.min.js +2 -2
- package/i18n/bulgarian.js +2 -2
- package/i18n/bulgarian.min.js +2 -2
- package/i18n/catalan.js +2 -2
- package/i18n/catalan.min.js +2 -2
- package/i18n/croatian.js +2 -2
- package/i18n/croatian.min.js +2 -2
- package/i18n/czech.js +2 -2
- package/i18n/czech.min.js +2 -2
- package/i18n/danish.js +2 -2
- package/i18n/danish.min.js +2 -2
- package/i18n/dutch.js +2 -2
- package/i18n/dutch.min.js +2 -2
- package/i18n/english.js +2 -2
- package/i18n/english.min.js +2 -2
- package/i18n/estonian.js +2 -2
- package/i18n/estonian.min.js +2 -2
- package/i18n/finnish.js +2 -2
- package/i18n/finnish.min.js +2 -2
- package/i18n/french.js +2 -2
- package/i18n/french.min.js +2 -2
- package/i18n/georgian.js +2 -2
- package/i18n/georgian.min.js +2 -2
- package/i18n/german.js +2 -2
- package/i18n/german.min.js +2 -2
- package/i18n/greek.js +2 -2
- package/i18n/greek.min.js +2 -2
- package/i18n/hebrew.js +2 -2
- package/i18n/hebrew.min.js +2 -2
- package/i18n/hindi.js +2 -2
- package/i18n/hindi.min.js +2 -2
- package/i18n/hungarian.js +2 -2
- package/i18n/hungarian.min.js +2 -2
- package/i18n/icelandic.js +2 -2
- package/i18n/icelandic.min.js +2 -2
- package/i18n/index.js +2 -2
- package/i18n/index.min.js +2 -2
- package/i18n/indonesian.js +2 -2
- package/i18n/indonesian.min.js +2 -2
- package/i18n/italian.js +2 -2
- package/i18n/italian.min.js +2 -2
- package/i18n/japanese.js +2 -2
- package/i18n/japanese.min.js +2 -2
- package/i18n/kazakh.js +2 -2
- package/i18n/kazakh.min.js +2 -2
- package/i18n/korean.js +2 -2
- package/i18n/korean.min.js +2 -2
- package/i18n/latvian.js +2 -2
- package/i18n/latvian.min.js +2 -2
- package/i18n/lithuanian.js +2 -2
- package/i18n/lithuanian.min.js +2 -2
- package/i18n/macedonian.js +2 -2
- package/i18n/macedonian.min.js +2 -2
- package/i18n/malay.js +2 -2
- package/i18n/malay.min.js +2 -2
- package/i18n/nl-BE.js +2 -2
- package/i18n/nl-BE.min.js +2 -2
- package/i18n/norwegian.js +2 -2
- package/i18n/norwegian.min.js +2 -2
- package/i18n/persian.js +2 -2
- package/i18n/persian.min.js +2 -2
- package/i18n/polish.js +2 -2
- package/i18n/polish.min.js +2 -2
- package/i18n/portuguese-br.js +2 -2
- package/i18n/portuguese-br.min.js +2 -2
- package/i18n/portuguese.js +2 -2
- package/i18n/portuguese.min.js +2 -2
- package/i18n/romanian.js +2 -2
- package/i18n/romanian.min.js +2 -2
- package/i18n/russian.js +2 -2
- package/i18n/russian.min.js +2 -2
- package/i18n/serbian.js +2 -2
- package/i18n/serbian.min.js +2 -2
- package/i18n/simplified-chinese.js +2 -2
- package/i18n/simplified-chinese.min.js +2 -2
- package/i18n/slovak.js +2 -2
- package/i18n/slovak.min.js +2 -2
- package/i18n/spanish.js +2 -2
- package/i18n/spanish.min.js +2 -2
- package/i18n/swahili.js +2 -2
- package/i18n/swahili.min.js +2 -2
- package/i18n/swedish.js +2 -2
- package/i18n/swedish.min.js +2 -2
- package/i18n/tajik.js +2 -2
- package/i18n/tajik.min.js +2 -2
- package/i18n/telugu.js +2 -2
- package/i18n/telugu.min.js +2 -2
- package/i18n/thai.js +2 -2
- package/i18n/thai.min.js +2 -2
- package/i18n/traditional-chinese.js +2 -2
- package/i18n/traditional-chinese.min.js +2 -2
- package/i18n/turkish.js +2 -2
- package/i18n/turkish.min.js +2 -2
- package/i18n/ukrainian.js +2 -2
- package/i18n/ukrainian.min.js +2 -2
- package/i18n/urdu.js +2 -2
- package/i18n/urdu.min.js +2 -2
- package/i18n/vietnamese.js +2 -2
- package/i18n/vietnamese.min.js +2 -2
- package/i18n/welsh.js +2 -2
- package/i18n/welsh.min.js +2 -2
- package/modern.css +2 -2
- package/modern.fontless.css +2 -2
- package/modern.fontless.min.css +2 -2
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/plugins/bootstrap-integration.js +2 -2
- package/plugins/bootstrap-integration.min.js +2 -2
- package/plugins/bootstrap-material-integration.js +2 -2
- package/plugins/bootstrap-material-integration.min.js +2 -2
- package/survey.core.js +189 -83
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +4 -4
- package/survey.css +2 -2
- package/survey.i18n.js +2 -2
- package/survey.i18n.min.js +2 -2
- package/survey.min.css +2 -2
- package/themes/borderless-dark-panelless.js +2 -2
- package/themes/borderless-dark-panelless.min.js +2 -2
- package/themes/borderless-dark.js +2 -2
- package/themes/borderless-dark.min.js +2 -2
- package/themes/borderless-light-panelless..js +2 -2
- package/themes/borderless-light-panelless..min.js +2 -2
- package/themes/borderless-light.js +2 -2
- package/themes/borderless-light.min.js +2 -2
- package/themes/contrast-dark-panelless.js +2 -2
- package/themes/contrast-dark-panelless.min.js +2 -2
- package/themes/contrast-dark.js +2 -2
- package/themes/contrast-dark.min.js +2 -2
- package/themes/contrast-light-panelless.js +2 -2
- package/themes/contrast-light-panelless.min.js +2 -2
- package/themes/contrast-light.js +2 -2
- package/themes/contrast-light.min.js +2 -2
- package/themes/default-dark-panelless.js +2 -2
- package/themes/default-dark-panelless.min.js +2 -2
- package/themes/default-dark.js +2 -2
- package/themes/default-dark.min.js +2 -2
- package/themes/default-light-panelless.js +2 -2
- package/themes/default-light-panelless.min.js +2 -2
- package/themes/default-light.js +2 -2
- package/themes/default-light.min.js +2 -2
- package/themes/doubleborder-dark-panelless.js +2 -2
- package/themes/doubleborder-dark-panelless.min.js +2 -2
- package/themes/doubleborder-dark.js +2 -2
- package/themes/doubleborder-dark.min.js +2 -2
- package/themes/doubleborder-light-panelles.js +2 -2
- package/themes/doubleborder-light-panelles.min.js +2 -2
- package/themes/doubleborder-light.js +2 -2
- package/themes/doubleborder-light.min.js +2 -2
- package/themes/flat-dark-panelless.js +2 -2
- package/themes/flat-dark-panelless.min.js +2 -2
- package/themes/flat-dark.js +2 -2
- package/themes/flat-dark.min.js +2 -2
- package/themes/flat-light-panelless.js +2 -2
- package/themes/flat-light-panelless.min.js +2 -2
- package/themes/flat-light.js +2 -2
- package/themes/flat-light.min.js +2 -2
- package/themes/index.js +2 -2
- package/themes/index.min.js +2 -2
- package/themes/layered-dark-panelless.js +2 -2
- package/themes/layered-dark-panelless.min.js +2 -2
- package/themes/layered-dark.js +2 -2
- package/themes/layered-dark.min.js +2 -2
- package/themes/layered-light-panelless.js +2 -2
- package/themes/layered-light-panelless.min.js +2 -2
- package/themes/layered-light.js +2 -2
- package/themes/layered-light.min.js +2 -2
- package/themes/plain-dark-panelless.js +2 -2
- package/themes/plain-dark-panelless.min.js +2 -2
- package/themes/plain-dark.js +2 -2
- package/themes/plain-dark.min.js +2 -2
- package/themes/plain-light-panelless.js +2 -2
- package/themes/plain-light-panelless.min.js +2 -2
- package/themes/plain-light.js +2 -2
- package/themes/plain-light.min.js +2 -2
- package/themes/sharp-dark-panelless.js +2 -2
- package/themes/sharp-dark-panelless.min.js +2 -2
- package/themes/sharp-dark.js +2 -2
- package/themes/sharp-dark.min.js +2 -2
- package/themes/sharp-light-panelless.js +2 -2
- package/themes/sharp-light-panelless.min.js +2 -2
- package/themes/sharp-light.js +2 -2
- package/themes/sharp-light.min.js +2 -2
- package/themes/solid-dark-panelless.js +2 -2
- package/themes/solid-dark-panelless.min.js +2 -2
- package/themes/solid-dark.js +2 -2
- package/themes/solid-dark.min.js +2 -2
- package/themes/solid-light-panelless.js +2 -2
- package/themes/solid-light-panelless.min.js +2 -2
- package/themes/solid-light.js +2 -2
- package/themes/solid-light.min.js +2 -2
- package/themes/three-dimensional-dark-panelless.js +2 -2
- package/themes/three-dimensional-dark-panelless.min.js +2 -2
- package/themes/three-dimensional-dark.js +2 -2
- package/themes/three-dimensional-dark.min.js +2 -2
- package/themes/three-dimensional-light-panelless.js +2 -2
- package/themes/three-dimensional-light-panelless.min.js +2 -2
- package/themes/three-dimensional-light.js +2 -2
- package/themes/three-dimensional-light.min.js +2 -2
- package/ts3.4/typings/base.d.ts +1 -0
- package/ts3.4/typings/question_baseselect.d.ts +3 -0
- package/ts3.4/typings/question_boolean.d.ts +2 -2
- package/ts3.4/typings/question_matrix.d.ts +5 -0
- package/ts3.4/typings/question_matrixdropdownrendered.d.ts +2 -4
- package/ts3.4/typings/question_matrixdynamic.d.ts +1 -0
- package/ts3.4/typings/survey.d.ts +9 -0
- package/ts3.4/typings/utils/devices.d.ts +5 -0
- package/ts3.4/typings/validator.d.ts +2 -0
- package/typings/base.d.ts +1 -0
- package/typings/question_baseselect.d.ts +3 -0
- package/typings/question_boolean.d.ts +4 -4
- package/typings/question_matrix.d.ts +5 -0
- package/typings/question_matrixdropdownrendered.d.ts +2 -4
- package/typings/question_matrixdynamic.d.ts +1 -0
- package/typings/survey.d.ts +10 -0
- package/typings/utils/devices.d.ts +5 -0
- package/typings/validator.d.ts +3 -0
package/survey.core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
3
|
-
* Copyright (c) 2015-
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.124
|
|
3
|
+
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
6
6
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -1964,6 +1964,13 @@ var Base = /** @class */ (function () {
|
|
|
1964
1964
|
enumerable: false,
|
|
1965
1965
|
configurable: true
|
|
1966
1966
|
});
|
|
1967
|
+
Object.defineProperty(Base.prototype, "isDesignModeV2", {
|
|
1968
|
+
get: function () {
|
|
1969
|
+
return _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].supportCreatorV2 && this.isDesignMode;
|
|
1970
|
+
},
|
|
1971
|
+
enumerable: false,
|
|
1972
|
+
configurable: true
|
|
1973
|
+
});
|
|
1967
1974
|
Object.defineProperty(Base.prototype, "inSurvey", {
|
|
1968
1975
|
/**
|
|
1969
1976
|
* Returns `true` if the object is included in a survey.
|
|
@@ -2139,6 +2146,7 @@ var Base = /** @class */ (function () {
|
|
|
2139
2146
|
Base.prototype.resetPropertyValue = function (name) {
|
|
2140
2147
|
var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
|
|
2141
2148
|
if (locStr) {
|
|
2149
|
+
this.setLocalizableStringText(name, undefined);
|
|
2142
2150
|
locStr.clear();
|
|
2143
2151
|
}
|
|
2144
2152
|
else {
|
|
@@ -3152,6 +3160,10 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
|
3152
3160
|
_this.createItemValue = function (value) {
|
|
3153
3161
|
return new _itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"](value);
|
|
3154
3162
|
};
|
|
3163
|
+
_this.registerPropertyChangedHandlers(["url"], function () {
|
|
3164
|
+
if (_this.owner)
|
|
3165
|
+
_this.owner.setPropertyValue("isUsingRestful", !!_this.url);
|
|
3166
|
+
});
|
|
3155
3167
|
return _this;
|
|
3156
3168
|
}
|
|
3157
3169
|
Object.defineProperty(ChoicesRestful, "EncodeParameters", {
|
|
@@ -3444,7 +3456,7 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
|
3444
3456
|
* @see titleName
|
|
3445
3457
|
*/
|
|
3446
3458
|
get: function () {
|
|
3447
|
-
return this.getPropertyValue("url"
|
|
3459
|
+
return this.getPropertyValue("url") || "";
|
|
3448
3460
|
},
|
|
3449
3461
|
set: function (val) {
|
|
3450
3462
|
this.setPropertyValue("url", val);
|
|
@@ -3482,8 +3494,7 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
|
3482
3494
|
* @see titleName
|
|
3483
3495
|
*/
|
|
3484
3496
|
get: function () {
|
|
3485
|
-
|
|
3486
|
-
return !!res ? res : "";
|
|
3497
|
+
return this.getPropertyValue("path") || "";
|
|
3487
3498
|
},
|
|
3488
3499
|
set: function (val) {
|
|
3489
3500
|
this.setPropertyValue("path", val);
|
|
@@ -6145,8 +6156,6 @@ var DragDropInfo = /** @class */ (function () {
|
|
|
6145
6156
|
__webpack_require__.r(__webpack_exports__);
|
|
6146
6157
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropPageHelperV1", function() { return DragDropPageHelperV1; });
|
|
6147
6158
|
/* harmony import */ var _drag_drop_helper_v1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag-drop-helper-v1 */ "./src/drag-drop-helper-v1.ts");
|
|
6148
|
-
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
|
6149
|
-
|
|
6150
6159
|
|
|
6151
6160
|
var DragDropPageHelperV1 = /** @class */ (function () {
|
|
6152
6161
|
function DragDropPageHelperV1(page) {
|
|
@@ -6244,7 +6253,7 @@ var DragDropPageHelperV1 = /** @class */ (function () {
|
|
|
6244
6253
|
var elementsToResetSWNL = [];
|
|
6245
6254
|
if (!isCancel && !!row) {
|
|
6246
6255
|
var isSamePanel = false;
|
|
6247
|
-
if (this.page.
|
|
6256
|
+
if (this.page.isDesignModeV2) {
|
|
6248
6257
|
var srcRow = src && src.parent && src.parent.dragDropFindRow(src);
|
|
6249
6258
|
if (row.panel.elements[targetIndex] && row.panel.elements[targetIndex].startWithNewLine && row.elements.length > 1 && row.panel.elements[targetIndex] === dest) {
|
|
6250
6259
|
elementsToSetSWNL.push(target);
|
|
@@ -6263,8 +6272,8 @@ var DragDropPageHelperV1 = /** @class */ (function () {
|
|
|
6263
6272
|
elementsToResetSWNL.push(target);
|
|
6264
6273
|
}
|
|
6265
6274
|
}
|
|
6275
|
+
this.page.survey.startMovingQuestion();
|
|
6266
6276
|
if (!!src && !!src.parent) {
|
|
6267
|
-
this.page.survey.startMovingQuestion();
|
|
6268
6277
|
isSamePanel = row.panel == src.parent;
|
|
6269
6278
|
if (isSamePanel) {
|
|
6270
6279
|
row.panel.dragDropMoveElement(src, target, targetIndex);
|
|
@@ -6307,7 +6316,7 @@ var DragDropPageHelperV1 = /** @class */ (function () {
|
|
|
6307
6316
|
var destination = this.dragDropInfo.destination;
|
|
6308
6317
|
if (!this.dragDropCanDropCore(source, destination))
|
|
6309
6318
|
return false;
|
|
6310
|
-
if (this.page.
|
|
6319
|
+
if (this.page.isDesignModeV2) {
|
|
6311
6320
|
var rowSource = this.page.dragDropFindRow(source);
|
|
6312
6321
|
var rowDestination = this.page.dragDropFindRow(destination);
|
|
6313
6322
|
if (rowSource !== rowDestination) {
|
|
@@ -6373,8 +6382,6 @@ var DragDropPageHelperV1 = /** @class */ (function () {
|
|
|
6373
6382
|
__webpack_require__.r(__webpack_exports__);
|
|
6374
6383
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropPanelHelperV1", function() { return DragDropPanelHelperV1; });
|
|
6375
6384
|
/* harmony import */ var _drag_drop_helper_v1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag-drop-helper-v1 */ "./src/drag-drop-helper-v1.ts");
|
|
6376
|
-
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
|
6377
|
-
|
|
6378
6385
|
|
|
6379
6386
|
var DragDropPanelHelperV1 = /** @class */ (function () {
|
|
6380
6387
|
function DragDropPanelHelperV1(panel) {
|
|
@@ -6479,7 +6486,7 @@ var DragDropPanelHelperV1 = /** @class */ (function () {
|
|
|
6479
6486
|
var index = destRow.elements.indexOf(dragDropInfo.destination);
|
|
6480
6487
|
if (index == 0 &&
|
|
6481
6488
|
!dragDropInfo.isBottom) {
|
|
6482
|
-
if (this.panel.
|
|
6489
|
+
if (this.panel.isDesignModeV2) {
|
|
6483
6490
|
}
|
|
6484
6491
|
else if (destRow.elements[0].startWithNewLine) {
|
|
6485
6492
|
if (destRow.index > 0) {
|
|
@@ -6517,7 +6524,7 @@ var DragDropPanelHelperV1 = /** @class */ (function () {
|
|
|
6517
6524
|
};
|
|
6518
6525
|
DragDropPanelHelperV1.prototype.dragDropAddTargetToNewRow = function (dragDropInfo, destRow, prevRow) {
|
|
6519
6526
|
var targetRow = destRow.panel.createRowAndSetLazy(destRow.panel.rows.length);
|
|
6520
|
-
if (this.panel.
|
|
6527
|
+
if (this.panel.isDesignModeV2) {
|
|
6521
6528
|
targetRow.setIsLazyRendering(false);
|
|
6522
6529
|
}
|
|
6523
6530
|
targetRow.addElement(dragDropInfo.target);
|
|
@@ -9332,8 +9339,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9332
9339
|
//import "../../modern.scss";
|
|
9333
9340
|
var Version;
|
|
9334
9341
|
var ReleaseDate;
|
|
9335
|
-
Version = "" + "1.9.
|
|
9336
|
-
ReleaseDate = "" + "
|
|
9342
|
+
Version = "" + "1.9.124";
|
|
9343
|
+
ReleaseDate = "" + "2024-01-04";
|
|
9337
9344
|
function checkLibraryVersion(ver, libraryName) {
|
|
9338
9345
|
if (Version != ver) {
|
|
9339
9346
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -26612,8 +26619,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
26612
26619
|
if (this.forceIsInputReadOnly !== undefined) {
|
|
26613
26620
|
return this.forceIsInputReadOnly;
|
|
26614
26621
|
}
|
|
26615
|
-
|
|
26616
|
-
return this.isReadOnly || isDesignModeV2;
|
|
26622
|
+
return this.isReadOnly || this.isDesignModeV2;
|
|
26617
26623
|
},
|
|
26618
26624
|
enumerable: false,
|
|
26619
26625
|
configurable: true
|
|
@@ -28575,7 +28581,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
28575
28581
|
_this.onVisibleChoicesChanged();
|
|
28576
28582
|
}
|
|
28577
28583
|
});
|
|
28578
|
-
_this.registerPropertyChangedHandlers(["choicesFromQuestion", "choicesFromQuestionMode", "choiceValuesFromQuestion",
|
|
28584
|
+
_this.registerPropertyChangedHandlers(["choicesFromQuestion", "choicesFromQuestionMode", "choiceValuesFromQuestion",
|
|
28585
|
+
"choiceTextsFromQuestion", "showNoneItem", "isUsingRestful"], function () {
|
|
28579
28586
|
_this.onVisibleChoicesChanged();
|
|
28580
28587
|
});
|
|
28581
28588
|
_this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
|
|
@@ -28606,7 +28613,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
28606
28613
|
}
|
|
28607
28614
|
Object.defineProperty(QuestionSelectBase.prototype, "waitingChoicesByURL", {
|
|
28608
28615
|
get: function () {
|
|
28609
|
-
return !this.isChoicesLoaded &&
|
|
28616
|
+
return !this.isChoicesLoaded && this.hasChoicesUrl;
|
|
28610
28617
|
},
|
|
28611
28618
|
enumerable: false,
|
|
28612
28619
|
configurable: true
|
|
@@ -28662,6 +28669,16 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
28662
28669
|
var mode = selBaseQuestion ? "select" : (arrayQuestion ? "array" : undefined);
|
|
28663
28670
|
this.setPropertyValue("carryForwardQuestionType", mode);
|
|
28664
28671
|
};
|
|
28672
|
+
Object.defineProperty(QuestionSelectBase.prototype, "isUsingRestful", {
|
|
28673
|
+
get: function () {
|
|
28674
|
+
return this.getPropertyValueWithoutDefault("isUsingRestful") || false;
|
|
28675
|
+
},
|
|
28676
|
+
enumerable: false,
|
|
28677
|
+
configurable: true
|
|
28678
|
+
});
|
|
28679
|
+
QuestionSelectBase.prototype.updateIsUsingRestful = function () {
|
|
28680
|
+
this.setPropertyValueDirectly("isUsingRestful", this.hasChoicesUrl);
|
|
28681
|
+
};
|
|
28665
28682
|
QuestionSelectBase.prototype.supportGoNextPageError = function () {
|
|
28666
28683
|
return !this.isOtherSelected || !!this.otherValue;
|
|
28667
28684
|
};
|
|
@@ -29169,7 +29186,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29169
29186
|
var value = this.value;
|
|
29170
29187
|
var valueArray = Array.isArray(value) ? value : [value];
|
|
29171
29188
|
var hasItemWithoutValues = valueArray.some(function (val) { return !_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(_this.choices, val); });
|
|
29172
|
-
if (hasItemWithoutValues && (this.choicesLazyLoadEnabled ||
|
|
29189
|
+
if (hasItemWithoutValues && (this.choicesLazyLoadEnabled || this.hasChoicesUrl)) {
|
|
29173
29190
|
this.waitingGetChoiceDisplayValueResponse = true;
|
|
29174
29191
|
this.updateIsReady();
|
|
29175
29192
|
this.survey.getChoiceDisplayValue({
|
|
@@ -29559,7 +29576,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29559
29576
|
QuestionSelectBase.prototype.addToVisibleChoices = function (items, isAddAll) {
|
|
29560
29577
|
this.headItemsCount = 0;
|
|
29561
29578
|
this.footItemsCount = 0;
|
|
29562
|
-
this.
|
|
29579
|
+
if (!this.hasChoicesUrl) {
|
|
29580
|
+
this.addNewItemToVisibleChoices(items, isAddAll);
|
|
29581
|
+
}
|
|
29563
29582
|
var dict = new Array();
|
|
29564
29583
|
this.addNonChoicesItems(dict, isAddAll);
|
|
29565
29584
|
dict.sort(function (a, b) {
|
|
@@ -29621,8 +29640,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29621
29640
|
};
|
|
29622
29641
|
Object.defineProperty(QuestionSelectBase.prototype, "isAddDefaultItems", {
|
|
29623
29642
|
get: function () {
|
|
29624
|
-
return _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].
|
|
29625
|
-
|
|
29643
|
+
return _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].showDefaultItemsInCreatorV2 && this.isDesignModeV2 &&
|
|
29644
|
+
!this.customWidget && !this.isContentElement;
|
|
29626
29645
|
},
|
|
29627
29646
|
enumerable: false,
|
|
29628
29647
|
configurable: true
|
|
@@ -29721,6 +29740,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29721
29740
|
question.addDependedQuestion(this);
|
|
29722
29741
|
return this.getChoicesFromArrayQuestion(question);
|
|
29723
29742
|
}
|
|
29743
|
+
if (this.isDesignModeV2 && this.hasChoicesUrl)
|
|
29744
|
+
return [];
|
|
29724
29745
|
return this.choicesFromUrl ? this.choicesFromUrl : this.getChoices();
|
|
29725
29746
|
},
|
|
29726
29747
|
enumerable: false,
|
|
@@ -29883,7 +29904,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29883
29904
|
return (this.storeOthersAsComment === true ||
|
|
29884
29905
|
(this.storeOthersAsComment == "default" &&
|
|
29885
29906
|
(this.survey != null ? this.survey.storeOthersAsComment : true)) ||
|
|
29886
|
-
(
|
|
29907
|
+
(this.hasChoicesUrl && !this.choicesFromUrl));
|
|
29887
29908
|
};
|
|
29888
29909
|
QuestionSelectBase.prototype.onSurveyLoad = function () {
|
|
29889
29910
|
this.runChoicesByUrl();
|
|
@@ -29945,7 +29966,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29945
29966
|
}
|
|
29946
29967
|
};
|
|
29947
29968
|
QuestionSelectBase.prototype.runChoicesByUrl = function () {
|
|
29948
|
-
|
|
29969
|
+
this.updateIsUsingRestful();
|
|
29970
|
+
if (!this.choicesByUrl || this.isLoadingFromJson || this.isRunningChoices || this.isDesignModeV2)
|
|
29949
29971
|
return;
|
|
29950
29972
|
var processor = this.surveyImpl
|
|
29951
29973
|
? this.surveyImpl.getTextProcessor()
|
|
@@ -30119,6 +30141,13 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
30119
30141
|
QuestionSelectBase.prototype.randomizeArray = function (array) {
|
|
30120
30142
|
return _helpers__WEBPACK_IMPORTED_MODULE_8__["Helpers"].randomizeArray(array);
|
|
30121
30143
|
};
|
|
30144
|
+
Object.defineProperty(QuestionSelectBase.prototype, "hasChoicesUrl", {
|
|
30145
|
+
get: function () {
|
|
30146
|
+
return this.choicesByUrl && !!this.choicesByUrl.url;
|
|
30147
|
+
},
|
|
30148
|
+
enumerable: false,
|
|
30149
|
+
configurable: true
|
|
30150
|
+
});
|
|
30122
30151
|
QuestionSelectBase.prototype.clearIncorrectValues = function () {
|
|
30123
30152
|
if (!this.hasValueToClearIncorrectValues())
|
|
30124
30153
|
return;
|
|
@@ -30127,8 +30156,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
30127
30156
|
if (!!this.survey &&
|
|
30128
30157
|
this.survey.questionsByValueName(this.getValueName()).length > 1)
|
|
30129
30158
|
return;
|
|
30130
|
-
if (
|
|
30131
|
-
!this.choicesByUrl.isEmpty &&
|
|
30159
|
+
if (this.hasChoicesUrl &&
|
|
30132
30160
|
(!this.choicesFromUrl || this.choicesFromUrl.length == 0))
|
|
30133
30161
|
return;
|
|
30134
30162
|
if (this.clearIncorrectValuesCallback) {
|
|
@@ -32057,8 +32085,20 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
32057
32085
|
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("checkbox", [
|
|
32058
32086
|
{ name: "showSelectAllItem:boolean", alternativeName: "hasSelectAll" },
|
|
32059
32087
|
{ name: "separateSpecialChoices", visible: true },
|
|
32060
|
-
{ name: "maxSelectedChoices:number", default: 0
|
|
32061
|
-
|
|
32088
|
+
{ name: "maxSelectedChoices:number", default: 0, onSettingValue: function (obj, val) {
|
|
32089
|
+
if (val <= 0)
|
|
32090
|
+
return 0;
|
|
32091
|
+
var min = obj.minSelectedChoices;
|
|
32092
|
+
return min > 0 && val < min ? min : val;
|
|
32093
|
+
}
|
|
32094
|
+
},
|
|
32095
|
+
{ name: "minSelectedChoices:number", default: 0, onSettingValue: function (obj, val) {
|
|
32096
|
+
if (val <= 0)
|
|
32097
|
+
return 0;
|
|
32098
|
+
var max = obj.maxSelectedChoices;
|
|
32099
|
+
return max > 0 && val > max ? max : val;
|
|
32100
|
+
}
|
|
32101
|
+
},
|
|
32062
32102
|
{
|
|
32063
32103
|
name: "selectAllText",
|
|
32064
32104
|
serializationProperty: "locSelectAllText",
|
|
@@ -37004,6 +37044,23 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
37004
37044
|
QuestionMatrixModel.prototype.getType = function () {
|
|
37005
37045
|
return "matrix";
|
|
37006
37046
|
};
|
|
37047
|
+
Object.defineProperty(QuestionMatrixModel.prototype, "cellComponent", {
|
|
37048
|
+
/**
|
|
37049
|
+
* The name of a component used to render cells.
|
|
37050
|
+
*/
|
|
37051
|
+
get: function () {
|
|
37052
|
+
return this.getPropertyValue("cellComponent");
|
|
37053
|
+
},
|
|
37054
|
+
enumerable: false,
|
|
37055
|
+
configurable: true
|
|
37056
|
+
});
|
|
37057
|
+
Object.defineProperty(QuestionMatrixModel.prototype, "itemComponent", {
|
|
37058
|
+
set: function (value) {
|
|
37059
|
+
this.setPropertyValue("cellComponent", value);
|
|
37060
|
+
},
|
|
37061
|
+
enumerable: false,
|
|
37062
|
+
configurable: true
|
|
37063
|
+
});
|
|
37007
37064
|
Object.defineProperty(QuestionMatrixModel.prototype, "hasSingleInput", {
|
|
37008
37065
|
get: function () {
|
|
37009
37066
|
return false;
|
|
@@ -37427,6 +37484,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_3__["Serializer"].addClass("matrix", [
|
|
|
37427
37484
|
},
|
|
37428
37485
|
"isAllRowRequired:boolean",
|
|
37429
37486
|
"hideIfRowsEmpty:boolean",
|
|
37487
|
+
{ name: "cellComponent", visible: false, default: "survey-matrix-cell" }
|
|
37430
37488
|
], function () {
|
|
37431
37489
|
return new QuestionMatrixModel("");
|
|
37432
37490
|
}, "matrixbase");
|
|
@@ -37724,6 +37782,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
37724
37782
|
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
|
37725
37783
|
/* harmony import */ var _question_matrixdropdowncolumn__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./question_matrixdropdowncolumn */ "./src/question_matrixdropdowncolumn.ts");
|
|
37726
37784
|
/* harmony import */ var _question_matrixdropdownrendered__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./question_matrixdropdownrendered */ "./src/question_matrixdropdownrendered.ts");
|
|
37785
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
|
37727
37786
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
37728
37787
|
var extendStatics = function (d, b) {
|
|
37729
37788
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -37753,6 +37812,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
37753
37812
|
|
|
37754
37813
|
|
|
37755
37814
|
|
|
37815
|
+
|
|
37756
37816
|
var MatrixDropdownCell = /** @class */ (function () {
|
|
37757
37817
|
function MatrixDropdownCell(column, row, data) {
|
|
37758
37818
|
this.column = column;
|
|
@@ -38100,12 +38160,17 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
38100
38160
|
if (!!this.data) {
|
|
38101
38161
|
values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.value;
|
|
38102
38162
|
}
|
|
38103
|
-
|
|
38163
|
+
var rowIndex = this.rowIndex;
|
|
38164
|
+
values[MatrixDropdownRowModelBase.IndexVariableName] = rowIndex;
|
|
38104
38165
|
values[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
|
|
38105
38166
|
var newProps = _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].createCopy(properties);
|
|
38106
38167
|
newProps[MatrixDropdownRowModelBase.RowVariableName] = this;
|
|
38168
|
+
var rowValues = rowIndex > 0 ? this.data.getRowValue(this.rowIndex - 1) : this.value;
|
|
38107
38169
|
for (var i = 0; i < this.cells.length; i++) {
|
|
38108
|
-
|
|
38170
|
+
if (i > 0) {
|
|
38171
|
+
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_14__["mergeValues"])(this.value, rowValues);
|
|
38172
|
+
}
|
|
38173
|
+
values[MatrixDropdownRowModelBase.RowVariableName] = rowValues;
|
|
38109
38174
|
this.cells[i].runCondition(values, newProps);
|
|
38110
38175
|
}
|
|
38111
38176
|
if (!!this.detailPanel) {
|
|
@@ -39249,7 +39314,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
39249
39314
|
if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isArraysEqual(curVisibleChoices, newVisibleChoices, true, false, false))
|
|
39250
39315
|
return true;
|
|
39251
39316
|
}
|
|
39252
|
-
return curVis
|
|
39317
|
+
return curVis !== column.isColumnVisible;
|
|
39253
39318
|
};
|
|
39254
39319
|
QuestionMatrixDropdownModelBase.prototype.updateNewVisibleChoices = function (q, dest) {
|
|
39255
39320
|
var choices = q.visibleChoices;
|
|
@@ -41326,6 +41391,13 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
|
|
41326
41391
|
this.classNameValue = "";
|
|
41327
41392
|
this.idValue = QuestionMatrixDropdownRenderedCell.counter++;
|
|
41328
41393
|
}
|
|
41394
|
+
Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "requiredText", {
|
|
41395
|
+
get: function () {
|
|
41396
|
+
return this.column && this.column.isRenderedRequired ? this.column.requiredText : undefined;
|
|
41397
|
+
},
|
|
41398
|
+
enumerable: false,
|
|
41399
|
+
configurable: true
|
|
41400
|
+
});
|
|
41329
41401
|
Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "hasQuestion", {
|
|
41330
41402
|
get: function () {
|
|
41331
41403
|
return !!this.question && !this.isErrorsCell;
|
|
@@ -41660,9 +41732,9 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41660
41732
|
enumerable: false,
|
|
41661
41733
|
configurable: true
|
|
41662
41734
|
});
|
|
41663
|
-
Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "
|
|
41735
|
+
Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "isRowsDragAndDrop", {
|
|
41664
41736
|
get: function () {
|
|
41665
|
-
return this.matrix.
|
|
41737
|
+
return this.matrix.isRowsDragAndDrop && this.matrix.isColumnLayoutHorizontal;
|
|
41666
41738
|
},
|
|
41667
41739
|
enumerable: false,
|
|
41668
41740
|
configurable: true
|
|
@@ -41821,7 +41893,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41821
41893
|
if (!isShown)
|
|
41822
41894
|
return;
|
|
41823
41895
|
this.headerRowValue = this.createRenderedRow(this.cssClasses);
|
|
41824
|
-
if (this.
|
|
41896
|
+
if (this.isRowsDragAndDrop) {
|
|
41825
41897
|
this.headerRow.cells.push(this.createHeaderCell(null, "action"));
|
|
41826
41898
|
}
|
|
41827
41899
|
if (this.hasActionCellInRows("start")) {
|
|
@@ -41865,7 +41937,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41865
41937
|
if (!this.showFooter)
|
|
41866
41938
|
return;
|
|
41867
41939
|
this.footerRowValue = this.createRenderedRow(this.cssClasses);
|
|
41868
|
-
if (this.
|
|
41940
|
+
if (this.isRowsDragAndDrop) {
|
|
41869
41941
|
this.footerRow.cells.push(this.createHeaderCell(null));
|
|
41870
41942
|
}
|
|
41871
41943
|
if (this.hasActionCellInRows("start")) {
|
|
@@ -42110,7 +42182,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
42110
42182
|
};
|
|
42111
42183
|
QuestionMatrixDropdownRenderedTable.prototype.createHorizontalRow = function (row, useAsHeader) {
|
|
42112
42184
|
var res = this.createRenderedRow(this.cssClasses);
|
|
42113
|
-
if (this.
|
|
42185
|
+
if (this.isRowsDragAndDrop) {
|
|
42114
42186
|
var rowIndex = this.matrix.visibleRows.indexOf(row);
|
|
42115
42187
|
res.cells.push(this.getRowDragCell(rowIndex));
|
|
42116
42188
|
}
|
|
@@ -42258,9 +42330,6 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
42258
42330
|
.append(hCell.className)
|
|
42259
42331
|
.append(this.cssClasses.rowTextCell)
|
|
42260
42332
|
.append(this.cssClasses.columnTitleCell).toString();
|
|
42261
|
-
if (!choice) {
|
|
42262
|
-
this.setRequriedToHeaderCell(column, hCell);
|
|
42263
|
-
}
|
|
42264
42333
|
res.cells.push(hCell);
|
|
42265
42334
|
}
|
|
42266
42335
|
var rows = this.matrix.visibleRows;
|
|
@@ -42390,26 +42459,11 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
42390
42459
|
};
|
|
42391
42460
|
QuestionMatrixDropdownRenderedTable.prototype.setHeaderCell = function (column, cell) {
|
|
42392
42461
|
this.setHeaderCellWidth(column, cell);
|
|
42393
|
-
this.setRequriedToHeaderCell(column, cell);
|
|
42394
42462
|
};
|
|
42395
42463
|
QuestionMatrixDropdownRenderedTable.prototype.setHeaderCellWidth = function (column, cell) {
|
|
42396
42464
|
cell.minWidth = column != null ? this.matrix.getColumnWidth(column) : this.matrix.getRowTitleWidth();
|
|
42397
42465
|
cell.width = column != null ? column.width : this.matrix.getRowTitleWidth();
|
|
42398
42466
|
};
|
|
42399
|
-
QuestionMatrixDropdownRenderedTable.prototype.setRequriedToHeaderCell = function (column, cell) {
|
|
42400
|
-
if (!!column && column.isRequired && this.matrix.survey) {
|
|
42401
|
-
cell.requiredText = this.matrix.survey.requiredText;
|
|
42402
|
-
}
|
|
42403
|
-
};
|
|
42404
|
-
QuestionMatrixDropdownRenderedTable.prototype.createRemoveRowCell = function (row) {
|
|
42405
|
-
var res = new QuestionMatrixDropdownRenderedCell();
|
|
42406
|
-
res.row = row;
|
|
42407
|
-
res.isRemoveRow = this.canRemoveRow(row);
|
|
42408
|
-
if (!!this.cssClasses.cell) {
|
|
42409
|
-
res.className = this.cssClasses.cell;
|
|
42410
|
-
}
|
|
42411
|
-
return res;
|
|
42412
|
-
};
|
|
42413
42467
|
QuestionMatrixDropdownRenderedTable.prototype.createTextCell = function (locTitle) {
|
|
42414
42468
|
var cell = new QuestionMatrixDropdownRenderedCell();
|
|
42415
42469
|
cell.locTitle = locTitle;
|
|
@@ -42567,7 +42621,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
42567
42621
|
_this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
|
|
42568
42622
|
_this.updateShowTableAndAddRow();
|
|
42569
42623
|
});
|
|
42570
|
-
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop"], function () { _this.clearRowsAndResetRenderedTable(); });
|
|
42624
|
+
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly"], function () { _this.clearRowsAndResetRenderedTable(); });
|
|
42571
42625
|
_this.dragOrClickHelper = new _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_9__["DragOrClickHelper"](_this.startDragMatrixRow);
|
|
42572
42626
|
return _this;
|
|
42573
42627
|
}
|
|
@@ -42586,7 +42640,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
42586
42640
|
return true;
|
|
42587
42641
|
};
|
|
42588
42642
|
QuestionMatrixDynamicModel.prototype.onPointerDown = function (pointerDownEvent, row) {
|
|
42589
|
-
if (!row || !this.
|
|
42643
|
+
if (!row || !this.isRowsDragAndDrop)
|
|
42590
42644
|
return;
|
|
42591
42645
|
if (this.isBanStartDrag(pointerDownEvent))
|
|
42592
42646
|
return;
|
|
@@ -42783,8 +42837,6 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
42783
42837
|
* Default value: `false`
|
|
42784
42838
|
*/
|
|
42785
42839
|
get: function () {
|
|
42786
|
-
if (this.readOnly)
|
|
42787
|
-
return false;
|
|
42788
42840
|
return this.getPropertyValue("allowRowsDragAndDrop");
|
|
42789
42841
|
},
|
|
42790
42842
|
set: function (val) {
|
|
@@ -42793,6 +42845,13 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
42793
42845
|
enumerable: false,
|
|
42794
42846
|
configurable: true
|
|
42795
42847
|
});
|
|
42848
|
+
Object.defineProperty(QuestionMatrixDynamicModel.prototype, "isRowsDragAndDrop", {
|
|
42849
|
+
get: function () {
|
|
42850
|
+
return this.allowRowsDragAndDrop && !this.isReadOnly;
|
|
42851
|
+
},
|
|
42852
|
+
enumerable: false,
|
|
42853
|
+
configurable: true
|
|
42854
|
+
});
|
|
42796
42855
|
Object.defineProperty(QuestionMatrixDynamicModel.prototype, "iconDragElement", {
|
|
42797
42856
|
get: function () {
|
|
42798
42857
|
return this.cssClasses.iconDragElement;
|
|
@@ -45212,9 +45271,10 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45212
45271
|
* @see visiblePanels
|
|
45213
45272
|
*/
|
|
45214
45273
|
get: function () {
|
|
45215
|
-
return this.
|
|
45274
|
+
return this.getPropertyValue("templateVisibleIf");
|
|
45216
45275
|
},
|
|
45217
45276
|
set: function (val) {
|
|
45277
|
+
this.setPropertyValue("templateVisibleIf", val);
|
|
45218
45278
|
this.template.visibleIf = val;
|
|
45219
45279
|
},
|
|
45220
45280
|
enumerable: false,
|
|
@@ -54822,6 +54882,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
54822
54882
|
_this.registerPropertyChangedHandlers(["renderBackgroundImage", "backgroundOpacity", "backgroundImageFit", "fitToContainer", "backgroundImageAttachment"], function () {
|
|
54823
54883
|
_this.updateBackgroundImageStyle();
|
|
54824
54884
|
});
|
|
54885
|
+
_this.registerPropertyChangedHandlers(["showPrevButton", "showCompleteButton"], function () { _this.updateButtonsVisibility(); });
|
|
54825
54886
|
_this.onGetQuestionNo.onCallbacksChanged = function () {
|
|
54826
54887
|
_this.resetVisibleIndexes();
|
|
54827
54888
|
};
|
|
@@ -55405,6 +55466,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
55405
55466
|
* - `"none"` - Hides the navigation buttons. This setting may be useful if you [implement custom external navigation](https://surveyjs.io/form-library/examples/external-form-navigation-system/).
|
|
55406
55467
|
* @see goNextPageAutomatic
|
|
55407
55468
|
* @see showPrevButton
|
|
55469
|
+
* @see showCompleteButton
|
|
55408
55470
|
*/
|
|
55409
55471
|
get: function () {
|
|
55410
55472
|
return this.getPropertyValue("showNavigationButtons");
|
|
@@ -55425,6 +55487,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
55425
55487
|
/**
|
|
55426
55488
|
* Specifies whether to display the Previous button. Set this property to `false` if respondents should not move backward along the survey.
|
|
55427
55489
|
* @see showNavigationButtons
|
|
55490
|
+
* @see showCompleteButton
|
|
55428
55491
|
*/
|
|
55429
55492
|
get: function () {
|
|
55430
55493
|
return this.getPropertyValue("showPrevButton");
|
|
@@ -55435,6 +55498,21 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
55435
55498
|
enumerable: false,
|
|
55436
55499
|
configurable: true
|
|
55437
55500
|
});
|
|
55501
|
+
Object.defineProperty(SurveyModel.prototype, "showCompleteButton", {
|
|
55502
|
+
/**
|
|
55503
|
+
* Specifies whether to display the Complete button. Set this property to `false` if respondents should not complete the survey.
|
|
55504
|
+
* @see showNavigationButtons
|
|
55505
|
+
* @see showPrevButton
|
|
55506
|
+
*/
|
|
55507
|
+
get: function () {
|
|
55508
|
+
return this.getPropertyValue("showCompleteButton", true);
|
|
55509
|
+
},
|
|
55510
|
+
set: function (val) {
|
|
55511
|
+
this.setPropertyValue("showCompleteButton", val);
|
|
55512
|
+
},
|
|
55513
|
+
enumerable: false,
|
|
55514
|
+
configurable: true
|
|
55515
|
+
});
|
|
55438
55516
|
Object.defineProperty(SurveyModel.prototype, "showTOC", {
|
|
55439
55517
|
/**
|
|
55440
55518
|
* Gets or sets the visibility of the table of contents.
|
|
@@ -58776,7 +58854,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
58776
58854
|
var state = this.state;
|
|
58777
58855
|
return this.isEditMode && (this.state === "running" &&
|
|
58778
58856
|
(this.isLastPage && !this.isShowPreviewBeforeComplete || this.canBeCompletedByTrigger)
|
|
58779
|
-
|| state === "preview");
|
|
58857
|
+
|| state === "preview") && this.showCompleteButton;
|
|
58780
58858
|
};
|
|
58781
58859
|
SurveyModel.prototype.calcIsPreviewButtonVisible = function () {
|
|
58782
58860
|
return (this.isEditMode &&
|
|
@@ -61061,7 +61139,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61061
61139
|
}
|
|
61062
61140
|
this.updateVisibleIndexes();
|
|
61063
61141
|
this.setCalculatedWidthModeUpdater();
|
|
61064
|
-
if (
|
|
61142
|
+
if (this.canFireAddElement()) {
|
|
61065
61143
|
this.onQuestionAdded.fire(this, {
|
|
61066
61144
|
question: question,
|
|
61067
61145
|
name: question.name,
|
|
@@ -61073,6 +61151,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61073
61151
|
});
|
|
61074
61152
|
}
|
|
61075
61153
|
};
|
|
61154
|
+
SurveyModel.prototype.canFireAddElement = function () {
|
|
61155
|
+
return !this.isMovingQuestion || this.isDesignMode && !_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].supportCreatorV2;
|
|
61156
|
+
};
|
|
61076
61157
|
SurveyModel.prototype.questionRemoved = function (question) {
|
|
61077
61158
|
this.questionHashesRemoved(question, question.name, question.getValueName());
|
|
61078
61159
|
this.updateVisibleIndexes();
|
|
@@ -61146,15 +61227,17 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61146
61227
|
}
|
|
61147
61228
|
this.questionHashesPanelAdded(panel);
|
|
61148
61229
|
this.updateVisibleIndexes();
|
|
61149
|
-
this.
|
|
61150
|
-
|
|
61151
|
-
|
|
61152
|
-
|
|
61153
|
-
|
|
61154
|
-
|
|
61155
|
-
|
|
61156
|
-
|
|
61157
|
-
|
|
61230
|
+
if (this.canFireAddElement()) {
|
|
61231
|
+
this.onPanelAdded.fire(this, {
|
|
61232
|
+
panel: panel,
|
|
61233
|
+
name: panel.name,
|
|
61234
|
+
index: index,
|
|
61235
|
+
parent: parentPanel,
|
|
61236
|
+
page: rootPanel,
|
|
61237
|
+
parentPanel: parentPanel,
|
|
61238
|
+
rootPanel: rootPanel,
|
|
61239
|
+
});
|
|
61240
|
+
}
|
|
61158
61241
|
};
|
|
61159
61242
|
SurveyModel.prototype.panelRemoved = function (panel) {
|
|
61160
61243
|
this.updateVisibleIndexes();
|
|
@@ -61883,7 +61966,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61883
61966
|
var containerLayoutElements = [];
|
|
61884
61967
|
for (var _i = 0, _a = this.layoutElements; _i < _a.length; _i++) {
|
|
61885
61968
|
var layoutElement = _a[_i];
|
|
61886
|
-
if (isStrCiEqual(layoutElement.id, "timerpanel")) {
|
|
61969
|
+
if (this.mode !== "display" && isStrCiEqual(layoutElement.id, "timerpanel")) {
|
|
61887
61970
|
if (container === "header") {
|
|
61888
61971
|
if (this.isTimerPanelShowingOnTop && !this.isShowStartingPage) {
|
|
61889
61972
|
containerLayoutElements.push(layoutElement);
|
|
@@ -62783,9 +62866,12 @@ var SurveyTimerModel = /** @class */ (function (_super) {
|
|
|
62783
62866
|
_this.progress = Math.floor((spent + 1) / limit * 100) / 100;
|
|
62784
62867
|
}, 0);
|
|
62785
62868
|
}
|
|
62786
|
-
else if (spent
|
|
62869
|
+
else if (spent <= limit) {
|
|
62787
62870
|
this.progress = Math.floor((spent + 1) / limit * 100) / 100;
|
|
62788
62871
|
}
|
|
62872
|
+
if (this.progress > 1) {
|
|
62873
|
+
this.progress = undefined;
|
|
62874
|
+
}
|
|
62789
62875
|
}
|
|
62790
62876
|
};
|
|
62791
62877
|
SurveyTimerModel.prototype.updateText = function () {
|
|
@@ -64326,12 +64412,13 @@ var CssClassBuilder = /** @class */ (function () {
|
|
|
64326
64412
|
/*!******************************!*\
|
|
64327
64413
|
!*** ./src/utils/devices.ts ***!
|
|
64328
64414
|
\******************************/
|
|
64329
|
-
/*! exports provided: IsMobile, IsTouch, _setIsTouch */
|
|
64415
|
+
/*! exports provided: IsMobile, mouseInfo, IsTouch, _setIsTouch */
|
|
64330
64416
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
64331
64417
|
|
|
64332
64418
|
"use strict";
|
|
64333
64419
|
__webpack_require__.r(__webpack_exports__);
|
|
64334
64420
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsMobile", function() { return IsMobile; });
|
|
64421
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mouseInfo", function() { return mouseInfo; });
|
|
64335
64422
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsTouch", function() { return IsTouch; });
|
|
64336
64423
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_setIsTouch", function() { return _setIsTouch; });
|
|
64337
64424
|
// isMobile
|
|
@@ -64355,12 +64442,18 @@ if (typeof navigator !== "undefined" &&
|
|
|
64355
64442
|
})(vendor);
|
|
64356
64443
|
var _IPad = false;
|
|
64357
64444
|
var IsMobile = _isMobile || _IPad;
|
|
64358
|
-
|
|
64359
|
-
|
|
64360
|
-
|
|
64361
|
-
|
|
64362
|
-
|
|
64363
|
-
|
|
64445
|
+
var mouseInfo = {
|
|
64446
|
+
get isTouch() {
|
|
64447
|
+
return !this.hasMouse && this.hasTouchEvent;
|
|
64448
|
+
},
|
|
64449
|
+
get hasTouchEvent() {
|
|
64450
|
+
return typeof window !== "undefined" && ("ontouchstart" in window || navigator.maxTouchPoints > 0);
|
|
64451
|
+
},
|
|
64452
|
+
hasMouse: true
|
|
64453
|
+
};
|
|
64454
|
+
var pointerMatches = (typeof matchMedia !== "undefined" && !!matchMedia && matchMedia("(pointer:fine)")) || undefined;
|
|
64455
|
+
mouseInfo.hasMouse = !!pointerMatches && !!pointerMatches.matches;
|
|
64456
|
+
var IsTouch = mouseInfo.isTouch;
|
|
64364
64457
|
//for tests
|
|
64365
64458
|
function _setIsTouch(val) {
|
|
64366
64459
|
IsTouch = val;
|
|
@@ -65699,7 +65792,7 @@ var RegexValidator = /** @class */ (function (_super) {
|
|
|
65699
65792
|
if (properties === void 0) { properties = null; }
|
|
65700
65793
|
if (!this.regex || this.isValueEmpty(value))
|
|
65701
65794
|
return null;
|
|
65702
|
-
var re =
|
|
65795
|
+
var re = this.createRegExp();
|
|
65703
65796
|
if (Array.isArray(value)) {
|
|
65704
65797
|
for (var i = 0; i < value.length; i++) {
|
|
65705
65798
|
var res = this.hasError(re, value[i], name);
|
|
@@ -65727,6 +65820,19 @@ var RegexValidator = /** @class */ (function (_super) {
|
|
|
65727
65820
|
enumerable: false,
|
|
65728
65821
|
configurable: true
|
|
65729
65822
|
});
|
|
65823
|
+
Object.defineProperty(RegexValidator.prototype, "insensitive", {
|
|
65824
|
+
get: function () {
|
|
65825
|
+
return this.getPropertyValue("insensitive");
|
|
65826
|
+
},
|
|
65827
|
+
set: function (val) {
|
|
65828
|
+
this.setPropertyValue("insensitive", val);
|
|
65829
|
+
},
|
|
65830
|
+
enumerable: false,
|
|
65831
|
+
configurable: true
|
|
65832
|
+
});
|
|
65833
|
+
RegexValidator.prototype.createRegExp = function () {
|
|
65834
|
+
return new RegExp(this.regex, this.insensitive ? "i" : "");
|
|
65835
|
+
};
|
|
65730
65836
|
return RegexValidator;
|
|
65731
65837
|
}(SurveyValidator));
|
|
65732
65838
|
|
|
@@ -65867,7 +65973,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("textvalidator",
|
|
|
65867
65973
|
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("answercountvalidator", ["minCount:number", "maxCount:number"], function () {
|
|
65868
65974
|
return new AnswerCountValidator();
|
|
65869
65975
|
}, "surveyvalidator");
|
|
65870
|
-
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("regexvalidator", ["regex"], function () {
|
|
65976
|
+
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("regexvalidator", ["regex", { name: "insensitive:boolean", visible: false }], function () {
|
|
65871
65977
|
return new RegexValidator();
|
|
65872
65978
|
}, "surveyvalidator");
|
|
65873
65979
|
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("emailvalidator", [], function () {
|