survey-react 1.9.96 → 1.9.98
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 +71 -19
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +41 -15
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +7 -5
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +96 -21
- package/survey.react.js +410 -194
- 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.98
|
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
|
*/
|
@@ -1291,7 +1291,7 @@ var AdaptiveActionContainer = /** @class */ (function (_super) {
|
|
1291
1291
|
}
|
1292
1292
|
};
|
1293
1293
|
AdaptiveActionContainer.prototype.initResponsivityManager = function (container) {
|
1294
|
-
this.responsivityManager = new _utils_responsivity_manager__WEBPACK_IMPORTED_MODULE_0__["ResponsivityManager"](container, this, "
|
1294
|
+
this.responsivityManager = new _utils_responsivity_manager__WEBPACK_IMPORTED_MODULE_0__["ResponsivityManager"](container, this, ":scope > .sv-action:not(.sv-dots) > .sv-action__content");
|
1295
1295
|
};
|
1296
1296
|
AdaptiveActionContainer.prototype.resetResponsivityManager = function () {
|
1297
1297
|
if (!!this.responsivityManager) {
|
@@ -2921,7 +2921,7 @@ var CalculatedValue = /** @class */ (function (_super) {
|
|
2921
2921
|
return;
|
2922
2922
|
this.expressionRunner = new _conditions__WEBPACK_IMPORTED_MODULE_2__["ExpressionRunner"](this.expression);
|
2923
2923
|
this.expressionRunner.onRunComplete = function (newValue) {
|
2924
|
-
if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(newValue, _this.value)) {
|
2924
|
+
if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(newValue, _this.value, false, true)) {
|
2925
2925
|
_this.setValue(newValue);
|
2926
2926
|
}
|
2927
2927
|
_this.unlocCalculation();
|
@@ -5102,6 +5102,7 @@ var defaultV2Css = {
|
|
5102
5102
|
root: "sd-root-modern",
|
5103
5103
|
rootMobile: "sd-root-modern--mobile",
|
5104
5104
|
rootReadOnly: "sd-root--readonly",
|
5105
|
+
rootBackgroundImage: "sd-root_background-image",
|
5105
5106
|
container: "sd-container-modern",
|
5106
5107
|
header: "sd-title sd-container-modern__title",
|
5107
5108
|
bodyContainer: "sv-components-row",
|
@@ -5405,7 +5406,7 @@ var defaultV2Css = {
|
|
5405
5406
|
root: "sd-selectbase",
|
5406
5407
|
popup: "sv-dropdown-popup",
|
5407
5408
|
small: "sd-row__question--small",
|
5408
|
-
selectWrapper: "",
|
5409
|
+
selectWrapper: "sv-dropdown_select-wrapper",
|
5409
5410
|
other: "sd-input sd-comment sd-selectbase__other",
|
5410
5411
|
onError: "sd-input--error",
|
5411
5412
|
label: "sd-selectbase__label",
|
@@ -5418,6 +5419,9 @@ var defaultV2Css = {
|
|
5418
5419
|
cleanButton: "sd-dropdown_clean-button",
|
5419
5420
|
cleanButtonSvg: "sd-dropdown_clean-button-svg",
|
5420
5421
|
cleanButtonIconId: "icon-clear",
|
5422
|
+
chevronButton: "sd-dropdown_chevron-button",
|
5423
|
+
chevronButtonSvg: "sd-dropdown_chevron-button-svg",
|
5424
|
+
chevronButtonIconId: "icon-chevron",
|
5421
5425
|
control: "sd-input sd-dropdown",
|
5422
5426
|
controlInputFieldComponent: "sd-dropdown__input-field-component",
|
5423
5427
|
controlValue: "sd-dropdown__value",
|
@@ -5576,10 +5580,14 @@ var defaultV2Css = {
|
|
5576
5580
|
itemFixedSize: "sd-rating__item--fixed-size",
|
5577
5581
|
control: "sd-input sd-dropdown",
|
5578
5582
|
itemSmall: "sd-rating--small",
|
5583
|
+
selectWrapper: "sv-dropdown_select-wrapper",
|
5579
5584
|
controlValue: "sd-dropdown__value",
|
5580
5585
|
controlDisabled: "sd-input--disabled",
|
5581
5586
|
controlEmpty: "sd-dropdown--empty",
|
5582
5587
|
filterStringInput: "sd-dropdown__filter-string-input",
|
5588
|
+
chevronButton: "sd-dropdown_chevron-button",
|
5589
|
+
chevronButtonSvg: "sd-dropdown_chevron-button-svg",
|
5590
|
+
chevronButtonIconId: "icon-chevron",
|
5583
5591
|
popup: "sv-dropdown-popup",
|
5584
5592
|
onError: "sd-input--error",
|
5585
5593
|
},
|
@@ -5674,6 +5682,7 @@ var defaultV2Css = {
|
|
5674
5682
|
itemIndex: "sv-ranking-item__index sd-ranking-item__index",
|
5675
5683
|
itemIndexEmptyMode: "sv-ranking-item__index--empty sd-ranking-item__index--empty",
|
5676
5684
|
// itemText: "sv-ranking-item__text",
|
5685
|
+
itemDisabled: "sv-ranking-item--disabled",
|
5677
5686
|
controlLabel: "sv-ranking-item__text",
|
5678
5687
|
itemGhostNode: "sv-ranking-item__ghost",
|
5679
5688
|
itemIconContainer: "sv-ranking-item__icon-container",
|
@@ -5727,7 +5736,7 @@ var defaultV2Css = {
|
|
5727
5736
|
root: "sd-selectbase",
|
5728
5737
|
popup: "sv-dropdown-popup",
|
5729
5738
|
small: "sd-row__question--small",
|
5730
|
-
selectWrapper: "",
|
5739
|
+
selectWrapper: "sv-dropdown_select-wrapper",
|
5731
5740
|
other: "sd-input sd-comment sd-selectbase__other",
|
5732
5741
|
onError: "sd-input--error",
|
5733
5742
|
label: "sd-selectbase__label",
|
@@ -5744,6 +5753,9 @@ var defaultV2Css = {
|
|
5744
5753
|
cleanItemButton: "sd-tagbox-item_clean-button",
|
5745
5754
|
cleanItemButtonSvg: "sd-tagbox-item_clean-button-svg",
|
5746
5755
|
cleanItemButtonIconId: "icon-clear_16x16",
|
5756
|
+
chevronButton: "sd-dropdown_chevron-button",
|
5757
|
+
chevronButtonSvg: "sd-dropdown_chevron-button-svg",
|
5758
|
+
chevronButtonIconId: "icon-chevron",
|
5747
5759
|
control: "sd-input sd-tagbox sd-dropdown",
|
5748
5760
|
controlValue: "sd-tagbox__value sd-dropdown__value",
|
5749
5761
|
controlValueItems: "sd-tagbox__value-items",
|
@@ -6292,12 +6304,12 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
6292
6304
|
}
|
6293
6305
|
var draggedElementShortcut = document.createElement("div");
|
6294
6306
|
// draggedElementShortcut.innerText = text;
|
6295
|
-
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 10000;\n font-family: var(--font-family,
|
6307
|
+
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 10000;\n font-family: var(--font-family, 'Open Sans');\n ";
|
6296
6308
|
var isDeepClone = true;
|
6297
6309
|
var clone = (draggedElementNode
|
6298
6310
|
.closest("[data-sv-drop-target-item-value]")
|
6299
6311
|
.cloneNode(isDeepClone));
|
6300
|
-
clone.style.cssText = "\n min-width: 100px;\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);\n background-color: var(--background,
|
6312
|
+
clone.style.cssText = "\n min-width: 100px;\n box-shadow: var(--sjs-shadow-large, 0px 8px 16px 0px rgba(0, 0, 0, 0.1)), var(--sjs-shadow-medium, 0px 2px 6px 0px rgba(0, 0, 0, 0.1));\n background-color: var(--sjs-general-backcolor, var(--background, #fff));\n border-radius: calc(4.5 * var(--sjs-base-unit, var(--base-unit, 8px)));\n padding-right: calc(2* var(--sjs-base-unit, var(--base-unit, 8px)));\n margin-left: 0;\n ";
|
6301
6313
|
var dragIcon = clone.querySelector(".svc-item-value-controls__drag-icon");
|
6302
6314
|
dragIcon.style.visibility = "visible";
|
6303
6315
|
var removeIcon = clone.querySelector(".svc-item-value-controls__remove");
|
@@ -6315,7 +6327,7 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
6315
6327
|
};
|
6316
6328
|
DragDropChoices.prototype.createImagePickerShortcut = function (item, text, draggedElementNode, event) {
|
6317
6329
|
var draggedElementShortcut = document.createElement("div");
|
6318
|
-
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 10000;\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1), 0px 2px 6px rgba(0, 0, 0, 0.1);\n
|
6330
|
+
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 10000;\n box-shadow: var(--sjs-shadow-large, 0px 8px 16px 0px rgba(0, 0, 0, 0.1)), var(--sjs-shadow-medium, 0px 2px 6px 0px rgba(0, 0, 0, 0.1));\n background-color: var(--sjs-general-backcolor, var(--background, #fff));\n padding: calc(0.5 * var(--sjs-base-unit, var(--base-unit, 8px)));\n border-radius: calc(0.5 * var(--sjs-base-unit, var(--base-unit, 8px)));\n ";
|
6319
6331
|
var itemValueNode = draggedElementNode.closest("[data-sv-drop-target-item-value]");
|
6320
6332
|
var controlsNode = itemValueNode.querySelector(".svc-image-item-value-controls");
|
6321
6333
|
var imageContainerNode = itemValueNode.querySelector(".sd-imagepicker__image-container");
|
@@ -6486,7 +6498,9 @@ var DragDropCore = /** @class */ (function () {
|
|
6486
6498
|
configurable: true
|
6487
6499
|
});
|
6488
6500
|
DragDropCore.prototype.startDrag = function (event, draggedElement, parentElement, draggedElementNode, preventSaveTargetNode) {
|
6501
|
+
var _a;
|
6489
6502
|
if (preventSaveTargetNode === void 0) { preventSaveTargetNode = false; }
|
6503
|
+
this.domAdapter.rootContainer = (_a = this.survey) === null || _a === void 0 ? void 0 : _a.rootElement;
|
6490
6504
|
this.domAdapter.startDrag(event, draggedElement, parentElement, draggedElementNode, preventSaveTargetNode);
|
6491
6505
|
};
|
6492
6506
|
DragDropCore.prototype.dragInit = function (event, draggedElement, parentElement, draggedElementNode) {
|
@@ -6494,9 +6508,9 @@ var DragDropCore = /** @class */ (function () {
|
|
6494
6508
|
this.parentElement = parentElement;
|
6495
6509
|
var shortcutText = this.getShortcutText(this.draggedElement);
|
6496
6510
|
this.domAdapter.draggedElementShortcut = this.createDraggedElementShortcut(shortcutText, draggedElementNode, event);
|
6497
|
-
this.onStartDrag();
|
6511
|
+
this.onStartDrag(event);
|
6498
6512
|
};
|
6499
|
-
DragDropCore.prototype.onStartDrag = function () {
|
6513
|
+
DragDropCore.prototype.onStartDrag = function (event) {
|
6500
6514
|
};
|
6501
6515
|
DragDropCore.prototype.isDropTargetDoesntChanged = function (newIsBottom) {
|
6502
6516
|
return (this.dropTarget === this.prevDropTarget && newIsBottom === this.isBottom);
|
@@ -6674,12 +6688,12 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
6674
6688
|
if (_utils_devices__WEBPACK_IMPORTED_MODULE_1__["IsTouch"]) {
|
6675
6689
|
_this.draggedElementShortcut.removeEventListener("contextmenu", _this.onContextMenu);
|
6676
6690
|
}
|
6677
|
-
|
6691
|
+
_this.draggedElementShortcut.parentElement.removeChild(_this.draggedElementShortcut);
|
6678
6692
|
_this.dd.clear();
|
6679
6693
|
_this.draggedElementShortcut = null;
|
6680
6694
|
_this.scrollIntervalId = null;
|
6681
6695
|
if (_utils_devices__WEBPACK_IMPORTED_MODULE_1__["IsTouch"]) {
|
6682
|
-
_this.savedTargetNode &&
|
6696
|
+
_this.savedTargetNode && _this.savedTargetNode.parentElement.removeChild(_this.savedTargetNode);
|
6683
6697
|
DragDropDOMAdapter.PreventScrolling = false;
|
6684
6698
|
}
|
6685
6699
|
document.body.style.setProperty("touch-action", "");
|
@@ -6692,6 +6706,18 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
6692
6706
|
};
|
6693
6707
|
this.draggedElementShortcut = null;
|
6694
6708
|
}
|
6709
|
+
Object.defineProperty(DragDropDOMAdapter.prototype, "rootElement", {
|
6710
|
+
get: function () {
|
6711
|
+
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isShadowDOM"])(_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].environment.root)) {
|
6712
|
+
return _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].environment.root.host;
|
6713
|
+
}
|
6714
|
+
else {
|
6715
|
+
return this.rootContainer || _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].environment.root.documentElement || document.body;
|
6716
|
+
}
|
6717
|
+
},
|
6718
|
+
enumerable: false,
|
6719
|
+
configurable: true
|
6720
|
+
});
|
6695
6721
|
Object.defineProperty(DragDropDOMAdapter.prototype, "isMicroMovement", {
|
6696
6722
|
// see https://stackoverflow.com/questions/6042202/how-to-distinguish-mouse-click-and-drag
|
6697
6723
|
get: function () {
|
@@ -6717,7 +6743,7 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
6717
6743
|
_this.savedTargetNode = event.target;
|
6718
6744
|
_this.savedTargetNode.style.cssText =
|
6719
6745
|
"\n position: absolute;\n height: 1px!important;\n width: 1px!important;\n overflow: hidden;\n clip: rect(1px 1px 1px 1px);\n clip: rect(1px, 1px, 1px, 1px);\n ";
|
6720
|
-
|
6746
|
+
_this.rootElement.appendChild(_this.savedTargetNode);
|
6721
6747
|
}
|
6722
6748
|
_this.stopLongTap();
|
6723
6749
|
}, this.longTap ? 500 : 0);
|
@@ -6725,6 +6751,8 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
6725
6751
|
document.addEventListener("pointermove", this.stopLongTapIfMoveEnough);
|
6726
6752
|
};
|
6727
6753
|
DragDropDOMAdapter.prototype.moveShortcutElement = function (event) {
|
6754
|
+
var rootElementX = this.rootElement.getBoundingClientRect().x;
|
6755
|
+
var rootElementY = this.rootElement.getBoundingClientRect().y;
|
6728
6756
|
this.doScroll(event.clientY, event.clientX);
|
6729
6757
|
var shortcutHeight = this.draggedElementShortcut.offsetHeight;
|
6730
6758
|
var shortcutWidth = this.draggedElementShortcut.offsetWidth;
|
@@ -6735,50 +6763,56 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
6735
6763
|
shortcutXOffset = shortcutWidth / 2;
|
6736
6764
|
shortcutYOffset = shortcutHeight / 2;
|
6737
6765
|
}
|
6738
|
-
var documentBottom =
|
6739
|
-
var documentRight =
|
6740
|
-
var
|
6741
|
-
var
|
6742
|
-
|
6766
|
+
var documentBottom = document.documentElement.clientHeight;
|
6767
|
+
var documentRight = document.documentElement.clientWidth;
|
6768
|
+
var pageX = event.pageX;
|
6769
|
+
var pageY = event.pageY;
|
6770
|
+
var clientX = event.clientX;
|
6771
|
+
var clientY = event.clientY;
|
6772
|
+
var shortcutBottomCoordinate = this.getShortcutBottomCoordinate(clientY, shortcutHeight, shortcutYOffset);
|
6773
|
+
var shortcutRightCoordinate = this.getShortcutRightCoordinate(clientX, shortcutWidth, shortcutXOffset);
|
6774
|
+
if (shortcutRightCoordinate >= documentRight) { // right boundary
|
6743
6775
|
this.draggedElementShortcut.style.left =
|
6744
|
-
|
6745
|
-
|
6746
|
-
|
6747
|
-
shortcutWidth
|
6776
|
+
// pageX -
|
6777
|
+
// clientX +
|
6778
|
+
documentRight -
|
6779
|
+
shortcutWidth -
|
6780
|
+
rootElementX +
|
6748
6781
|
"px";
|
6749
6782
|
this.draggedElementShortcut.style.top =
|
6750
|
-
|
6783
|
+
/*pageY*/ clientY - shortcutYOffset - rootElementY + "px";
|
6751
6784
|
return;
|
6752
6785
|
}
|
6753
|
-
if (
|
6786
|
+
if (clientX - shortcutXOffset <= 0) { // left boundary
|
6754
6787
|
this.draggedElementShortcut.style.left =
|
6755
|
-
|
6788
|
+
pageX - clientX - rootElementX + "px";
|
6756
6789
|
this.draggedElementShortcut.style.top =
|
6757
|
-
|
6790
|
+
/*pageY*/ clientY - rootElementY - shortcutYOffset + "px";
|
6758
6791
|
return;
|
6759
6792
|
}
|
6760
|
-
if (shortcutBottomCoordinate >= documentBottom) {
|
6793
|
+
if (shortcutBottomCoordinate >= documentBottom) { // bottom boundary
|
6761
6794
|
this.draggedElementShortcut.style.left =
|
6762
|
-
|
6795
|
+
/*pageX*/ clientX - shortcutXOffset - rootElementX + "px";
|
6763
6796
|
this.draggedElementShortcut.style.top =
|
6764
|
-
|
6765
|
-
|
6766
|
-
|
6767
|
-
shortcutHeight
|
6797
|
+
// pageY -
|
6798
|
+
// clientY +
|
6799
|
+
documentBottom -
|
6800
|
+
shortcutHeight -
|
6801
|
+
rootElementY +
|
6768
6802
|
"px";
|
6769
6803
|
return;
|
6770
6804
|
}
|
6771
|
-
if (
|
6805
|
+
if (clientY - shortcutYOffset <= 0) { // top boundary
|
6772
6806
|
this.draggedElementShortcut.style.left =
|
6773
|
-
|
6807
|
+
clientX - shortcutXOffset - rootElementX + "px";
|
6774
6808
|
this.draggedElementShortcut.style.top =
|
6775
|
-
|
6809
|
+
pageY - clientY - rootElementY + "px";
|
6776
6810
|
return;
|
6777
6811
|
}
|
6778
6812
|
this.draggedElementShortcut.style.left =
|
6779
|
-
|
6813
|
+
clientX - rootElementX - shortcutXOffset + "px";
|
6780
6814
|
this.draggedElementShortcut.style.top =
|
6781
|
-
|
6815
|
+
clientY - rootElementY - shortcutYOffset + "px";
|
6782
6816
|
};
|
6783
6817
|
DragDropDOMAdapter.prototype.getShortcutBottomCoordinate = function (currentY, shortcutHeight, shortcutYOffset) {
|
6784
6818
|
return currentY + shortcutHeight - shortcutYOffset;
|
@@ -6789,7 +6823,7 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
6789
6823
|
DragDropDOMAdapter.prototype.doScroll = function (clientY, clientX) {
|
6790
6824
|
var _this = this;
|
6791
6825
|
cancelAnimationFrame(this.scrollIntervalId);
|
6792
|
-
var startScrollBoundary =
|
6826
|
+
var startScrollBoundary = 100;
|
6793
6827
|
this.draggedElementShortcut.hidden = true;
|
6794
6828
|
var dragOverNode = document.elementFromPoint(clientX, clientY);
|
6795
6829
|
this.draggedElementShortcut.hidden = false;
|
@@ -6834,7 +6868,7 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
6834
6868
|
if (event.which === 3)
|
6835
6869
|
return; //right mouse btn
|
6836
6870
|
this.dd.dragInit(event, draggedElement, parentElement, draggedElementNode);
|
6837
|
-
|
6871
|
+
this.rootElement.append(this.draggedElementShortcut);
|
6838
6872
|
this.moveShortcutElement(event);
|
6839
6873
|
document.addEventListener("pointermove", this.dragOver);
|
6840
6874
|
document.addEventListener("pointercancel", this.handlePointerCancel);
|
@@ -6917,13 +6951,13 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
|
|
6917
6951
|
var _this = this;
|
6918
6952
|
var draggedElementShortcut = document.createElement("div");
|
6919
6953
|
// draggedElementShortcut.innerText = text;
|
6920
|
-
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 10000;\n font-family: var(--font-family,
|
6954
|
+
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 10000;\n font-family: var(--font-family, 'Open Sans');\n ";
|
6921
6955
|
var isDeepClone = true;
|
6922
6956
|
if (!!draggedElementNode) {
|
6923
6957
|
var row = (draggedElementNode
|
6924
6958
|
.closest("[data-sv-drop-target-matrix-row]"));
|
6925
6959
|
var clone = (row.cloneNode(isDeepClone));
|
6926
|
-
clone.style.cssText = "\n box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1), 0px 2px 6px rgba(0, 0, 0, 0.1);\n background-color:
|
6960
|
+
clone.style.cssText = "\n box-shadow: var(--sjs-shadow-large, 0px 8px 16px 0px rgba(0, 0, 0, 0.1)), var(--sjs-shadow-medium, 0px 2px 6px 0px rgba(0, 0, 0, 0.1));\n background-color: var(--sjs-general-backcolor, var(--background, #fff));\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 ";
|
6927
6961
|
clone.classList.remove("sv-matrix__drag-drop--moveup");
|
6928
6962
|
clone.classList.remove("sv-matrix__drag-drop--movedown");
|
6929
6963
|
this.draggedElement.isDragDropMoveDown = false;
|
@@ -7093,7 +7127,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7093
7127
|
DragDropRankingChoices.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
|
7094
7128
|
var draggedElementShortcut = document.createElement("div");
|
7095
7129
|
draggedElementShortcut.className = this.shortcutClass + " sv-ranking-shortcut";
|
7096
|
-
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 10000;\n border-radius:
|
7130
|
+
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 10000;\n border-radius: calc(12.5 * var(--sjs-base-unit, var(--base-unit, 8px)));\n min-width: 100px;\n box-shadow: var(--sjs-shadow-medium, 0px 2px 6px 0px rgba(0, 0, 0, 0.1)), var(--sjs-shadow-large, 0px 8px 16px 0px rgba(0, 0, 0, 0.1));\n background-color: var(--sjs-general-backcolor, var(--background, #fff));\n font-family: var(--font-family, 'Open Sans');\n ";
|
7097
7131
|
var isDeepClone = true;
|
7098
7132
|
var clone = draggedElementNode.cloneNode(isDeepClone);
|
7099
7133
|
draggedElementShortcut.appendChild(clone);
|
@@ -7227,6 +7261,13 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
7227
7261
|
function DragDropRankingSelectToRank() {
|
7228
7262
|
return _super !== null && _super.apply(this, arguments) || this;
|
7229
7263
|
}
|
7264
|
+
DragDropRankingSelectToRank.prototype.onStartDrag = function (event) {
|
7265
|
+
var target = event.target;
|
7266
|
+
var fromContainerNode = target.closest(".sv-ranking__container--from");
|
7267
|
+
if (!!fromContainerNode) {
|
7268
|
+
fromContainerNode.style.minHeight = fromContainerNode.offsetHeight + "px";
|
7269
|
+
}
|
7270
|
+
};
|
7230
7271
|
DragDropRankingSelectToRank.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
|
7231
7272
|
if (dragOverNode.dataset.ranking === "from-container" || dragOverNode.dataset.ranking === "to-container") {
|
7232
7273
|
return dragOverNode;
|
@@ -7284,7 +7325,7 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
7284
7325
|
var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
7285
7326
|
var toIndex = toChoicesArray.indexOf(this.dropTarget);
|
7286
7327
|
if (toIndex === -1)
|
7287
|
-
toIndex =
|
7328
|
+
toIndex = toChoicesArray.length;
|
7288
7329
|
rankFunction(questionModel, fromIndex, toIndex);
|
7289
7330
|
this.doUIEffects(dropTargetNode, fromIndex, toIndex);
|
7290
7331
|
};
|
@@ -8993,7 +9034,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
8993
9034
|
// import "../../main.scss";
|
8994
9035
|
//import "../../modern.scss";
|
8995
9036
|
var Version;
|
8996
|
-
Version = "" + "1.9.
|
9037
|
+
Version = "" + "1.9.98";
|
8997
9038
|
function checkLibraryVersion(ver, libraryName) {
|
8998
9039
|
if (Version != ver) {
|
8999
9040
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -15881,8 +15922,14 @@ var Helpers = /** @class */ (function () {
|
|
15881
15922
|
return array;
|
15882
15923
|
};
|
15883
15924
|
Helpers.getUnbindValue = function (value) {
|
15925
|
+
if (Array.isArray(value)) {
|
15926
|
+
var res = [];
|
15927
|
+
for (var i = 0; i < value.length; i++) {
|
15928
|
+
res.push(Helpers.getUnbindValue(value[i]));
|
15929
|
+
}
|
15930
|
+
return res;
|
15931
|
+
}
|
15884
15932
|
if (!!value && value instanceof Object && !(value instanceof Date)) {
|
15885
|
-
//do not return the same object instance!!!
|
15886
15933
|
return JSON.parse(JSON.stringify(value));
|
15887
15934
|
}
|
15888
15935
|
return value;
|
@@ -16170,6 +16217,7 @@ var map = {
|
|
16170
16217
|
"./V2Check.svg": "./src/images/V2Check.svg",
|
16171
16218
|
"./V2Check_24x24.svg": "./src/images/V2Check_24x24.svg",
|
16172
16219
|
"./V2DragElement_16x16.svg": "./src/images/V2DragElement_16x16.svg",
|
16220
|
+
"./chevron.svg": "./src/images/chevron.svg",
|
16173
16221
|
"./clear_16x16.svg": "./src/images/clear_16x16.svg",
|
16174
16222
|
"./collapseDetail.svg": "./src/images/collapseDetail.svg",
|
16175
16223
|
"./expandDetail.svg": "./src/images/expandDetail.svg",
|
@@ -16489,6 +16537,17 @@ module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\
|
|
16489
16537
|
|
16490
16538
|
/***/ }),
|
16491
16539
|
|
16540
|
+
/***/ "./src/images/chevron.svg":
|
16541
|
+
/*!********************************!*\
|
16542
|
+
!*** ./src/images/chevron.svg ***!
|
16543
|
+
\********************************/
|
16544
|
+
/*! no static exports found */
|
16545
|
+
/***/ (function(module, exports) {
|
16546
|
+
|
16547
|
+
module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 15L17 10H7L12 15Z\"></path></svg>"
|
16548
|
+
|
16549
|
+
/***/ }),
|
16550
|
+
|
16492
16551
|
/***/ "./src/images/clear_16x16.svg":
|
16493
16552
|
/*!************************************!*\
|
16494
16553
|
!*** ./src/images/clear_16x16.svg ***!
|
@@ -18692,7 +18751,9 @@ var JsonMetadata = /** @class */ (function () {
|
|
18692
18751
|
return res;
|
18693
18752
|
};
|
18694
18753
|
JsonMetadata.prototype.getChemeRefName = function (className, isRoot) {
|
18695
|
-
|
18754
|
+
//Fix for #6486, according to https://niem.github.io/json/reference/json-schema/references/#:~:text=In%20a%20JSON%20schema%2C%20a,%2C%20an%20in%2Dschema%20reference
|
18755
|
+
return "#/definitions/" + className;
|
18756
|
+
//return isRoot ? "#/definitions/" + className : className + "#";
|
18696
18757
|
};
|
18697
18758
|
JsonMetadata.prototype.generateChemaClass = function (className, schemaDef, isRoot) {
|
18698
18759
|
if (!!schemaDef[className])
|
@@ -18730,6 +18791,7 @@ var JsonError = /** @class */ (function () {
|
|
18730
18791
|
this.message = message;
|
18731
18792
|
this.description = "";
|
18732
18793
|
this.at = -1;
|
18794
|
+
this.end = -1;
|
18733
18795
|
}
|
18734
18796
|
JsonError.prototype.getFullDescription = function () {
|
18735
18797
|
return this.message + (this.description ? "\n" + this.description : "");
|
@@ -18843,7 +18905,7 @@ var JsonObject = /** @class */ (function () {
|
|
18843
18905
|
this.toObjectCore(jsonObj, obj);
|
18844
18906
|
var error = this.getRequiredError(obj, jsonObj);
|
18845
18907
|
if (!!error) {
|
18846
|
-
this.addNewError(error, jsonObj);
|
18908
|
+
this.addNewError(error, jsonObj, obj);
|
18847
18909
|
}
|
18848
18910
|
};
|
18849
18911
|
JsonObject.prototype.toObjectCore = function (jsonObj, obj) {
|
@@ -18874,7 +18936,7 @@ var JsonObject = /** @class */ (function () {
|
|
18874
18936
|
var property = this.findProperty(properties, key);
|
18875
18937
|
if (!property) {
|
18876
18938
|
if (needAddErrors) {
|
18877
|
-
this.addNewError(new JsonUnknownPropertyError(key.toString(), objType), jsonObj);
|
18939
|
+
this.addNewError(new JsonUnknownPropertyError(key.toString(), objType), jsonObj, obj);
|
18878
18940
|
}
|
18879
18941
|
continue;
|
18880
18942
|
}
|
@@ -19037,7 +19099,7 @@ var JsonObject = /** @class */ (function () {
|
|
19037
19099
|
}
|
19038
19100
|
}
|
19039
19101
|
if (error) {
|
19040
|
-
this.addNewError(error, value);
|
19102
|
+
this.addNewError(error, value, newObj);
|
19041
19103
|
}
|
19042
19104
|
return error;
|
19043
19105
|
};
|
@@ -19058,11 +19120,17 @@ var JsonObject = /** @class */ (function () {
|
|
19058
19120
|
}
|
19059
19121
|
return null;
|
19060
19122
|
};
|
19061
|
-
JsonObject.prototype.addNewError = function (error, jsonObj) {
|
19062
|
-
|
19063
|
-
|
19064
|
-
}
|
19123
|
+
JsonObject.prototype.addNewError = function (error, jsonObj, element) {
|
19124
|
+
error.jsonObj = jsonObj;
|
19125
|
+
error.element = element;
|
19065
19126
|
this.errors.push(error);
|
19127
|
+
if (!jsonObj)
|
19128
|
+
return;
|
19129
|
+
var posObj = jsonObj[JsonObject.positionPropertyName];
|
19130
|
+
if (!posObj)
|
19131
|
+
return;
|
19132
|
+
error.at = posObj.start;
|
19133
|
+
error.end = posObj.end;
|
19066
19134
|
};
|
19067
19135
|
JsonObject.prototype.valueToArray = function (value, obj, key, property) {
|
19068
19136
|
if (obj[key] && !this.isValueArray(obj[key]))
|
@@ -21048,8 +21116,8 @@ var englishStrings = {
|
|
21048
21116
|
noEntriesReadonlyText: "There are no entries.",
|
21049
21117
|
more: "More",
|
21050
21118
|
tagboxDoneButtonCaption: "OK",
|
21051
|
-
|
21052
|
-
|
21119
|
+
selectToRankEmptyRankedAreaText: "All choices are ranked",
|
21120
|
+
selectToRankEmptyUnrankedAreaText: "Drag and drop choices here to rank them",
|
21053
21121
|
};
|
21054
21122
|
// Uncomment the lines below if you create a custom dictionary.
|
21055
21123
|
// Replace "en" with a custom locale code (for example, "fr" or "de"),
|
@@ -24957,91 +25025,96 @@ __webpack_require__.r(__webpack_exports__);
|
|
24957
25025
|
// These strings are commented out. Uncomment and edit them if you want to add your translations.
|
24958
25026
|
|
24959
25027
|
var turkishSurveyStrings = {
|
24960
|
-
pagePrevText: "
|
24961
|
-
pageNextText: "
|
24962
|
-
completeText: "
|
24963
|
-
previewText: "
|
25028
|
+
pagePrevText: "Önceki",
|
25029
|
+
pageNextText: "Sonraki",
|
25030
|
+
completeText: "Tamamla",
|
25031
|
+
previewText: "Önizleme",
|
24964
25032
|
editText: "Düzenle",
|
24965
25033
|
startSurveyText: "Başlat",
|
24966
25034
|
otherItemText: "Diğer (açıklayınız)",
|
24967
|
-
noneItemText: "
|
24968
|
-
selectAllItemText: "
|
24969
|
-
progressText: "Sayfa {0}
|
24970
|
-
|
24971
|
-
panelDynamicProgressText: "
|
24972
|
-
|
25035
|
+
noneItemText: "Hiçbiri",
|
25036
|
+
selectAllItemText: "Tümünü Seç",
|
25037
|
+
progressText: "Sayfa {0}/{1}",
|
25038
|
+
indexText: "{0}/{1}",
|
25039
|
+
panelDynamicProgressText: "{0}/{1}",
|
25040
|
+
panelDynamicTabTextFormat: "Panel {panelIndex}",
|
25041
|
+
questionsProgressText: "{0}/{1} soru yanıtlandı",
|
24973
25042
|
emptySurvey: "Ankette görüntülenecek sayfa ya da soru mevcut değil.",
|
24974
|
-
completingSurvey: "
|
24975
|
-
completingSurveyBefore: "Kayıtlarımız
|
24976
|
-
loadingSurvey: "Anket
|
24977
|
-
placeholder: "Seçiniz
|
24978
|
-
|
25043
|
+
completingSurvey: "Anketi tamamladığınız için teşekkür ederiz",
|
25044
|
+
completingSurveyBefore: "Kayıtlarımız bu anketi zaten tamamladığınızı gösteriyor.",
|
25045
|
+
loadingSurvey: "Anket Yükleniyor...",
|
25046
|
+
placeholder: "Seçiniz...",
|
25047
|
+
ratingOptionsCaption: "Seçiniz...",
|
24979
25048
|
value: "değer",
|
24980
|
-
requiredError: "Lütfen soruya cevap
|
25049
|
+
requiredError: "Lütfen soruya cevap verin.",
|
24981
25050
|
requiredErrorInPanel: "Lütfen en az bir soruyu yanıtlayın.",
|
24982
|
-
requiredInAllRowsError: "Lütfen tüm satırlardaki soruları
|
24983
|
-
numericError: "
|
24984
|
-
|
24985
|
-
|
24986
|
-
textMinLength: "
|
24987
|
-
textMaxLength: "Lütfen {0}
|
24988
|
-
textMinMaxLength: "Lütfen {0}
|
25051
|
+
requiredInAllRowsError: "Lütfen tüm satırlardaki soruları cevaplayın.",
|
25052
|
+
numericError: "Değer sayısal olmalıdır.",
|
25053
|
+
minError: "Değer {0}'den küçük olmamalıdır",
|
25054
|
+
maxError: "Değer {0}'dan büyük olmamalıdır",
|
25055
|
+
textMinLength: "Lütfen en az {0} karakter girin.",
|
25056
|
+
textMaxLength: "Lütfen en fazla {0} karakter girin.",
|
25057
|
+
textMinMaxLength: "Lütfen {0}’den fazla ve {1}’den az karakter girin.",
|
24989
25058
|
minRowCountError: "Lütfen en az {0} satırı doldurun.",
|
24990
|
-
minSelectError: "Lütfen en az {0} seçeneği
|
24991
|
-
maxSelectError: "Lütfen {0}
|
24992
|
-
numericMinMax: "
|
25059
|
+
minSelectError: "Lütfen en az {0} seçeneği seçin.",
|
25060
|
+
maxSelectError: "Lütfen en fazla {0} seçeneği seçin.",
|
25061
|
+
numericMinMax: "'{0}', {1}'e eşit veya daha büyük ve {2}'ye eşit veya daha küçük olmalıdır",
|
24993
25062
|
numericMin: "'{0}' değeri {1} değerine eşit veya büyük olmalıdır",
|
24994
25063
|
numericMax: "'{0}' değeri {1} değerine eşit ya da küçük olmalıdır.",
|
24995
|
-
invalidEmail: "Lütfen geçerli bir
|
25064
|
+
invalidEmail: "Lütfen geçerli bir e-posta adresi girin.",
|
24996
25065
|
invalidExpression: "İfade: {0} 'true' döndürmelidir.",
|
24997
|
-
urlRequestError: "
|
24998
|
-
urlGetChoicesError: "
|
25066
|
+
urlRequestError: "İstek '{0}' hatasını döndürdü. {1}",
|
25067
|
+
urlGetChoicesError: "İstek boş veri döndürdü veya 'path' özelliği yanlış",
|
24999
25068
|
exceedMaxSize: "Dosya boyutu {0} değerini geçemez.",
|
25000
|
-
otherRequiredError: "Lütfen diğer değerleri
|
25001
|
-
uploadingFile: "Dosyanız yükleniyor.
|
25069
|
+
otherRequiredError: "Lütfen diğer değerleri girin.",
|
25070
|
+
uploadingFile: "Dosyanız yükleniyor. Lütfen birkaç saniye bekleyin ve tekrar deneyin.",
|
25002
25071
|
loadingFile: "Yükleniyor...",
|
25003
|
-
chooseFile: "Dosyaları seçin
|
25072
|
+
chooseFile: "Dosyaları seçin...",
|
25004
25073
|
noFileChosen: "Dosya seçili değil",
|
25005
|
-
|
25074
|
+
fileDragAreaPlaceholder: "Buraya bir dosya bırakın veya dosyayı yüklemek için aşağıdaki düğmeyi tıklayın.",
|
25006
25075
|
confirmDelete: "Kaydı silmek istiyor musunuz?",
|
25007
25076
|
keyDuplicationError: "Bu değer benzersiz olmalıdır.",
|
25008
|
-
addColumn: "Sütun
|
25077
|
+
addColumn: "Sütun Ekle",
|
25009
25078
|
addRow: "Satır Ekle",
|
25010
25079
|
removeRow: "Kaldır",
|
25011
|
-
|
25080
|
+
emptyRowsText: "Satır yok.",
|
25012
25081
|
addPanel: "Yeni ekle",
|
25013
|
-
removePanel: "
|
25014
|
-
choices_Item: "
|
25082
|
+
removePanel: "Kaldır",
|
25083
|
+
choices_Item: "öğe",
|
25015
25084
|
matrix_column: "Sütun",
|
25016
|
-
matrix_row: "
|
25017
|
-
|
25018
|
-
savingData: "Sonuçlar sunucuya kaydediliyor
|
25019
|
-
savingDataError: "Bir hata oluştu ve
|
25085
|
+
matrix_row: "Satır",
|
25086
|
+
multipletext_itemname: "metin",
|
25087
|
+
savingData: "Sonuçlar sunucuya kaydediliyor...",
|
25088
|
+
savingDataError: "Bir hata oluştu ve sonuçlar kaydedilemedi.",
|
25020
25089
|
savingDataSuccess: "Sonuçlar başarıyla kaydedildi!",
|
25021
25090
|
saveAgainButton: "Tekrar deneyin",
|
25022
|
-
timerMin: "
|
25091
|
+
timerMin: "dakika",
|
25023
25092
|
timerSec: "saniye",
|
25024
25093
|
timerSpentAll: "Bu sayfada {0} ve toplamda {1} harcadınız.",
|
25025
25094
|
timerSpentPage: "Bu sayfaya {0} harcadınız.",
|
25026
25095
|
timerSpentSurvey: "Toplamda {0} harcadınız.",
|
25027
|
-
timerLimitAll: "Bu sayfaya {0}
|
25028
|
-
timerLimitPage: "Bu sayfaya {0}
|
25029
|
-
timerLimitSurvey: "Toplamda {0}
|
25030
|
-
clearCaption: "
|
25031
|
-
|
25096
|
+
timerLimitAll: "Bu sayfaya {0}/{1} ve toplamda {2}/{3} harcadınız.",
|
25097
|
+
timerLimitPage: "Bu sayfaya {0}/{1} harcadınız.",
|
25098
|
+
timerLimitSurvey: "Toplamda {0}/{1} harcadınız.",
|
25099
|
+
clearCaption: "Temizle",
|
25100
|
+
signaturePlaceHolder: "Burayı imzalayın",
|
25032
25101
|
chooseFileCaption: "Dosya seçin",
|
25033
25102
|
removeFileCaption: "Bu dosyayı kaldır",
|
25034
25103
|
booleanCheckedLabel: "Evet",
|
25035
25104
|
booleanUncheckedLabel: "Hayır",
|
25036
25105
|
confirmRemoveFile: "Bu dosyayı kaldırmak istediğinizden emin misiniz: {0}?",
|
25037
25106
|
confirmRemoveAllFiles: "Tüm dosyaları kaldırmak istediğinizden emin misiniz?",
|
25038
|
-
questionTitlePatternText: "Soru
|
25039
|
-
|
25040
|
-
|
25041
|
-
|
25042
|
-
|
25043
|
-
|
25044
|
-
|
25107
|
+
questionTitlePatternText: "Soru Başlığı",
|
25108
|
+
modalCancelButtonText: "İptal",
|
25109
|
+
modalApplyButtonText: "Uygula",
|
25110
|
+
filterStringPlaceholder: "Aramak için yazın...",
|
25111
|
+
emptyMessage: "Görüntülenecek veri yok",
|
25112
|
+
noEntriesText: "Henüz giriş yok.\nYeni bir giriş eklemek için aşağıdaki düğmeyi tıklayın.",
|
25113
|
+
noEntriesReadonlyText: "Giriş yok.",
|
25114
|
+
more: "Daha fazla",
|
25115
|
+
tagboxDoneButtonCaption: "TAMAM",
|
25116
|
+
selectToRankEmptyRankedAreaText: "Tüm seçenekler sıralanmıştır",
|
25117
|
+
selectToRankEmptyUnrankedAreaText: "Seçimleri sıralamak için buraya sürükleyip bırakın",
|
25045
25118
|
};
|
25046
25119
|
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].locales["tr"] = turkishSurveyStrings;
|
25047
25120
|
survey_core__WEBPACK_IMPORTED_MODULE_0__["surveyLocalization"].localeNames["tr"] = "türkçe";
|
@@ -28332,7 +28405,7 @@ var PanelModel = /** @class */ (function (_super) {
|
|
28332
28405
|
if (this.hasEditButton) {
|
28333
28406
|
actions.push({
|
28334
28407
|
id: "cancel-preview",
|
28335
|
-
|
28408
|
+
locTitle: this.survey.locEditText,
|
28336
28409
|
innerCss: this.survey.cssNavigationEdit,
|
28337
28410
|
action: function () { _this.cancelPreview(); }
|
28338
28411
|
});
|
@@ -29626,7 +29699,7 @@ function setStyles() {
|
|
29626
29699
|
".sv_q_dd_value": "width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative;",
|
29627
29700
|
".sv_q_dd_root": "position: relative;",
|
29628
29701
|
".sv_q_dd_select_wrapper::after": "content: \"\"; display: block;background-image: url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 10 10' style='enable-background:new 0 0 10 10;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23404040;%7D%0A%3C/style%3E%3Cpolygon class='st0' points='2,2 0,4 5,9 10,4 8,2 5,5 '/%3E%3C/svg%3E%0A\"); background-repeat: no-repeat; background-position: center center; background-size: 10px 12px; width: 34px; height: 100%; position: absolute; inset-inline-end: 0; top: 0;",
|
29629
|
-
".sv_q_dd_filter-string-input": "outline: none; border: none; background-color: transparent; position: absolute; inset-inline-start: 0;",
|
29702
|
+
".sv_q_dd_filter-string-input": "outline: none; border: none; background-color: transparent; position: absolute; inset-inline-start: 0; inset-block-start: 0;",
|
29630
29703
|
".sv_q_dropdown_clean-button": "margin: auto 2em;",
|
29631
29704
|
".sv_q_tagbox__placeholder": "position: absolute; top: 0; inset-inline-start: 1em; max-width: 100%; width: auto; height: 100%; text-align: start; cursor: text; pointer-events: none;",
|
29632
29705
|
".sv_qstn .sv-q-col-1, .sv-question .sv-q-col-1": "width: 100%; display: inline-block; padding-right: 1em; box-sizing: border-box; word-break: break-word;",
|
@@ -29787,7 +29860,7 @@ function setStyles() {
|
|
29787
29860
|
"sv-popup": "display: block; position: absolute; z-index: -1;",
|
29788
29861
|
".sv-popup": "position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; outline: none; z-index: 1500;",
|
29789
29862
|
".sv-popup__container": "box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1); position: absolute; padding: 0;",
|
29790
|
-
".sv-popup__body-content": "background-color: var(--background, #fff); border-radius: calc(0.5 * var(--base-unit, 8px)); width: 100%; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; max-height: 90vh; max-width:
|
29863
|
+
".sv-popup__body-content": "background-color: var(--background, #fff); border-radius: calc(0.5 * var(--base-unit, 8px)); width: 100%; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; max-height: 90vh; max-width: 100vw;",
|
29791
29864
|
".sv-popup--modal .sv-list__filter": "padding-top: 8px;",
|
29792
29865
|
".sv-popup--modal .sv-list__filter-icon": "top: 20px;",
|
29793
29866
|
".sv-popup--overlay .sv-list__filter": "padding-top: 8px;",
|
@@ -29941,13 +30014,14 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
29941
30014
|
this.isTablet = width >= PopupDropdownViewModel.tabletSizeBreakpoint;
|
29942
30015
|
};
|
29943
30016
|
PopupDropdownViewModel.prototype._updatePosition = function () {
|
29944
|
-
var _a;
|
30017
|
+
var _a, _b, _c;
|
29945
30018
|
if (!this.targetElement)
|
29946
30019
|
return;
|
29947
30020
|
var targetElementRect = this.targetElement.getBoundingClientRect();
|
29948
30021
|
var popupContainer = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelector(this.containerSelector);
|
29949
30022
|
if (!popupContainer)
|
29950
30023
|
return;
|
30024
|
+
var fixedPopupContainer = (_b = this.container) === null || _b === void 0 ? void 0 : _b.querySelector(this.fixedPopupContainer);
|
29951
30025
|
var scrollContent = popupContainer.querySelector(this.scrollingContentSelector);
|
29952
30026
|
var popupComputedStyle = window.getComputedStyle(popupContainer);
|
29953
30027
|
var marginLeft = (parseFloat(popupComputedStyle.marginLeft) || 0);
|
@@ -29958,7 +30032,8 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
29958
30032
|
var verticalPosition = this.model.verticalPosition;
|
29959
30033
|
var actualHorizontalPosition = this.getActualHorizontalPosition();
|
29960
30034
|
if (!!window) {
|
29961
|
-
|
30035
|
+
var heightValues = [height, window.innerHeight * 0.9, (_c = window.visualViewport) === null || _c === void 0 ? void 0 : _c.height];
|
30036
|
+
height = Math.ceil(Math.min.apply(Math, heightValues.filter(function (each) { return typeof each === "number"; })));
|
29962
30037
|
verticalPosition = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].updateVerticalPosition(targetElementRect, height, this.model.verticalPosition, this.model.showPointer, window.innerHeight);
|
29963
30038
|
}
|
29964
30039
|
this.popupDirection = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePopupDirection(verticalPosition, actualHorizontalPosition);
|
@@ -29975,6 +30050,11 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
29975
30050
|
pos.left = newHorizontalDimensions.left;
|
29976
30051
|
}
|
29977
30052
|
}
|
30053
|
+
if (!!fixedPopupContainer) {
|
30054
|
+
var rect = fixedPopupContainer.getBoundingClientRect();
|
30055
|
+
pos.top -= rect.top;
|
30056
|
+
pos.left -= rect.left;
|
30057
|
+
}
|
29978
30058
|
this.left = pos.left + "px";
|
29979
30059
|
this.top = pos.top + "px";
|
29980
30060
|
if (this.showHeader) {
|
@@ -30594,6 +30674,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
30594
30674
|
function PopupBaseViewModel(model) {
|
30595
30675
|
var _this = _super.call(this) || this;
|
30596
30676
|
_this.popupSelector = ".sv-popup";
|
30677
|
+
_this.fixedPopupContainer = ".sv-popup";
|
30597
30678
|
_this.containerSelector = ".sv-popup__container";
|
30598
30679
|
_this.scrollingContentSelector = ".sv-popup__scrolling-content";
|
30599
30680
|
_this.model = model;
|
@@ -32256,9 +32337,25 @@ var Question = /** @class */ (function (_super) {
|
|
32256
32337
|
* @param onError Pass `true` if you want to focus an input field with the first validation error. Default value: `false` (focuses the first input field). Applies to question types with multiple input fields.
|
32257
32338
|
*/
|
32258
32339
|
Question.prototype.focus = function (onError) {
|
32340
|
+
var _this = this;
|
32259
32341
|
if (onError === void 0) { onError = false; }
|
32260
|
-
if (this.isDesignMode)
|
32342
|
+
if (this.isDesignMode || !this.isVisible || !this.survey)
|
32261
32343
|
return;
|
32344
|
+
var page = this.page;
|
32345
|
+
if (!page && !!this.parentQuestion) {
|
32346
|
+
page = this.parentQuestion.page;
|
32347
|
+
}
|
32348
|
+
var shouldChangePage = !!page && this.survey.currentPage !== page;
|
32349
|
+
if (shouldChangePage) {
|
32350
|
+
this.survey.currentPage = page;
|
32351
|
+
setTimeout(function () { return _this.focuscore(onError); }, 0);
|
32352
|
+
}
|
32353
|
+
else {
|
32354
|
+
this.focuscore(onError);
|
32355
|
+
}
|
32356
|
+
};
|
32357
|
+
Question.prototype.focuscore = function (onError) {
|
32358
|
+
if (onError === void 0) { onError = false; }
|
32262
32359
|
if (!!this.survey) {
|
32263
32360
|
this.expandAllParents(this);
|
32264
32361
|
this.survey.scrollElementToTop(this, this, null, this.id);
|
@@ -33023,7 +33120,7 @@ var Question = /** @class */ (function (_super) {
|
|
33023
33120
|
var _this = this;
|
33024
33121
|
this.defaultValueRunner = this.getDefaultRunner(this.defaultValueRunner, this.defaultValueExpression);
|
33025
33122
|
this.setValueAndRunExpression(this.defaultValueRunner, this.getUnbindValue(this.defaultValue), function (val) {
|
33026
|
-
if (!
|
33123
|
+
if (!_this.isTwoValueEquals(_this.value, val)) {
|
33027
33124
|
_this.value = val;
|
33028
33125
|
}
|
33029
33126
|
});
|
@@ -33057,7 +33154,7 @@ var Question = /** @class */ (function (_super) {
|
|
33057
33154
|
if (!setFunc) {
|
33058
33155
|
setFunc = function (val) {
|
33059
33156
|
_this.runExpressionSetValue(val, function (val) {
|
33060
|
-
if (!
|
33157
|
+
if (!_this.isTwoValueEquals(_this.value, val)) {
|
33061
33158
|
_this.value = val;
|
33062
33159
|
}
|
33063
33160
|
});
|
@@ -34433,7 +34530,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
34433
34530
|
return null;
|
34434
34531
|
var itemValue = _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(this.visibleChoices, this.value);
|
34435
34532
|
this.onGetSingleSelectedItem(itemValue);
|
34436
|
-
if (!itemValue && !selectedItemValues) {
|
34533
|
+
if (!itemValue && (!selectedItemValues || this.value != selectedItemValues.id)) {
|
34437
34534
|
this.updateSelectedItemValues();
|
34438
34535
|
}
|
34439
34536
|
return itemValue || selectedItemValues || (this.isOtherSelected ? this.otherItem : this.getItemIfChoicesNotContainThisValue(this.value));
|
@@ -35116,6 +35213,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
35116
35213
|
return str == "" && val ? val : str;
|
35117
35214
|
};
|
35118
35215
|
QuestionSelectBase.prototype.getDisplayArrayValue = function (keysAsText, value, onGetValueCallback) {
|
35216
|
+
var _this = this;
|
35119
35217
|
var items = this.visibleChoices;
|
35120
35218
|
var strs = [];
|
35121
35219
|
var vals = [];
|
@@ -35123,7 +35221,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
35123
35221
|
vals.push(!onGetValueCallback ? value[i] : onGetValueCallback(i));
|
35124
35222
|
}
|
35125
35223
|
if (_helpers__WEBPACK_IMPORTED_MODULE_8__["Helpers"].isTwoValueEquals(this.value, vals)) {
|
35126
|
-
this.getMultipleSelectedItems().forEach(function (item) { return strs.push(item
|
35224
|
+
this.getMultipleSelectedItems().forEach(function (item) { return strs.push(_this.getItemDisplayValue(item)); });
|
35127
35225
|
}
|
35128
35226
|
if (strs.length === 0) {
|
35129
35227
|
for (var i = 0; i < vals.length; i++) {
|
@@ -35135,6 +35233,11 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
35135
35233
|
}
|
35136
35234
|
return strs.join(", ");
|
35137
35235
|
};
|
35236
|
+
QuestionSelectBase.prototype.getItemDisplayValue = function (item) {
|
35237
|
+
if (item === this.otherItem && this.comment)
|
35238
|
+
return this.comment;
|
35239
|
+
return item.locText.textOrHtml;
|
35240
|
+
};
|
35138
35241
|
QuestionSelectBase.prototype.getFilteredChoices = function () {
|
35139
35242
|
return this.filteredChoicesValue
|
35140
35243
|
? this.filteredChoicesValue
|
@@ -35453,7 +35556,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
35453
35556
|
for (var i = 0; i < this.dependedQuestions.length; i++) {
|
35454
35557
|
var q = this.dependedQuestions[i];
|
35455
35558
|
q.onVisibleChoicesChanged();
|
35456
|
-
q.
|
35559
|
+
q.clearIncorrectValues();
|
35457
35560
|
}
|
35458
35561
|
this.isUpdatingChoicesDependedQuestions = false;
|
35459
35562
|
};
|
@@ -35548,11 +35651,11 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
35548
35651
|
};
|
35549
35652
|
QuestionSelectBase.prototype.clearIncorrectValuesCore = function () {
|
35550
35653
|
var val = this.value;
|
35551
|
-
if (this.
|
35654
|
+
if (this.canClearValueAnUnknown(val)) {
|
35552
35655
|
this.clearValue();
|
35553
35656
|
}
|
35554
35657
|
};
|
35555
|
-
QuestionSelectBase.prototype.
|
35658
|
+
QuestionSelectBase.prototype.canClearValueAnUnknown = function (val) {
|
35556
35659
|
if (!this.getStoreOthersAsComment() && this.isOtherSelected)
|
35557
35660
|
return false;
|
35558
35661
|
return this.hasUnknownValue(val, true, true, true);
|
@@ -37000,7 +37103,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
37000
37103
|
if (Array.isArray(val)) {
|
37001
37104
|
for (var i = 0; i < val.length; i++) {
|
37002
37105
|
var rVal = this.getRealValue(val[i]);
|
37003
|
-
if (this.
|
37106
|
+
if (this.canClearValueAnUnknown(rVal)) {
|
37004
37107
|
this.addIntoInvisibleOldValues(rVal);
|
37005
37108
|
}
|
37006
37109
|
}
|
@@ -37139,7 +37242,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
37139
37242
|
var newValue = [];
|
37140
37243
|
for (var i = 0; i < val.length; i++) {
|
37141
37244
|
var rItemVal = this.getRealValue(val[i]);
|
37142
|
-
var isUnkown = this.
|
37245
|
+
var isUnkown = this.canClearValueAnUnknown(rItemVal);
|
37143
37246
|
if ((!clearDisabled && !isUnkown) ||
|
37144
37247
|
(clearDisabled && !this.isValueDisabled(rItemVal))) {
|
37145
37248
|
newValue.push(val[i]);
|
@@ -37639,6 +37742,14 @@ var ComponentQuestionJSON = /** @class */ (function () {
|
|
37639
37742
|
return question.getDisplayValue(keyAsText, value);
|
37640
37743
|
return this.json.getDisplayValue(question);
|
37641
37744
|
};
|
37745
|
+
ComponentQuestionJSON.prototype.setValueToQuestion = function (val) {
|
37746
|
+
var converter = this.json.valueToQuestion || this.json.setValue;
|
37747
|
+
return !!converter ? converter(val) : val;
|
37748
|
+
};
|
37749
|
+
ComponentQuestionJSON.prototype.getValueFromQuestion = function (val) {
|
37750
|
+
var converter = this.json.valueFromQuestion || this.json.getValue;
|
37751
|
+
return !!converter ? converter(val) : val;
|
37752
|
+
};
|
37642
37753
|
Object.defineProperty(ComponentQuestionJSON.prototype, "isComposite", {
|
37643
37754
|
get: function () {
|
37644
37755
|
return !!this.json.elementsJSON || !!this.json.createElements;
|
@@ -38027,7 +38138,7 @@ var QuestionCustomModel = /** @class */ (function (_super) {
|
|
38027
38138
|
if (!this.contentQuestion)
|
38028
38139
|
return;
|
38029
38140
|
if (this.isEmpty() && !this.contentQuestion.isEmpty()) {
|
38030
|
-
this.value = this.
|
38141
|
+
this.value = this.getContentQuestionValue();
|
38031
38142
|
}
|
38032
38143
|
};
|
38033
38144
|
QuestionCustomModel.prototype.runCondition = function (values, properties) {
|
@@ -38046,9 +38157,24 @@ var QuestionCustomModel = /** @class */ (function (_super) {
|
|
38046
38157
|
};
|
38047
38158
|
QuestionCustomModel.prototype.convertDataValue = function (name, newValue) {
|
38048
38159
|
return this.convertDataName(name) == _super.prototype.convertDataName.call(this, name)
|
38049
|
-
? this.
|
38160
|
+
? this.getContentQuestionValue()
|
38050
38161
|
: newValue;
|
38051
38162
|
};
|
38163
|
+
QuestionCustomModel.prototype.getContentQuestionValue = function () {
|
38164
|
+
if (!this.contentQuestion)
|
38165
|
+
return undefined;
|
38166
|
+
var val = this.contentQuestion.value;
|
38167
|
+
if (!!this.customQuestion)
|
38168
|
+
val = this.customQuestion.getValueFromQuestion(val);
|
38169
|
+
return val;
|
38170
|
+
};
|
38171
|
+
QuestionCustomModel.prototype.setContentQuestionValue = function (val) {
|
38172
|
+
if (!this.contentQuestion)
|
38173
|
+
return;
|
38174
|
+
if (!!this.customQuestion)
|
38175
|
+
val = this.customQuestion.setValueToQuestion(val);
|
38176
|
+
this.contentQuestion.value = val;
|
38177
|
+
};
|
38052
38178
|
QuestionCustomModel.prototype.canSetValueToSurvey = function () {
|
38053
38179
|
return false;
|
38054
38180
|
};
|
@@ -38056,8 +38182,8 @@ var QuestionCustomModel = /** @class */ (function (_super) {
|
|
38056
38182
|
if (updateIsAnswered === void 0) { updateIsAnswered = true; }
|
38057
38183
|
_super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
|
38058
38184
|
if (!this.isLoadingFromJson && !!this.contentQuestion &&
|
38059
|
-
!this.isTwoValueEquals(this.
|
38060
|
-
this.
|
38185
|
+
!this.isTwoValueEquals(this.getContentQuestionValue(), newValue)) {
|
38186
|
+
this.setContentQuestionValue(this.getUnbindValue(newValue));
|
38061
38187
|
}
|
38062
38188
|
};
|
38063
38189
|
QuestionCustomModel.prototype.onSurveyValueChanged = function (newValue) {
|
@@ -38068,7 +38194,7 @@ var QuestionCustomModel = /** @class */ (function (_super) {
|
|
38068
38194
|
};
|
38069
38195
|
QuestionCustomModel.prototype.getValueCore = function () {
|
38070
38196
|
if (!!this.contentQuestion)
|
38071
|
-
return this.
|
38197
|
+
return this.getContentQuestionValue();
|
38072
38198
|
return _super.prototype.getValueCore.call(this);
|
38073
38199
|
};
|
38074
38200
|
QuestionCustomModel.prototype.initElement = function (el) {
|
@@ -38224,7 +38350,7 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
|
|
38224
38350
|
}
|
38225
38351
|
_super.prototype.onSurveyLoad.call(this);
|
38226
38352
|
if (!!this.contentPanel) {
|
38227
|
-
var val = this.
|
38353
|
+
var val = this.getContentPanelValue();
|
38228
38354
|
if (!_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isValueEmpty(val)) {
|
38229
38355
|
this.value = val;
|
38230
38356
|
}
|
@@ -38289,12 +38415,20 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
|
|
38289
38415
|
this.settingNewValue = false;
|
38290
38416
|
};
|
38291
38417
|
QuestionCompositeModel.prototype.updateValueCoreWithPanelValue = function () {
|
38292
|
-
var panelValue = this.
|
38418
|
+
var panelValue = this.getContentPanelValue();
|
38293
38419
|
if (this.isTwoValueEquals(this.getValueCore(), panelValue))
|
38294
38420
|
return false;
|
38295
38421
|
this.setValueCore(panelValue);
|
38296
38422
|
return true;
|
38297
38423
|
};
|
38424
|
+
QuestionCompositeModel.prototype.getContentPanelValue = function (val) {
|
38425
|
+
if (!val)
|
38426
|
+
val = this.contentPanel.getValue();
|
38427
|
+
return this.customQuestion.setValueToQuestion(val);
|
38428
|
+
};
|
38429
|
+
QuestionCompositeModel.prototype.getValueForContentPanel = function (val) {
|
38430
|
+
return this.customQuestion.getValueFromQuestion(val);
|
38431
|
+
};
|
38298
38432
|
QuestionCompositeModel.prototype.setNewValueIntoQuestion = function (name, newValue) {
|
38299
38433
|
var q = this.getQuestionByName(name);
|
38300
38434
|
if (!!q && !this.isTwoValueEquals(newValue, q.value)) {
|
@@ -38316,7 +38450,7 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
|
|
38316
38450
|
}
|
38317
38451
|
};
|
38318
38452
|
QuestionCompositeModel.prototype.convertDataValue = function (name, newValue) {
|
38319
|
-
var val = this.value;
|
38453
|
+
var val = this.getValueForContentPanel(this.value);
|
38320
38454
|
if (!val)
|
38321
38455
|
val = {};
|
38322
38456
|
if (this.isValueEmpty(newValue) && !this.isEditingSurveyElement) {
|
@@ -38325,19 +38459,20 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
|
|
38325
38459
|
else {
|
38326
38460
|
val[name] = newValue;
|
38327
38461
|
}
|
38328
|
-
return val;
|
38462
|
+
return this.getContentPanelValue(val);
|
38329
38463
|
};
|
38330
38464
|
QuestionCompositeModel.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
|
38331
38465
|
if (updateIsAnswered === void 0) { updateIsAnswered = true; }
|
38332
38466
|
this.setValuesIntoQuestions(newValue);
|
38333
38467
|
if (!this.isEditingSurveyElement && !!this.contentPanel) {
|
38334
|
-
newValue = this.
|
38468
|
+
newValue = this.getContentPanelValue();
|
38335
38469
|
}
|
38336
38470
|
_super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
|
38337
38471
|
};
|
38338
38472
|
QuestionCompositeModel.prototype.setValuesIntoQuestions = function (newValue) {
|
38339
38473
|
if (!this.contentPanel)
|
38340
38474
|
return;
|
38475
|
+
newValue = this.getValueForContentPanel(newValue);
|
38341
38476
|
var oldSettingNewValue = this.settingNewValue;
|
38342
38477
|
this.settingNewValue = true;
|
38343
38478
|
var questions = this.contentPanel.questions;
|
@@ -38435,7 +38570,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
38435
38570
|
_this.registerPropertyChangedHandlers(["choicesMin", "choicesMax", "choicesStep"], function () {
|
38436
38571
|
_this.onVisibleChoicesChanged();
|
38437
38572
|
});
|
38438
|
-
_this.registerPropertyChangedHandlers(["value", "renderAs", "showOtherItem", "otherText", "placeholder", "choices"], function () {
|
38573
|
+
_this.registerPropertyChangedHandlers(["value", "renderAs", "showOtherItem", "otherText", "placeholder", "choices", "visibleChoices"], function () {
|
38439
38574
|
_this.updateReadOnlyText();
|
38440
38575
|
});
|
38441
38576
|
_this.updateReadOnlyText();
|
@@ -39753,6 +39888,13 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
39753
39888
|
}
|
39754
39889
|
});
|
39755
39890
|
};
|
39891
|
+
Object.defineProperty(QuestionFileModel.prototype, "renderCapture", {
|
39892
|
+
get: function () {
|
39893
|
+
return this.allowCameraAccess ? "user" : undefined;
|
39894
|
+
},
|
39895
|
+
enumerable: false,
|
39896
|
+
configurable: true
|
39897
|
+
});
|
39756
39898
|
Object.defineProperty(QuestionFileModel.prototype, "multipleRendered", {
|
39757
39899
|
get: function () {
|
39758
39900
|
return this.allowMultiple ? "multiple" : undefined;
|
@@ -40052,6 +40194,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
40052
40194
|
__decorate([
|
40053
40195
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
|
40054
40196
|
], QuestionFileModel.prototype, "containsMultiplyFiles", void 0);
|
40197
|
+
__decorate([
|
40198
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
40199
|
+
], QuestionFileModel.prototype, "allowCameraAccess", void 0);
|
40055
40200
|
__decorate([
|
40056
40201
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "confirmRemoveFile" } })
|
40057
40202
|
], QuestionFileModel.prototype, "confirmRemoveMessage", void 0);
|
@@ -40097,6 +40242,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("file", [
|
|
40097
40242
|
{ name: "correctAnswer", visible: false },
|
40098
40243
|
{ name: "validators", visible: false },
|
40099
40244
|
{ name: "needConfirmRemoveFile:boolean" },
|
40245
|
+
{ name: "allowCameraAccess:switch", category: "general" }
|
40100
40246
|
], function () {
|
40101
40247
|
return new QuestionFileModel("");
|
40102
40248
|
}, "question");
|
@@ -45164,10 +45310,10 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
45164
45310
|
});
|
45165
45311
|
Object.defineProperty(MatrixDropdownColumn.prototype, "width", {
|
45166
45312
|
get: function () {
|
45167
|
-
return this.
|
45313
|
+
return this.templateQuestion.width;
|
45168
45314
|
},
|
45169
45315
|
set: function (val) {
|
45170
|
-
this.
|
45316
|
+
this.templateQuestion.width = val;
|
45171
45317
|
},
|
45172
45318
|
enumerable: false,
|
45173
45319
|
configurable: true
|
@@ -48566,7 +48712,7 @@ var QuestionPanelDynamicItem = /** @class */ (function () {
|
|
48566
48712
|
QuestionPanelDynamicItem.prototype.setValue = function (name, newValue) {
|
48567
48713
|
var oldItemData = this.data.getPanelItemData(this);
|
48568
48714
|
var oldValue = !!oldItemData ? oldItemData[name] : undefined;
|
48569
|
-
if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(newValue, oldValue))
|
48715
|
+
if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(newValue, oldValue, false, true))
|
48570
48716
|
return;
|
48571
48717
|
this.data.setPanelItemData(this, name, _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].getUnbindValue(newValue));
|
48572
48718
|
var questions = this.panel.questions;
|
@@ -51244,7 +51390,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
51244
51390
|
var target = event.target;
|
51245
51391
|
if (!_this.isDragStartNodeValid(target))
|
51246
51392
|
return;
|
51247
|
-
if (_this.allowStartDrag) {
|
51393
|
+
if (_this.allowStartDrag && _this.canStartDragDueMaxSelectedChoices(target)) {
|
51248
51394
|
_this.dragDropRankingChoices.startDrag(event, choice, _this, node);
|
51249
51395
|
}
|
51250
51396
|
};
|
@@ -51518,6 +51664,22 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
51518
51664
|
enumerable: false,
|
51519
51665
|
configurable: true
|
51520
51666
|
});
|
51667
|
+
QuestionRankingModel.prototype.canStartDragDueMaxSelectedChoices = function (target) {
|
51668
|
+
if (!this.selectToRankEnabled)
|
51669
|
+
return true;
|
51670
|
+
var fromContainer = target.closest("[data-ranking='from-container']");
|
51671
|
+
if (fromContainer) {
|
51672
|
+
return this.checkMaxSelectedChoicesUnreached();
|
51673
|
+
}
|
51674
|
+
return true;
|
51675
|
+
};
|
51676
|
+
QuestionRankingModel.prototype.checkMaxSelectedChoicesUnreached = function () {
|
51677
|
+
if (this.maxSelectedChoices < 1)
|
51678
|
+
return true;
|
51679
|
+
var val = this.value;
|
51680
|
+
var len = !Array.isArray(val) ? 0 : val.length;
|
51681
|
+
return len < this.maxSelectedChoices;
|
51682
|
+
};
|
51521
51683
|
//cross framework initialization
|
51522
51684
|
QuestionRankingModel.prototype.afterRenderQuestionElement = function (el) {
|
51523
51685
|
this.domNode = el;
|
@@ -51547,14 +51709,14 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
51547
51709
|
var isMovedElementUnRanked = !isMovedElementRanked;
|
51548
51710
|
var fromIndex;
|
51549
51711
|
var toIndex;
|
51550
|
-
if (key === " " && isMovedElementUnRanked) {
|
51712
|
+
if ((key === " " || key === "Enter") && isMovedElementUnRanked) {
|
51551
51713
|
fromIndex = unRankingChoices.indexOf(movedElement);
|
51552
51714
|
toIndex = 0;
|
51553
51715
|
dnd.selectToRank(this, fromIndex, toIndex);
|
51554
51716
|
this.setValueAfterKeydown(toIndex, "to-container");
|
51555
51717
|
return;
|
51556
51718
|
}
|
51557
|
-
if (key === " " && isMovedElementRanked) {
|
51719
|
+
if ((key === " " || key === "Enter") && isMovedElementRanked) {
|
51558
51720
|
fromIndex = rankingChoices.indexOf(movedElement);
|
51559
51721
|
dnd.unselectFromRank(this, fromIndex);
|
51560
51722
|
toIndex = this.unRankingChoices.indexOf(movedElement); //'this.' leads to actual array after the 'unselectFromRank' method
|
@@ -51646,6 +51808,8 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
51646
51808
|
* @see selectToRankAreasLayout
|
51647
51809
|
*/
|
51648
51810
|
get: function () {
|
51811
|
+
if (_utils_devices__WEBPACK_IMPORTED_MODULE_7__["IsMobile"])
|
51812
|
+
return "vertical";
|
51649
51813
|
return this.getPropertyValue("selectToRankAreasLayout", "horizontal");
|
51650
51814
|
},
|
51651
51815
|
set: function (val) {
|
@@ -51671,11 +51835,11 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
51671
51835
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ defaultValue: null })
|
51672
51836
|
], QuestionRankingModel.prototype, "dropTargetNodeMove", void 0);
|
51673
51837
|
__decorate([
|
51674
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ localizable: { defaultStr: "
|
51675
|
-
], QuestionRankingModel.prototype, "
|
51838
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ localizable: { defaultStr: "selectToRankEmptyRankedAreaText" } })
|
51839
|
+
], QuestionRankingModel.prototype, "selectToRankEmptyRankedAreaText", void 0);
|
51676
51840
|
__decorate([
|
51677
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ localizable: { defaultStr: "
|
51678
|
-
], QuestionRankingModel.prototype, "
|
51841
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ localizable: { defaultStr: "selectToRankEmptyUnrankedAreaText" } })
|
51842
|
+
], QuestionRankingModel.prototype, "selectToRankEmptyUnrankedAreaText", void 0);
|
51679
51843
|
return QuestionRankingModel;
|
51680
51844
|
}(_question_checkbox__WEBPACK_IMPORTED_MODULE_5__["QuestionCheckboxModel"]));
|
51681
51845
|
|
@@ -53941,7 +54105,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
53941
54105
|
});
|
53942
54106
|
QuestionTextModel.prototype.updateValueOnEvent = function (event) {
|
53943
54107
|
var newValue = event.target.value;
|
53944
|
-
if (!
|
54108
|
+
if (!this.isTwoValueEquals(this.value, newValue)) {
|
53945
54109
|
this.value = newValue;
|
53946
54110
|
}
|
53947
54111
|
};
|
@@ -57556,7 +57720,9 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
57556
57720
|
this.renderInput(this.question["dropdownListModel"]),
|
57557
57721
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_popup_popup__WEBPACK_IMPORTED_MODULE_2__["Popup"], { model: (_b = (_a = this.question) === null || _a === void 0 ? void 0 : _a.dropdownListModel) === null || _b === void 0 ? void 0 : _b.popupModel }));
|
57558
57722
|
}
|
57559
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.selectWrapper },
|
57723
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.selectWrapper, onClick: this.click },
|
57724
|
+
selectElement,
|
57725
|
+
this.createChevronButton()));
|
57560
57726
|
};
|
57561
57727
|
SurveyQuestionDropdownBase.prototype.renderValueElement = function (dropdownListModel) {
|
57562
57728
|
if (this.question.showInputFieldComponent) {
|
@@ -57576,7 +57742,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
57576
57742
|
dropdownListModel.inputStringRendered = e.target.value;
|
57577
57743
|
}
|
57578
57744
|
};
|
57579
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.inputReadOnly ? undefined : 0,
|
57745
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.inputReadOnly ? undefined : 0,
|
57580
57746
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
57581
57747
|
// @ts-ignore
|
57582
57748
|
disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
|
@@ -57599,6 +57765,12 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
57599
57765
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.cleanButton, style: style, onClick: this.clear },
|
57600
57766
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: this.question.cssClasses.cleanButtonSvg, iconName: this.question.cssClasses.cleanButtonIconId, title: this.question.clearCaption, size: "auto" })));
|
57601
57767
|
};
|
57768
|
+
SurveyQuestionDropdownBase.prototype.createChevronButton = function () {
|
57769
|
+
if (!this.question.cssClasses.chevronButtonIconId)
|
57770
|
+
return null;
|
57771
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.chevronButton },
|
57772
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: this.question.cssClasses.chevronButtonSvg, iconName: this.question.cssClasses.chevronButtonIconId, size: 24 })));
|
57773
|
+
};
|
57602
57774
|
SurveyQuestionDropdownBase.prototype.renderOther = function (cssClasses) {
|
57603
57775
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getCommentAreaCss(true) },
|
57604
57776
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_reactquestion_comment__WEBPACK_IMPORTED_MODULE_5__["SurveyQuestionOtherValueItem"], { question: this.question, otherCss: cssClasses.other, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode, isOther: true })));
|
@@ -57615,7 +57787,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
57615
57787
|
if (!!this.inputElement) {
|
57616
57788
|
var control = this.inputElement;
|
57617
57789
|
var newValue = this.question.dropdownListModel.inputStringRendered;
|
57618
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value)) {
|
57790
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true)) {
|
57619
57791
|
control.value = this.question.dropdownListModel.inputStringRendered;
|
57620
57792
|
}
|
57621
57793
|
}
|
@@ -57762,7 +57934,9 @@ var SurveyQuestionDropdownSelect = /** @class */ (function (_super) {
|
|
57762
57934
|
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("select", { id: this.question.inputId, className: this.question.getControlClass(), ref: function (select) { return (_this.setControl(select)); }, autoComplete: this.question.autocomplete, onChange: this.updateValueOnEvent, onInput: this.updateValueOnEvent, onClick: click, onKeyUp: keyup, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy, required: this.question.isRequired },
|
57763
57935
|
this.question.allowClear ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("option", { value: "" }, this.question.placeholder)) : null,
|
57764
57936
|
this.question.visibleChoices.map(function (item, i) { return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_dropdown_item__WEBPACK_IMPORTED_MODULE_4__["SurveyQuestionOptionItem"], { key: "item" + i, item: item }); })));
|
57765
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.selectWrapper },
|
57937
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.selectWrapper },
|
57938
|
+
selectElement,
|
57939
|
+
this.createChevronButton()));
|
57766
57940
|
};
|
57767
57941
|
return SurveyQuestionDropdownSelect;
|
57768
57942
|
}(_reactquestion_dropdown__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionDropdown"]));
|
@@ -59011,6 +59185,7 @@ var Survey = /** @class */ (function (_super) {
|
|
59011
59185
|
else {
|
59012
59186
|
renderResult = this.renderSurvey();
|
59013
59187
|
}
|
59188
|
+
var backgroundImage = !!this.survey.renderBackgroundImage ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.rootBackgroundImage, style: this.survey.backgroundImageStyle }) : null;
|
59014
59189
|
var header = react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_5__["SurveyHeader"], { survey: this.survey });
|
59015
59190
|
var onSubmit = function (event) {
|
59016
59191
|
event.preventDefault();
|
@@ -59021,11 +59196,9 @@ var Survey = /** @class */ (function (_super) {
|
|
59021
59196
|
}
|
59022
59197
|
var rootCss = this.survey.getRootCss();
|
59023
59198
|
var cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
|
59024
|
-
var formStyle = {
|
59025
|
-
backgroundColor: this.survey.renderBackgroundOpacity
|
59026
|
-
};
|
59027
59199
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables },
|
59028
|
-
|
59200
|
+
backgroundImage,
|
59201
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("form", { onSubmit: onSubmit },
|
59029
59202
|
customHeader,
|
59030
59203
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.container },
|
59031
59204
|
header,
|
@@ -60957,7 +61130,7 @@ var SurveyQuestionUncontrolledElement = /** @class */ (function (_super) {
|
|
60957
61130
|
function SurveyQuestionUncontrolledElement(props) {
|
60958
61131
|
var _this = _super.call(this, props) || this;
|
60959
61132
|
_this.updateValueOnEvent = function (event) {
|
60960
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(_this.questionBase.value, event.target.value)) {
|
61133
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(_this.questionBase.value, event.target.value, false, true)) {
|
60961
61134
|
_this.setValueCore(event.target.value);
|
60962
61135
|
}
|
60963
61136
|
};
|
@@ -60981,7 +61154,7 @@ var SurveyQuestionUncontrolledElement = /** @class */ (function (_super) {
|
|
60981
61154
|
if (!!this.control) {
|
60982
61155
|
var control = this.control;
|
60983
61156
|
var newValue = this.getValueCore();
|
60984
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value)) {
|
61157
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true)) {
|
60985
61158
|
control.value = this.getValue(newValue);
|
60986
61159
|
}
|
60987
61160
|
}
|
@@ -61216,7 +61389,7 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
|
|
61216
61389
|
fileInput = (this.isDisplayMode ?
|
61217
61390
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "file", disabled: this.isDisplayMode, className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, onChange: !this.isDisplayMode ? this.question.doChange : (function () { }), multiple: this.question.allowMultiple, placeholder: this.question.title, accept: this.question.acceptedTypes })
|
61218
61391
|
:
|
61219
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "file", disabled: this.isDisplayMode, tabIndex: -1, className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, onChange: !this.isDisplayMode ? this.question.doChange : (function () { }), "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy, multiple: this.question.allowMultiple, title: this.question.inputTitle, accept: this.question.acceptedTypes }));
|
61392
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "file", disabled: this.isDisplayMode, tabIndex: -1, className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, onChange: !this.isDisplayMode ? this.question.doChange : (function () { }), "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy, multiple: this.question.allowMultiple, title: this.question.inputTitle, accept: this.question.acceptedTypes, capture: this.question.renderCapture }));
|
61220
61393
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.fileRootCss },
|
61221
61394
|
fileInput,
|
61222
61395
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.dragArea, onDrop: this.question.onDrop, onDragOver: this.question.onDragOver, onDragLeave: this.question.onDragLeave, onDragEnter: this.question.onDragEnter },
|
@@ -61529,7 +61702,6 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
|
|
61529
61702
|
var td = null;
|
61530
61703
|
var column = this.question.visibleColumns[i];
|
61531
61704
|
var key = "value" + i;
|
61532
|
-
//var isChecked = Helpers.isTwoValueEquals(row.value, column.value);
|
61533
61705
|
var isChecked = row.value == column.value;
|
61534
61706
|
var itemClass = this.question.getItemClass(row, column);
|
61535
61707
|
var inputId = this.question.inputId + "_" + row.name + "_" + i;
|
@@ -62785,12 +62957,12 @@ var SurveyQuestionRanking = /** @class */ (function (_super) {
|
|
62785
62957
|
this.getItems(this.question.unRankingChoices, unrankedItem),
|
62786
62958
|
this.question.unRankingChoices.length === 0 ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containerPlaceholder },
|
62787
62959
|
" ",
|
62788
|
-
this.question.
|
62960
|
+
this.question.selectToRankEmptyRankedAreaText,
|
62789
62961
|
" ") : null),
|
62790
62962
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containersDivider }),
|
62791
62963
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getContainerClasses("to"), "data-ranking": "to-container" },
|
62792
62964
|
this.getItems(),
|
62793
|
-
this.question.rankingChoices.length === 0 ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containerPlaceholder }, this.question.
|
62965
|
+
this.question.rankingChoices.length === 0 ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containerPlaceholder }, this.question.selectToRankEmptyUnrankedAreaText) : null)));
|
62794
62966
|
}
|
62795
62967
|
};
|
62796
62968
|
SurveyQuestionRanking.prototype.getItems = function (choices, unrankedItem) {
|
@@ -63074,7 +63246,7 @@ var SurveyQuestionTagbox = /** @class */ (function (_super) {
|
|
63074
63246
|
var _this = this;
|
63075
63247
|
var dropdownMultiSelectListModel = dropdownListModel;
|
63076
63248
|
var items = this.question.selectedChoices.map(function (choice, index) { return _this.renderItem("item" + index, choice); });
|
63077
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.inputReadOnly ? undefined : 0,
|
63249
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.inputReadOnly ? undefined : 0,
|
63078
63250
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
63079
63251
|
// @ts-ignore
|
63080
63252
|
disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
|
@@ -63829,7 +64001,7 @@ var TagboxFilterString = /** @class */ (function (_super) {
|
|
63829
64001
|
if (!!this.inputElement) {
|
63830
64002
|
var control = this.inputElement;
|
63831
64003
|
var newValue = this.model.inputStringRendered;
|
63832
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value)) {
|
64004
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true)) {
|
63833
64005
|
control.value = this.model.inputStringRendered;
|
63834
64006
|
}
|
63835
64007
|
}
|
@@ -64909,6 +65081,8 @@ var StylesManager = /** @class */ (function () {
|
|
64909
65081
|
return themeMapper;
|
64910
65082
|
};
|
64911
65083
|
StylesManager.getIncludedThemeCss = function () {
|
65084
|
+
if (typeof _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].environment === "undefined")
|
65085
|
+
return [];
|
64912
65086
|
var rootElement = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.rootElement;
|
64913
65087
|
var themeMapper = StylesManager.getAvailableThemes();
|
64914
65088
|
var element = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isShadowDOM"])(rootElement) ? rootElement.host : rootElement;
|
@@ -64947,6 +65121,8 @@ var StylesManager = /** @class */ (function () {
|
|
64947
65121
|
};
|
64948
65122
|
StylesManager.applyTheme = function (themeName, themeSelector) {
|
64949
65123
|
if (themeName === void 0) { themeName = "default"; }
|
65124
|
+
if (typeof _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].environment === "undefined")
|
65125
|
+
return;
|
64950
65126
|
var rootElement = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.rootElement;
|
64951
65127
|
var element = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_2__["isShadowDOM"])(rootElement) ? rootElement.host : rootElement;
|
64952
65128
|
_defaultCss_defaultV2Css__WEBPACK_IMPORTED_MODULE_0__["surveyCss"].currentType = themeName;
|
@@ -68569,10 +68745,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
68569
68745
|
});
|
68570
68746
|
Object.defineProperty(SurveyModel.prototype, "themeVariables", {
|
68571
68747
|
get: function () {
|
68572
|
-
|
68573
|
-
result.backgroundImage = this.renderBackgroundImage;
|
68574
|
-
result.backgroundSize = this.backgroundImageFit;
|
68575
|
-
return result;
|
68748
|
+
return Object.assign({}, this.cssVariables);
|
68576
68749
|
},
|
68577
68750
|
enumerable: false,
|
68578
68751
|
configurable: true
|
@@ -68661,14 +68834,14 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
68661
68834
|
enumerable: false,
|
68662
68835
|
configurable: true
|
68663
68836
|
});
|
68664
|
-
Object.defineProperty(SurveyModel.prototype, "
|
68837
|
+
Object.defineProperty(SurveyModel.prototype, "backgroundImageStyle", {
|
68665
68838
|
get: function () {
|
68666
|
-
|
68667
|
-
|
68668
|
-
|
68669
|
-
|
68670
|
-
|
68671
|
-
|
68839
|
+
return {
|
68840
|
+
opacity: this.backgroundOpacity,
|
68841
|
+
backgroundImage: this.renderBackgroundImage,
|
68842
|
+
backgroundSize: this.backgroundImageFit,
|
68843
|
+
backgroundAttachment: this.backgroundImageAttachment
|
68844
|
+
};
|
68672
68845
|
},
|
68673
68846
|
enumerable: false,
|
68674
68847
|
configurable: true
|
@@ -70331,7 +70504,19 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
70331
70504
|
Object.defineProperty(SurveyModel.prototype, "areEmptyElementsHidden", {
|
70332
70505
|
get: function () {
|
70333
70506
|
return (this.isShowingPreview &&
|
70334
|
-
this.showPreviewBeforeComplete == "showAnsweredQuestions");
|
70507
|
+
this.showPreviewBeforeComplete == "showAnsweredQuestions" && this.isAnyQuestionAnswered);
|
70508
|
+
},
|
70509
|
+
enumerable: false,
|
70510
|
+
configurable: true
|
70511
|
+
});
|
70512
|
+
Object.defineProperty(SurveyModel.prototype, "isAnyQuestionAnswered", {
|
70513
|
+
get: function () {
|
70514
|
+
var questions = this.getAllQuestions(true);
|
70515
|
+
for (var i = 0; i < questions.length; i++) {
|
70516
|
+
if (!questions[i].isEmpty())
|
70517
|
+
return true;
|
70518
|
+
}
|
70519
|
+
return false;
|
70335
70520
|
},
|
70336
70521
|
enumerable: false,
|
70337
70522
|
configurable: true
|
@@ -70787,7 +70972,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
70787
70972
|
return false;
|
70788
70973
|
if (doComplete) {
|
70789
70974
|
this.currentPage.passed = true;
|
70790
|
-
return this.doComplete(this.canBeCompletedByTrigger);
|
70975
|
+
return this.doComplete(this.canBeCompletedByTrigger, this.completedTrigger);
|
70791
70976
|
}
|
70792
70977
|
this.doNextPage();
|
70793
70978
|
return true;
|
@@ -71125,11 +71310,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
71125
71310
|
* @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`.
|
71126
71311
|
* @see surveyPostId
|
71127
71312
|
*/
|
71128
|
-
SurveyModel.prototype.doComplete = function (isCompleteOnTrigger) {
|
71313
|
+
SurveyModel.prototype.doComplete = function (isCompleteOnTrigger, completeTrigger) {
|
71129
71314
|
if (isCompleteOnTrigger === void 0) { isCompleteOnTrigger = false; }
|
71130
71315
|
if (this.isCompleted)
|
71131
71316
|
return;
|
71132
|
-
if (!this.checkOnCompletingEvent(isCompleteOnTrigger)) {
|
71317
|
+
if (!this.checkOnCompletingEvent(isCompleteOnTrigger, completeTrigger)) {
|
71133
71318
|
this.isCompleted = false;
|
71134
71319
|
return false;
|
71135
71320
|
}
|
@@ -71137,11 +71322,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
71137
71322
|
this.stopTimer();
|
71138
71323
|
this.isCompleted = true;
|
71139
71324
|
this.clearUnusedValues();
|
71140
|
-
this.saveDataOnComplete(isCompleteOnTrigger);
|
71325
|
+
this.saveDataOnComplete(isCompleteOnTrigger, completeTrigger);
|
71141
71326
|
this.setCookie();
|
71142
71327
|
return true;
|
71143
71328
|
};
|
71144
|
-
SurveyModel.prototype.saveDataOnComplete = function (isCompleteOnTrigger) {
|
71329
|
+
SurveyModel.prototype.saveDataOnComplete = function (isCompleteOnTrigger, completeTrigger) {
|
71145
71330
|
var _this = this;
|
71146
71331
|
if (isCompleteOnTrigger === void 0) { isCompleteOnTrigger = false; }
|
71147
71332
|
var previousCookie = this.hasCookie;
|
@@ -71162,6 +71347,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
71162
71347
|
var savingDataStarted = false;
|
71163
71348
|
var onCompleteOptions = {
|
71164
71349
|
isCompleteOnTrigger: isCompleteOnTrigger,
|
71350
|
+
completeTrigger: completeTrigger,
|
71165
71351
|
showSaveInProgress: showSaveInProgress,
|
71166
71352
|
showSaveError: showSaveError,
|
71167
71353
|
showSaveSuccess: showSaveSuccess,
|
@@ -71180,11 +71366,12 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
71180
71366
|
this.navigateTo();
|
71181
71367
|
}
|
71182
71368
|
};
|
71183
|
-
SurveyModel.prototype.checkOnCompletingEvent = function (isCompleteOnTrigger) {
|
71369
|
+
SurveyModel.prototype.checkOnCompletingEvent = function (isCompleteOnTrigger, completeTrigger) {
|
71184
71370
|
var options = {
|
71185
71371
|
allowComplete: true,
|
71186
71372
|
allow: true,
|
71187
71373
|
isCompleteOnTrigger: isCompleteOnTrigger,
|
71374
|
+
completeTrigger: completeTrigger
|
71188
71375
|
};
|
71189
71376
|
this.onCompleting.fire(this, options);
|
71190
71377
|
return options.allowComplete && options.allow;
|
@@ -71329,8 +71516,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
71329
71516
|
this.doComplete(true);
|
71330
71517
|
}
|
71331
71518
|
};
|
71332
|
-
SurveyModel.prototype.setCompleted = function () {
|
71333
|
-
this.doComplete(true);
|
71519
|
+
SurveyModel.prototype.setCompleted = function (trigger) {
|
71520
|
+
this.doComplete(true, trigger);
|
71334
71521
|
};
|
71335
71522
|
SurveyModel.prototype.canBeCompleted = function (trigger, isCompleted) {
|
71336
71523
|
if (!_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].triggers.changeNavigationButtonsOnComplete)
|
@@ -71339,7 +71526,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
71339
71526
|
if (!this.completedByTriggers)
|
71340
71527
|
this.completedByTriggers = {};
|
71341
71528
|
if (isCompleted) {
|
71342
|
-
this.completedByTriggers[trigger.id] =
|
71529
|
+
this.completedByTriggers[trigger.id] = trigger;
|
71343
71530
|
}
|
71344
71531
|
else {
|
71345
71532
|
delete this.completedByTriggers[trigger.id];
|
@@ -71357,6 +71544,16 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
71357
71544
|
enumerable: false,
|
71358
71545
|
configurable: true
|
71359
71546
|
});
|
71547
|
+
Object.defineProperty(SurveyModel.prototype, "completedTrigger", {
|
71548
|
+
get: function () {
|
71549
|
+
if (!this.canBeCompletedByTrigger)
|
71550
|
+
return undefined;
|
71551
|
+
var key = Object.keys(this.completedByTriggers)[0];
|
71552
|
+
return this.completedByTriggers[key];
|
71553
|
+
},
|
71554
|
+
enumerable: false,
|
71555
|
+
configurable: true
|
71556
|
+
});
|
71360
71557
|
Object.defineProperty(SurveyModel.prototype, "processedCompletedHtml", {
|
71361
71558
|
/**
|
71362
71559
|
* Returns the HTML content for the complete page.
|
@@ -71499,6 +71696,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
71499
71696
|
survey: this,
|
71500
71697
|
htmlElement: htmlElement,
|
71501
71698
|
});
|
71699
|
+
this.rootElement = htmlElement;
|
71502
71700
|
};
|
71503
71701
|
SurveyModel.prototype.processResponsiveness = function (width, mobileWidth) {
|
71504
71702
|
var isMobile = width < mobileWidth;
|
@@ -73816,11 +74014,17 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
73816
74014
|
}
|
73817
74015
|
}
|
73818
74016
|
};
|
73819
|
-
SurveyModel.prototype.copyTriggerValue = function (name, fromName) {
|
74017
|
+
SurveyModel.prototype.copyTriggerValue = function (name, fromName, copyDisplayValue) {
|
73820
74018
|
if (!name || !fromName)
|
73821
74019
|
return;
|
73822
|
-
var
|
73823
|
-
|
74020
|
+
var value;
|
74021
|
+
if (copyDisplayValue) {
|
74022
|
+
value = this.processText("{" + fromName + "}", true);
|
74023
|
+
}
|
74024
|
+
else {
|
74025
|
+
var processor = new _conditionProcessValue__WEBPACK_IMPORTED_MODULE_6__["ProcessValue"]();
|
74026
|
+
value = processor.getValue(fromName, this.getFilteredValues());
|
74027
|
+
}
|
73824
74028
|
this.setTriggerValue(name, value, false);
|
73825
74029
|
};
|
73826
74030
|
SurveyModel.prototype.triggerExecuted = function (trigger) {
|
@@ -73963,7 +74167,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
73963
74167
|
}
|
73964
74168
|
}
|
73965
74169
|
}
|
73966
|
-
else if (isStrCiEqual(layoutElement.id, "progress-" + this.progressBarType)) {
|
74170
|
+
else if (this.state === "running" && isStrCiEqual(layoutElement.id, "progress-" + this.progressBarType)) {
|
73967
74171
|
if (container === "header") {
|
73968
74172
|
if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
|
73969
74173
|
containerLayoutElements.push(layoutElement);
|
@@ -74052,9 +74256,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
74052
74256
|
__decorate([
|
74053
74257
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: {} })
|
74054
74258
|
], SurveyModel.prototype, "cssVariables", void 0);
|
74055
|
-
__decorate([
|
74056
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
74057
|
-
], SurveyModel.prototype, "backgroundImagePosition", void 0);
|
74058
74259
|
__decorate([
|
74059
74260
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
74060
74261
|
], SurveyModel.prototype, "_isMobile", void 0);
|
@@ -74067,6 +74268,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
74067
74268
|
__decorate([
|
74068
74269
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
74069
74270
|
], SurveyModel.prototype, "backgroundImageFit", void 0);
|
74271
|
+
__decorate([
|
74272
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
74273
|
+
], SurveyModel.prototype, "backgroundImageAttachment", void 0);
|
74070
74274
|
__decorate([
|
74071
74275
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
74072
74276
|
], SurveyModel.prototype, "rootCss", void 0);
|
@@ -74321,6 +74525,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
74321
74525
|
{ name: "width", visibleIf: function (obj) { return obj.widthMode === "static"; } },
|
74322
74526
|
{ name: "backgroundImage", serializationProperty: "locBackgroundImage", visible: false },
|
74323
74527
|
{ name: "backgroundImageFit", default: "cover", choices: ["auto", "contain", "cover"], visible: false },
|
74528
|
+
{ name: "backgroundImageAttachment", default: "scroll", choices: ["scroll", "fixed"], visible: false },
|
74324
74529
|
{ name: "backgroundOpacity:number", minValue: 0, maxValue: 1, default: 1, visible: false },
|
74325
74530
|
{ name: "showBrandInfo:boolean", default: false, visible: false }
|
74326
74531
|
]);
|
@@ -74991,7 +75196,7 @@ var SvgIconRegistry = /** @class */ (function () {
|
|
74991
75196
|
};
|
74992
75197
|
SvgIconRegistry.prototype.renderIcons = function () {
|
74993
75198
|
var containerId = "sv-icon-holder-global-container";
|
74994
|
-
if (!_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment.root.getElementById(containerId)) {
|
75199
|
+
if (!!_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment && !_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment.root.getElementById(containerId)) {
|
74995
75200
|
var iconsDiv = document.createElement("div");
|
74996
75201
|
iconsDiv.id = containerId;
|
74997
75202
|
iconsDiv.innerHTML = "<svg>" + this.iconsRenderedHtml() + "</svg>";
|
@@ -75652,7 +75857,7 @@ var SurveyTriggerComplete = /** @class */ (function (_super) {
|
|
75652
75857
|
if (!this.owner)
|
75653
75858
|
return;
|
75654
75859
|
if (this.isRealExecution()) {
|
75655
|
-
this.owner.setCompleted();
|
75860
|
+
this.owner.setCompleted(this);
|
75656
75861
|
}
|
75657
75862
|
else {
|
75658
75863
|
this.owner.canBeCompleted(this, true);
|
@@ -75839,13 +76044,23 @@ var SurveyTriggerCopyValue = /** @class */ (function (_super) {
|
|
75839
76044
|
enumerable: false,
|
75840
76045
|
configurable: true
|
75841
76046
|
});
|
76047
|
+
Object.defineProperty(SurveyTriggerCopyValue.prototype, "copyDisplayValue", {
|
76048
|
+
get: function () {
|
76049
|
+
return this.getPropertyValue("copyDisplayValue");
|
76050
|
+
},
|
76051
|
+
set: function (val) {
|
76052
|
+
this.setPropertyValue("copyDisplayValue", val);
|
76053
|
+
},
|
76054
|
+
enumerable: false,
|
76055
|
+
configurable: true
|
76056
|
+
});
|
75842
76057
|
SurveyTriggerCopyValue.prototype.getType = function () {
|
75843
76058
|
return "copyvaluetrigger";
|
75844
76059
|
};
|
75845
76060
|
SurveyTriggerCopyValue.prototype.onSuccess = function (values, properties) {
|
75846
76061
|
if (!this.setToName || !this.owner)
|
75847
76062
|
return;
|
75848
|
-
this.owner.copyTriggerValue(this.setToName, this.fromName);
|
76063
|
+
this.owner.copyTriggerValue(this.setToName, this.fromName, this.copyDisplayValue);
|
75849
76064
|
};
|
75850
76065
|
return SurveyTriggerCopyValue;
|
75851
76066
|
}(SurveyTrigger));
|
@@ -75875,7 +76090,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("setvaluetrigger
|
|
75875
76090
|
], function () {
|
75876
76091
|
return new SurveyTriggerSetValue();
|
75877
76092
|
}, "surveytrigger");
|
75878
|
-
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("copyvaluetrigger", [{ name: "!fromName:questionvalue" }, { name: "!setToName:questionvalue" }
|
76093
|
+
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("copyvaluetrigger", [{ name: "!fromName:questionvalue" }, { name: "!setToName:questionvalue" },
|
76094
|
+
{ name: "copyDisplayValue:boolean", visible: false }], function () {
|
75879
76095
|
return new SurveyTriggerCopyValue();
|
75880
76096
|
}, "surveytrigger");
|
75881
76097
|
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("skiptrigger", [{ name: "!gotoName:question" }], function () {
|