survey-react 1.9.80 → 1.9.82
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 +246 -159
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +123 -58
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +54 -7
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +351 -223
- package/survey.react.js +1194 -664
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.82
|
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
|
*/
|
@@ -2859,6 +2859,8 @@ var Base = /** @class */ (function () {
|
|
2859
2859
|
this.localizableStrings = {};
|
2860
2860
|
}
|
2861
2861
|
this.localizableStrings[name] = locStr;
|
2862
|
+
var prop = this.getPropertyByName(name);
|
2863
|
+
locStr.disableLocalization = prop && prop.isLocalizable === false;
|
2862
2864
|
return locStr;
|
2863
2865
|
};
|
2864
2866
|
Base.prototype.getLocalizableString = function (name) {
|
@@ -5073,7 +5075,11 @@ var modernCss = {
|
|
5073
5075
|
cleanButtonSvg: "sv-dropdown_clean-button-svg",
|
5074
5076
|
cleanButtonIconId: "icon-clear_16x16",
|
5075
5077
|
controlValue: "sv-dropdown__value",
|
5076
|
-
controlInputFieldComponent: "sv_dropdown_control__input-field-component"
|
5078
|
+
controlInputFieldComponent: "sv_dropdown_control__input-field-component",
|
5079
|
+
itemSmiley: "sv-rating__item-smiley",
|
5080
|
+
itemStar: "sv-rating__item-star",
|
5081
|
+
itemSmileySelected: "sv-rating__item-smiley--selected",
|
5082
|
+
itemStarSelected: "sv-rating__item-star--selected"
|
5077
5083
|
},
|
5078
5084
|
comment: {
|
5079
5085
|
root: "sv-comment",
|
@@ -5382,6 +5388,8 @@ var defaultStandardCss = {
|
|
5382
5388
|
paneldynamic: {
|
5383
5389
|
root: "sv_panel_dynamic",
|
5384
5390
|
title: "sv_p_title",
|
5391
|
+
header: "sv-paneldynamic__header sv_header",
|
5392
|
+
headerTab: "sv-paneldynamic__header-tab",
|
5385
5393
|
button: "",
|
5386
5394
|
buttonAdd: "sv-paneldynamic__add-btn",
|
5387
5395
|
buttonRemove: "sv_p_remove_btn",
|
@@ -5450,10 +5458,15 @@ var defaultStandardCss = {
|
|
5450
5458
|
rating: {
|
5451
5459
|
root: "sv_q_rating",
|
5452
5460
|
item: "sv_q_rating_item",
|
5461
|
+
itemFixedSize: "sv_q_rating_item_fixed",
|
5453
5462
|
selected: "active",
|
5454
5463
|
minText: "sv_q_rating_min_text",
|
5455
5464
|
itemText: "sv_q_rating_item_text",
|
5456
5465
|
maxText: "sv_q_rating_max_text",
|
5466
|
+
itemStar: "sv_q_rating__item-star",
|
5467
|
+
itemStarSelected: "sv_q_rating__item-star--selected",
|
5468
|
+
itemSmiley: "sv_q_rating__item-smiley",
|
5469
|
+
itemSmileySelected: "sv_q_rating__item-smiley--selected",
|
5457
5470
|
},
|
5458
5471
|
text: {
|
5459
5472
|
root: "sv_q_text_root",
|
@@ -5626,6 +5639,8 @@ var defaultV2Css = {
|
|
5626
5639
|
root: "sd-paneldynamic",
|
5627
5640
|
navigation: "sd-paneldynamic__navigation",
|
5628
5641
|
title: "sd-title sd-element__title sd-question__title",
|
5642
|
+
header: "sd-paneldynamic__header sd-element__header",
|
5643
|
+
headerTab: "sd-paneldynamic__header-tab",
|
5629
5644
|
button: "sd-action sd-paneldynamic__btn",
|
5630
5645
|
buttonRemove: "sd-action--negative sd-paneldynamic__remove-btn",
|
5631
5646
|
buttonAdd: "sd-paneldynamic__add-btn",
|
@@ -6005,6 +6020,7 @@ var defaultV2Css = {
|
|
6005
6020
|
itemText: "sd-rating__item-text",
|
6006
6021
|
maxText: "sd-rating__item-text sd-rating__max-text",
|
6007
6022
|
itemDisabled: "sd-rating__item--disabled",
|
6023
|
+
itemFixedSize: "sd-rating__item--fixed-size",
|
6008
6024
|
control: "sd-input sd-dropdown",
|
6009
6025
|
controlValue: "sd-dropdown__value",
|
6010
6026
|
controlDisabled: "sd-input--disabled",
|
@@ -6206,6 +6222,443 @@ var DefaultTitleModel = /** @class */ (function () {
|
|
6206
6222
|
|
6207
6223
|
|
6208
6224
|
|
6225
|
+
/***/ }),
|
6226
|
+
|
6227
|
+
/***/ "./src/drag-drop-helper-v1.ts":
|
6228
|
+
/*!************************************!*\
|
6229
|
+
!*** ./src/drag-drop-helper-v1.ts ***!
|
6230
|
+
\************************************/
|
6231
|
+
/*! exports provided: DragDropInfo */
|
6232
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6233
|
+
|
6234
|
+
"use strict";
|
6235
|
+
__webpack_require__.r(__webpack_exports__);
|
6236
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropInfo", function() { return DragDropInfo; });
|
6237
|
+
var DragDropInfo = /** @class */ (function () {
|
6238
|
+
function DragDropInfo(source, target, nestedPanelDepth) {
|
6239
|
+
if (nestedPanelDepth === void 0) { nestedPanelDepth = -1; }
|
6240
|
+
this.source = source;
|
6241
|
+
this.target = target;
|
6242
|
+
this.nestedPanelDepth = nestedPanelDepth;
|
6243
|
+
}
|
6244
|
+
return DragDropInfo;
|
6245
|
+
}());
|
6246
|
+
|
6247
|
+
|
6248
|
+
|
6249
|
+
/***/ }),
|
6250
|
+
|
6251
|
+
/***/ "./src/drag-drop-page-helper-v1.ts":
|
6252
|
+
/*!*****************************************!*\
|
6253
|
+
!*** ./src/drag-drop-page-helper-v1.ts ***!
|
6254
|
+
\*****************************************/
|
6255
|
+
/*! exports provided: DragDropPageHelperV1 */
|
6256
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6257
|
+
|
6258
|
+
"use strict";
|
6259
|
+
__webpack_require__.r(__webpack_exports__);
|
6260
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropPageHelperV1", function() { return DragDropPageHelperV1; });
|
6261
|
+
/* harmony import */ var _drag_drop_helper_v1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag-drop-helper-v1 */ "./src/drag-drop-helper-v1.ts");
|
6262
|
+
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
6263
|
+
|
6264
|
+
|
6265
|
+
var DragDropPageHelperV1 = /** @class */ (function () {
|
6266
|
+
function DragDropPageHelperV1(page) {
|
6267
|
+
this.page = page;
|
6268
|
+
}
|
6269
|
+
DragDropPageHelperV1.prototype.getDragDropInfo = function () { return this.dragDropInfo; };
|
6270
|
+
DragDropPageHelperV1.prototype.dragDropStart = function (src, target, nestedPanelDepth) {
|
6271
|
+
if (nestedPanelDepth === void 0) { nestedPanelDepth = -1; }
|
6272
|
+
this.dragDropInfo = new _drag_drop_helper_v1__WEBPACK_IMPORTED_MODULE_0__["DragDropInfo"](src, target, nestedPanelDepth);
|
6273
|
+
};
|
6274
|
+
DragDropPageHelperV1.prototype.dragDropMoveTo = function (destination, isBottom, isEdge) {
|
6275
|
+
if (isBottom === void 0) { isBottom = false; }
|
6276
|
+
if (isEdge === void 0) { isEdge = false; }
|
6277
|
+
if (!this.dragDropInfo)
|
6278
|
+
return false;
|
6279
|
+
this.dragDropInfo.destination = destination;
|
6280
|
+
this.dragDropInfo.isBottom = isBottom;
|
6281
|
+
this.dragDropInfo.isEdge = isEdge;
|
6282
|
+
this.correctDragDropInfo(this.dragDropInfo);
|
6283
|
+
if (!this.dragDropCanDropTagert())
|
6284
|
+
return false;
|
6285
|
+
if (!this.dragDropCanDropSource() || !this.dragDropAllowFromSurvey()) {
|
6286
|
+
if (!!this.dragDropInfo.source) {
|
6287
|
+
var row = this.page.dragDropFindRow(this.dragDropInfo.target);
|
6288
|
+
this.page.updateRowsRemoveElementFromRow(this.dragDropInfo.target, row);
|
6289
|
+
}
|
6290
|
+
return false;
|
6291
|
+
}
|
6292
|
+
this.page.dragDropAddTarget(this.dragDropInfo);
|
6293
|
+
return true;
|
6294
|
+
};
|
6295
|
+
DragDropPageHelperV1.prototype.correctDragDropInfo = function (dragDropInfo) {
|
6296
|
+
if (!dragDropInfo.destination)
|
6297
|
+
return;
|
6298
|
+
var panel = dragDropInfo.destination.isPanel
|
6299
|
+
? dragDropInfo.destination
|
6300
|
+
: null;
|
6301
|
+
if (!panel)
|
6302
|
+
return;
|
6303
|
+
if (!dragDropInfo.target.isLayoutTypeSupported(panel.getChildrenLayoutType())) {
|
6304
|
+
dragDropInfo.isEdge = true;
|
6305
|
+
}
|
6306
|
+
};
|
6307
|
+
DragDropPageHelperV1.prototype.dragDropAllowFromSurvey = function () {
|
6308
|
+
var dest = this.dragDropInfo.destination;
|
6309
|
+
if (!dest || !this.page.survey)
|
6310
|
+
return true;
|
6311
|
+
var insertBefore = null;
|
6312
|
+
var insertAfter = null;
|
6313
|
+
var parent = dest.isPage || (!this.dragDropInfo.isEdge && dest.isPanel)
|
6314
|
+
? dest
|
6315
|
+
: dest.parent;
|
6316
|
+
if (!dest.isPage) {
|
6317
|
+
var container = dest.parent;
|
6318
|
+
if (!!container) {
|
6319
|
+
var elements = container.elements;
|
6320
|
+
var index = elements.indexOf(dest);
|
6321
|
+
if (index > -1) {
|
6322
|
+
insertBefore = dest;
|
6323
|
+
insertAfter = dest;
|
6324
|
+
if (this.dragDropInfo.isBottom) {
|
6325
|
+
insertBefore =
|
6326
|
+
index < elements.length - 1 ? elements[index + 1] : null;
|
6327
|
+
}
|
6328
|
+
else {
|
6329
|
+
insertAfter = index > 0 ? elements[index - 1] : null;
|
6330
|
+
}
|
6331
|
+
}
|
6332
|
+
}
|
6333
|
+
}
|
6334
|
+
var options = {
|
6335
|
+
allow: true,
|
6336
|
+
target: this.dragDropInfo.target,
|
6337
|
+
source: this.dragDropInfo.source,
|
6338
|
+
parent: parent,
|
6339
|
+
insertAfter: insertAfter,
|
6340
|
+
insertBefore: insertBefore,
|
6341
|
+
};
|
6342
|
+
return this.page.survey.dragAndDropAllow(options);
|
6343
|
+
};
|
6344
|
+
DragDropPageHelperV1.prototype.dragDropFinish = function (isCancel) {
|
6345
|
+
if (isCancel === void 0) { isCancel = false; }
|
6346
|
+
if (!this.dragDropInfo)
|
6347
|
+
return;
|
6348
|
+
var target = this.dragDropInfo.target;
|
6349
|
+
var src = this.dragDropInfo.source;
|
6350
|
+
var dest = this.dragDropInfo.destination;
|
6351
|
+
var row = this.page.dragDropFindRow(target);
|
6352
|
+
var targetIndex = this.dragDropGetElementIndex(target, row);
|
6353
|
+
this.page.updateRowsRemoveElementFromRow(target, row);
|
6354
|
+
var elementsToSetSWNL = [];
|
6355
|
+
var elementsToResetSWNL = [];
|
6356
|
+
if (!isCancel && !!row) {
|
6357
|
+
var isSamePanel = false;
|
6358
|
+
if (this.page.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].supportCreatorV2) {
|
6359
|
+
var srcRow = src && src.parent && src.parent.dragDropFindRow(src);
|
6360
|
+
if (row.panel.elements[targetIndex] && row.panel.elements[targetIndex].startWithNewLine && row.elements.length > 1 && row.panel.elements[targetIndex] === dest) {
|
6361
|
+
elementsToSetSWNL.push(target);
|
6362
|
+
elementsToResetSWNL.push(row.panel.elements[targetIndex]);
|
6363
|
+
}
|
6364
|
+
if (target.startWithNewLine && row.elements.length > 1 && (!row.panel.elements[targetIndex] || !row.panel.elements[targetIndex].startWithNewLine)) {
|
6365
|
+
elementsToResetSWNL.push(target);
|
6366
|
+
}
|
6367
|
+
if (srcRow && srcRow.elements[0] === src && srcRow.elements[1]) {
|
6368
|
+
elementsToSetSWNL.push(srcRow.elements[1]);
|
6369
|
+
}
|
6370
|
+
if (row.elements.length <= 1) {
|
6371
|
+
elementsToSetSWNL.push(target);
|
6372
|
+
}
|
6373
|
+
if (target.startWithNewLine && row.elements.length > 1 && row.elements[0] !== dest) {
|
6374
|
+
elementsToResetSWNL.push(target);
|
6375
|
+
}
|
6376
|
+
}
|
6377
|
+
if (!!src && !!src.parent) {
|
6378
|
+
this.page.survey.startMovingQuestion();
|
6379
|
+
isSamePanel = row.panel == src.parent;
|
6380
|
+
if (isSamePanel) {
|
6381
|
+
row.panel.dragDropMoveElement(src, target, targetIndex);
|
6382
|
+
targetIndex = -1;
|
6383
|
+
}
|
6384
|
+
else {
|
6385
|
+
src.parent.removeElement(src);
|
6386
|
+
}
|
6387
|
+
}
|
6388
|
+
if (targetIndex > -1) {
|
6389
|
+
row.panel.addElement(target, targetIndex);
|
6390
|
+
}
|
6391
|
+
this.page.survey.stopMovingQuestion();
|
6392
|
+
}
|
6393
|
+
elementsToSetSWNL.map(function (e) { e.startWithNewLine = true; });
|
6394
|
+
elementsToResetSWNL.map(function (e) { e.startWithNewLine = false; });
|
6395
|
+
this.dragDropInfo = null;
|
6396
|
+
return !isCancel ? target : null;
|
6397
|
+
};
|
6398
|
+
DragDropPageHelperV1.prototype.dragDropGetElementIndex = function (target, row) {
|
6399
|
+
if (!row)
|
6400
|
+
return -1;
|
6401
|
+
var index = row.elements.indexOf(target);
|
6402
|
+
if (row.index == 0)
|
6403
|
+
return index;
|
6404
|
+
var prevRow = row.panel.rows[row.index - 1];
|
6405
|
+
var prevElement = prevRow.elements[prevRow.elements.length - 1];
|
6406
|
+
return index + row.panel.elements.indexOf(prevElement) + 1;
|
6407
|
+
};
|
6408
|
+
DragDropPageHelperV1.prototype.dragDropCanDropTagert = function () {
|
6409
|
+
var destination = this.dragDropInfo.destination;
|
6410
|
+
if (!destination || destination.isPage)
|
6411
|
+
return true;
|
6412
|
+
return this.dragDropCanDropCore(this.dragDropInfo.target, destination);
|
6413
|
+
};
|
6414
|
+
DragDropPageHelperV1.prototype.dragDropCanDropSource = function () {
|
6415
|
+
var source = this.dragDropInfo.source;
|
6416
|
+
if (!source)
|
6417
|
+
return true;
|
6418
|
+
var destination = this.dragDropInfo.destination;
|
6419
|
+
if (!this.dragDropCanDropCore(source, destination))
|
6420
|
+
return false;
|
6421
|
+
if (this.page.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].supportCreatorV2) {
|
6422
|
+
var rowSource = this.page.dragDropFindRow(source);
|
6423
|
+
var rowDestination = this.page.dragDropFindRow(destination);
|
6424
|
+
if (rowSource !== rowDestination) {
|
6425
|
+
if (!source.startWithNewLine && destination.startWithNewLine)
|
6426
|
+
return true;
|
6427
|
+
if (source.startWithNewLine && !destination.startWithNewLine) {
|
6428
|
+
return true;
|
6429
|
+
}
|
6430
|
+
}
|
6431
|
+
var row = this.page.dragDropFindRow(destination);
|
6432
|
+
if (row && row.elements.length == 1)
|
6433
|
+
return true;
|
6434
|
+
}
|
6435
|
+
return this.dragDropCanDropNotNext(source, destination, this.dragDropInfo.isEdge, this.dragDropInfo.isBottom);
|
6436
|
+
};
|
6437
|
+
DragDropPageHelperV1.prototype.dragDropCanDropCore = function (target, destination) {
|
6438
|
+
if (!destination)
|
6439
|
+
return true;
|
6440
|
+
if (this.dragDropIsSameElement(destination, target))
|
6441
|
+
return false;
|
6442
|
+
if (target.isPanel) {
|
6443
|
+
var pnl = target;
|
6444
|
+
if (pnl.containsElement(destination) ||
|
6445
|
+
!!pnl.getElementByName(destination.name))
|
6446
|
+
return false;
|
6447
|
+
}
|
6448
|
+
return true;
|
6449
|
+
};
|
6450
|
+
DragDropPageHelperV1.prototype.dragDropCanDropNotNext = function (source, destination, isEdge, isBottom) {
|
6451
|
+
if (!destination || (destination.isPanel && !isEdge))
|
6452
|
+
return true;
|
6453
|
+
if (typeof source.parent === "undefined" || source.parent !== destination.parent)
|
6454
|
+
return true;
|
6455
|
+
var pnl = source.parent;
|
6456
|
+
var srcIndex = pnl.elements.indexOf(source);
|
6457
|
+
var destIndex = pnl.elements.indexOf(destination);
|
6458
|
+
if (destIndex < srcIndex && !isBottom)
|
6459
|
+
destIndex--;
|
6460
|
+
if (isBottom)
|
6461
|
+
destIndex++;
|
6462
|
+
return srcIndex < destIndex
|
6463
|
+
? destIndex - srcIndex > 1
|
6464
|
+
: srcIndex - destIndex > 0;
|
6465
|
+
};
|
6466
|
+
DragDropPageHelperV1.prototype.dragDropIsSameElement = function (el1, el2) {
|
6467
|
+
return el1 == el2 || el1.name == el2.name;
|
6468
|
+
};
|
6469
|
+
return DragDropPageHelperV1;
|
6470
|
+
}());
|
6471
|
+
|
6472
|
+
|
6473
|
+
|
6474
|
+
/***/ }),
|
6475
|
+
|
6476
|
+
/***/ "./src/drag-drop-panel-helper-v1.ts":
|
6477
|
+
/*!******************************************!*\
|
6478
|
+
!*** ./src/drag-drop-panel-helper-v1.ts ***!
|
6479
|
+
\******************************************/
|
6480
|
+
/*! exports provided: DragDropPanelHelperV1 */
|
6481
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
6482
|
+
|
6483
|
+
"use strict";
|
6484
|
+
__webpack_require__.r(__webpack_exports__);
|
6485
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropPanelHelperV1", function() { return DragDropPanelHelperV1; });
|
6486
|
+
/* harmony import */ var _drag_drop_helper_v1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag-drop-helper-v1 */ "./src/drag-drop-helper-v1.ts");
|
6487
|
+
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
6488
|
+
|
6489
|
+
|
6490
|
+
var DragDropPanelHelperV1 = /** @class */ (function () {
|
6491
|
+
function DragDropPanelHelperV1(panel) {
|
6492
|
+
this.panel = panel;
|
6493
|
+
}
|
6494
|
+
DragDropPanelHelperV1.prototype.dragDropAddTarget = function (dragDropInfo) {
|
6495
|
+
var prevRow = this.dragDropFindRow(dragDropInfo.target);
|
6496
|
+
if (this.dragDropAddTargetToRow(dragDropInfo, prevRow)) {
|
6497
|
+
this.panel.updateRowsRemoveElementFromRow(dragDropInfo.target, prevRow);
|
6498
|
+
}
|
6499
|
+
};
|
6500
|
+
DragDropPanelHelperV1.prototype.dragDropFindRow = function (findElement) {
|
6501
|
+
if (!findElement || findElement.isPage)
|
6502
|
+
return null;
|
6503
|
+
var element = findElement;
|
6504
|
+
var rows = this.panel.rows;
|
6505
|
+
for (var i = 0; i < rows.length; i++) {
|
6506
|
+
if (rows[i].elements.indexOf(element) > -1)
|
6507
|
+
return rows[i];
|
6508
|
+
}
|
6509
|
+
for (var i = 0; i < this.panel.elements.length; i++) {
|
6510
|
+
var pnl = this.panel.elements[i].getPanel();
|
6511
|
+
if (!pnl)
|
6512
|
+
continue;
|
6513
|
+
var row = pnl.dragDropFindRow(element);
|
6514
|
+
if (!!row)
|
6515
|
+
return row;
|
6516
|
+
}
|
6517
|
+
return null;
|
6518
|
+
};
|
6519
|
+
DragDropPanelHelperV1.prototype.dragDropMoveElement = function (src, target, targetIndex) {
|
6520
|
+
var srcIndex = src.parent.elements.indexOf(src);
|
6521
|
+
if (targetIndex > srcIndex) {
|
6522
|
+
targetIndex--;
|
6523
|
+
}
|
6524
|
+
this.panel.removeElement(src);
|
6525
|
+
this.panel.addElement(target, targetIndex);
|
6526
|
+
};
|
6527
|
+
DragDropPanelHelperV1.prototype.updateRowsOnElementAdded = function (element, index, dragDropInfo, thisElement) {
|
6528
|
+
if (!dragDropInfo) {
|
6529
|
+
dragDropInfo = new _drag_drop_helper_v1__WEBPACK_IMPORTED_MODULE_0__["DragDropInfo"](null, element);
|
6530
|
+
dragDropInfo.target = element;
|
6531
|
+
dragDropInfo.isEdge = this.panel.elements.length > 1;
|
6532
|
+
if (this.panel.elements.length < 2) {
|
6533
|
+
dragDropInfo.destination = thisElement;
|
6534
|
+
}
|
6535
|
+
else {
|
6536
|
+
dragDropInfo.isBottom = index > 0;
|
6537
|
+
if (index == 0) {
|
6538
|
+
dragDropInfo.destination = this.panel.elements[1];
|
6539
|
+
}
|
6540
|
+
else {
|
6541
|
+
dragDropInfo.destination = this.panel.elements[index - 1];
|
6542
|
+
}
|
6543
|
+
}
|
6544
|
+
}
|
6545
|
+
this.dragDropAddTargetToRow(dragDropInfo, null);
|
6546
|
+
};
|
6547
|
+
DragDropPanelHelperV1.prototype.dragDropAddTargetToRow = function (dragDropInfo, prevRow) {
|
6548
|
+
if (!dragDropInfo.destination)
|
6549
|
+
return true;
|
6550
|
+
if (this.dragDropAddTargetToEmptyPanel(dragDropInfo))
|
6551
|
+
return true;
|
6552
|
+
var dest = dragDropInfo.destination;
|
6553
|
+
var destRow = this.dragDropFindRow(dest);
|
6554
|
+
if (!destRow)
|
6555
|
+
return true;
|
6556
|
+
if (_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].supportCreatorV2 && this.panel.isDesignMode) {
|
6557
|
+
if (destRow.elements.length > 1)
|
6558
|
+
return this.dragDropAddTargetToExistingRow(dragDropInfo, destRow, prevRow);
|
6559
|
+
else
|
6560
|
+
return this.dragDropAddTargetToNewRow(dragDropInfo, destRow, prevRow);
|
6561
|
+
}
|
6562
|
+
if (!dragDropInfo.target.startWithNewLine)
|
6563
|
+
return this.dragDropAddTargetToExistingRow(dragDropInfo, destRow, prevRow);
|
6564
|
+
return this.dragDropAddTargetToNewRow(dragDropInfo, destRow, prevRow);
|
6565
|
+
};
|
6566
|
+
DragDropPanelHelperV1.prototype.dragDropAddTargetToEmptyPanel = function (dragDropInfo) {
|
6567
|
+
if (dragDropInfo.destination.isPage) {
|
6568
|
+
this.dragDropAddTargetToEmptyPanelCore(this.panel.root, dragDropInfo.target, dragDropInfo.isBottom);
|
6569
|
+
return true;
|
6570
|
+
}
|
6571
|
+
var dest = dragDropInfo.destination;
|
6572
|
+
if (dest.isPanel && !dragDropInfo.isEdge) {
|
6573
|
+
var panel = dest;
|
6574
|
+
if (dragDropInfo.target["template"] === dest) {
|
6575
|
+
return false;
|
6576
|
+
}
|
6577
|
+
if (dragDropInfo.nestedPanelDepth < 0 ||
|
6578
|
+
dragDropInfo.nestedPanelDepth >= panel.depth) {
|
6579
|
+
this.dragDropAddTargetToEmptyPanelCore(dest, dragDropInfo.target, dragDropInfo.isBottom);
|
6580
|
+
return true;
|
6581
|
+
}
|
6582
|
+
}
|
6583
|
+
return false;
|
6584
|
+
};
|
6585
|
+
DragDropPanelHelperV1.prototype.dragDropAddTargetToExistingRow = function (dragDropInfo, destRow, prevRow) {
|
6586
|
+
var index = destRow.elements.indexOf(dragDropInfo.destination);
|
6587
|
+
if (index == 0 &&
|
6588
|
+
!dragDropInfo.isBottom) {
|
6589
|
+
if (this.panel.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].supportCreatorV2) {
|
6590
|
+
}
|
6591
|
+
else if (destRow.elements[0].startWithNewLine) {
|
6592
|
+
if (destRow.index > 0) {
|
6593
|
+
dragDropInfo.isBottom = true;
|
6594
|
+
destRow = destRow.panel.rows[destRow.index - 1];
|
6595
|
+
dragDropInfo.destination =
|
6596
|
+
destRow.elements[destRow.elements.length - 1];
|
6597
|
+
return this.dragDropAddTargetToExistingRow(dragDropInfo, destRow, prevRow);
|
6598
|
+
}
|
6599
|
+
else {
|
6600
|
+
return this.dragDropAddTargetToNewRow(dragDropInfo, destRow, prevRow);
|
6601
|
+
}
|
6602
|
+
}
|
6603
|
+
}
|
6604
|
+
var prevRowIndex = -1;
|
6605
|
+
if (prevRow == destRow) {
|
6606
|
+
prevRowIndex = destRow.elements.indexOf(dragDropInfo.target);
|
6607
|
+
}
|
6608
|
+
if (dragDropInfo.isBottom)
|
6609
|
+
index++;
|
6610
|
+
var srcRow = this.panel.findRowByElement(dragDropInfo.source);
|
6611
|
+
if (srcRow == destRow &&
|
6612
|
+
srcRow.elements.indexOf(dragDropInfo.source) == index)
|
6613
|
+
return false;
|
6614
|
+
if (index == prevRowIndex)
|
6615
|
+
return false;
|
6616
|
+
if (prevRowIndex > -1) {
|
6617
|
+
destRow.elements.splice(prevRowIndex, 1);
|
6618
|
+
if (prevRowIndex < index)
|
6619
|
+
index--;
|
6620
|
+
}
|
6621
|
+
destRow.elements.splice(index, 0, dragDropInfo.target);
|
6622
|
+
destRow.updateVisible();
|
6623
|
+
return prevRowIndex < 0;
|
6624
|
+
};
|
6625
|
+
DragDropPanelHelperV1.prototype.dragDropAddTargetToNewRow = function (dragDropInfo, destRow, prevRow) {
|
6626
|
+
var targetRow = destRow.panel.createRowAndSetLazy(destRow.panel.rows.length);
|
6627
|
+
if (this.panel.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].supportCreatorV2) {
|
6628
|
+
targetRow.setIsLazyRendering(false);
|
6629
|
+
}
|
6630
|
+
targetRow.addElement(dragDropInfo.target);
|
6631
|
+
var index = destRow.index;
|
6632
|
+
if (dragDropInfo.isBottom) {
|
6633
|
+
index++;
|
6634
|
+
}
|
6635
|
+
//same row
|
6636
|
+
if (!!prevRow && prevRow.panel == targetRow.panel && prevRow.index == index)
|
6637
|
+
return false;
|
6638
|
+
var srcRow = this.panel.findRowByElement(dragDropInfo.source);
|
6639
|
+
if (!!srcRow &&
|
6640
|
+
srcRow.panel == targetRow.panel &&
|
6641
|
+
srcRow.elements.length == 1 &&
|
6642
|
+
srcRow.index == index)
|
6643
|
+
return false;
|
6644
|
+
destRow.panel.rows.splice(index, 0, targetRow);
|
6645
|
+
return true;
|
6646
|
+
};
|
6647
|
+
DragDropPanelHelperV1.prototype.dragDropAddTargetToEmptyPanelCore = function (panel, target, isBottom) {
|
6648
|
+
var targetRow = panel.createRow();
|
6649
|
+
targetRow.addElement(target);
|
6650
|
+
if (panel.elements.length == 0 || isBottom) {
|
6651
|
+
panel.rows.push(targetRow);
|
6652
|
+
}
|
6653
|
+
else {
|
6654
|
+
panel.rows.splice(0, 0, targetRow);
|
6655
|
+
}
|
6656
|
+
};
|
6657
|
+
return DragDropPanelHelperV1;
|
6658
|
+
}());
|
6659
|
+
|
6660
|
+
|
6661
|
+
|
6209
6662
|
/***/ }),
|
6210
6663
|
|
6211
6664
|
/***/ "./src/dragdrop/choices.ts":
|
@@ -6289,7 +6742,7 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
6289
6742
|
};
|
6290
6743
|
DragDropChoices.prototype.createImagePickerShortcut = function (item, text, draggedElementNode, event) {
|
6291
6744
|
var draggedElementShortcut = document.createElement("div");
|
6292
|
-
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 1000;\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);\n padding: 4px;\n border-radius: 4px;\n background: white;\n ";
|
6745
|
+
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 1000;\n filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.1));\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);\n padding: 4px;\n border-radius: 4px;\n background: white;\n ";
|
6293
6746
|
var itemValueNode = draggedElementNode.closest("[data-sv-drop-target-item-value]");
|
6294
6747
|
var controlsNode = itemValueNode.querySelector(".svc-image-item-value-controls");
|
6295
6748
|
var imageContainerNode = itemValueNode.querySelector(".sd-imagepicker__image-container");
|
@@ -6874,7 +7327,7 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
|
|
6874
7327
|
var row = (draggedElementNode
|
6875
7328
|
.closest("[data-sv-drop-target-matrix-row]"));
|
6876
7329
|
var clone = (row.cloneNode(isDeepClone));
|
6877
|
-
clone.style.cssText = "\n box-shadow: rgb(0 0 0 / 10%) 0px 8px 16px;\n background-color: white;\n display: flex;\n flex-grow: 0;\n flex-shrink: 0;\n align-items: center;\n line-height: 0;\n width: " + row.offsetWidth + "px;\n ";
|
7330
|
+
clone.style.cssText = "\n filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.1));\n box-shadow: rgb(0 0 0 / 10%) 0px 8px 16px;\n background-color: white;\n display: flex;\n flex-grow: 0;\n flex-shrink: 0;\n align-items: center;\n line-height: 0;\n width: " + row.offsetWidth + "px;\n ";
|
6878
7331
|
clone.classList.remove("sv-matrix__drag-drop--moveup");
|
6879
7332
|
clone.classList.remove("sv-matrix__drag-drop--movedown");
|
6880
7333
|
this.draggedElement.isDragDropMoveDown = false;
|
@@ -7041,7 +7494,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7041
7494
|
DragDropRankingChoices.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
|
7042
7495
|
var draggedElementShortcut = document.createElement("div");
|
7043
7496
|
draggedElementShortcut.className = this.shortcutClass + " sv-ranking-shortcut";
|
7044
|
-
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 1000;\n border-radius: 36px;\n min-width: 100px;\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);\n background-color: var(--background, white);\n font-family: var(--font-family, $font-family);\n ";
|
7497
|
+
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 1000;\n border-radius: 36px;\n min-width: 100px;\n filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, 0.1));\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);\n background-color: var(--background, white);\n font-family: var(--font-family, $font-family);\n ";
|
7045
7498
|
var isDeepClone = true;
|
7046
7499
|
var clone = draggedElementNode.cloneNode(isDeepClone);
|
7047
7500
|
draggedElementShortcut.appendChild(clone);
|
@@ -7257,6 +7710,18 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
|
|
7257
7710
|
new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]().toObject(json, newElement);
|
7258
7711
|
return newElement;
|
7259
7712
|
};
|
7713
|
+
DragDropSurveyElements.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
|
7714
|
+
var ghostRow = dragOverNode.closest(".svc-row--ghost");
|
7715
|
+
if (!!ghostRow) {
|
7716
|
+
var ghostDataAttrSelector = "[data-sv-drop-target-survey-element='sv-drag-drop-ghost-survey-element-name']";
|
7717
|
+
var ghostNode = dragOverNode.closest(ghostDataAttrSelector) || dragOverNode.querySelector(ghostDataAttrSelector);
|
7718
|
+
if (!!ghostNode) {
|
7719
|
+
return ghostNode;
|
7720
|
+
}
|
7721
|
+
}
|
7722
|
+
var dropTargetNode = dragOverNode.closest(this.dropTargetDataAttributeName);
|
7723
|
+
return dropTargetNode;
|
7724
|
+
};
|
7260
7725
|
DragDropSurveyElements.prototype.getDropTargetByDataAttributeValue = function (dataAttributeValue, dropTargetNode, event) {
|
7261
7726
|
this.isEdge = this.calculateIsEdge(dropTargetNode, event.clientY);
|
7262
7727
|
if (!dataAttributeValue) {
|
@@ -7714,6 +8179,9 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7714
8179
|
this.listModel.resetFocusedItem();
|
7715
8180
|
if (this.question.selectedItem && this.question.selectedItem.text.indexOf(newValue) >= 0) {
|
7716
8181
|
this.listModel.focusedItem = this.getAvailableItems().filter(function (item) { return item.id == _this.question.selectedItem.value; })[0];
|
8182
|
+
if (this.listModel.filterString) {
|
8183
|
+
this.listModel.actions.map(function (a) { return a.selectedValue = false; });
|
8184
|
+
}
|
7717
8185
|
return;
|
7718
8186
|
}
|
7719
8187
|
if (!this.listModel.focusedItem || !this.listModel.isItemVisible(this.listModel.focusedItem)) {
|
@@ -7728,6 +8196,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7728
8196
|
};
|
7729
8197
|
DropdownListModel.prototype.onHidePopup = function () {
|
7730
8198
|
this.resetFilterString();
|
8199
|
+
this.question.suggestedItem = null;
|
7731
8200
|
this.listModel.refresh();
|
7732
8201
|
};
|
7733
8202
|
DropdownListModel.prototype.getAvailableItems = function () {
|
@@ -7870,7 +8339,8 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7870
8339
|
});
|
7871
8340
|
Object.defineProperty(DropdownListModel.prototype, "showHintString", {
|
7872
8341
|
get: function () {
|
7873
|
-
return !!this.question.searchEnabled && this.hintStringLC && this.hintStringLC.indexOf(this.inputStringLC) >= 0
|
8342
|
+
return !!this.question.searchEnabled && this.hintStringLC && this.hintStringLC.indexOf(this.inputStringLC) >= 0 ||
|
8343
|
+
!this.question.searchEnabled && this.hintStringLC && !this.question.value;
|
7874
8344
|
},
|
7875
8345
|
enumerable: false,
|
7876
8346
|
configurable: true
|
@@ -7920,6 +8390,8 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7920
8390
|
};
|
7921
8391
|
DropdownListModel.prototype.onClick = function (event) {
|
7922
8392
|
this._popupModel.toggleVisibility();
|
8393
|
+
if (this._popupModel.isVisible && this.question.value && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"])
|
8394
|
+
this.changeSelectionWithKeyboard(false);
|
7923
8395
|
if (this.searchEnabled && !!event && !!event.target) {
|
7924
8396
|
var input = event.target.querySelector("input");
|
7925
8397
|
if (!!input) {
|
@@ -7942,14 +8414,20 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7942
8414
|
};
|
7943
8415
|
DropdownListModel.prototype.changeSelectionWithKeyboard = function (reverse) {
|
7944
8416
|
var _a;
|
8417
|
+
var focusedItem = this.listModel.focusedItem;
|
7945
8418
|
if (reverse) {
|
7946
8419
|
this.listModel.focusPrevVisibleItem();
|
7947
8420
|
}
|
7948
8421
|
else {
|
7949
8422
|
this.listModel.focusNextVisibleItem();
|
7950
8423
|
}
|
8424
|
+
if (this.question.value && focusedItem && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"]) {
|
8425
|
+
focusedItem.selectedValue = false;
|
8426
|
+
this.listModel.focusedItem.selectedValue = !this.listModel.filterString;
|
8427
|
+
this.question.suggestedItem = this.listModel.focusedItem;
|
8428
|
+
}
|
7951
8429
|
this.scrollToFocusedItem();
|
7952
|
-
if (this.question.value && this.question.searchEnabled && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"]) {
|
8430
|
+
if (this.question.value && !this.listModel.filterString && this.question.searchEnabled && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"]) {
|
7953
8431
|
this.applyInputString(this.listModel.focusedItem);
|
7954
8432
|
}
|
7955
8433
|
else {
|
@@ -7982,10 +8460,12 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7982
8460
|
if (event.keyCode === 13 && this.question.searchEnabled && !this.inputString && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"] && !this._markdownMode && this.question.value) {
|
7983
8461
|
this._popupModel.isVisible = false;
|
7984
8462
|
this.onClear(event);
|
8463
|
+
this.question.survey.questionEditFinishCallback(this.question, event);
|
7985
8464
|
}
|
7986
8465
|
else {
|
7987
8466
|
this.listModel.selectFocusedItem();
|
7988
8467
|
this.onFocus(event);
|
8468
|
+
this.question.survey.questionEditFinishCallback(this.question, event);
|
7989
8469
|
}
|
7990
8470
|
event.preventDefault();
|
7991
8471
|
event.stopPropagation();
|
@@ -8203,6 +8683,10 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
|
|
8203
8683
|
}
|
8204
8684
|
return new _multiSelectListModel__WEBPACK_IMPORTED_MODULE_3__["MultiSelectListModel"](visibleItems, _onSelectionChanged, false, undefined, undefined, this.listElementId);
|
8205
8685
|
};
|
8686
|
+
DropdownMultiSelectListModel.prototype.resetFilterString = function () {
|
8687
|
+
_super.prototype.resetFilterString.call(this);
|
8688
|
+
this.inputString = null;
|
8689
|
+
};
|
8206
8690
|
Object.defineProperty(DropdownMultiSelectListModel.prototype, "shouldResetAfterCancel", {
|
8207
8691
|
get: function () {
|
8208
8692
|
return _utils_devices__WEBPACK_IMPORTED_MODULE_5__["IsTouch"] && !this.closeOnSelect;
|
@@ -8604,7 +9088,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
8604
9088
|
/*!*************************************!*\
|
8605
9089
|
!*** ./src/entries/chunks/model.ts ***!
|
8606
9090
|
\*************************************/
|
8607
|
-
/*! exports provided: Version, checkLibraryVersion, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, QuestionMultipleTextModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryNavigateToPage, createTOCListModel, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropSurveyElements, DragDropChoices */
|
9091
|
+
/*! exports provided: Version, checkLibraryVersion, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, QuestionMultipleTextModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryNavigateToPage, createTOCListModel, getTocRootCss, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropSurveyElements, DragDropChoices */
|
8608
9092
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
8609
9093
|
|
8610
9094
|
"use strict";
|
@@ -8899,6 +9383,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
8899
9383
|
|
8900
9384
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTOCListModel", function() { return _surveyToc__WEBPACK_IMPORTED_MODULE_55__["createTOCListModel"]; });
|
8901
9385
|
|
9386
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTocRootCss", function() { return _surveyToc__WEBPACK_IMPORTED_MODULE_55__["getTocRootCss"]; });
|
9387
|
+
|
8902
9388
|
/* harmony import */ var _surveyProgress__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ../../surveyProgress */ "./src/surveyProgress.ts");
|
8903
9389
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressModel", function() { return _surveyProgress__WEBPACK_IMPORTED_MODULE_56__["SurveyProgressModel"]; });
|
8904
9390
|
|
@@ -9046,7 +9532,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
9046
9532
|
// import "../../main.scss";
|
9047
9533
|
//import "../../modern.scss";
|
9048
9534
|
var Version;
|
9049
|
-
Version = "" + "1.9.
|
9535
|
+
Version = "" + "1.9.82";
|
9050
9536
|
function checkLibraryVersion(ver, libraryName) {
|
9051
9537
|
if (Version != ver) {
|
9052
9538
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -9151,7 +9637,7 @@ function checkLibraryVersion(ver, libraryName) {
|
|
9151
9637
|
/*!**************************************!*\
|
9152
9638
|
!*** ./src/entries/core-wo-model.ts ***!
|
9153
9639
|
\**************************************/
|
9154
|
-
/*! exports provided: Version, checkLibraryVersion, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, QuestionMultipleTextModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryNavigateToPage, createTOCListModel, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropSurveyElements, DragDropChoices, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, createDropdownActionModel, createDropdownActionModelAdvanced, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper */
|
9640
|
+
/*! exports provided: Version, checkLibraryVersion, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, QuestionMultipleTextModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryNavigateToPage, createTOCListModel, getTocRootCss, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropSurveyElements, DragDropChoices, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, createDropdownActionModel, createDropdownActionModelAdvanced, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper */
|
9155
9641
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
9156
9642
|
|
9157
9643
|
"use strict";
|
@@ -9393,6 +9879,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9393
9879
|
|
9394
9880
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTOCListModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["createTOCListModel"]; });
|
9395
9881
|
|
9882
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTocRootCss", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["getTocRootCss"]; });
|
9883
|
+
|
9396
9884
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyProgressModel"]; });
|
9397
9885
|
|
9398
9886
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressButtonsModel", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["SurveyProgressButtonsModel"]; });
|
@@ -9582,7 +10070,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
9582
10070
|
/*!*****************************!*\
|
9583
10071
|
!*** ./src/entries/core.ts ***!
|
9584
10072
|
\*****************************/
|
9585
|
-
/*! exports provided: Version, checkLibraryVersion, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, QuestionMultipleTextModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryNavigateToPage, createTOCListModel, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropSurveyElements, DragDropChoices, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, createDropdownActionModel, createDropdownActionModelAdvanced, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper, Model */
|
10073
|
+
/*! exports provided: Version, checkLibraryVersion, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, QuestionMultipleTextModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryNavigateToPage, createTOCListModel, getTocRootCss, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropSurveyElements, DragDropChoices, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, createDropdownActionModel, createDropdownActionModelAdvanced, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper, Model */
|
9586
10074
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
9587
10075
|
|
9588
10076
|
"use strict";
|
@@ -9824,6 +10312,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9824
10312
|
|
9825
10313
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTOCListModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["createTOCListModel"]; });
|
9826
10314
|
|
10315
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTocRootCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["getTocRootCss"]; });
|
10316
|
+
|
9827
10317
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyProgressModel"]; });
|
9828
10318
|
|
9829
10319
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressButtonsModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["SurveyProgressButtonsModel"]; });
|
@@ -10373,7 +10863,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
10373
10863
|
/*!******************************!*\
|
10374
10864
|
!*** ./src/entries/react.ts ***!
|
10375
10865
|
\******************************/
|
10376
|
-
/*! exports provided: Version, checkLibraryVersion, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, QuestionMultipleTextModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryNavigateToPage, createTOCListModel, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropSurveyElements, DragDropChoices, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, createDropdownActionModel, createDropdownActionModelAdvanced, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper, Model, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, RatingItem, RatingItemStar, RatingItemSmiley, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionHtml, SurveyQuestionFile, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, SurveyLocStringViewer, SurveyLocStringEditor */
|
10866
|
+
/*! exports provided: Version, checkLibraryVersion, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, QuestionMultipleTextModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryNavigateToPage, createTOCListModel, getTocRootCss, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropSurveyElements, DragDropChoices, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, createDropdownActionModel, createDropdownActionModelAdvanced, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, TooltipManager, DragOrClickHelper, Model, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, RatingItem, RatingItemStar, RatingItemSmiley, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionHtml, SurveyQuestionFile, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, SurveyLocStringViewer, SurveyLocStringEditor */
|
10377
10867
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10378
10868
|
|
10379
10869
|
"use strict";
|
@@ -10615,6 +11105,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
10615
11105
|
|
10616
11106
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTOCListModel", function() { return _core__WEBPACK_IMPORTED_MODULE_0__["createTOCListModel"]; });
|
10617
11107
|
|
11108
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTocRootCss", function() { return _core__WEBPACK_IMPORTED_MODULE_0__["getTocRootCss"]; });
|
11109
|
+
|
10618
11110
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressModel", function() { return _core__WEBPACK_IMPORTED_MODULE_0__["SurveyProgressModel"]; });
|
10619
11111
|
|
10620
11112
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressButtonsModel", function() { return _core__WEBPACK_IMPORTED_MODULE_0__["SurveyProgressButtonsModel"]; });
|
@@ -17538,13 +18030,6 @@ var JsonObjectProperty = /** @class */ (function () {
|
|
17538
18030
|
return objType;
|
17539
18031
|
return objType.replace(this.classNamePart, "");
|
17540
18032
|
};
|
17541
|
-
JsonObjectProperty.prototype.getClassName = function (className) {
|
17542
|
-
if (className)
|
17543
|
-
className = className.toLowerCase();
|
17544
|
-
return this.classNamePart && className.indexOf(this.classNamePart) < 0
|
17545
|
-
? className + this.classNamePart
|
17546
|
-
: className;
|
17547
|
-
};
|
17548
18033
|
Object.defineProperty(JsonObjectProperty.prototype, "choices", {
|
17549
18034
|
/**
|
17550
18035
|
* Depricated, please use getChoices
|
@@ -18868,17 +19353,27 @@ var JsonObject = /** @class */ (function () {
|
|
18868
19353
|
};
|
18869
19354
|
JsonObject.prototype.createNewObj = function (value, property) {
|
18870
19355
|
var result = { newObj: null, error: null };
|
18871
|
-
var className = value
|
18872
|
-
if (!className && property != null && property.className) {
|
18873
|
-
className = property.className;
|
18874
|
-
}
|
18875
|
-
className = property.getClassName(className);
|
19356
|
+
var className = this.getClassNameForNewObj(value, property);
|
18876
19357
|
result.newObj = className
|
18877
19358
|
? JsonObject.metaData.createClass(className, value)
|
18878
19359
|
: null;
|
18879
19360
|
result.error = this.checkNewObjectOnErrors(result.newObj, value, property, className);
|
18880
19361
|
return result;
|
18881
19362
|
};
|
19363
|
+
JsonObject.prototype.getClassNameForNewObj = function (value, property) {
|
19364
|
+
var res = property != null && property.className ? property.className : undefined;
|
19365
|
+
if (!res) {
|
19366
|
+
res = value[JsonObject.typePropertyName];
|
19367
|
+
}
|
19368
|
+
if (!res)
|
19369
|
+
return res;
|
19370
|
+
res = res.toLowerCase();
|
19371
|
+
var classNamePart = property.classNamePart;
|
19372
|
+
if (classNamePart && res.indexOf(classNamePart) < 0) {
|
19373
|
+
res += classNamePart;
|
19374
|
+
}
|
19375
|
+
return res;
|
19376
|
+
};
|
18882
19377
|
JsonObject.prototype.checkNewObjectOnErrors = function (newObj, value, property, className) {
|
18883
19378
|
var error = null;
|
18884
19379
|
if (newObj) {
|
@@ -19044,7 +19539,7 @@ var ListModel = /** @class */ (function (_super) {
|
|
19044
19539
|
_this.onFilterStringChangedCallback = onFilterStringChangedCallback;
|
19045
19540
|
_this.elementId = elementId;
|
19046
19541
|
_this.onItemClick = function (itemValue) {
|
19047
|
-
if (_this.isItemDisabled(itemValue)
|
19542
|
+
if (_this.isItemDisabled(itemValue)) {
|
19048
19543
|
return;
|
19049
19544
|
}
|
19050
19545
|
_this.isExpanded = false;
|
@@ -19546,6 +20041,9 @@ var LocalizableString = /** @class */ (function () {
|
|
19546
20041
|
return res;
|
19547
20042
|
};
|
19548
20043
|
LocalizableString.prototype.setLocaleText = function (loc, value) {
|
20044
|
+
if (this.disableLocalization) {
|
20045
|
+
loc = _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].defaultLocaleName;
|
20046
|
+
}
|
19549
20047
|
if (!this.storeDefaultText && value == this.getLocaleTextWithDefault(loc)) {
|
19550
20048
|
if (!!value || !!loc && loc !== this.defaultLoc)
|
19551
20049
|
return;
|
@@ -19553,7 +20051,7 @@ var LocalizableString = /** @class */ (function () {
|
|
19553
20051
|
var oldValue_1 = this.getValue(dl);
|
19554
20052
|
if (!!dl && !!oldValue_1) {
|
19555
20053
|
this.setValue(dl, value);
|
19556
|
-
this.fireStrChanged(
|
20054
|
+
this.fireStrChanged(dl, oldValue_1);
|
19557
20055
|
}
|
19558
20056
|
return;
|
19559
20057
|
}
|
@@ -19564,11 +20062,9 @@ var LocalizableString = /** @class */ (function () {
|
|
19564
20062
|
!this.getValue(loc) &&
|
19565
20063
|
value == this.getLocaleText(this.defaultLoc))
|
19566
20064
|
return;
|
19567
|
-
var curLoc = this.
|
20065
|
+
var curLoc = this.curLocale;
|
19568
20066
|
if (!loc)
|
19569
20067
|
loc = this.defaultLoc;
|
19570
|
-
if (!curLoc)
|
19571
|
-
curLoc = this.defaultLoc;
|
19572
20068
|
var oldValue = this.onStrChanged && loc === curLoc ? this.pureText : undefined;
|
19573
20069
|
delete this.htmlValues[loc];
|
19574
20070
|
if (!value) {
|
@@ -19588,8 +20084,15 @@ var LocalizableString = /** @class */ (function () {
|
|
19588
20084
|
}
|
19589
20085
|
}
|
19590
20086
|
}
|
19591
|
-
this.fireStrChanged(
|
20087
|
+
this.fireStrChanged(loc, oldValue);
|
19592
20088
|
};
|
20089
|
+
Object.defineProperty(LocalizableString.prototype, "curLocale", {
|
20090
|
+
get: function () {
|
20091
|
+
return !!this.locale ? this.locale : this.defaultLoc;
|
20092
|
+
},
|
20093
|
+
enumerable: false,
|
20094
|
+
configurable: true
|
20095
|
+
});
|
19593
20096
|
LocalizableString.prototype.canRemoveLocValue = function (loc, val) {
|
19594
20097
|
if (_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].storeDuplicatedTranslations)
|
19595
20098
|
return false;
|
@@ -19606,9 +20109,12 @@ var LocalizableString = /** @class */ (function () {
|
|
19606
20109
|
return val == this.getLocaleText(this.defaultLoc);
|
19607
20110
|
}
|
19608
20111
|
};
|
19609
|
-
LocalizableString.prototype.fireStrChanged = function (
|
20112
|
+
LocalizableString.prototype.fireStrChanged = function (loc, oldValue) {
|
19610
20113
|
this.strChanged();
|
19611
|
-
if (
|
20114
|
+
if (!this.onStrChanged)
|
20115
|
+
return;
|
20116
|
+
var value = this.pureText;
|
20117
|
+
if (loc !== this.curLocale || oldValue !== value) {
|
19612
20118
|
this.onStrChanged(oldValue, value);
|
19613
20119
|
}
|
19614
20120
|
};
|
@@ -19728,6 +20234,8 @@ var LocalizableString = /** @class */ (function () {
|
|
19728
20234
|
return this.htmlValues[loc];
|
19729
20235
|
};
|
19730
20236
|
LocalizableString.prototype.deleteValuesEqualsToDefault = function (defaultValue) {
|
20237
|
+
if (_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].storeDuplicatedTranslations)
|
20238
|
+
return;
|
19731
20239
|
var keys = this.getValuesKeys();
|
19732
20240
|
for (var i = 0; i < keys.length; i++) {
|
19733
20241
|
if (keys[i] == this.defaultLoc)
|
@@ -20783,6 +21291,7 @@ var englishStrings = {
|
|
20783
21291
|
progressText: "Page {0} of {1}",
|
20784
21292
|
indexText: "{0} of {1}",
|
20785
21293
|
panelDynamicProgressText: "{0} of {1}",
|
21294
|
+
panelDynamicTabTextFormat: "Panel {0}",
|
20786
21295
|
questionsProgressText: "Answered {0}/{1} questions",
|
20787
21296
|
emptySurvey: "The survey doesn't contain visible pages or questions.",
|
20788
21297
|
completingSurvey: "Thank you for completing the survey",
|
@@ -21390,12 +21899,12 @@ var germanSurveyStrings = {
|
|
21390
21899
|
confirmRemoveFile: "Sind Sie sicher, dass Sie diese Datei löschen möchten: {0}?",
|
21391
21900
|
confirmRemoveAllFiles: "Sind Sie sicher, dass Sie alle Dateien löschen möchten?",
|
21392
21901
|
questionTitlePatternText: "Fragentitel",
|
21393
|
-
modalCancelButtonText: "
|
21902
|
+
modalCancelButtonText: "Abbrechen",
|
21394
21903
|
modalApplyButtonText: "Anwenden",
|
21395
21904
|
filterStringPlaceholder: "Tippe um zu suchen...",
|
21396
|
-
|
21905
|
+
emptyMessage: "Es gibt noch keine Daten.",
|
21397
21906
|
noEntriesText: "Es gibt noch keine Einträge.\nKlicken Sie auf die Schaltfläche unten, um einen neuen Eintrag hinzuzufügen.",
|
21398
|
-
|
21907
|
+
more: "Mehr"
|
21399
21908
|
};
|
21400
21909
|
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["de"] = germanSurveyStrings;
|
21401
21910
|
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["de"] = "deutsch";
|
@@ -25800,7 +26309,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
25800
26309
|
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
|
25801
26310
|
/* harmony import */ var _panel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./panel */ "./src/panel.ts");
|
25802
26311
|
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
25803
|
-
/* harmony import */ var
|
26312
|
+
/* harmony import */ var _drag_drop_page_helper_v1__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./drag-drop-page-helper-v1 */ "./src/drag-drop-page-helper-v1.ts");
|
25804
26313
|
var __extends = (undefined && undefined.__extends) || (function () {
|
25805
26314
|
var extendStatics = function (d, b) {
|
25806
26315
|
extendStatics = Object.setPrototypeOf ||
|
@@ -25849,6 +26358,7 @@ var PageModel = /** @class */ (function (_super) {
|
|
25849
26358
|
};
|
25850
26359
|
_this.createLocalizableString("navigationTitle", _this, true);
|
25851
26360
|
_this.createLocalizableString("navigationDescription", _this, true);
|
26361
|
+
_this.dragDropPageHelper = new _drag_drop_page_helper_v1__WEBPACK_IMPORTED_MODULE_3__["DragDropPageHelperV1"](_this);
|
25852
26362
|
return _this;
|
25853
26363
|
}
|
25854
26364
|
PageModel.prototype.getType = function () {
|
@@ -25874,7 +26384,7 @@ var PageModel = /** @class */ (function (_super) {
|
|
25874
26384
|
/**
|
25875
26385
|
* A caption displayed on a navigation button in the TOC or progress bar. Applies when [`showTOC`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTOC) is `true` or when [`showProgressBar`](https://surveyjs.io/form-library/documentation/surveymodel#showProgressBar) is `true` and [`progressBarType`](https://surveyjs.io/form-library/documentation/surveymodel#progressBarType) is `"buttons"`.
|
25876
26386
|
*
|
25877
|
-
* If
|
26387
|
+
* If navigation titles are unspecified, the navigation buttons display page [titles](https://surveyjs.io/form-library/documentation/api-reference/page-model#title) or [names](https://surveyjs.io/form-library/documentation/pagemodel#name).
|
25878
26388
|
*/
|
25879
26389
|
get: function () {
|
25880
26390
|
return this.getLocalizableStringText("navigationTitle");
|
@@ -26129,205 +26639,19 @@ var PageModel = /** @class */ (function (_super) {
|
|
26129
26639
|
this.survey.pageVisibilityChanged(this, this.isVisible);
|
26130
26640
|
}
|
26131
26641
|
};
|
26132
|
-
PageModel.prototype.getDragDropInfo = function () { return this.
|
26642
|
+
PageModel.prototype.getDragDropInfo = function () { return this.dragDropPageHelper.getDragDropInfo(); };
|
26133
26643
|
PageModel.prototype.dragDropStart = function (src, target, nestedPanelDepth) {
|
26134
26644
|
if (nestedPanelDepth === void 0) { nestedPanelDepth = -1; }
|
26135
|
-
this.
|
26645
|
+
this.dragDropPageHelper.dragDropStart(src, target, nestedPanelDepth);
|
26136
26646
|
};
|
26137
26647
|
PageModel.prototype.dragDropMoveTo = function (destination, isBottom, isEdge) {
|
26138
26648
|
if (isBottom === void 0) { isBottom = false; }
|
26139
26649
|
if (isEdge === void 0) { isEdge = false; }
|
26140
|
-
|
26141
|
-
return false;
|
26142
|
-
this.dragDropInfo.destination = destination;
|
26143
|
-
this.dragDropInfo.isBottom = isBottom;
|
26144
|
-
this.dragDropInfo.isEdge = isEdge;
|
26145
|
-
this.correctDragDropInfo(this.dragDropInfo);
|
26146
|
-
if (!this.dragDropCanDropTagert())
|
26147
|
-
return false;
|
26148
|
-
if (!this.dragDropCanDropSource() || !this.dragDropAllowFromSurvey()) {
|
26149
|
-
if (!!this.dragDropInfo.source) {
|
26150
|
-
var row = this.dragDropFindRow(this.dragDropInfo.target);
|
26151
|
-
this.updateRowsRemoveElementFromRow(this.dragDropInfo.target, row);
|
26152
|
-
}
|
26153
|
-
return false;
|
26154
|
-
}
|
26155
|
-
this.dragDropAddTarget(this.dragDropInfo);
|
26156
|
-
return true;
|
26157
|
-
};
|
26158
|
-
PageModel.prototype.correctDragDropInfo = function (dragDropInfo) {
|
26159
|
-
if (!dragDropInfo.destination)
|
26160
|
-
return;
|
26161
|
-
var panel = dragDropInfo.destination.isPanel
|
26162
|
-
? dragDropInfo.destination
|
26163
|
-
: null;
|
26164
|
-
if (!panel)
|
26165
|
-
return;
|
26166
|
-
if (!dragDropInfo.target.isLayoutTypeSupported(panel.getChildrenLayoutType())) {
|
26167
|
-
dragDropInfo.isEdge = true;
|
26168
|
-
}
|
26169
|
-
};
|
26170
|
-
PageModel.prototype.dragDropAllowFromSurvey = function () {
|
26171
|
-
var dest = this.dragDropInfo.destination;
|
26172
|
-
if (!dest || !this.survey)
|
26173
|
-
return true;
|
26174
|
-
var insertBefore = null;
|
26175
|
-
var insertAfter = null;
|
26176
|
-
var parent = dest.isPage || (!this.dragDropInfo.isEdge && dest.isPanel)
|
26177
|
-
? dest
|
26178
|
-
: dest.parent;
|
26179
|
-
if (!dest.isPage) {
|
26180
|
-
var container = dest.parent;
|
26181
|
-
if (!!container) {
|
26182
|
-
var elements = container.elements;
|
26183
|
-
var index = elements.indexOf(dest);
|
26184
|
-
if (index > -1) {
|
26185
|
-
insertBefore = dest;
|
26186
|
-
insertAfter = dest;
|
26187
|
-
if (this.dragDropInfo.isBottom) {
|
26188
|
-
insertBefore =
|
26189
|
-
index < elements.length - 1 ? elements[index + 1] : null;
|
26190
|
-
}
|
26191
|
-
else {
|
26192
|
-
insertAfter = index > 0 ? elements[index - 1] : null;
|
26193
|
-
}
|
26194
|
-
}
|
26195
|
-
}
|
26196
|
-
}
|
26197
|
-
var options = {
|
26198
|
-
allow: true,
|
26199
|
-
target: this.dragDropInfo.target,
|
26200
|
-
source: this.dragDropInfo.source,
|
26201
|
-
parent: parent,
|
26202
|
-
insertAfter: insertAfter,
|
26203
|
-
insertBefore: insertBefore,
|
26204
|
-
};
|
26205
|
-
return this.survey.dragAndDropAllow(options);
|
26650
|
+
return this.dragDropPageHelper.dragDropMoveTo(destination, isBottom, isEdge);
|
26206
26651
|
};
|
26207
26652
|
PageModel.prototype.dragDropFinish = function (isCancel) {
|
26208
26653
|
if (isCancel === void 0) { isCancel = false; }
|
26209
|
-
|
26210
|
-
return;
|
26211
|
-
var target = this.dragDropInfo.target;
|
26212
|
-
var src = this.dragDropInfo.source;
|
26213
|
-
var dest = this.dragDropInfo.destination;
|
26214
|
-
var row = this.dragDropFindRow(target);
|
26215
|
-
var targetIndex = this.dragDropGetElementIndex(target, row);
|
26216
|
-
this.updateRowsRemoveElementFromRow(target, row);
|
26217
|
-
var elementsToSetSWNL = [];
|
26218
|
-
var elementsToResetSWNL = [];
|
26219
|
-
if (!isCancel && !!row) {
|
26220
|
-
var isSamePanel = false;
|
26221
|
-
if (this.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].supportCreatorV2) {
|
26222
|
-
var srcRow = src && src.parent && src.parent.dragDropFindRow(src);
|
26223
|
-
if (row.panel.elements[targetIndex] && row.panel.elements[targetIndex].startWithNewLine && row.elements.length > 1 && row.panel.elements[targetIndex] === dest) {
|
26224
|
-
elementsToSetSWNL.push(target);
|
26225
|
-
elementsToResetSWNL.push(row.panel.elements[targetIndex]);
|
26226
|
-
}
|
26227
|
-
if (target.startWithNewLine && row.elements.length > 1 && (!row.panel.elements[targetIndex] || !row.panel.elements[targetIndex].startWithNewLine)) {
|
26228
|
-
elementsToResetSWNL.push(target);
|
26229
|
-
}
|
26230
|
-
if (srcRow && srcRow.elements[0] === src && srcRow.elements[1]) {
|
26231
|
-
elementsToSetSWNL.push(srcRow.elements[1]);
|
26232
|
-
}
|
26233
|
-
if (row.elements.length <= 1) {
|
26234
|
-
elementsToSetSWNL.push(target);
|
26235
|
-
}
|
26236
|
-
if (target.startWithNewLine && row.elements.length > 1 && row.elements[0] !== dest) {
|
26237
|
-
elementsToResetSWNL.push(target);
|
26238
|
-
}
|
26239
|
-
}
|
26240
|
-
if (!!src && !!src.parent) {
|
26241
|
-
this.survey.startMovingQuestion();
|
26242
|
-
isSamePanel = row.panel == src.parent;
|
26243
|
-
if (isSamePanel) {
|
26244
|
-
row.panel.dragDropMoveElement(src, target, targetIndex);
|
26245
|
-
targetIndex = -1;
|
26246
|
-
}
|
26247
|
-
else {
|
26248
|
-
src.parent.removeElement(src);
|
26249
|
-
}
|
26250
|
-
}
|
26251
|
-
if (targetIndex > -1) {
|
26252
|
-
row.panel.addElement(target, targetIndex);
|
26253
|
-
}
|
26254
|
-
this.survey.stopMovingQuestion();
|
26255
|
-
}
|
26256
|
-
elementsToSetSWNL.map(function (e) { e.startWithNewLine = true; });
|
26257
|
-
elementsToResetSWNL.map(function (e) { e.startWithNewLine = false; });
|
26258
|
-
this.dragDropInfo = null;
|
26259
|
-
return !isCancel ? target : null;
|
26260
|
-
};
|
26261
|
-
PageModel.prototype.dragDropGetElementIndex = function (target, row) {
|
26262
|
-
if (!row)
|
26263
|
-
return -1;
|
26264
|
-
var index = row.elements.indexOf(target);
|
26265
|
-
if (row.index == 0)
|
26266
|
-
return index;
|
26267
|
-
var prevRow = row.panel.rows[row.index - 1];
|
26268
|
-
var prevElement = prevRow.elements[prevRow.elements.length - 1];
|
26269
|
-
return index + row.panel.elements.indexOf(prevElement) + 1;
|
26270
|
-
};
|
26271
|
-
PageModel.prototype.dragDropCanDropTagert = function () {
|
26272
|
-
var destination = this.dragDropInfo.destination;
|
26273
|
-
if (!destination || destination.isPage)
|
26274
|
-
return true;
|
26275
|
-
return this.dragDropCanDropCore(this.dragDropInfo.target, destination);
|
26276
|
-
};
|
26277
|
-
PageModel.prototype.dragDropCanDropSource = function () {
|
26278
|
-
var source = this.dragDropInfo.source;
|
26279
|
-
if (!source)
|
26280
|
-
return true;
|
26281
|
-
var destination = this.dragDropInfo.destination;
|
26282
|
-
if (!this.dragDropCanDropCore(source, destination))
|
26283
|
-
return false;
|
26284
|
-
if (this.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].supportCreatorV2) {
|
26285
|
-
var rowSource = this.dragDropFindRow(source);
|
26286
|
-
var rowDestination = this.dragDropFindRow(destination);
|
26287
|
-
if (rowSource !== rowDestination) {
|
26288
|
-
if (!source.startWithNewLine && destination.startWithNewLine)
|
26289
|
-
return true;
|
26290
|
-
if (source.startWithNewLine && !destination.startWithNewLine) {
|
26291
|
-
return true;
|
26292
|
-
}
|
26293
|
-
}
|
26294
|
-
var row = this.dragDropFindRow(destination);
|
26295
|
-
if (row && row.elements.length == 1)
|
26296
|
-
return true;
|
26297
|
-
}
|
26298
|
-
return this.dragDropCanDropNotNext(source, destination, this.dragDropInfo.isEdge, this.dragDropInfo.isBottom);
|
26299
|
-
};
|
26300
|
-
PageModel.prototype.dragDropCanDropCore = function (target, destination) {
|
26301
|
-
if (!destination)
|
26302
|
-
return true;
|
26303
|
-
if (this.dragDropIsSameElement(destination, target))
|
26304
|
-
return false;
|
26305
|
-
if (target.isPanel) {
|
26306
|
-
var pnl = target;
|
26307
|
-
if (pnl.containsElement(destination) ||
|
26308
|
-
!!pnl.getElementByName(destination.name))
|
26309
|
-
return false;
|
26310
|
-
}
|
26311
|
-
return true;
|
26312
|
-
};
|
26313
|
-
PageModel.prototype.dragDropCanDropNotNext = function (source, destination, isEdge, isBottom) {
|
26314
|
-
if (!destination || (destination.isPanel && !isEdge))
|
26315
|
-
return true;
|
26316
|
-
if (typeof source.parent === "undefined" || source.parent !== destination.parent)
|
26317
|
-
return true;
|
26318
|
-
var pnl = source.parent;
|
26319
|
-
var srcIndex = pnl.elements.indexOf(source);
|
26320
|
-
var destIndex = pnl.elements.indexOf(destination);
|
26321
|
-
if (destIndex < srcIndex && !isBottom)
|
26322
|
-
destIndex--;
|
26323
|
-
if (isBottom)
|
26324
|
-
destIndex++;
|
26325
|
-
return srcIndex < destIndex
|
26326
|
-
? destIndex - srcIndex > 1
|
26327
|
-
: srcIndex - destIndex > 0;
|
26328
|
-
};
|
26329
|
-
PageModel.prototype.dragDropIsSameElement = function (el1, el2) {
|
26330
|
-
return el1 == el2 || el1.name == el2.name;
|
26654
|
+
return this.dragDropPageHelper.dragDropFinish(isCancel);
|
26331
26655
|
};
|
26332
26656
|
PageModel.prototype.ensureRowsVisibility = function () {
|
26333
26657
|
_super.prototype.ensureRowsVisibility.call(this);
|
@@ -26373,12 +26697,11 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("page", [
|
|
26373
26697
|
/*!**********************!*\
|
26374
26698
|
!*** ./src/panel.ts ***!
|
26375
26699
|
\**********************/
|
26376
|
-
/*! exports provided:
|
26700
|
+
/*! exports provided: QuestionRowModel, PanelModelBase, PanelModel */
|
26377
26701
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
26378
26702
|
|
26379
26703
|
"use strict";
|
26380
26704
|
__webpack_require__.r(__webpack_exports__);
|
26381
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropInfo", function() { return DragDropInfo; });
|
26382
26705
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionRowModel", function() { return QuestionRowModel; });
|
26383
26706
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PanelModelBase", function() { return PanelModelBase; });
|
26384
26707
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PanelModel", function() { return PanelModel; });
|
@@ -26392,6 +26715,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
26392
26715
|
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
26393
26716
|
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
26394
26717
|
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
26718
|
+
/* harmony import */ var _drag_drop_panel_helper_v1__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./drag-drop-panel-helper-v1 */ "./src/drag-drop-panel-helper-v1.ts");
|
26395
26719
|
var __extends = (undefined && undefined.__extends) || (function () {
|
26396
26720
|
var extendStatics = function (d, b) {
|
26397
26721
|
extendStatics = Object.setPrototypeOf ||
|
@@ -26423,15 +26747,6 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
26423
26747
|
|
26424
26748
|
|
26425
26749
|
|
26426
|
-
var DragDropInfo = /** @class */ (function () {
|
26427
|
-
function DragDropInfo(source, target, nestedPanelDepth) {
|
26428
|
-
if (nestedPanelDepth === void 0) { nestedPanelDepth = -1; }
|
26429
|
-
this.source = source;
|
26430
|
-
this.target = target;
|
26431
|
-
this.nestedPanelDepth = nestedPanelDepth;
|
26432
|
-
}
|
26433
|
-
return DragDropInfo;
|
26434
|
-
}());
|
26435
26750
|
|
26436
26751
|
var QuestionRowModel = /** @class */ (function (_super) {
|
26437
26752
|
__extends(QuestionRowModel, _super);
|
@@ -26682,6 +26997,7 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
26682
26997
|
_this.registerPropertyChangedHandlers(["questionStartIndex", "showQuestionNumbers"], function () {
|
26683
26998
|
_this.updateVisibleIndexes();
|
26684
26999
|
});
|
27000
|
+
_this.dragDropPanelHelper = new _drag_drop_panel_helper_v1__WEBPACK_IMPORTED_MODULE_10__["DragDropPanelHelperV1"](_this);
|
26685
27001
|
return _this;
|
26686
27002
|
}
|
26687
27003
|
PanelModelBase.getPanelId = function () {
|
@@ -27510,7 +27826,10 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
27510
27826
|
element.setSurveyImpl(this.surveyImpl);
|
27511
27827
|
element.parent = this;
|
27512
27828
|
this.markQuestionListDirty();
|
27513
|
-
this.
|
27829
|
+
if (this.canBuildRows()) {
|
27830
|
+
var dragDropInfo = _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].supportCreatorV2 ? this.getDragDropInfo() : undefined;
|
27831
|
+
this.dragDropPanelHelper.updateRowsOnElementAdded(element, index, dragDropInfo, this);
|
27832
|
+
}
|
27514
27833
|
if (element.isPanel) {
|
27515
27834
|
var p = element;
|
27516
27835
|
if (this.survey) {
|
@@ -27611,29 +27930,6 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
27611
27930
|
var page = this.getPage(this.parent);
|
27612
27931
|
return !!page ? page.getDragDropInfo() : undefined;
|
27613
27932
|
};
|
27614
|
-
PanelModelBase.prototype.updateRowsOnElementAdded = function (element, index) {
|
27615
|
-
if (!this.canBuildRows())
|
27616
|
-
return;
|
27617
|
-
var dragDropInfo = _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].supportCreatorV2 ? this.getDragDropInfo() : undefined;
|
27618
|
-
if (!dragDropInfo) {
|
27619
|
-
dragDropInfo = new DragDropInfo(null, element);
|
27620
|
-
dragDropInfo.target = element;
|
27621
|
-
dragDropInfo.isEdge = this.elements.length > 1;
|
27622
|
-
if (this.elements.length < 2) {
|
27623
|
-
dragDropInfo.destination = this;
|
27624
|
-
}
|
27625
|
-
else {
|
27626
|
-
dragDropInfo.isBottom = index > 0;
|
27627
|
-
if (index == 0) {
|
27628
|
-
dragDropInfo.destination = this.elements[1];
|
27629
|
-
}
|
27630
|
-
else {
|
27631
|
-
dragDropInfo.destination = this.elements[index - 1];
|
27632
|
-
}
|
27633
|
-
}
|
27634
|
-
}
|
27635
|
-
this.dragDropAddTargetToRow(dragDropInfo, null);
|
27636
|
-
};
|
27637
27933
|
PanelModelBase.prototype.updateRowsOnElementRemoved = function (element) {
|
27638
27934
|
if (!this.canBuildRows())
|
27639
27935
|
return;
|
@@ -27953,147 +28249,13 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
27953
28249
|
}
|
27954
28250
|
};
|
27955
28251
|
PanelModelBase.prototype.dragDropAddTarget = function (dragDropInfo) {
|
27956
|
-
|
27957
|
-
if (this.dragDropAddTargetToRow(dragDropInfo, prevRow)) {
|
27958
|
-
this.updateRowsRemoveElementFromRow(dragDropInfo.target, prevRow);
|
27959
|
-
}
|
28252
|
+
this.dragDropPanelHelper.dragDropAddTarget(dragDropInfo);
|
27960
28253
|
};
|
27961
28254
|
PanelModelBase.prototype.dragDropFindRow = function (findElement) {
|
27962
|
-
|
27963
|
-
return null;
|
27964
|
-
var element = findElement;
|
27965
|
-
var rows = this.rows;
|
27966
|
-
for (var i = 0; i < rows.length; i++) {
|
27967
|
-
if (rows[i].elements.indexOf(element) > -1)
|
27968
|
-
return rows[i];
|
27969
|
-
}
|
27970
|
-
for (var i = 0; i < this.elements.length; i++) {
|
27971
|
-
var pnl = this.elements[i].getPanel();
|
27972
|
-
if (!pnl)
|
27973
|
-
continue;
|
27974
|
-
var row = pnl.dragDropFindRow(element);
|
27975
|
-
if (!!row)
|
27976
|
-
return row;
|
27977
|
-
}
|
27978
|
-
return null;
|
27979
|
-
};
|
27980
|
-
PanelModelBase.prototype.dragDropAddTargetToRow = function (dragDropInfo, prevRow) {
|
27981
|
-
if (!dragDropInfo.destination)
|
27982
|
-
return true;
|
27983
|
-
if (this.dragDropAddTargetToEmptyPanel(dragDropInfo))
|
27984
|
-
return true;
|
27985
|
-
var dest = dragDropInfo.destination;
|
27986
|
-
var destRow = this.dragDropFindRow(dest);
|
27987
|
-
if (!destRow)
|
27988
|
-
return true;
|
27989
|
-
if (_settings__WEBPACK_IMPORTED_MODULE_7__["settings"].supportCreatorV2 && this.isDesignMode) {
|
27990
|
-
if (destRow.elements.length > 1)
|
27991
|
-
return this.dragDropAddTargetToExistingRow(dragDropInfo, destRow, prevRow);
|
27992
|
-
else
|
27993
|
-
return this.dragDropAddTargetToNewRow(dragDropInfo, destRow, prevRow);
|
27994
|
-
}
|
27995
|
-
if (!dragDropInfo.target.startWithNewLine)
|
27996
|
-
return this.dragDropAddTargetToExistingRow(dragDropInfo, destRow, prevRow);
|
27997
|
-
return this.dragDropAddTargetToNewRow(dragDropInfo, destRow, prevRow);
|
27998
|
-
};
|
27999
|
-
PanelModelBase.prototype.dragDropAddTargetToEmptyPanel = function (dragDropInfo) {
|
28000
|
-
if (dragDropInfo.destination.isPage) {
|
28001
|
-
this.dragDropAddTargetToEmptyPanelCore(this.root, dragDropInfo.target, dragDropInfo.isBottom);
|
28002
|
-
return true;
|
28003
|
-
}
|
28004
|
-
var dest = dragDropInfo.destination;
|
28005
|
-
if (dest.isPanel && !dragDropInfo.isEdge) {
|
28006
|
-
var panel = dest;
|
28007
|
-
if (dragDropInfo.target["template"] === dest) {
|
28008
|
-
return false;
|
28009
|
-
}
|
28010
|
-
if (dragDropInfo.nestedPanelDepth < 0 ||
|
28011
|
-
dragDropInfo.nestedPanelDepth >= panel.depth) {
|
28012
|
-
this.dragDropAddTargetToEmptyPanelCore(dest, dragDropInfo.target, dragDropInfo.isBottom);
|
28013
|
-
return true;
|
28014
|
-
}
|
28015
|
-
}
|
28016
|
-
return false;
|
28017
|
-
};
|
28018
|
-
PanelModelBase.prototype.dragDropAddTargetToExistingRow = function (dragDropInfo, destRow, prevRow) {
|
28019
|
-
var index = destRow.elements.indexOf(dragDropInfo.destination);
|
28020
|
-
if (index == 0 &&
|
28021
|
-
!dragDropInfo.isBottom) {
|
28022
|
-
if (this.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].supportCreatorV2) {
|
28023
|
-
}
|
28024
|
-
else if (destRow.elements[0].startWithNewLine) {
|
28025
|
-
if (destRow.index > 0) {
|
28026
|
-
dragDropInfo.isBottom = true;
|
28027
|
-
destRow = destRow.panel.rows[destRow.index - 1];
|
28028
|
-
dragDropInfo.destination =
|
28029
|
-
destRow.elements[destRow.elements.length - 1];
|
28030
|
-
return this.dragDropAddTargetToExistingRow(dragDropInfo, destRow, prevRow);
|
28031
|
-
}
|
28032
|
-
else {
|
28033
|
-
return this.dragDropAddTargetToNewRow(dragDropInfo, destRow, prevRow);
|
28034
|
-
}
|
28035
|
-
}
|
28036
|
-
}
|
28037
|
-
var prevRowIndex = -1;
|
28038
|
-
if (prevRow == destRow) {
|
28039
|
-
prevRowIndex = destRow.elements.indexOf(dragDropInfo.target);
|
28040
|
-
}
|
28041
|
-
if (dragDropInfo.isBottom)
|
28042
|
-
index++;
|
28043
|
-
var srcRow = this.findRowByElement(dragDropInfo.source);
|
28044
|
-
if (srcRow == destRow &&
|
28045
|
-
srcRow.elements.indexOf(dragDropInfo.source) == index)
|
28046
|
-
return false;
|
28047
|
-
if (index == prevRowIndex)
|
28048
|
-
return false;
|
28049
|
-
if (prevRowIndex > -1) {
|
28050
|
-
destRow.elements.splice(prevRowIndex, 1);
|
28051
|
-
if (prevRowIndex < index)
|
28052
|
-
index--;
|
28053
|
-
}
|
28054
|
-
destRow.elements.splice(index, 0, dragDropInfo.target);
|
28055
|
-
destRow.updateVisible();
|
28056
|
-
return prevRowIndex < 0;
|
28057
|
-
};
|
28058
|
-
PanelModelBase.prototype.dragDropAddTargetToNewRow = function (dragDropInfo, destRow, prevRow) {
|
28059
|
-
var targetRow = destRow.panel.createRowAndSetLazy(destRow.panel.rows.length);
|
28060
|
-
if (this.isDesignMode && _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].supportCreatorV2) {
|
28061
|
-
targetRow.setIsLazyRendering(false);
|
28062
|
-
}
|
28063
|
-
targetRow.addElement(dragDropInfo.target);
|
28064
|
-
var index = destRow.index;
|
28065
|
-
if (dragDropInfo.isBottom) {
|
28066
|
-
index++;
|
28067
|
-
}
|
28068
|
-
//same row
|
28069
|
-
if (!!prevRow && prevRow.panel == targetRow.panel && prevRow.index == index)
|
28070
|
-
return false;
|
28071
|
-
var srcRow = this.findRowByElement(dragDropInfo.source);
|
28072
|
-
if (!!srcRow &&
|
28073
|
-
srcRow.panel == targetRow.panel &&
|
28074
|
-
srcRow.elements.length == 1 &&
|
28075
|
-
srcRow.index == index)
|
28076
|
-
return false;
|
28077
|
-
destRow.panel.rows.splice(index, 0, targetRow);
|
28078
|
-
return true;
|
28079
|
-
};
|
28080
|
-
PanelModelBase.prototype.dragDropAddTargetToEmptyPanelCore = function (panel, target, isBottom) {
|
28081
|
-
var targetRow = panel.createRow();
|
28082
|
-
targetRow.addElement(target);
|
28083
|
-
if (panel.elements.length == 0 || isBottom) {
|
28084
|
-
panel.rows.push(targetRow);
|
28085
|
-
}
|
28086
|
-
else {
|
28087
|
-
panel.rows.splice(0, 0, targetRow);
|
28088
|
-
}
|
28255
|
+
return this.dragDropPanelHelper.dragDropFindRow(findElement);
|
28089
28256
|
};
|
28090
28257
|
PanelModelBase.prototype.dragDropMoveElement = function (src, target, targetIndex) {
|
28091
|
-
|
28092
|
-
if (targetIndex > srcIndex) {
|
28093
|
-
targetIndex--;
|
28094
|
-
}
|
28095
|
-
this.removeElement(src);
|
28096
|
-
this.addElement(target, targetIndex);
|
28258
|
+
this.dragDropPanelHelper.dragDropMoveElement(src, target, targetIndex);
|
28097
28259
|
};
|
28098
28260
|
PanelModelBase.prototype.needResponsiveWidth = function () {
|
28099
28261
|
var result = false;
|
@@ -30016,6 +30178,11 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
30016
30178
|
var visualViewport = window.visualViewport;
|
30017
30179
|
document.documentElement.style.setProperty("--sv-popup-overlay-height", visualViewport.height * visualViewport.scale + "px");
|
30018
30180
|
};
|
30181
|
+
_this.resizeWindowCallback = function () {
|
30182
|
+
if (!_this.isOverlay) {
|
30183
|
+
_this.updatePosition(true, false);
|
30184
|
+
}
|
30185
|
+
};
|
30019
30186
|
_this.clientY = 0;
|
30020
30187
|
_this.isTablet = false;
|
30021
30188
|
_this.touchStartEventCallback = function (event) {
|
@@ -30126,6 +30293,7 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
30126
30293
|
this.updatePosition(true, false);
|
30127
30294
|
}
|
30128
30295
|
this.switchFocus();
|
30296
|
+
window.addEventListener("resize", this.resizeWindowCallback);
|
30129
30297
|
if (this.shouldCreateResizeCallback) {
|
30130
30298
|
window.visualViewport.addEventListener("resize", this.resizeEventCallback);
|
30131
30299
|
if (this.container) {
|
@@ -30161,6 +30329,7 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
30161
30329
|
};
|
30162
30330
|
PopupDropdownViewModel.prototype.updateOnHiding = function () {
|
30163
30331
|
_super.prototype.updateOnHiding.call(this);
|
30332
|
+
window.removeEventListener("resize", this.resizeWindowCallback);
|
30164
30333
|
if (this.shouldCreateResizeCallback) {
|
30165
30334
|
window.visualViewport.removeEventListener("resize", this.resizeEventCallback);
|
30166
30335
|
if (this.container) {
|
@@ -31223,6 +31392,7 @@ var Question = /** @class */ (function (_super) {
|
|
31223
31392
|
Question.prototype.isReadOnlyRenderDiv = function () {
|
31224
31393
|
return this.isReadOnly && _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].readOnlyCommentRenderMode === "div";
|
31225
31394
|
};
|
31395
|
+
Question.prototype.setIsMobile = function (val) { };
|
31226
31396
|
Question.prototype.createLocTitleProperty = function () {
|
31227
31397
|
var _this = this;
|
31228
31398
|
var locTitleValue = _super.prototype.createLocTitleProperty.call(this);
|
@@ -33427,7 +33597,7 @@ var Question = /** @class */ (function (_super) {
|
|
33427
33597
|
*
|
33428
33598
|
* Call this method after you assign new question values in code to ensure that they are acceptable.
|
33429
33599
|
*
|
33430
|
-
* > This method does not remove values that
|
33600
|
+
* > This method does not remove values that fail validation. Call the `validate()` method to validate newly assigned values.
|
33431
33601
|
*
|
33432
33602
|
* @see validate
|
33433
33603
|
*/
|
@@ -33591,7 +33761,9 @@ var Question = /** @class */ (function (_super) {
|
|
33591
33761
|
};
|
33592
33762
|
Question.questionCounter = 100;
|
33593
33763
|
__decorate([
|
33594
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false
|
33764
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false, onSet: function (val, target) {
|
33765
|
+
target.setIsMobile(val);
|
33766
|
+
} })
|
33595
33767
|
], Question.prototype, "isMobile", void 0);
|
33596
33768
|
__decorate([
|
33597
33769
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: true })
|
@@ -34316,6 +34488,18 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
34316
34488
|
return true;
|
34317
34489
|
};
|
34318
34490
|
QuestionSelectBase.prototype.onSelectedItemValuesChangedHandler = function (newValue) { };
|
34491
|
+
QuestionSelectBase.prototype.getSingleSelectedItem = function () {
|
34492
|
+
var selectedItemValues = this.selectedItemValues;
|
34493
|
+
if (this.isEmpty())
|
34494
|
+
return null;
|
34495
|
+
var itemValue = _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(this.visibleChoices, this.value);
|
34496
|
+
this.onGetSingleSelectedItem(itemValue);
|
34497
|
+
if (!itemValue && !selectedItemValues) {
|
34498
|
+
this.updateSelectedItemValues();
|
34499
|
+
}
|
34500
|
+
return itemValue || selectedItemValues || (this.isOtherSelected ? this.otherItem : new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](this.value));
|
34501
|
+
};
|
34502
|
+
QuestionSelectBase.prototype.onGetSingleSelectedItem = function (selectedItemByValue) { };
|
34319
34503
|
QuestionSelectBase.prototype.setConditionalChoicesRunner = function () {
|
34320
34504
|
if (this.choicesVisibleIf) {
|
34321
34505
|
if (!this.conditionChoicesVisibleIfRunner) {
|
@@ -37616,9 +37800,6 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
37616
37800
|
QuestionCustomModelBase.prototype.getSurveyData = function () {
|
37617
37801
|
return this;
|
37618
37802
|
};
|
37619
|
-
// getSurvey(): ISurvey {
|
37620
|
-
// return this.survey;
|
37621
|
-
// }
|
37622
37803
|
QuestionCustomModelBase.prototype.getTextProcessor = function () {
|
37623
37804
|
return this.textProcessor;
|
37624
37805
|
};
|
@@ -37752,6 +37933,12 @@ var QuestionCustomModel = /** @class */ (function (_super) {
|
|
37752
37933
|
return;
|
37753
37934
|
_super.prototype.setValue.call(this, name, newValue, locNotification, allowNotifyValueChanged);
|
37754
37935
|
};
|
37936
|
+
QuestionCustomModel.prototype.onSetData = function () {
|
37937
|
+
_super.prototype.onSetData.call(this);
|
37938
|
+
if (!!this.survey && !this.isEmpty()) {
|
37939
|
+
this.setValue(this.name, this.value, false, this.allowNotifyValueChanged);
|
37940
|
+
}
|
37941
|
+
};
|
37755
37942
|
QuestionCustomModel.prototype.hasErrors = function (fireCallback, rec) {
|
37756
37943
|
if (fireCallback === void 0) { fireCallback = true; }
|
37757
37944
|
if (rec === void 0) { rec = null; }
|
@@ -38300,22 +38487,15 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
38300
38487
|
configurable: true
|
38301
38488
|
});
|
38302
38489
|
Object.defineProperty(QuestionDropdownModel.prototype, "selectedItem", {
|
38303
|
-
get: function () {
|
38304
|
-
var selectedItemValues = this.selectedItemValues;
|
38305
|
-
if (this.isEmpty())
|
38306
|
-
return null;
|
38307
|
-
var itemValue = _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(this.visibleChoices, this.value);
|
38308
|
-
if (!!itemValue) {
|
38309
|
-
this.lastSelectedItemValue = itemValue;
|
38310
|
-
}
|
38311
|
-
else if (!selectedItemValues) {
|
38312
|
-
this.updateSelectedItemValues();
|
38313
|
-
}
|
38314
|
-
return this.lastSelectedItemValue || selectedItemValues || (this.isOtherSelected ? this.otherItem : new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](this.value));
|
38315
|
-
},
|
38490
|
+
get: function () { return this.getSingleSelectedItem(); },
|
38316
38491
|
enumerable: false,
|
38317
38492
|
configurable: true
|
38318
38493
|
});
|
38494
|
+
QuestionDropdownModel.prototype.onGetSingleSelectedItem = function (selectedItemByValue) {
|
38495
|
+
if (!!selectedItemByValue) {
|
38496
|
+
this.lastSelectedItemValue = selectedItemByValue;
|
38497
|
+
}
|
38498
|
+
};
|
38319
38499
|
QuestionDropdownModel.prototype.supportGoNextPageAutomatic = function () {
|
38320
38500
|
return true;
|
38321
38501
|
};
|
@@ -38426,7 +38606,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
38426
38606
|
};
|
38427
38607
|
Object.defineProperty(QuestionDropdownModel.prototype, "selectedItemLocText", {
|
38428
38608
|
get: function () {
|
38429
|
-
var item = this.selectedItem;
|
38609
|
+
var item = this.suggestedItem || this.selectedItem;
|
38430
38610
|
return item === null || item === void 0 ? void 0 : item.locText;
|
38431
38611
|
},
|
38432
38612
|
enumerable: false,
|
@@ -38553,6 +38733,9 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
38553
38733
|
__decorate([
|
38554
38734
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 25 })
|
38555
38735
|
], QuestionDropdownModel.prototype, "choicesLazyLoadPageSize", void 0);
|
38736
|
+
__decorate([
|
38737
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
38738
|
+
], QuestionDropdownModel.prototype, "suggestedItem", void 0);
|
38556
38739
|
return QuestionDropdownModel;
|
38557
38740
|
}(_question_baseselect__WEBPACK_IMPORTED_MODULE_2__["QuestionSelectBase"]));
|
38558
38741
|
|
@@ -42051,7 +42234,7 @@ var MatrixDropdownTotalCell = /** @class */ (function (_super) {
|
|
42051
42234
|
if (!!this.column.totalExpression)
|
42052
42235
|
return this.column.totalExpression;
|
42053
42236
|
if (this.column.totalType == "none")
|
42054
|
-
return "";
|
42237
|
+
return "''";
|
42055
42238
|
var funName = this.column.totalType + "InArray";
|
42056
42239
|
if (!_functionsfactory__WEBPACK_IMPORTED_MODULE_8__["FunctionFactory"].Instance.hasFunction(funName))
|
42057
42240
|
return "";
|
@@ -43405,7 +43588,8 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
43405
43588
|
return this.getColumnByName(columnName);
|
43406
43589
|
};
|
43407
43590
|
QuestionMatrixDropdownModelBase.prototype.getColumnWidth = function (column) {
|
43408
|
-
|
43591
|
+
var _a;
|
43592
|
+
return column.minWidth ? column.minWidth : this.columnMinWidth ? this.columnMinWidth : (((_a = _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].matrix.columnWidthsByType[column.cellType]) === null || _a === void 0 ? void 0 : _a.minWidth) || "");
|
43409
43593
|
};
|
43410
43594
|
Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "choices", {
|
43411
43595
|
/**
|
@@ -44076,12 +44260,17 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
44076
44260
|
configurable: true
|
44077
44261
|
});
|
44078
44262
|
QuestionMatrixDropdownModelBase.prototype.onRowChanging = function (row, columnName, rowValue) {
|
44079
|
-
if (!this.survey)
|
44263
|
+
if (!this.survey && !this.cellValueChangingCallback)
|
44080
44264
|
return !!rowValue ? rowValue[columnName] : null;
|
44081
44265
|
var options = this.getOnCellValueChangedOptions(row, columnName, rowValue);
|
44082
44266
|
var oldRowValue = this.getRowValueCore(row, this.createNewValue(), true);
|
44083
44267
|
options.oldValue = !!oldRowValue ? oldRowValue[columnName] : null;
|
44084
|
-
this.
|
44268
|
+
if (!!this.cellValueChangingCallback) {
|
44269
|
+
options.value = this.cellValueChangingCallback(row, columnName, options.value, options.oldValue);
|
44270
|
+
}
|
44271
|
+
if (!!this.survey) {
|
44272
|
+
this.survey.matrixCellValueChanging(this, options);
|
44273
|
+
}
|
44085
44274
|
return options.value;
|
44086
44275
|
};
|
44087
44276
|
QuestionMatrixDropdownModelBase.prototype.onRowChanged = function (row, columnName, newRowValue, isDeletingValue) {
|
@@ -44275,10 +44464,10 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
44275
44464
|
return this.SurveyModel.getMatrixCellTemplateData(cell);
|
44276
44465
|
};
|
44277
44466
|
QuestionMatrixDropdownModelBase.prototype.getCellWrapperComponentName = function (cell) {
|
44278
|
-
return this.SurveyModel.getElementWrapperComponentName(cell, "cell");
|
44467
|
+
return this.SurveyModel.getElementWrapperComponentName(cell, cell.row instanceof MatrixDropdownTotalRowModel ? "row-footer" : "cell");
|
44279
44468
|
};
|
44280
44469
|
QuestionMatrixDropdownModelBase.prototype.getCellWrapperComponentData = function (cell) {
|
44281
|
-
return this.SurveyModel.getElementWrapperComponentData(cell, "cell");
|
44470
|
+
return this.SurveyModel.getElementWrapperComponentData(cell, cell.row instanceof MatrixDropdownTotalRowModel ? "row-footer" : "cell");
|
44282
44471
|
};
|
44283
44472
|
QuestionMatrixDropdownModelBase.prototype.getColumnHeaderWrapperComponentName = function (cell) {
|
44284
44473
|
return this.SurveyModel.getElementWrapperComponentName(cell, "column-header");
|
@@ -45136,7 +45325,14 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownc
|
|
45136
45325
|
serializationProperty: "locRequiredErrorText",
|
45137
45326
|
},
|
45138
45327
|
"readOnly:boolean",
|
45139
|
-
|
45328
|
+
{
|
45329
|
+
name: "minWidth",
|
45330
|
+
onPropertyEditorUpdate: function (obj, editor) {
|
45331
|
+
if (!!obj && !!editor) {
|
45332
|
+
editor.value = obj.minWidth;
|
45333
|
+
}
|
45334
|
+
}
|
45335
|
+
},
|
45140
45336
|
"width",
|
45141
45337
|
"visibleIf:condition",
|
45142
45338
|
"enableIf:condition",
|
@@ -48012,6 +48208,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
48012
48208
|
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
48013
48209
|
/* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./actions/action */ "./src/actions/action.ts");
|
48014
48210
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./base */ "./src/base.ts");
|
48211
|
+
/* harmony import */ var _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./actions/adaptive-container */ "./src/actions/adaptive-container.ts");
|
48015
48212
|
var __extends = (undefined && undefined.__extends) || (function () {
|
48016
48213
|
var extendStatics = function (d, b) {
|
48017
48214
|
extendStatics = Object.setPrototypeOf ||
|
@@ -48050,6 +48247,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
|
|
48050
48247
|
|
48051
48248
|
|
48052
48249
|
|
48250
|
+
|
48053
48251
|
var QuestionPanelDynamicItemTextProcessor = /** @class */ (function (_super) {
|
48054
48252
|
__extends(QuestionPanelDynamicItemTextProcessor, _super);
|
48055
48253
|
function QuestionPanelDynamicItemTextProcessor(data, panelItem, variableName) {
|
@@ -48502,6 +48700,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
48502
48700
|
val = this.panelCount - 1;
|
48503
48701
|
this.currentIndexValue = val;
|
48504
48702
|
this.updateFooterActions();
|
48703
|
+
this.updateTabToolbarItemsPressedState();
|
48505
48704
|
this.fireCallback(this.currentIndexChangedCallback);
|
48506
48705
|
}
|
48507
48706
|
},
|
@@ -48785,6 +48984,13 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
48785
48984
|
_super.prototype.setValueCore.call(this, newValue);
|
48786
48985
|
}
|
48787
48986
|
};
|
48987
|
+
QuestionPanelDynamicModel.prototype.setIsMobile = function (val) {
|
48988
|
+
(this.panels || []).forEach(function (panel) { return panel.elements.forEach(function (element) {
|
48989
|
+
if (element instanceof _question__WEBPACK_IMPORTED_MODULE_3__["Question"]) {
|
48990
|
+
element.isMobile = val;
|
48991
|
+
}
|
48992
|
+
}); });
|
48993
|
+
};
|
48788
48994
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelCount", {
|
48789
48995
|
/**
|
48790
48996
|
* The number of panels in Dynamic Panel.
|
@@ -48810,6 +49016,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
48810
49016
|
for (var i = this.panelCount; i < val; i++) {
|
48811
49017
|
var panel = this.createNewPanel();
|
48812
49018
|
this.panels.push(panel);
|
49019
|
+
this.addTabFromToolbar(panel);
|
48813
49020
|
if (this.renderMode == "list" && this.panelsState != "default") {
|
48814
49021
|
if (this.panelsState === "expand") {
|
48815
49022
|
panel.expand();
|
@@ -48821,13 +49028,16 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
48821
49028
|
}
|
48822
49029
|
}
|
48823
49030
|
}
|
48824
|
-
|
48825
|
-
|
49031
|
+
var removedPanels = [];
|
49032
|
+
if (val < this.panelCount) {
|
49033
|
+
removedPanels = this.panels.splice(val, this.panelCount - val);
|
49034
|
+
}
|
48826
49035
|
this.setValueAfterPanelsCreating();
|
48827
49036
|
this.setValueBasedOnPanelCount();
|
48828
49037
|
this.reRunCondition();
|
48829
49038
|
this.updateFooterActions();
|
48830
49039
|
this.fireCallback(this.panelCountChangedCallback);
|
49040
|
+
(removedPanels.length > 0) && this.removeTabFromToolbar(removedPanels);
|
48831
49041
|
},
|
48832
49042
|
enumerable: false,
|
48833
49043
|
configurable: true
|
@@ -49069,6 +49279,19 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
49069
49279
|
enumerable: false,
|
49070
49280
|
configurable: true
|
49071
49281
|
});
|
49282
|
+
Object.defineProperty(QuestionPanelDynamicModel.prototype, "tabAlign", {
|
49283
|
+
get: function () {
|
49284
|
+
return this.getPropertyValue("tabAlign");
|
49285
|
+
},
|
49286
|
+
set: function (val) {
|
49287
|
+
this.setPropertyValue("tabAlign", val);
|
49288
|
+
if (this.isRenderModeTab) {
|
49289
|
+
this.additionalTitleToolbar.containerCss = this.getAdditionalTitleToolbarCss();
|
49290
|
+
}
|
49291
|
+
},
|
49292
|
+
enumerable: false,
|
49293
|
+
configurable: true
|
49294
|
+
});
|
49072
49295
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "isRenderModeList", {
|
49073
49296
|
get: function () {
|
49074
49297
|
return this.renderMode === "list";
|
@@ -49076,6 +49299,25 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
49076
49299
|
enumerable: false,
|
49077
49300
|
configurable: true
|
49078
49301
|
});
|
49302
|
+
Object.defineProperty(QuestionPanelDynamicModel.prototype, "isRenderModeTab", {
|
49303
|
+
get: function () {
|
49304
|
+
return this.renderMode === "tab";
|
49305
|
+
},
|
49306
|
+
enumerable: false,
|
49307
|
+
configurable: true
|
49308
|
+
});
|
49309
|
+
Object.defineProperty(QuestionPanelDynamicModel.prototype, "hasTitleOnLeftTop", {
|
49310
|
+
get: function () {
|
49311
|
+
if (this.isRenderModeTab && !!this.panelCount)
|
49312
|
+
return true;
|
49313
|
+
if (!this.hasTitle)
|
49314
|
+
return false;
|
49315
|
+
var location = this.getTitleLocation();
|
49316
|
+
return location === "left" || location === "top";
|
49317
|
+
},
|
49318
|
+
enumerable: false,
|
49319
|
+
configurable: true
|
49320
|
+
});
|
49079
49321
|
QuestionPanelDynamicModel.prototype.setVisibleIndex = function (value) {
|
49080
49322
|
if (!this.isVisible)
|
49081
49323
|
return 0;
|
@@ -49172,6 +49414,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
49172
49414
|
this.reRunCondition();
|
49173
49415
|
this.updateFooterActions();
|
49174
49416
|
this.fireCallback(this.panelCountChangedCallback);
|
49417
|
+
this.updateTabToolbar();
|
49175
49418
|
};
|
49176
49419
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "defaultPanelValue", {
|
49177
49420
|
/**
|
@@ -49367,6 +49610,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
49367
49610
|
if (this.survey)
|
49368
49611
|
this.survey.dynamicPanelRemoved(this, index, panel);
|
49369
49612
|
this.isValueChangingInternally = false;
|
49613
|
+
this.removeTabFromToolbar([panel]);
|
49370
49614
|
};
|
49371
49615
|
QuestionPanelDynamicModel.prototype.getPanelIndex = function (val) {
|
49372
49616
|
if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(val))
|
@@ -50024,6 +50268,18 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
50024
50268
|
QuestionPanelDynamicModel.prototype.getRootCss = function () {
|
50025
50269
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(_super.prototype.getRootCss.call(this)).append(this.cssClasses.empty, this.getShowNoEntriesPlaceholder()).toString();
|
50026
50270
|
};
|
50271
|
+
Object.defineProperty(QuestionPanelDynamicModel.prototype, "cssHeader", {
|
50272
|
+
get: function () {
|
50273
|
+
var showTab = this.isRenderModeTab && !!this.panelCount;
|
50274
|
+
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
|
50275
|
+
.append(this.cssClasses.header)
|
50276
|
+
.append(this.cssClasses.headerTop, this.hasTitleOnTop || showTab)
|
50277
|
+
.append(this.cssClasses.headerTab, showTab)
|
50278
|
+
.toString();
|
50279
|
+
},
|
50280
|
+
enumerable: false,
|
50281
|
+
configurable: true
|
50282
|
+
});
|
50027
50283
|
QuestionPanelDynamicModel.prototype.getPanelWrapperCss = function () {
|
50028
50284
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
|
50029
50285
|
.append(this.cssClasses.panelWrapper)
|
@@ -50085,6 +50341,22 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
50085
50341
|
return true;
|
50086
50342
|
return false;
|
50087
50343
|
};
|
50344
|
+
QuestionPanelDynamicModel.prototype.getAdditionalTitleToolbar = function () {
|
50345
|
+
if (!this.isRenderModeTab)
|
50346
|
+
return null;
|
50347
|
+
if (!this.additionalTitleToolbarValue) {
|
50348
|
+
this.additionalTitleToolbarValue = new _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_12__["AdaptiveActionContainer"]();
|
50349
|
+
this.additionalTitleToolbarValue.containerCss = this.getAdditionalTitleToolbarCss();
|
50350
|
+
this.additionalTitleToolbarValue.cssClasses = {
|
50351
|
+
item: "sv-tab-item",
|
50352
|
+
itemPressed: "sv-tab-item--pressed",
|
50353
|
+
itemAsIcon: "sv-tab-item--icon",
|
50354
|
+
itemIcon: "sv-tab-item__icon",
|
50355
|
+
itemTitle: "sv-tab-item__title"
|
50356
|
+
};
|
50357
|
+
}
|
50358
|
+
return this.additionalTitleToolbarValue;
|
50359
|
+
};
|
50088
50360
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "footerToolbar", {
|
50089
50361
|
get: function () {
|
50090
50362
|
if (!this.footerToolbarValue) {
|
@@ -50159,6 +50431,64 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
50159
50431
|
this.updateFooterActionsCallback();
|
50160
50432
|
this.footerToolbarValue.setItems(items);
|
50161
50433
|
};
|
50434
|
+
QuestionPanelDynamicModel.prototype.createTabByPanel = function (panel) {
|
50435
|
+
var _this = this;
|
50436
|
+
if (!this.isRenderModeTab)
|
50437
|
+
return;
|
50438
|
+
var index = this.getPanelIndex(panel);
|
50439
|
+
var title = this.getLocalizationFormatString("panelDynamicTabTextFormat", index + 1);
|
50440
|
+
var newItem = new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
|
50441
|
+
id: index.toString(),
|
50442
|
+
css: "sv-tab-item__root",
|
50443
|
+
pressed: index === this.currentIndex,
|
50444
|
+
title: title,
|
50445
|
+
action: function () {
|
50446
|
+
_this.currentIndex = parseInt(newItem.id);
|
50447
|
+
_this.updateTabToolbarItemsPressedState();
|
50448
|
+
}
|
50449
|
+
});
|
50450
|
+
return newItem;
|
50451
|
+
};
|
50452
|
+
QuestionPanelDynamicModel.prototype.getAdditionalTitleToolbarCss = function () {
|
50453
|
+
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
|
50454
|
+
.append("sv-tabs-toolbar")
|
50455
|
+
.append("sv-tabs-toolbar--left", this.tabAlign === "left")
|
50456
|
+
.append("sv-tabs-toolbar--right", this.tabAlign === "right")
|
50457
|
+
.append("sv-tabs-toolbar--center", this.tabAlign === "center")
|
50458
|
+
.toString();
|
50459
|
+
};
|
50460
|
+
QuestionPanelDynamicModel.prototype.updateTabToolbarItemsPressedState = function () {
|
50461
|
+
var _this = this;
|
50462
|
+
if (!this.isRenderModeTab)
|
50463
|
+
return;
|
50464
|
+
this.additionalTitleToolbar.renderedActions.forEach(function (action) { return action.pressed = parseInt(action.id) === _this.currentIndex; });
|
50465
|
+
};
|
50466
|
+
QuestionPanelDynamicModel.prototype.updateTabToolbar = function () {
|
50467
|
+
var _this = this;
|
50468
|
+
if (!this.isRenderModeTab)
|
50469
|
+
return;
|
50470
|
+
var items = [];
|
50471
|
+
this.panels.forEach(function (panel) { return items.push(_this.createTabByPanel(panel)); });
|
50472
|
+
this.additionalTitleToolbar.setItems(items);
|
50473
|
+
};
|
50474
|
+
QuestionPanelDynamicModel.prototype.addTabFromToolbar = function (panel) {
|
50475
|
+
if (!this.isRenderModeTab)
|
50476
|
+
return;
|
50477
|
+
var newItem = this.createTabByPanel(panel);
|
50478
|
+
this.additionalTitleToolbar.actions.push(newItem);
|
50479
|
+
this.updateTabToolbarItemsPressedState();
|
50480
|
+
};
|
50481
|
+
QuestionPanelDynamicModel.prototype.removeTabFromToolbar = function (panels) {
|
50482
|
+
var _this = this;
|
50483
|
+
if (!this.isRenderModeTab)
|
50484
|
+
return;
|
50485
|
+
panels.forEach(function (panel) {
|
50486
|
+
var index = _this.getPanelIndex(panel);
|
50487
|
+
var removedItem = _this.additionalTitleToolbar.getActionById(index.toString());
|
50488
|
+
_this.additionalTitleToolbar.actions.splice(_this.additionalTitleToolbar.actions.indexOf(removedItem), 1);
|
50489
|
+
});
|
50490
|
+
this.updateTabToolbarItemsPressedState();
|
50491
|
+
};
|
50162
50492
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "showLegacyNavigation", {
|
50163
50493
|
get: function () {
|
50164
50494
|
return !this.isDefaultV2Theme;
|
@@ -50232,7 +50562,10 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("paneldynamic",
|
|
50232
50562
|
{
|
50233
50563
|
name: "renderMode",
|
50234
50564
|
default: "list",
|
50235
|
-
choices: ["list", "progressTop", "progressBottom", "progressTopBottom"],
|
50565
|
+
choices: ["list", "progressTop", "progressBottom", "progressTopBottom", "tab"],
|
50566
|
+
},
|
50567
|
+
{
|
50568
|
+
name: "tabAlign", default: "center", choices: ["center", "left", "right"],
|
50236
50569
|
},
|
50237
50570
|
{
|
50238
50571
|
name: "templateTitleLocation",
|
@@ -50267,9 +50600,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
50267
50600
|
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
|
50268
50601
|
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
|
50269
50602
|
/* harmony import */ var _question_baseselect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question_baseselect */ "./src/question_baseselect.ts");
|
50270
|
-
/* harmony import */ var
|
50271
|
-
/* harmony import */ var
|
50272
|
-
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./base */ "./src/base.ts");
|
50603
|
+
/* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions/action */ "./src/actions/action.ts");
|
50604
|
+
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ "./src/base.ts");
|
50273
50605
|
var __extends = (undefined && undefined.__extends) || (function () {
|
50274
50606
|
var extendStatics = function (d, b) {
|
50275
50607
|
extendStatics = Object.setPrototypeOf ||
|
@@ -50290,7 +50622,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
50290
50622
|
|
50291
50623
|
|
50292
50624
|
|
50293
|
-
|
50294
50625
|
/**
|
50295
50626
|
* A class that describes the Radiogroup question type.
|
50296
50627
|
*
|
@@ -50328,16 +50659,7 @@ var QuestionRadiogroupModel = /** @class */ (function (_super) {
|
|
50328
50659
|
/**
|
50329
50660
|
* Returns the selected choice item. If no item is selected, returns `null`.
|
50330
50661
|
*/
|
50331
|
-
get: function () {
|
50332
|
-
var selectedItemValues = this.selectedItemValues;
|
50333
|
-
if (this.isEmpty())
|
50334
|
-
return null;
|
50335
|
-
var itemValue = _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(this.visibleChoices, this.value);
|
50336
|
-
if (!itemValue && !selectedItemValues) {
|
50337
|
-
this.updateSelectedItemValues();
|
50338
|
-
}
|
50339
|
-
return itemValue || selectedItemValues || (this.isOtherSelected ? this.otherItem : new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](this.value));
|
50340
|
-
},
|
50662
|
+
get: function () { return this.getSingleSelectedItem(); },
|
50341
50663
|
enumerable: false,
|
50342
50664
|
configurable: true
|
50343
50665
|
});
|
@@ -50387,12 +50709,12 @@ var QuestionRadiogroupModel = /** @class */ (function (_super) {
|
|
50387
50709
|
var _this = this;
|
50388
50710
|
var actions = [];
|
50389
50711
|
if (this.isDefaultV2Theme && !this.isDesignMode) {
|
50390
|
-
var clearAction = new
|
50712
|
+
var clearAction = new _actions_action__WEBPACK_IMPORTED_MODULE_3__["Action"]({
|
50391
50713
|
title: this.clearButtonCaption,
|
50392
50714
|
id: "sv-clr-btn-" + this.id,
|
50393
50715
|
action: function () { _this.clearValue(); },
|
50394
50716
|
innerCss: this.cssClasses.clearButton,
|
50395
|
-
visible: new
|
50717
|
+
visible: new _base__WEBPACK_IMPORTED_MODULE_4__["ComputedUpdater"](function () { return _this.canShowClearButton; })
|
50396
50718
|
});
|
50397
50719
|
actions.push(clearAction);
|
50398
50720
|
}
|
@@ -50841,8 +51163,13 @@ var RenderedRatingItem = /** @class */ (function (_super) {
|
|
50841
51163
|
var _this = _super.call(this) || this;
|
50842
51164
|
_this.itemValue = itemValue;
|
50843
51165
|
_this.locString = locString;
|
51166
|
+
_this.locText.onStringChanged.add(_this.onStringChangedCallback.bind(_this));
|
51167
|
+
_this.onStringChangedCallback();
|
50844
51168
|
return _this;
|
50845
51169
|
}
|
51170
|
+
RenderedRatingItem.prototype.onStringChangedCallback = function () {
|
51171
|
+
this.text = this.itemValue.text;
|
51172
|
+
};
|
50846
51173
|
Object.defineProperty(RenderedRatingItem.prototype, "value", {
|
50847
51174
|
get: function () {
|
50848
51175
|
return this.itemValue.getPropertyValue("value");
|
@@ -50857,16 +51184,12 @@ var RenderedRatingItem = /** @class */ (function (_super) {
|
|
50857
51184
|
enumerable: false,
|
50858
51185
|
configurable: true
|
50859
51186
|
});
|
50860
|
-
Object.defineProperty(RenderedRatingItem.prototype, "text", {
|
50861
|
-
get: function () {
|
50862
|
-
return this.itemValue.text;
|
50863
|
-
},
|
50864
|
-
enumerable: false,
|
50865
|
-
configurable: true
|
50866
|
-
});
|
50867
51187
|
__decorate([
|
50868
51188
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "" })
|
50869
51189
|
], RenderedRatingItem.prototype, "highlight", void 0);
|
51190
|
+
__decorate([
|
51191
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "" })
|
51192
|
+
], RenderedRatingItem.prototype, "text", void 0);
|
50870
51193
|
return RenderedRatingItem;
|
50871
51194
|
}(_base__WEBPACK_IMPORTED_MODULE_7__["Base"]));
|
50872
51195
|
|
@@ -50879,21 +51202,78 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
50879
51202
|
__extends(QuestionRatingModel, _super);
|
50880
51203
|
function QuestionRatingModel(name) {
|
50881
51204
|
var _this = _super.call(this, name) || this;
|
51205
|
+
_this._syncPropertiesChanging = false;
|
50882
51206
|
_this.createItemValues("rateValues");
|
50883
51207
|
_this.createRenderedRateItems();
|
50884
51208
|
_this.createLocalizableString("ratingOptionsCaption", _this, false, true);
|
50885
|
-
_this.registerFunctionOnPropertiesValueChanged(["rateValues", "rateMin", "rateMax",
|
51209
|
+
_this.registerFunctionOnPropertiesValueChanged(["rateValues", "rateMin", "rateMax", "rateType",
|
50886
51210
|
"minRateDescription", "maxRateDescription", "rateStep", "displayRateDescriptionsAsExtremeItems"], function () { return _this.createRenderedRateItems(); });
|
50887
51211
|
_this.createLocalizableString("minRateDescription", _this, true);
|
50888
51212
|
_this.createLocalizableString("maxRateDescription", _this, true);
|
51213
|
+
_this.initPropertyDependencies();
|
50889
51214
|
return _this;
|
50890
51215
|
}
|
51216
|
+
QuestionRatingModel.prototype.startLoadingFromJson = function (jsonObj) {
|
51217
|
+
_super.prototype.startLoadingFromJson.call(this, jsonObj);
|
51218
|
+
this.jsonObj = jsonObj;
|
51219
|
+
};
|
50891
51220
|
QuestionRatingModel.prototype.endLoadingFromJson = function () {
|
50892
51221
|
_super.prototype.endLoadingFromJson.call(this);
|
50893
51222
|
this.hasMinRateDescription = !!this.minRateDescription;
|
50894
51223
|
this.hasMaxRateDescription = !!this.maxRateDescription;
|
51224
|
+
if (this.jsonObj.rateMin !== undefined && this.jsonObj.rateCount !== undefined && this.jsonObj.rateMax === undefined) {
|
51225
|
+
this.updateRateMax();
|
51226
|
+
}
|
51227
|
+
if (this.jsonObj.rateMax !== undefined && this.jsonObj.rateCount !== undefined && this.jsonObj.rateMin === undefined) {
|
51228
|
+
this.updateRateMin();
|
51229
|
+
}
|
51230
|
+
this.updateRateCount();
|
50895
51231
|
this.createRenderedRateItems();
|
50896
51232
|
};
|
51233
|
+
QuestionRatingModel.prototype.registerSychProperties = function (names, func) {
|
51234
|
+
var _this = this;
|
51235
|
+
this.registerFunctionOnPropertiesValueChanged(names, function () {
|
51236
|
+
if (!_this._syncPropertiesChanging) {
|
51237
|
+
_this._syncPropertiesChanging = true;
|
51238
|
+
func();
|
51239
|
+
_this._syncPropertiesChanging = false;
|
51240
|
+
}
|
51241
|
+
});
|
51242
|
+
};
|
51243
|
+
QuestionRatingModel.prototype.updateRateMax = function () {
|
51244
|
+
this.rateMax = this.rateMin + this.rateStep * (this.rateCount - 1);
|
51245
|
+
};
|
51246
|
+
QuestionRatingModel.prototype.updateRateMin = function () {
|
51247
|
+
this.rateMin = this.rateMax - this.rateStep * (this.rateCount - 1);
|
51248
|
+
};
|
51249
|
+
QuestionRatingModel.prototype.updateRateCount = function () {
|
51250
|
+
if (this.rateValues.length) {
|
51251
|
+
this.rateCount = this.rateValues.length;
|
51252
|
+
}
|
51253
|
+
else {
|
51254
|
+
this.rateCount = Math.trunc((this.rateMax - this.rateMin) / (this.rateStep || 1)) + 1;
|
51255
|
+
}
|
51256
|
+
};
|
51257
|
+
QuestionRatingModel.prototype.initPropertyDependencies = function () {
|
51258
|
+
var _this = this;
|
51259
|
+
this.registerSychProperties(["rateCount"], function () {
|
51260
|
+
if (_this.rateValues.length == 0) {
|
51261
|
+
_this.rateMax = _this.rateMin + _this.rateStep * (_this.rateCount - 1);
|
51262
|
+
}
|
51263
|
+
else {
|
51264
|
+
if (_this.rateCount < _this.rateValues.length) {
|
51265
|
+
_this.rateValues.splice(_this.rateCount, _this.rateValues.length - _this.rateCount);
|
51266
|
+
}
|
51267
|
+
else {
|
51268
|
+
for (var i = _this.rateValues.length; i < _this.rateCount; i++)
|
51269
|
+
_this.rateValues.push(new _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"](undefined));
|
51270
|
+
}
|
51271
|
+
}
|
51272
|
+
});
|
51273
|
+
this.registerSychProperties(["rateMin", "rateMax", "rateStep", "rateValues"], function () {
|
51274
|
+
_this.updateRateCount();
|
51275
|
+
});
|
51276
|
+
};
|
50897
51277
|
Object.defineProperty(QuestionRatingModel.prototype, "rateValues", {
|
50898
51278
|
/**
|
50899
51279
|
* A list of rate values.
|
@@ -50914,10 +51294,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
50914
51294
|
*
|
50915
51295
|
* If you need to specify only the `value` property, you can set the `rateValues` property to an array of numbers, for example, `[ 3, 6, 10 ]`. These values are both saved in survey results and used as display text.
|
50916
51296
|
*
|
50917
|
-
* If you do not specify the `rateValues` property, rate values are generated automatically based upon the `rateMin
|
50918
|
-
* @see rateMin
|
50919
|
-
* @see rateMax
|
50920
|
-
* @see rateStep
|
51297
|
+
* If you do not specify the `rateValues` property, rate values are generated automatically based upon the [`rateMin`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMin), [`rateMax`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMax), [`rateStep`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateStep), and [`rateCount`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateCount) property values.
|
50921
51298
|
*/
|
50922
51299
|
get: function () {
|
50923
51300
|
return this.getPropertyValue("rateValues");
|
@@ -50931,12 +51308,12 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
50931
51308
|
});
|
50932
51309
|
Object.defineProperty(QuestionRatingModel.prototype, "rateMin", {
|
50933
51310
|
/**
|
50934
|
-
* Specifies the first rate value in the generated sequence of rate values. Applies if the `rateValues` array is empty.
|
51311
|
+
* Specifies the first rate value in the generated sequence of rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
|
50935
51312
|
*
|
50936
51313
|
* Default value: 1
|
50937
|
-
* @see rateValues
|
50938
51314
|
* @see rateMax
|
50939
51315
|
* @see rateStep
|
51316
|
+
* @see rateCount
|
50940
51317
|
*/
|
50941
51318
|
get: function () {
|
50942
51319
|
return this.getPropertyValue("rateMin");
|
@@ -50949,12 +51326,12 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
50949
51326
|
});
|
50950
51327
|
Object.defineProperty(QuestionRatingModel.prototype, "rateMax", {
|
50951
51328
|
/**
|
50952
|
-
* Specifies the last rate value in the generated sequence of rate values. Applies if the `rateValues` array is empty.
|
51329
|
+
* Specifies the last rate value in the generated sequence of rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
|
50953
51330
|
*
|
50954
51331
|
* Default value: 5
|
50955
|
-
* @see rateValues
|
50956
51332
|
* @see rateMin
|
50957
51333
|
* @see rateStep
|
51334
|
+
* @see rateCount
|
50958
51335
|
*/
|
50959
51336
|
get: function () {
|
50960
51337
|
return this.getPropertyValue("rateMax");
|
@@ -50967,12 +51344,12 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
50967
51344
|
});
|
50968
51345
|
Object.defineProperty(QuestionRatingModel.prototype, "rateStep", {
|
50969
51346
|
/**
|
50970
|
-
* Specifies a step with which to generate rate values. Applies if the `rateValues` array is empty.
|
51347
|
+
* Specifies a step with which to generate rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
|
50971
51348
|
*
|
50972
51349
|
* Default value: 1
|
50973
|
-
* @see rateValues
|
50974
51350
|
* @see rateMin
|
50975
51351
|
* @see rateMax
|
51352
|
+
* @see rateCount
|
50976
51353
|
*/
|
50977
51354
|
get: function () {
|
50978
51355
|
return this.getPropertyValue("rateStep");
|
@@ -51019,6 +51396,8 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
51019
51396
|
}
|
51020
51397
|
rateValues = res;
|
51021
51398
|
}
|
51399
|
+
if (this.rateType == "smileys" && rateValues.length > 10)
|
51400
|
+
rateValues = rateValues.slice(0, 10);
|
51022
51401
|
this.renderedRateItems = rateValues.map(function (v, i) {
|
51023
51402
|
if (_this.displayRateDescriptionsAsExtremeItems) {
|
51024
51403
|
if (i == 0)
|
@@ -51238,6 +51617,13 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
51238
51617
|
itemHoverClass = this.cssClasses.itemSmileyHover;
|
51239
51618
|
itemitemOnErrorClass = this.cssClasses.itemSmileyOnError;
|
51240
51619
|
}
|
51620
|
+
var hasFixedSize = !this.isStar &&
|
51621
|
+
!this.isSmiley &&
|
51622
|
+
(!this.displayRateDescriptionsAsExtremeItems ||
|
51623
|
+
this.rateValues.length > 0 && item != this.rateValues[0] && item != this.rateValues[this.rateValues.length - 1] ||
|
51624
|
+
this.rateValues.length == 0 && item.value != this.rateMin && item.value != this.rateMax) &&
|
51625
|
+
item.locText.calculatedText.length <= 2 &&
|
51626
|
+
Number.isInteger(Number(item.locText.calculatedText));
|
51241
51627
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
|
51242
51628
|
.append(itemClass)
|
51243
51629
|
.append(itemSelectedClass, isSelected)
|
@@ -51246,6 +51632,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
51246
51632
|
.append(itemHighlightedClass, isHighlighted)
|
51247
51633
|
.append(itemUnhighlightedClass, isUnhighlighted)
|
51248
51634
|
.append(itemitemOnErrorClass, this.errors.length > 0)
|
51635
|
+
.append(this.cssClasses.itemFixedSize, hasFixedSize)
|
51249
51636
|
.toString();
|
51250
51637
|
};
|
51251
51638
|
//methods for mobile view
|
@@ -51362,6 +51749,9 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
51362
51749
|
}
|
51363
51750
|
return classes;
|
51364
51751
|
};
|
51752
|
+
__decorate([
|
51753
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: 5 })
|
51754
|
+
], QuestionRatingModel.prototype, "rateCount", void 0);
|
51365
51755
|
__decorate([
|
51366
51756
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["propertyArray"])()
|
51367
51757
|
], QuestionRatingModel.prototype, "renderedRateItems", void 0);
|
@@ -51400,6 +51790,10 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
51400
51790
|
|
51401
51791
|
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("rating", [
|
51402
51792
|
{ name: "showCommentArea:switch", layout: "row", visible: true, category: "general" },
|
51793
|
+
{
|
51794
|
+
name: "rateCount:number",
|
51795
|
+
default: 5
|
51796
|
+
},
|
51403
51797
|
{
|
51404
51798
|
name: "rateValues:itemvalue[]",
|
51405
51799
|
baseValue: function () {
|
@@ -52121,6 +52515,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
52121
52515
|
if (_this.isInputTextUpdate) {
|
52122
52516
|
_this._isWaitingForEnter = event.keyCode === 229;
|
52123
52517
|
}
|
52518
|
+
if (event.keyCode === 13) {
|
52519
|
+
_this.survey.questionEditFinishCallback(_this, event);
|
52520
|
+
}
|
52124
52521
|
};
|
52125
52522
|
_this.onChange = function (event) {
|
52126
52523
|
if (event.target === document.activeElement) {
|
@@ -55933,7 +56330,7 @@ var TitleElement = /** @class */ (function (_super) {
|
|
55933
56330
|
};
|
55934
56331
|
}
|
55935
56332
|
var CustomTag = element.titleTagName;
|
55936
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CustomTag, { className: element.cssTitle, id: element.ariaTitleId, "aria-label": ariaLabel, tabIndex: element.titleTabIndex, "aria-expanded": element.titleAriaExpanded, role:
|
56333
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CustomTag, { className: element.cssTitle, id: element.ariaTitleId, "aria-label": ariaLabel, tabIndex: element.titleTabIndex, "aria-expanded": element.titleAriaExpanded, role: element.titleAriaRole, onClick: onClick, onKeyUp: onKeyUp }, titleContent));
|
55937
56334
|
};
|
55938
56335
|
return TitleElement;
|
55939
56336
|
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component));
|
@@ -56404,8 +56801,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
56404
56801
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyElementHeader", function() { return SurveyElementHeader; });
|
56405
56802
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
56406
56803
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
56407
|
-
/* harmony import */ var
|
56408
|
-
/* harmony import */ var
|
56804
|
+
/* harmony import */ var _components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/action-bar/action-bar */ "./src/react/components/action-bar/action-bar.tsx");
|
56805
|
+
/* harmony import */ var _components_title_title_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/title/title-element */ "./src/react/components/title/title-element.tsx");
|
56806
|
+
/* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
|
56409
56807
|
var __extends = (undefined && undefined.__extends) || (function () {
|
56410
56808
|
var extendStatics = function (d, b) {
|
56411
56809
|
extendStatics = Object.setPrototypeOf ||
|
@@ -56424,6 +56822,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
56424
56822
|
|
56425
56823
|
|
56426
56824
|
|
56825
|
+
|
56427
56826
|
var SurveyElementHeader = /** @class */ (function (_super) {
|
56428
56827
|
__extends(SurveyElementHeader, _super);
|
56429
56828
|
function SurveyElementHeader() {
|
@@ -56438,13 +56837,15 @@ var SurveyElementHeader = /** @class */ (function (_super) {
|
|
56438
56837
|
});
|
56439
56838
|
SurveyElementHeader.prototype.render = function () {
|
56440
56839
|
var element = this.element;
|
56441
|
-
var title = element.hasTitle ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(
|
56840
|
+
var title = element.hasTitle ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_title_title_element__WEBPACK_IMPORTED_MODULE_2__["TitleElement"], { element: element })) : null;
|
56442
56841
|
var description = element.hasDescriptionUnderTitle
|
56443
|
-
?
|
56842
|
+
? _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"].renderQuestionDescription(this.element)
|
56444
56843
|
: null;
|
56844
|
+
var additionalTitleToolbarElement = !!element.additionalTitleToolbar ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_1__["SurveyActionBar"], { model: element.additionalTitleToolbar }) : null;
|
56445
56845
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: element.cssHeader, onClick: element.clickTitleFunction },
|
56446
56846
|
title,
|
56447
|
-
description
|
56847
|
+
description,
|
56848
|
+
additionalTitleToolbarElement));
|
56448
56849
|
};
|
56449
56850
|
return SurveyElementHeader;
|
56450
56851
|
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component));
|
@@ -57577,8 +57978,14 @@ var Survey = /** @class */ (function (_super) {
|
|
57577
57978
|
}
|
57578
57979
|
var rootCss = this.survey.getRootCss();
|
57579
57980
|
var cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
|
57580
|
-
|
57581
|
-
|
57981
|
+
var rootStyle = {
|
57982
|
+
backgroundImage: this.survey.renderBackgroundImage
|
57983
|
+
};
|
57984
|
+
var formStyle = {
|
57985
|
+
backgroundColor: this.survey.renderBackgroundOpacity
|
57986
|
+
};
|
57987
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: rootStyle },
|
57988
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("form", { onSubmit: onSubmit, style: formStyle },
|
57582
57989
|
customHeader,
|
57583
57990
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.container },
|
57584
57991
|
header,
|
@@ -57718,9 +58125,7 @@ var Survey = /** @class */ (function (_super) {
|
|
57718
58125
|
};
|
57719
58126
|
//ISurveyCreator
|
57720
58127
|
Survey.prototype.createQuestionElement = function (question) {
|
57721
|
-
return _reactquestion_factory__WEBPACK_IMPORTED_MODULE_6__["ReactQuestionFactory"].Instance.createQuestion(
|
57722
|
-
? question.getTemplate()
|
57723
|
-
: question.getComponentName(), {
|
58128
|
+
return _reactquestion_factory__WEBPACK_IMPORTED_MODULE_6__["ReactQuestionFactory"].Instance.createQuestion(question.isDefaultRendering() ? question.getTemplate() : question.getComponentName(), {
|
57724
58129
|
question: question,
|
57725
58130
|
isDisplayMode: question.isInputReadOnly,
|
57726
58131
|
creator: this,
|
@@ -58081,7 +58486,8 @@ var SurveyProgressToc = /** @class */ (function (_super) {
|
|
58081
58486
|
}
|
58082
58487
|
SurveyProgressToc.prototype.render = function () {
|
58083
58488
|
var listModel = Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["createTOCListModel"])(this.props.model);
|
58084
|
-
|
58489
|
+
var rootCss = Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["getTocRootCss"])(this.props.model);
|
58490
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: rootCss },
|
58085
58491
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_list_list__WEBPACK_IMPORTED_MODULE_4__["List"], { model: listModel })));
|
58086
58492
|
};
|
58087
58493
|
return SurveyProgressToc;
|
@@ -58492,7 +58898,7 @@ var SurveyQuestionAndErrorsCell = /** @class */ (function (_super) {
|
|
58492
58898
|
var survey = this.question.survey;
|
58493
58899
|
var wrapper = null;
|
58494
58900
|
if (survey) {
|
58495
|
-
wrapper = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_2__["ReactSurveyElementsWrapper"].wrapMatrixCell(survey, element, cell);
|
58901
|
+
wrapper = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_2__["ReactSurveyElementsWrapper"].wrapMatrixCell(survey, element, cell, this.props.reason);
|
58496
58902
|
}
|
58497
58903
|
return wrapper !== null && wrapper !== void 0 ? wrapper : element;
|
58498
58904
|
};
|
@@ -60295,7 +60701,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
|
|
60295
60701
|
var table = this.question.renderedTable;
|
60296
60702
|
if (!table.showFooter)
|
60297
60703
|
return null;
|
60298
|
-
var row = this.renderRow("footer", table.footerRow, this.question.cssClasses);
|
60704
|
+
var row = this.renderRow("footer", table.footerRow, this.question.cssClasses, "row-footer");
|
60299
60705
|
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tfoot", null, row);
|
60300
60706
|
};
|
60301
60707
|
SurveyQuestionMatrixDropdownBase.prototype.renderRows = function () {
|
@@ -60307,23 +60713,26 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
|
|
60307
60713
|
}
|
60308
60714
|
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tbody", null, rows);
|
60309
60715
|
};
|
60310
|
-
SurveyQuestionMatrixDropdownBase.prototype.renderRow = function (keyValue, row, cssClasses) {
|
60716
|
+
SurveyQuestionMatrixDropdownBase.prototype.renderRow = function (keyValue, row, cssClasses, reason) {
|
60311
60717
|
var matrixrow = [];
|
60312
60718
|
var cells = row.cells;
|
60313
60719
|
for (var i = 0; i < cells.length; i++) {
|
60314
|
-
matrixrow.push(this.renderCell(cells[i], i, cssClasses));
|
60720
|
+
matrixrow.push(this.renderCell(cells[i], i, cssClasses, reason));
|
60315
60721
|
}
|
60316
60722
|
var key = "row" + keyValue;
|
60317
60723
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], { key: key },
|
60318
60724
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_matrix_row__WEBPACK_IMPORTED_MODULE_7__["MatrixRow"], { model: row, parentMatrix: this.question }, matrixrow)));
|
60319
60725
|
};
|
60320
|
-
SurveyQuestionMatrixDropdownBase.prototype.renderCell = function (cell, index, cssClasses) {
|
60726
|
+
SurveyQuestionMatrixDropdownBase.prototype.renderCell = function (cell, index, cssClasses, reason) {
|
60321
60727
|
var key = "cell" + index;
|
60322
60728
|
if (cell.hasQuestion) {
|
60323
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixDropdownCell, { key: key, cssClasses: cssClasses, cell: cell, creator: this.creator }));
|
60729
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixDropdownCell, { key: key, cssClasses: cssClasses, cell: cell, creator: this.creator, reason: reason }));
|
60324
60730
|
}
|
60325
|
-
var
|
60326
|
-
|
60731
|
+
var calcReason = reason;
|
60732
|
+
if (!calcReason) {
|
60733
|
+
calcReason = cell.hasTitle ? "row-header" : "";
|
60734
|
+
}
|
60735
|
+
var cellContent = this.renderCellContent(cell, calcReason, cssClasses);
|
60327
60736
|
var cellStyle = null;
|
60328
60737
|
if (!!cell.width || !!cell.minWidth) {
|
60329
60738
|
cellStyle = {};
|
@@ -60943,10 +61352,10 @@ var SurveyQuestionPanelDynamic = /** @class */ (function (_super) {
|
|
60943
61352
|
SurveyQuestionPanelDynamic.prototype.renderNavigatorV2 = function () {
|
60944
61353
|
if (this.question.panelCount === 0 || this.question["showLegacyNavigation"])
|
60945
61354
|
return null;
|
60946
|
-
var range = this.question.isRangeShowing && !this.question.isProgressTopShowing ? this.renderRange() : null;
|
60947
61355
|
if (!this.question.cssClasses.footer) {
|
60948
61356
|
return null;
|
60949
61357
|
}
|
61358
|
+
var range = this.question.isRangeShowing && this.question.isProgressBottomShowing ? this.renderRange() : null;
|
60950
61359
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.footer },
|
60951
61360
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("hr", { className: this.question.cssClasses.separator }),
|
60952
61361
|
range,
|
@@ -62495,6 +62904,10 @@ var RendererFactory = /** @class */ (function () {
|
|
62495
62904
|
"use strict";
|
62496
62905
|
__webpack_require__.r(__webpack_exports__);
|
62497
62906
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; });
|
62907
|
+
var columnWidthsByType = {
|
62908
|
+
"file": { minWidth: "240px" },
|
62909
|
+
"comment": { minWidth: "200px" }
|
62910
|
+
};
|
62498
62911
|
/**
|
62499
62912
|
* Global settings that apply to all surveys on the page. To specify one of the settings, use the code below:
|
62500
62913
|
*
|
@@ -62505,6 +62918,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
62505
62918
|
* ```
|
62506
62919
|
*/
|
62507
62920
|
var settings = {
|
62921
|
+
/**
|
62922
|
+
* Specifies an action to perform when users press the Enter key within a survey.
|
62923
|
+
*
|
62924
|
+
* Possible values:
|
62925
|
+
*
|
62926
|
+
* - `"moveToNextEditor"` - Moves focus to the next editor.
|
62927
|
+
* - `"loseFocus"` - Removes focus from the current editor.
|
62928
|
+
* - `"default"` - Behaves as a standard `<input>` element.
|
62929
|
+
*/
|
62930
|
+
enterKeyAction: "default",
|
62508
62931
|
/**
|
62509
62932
|
* An object that configures string comparison.
|
62510
62933
|
*
|
@@ -62941,6 +63364,18 @@ var settings = {
|
|
62941
63364
|
"email",
|
62942
63365
|
"impp",
|
62943
63366
|
]
|
63367
|
+
},
|
63368
|
+
/**
|
63369
|
+
* Contains properties that apply to [Single-Choice](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model), [Multiple-Choice](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list), and [Dynamic Matrix](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model) questions.
|
63370
|
+
*
|
63371
|
+
* Nested properties:
|
63372
|
+
*
|
63373
|
+
* - `columnWidthsByType`: `Object`\
|
63374
|
+
* An object that specifies fixed and minimum column width based on the column type.\
|
63375
|
+
* Example: `settings.matrix.columnWidthsByType = { "tagbox": { minWidth: "240px", width: "300px" } }`
|
63376
|
+
*/
|
63377
|
+
matrix: {
|
63378
|
+
columnWidthsByType: columnWidthsByType
|
62944
63379
|
}
|
62945
63380
|
};
|
62946
63381
|
|
@@ -63488,6 +63923,11 @@ var SurveyElementCore = /** @class */ (function (_super) {
|
|
63488
63923
|
enumerable: false,
|
63489
63924
|
configurable: true
|
63490
63925
|
});
|
63926
|
+
Object.defineProperty(SurveyElementCore.prototype, "titleAriaRole", {
|
63927
|
+
get: function () { return undefined; },
|
63928
|
+
enumerable: false,
|
63929
|
+
configurable: true
|
63930
|
+
});
|
63491
63931
|
Object.defineProperty(SurveyElementCore.prototype, "ariaLabel", {
|
63492
63932
|
get: function () {
|
63493
63933
|
return this.locTitle.renderedHtml;
|
@@ -63846,6 +64286,15 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
63846
64286
|
enumerable: false,
|
63847
64287
|
configurable: true
|
63848
64288
|
});
|
64289
|
+
Object.defineProperty(SurveyElement.prototype, "titleAriaRole", {
|
64290
|
+
get: function () {
|
64291
|
+
if (this.isPage || this.state === "default")
|
64292
|
+
return undefined;
|
64293
|
+
return "button";
|
64294
|
+
},
|
64295
|
+
enumerable: false,
|
64296
|
+
configurable: true
|
64297
|
+
});
|
63849
64298
|
SurveyElement.prototype.setSurveyImpl = function (value, isLight) {
|
63850
64299
|
this.surveyImplValue = value;
|
63851
64300
|
if (!this.surveyImplValue) {
|
@@ -64495,6 +64944,16 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
64495
64944
|
this.toggleState();
|
64496
64945
|
}
|
64497
64946
|
};
|
64947
|
+
Object.defineProperty(SurveyElement.prototype, "additionalTitleToolbar", {
|
64948
|
+
get: function () {
|
64949
|
+
return this.getAdditionalTitleToolbar();
|
64950
|
+
},
|
64951
|
+
enumerable: false,
|
64952
|
+
configurable: true
|
64953
|
+
});
|
64954
|
+
SurveyElement.prototype.getAdditionalTitleToolbar = function () {
|
64955
|
+
return null;
|
64956
|
+
};
|
64498
64957
|
SurveyElement.prototype.getCssTitle = function (cssClasses) {
|
64499
64958
|
var isExpandable = this.state !== "default";
|
64500
64959
|
var numInlineLimit = 4;
|
@@ -64735,9 +65194,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64735
65194
|
*/
|
64736
65195
|
_this.onComplete = _this.addEvent();
|
64737
65196
|
/**
|
64738
|
-
* An event that is raised before the survey displays a [preview](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page). Use this event to cancel the preview.
|
64739
|
-
*
|
65197
|
+
* An event that is raised before the survey displays a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page). Use this event to cancel the preview.
|
64740
65198
|
* @see showPreviewBeforeComplete
|
65199
|
+
* @see showPreview
|
65200
|
+
* @see cancelPreview
|
64741
65201
|
*/
|
64742
65202
|
_this.onShowingPreview = _this.addEvent();
|
64743
65203
|
/**
|
@@ -65023,7 +65483,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
65023
65483
|
* For information on event handler parameters, refer to descriptions within the interface.
|
65024
65484
|
*
|
65025
65485
|
* [View Demo](https://surveyjs.io/form-library/examples/file-delayed-upload/ (linkStyle))
|
65026
|
-
* @see clearFiles
|
65027
65486
|
* @see onDownloadFile
|
65028
65487
|
* @see onUploadFiles
|
65029
65488
|
*/
|
@@ -65362,6 +65821,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
65362
65821
|
_this.createHtmlLocString("completedBeforeHtml", "completingSurveyBefore", htmlCallBack);
|
65363
65822
|
_this.createHtmlLocString("loadingHtml", "loadingSurvey", htmlCallBack);
|
65364
65823
|
_this.createLocalizableString("logo", _this, false);
|
65824
|
+
_this.createLocalizableString("backgroundImage", _this, false);
|
65365
65825
|
_this.createLocalizableString("startSurveyText", _this, false, true);
|
65366
65826
|
_this.createLocalizableString("pagePrevText", _this, false, true);
|
65367
65827
|
_this.createLocalizableString("pageNextText", _this, false, true);
|
@@ -65412,6 +65872,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
65412
65872
|
_this.registerPropertyChangedHandlers(["isLoading", "isCompleted", "isCompletedBefore", "mode", "isStartedState", "currentPage"], function () { _this.updateState(); });
|
65413
65873
|
_this.registerPropertyChangedHandlers(["state", "currentPage", "showPreviewBeforeComplete"], function () { _this.onStateAndCurrentPageChanged(); });
|
65414
65874
|
_this.registerPropertyChangedHandlers(["logo", "logoPosition"], function () { _this.updateHasLogo(); });
|
65875
|
+
_this.registerPropertyChangedHandlers(["backgroundImage"], function () { _this.updateRenderBackgroundImage(); });
|
65415
65876
|
_this.onGetQuestionNo.onCallbacksChanged = function () {
|
65416
65877
|
_this.resetVisibleIndexes();
|
65417
65878
|
};
|
@@ -65581,9 +66042,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
65581
66042
|
};
|
65582
66043
|
Object.defineProperty(SurveyModel.prototype, "pages", {
|
65583
66044
|
/**
|
65584
|
-
* Returns
|
66045
|
+
* Returns an array of all pages in the survey.
|
66046
|
+
*
|
66047
|
+
* To get an array of only visible pages, use the [`visiblePages`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#visiblePages) array.
|
65585
66048
|
* @see PageModel
|
65586
|
-
* @see visiblePages
|
65587
66049
|
*/
|
65588
66050
|
get: function () {
|
65589
66051
|
return this.getPropertyValue("pages");
|
@@ -65789,11 +66251,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
65789
66251
|
});
|
65790
66252
|
Object.defineProperty(SurveyModel.prototype, "calculatedValues", {
|
65791
66253
|
/**
|
65792
|
-
*
|
65793
|
-
* @see CalculatedValue
|
65794
|
-
*
|
65795
|
-
* For more information, refer to [Calculated Values](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#calculated-values).
|
65796
|
-
*
|
66254
|
+
* An array of [calculated values](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#calculated-values).
|
65797
66255
|
*/
|
65798
66256
|
get: function () {
|
65799
66257
|
return this.getPropertyValue("calculatedValues");
|
@@ -65806,7 +66264,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
65806
66264
|
});
|
65807
66265
|
Object.defineProperty(SurveyModel.prototype, "surveyId", {
|
65808
66266
|
/**
|
65809
|
-
*
|
66267
|
+
* The identifier of a survey JSON schema to load from the [SurveyJS Service](https://api.surveyjs.io).
|
66268
|
+
*
|
66269
|
+
* Refer to the following help topic for more information: [Store Survey Results in the SurveyJS Service](https://surveyjs.io/form-library/documentation/handle-survey-results-store#store-survey-results-in-the-surveyjs-service).
|
65810
66270
|
* @see loadSurveyFromService
|
65811
66271
|
* @see onLoadedSurveyFromService
|
65812
66272
|
*/
|
@@ -65821,7 +66281,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
65821
66281
|
});
|
65822
66282
|
Object.defineProperty(SurveyModel.prototype, "surveyPostId", {
|
65823
66283
|
/**
|
65824
|
-
*
|
66284
|
+
* An identifier used to save survey results to the [SurveyJS Service](https://api.surveyjs.io).
|
66285
|
+
*
|
66286
|
+
* Refer to the following help topic for more information: [Store Survey Results in the SurveyJS Service](https://surveyjs.io/form-library/documentation/handle-survey-results-store#store-survey-results-in-the-surveyjs-service).
|
65825
66287
|
* @see onComplete
|
65826
66288
|
* @see surveyShowDataSaving
|
65827
66289
|
*/
|
@@ -65836,9 +66298,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
65836
66298
|
});
|
65837
66299
|
Object.defineProperty(SurveyModel.prototype, "clientId", {
|
65838
66300
|
/**
|
65839
|
-
*
|
65840
|
-
*
|
65841
|
-
* On the second run,
|
66301
|
+
* A user identifier (e-mail or other unique ID).
|
66302
|
+
*
|
66303
|
+
* If your application works with the [SurveyJS Service](https://api.surveyjs.io), the ID ensures that users do not pass the same survey twice. On the second run, they will see the [Completed Before page](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#completedBeforeHtml).
|
66304
|
+
* @see cookieName
|
65842
66305
|
*/
|
65843
66306
|
get: function () {
|
65844
66307
|
return this.getPropertyValue("clientId", "");
|
@@ -65851,9 +66314,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
65851
66314
|
});
|
65852
66315
|
Object.defineProperty(SurveyModel.prototype, "cookieName", {
|
65853
66316
|
/**
|
65854
|
-
*
|
65855
|
-
*
|
65856
|
-
*
|
66317
|
+
* A cookie name used to save information about survey completion.
|
66318
|
+
*
|
66319
|
+
* When this property has a value, the survey creates a cookie with the specified name on completion. This cookie helps ensure that users do not pass the same survey twice. On the second run, they will see the [Completed Before page](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#completedBeforeHtml).
|
66320
|
+
* @see cliendId
|
65857
66321
|
*/
|
65858
66322
|
get: function () {
|
65859
66323
|
return this.getPropertyValue("cookieName", "");
|
@@ -66201,18 +66665,15 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
66201
66665
|
});
|
66202
66666
|
Object.defineProperty(SurveyModel.prototype, "goNextPageAutomatic", {
|
66203
66667
|
/**
|
66204
|
-
*
|
66205
|
-
* The available options:
|
66668
|
+
* Specifies whether the survey switches to the next page automatically after a user answers all questions on the current page.
|
66206
66669
|
*
|
66207
|
-
*
|
66208
|
-
* - `autogonext` - navigate to the next page automatically but do not submit survey data.
|
66209
|
-
* - `false` - do not navigate to the next page and do not submit survey data automatically.
|
66670
|
+
* Default value: `false`
|
66210
66671
|
*
|
66211
|
-
*
|
66672
|
+
* If you enable this property, the survey is also completed automatically. Set the [`allowCompleteSurveyAutomatic`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#allowCompleteSurveyAutomatic) property to `false` if you want to disable this behavior.
|
66212
66673
|
*
|
66213
|
-
*
|
66674
|
+
* > If any of the following questions is answered last, the survey does not switch to the next page: Checkbox, Boolean (rendered as Checkbox), Comment, Signature Pad, Image Picker (with Multi Select), File, Single-Choice Matrix (not all rows are answered), Dynamic Matrix, Panel Dynamic.
|
66214
66675
|
*
|
66215
|
-
* [View Demo](https://surveyjs.io/form-library/examples/
|
66676
|
+
* [View Demo](https://surveyjs.io/form-library/examples/automatically-move-to-next-page-if-answer-selected/ (linkStyle))
|
66216
66677
|
*/
|
66217
66678
|
get: function () {
|
66218
66679
|
return this.getPropertyValue("goNextPageAutomatic");
|
@@ -66225,8 +66686,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
66225
66686
|
});
|
66226
66687
|
Object.defineProperty(SurveyModel.prototype, "allowCompleteSurveyAutomatic", {
|
66227
66688
|
/**
|
66228
|
-
*
|
66229
|
-
*
|
66689
|
+
* Specifies whether to complete the survey automatically after a user answers all questions on the last page. Applies only if the [`goNextPageAutomatic`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#goNextPageAutomatic) property is `true`.
|
66690
|
+
*
|
66691
|
+
* Default value: `true`
|
66230
66692
|
*/
|
66231
66693
|
get: function () {
|
66232
66694
|
return this.getPropertyValue("allowCompleteSurveyAutomatic", true);
|
@@ -66239,14 +66701,15 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
66239
66701
|
});
|
66240
66702
|
Object.defineProperty(SurveyModel.prototype, "checkErrorsMode", {
|
66241
66703
|
/**
|
66242
|
-
*
|
66704
|
+
* Specifies when the survey validates answers.
|
66243
66705
|
*
|
66244
|
-
*
|
66706
|
+
* Possible values:
|
66707
|
+
*
|
66708
|
+
* - `"onNextPage"` (default) - Triggers validation before the survey is switched to the next page or completed.
|
66709
|
+
* - `"onValueChanged"` - Triggers validation each time a question value is changed.
|
66710
|
+
* - `"onComplete"` - Triggers validation when a user clicks the Complete button. If previous pages contain errors, the survey switches to the page with the first error.
|
66245
66711
|
*
|
66246
|
-
*
|
66247
|
-
* - `onValueChanged` - check errors on every question value (i.e., answer) changing.
|
66248
|
-
* - `onValueChanging` - check errors before setting value into survey. If there is an error, then survey data is not changed, but question value will be keeped.
|
66249
|
-
* - `onComplete` - to validate all visible questions on complete button click. If there are errors on previous pages, then the page with the first error becomes the current.
|
66712
|
+
* Refer to the following help topic for more information: [Data Validation](https://surveyjs.io/form-library/documentation/data-validation).
|
66250
66713
|
*/
|
66251
66714
|
get: function () {
|
66252
66715
|
return this.getPropertyValue("checkErrorsMode");
|
@@ -66259,9 +66722,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
66259
66722
|
});
|
66260
66723
|
Object.defineProperty(SurveyModel.prototype, "autoGrowComment", {
|
66261
66724
|
/**
|
66262
|
-
* Specifies whether
|
66263
|
-
*
|
66264
|
-
*
|
66725
|
+
* Specifies whether to increase the height of text areas to accommodate multi-line comments.
|
66726
|
+
*
|
66727
|
+
* Default value: `false`
|
66728
|
+
*
|
66729
|
+
* You can override this property for individual Comment questions: [`autoGrow`](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#autoGrow).
|
66265
66730
|
*/
|
66266
66731
|
get: function () {
|
66267
66732
|
return this.getPropertyValue("autoGrowComment");
|
@@ -66294,15 +66759,17 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
66294
66759
|
});
|
66295
66760
|
Object.defineProperty(SurveyModel.prototype, "clearInvisibleValues", {
|
66296
66761
|
/**
|
66297
|
-
*
|
66762
|
+
* Specifies when to remove values of invisible questions from [survey results](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data).
|
66298
66763
|
*
|
66299
|
-
*
|
66764
|
+
* Possible values:
|
66300
66765
|
*
|
66301
|
-
* - `
|
66302
|
-
* - `onHidden` -
|
66303
|
-
* - `onHiddenContainer` -
|
66304
|
-
* - `
|
66305
|
-
*
|
66766
|
+
* - `"onComplete"` (default) - Clears invisible question values when the survey is complete.
|
66767
|
+
* - `"onHidden"` - Clears a question value when the question becomes invisible. If the question is invisible initially, its value is removed on survey completion.
|
66768
|
+
* - `"onHiddenContainer"` - Clears a question value when the question or its containter (page or panel) becomes invisible. If the question is invisible initially, its value is removed on survey completion.
|
66769
|
+
* - `"none"` - Keeps invisible values in survey results.
|
66770
|
+
* - `true` - Equivalent to `"onComplete"`.
|
66771
|
+
* - `false` - Equivalent to `"none"`.
|
66772
|
+
* @see [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility)
|
66306
66773
|
* @see onComplete
|
66307
66774
|
*/
|
66308
66775
|
get: function () {
|
@@ -66319,21 +66786,19 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
66319
66786
|
configurable: true
|
66320
66787
|
});
|
66321
66788
|
/**
|
66322
|
-
*
|
66323
|
-
*
|
66324
|
-
*
|
66325
|
-
*
|
66326
|
-
*
|
66327
|
-
* @
|
66328
|
-
* @see Page.clearIncorrectValues
|
66329
|
-
* @see Panel.clearIncorrectValues
|
66789
|
+
* Removes values that cannot be assigned to a question, for example, choices unlisted in the `choices` array.
|
66790
|
+
*
|
66791
|
+
* Call this method after you assign new question values in code to ensure that they are acceptable.
|
66792
|
+
*
|
66793
|
+
* > This method does not remove values that fail validation. Call the [`validate()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#validate) method to validate newly assigned values.
|
66794
|
+
* @param removeNonExistingRootKeys Pass `true` to remove values that do not correspond to any question or [calculated value](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#calculated-values).
|
66330
66795
|
*/
|
66331
|
-
SurveyModel.prototype.clearIncorrectValues = function (
|
66332
|
-
if (
|
66796
|
+
SurveyModel.prototype.clearIncorrectValues = function (removeNonExistingRootKeys) {
|
66797
|
+
if (removeNonExistingRootKeys === void 0) { removeNonExistingRootKeys = false; }
|
66333
66798
|
for (var i = 0; i < this.pages.length; i++) {
|
66334
66799
|
this.pages[i].clearIncorrectValues();
|
66335
66800
|
}
|
66336
|
-
if (!
|
66801
|
+
if (!removeNonExistingRootKeys)
|
66337
66802
|
return;
|
66338
66803
|
var data = this.data;
|
66339
66804
|
var hasChanges = false;
|
@@ -66360,7 +66825,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
66360
66825
|
};
|
66361
66826
|
Object.defineProperty(SurveyModel.prototype, "keepIncorrectValues", {
|
66362
66827
|
/**
|
66363
|
-
* Specifies whether to keep values that cannot be assigned to questions, for example, choices unlisted in the choices array.
|
66828
|
+
* Specifies whether to keep values that cannot be assigned to questions, for example, choices unlisted in the `choices` array.
|
66364
66829
|
*
|
66365
66830
|
* > This property cannot be specified in the survey JSON schema. Use dot notation to specify it.
|
66366
66831
|
* @see clearIncorrectValues
|
@@ -66707,14 +67172,58 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
66707
67172
|
enumerable: false,
|
66708
67173
|
configurable: true
|
66709
67174
|
});
|
67175
|
+
Object.defineProperty(SurveyModel.prototype, "backgroundImage", {
|
67176
|
+
/**
|
67177
|
+
* Gets or sets a survey backgroundImage.
|
67178
|
+
*/
|
67179
|
+
get: function () {
|
67180
|
+
return this.getLocalizableStringText("backgroundImage");
|
67181
|
+
},
|
67182
|
+
set: function (value) {
|
67183
|
+
this.setLocalizableStringText("backgroundImage", value);
|
67184
|
+
},
|
67185
|
+
enumerable: false,
|
67186
|
+
configurable: true
|
67187
|
+
});
|
67188
|
+
Object.defineProperty(SurveyModel.prototype, "locBackgroundImage", {
|
67189
|
+
get: function () {
|
67190
|
+
return this.getLocalizableString("backgroundImage");
|
67191
|
+
},
|
67192
|
+
enumerable: false,
|
67193
|
+
configurable: true
|
67194
|
+
});
|
67195
|
+
SurveyModel.prototype.updateRenderBackgroundImage = function () {
|
67196
|
+
this.renderBackgroundImage = ["url(", this.getLocalizableString("backgroundImage").renderedHtml, ")"].join("");
|
67197
|
+
};
|
67198
|
+
Object.defineProperty(SurveyModel.prototype, "backgroundOpacity", {
|
67199
|
+
get: function () {
|
67200
|
+
return this.getPropertyValue("backgroundOpacity");
|
67201
|
+
},
|
67202
|
+
set: function (val) {
|
67203
|
+
this.setPropertyValue("backgroundOpacity", val);
|
67204
|
+
},
|
67205
|
+
enumerable: false,
|
67206
|
+
configurable: true
|
67207
|
+
});
|
67208
|
+
Object.defineProperty(SurveyModel.prototype, "renderBackgroundOpacity", {
|
67209
|
+
get: function () {
|
67210
|
+
var backgroundOpacityProperty = this.getPropertyByName("backgroundOpacity");
|
67211
|
+
if (backgroundOpacityProperty.isDefaultValue(this.backgroundOpacity)) {
|
67212
|
+
return "";
|
67213
|
+
}
|
67214
|
+
var alpha = 1 - this.backgroundOpacity;
|
67215
|
+
return ["rgba(255, 255, 255, ", alpha, ")"].join("");
|
67216
|
+
},
|
67217
|
+
enumerable: false,
|
67218
|
+
configurable: true
|
67219
|
+
});
|
66710
67220
|
Object.defineProperty(SurveyModel.prototype, "completedHtml", {
|
66711
67221
|
/**
|
66712
|
-
*
|
67222
|
+
* HTML content displayed on the [complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page).
|
67223
|
+
*
|
67224
|
+
* [View Demo](https://surveyjs.io/form-library/examples/modify-survey-navigation-settings/ (linkStyle))
|
66713
67225
|
* @see showCompletedPage
|
66714
67226
|
* @see completedHtmlOnCondition
|
66715
|
-
* @see locale
|
66716
|
-
*
|
66717
|
-
* [View Demo](https://surveyjs.io/form-library/examples/survey-options/ (linkStyle))
|
66718
67227
|
*/
|
66719
67228
|
get: function () {
|
66720
67229
|
return this.getLocalizableStringText("completedHtml");
|
@@ -66734,9 +67243,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
66734
67243
|
});
|
66735
67244
|
Object.defineProperty(SurveyModel.prototype, "completedHtmlOnCondition", {
|
66736
67245
|
/**
|
66737
|
-
*
|
66738
|
-
*
|
66739
|
-
*
|
67246
|
+
* An array of objects that allows you to specify different HTML content for the [complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page).
|
67247
|
+
*
|
67248
|
+
* Each object should include the [`expression`](https://surveyjs.io/form-library/documentation/api-reference/htmlconditionitem#expression) and [`html`](https://surveyjs.io/form-library/documentation/api-reference/htmlconditionitem#html) properties. When `expression` evaluates to `true`, the survey uses the corresponding HTML markup instead of [`completedHtml`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#completedHtml). Refer to the following help topic for more information about expressions: [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions).
|
67249
|
+
*
|
67250
|
+
* [View Demo](https://surveyjs.io/form-library/examples/nps-question/ (linkStyle))
|
66740
67251
|
*/
|
66741
67252
|
get: function () {
|
66742
67253
|
return this.getPropertyValue("completedHtmlOnCondition");
|
@@ -66797,9 +67308,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
66797
67308
|
};
|
66798
67309
|
Object.defineProperty(SurveyModel.prototype, "completedBeforeHtml", {
|
66799
67310
|
/**
|
66800
|
-
*
|
67311
|
+
* HTML content displayed to a user who has completed the survey before.
|
66801
67312
|
* @see clientId
|
66802
|
-
* @see
|
67313
|
+
* @see cookieName
|
67314
|
+
* @see processedCompletedBeforeHtml
|
66803
67315
|
*/
|
66804
67316
|
get: function () {
|
66805
67317
|
return this.getLocalizableStringText("completedBeforeHtml");
|
@@ -66819,9 +67331,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
66819
67331
|
});
|
66820
67332
|
Object.defineProperty(SurveyModel.prototype, "loadingHtml", {
|
66821
67333
|
/**
|
66822
|
-
*
|
67334
|
+
* HTML content displayed while a survey JSON schema is being loaded from the [SurveyJS Service](https://api.surveyjs.io).
|
66823
67335
|
* @see surveyId
|
66824
|
-
* @see
|
67336
|
+
* @see processedLoadingHtml
|
66825
67337
|
*/
|
66826
67338
|
get: function () {
|
66827
67339
|
return this.getLocalizableStringText("loadingHtml");
|
@@ -66840,10 +67352,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
66840
67352
|
configurable: true
|
66841
67353
|
});
|
66842
67354
|
Object.defineProperty(SurveyModel.prototype, "defaultLoadingHtml", {
|
66843
|
-
/**
|
66844
|
-
* Default value for loadingHtml property
|
66845
|
-
* @see loadingHtml
|
66846
|
-
*/
|
66847
67355
|
get: function () {
|
66848
67356
|
return "<h3>" + this.getLocalizationString("loadingSurvey") + "</h3>";
|
66849
67357
|
},
|
@@ -66960,11 +67468,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
66960
67468
|
});
|
66961
67469
|
Object.defineProperty(SurveyModel.prototype, "previewText", {
|
66962
67470
|
/**
|
66963
|
-
*
|
66964
|
-
* @see locale
|
67471
|
+
* Gets or sets a caption for the Preview button.
|
66965
67472
|
* @see showPreviewBeforeComplete
|
66966
|
-
* @see editText
|
66967
67473
|
* @see showPreview
|
67474
|
+
* @see editText
|
66968
67475
|
*/
|
66969
67476
|
get: function () {
|
66970
67477
|
return this.getLocalizableStringText("previewText");
|
@@ -66984,11 +67491,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
66984
67491
|
});
|
66985
67492
|
Object.defineProperty(SurveyModel.prototype, "editText", {
|
66986
67493
|
/**
|
66987
|
-
*
|
66988
|
-
* @see locale
|
67494
|
+
* Gets or sets a caption for the Edit button displayed when the survey shows a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
|
66989
67495
|
* @see showPreviewBeforeComplete
|
66990
|
-
* @see previewText
|
66991
67496
|
* @see cancelPreview
|
67497
|
+
* @see previewText
|
66992
67498
|
*/
|
66993
67499
|
get: function () {
|
66994
67500
|
return this.getLocalizableStringText("editText");
|
@@ -67682,8 +68188,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
67682
68188
|
};
|
67683
68189
|
Object.defineProperty(SurveyModel.prototype, "comments", {
|
67684
68190
|
/**
|
67685
|
-
*
|
67686
|
-
* @see
|
68191
|
+
* An object with all comment values.
|
68192
|
+
* @see Question.showCommentArea
|
68193
|
+
* @see storeOthersAsComment
|
67687
68194
|
*/
|
67688
68195
|
get: function () {
|
67689
68196
|
var result = {};
|
@@ -67701,10 +68208,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
67701
68208
|
});
|
67702
68209
|
Object.defineProperty(SurveyModel.prototype, "visiblePages", {
|
67703
68210
|
/**
|
67704
|
-
* Returns
|
67705
|
-
*
|
67706
|
-
*
|
67707
|
-
* @see
|
68211
|
+
* Returns an array of visible pages without the start page.
|
68212
|
+
*
|
68213
|
+
* To get an array of all pages, use the [`pages`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#pages) property. If all pages are visible, the `pages` and `visiblePages` arrays are identical.
|
68214
|
+
* @see [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility)
|
67708
68215
|
*/
|
67709
68216
|
get: function () {
|
67710
68217
|
if (this.isDesignMode)
|
@@ -67742,8 +68249,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
67742
68249
|
});
|
67743
68250
|
Object.defineProperty(SurveyModel.prototype, "pageCount", {
|
67744
68251
|
/**
|
67745
|
-
* Returns
|
67746
|
-
*
|
68252
|
+
* Returns a total number of survey pages.
|
68253
|
+
*
|
68254
|
+
* To get the number of visible pages, use the [`visiblePageCount`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#visiblePageCount) property.
|
67747
68255
|
* @see pages
|
67748
68256
|
*/
|
67749
68257
|
get: function () {
|
@@ -67754,9 +68262,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
67754
68262
|
});
|
67755
68263
|
Object.defineProperty(SurveyModel.prototype, "visiblePageCount", {
|
67756
68264
|
/**
|
67757
|
-
* Returns
|
67758
|
-
*
|
68265
|
+
* Returns the number of visible survey pages.
|
68266
|
+
*
|
68267
|
+
* To get a total number of survey pages, use the [`pageCount`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#pageCount) property.
|
67759
68268
|
* @see visiblePages
|
68269
|
+
* @see [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility)
|
67760
68270
|
*/
|
67761
68271
|
get: function () {
|
67762
68272
|
return this.visiblePages.length;
|
@@ -67766,8 +68276,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
67766
68276
|
});
|
67767
68277
|
Object.defineProperty(SurveyModel.prototype, "startedPage", {
|
67768
68278
|
/**
|
67769
|
-
* Returns the
|
68279
|
+
* Returns the start page. Applies only if the [`firstPageIsStarted`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#firstPageIsStarted) property is set to `true`.
|
68280
|
+
*
|
68281
|
+
* Refer to the following help topic for more information: [Start Page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page).
|
67770
68282
|
* @see firstPageIsStarted
|
68283
|
+
* @see activePage
|
67771
68284
|
*/
|
67772
68285
|
get: function () {
|
67773
68286
|
var page = this.firstPageIsStarted && this.pages.length > 1 ? this.pages[0] : null;
|
@@ -67782,7 +68295,17 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
67782
68295
|
});
|
67783
68296
|
Object.defineProperty(SurveyModel.prototype, "currentPage", {
|
67784
68297
|
/**
|
67785
|
-
* Gets or sets the current
|
68298
|
+
* Gets or sets the current page.
|
68299
|
+
*
|
68300
|
+
* If you want to change the current page, set this property to a `PageModel` object. You can get this object in different ways. For example, you can call the [`getPageByName()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#getPageByName) method to obtain a `PageModel` object with a specific name:
|
68301
|
+
*
|
68302
|
+
* ```js
|
68303
|
+
* survey.currentPage = survey.getPageByName("my-page-name");
|
68304
|
+
* ```
|
68305
|
+
*
|
68306
|
+
* Alternatively, you can change the current page if you set the [`currentPageNo`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#currentPageNo) property to the index of the required page.
|
68307
|
+
*
|
68308
|
+
* The `currentPage` property does not return the start page even if it is current. Use the [`activePage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#activePage) property instead if your survey contains a start page.
|
67786
68309
|
*/
|
67787
68310
|
get: function () {
|
67788
68311
|
return this.getPropertyValue("currentPage", null);
|
@@ -67835,10 +68358,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
67835
68358
|
};
|
67836
68359
|
Object.defineProperty(SurveyModel.prototype, "activePage", {
|
67837
68360
|
/**
|
67838
|
-
* Returns
|
68361
|
+
* Returns [`startedPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#startedPage) if the survey currently displays a start page; otherwise, returns [`currentPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#currentPage).
|
68362
|
+
* @see startedPage
|
67839
68363
|
* @see currentPage
|
67840
68364
|
* @see firstPageIsStarted
|
67841
|
-
* @see startedPage
|
67842
68365
|
*/
|
67843
68366
|
get: function () {
|
67844
68367
|
return this.getPropertyValue("activePage");
|
@@ -67892,9 +68415,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
67892
68415
|
};
|
67893
68416
|
Object.defineProperty(SurveyModel.prototype, "currentPageNo", {
|
67894
68417
|
/**
|
67895
|
-
*
|
68418
|
+
* A zero-based index of the current page in the [`visiblePages`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#visiblePages) array.
|
67896
68419
|
*
|
67897
68420
|
* [View Demo](https://surveyjs.io/form-library/examples/survey-editprevious/ (linkStyle))
|
68421
|
+
* @see visiblePages
|
67898
68422
|
*/
|
67899
68423
|
get: function () {
|
67900
68424
|
return this.visiblePages.indexOf(this.currentPage);
|
@@ -67910,13 +68434,16 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
67910
68434
|
});
|
67911
68435
|
Object.defineProperty(SurveyModel.prototype, "questionsOrder", {
|
67912
68436
|
/**
|
67913
|
-
*
|
68437
|
+
* Specifies the sort order of questions in the survey.
|
67914
68438
|
*
|
67915
|
-
*
|
68439
|
+
* Possible values:
|
67916
68440
|
*
|
67917
|
-
* - `
|
67918
|
-
* - `
|
67919
|
-
*
|
68441
|
+
* - `"initial"` (default) - Preserves the original order of questions.
|
68442
|
+
* - `"random"` - Displays questions in random order.
|
68443
|
+
*
|
68444
|
+
* You can override this property for individual pages and panels.
|
68445
|
+
* @see PageModel.questionsOrder
|
68446
|
+
* @see PanelModel.questionsOrder
|
67920
68447
|
*/
|
67921
68448
|
get: function () {
|
67922
68449
|
return this.getPropertyValue("questionsOrder");
|
@@ -68076,16 +68603,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
68076
68603
|
this.notifier.notify(message, type, type === "error");
|
68077
68604
|
};
|
68078
68605
|
/**
|
68079
|
-
*
|
68080
|
-
* @param clearData clear
|
68081
|
-
* @param
|
68082
|
-
* @see data
|
68083
|
-
* @see state
|
68084
|
-
* @see currentPage
|
68606
|
+
* 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"`.
|
68607
|
+
* @param clearData *Optional.* Specifies whether to clear survey data. Default value: `true`.
|
68608
|
+
* @param goToFirstPage *Optional.* Specifies whether to switch the survey to the first page. Default value: `true`.
|
68085
68609
|
*/
|
68086
|
-
SurveyModel.prototype.clear = function (clearData,
|
68610
|
+
SurveyModel.prototype.clear = function (clearData, goToFirstPage) {
|
68087
68611
|
if (clearData === void 0) { clearData = true; }
|
68088
|
-
if (
|
68612
|
+
if (goToFirstPage === void 0) { goToFirstPage = true; }
|
68089
68613
|
this.isCompleted = false;
|
68090
68614
|
this.isCompletedBefore = false;
|
68091
68615
|
this.isLoading = false;
|
@@ -68101,7 +68625,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
68101
68625
|
this.pages[i].passed = false;
|
68102
68626
|
}
|
68103
68627
|
this.onFirstPageIsStartedChanged();
|
68104
|
-
if (
|
68628
|
+
if (goToFirstPage) {
|
68105
68629
|
this.currentPage = this.firstVisiblePage;
|
68106
68630
|
}
|
68107
68631
|
if (clearData) {
|
@@ -68127,14 +68651,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
68127
68651
|
page.updateCustomWidgets();
|
68128
68652
|
};
|
68129
68653
|
SurveyModel.prototype.currentPageChanging = function (newValue, oldValue) {
|
68130
|
-
var options =
|
68131
|
-
|
68132
|
-
|
68133
|
-
allowChanging: true,
|
68134
|
-
allow: true,
|
68135
|
-
isNextPage: this.isNextPage(newValue, oldValue),
|
68136
|
-
isPrevPage: this.isPrevPage(newValue, oldValue),
|
68137
|
-
};
|
68654
|
+
var options = this.createPageChangeEventOptions(newValue, oldValue);
|
68655
|
+
options.allow = true;
|
68656
|
+
options.allowChanging = true;
|
68138
68657
|
this.onCurrentPageChanging.fire(this, options);
|
68139
68658
|
var allow = options.allowChanging && options.allow;
|
68140
68659
|
if (allow) {
|
@@ -68143,26 +68662,22 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
68143
68662
|
return allow;
|
68144
68663
|
};
|
68145
68664
|
SurveyModel.prototype.currentPageChanged = function (newValue, oldValue) {
|
68146
|
-
var
|
68147
|
-
if (isNextPage) {
|
68665
|
+
var options = this.createPageChangeEventOptions(newValue, oldValue);
|
68666
|
+
if (options.isNextPage) {
|
68148
68667
|
oldValue.passed = true;
|
68149
68668
|
}
|
68150
|
-
this.onCurrentPageChanged.fire(this,
|
68669
|
+
this.onCurrentPageChanged.fire(this, options);
|
68670
|
+
};
|
68671
|
+
SurveyModel.prototype.createPageChangeEventOptions = function (newValue, oldValue) {
|
68672
|
+
var diff = !!newValue && !!oldValue ? newValue.visibleIndex - oldValue.visibleIndex : 0;
|
68673
|
+
return {
|
68151
68674
|
oldCurrentPage: oldValue,
|
68152
68675
|
newCurrentPage: newValue,
|
68153
|
-
isNextPage:
|
68154
|
-
isPrevPage:
|
68155
|
-
|
68156
|
-
|
68157
|
-
|
68158
|
-
if (!newValue || !oldValue)
|
68159
|
-
return false;
|
68160
|
-
return newValue.visibleIndex == oldValue.visibleIndex + 1;
|
68161
|
-
};
|
68162
|
-
SurveyModel.prototype.isPrevPage = function (newValue, oldValue) {
|
68163
|
-
if (!newValue || !oldValue)
|
68164
|
-
return false;
|
68165
|
-
return newValue.visibleIndex + 1 == oldValue.visibleIndex;
|
68676
|
+
isNextPage: diff === 1,
|
68677
|
+
isPrevPage: diff === -1,
|
68678
|
+
isGoingForward: diff > 0,
|
68679
|
+
isGoingBackward: diff < 0
|
68680
|
+
};
|
68166
68681
|
};
|
68167
68682
|
/**
|
68168
68683
|
* Returns the progress that a user made while going through the survey.
|
@@ -68707,11 +69222,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
68707
69222
|
return true;
|
68708
69223
|
};
|
68709
69224
|
/**
|
68710
|
-
* Completes the survey
|
68711
|
-
*
|
69225
|
+
* Completes the survey if it currently displays the last page and the page contains no validation errors. If both these conditions are met, this method returns `true`; otherwise, `false`.
|
69226
|
+
*
|
69227
|
+
* If you want to complete the survey regardless of the current page and validation errors, use the [`doComplete()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#completeLastPage) event.
|
68712
69228
|
* @see isCurrentPageValid
|
68713
69229
|
* @see nextPage
|
68714
|
-
* @see doComplete
|
68715
69230
|
*/
|
68716
69231
|
SurveyModel.prototype.completeLastPage = function () {
|
68717
69232
|
var res = this.doCurrentPageComplete(true);
|
@@ -68738,14 +69253,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
68738
69253
|
return this.navigationMouseDown();
|
68739
69254
|
};
|
68740
69255
|
/**
|
68741
|
-
*
|
68742
|
-
*
|
68743
|
-
* Details: [Preview State](https://surveyjs.io/Documentation/Library#states-preview)
|
68744
|
-
* @see showPreviewBeforeComplete
|
69256
|
+
* Displays a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page). Returns `false` if the preview cannot be displayed because of validation errors.
|
68745
69257
|
* @see cancelPreview
|
69258
|
+
* @see showPreviewBeforeComplete
|
69259
|
+
* @see onShowingPreview
|
68746
69260
|
* @see state
|
68747
|
-
* @see previewText
|
68748
|
-
* @see editText
|
68749
69261
|
*/
|
68750
69262
|
SurveyModel.prototype.showPreview = function () {
|
68751
69263
|
this.resetNavigationButton();
|
@@ -68762,12 +69274,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
68762
69274
|
this.isShowingPreview = options.allowShowPreview && options.allow;
|
68763
69275
|
};
|
68764
69276
|
/**
|
68765
|
-
* Cancels preview and switches
|
68766
|
-
*
|
68767
|
-
* Details: [Preview State](https://surveyjs.io/Documentation/Library#states-preview)
|
68768
|
-
* @param curPage - A new current page. If the parameter is undefined then the last page becomes the current.
|
68769
|
-
* @see showPreviewBeforeComplete
|
69277
|
+
* Cancels a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page) and switches the survey to the page specified by the `curPage` parameter.
|
69278
|
+
* @param curPage A new current page. If you do not specify this parameter, the survey displays the last page.
|
68770
69279
|
* @see showPreview
|
69280
|
+
* @see showPreviewBeforeComplete
|
68771
69281
|
* @see state
|
68772
69282
|
*/
|
68773
69283
|
SurveyModel.prototype.cancelPreview = function (curPage) {
|
@@ -68834,8 +69344,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
68834
69344
|
});
|
68835
69345
|
Object.defineProperty(SurveyModel.prototype, "firstPageIsStarted", {
|
68836
69346
|
/**
|
68837
|
-
* Gets or sets
|
68838
|
-
*
|
69347
|
+
* Gets or sets a Boolean value that specifies whether the first page is a start page.
|
69348
|
+
*
|
69349
|
+
* Refer to the following help topic for more information: [Start Page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page).
|
69350
|
+
* @see startedPage
|
69351
|
+
* @see activePage
|
68839
69352
|
*/
|
68840
69353
|
get: function () {
|
68841
69354
|
return this.getPropertyValue("firstPageIsStarted");
|
@@ -69119,26 +69632,19 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
69119
69632
|
/**
|
69120
69633
|
* Completes the survey.
|
69121
69634
|
*
|
69122
|
-
*
|
69635
|
+
* When you call this method, Form Library performs the following actions:
|
69123
69636
|
*
|
69124
|
-
*
|
69125
|
-
*
|
69126
|
-
*
|
69127
|
-
* -
|
69637
|
+
* 1. Saves a cookie if the [`cookieName`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#cookieName) property is set.
|
69638
|
+
* 1. Switches the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) to `"completed"`.
|
69639
|
+
* 1. Raises the [`onComplete`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onComplete) event.
|
69640
|
+
* 1. Navigates the user to a URL specified by the [`navigateToUrl`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#navigateToUrl) or [`navigateToUrlOnCondition`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#navigateToUrlOnCondition) property.
|
69641
|
+
* 1. Calls the [`sendResult()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#sendResult) method if Form Library works with the [SurveyJS Service](https://api.surveyjs.io/).
|
69128
69642
|
*
|
69129
|
-
*
|
69130
|
-
*
|
69131
|
-
*
|
69132
|
-
*
|
69133
|
-
* @see completeLastPage
|
69134
|
-
* @see onCompleting
|
69135
|
-
* @see cookieName
|
69136
|
-
* @see state
|
69137
|
-
* @see onComplete
|
69643
|
+
* The `doComplete()` method completes the survey regardless of validation errors and the current page. If you need to ensure that survey results are valid and full, call the [`completeLastPage()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#completeLastPage) method instead.
|
69644
|
+
*
|
69645
|
+
* @param isCompleteOnTrigger For internal use.
|
69646
|
+
* @returns `false` if survey completion is cancelled within the [`onCompleting`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onCompleting) event handler; otherwise, `true`.
|
69138
69647
|
* @see surveyPostId
|
69139
|
-
* @see completeLastPage
|
69140
|
-
* @see navigateToUrl
|
69141
|
-
* @see navigateToUrlOnCondition
|
69142
69648
|
*/
|
69143
69649
|
SurveyModel.prototype.doComplete = function (isCompleteOnTrigger) {
|
69144
69650
|
if (isCompleteOnTrigger === void 0) { isCompleteOnTrigger = false; }
|
@@ -69856,13 +70362,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
69856
70362
|
callback: callback,
|
69857
70363
|
});
|
69858
70364
|
};
|
69859
|
-
/**
|
69860
|
-
* Clears files from server.
|
69861
|
-
* @param question question
|
69862
|
-
* @param name question name
|
69863
|
-
* @param value file question value
|
69864
|
-
* @param callback call back function to get the status of the clearing operation
|
69865
|
-
*/
|
69866
70365
|
SurveyModel.prototype.clearFiles = function (question, name, value, fileName, callback) {
|
69867
70366
|
if (this.onClearFiles.isEmpty) {
|
69868
70367
|
!!callback && callback("success", value);
|
@@ -69919,9 +70418,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
69919
70418
|
};
|
69920
70419
|
/**
|
69921
70420
|
* Adds an existing page to the survey.
|
69922
|
-
* @param page
|
69923
|
-
* @param index
|
70421
|
+
* @param page A page to add.
|
70422
|
+
* @param index An index at which to insert the page. If you do not specify this parameter, the page will be added to the end.
|
69924
70423
|
* @see addNewPage
|
70424
|
+
* @see createNewPage
|
69925
70425
|
*/
|
69926
70426
|
SurveyModel.prototype.addPage = function (page, index) {
|
69927
70427
|
if (index === void 0) { index = -1; }
|
@@ -69935,10 +70435,12 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
69935
70435
|
}
|
69936
70436
|
};
|
69937
70437
|
/**
|
69938
|
-
* Creates a new page and adds it to
|
69939
|
-
* @param name
|
69940
|
-
* @param index
|
70438
|
+
* Creates a new page and adds it to the survey.
|
70439
|
+
* @param name A page name. If you do not specify this parameter, it will be generated automatically.
|
70440
|
+
* @param index An index at which to insert the page. If you do not specify this parameter, the page will be added to the end.
|
70441
|
+
* @returns The created and added page.
|
69941
70442
|
* @see addPage
|
70443
|
+
* @see createNewPage
|
69942
70444
|
*/
|
69943
70445
|
SurveyModel.prototype.addNewPage = function (name, index) {
|
69944
70446
|
if (name === void 0) { name = null; }
|
@@ -70154,8 +70656,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
70154
70656
|
return result;
|
70155
70657
|
};
|
70156
70658
|
/**
|
70157
|
-
* Creates and returns a new page
|
70158
|
-
*
|
70659
|
+
* Creates and returns a new page but does not add it to the survey.
|
70660
|
+
*
|
70661
|
+
* Call the [`addPage(page)`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#addPage) method to add the created page to the survey later or the [`addNewPage(name, index)`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#addNewPage) method to create _and_ add a page to the survey.
|
70159
70662
|
* @see addPage
|
70160
70663
|
* @see addNewPage
|
70161
70664
|
*/
|
@@ -70617,6 +71120,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
70617
71120
|
this.isEndLoadingFromJson = null;
|
70618
71121
|
this.updateVisibleIndexes();
|
70619
71122
|
this.updateHasLogo();
|
71123
|
+
this.updateRenderBackgroundImage();
|
70620
71124
|
this.updateCurrentPage();
|
70621
71125
|
this.hasDescription = !!this.description;
|
70622
71126
|
this.setCalculatedWidthModeUpdater();
|
@@ -71094,8 +71598,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
71094
71598
|
};
|
71095
71599
|
Object.defineProperty(SurveyModel.prototype, "clearValueOnDisableItems", {
|
71096
71600
|
/**
|
71097
|
-
*
|
71098
|
-
*
|
71601
|
+
* Specifies whether to remove disabled choices from the value in [Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model), [Checkboxes](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model), and [Radio Button Group](https://surveyjs.io/form-library/documentation/api-reference/radio-button-question-model) questions.
|
71602
|
+
*
|
71603
|
+
* Default value: `false`
|
71604
|
+
*
|
71605
|
+
* > This property cannot be specified in the survey JSON schema. Use dot notation to specify it.
|
71099
71606
|
*/
|
71100
71607
|
get: function () {
|
71101
71608
|
return this.getPropertyValue("clearValueOnDisableItems", false);
|
@@ -71829,6 +72336,20 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
71829
72336
|
}
|
71830
72337
|
return true;
|
71831
72338
|
};
|
72339
|
+
SurveyModel.prototype.questionEditFinishCallback = function (question, event) {
|
72340
|
+
if (_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].enterKeyAction == "loseFocus")
|
72341
|
+
event.target.blur();
|
72342
|
+
if (_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].enterKeyAction == "moveToNextEditor") {
|
72343
|
+
var allQuestions = this.currentPage.questions;
|
72344
|
+
var questionIndex = allQuestions.indexOf(question);
|
72345
|
+
if (questionIndex > -1 && questionIndex < allQuestions.length - 1) {
|
72346
|
+
allQuestions[questionIndex + 1].focus();
|
72347
|
+
}
|
72348
|
+
else {
|
72349
|
+
event.target.blur();
|
72350
|
+
}
|
72351
|
+
}
|
72352
|
+
};
|
71832
72353
|
SurveyModel.prototype.getElementWrapperComponentName = function (element, reason) {
|
71833
72354
|
if (reason === "logo-image") {
|
71834
72355
|
return "sv-logo-image";
|
@@ -71942,7 +72463,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
71942
72463
|
}
|
71943
72464
|
}
|
71944
72465
|
}
|
71945
|
-
else if (isStrCiEqual(layoutElement.id, "toc-navigation") && this.showTOC) {
|
72466
|
+
else if (!this.isShowingPreview && isStrCiEqual(layoutElement.id, "toc-navigation") && this.showTOC) {
|
71946
72467
|
if (container === "left") {
|
71947
72468
|
if (["left", "both"].indexOf(this.tocLocation) !== -1) {
|
71948
72469
|
containerLayoutElements.push(layoutElement);
|
@@ -71996,6 +72517,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
71996
72517
|
__decorate([
|
71997
72518
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
71998
72519
|
], SurveyModel.prototype, "_isMobile", void 0);
|
72520
|
+
__decorate([
|
72521
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
72522
|
+
], SurveyModel.prototype, "renderBackgroundImage", void 0);
|
71999
72523
|
__decorate([
|
72000
72524
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
72001
72525
|
], SurveyModel.prototype, "rootCss", void 0);
|
@@ -72241,6 +72765,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
72241
72765
|
choices: ["auto", "static", "responsive"],
|
72242
72766
|
},
|
72243
72767
|
"width",
|
72768
|
+
{ name: "backgroundImage", serializationProperty: "locBackgroundImage", visible: false },
|
72769
|
+
{ name: "backgroundOpacity:number", minValue: 0, maxValue: 1, default: 1, visible: false },
|
72244
72770
|
{ name: "showBrandInfo:boolean", default: false, visible: false }
|
72245
72771
|
]);
|
72246
72772
|
|
@@ -72654,13 +73180,14 @@ var SurveyTimerModel = /** @class */ (function (_super) {
|
|
72654
73180
|
/*!**************************!*\
|
72655
73181
|
!*** ./src/surveyToc.ts ***!
|
72656
73182
|
\**************************/
|
72657
|
-
/*! exports provided: tryNavigateToPage, createTOCListModel */
|
73183
|
+
/*! exports provided: tryNavigateToPage, createTOCListModel, getTocRootCss */
|
72658
73184
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
72659
73185
|
|
72660
73186
|
"use strict";
|
72661
73187
|
__webpack_require__.r(__webpack_exports__);
|
72662
73188
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tryNavigateToPage", function() { return tryNavigateToPage; });
|
72663
73189
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createTOCListModel", function() { return createTOCListModel; });
|
73190
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTocRootCss", function() { return getTocRootCss; });
|
72664
73191
|
/* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./actions/action */ "./src/actions/action.ts");
|
72665
73192
|
/* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./list */ "./src/list.ts");
|
72666
73193
|
|
@@ -72704,6 +73231,9 @@ function createTOCListModel(survey) {
|
|
72704
73231
|
});
|
72705
73232
|
return listModel;
|
72706
73233
|
}
|
73234
|
+
function getTocRootCss(survey) {
|
73235
|
+
return "sv_progress-toc" + (" sv_progress-toc--" + (survey.tocLocation || "").toLowerCase());
|
73236
|
+
}
|
72707
73237
|
|
72708
73238
|
|
72709
73239
|
/***/ }),
|