survey-react 1.10.6 → 1.11.1
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 +131 -17
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +77 -9
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +17 -1
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +210 -66
- package/survey.react.js +1433 -594
- 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.
|
2
|
+
* surveyjs - Survey JavaScript library v1.11.1
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -726,6 +726,11 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
726
726
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
727
727
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
728
728
|
};
|
729
|
+
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) {
|
730
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
731
|
+
to[j] = from[i];
|
732
|
+
return to;
|
733
|
+
};
|
729
734
|
|
730
735
|
|
731
736
|
|
@@ -748,7 +753,9 @@ function createDropdownActionModelAdvanced(actionOptions, listOptions, popupOpti
|
|
748
753
|
if (newAction.hasTitle) {
|
749
754
|
newAction.title = item.title;
|
750
755
|
}
|
751
|
-
originalSelectionChanged
|
756
|
+
if (originalSelectionChanged) {
|
757
|
+
originalSelectionChanged(item, params);
|
758
|
+
}
|
752
759
|
};
|
753
760
|
var popupModel = createPopupModelWithListModel(listOptions, popupOptions);
|
754
761
|
var newActionOptions = Object.assign({}, actionOptions, {
|
@@ -767,7 +774,9 @@ function createDropdownActionModelAdvanced(actionOptions, listOptions, popupOpti
|
|
767
774
|
function createPopupModelWithListModel(listOptions, popupOptions) {
|
768
775
|
var listModel = new _list__WEBPACK_IMPORTED_MODULE_3__["ListModel"](listOptions);
|
769
776
|
listModel.onSelectionChanged = function (item) {
|
770
|
-
listOptions.onSelectionChanged
|
777
|
+
if (listOptions.onSelectionChanged) {
|
778
|
+
listOptions.onSelectionChanged(item);
|
779
|
+
}
|
771
780
|
popupModel.hide();
|
772
781
|
};
|
773
782
|
var _popupOptions = popupOptions || {};
|
@@ -789,6 +798,7 @@ var BaseAction = /** @class */ (function (_super) {
|
|
789
798
|
function BaseAction() {
|
790
799
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
791
800
|
_this.rendredIdValue = BaseAction.getNextRendredId();
|
801
|
+
_this.markerIconSize = 16;
|
792
802
|
return _this;
|
793
803
|
}
|
794
804
|
BaseAction.getNextRendredId = function () { return BaseAction.renderedId++; };
|
@@ -932,6 +942,46 @@ var BaseAction = /** @class */ (function (_super) {
|
|
932
942
|
}
|
933
943
|
return args.isTrusted;
|
934
944
|
};
|
945
|
+
BaseAction.prototype.showPopup = function () {
|
946
|
+
if (!!this.popupModel) {
|
947
|
+
this.popupModel.show();
|
948
|
+
}
|
949
|
+
};
|
950
|
+
BaseAction.prototype.hidePopup = function () {
|
951
|
+
if (!!this.popupModel) {
|
952
|
+
this.popupModel.hide();
|
953
|
+
}
|
954
|
+
};
|
955
|
+
BaseAction.prototype.clearPopupTimeouts = function () {
|
956
|
+
if (this.showPopupTimeout)
|
957
|
+
clearTimeout(this.showPopupTimeout);
|
958
|
+
if (this.hidePopupTimeout)
|
959
|
+
clearTimeout(this.hidePopupTimeout);
|
960
|
+
};
|
961
|
+
BaseAction.prototype.showPopupDelayed = function (delay) {
|
962
|
+
var _this = this;
|
963
|
+
this.clearPopupTimeouts();
|
964
|
+
this.showPopupTimeout = setTimeout(function () {
|
965
|
+
_this.clearPopupTimeouts();
|
966
|
+
_this.showPopup();
|
967
|
+
}, delay);
|
968
|
+
};
|
969
|
+
BaseAction.prototype.hidePopupDelayed = function (delay) {
|
970
|
+
var _this = this;
|
971
|
+
var _a;
|
972
|
+
if ((_a = this.popupModel) === null || _a === void 0 ? void 0 : _a.isVisible) {
|
973
|
+
this.clearPopupTimeouts();
|
974
|
+
this.hidePopupTimeout = setTimeout(function () {
|
975
|
+
_this.clearPopupTimeouts();
|
976
|
+
_this.hidePopup();
|
977
|
+
_this.isHovered = false;
|
978
|
+
}, delay);
|
979
|
+
}
|
980
|
+
else {
|
981
|
+
this.clearPopupTimeouts();
|
982
|
+
this.isHovered = false;
|
983
|
+
}
|
984
|
+
};
|
935
985
|
BaseAction.renderedId = 1;
|
936
986
|
__decorate([
|
937
987
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
@@ -993,9 +1043,21 @@ var BaseAction = /** @class */ (function (_super) {
|
|
993
1043
|
__decorate([
|
994
1044
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: 24 })
|
995
1045
|
], BaseAction.prototype, "iconSize", void 0);
|
1046
|
+
__decorate([
|
1047
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
1048
|
+
], BaseAction.prototype, "markerIconName", void 0);
|
1049
|
+
__decorate([
|
1050
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
1051
|
+
], BaseAction.prototype, "markerIconSize", void 0);
|
996
1052
|
__decorate([
|
997
1053
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
998
1054
|
], BaseAction.prototype, "css", void 0);
|
1055
|
+
__decorate([
|
1056
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
|
1057
|
+
], BaseAction.prototype, "isPressed", void 0);
|
1058
|
+
__decorate([
|
1059
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
|
1060
|
+
], BaseAction.prototype, "isHovered", void 0);
|
999
1061
|
return BaseAction;
|
1000
1062
|
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));
|
1001
1063
|
|
@@ -1033,6 +1095,14 @@ var Action = /** @class */ (function (_super) {
|
|
1033
1095
|
Action.prototype.createLocTitle = function () {
|
1034
1096
|
return this.createLocalizableString("title", this, true);
|
1035
1097
|
};
|
1098
|
+
Action.prototype.setItems = function (items, onSelectionChanged) {
|
1099
|
+
this.markerIconName = "icon-next_16x16";
|
1100
|
+
this.component = "sv-list-item-group";
|
1101
|
+
this.items = __spreadArray([], items);
|
1102
|
+
var popupModel = createPopupModelWithListModel({ items: items, onSelectionChanged: onSelectionChanged, searchEnabled: false }, { horizontalPosition: "right", showPointer: false, canShrink: false });
|
1103
|
+
popupModel.cssClass = "sv-popup-inner";
|
1104
|
+
this.popupModel = popupModel;
|
1105
|
+
};
|
1036
1106
|
Action.prototype.getLocTitle = function () {
|
1037
1107
|
return this.locTitleValue;
|
1038
1108
|
};
|
@@ -1249,9 +1319,6 @@ var AdaptiveActionContainer = /** @class */ (function (_super) {
|
|
1249
1319
|
tooltip: _surveyStrings__WEBPACK_IMPORTED_MODULE_3__["surveyLocalization"].getString("more"),
|
1250
1320
|
}, {
|
1251
1321
|
items: [],
|
1252
|
-
onSelectionChanged: function (item) {
|
1253
|
-
_this.hiddenItemSelected(item);
|
1254
|
-
},
|
1255
1322
|
allowSelection: false
|
1256
1323
|
});
|
1257
1324
|
return _this;
|
@@ -1317,11 +1384,6 @@ var AdaptiveActionContainer = /** @class */ (function (_super) {
|
|
1317
1384
|
enumerable: false,
|
1318
1385
|
configurable: true
|
1319
1386
|
});
|
1320
|
-
AdaptiveActionContainer.prototype.hiddenItemSelected = function (item) {
|
1321
|
-
if (!!item && typeof item.action === "function") {
|
1322
|
-
item.action();
|
1323
|
-
}
|
1324
|
-
};
|
1325
1387
|
AdaptiveActionContainer.prototype.onSet = function () {
|
1326
1388
|
var _this = this;
|
1327
1389
|
this.actions.forEach(function (action) { return action.updateCallback = function (isResetInitialized) { return _this.raiseUpdate(isResetInitialized); }; });
|
@@ -1578,6 +1640,21 @@ var ActionContainer = /** @class */ (function (_super) {
|
|
1578
1640
|
this.sortItems();
|
1579
1641
|
}
|
1580
1642
|
};
|
1643
|
+
ActionContainer.prototype.popupAfterShowCallback = function (itemValue) {
|
1644
|
+
};
|
1645
|
+
ActionContainer.prototype.mouseOverHandler = function (itemValue) {
|
1646
|
+
var _this = this;
|
1647
|
+
itemValue.isHovered = true;
|
1648
|
+
this.actions.forEach(function (action) {
|
1649
|
+
if (action === itemValue && !!itemValue.popupModel) {
|
1650
|
+
itemValue.showPopupDelayed(_this.subItemsShowDelay);
|
1651
|
+
_this.popupAfterShowCallback(itemValue);
|
1652
|
+
}
|
1653
|
+
else if (!!action.popupModel && action.popupModel.isVisible) {
|
1654
|
+
action.hidePopupDelayed(_this.subItemsHideDelay);
|
1655
|
+
}
|
1656
|
+
});
|
1657
|
+
};
|
1581
1658
|
ActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
|
1582
1659
|
return;
|
1583
1660
|
};
|
@@ -1613,6 +1690,12 @@ var ActionContainer = /** @class */ (function (_super) {
|
|
1613
1690
|
__decorate([
|
1614
1691
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
1615
1692
|
], ActionContainer.prototype, "isEmpty", void 0);
|
1693
|
+
__decorate([
|
1694
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 300 })
|
1695
|
+
], ActionContainer.prototype, "subItemsShowDelay", void 0);
|
1696
|
+
__decorate([
|
1697
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 300 })
|
1698
|
+
], ActionContainer.prototype, "subItemsHideDelay", void 0);
|
1616
1699
|
return ActionContainer;
|
1617
1700
|
}(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));
|
1618
1701
|
|
@@ -1888,6 +1971,10 @@ var Base = /** @class */ (function () {
|
|
1888
1971
|
this.onItemValuePropertyChanged = this.addEvent();
|
1889
1972
|
this.isCreating = true;
|
1890
1973
|
this.animationAllowedLock = 0;
|
1974
|
+
//remove when knockout obsolete
|
1975
|
+
this.supportOnElementRenderedEvent = true;
|
1976
|
+
this.onElementRenderedEventEnabled = false;
|
1977
|
+
this._onElementRerendered = new EventBase();
|
1891
1978
|
this.bindingsValue = new Bindings(this);
|
1892
1979
|
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["CustomPropertiesCollection"].createProperties(this);
|
1893
1980
|
this.onBaseCreating();
|
@@ -2816,7 +2903,7 @@ var Base = /** @class */ (function () {
|
|
2816
2903
|
configurable: true
|
2817
2904
|
});
|
2818
2905
|
Base.prototype.getIsAnimationAllowed = function () {
|
2819
|
-
return _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].animationEnabled && this.animationAllowedLock >= 0 && !this.isLoadingFromJson && !this.isDisposed;
|
2906
|
+
return _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].animationEnabled && this.animationAllowedLock >= 0 && !this.isLoadingFromJson && !this.isDisposed && (!!this.onElementRerendered || !this.supportOnElementRenderedEvent);
|
2820
2907
|
};
|
2821
2908
|
Base.prototype.blockAnimations = function () {
|
2822
2909
|
this.animationAllowedLock--;
|
@@ -2824,6 +2911,22 @@ var Base = /** @class */ (function () {
|
|
2824
2911
|
Base.prototype.releaseAnimations = function () {
|
2825
2912
|
this.animationAllowedLock++;
|
2826
2913
|
};
|
2914
|
+
Base.prototype.enableOnElementRenderedEvent = function () {
|
2915
|
+
this.onElementRenderedEventEnabled = true;
|
2916
|
+
};
|
2917
|
+
Base.prototype.disableOnElementRenderedEvent = function () {
|
2918
|
+
this.onElementRenderedEventEnabled = false;
|
2919
|
+
};
|
2920
|
+
Object.defineProperty(Base.prototype, "onElementRerendered", {
|
2921
|
+
get: function () {
|
2922
|
+
return this.supportOnElementRenderedEvent && this.onElementRenderedEventEnabled ? this._onElementRerendered : undefined;
|
2923
|
+
},
|
2924
|
+
enumerable: false,
|
2925
|
+
configurable: true
|
2926
|
+
});
|
2927
|
+
Base.prototype.afterRerender = function () {
|
2928
|
+
this.onElementRerendered.fire(this, undefined);
|
2929
|
+
};
|
2827
2930
|
Base.currentDependencis = undefined;
|
2828
2931
|
return Base;
|
2829
2932
|
}());
|
@@ -2867,8 +2970,9 @@ var Event = /** @class */ (function () {
|
|
2867
2970
|
Event.prototype.fire = function (sender, options) {
|
2868
2971
|
if (!this.callbacks)
|
2869
2972
|
return;
|
2870
|
-
|
2871
|
-
|
2973
|
+
var callbacks = [].concat(this.callbacks);
|
2974
|
+
for (var i = 0; i < callbacks.length; i++) {
|
2975
|
+
callbacks[i](sender, options);
|
2872
2976
|
if (!this.callbacks)
|
2873
2977
|
return;
|
2874
2978
|
}
|
@@ -5606,6 +5710,7 @@ var defaultV2Css = {
|
|
5606
5710
|
rowMultiple: "sd-row--multiple",
|
5607
5711
|
rowCompact: "sd-row--compact",
|
5608
5712
|
rowFadeIn: "sd-row--fade-in",
|
5713
|
+
rowDelayedFadeIn: "sd-row--delayed-fade-in",
|
5609
5714
|
rowFadeOut: "sd-row--fade-out",
|
5610
5715
|
pageRow: "sd-page__row",
|
5611
5716
|
question: {
|
@@ -5665,6 +5770,7 @@ var defaultV2Css = {
|
|
5665
5770
|
disabled: "sd-question--disabled",
|
5666
5771
|
readOnly: "sd-question--readonly",
|
5667
5772
|
preview: "sd-question--preview",
|
5773
|
+
noPointerEventsMode: "sd-question--no-pointer-events",
|
5668
5774
|
errorsContainer: "sd-element__erbox sd-question__erbox",
|
5669
5775
|
errorsContainerTop: "sd-element__erbox--above-element sd-question__erbox--above-question",
|
5670
5776
|
errorsContainerBottom: "sd-question__erbox--below-question"
|
@@ -6119,13 +6225,13 @@ var defaultV2Css = {
|
|
6119
6225
|
removeButtonIconId: "icon-clear",
|
6120
6226
|
removeFile: "sd-hidden",
|
6121
6227
|
removeFileSvg: "",
|
6122
|
-
removeFileSvgIconId: "icon-
|
6228
|
+
removeFileSvgIconId: "icon-close_16x16",
|
6123
6229
|
wrapper: "sd-file__wrapper",
|
6124
6230
|
defaultImage: "sd-file__default-image",
|
6125
6231
|
defaultImageIconId: "icon-defaultfile",
|
6126
6232
|
leftIconId: "icon-arrowleft",
|
6127
6233
|
rightIconId: "icon-arrowright",
|
6128
|
-
removeFileButton: "sd-context-btn--negative sd-file__remove-file-button",
|
6234
|
+
removeFileButton: "sd-context-btn--small sd-context-btn--with-border sd-context-btn--colorful sd-context-btn--negative sd-file__remove-file-button",
|
6129
6235
|
dragAreaPlaceholder: "sd-file__drag-area-placeholder",
|
6130
6236
|
imageWrapper: "sd-file__image-wrapper",
|
6131
6237
|
imageWrapperDefaultImage: "sd-file__image-wrapper--default-image",
|
@@ -7686,10 +7792,11 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
|
|
7686
7792
|
"use strict";
|
7687
7793
|
__webpack_require__.r(__webpack_exports__);
|
7688
7794
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropRankingChoices", function() { return DragDropRankingChoices; });
|
7689
|
-
/* harmony import */ var
|
7690
|
-
/* harmony import */ var
|
7691
|
-
/* harmony import */ var
|
7692
|
-
/* harmony import */ var
|
7795
|
+
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../itemvalue */ "./src/itemvalue.ts");
|
7796
|
+
/* harmony import */ var _choices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./choices */ "./src/dragdrop/choices.ts");
|
7797
|
+
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
7798
|
+
/* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/devices */ "./src/utils/devices.ts");
|
7799
|
+
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
|
7693
7800
|
var __extends = (undefined && undefined.__extends) || (function () {
|
7694
7801
|
var extendStatics = function (d, b) {
|
7695
7802
|
extendStatics = Object.setPrototypeOf ||
|
@@ -7709,6 +7816,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
7709
7816
|
|
7710
7817
|
|
7711
7818
|
|
7819
|
+
|
7712
7820
|
var DragDropRankingChoices = /** @class */ (function (_super) {
|
7713
7821
|
__extends(DragDropRankingChoices, _super);
|
7714
7822
|
function DragDropRankingChoices() {
|
@@ -7718,6 +7826,16 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7718
7826
|
var node = _this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item");
|
7719
7827
|
node.style.cursor = "grabbing";
|
7720
7828
|
};
|
7829
|
+
_this.reorderRankedItem = function (questionModel, fromIndex, toIndex) {
|
7830
|
+
if (fromIndex == toIndex)
|
7831
|
+
return;
|
7832
|
+
var rankingChoices = questionModel.rankingChoices;
|
7833
|
+
var item = rankingChoices[fromIndex];
|
7834
|
+
questionModel.isValueSetByUser = true;
|
7835
|
+
rankingChoices.splice(fromIndex, 1);
|
7836
|
+
rankingChoices.splice(toIndex, 0, item);
|
7837
|
+
_this.updateDraggedElementShortcut(toIndex + 1);
|
7838
|
+
};
|
7721
7839
|
_this.doBanDropHere = function () {
|
7722
7840
|
if (_this.isDragOverRootNode) {
|
7723
7841
|
_this.allowDropHere = true;
|
@@ -7736,7 +7854,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7736
7854
|
configurable: true
|
7737
7855
|
});
|
7738
7856
|
DragDropRankingChoices.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
|
7739
|
-
var draggedElementShortcut =
|
7857
|
+
var draggedElementShortcut = _global_variables_utils__WEBPACK_IMPORTED_MODULE_4__["DomDocumentHelper"].createElement("div");
|
7740
7858
|
if (!draggedElementShortcut)
|
7741
7859
|
return;
|
7742
7860
|
draggedElementShortcut.className = this.shortcutClass + " sv-ranking-shortcut";
|
@@ -7754,9 +7872,9 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7754
7872
|
};
|
7755
7873
|
Object.defineProperty(DragDropRankingChoices.prototype, "shortcutClass", {
|
7756
7874
|
get: function () {
|
7757
|
-
return new
|
7875
|
+
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
|
7758
7876
|
.append(this.parentElement.cssClasses.root)
|
7759
|
-
.append(this.parentElement.cssClasses.rootMobileMod,
|
7877
|
+
.append(this.parentElement.cssClasses.rootMobileMod, _utils_devices__WEBPACK_IMPORTED_MODULE_3__["IsMobile"])
|
7760
7878
|
.toString();
|
7761
7879
|
},
|
7762
7880
|
enumerable: false,
|
@@ -7776,52 +7894,49 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7776
7894
|
};
|
7777
7895
|
DragDropRankingChoices.prototype.isDropTargetValid = function (dropTarget, dropTargetNode) {
|
7778
7896
|
var choices = this.parentElement.rankingChoices;
|
7779
|
-
var dropTargetIndex = choices.indexOf(this.dropTarget);
|
7780
|
-
var draggedElementIndex = choices.indexOf(this.draggedElement);
|
7781
|
-
if (draggedElementIndex > dropTargetIndex && dropTargetNode.classList.contains("sv-dragdrop-moveup")) {
|
7782
|
-
this.parentElement.dropTargetNodeMove = null;
|
7783
|
-
return false;
|
7784
|
-
}
|
7785
|
-
if (draggedElementIndex < dropTargetIndex && dropTargetNode.classList.contains("sv-dragdrop-movedown")) {
|
7786
|
-
this.parentElement.dropTargetNodeMove = null;
|
7787
|
-
return false;
|
7788
|
-
}
|
7789
7897
|
if (choices.indexOf(dropTarget) === -1)
|
7790
7898
|
// shouldn't allow to drop on "adorners" (selectall, none, other)
|
7791
7899
|
return false;
|
7792
7900
|
return true;
|
7793
7901
|
};
|
7794
|
-
DragDropRankingChoices.prototype.calculateIsBottom = function (clientY) {
|
7795
|
-
|
7796
|
-
|
7797
|
-
|
7902
|
+
DragDropRankingChoices.prototype.calculateIsBottom = function (clientY, dropTargetNode) {
|
7903
|
+
if (this.dropTarget instanceof _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"] && this.draggedElement !== this.dropTarget) {
|
7904
|
+
var rect = dropTargetNode.getBoundingClientRect();
|
7905
|
+
return clientY >= rect.y + rect.height / 2;
|
7906
|
+
}
|
7907
|
+
return _super.prototype.calculateIsBottom.call(this, clientY);
|
7798
7908
|
};
|
7799
|
-
DragDropRankingChoices.prototype.
|
7800
|
-
var
|
7801
|
-
var
|
7802
|
-
|
7803
|
-
|
7804
|
-
|
7805
|
-
this.parentElement.setPropertyValue("rankingChoices", choices);
|
7806
|
-
//return;
|
7807
|
-
this.updateDraggedElementShortcut(dropTargetIndex + 1);
|
7808
|
-
if (draggedElementIndex !== dropTargetIndex) {
|
7809
|
-
dropTargetNode.classList.remove("sv-dragdrop-moveup");
|
7810
|
-
dropTargetNode.classList.remove("sv-dragdrop-movedown");
|
7811
|
-
this.parentElement.dropTargetNodeMove = null;
|
7909
|
+
DragDropRankingChoices.prototype.getIndixies = function (model, fromChoicesArray, toChoicesArray) {
|
7910
|
+
var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
7911
|
+
var toIndex = toChoicesArray.indexOf(this.dropTarget);
|
7912
|
+
if (toIndex === -1) {
|
7913
|
+
var length_1 = model.value.length;
|
7914
|
+
toIndex = length_1;
|
7812
7915
|
}
|
7813
|
-
if (
|
7814
|
-
this.
|
7916
|
+
else if (fromChoicesArray == toChoicesArray) {
|
7917
|
+
if (!this.isBottom && fromIndex < toIndex)
|
7918
|
+
toIndex--;
|
7919
|
+
if (this.isBottom && fromIndex > toIndex)
|
7920
|
+
toIndex++;
|
7815
7921
|
}
|
7816
|
-
if (
|
7817
|
-
this.
|
7922
|
+
else if (fromChoicesArray != toChoicesArray) {
|
7923
|
+
if (this.isBottom)
|
7924
|
+
toIndex++;
|
7818
7925
|
}
|
7926
|
+
return { fromIndex: fromIndex, toIndex: toIndex };
|
7927
|
+
};
|
7928
|
+
DragDropRankingChoices.prototype.afterDragOver = function (dropTargetNode) {
|
7929
|
+
var _a = this.getIndixies(this.parentElement, this.parentElement.rankingChoices, this.parentElement.rankingChoices), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
|
7930
|
+
this.reorderRankedItem(this.parentElement, fromIndex, toIndex);
|
7819
7931
|
};
|
7820
7932
|
DragDropRankingChoices.prototype.updateDraggedElementShortcut = function (newIndex) {
|
7821
|
-
var
|
7822
|
-
|
7823
|
-
|
7824
|
-
|
7933
|
+
var _a;
|
7934
|
+
if ((_a = this.domAdapter) === null || _a === void 0 ? void 0 : _a.draggedElementShortcut) {
|
7935
|
+
var newIndexText = newIndex !== null ? newIndex + "" : "";
|
7936
|
+
// TODO should avoid direct DOM manipulation, do through the frameworks instead
|
7937
|
+
var indexNode = this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item__index");
|
7938
|
+
indexNode.innerText = newIndexText;
|
7939
|
+
}
|
7825
7940
|
};
|
7826
7941
|
DragDropRankingChoices.prototype.ghostPositionChanged = function () {
|
7827
7942
|
this.parentElement.currentDropTarget = this.draggedElement;
|
@@ -7839,7 +7954,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7839
7954
|
_super.prototype.clear.call(this);
|
7840
7955
|
};
|
7841
7956
|
return DragDropRankingChoices;
|
7842
|
-
}(
|
7957
|
+
}(_choices__WEBPACK_IMPORTED_MODULE_1__["DragDropChoices"]));
|
7843
7958
|
|
7844
7959
|
|
7845
7960
|
|
@@ -7855,8 +7970,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7855
7970
|
"use strict";
|
7856
7971
|
__webpack_require__.r(__webpack_exports__);
|
7857
7972
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropRankingSelectToRank", function() { return DragDropRankingSelectToRank; });
|
7858
|
-
/* harmony import */ var
|
7859
|
-
/* harmony import */ var _ranking_choices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ranking-choices */ "./src/dragdrop/ranking-choices.ts");
|
7973
|
+
/* harmony import */ var _ranking_choices__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ranking-choices */ "./src/dragdrop/ranking-choices.ts");
|
7860
7974
|
var __extends = (undefined && undefined.__extends) || (function () {
|
7861
7975
|
var extendStatics = function (d, b) {
|
7862
7976
|
extendStatics = Object.setPrototypeOf ||
|
@@ -7873,7 +7987,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
7873
7987
|
};
|
7874
7988
|
})();
|
7875
7989
|
|
7876
|
-
|
7877
7990
|
var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
7878
7991
|
__extends(DragDropRankingSelectToRank, _super);
|
7879
7992
|
function DragDropRankingSelectToRank() {
|
@@ -7890,19 +8003,6 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
7890
8003
|
rankingChoices.splice(fromIndex, 1);
|
7891
8004
|
_this.updateChoices(questionModel, rankingChoices);
|
7892
8005
|
};
|
7893
|
-
_this.reorderRankedItem = function (questionModel, fromIndex, toIndex, dropTargetNode) {
|
7894
|
-
var rankingChoices = questionModel.rankingChoices;
|
7895
|
-
var item = rankingChoices[fromIndex];
|
7896
|
-
if (fromIndex == toIndex)
|
7897
|
-
return;
|
7898
|
-
questionModel.isValueSetByUser = true;
|
7899
|
-
rankingChoices.splice(fromIndex, 1);
|
7900
|
-
rankingChoices.splice(toIndex, 0, item);
|
7901
|
-
questionModel.setPropertyValue("rankingChoices", rankingChoices);
|
7902
|
-
if (dropTargetNode) {
|
7903
|
-
_this.doUIEffects(dropTargetNode, fromIndex, toIndex);
|
7904
|
-
}
|
7905
|
-
};
|
7906
8006
|
return _this;
|
7907
8007
|
}
|
7908
8008
|
DragDropRankingSelectToRank.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
|
@@ -7959,50 +8059,6 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
7959
8059
|
var _a = this.getIndixies(questionModel, fromChoicesArray, toChoicesArray), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
|
7960
8060
|
rankFunction(questionModel, fromIndex, toIndex, dropTargetNode);
|
7961
8061
|
};
|
7962
|
-
DragDropRankingSelectToRank.prototype.getIndixies = function (model, fromChoicesArray, toChoicesArray) {
|
7963
|
-
var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
7964
|
-
var toIndex = toChoicesArray.indexOf(this.dropTarget);
|
7965
|
-
if (toIndex === -1) {
|
7966
|
-
var length_1 = model.value.length;
|
7967
|
-
toIndex = length_1;
|
7968
|
-
}
|
7969
|
-
else if (fromChoicesArray == toChoicesArray) {
|
7970
|
-
if (!this.isBottom && fromIndex < toIndex)
|
7971
|
-
toIndex--;
|
7972
|
-
if (this.isBottom && fromIndex > toIndex)
|
7973
|
-
toIndex++;
|
7974
|
-
}
|
7975
|
-
else if (fromChoicesArray != toChoicesArray) {
|
7976
|
-
if (this.isBottom)
|
7977
|
-
toIndex++;
|
7978
|
-
}
|
7979
|
-
return { fromIndex: fromIndex, toIndex: toIndex };
|
7980
|
-
};
|
7981
|
-
DragDropRankingSelectToRank.prototype.calculateIsBottom = function (clientY, dropTargetNode) {
|
7982
|
-
if (this.dropTarget instanceof _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"] && this.draggedElement !== this.dropTarget) {
|
7983
|
-
var rect = dropTargetNode.getBoundingClientRect();
|
7984
|
-
return clientY >= rect.y + rect.height / 2;
|
7985
|
-
}
|
7986
|
-
return _super.prototype.calculateIsBottom.call(this, clientY);
|
7987
|
-
};
|
7988
|
-
DragDropRankingSelectToRank.prototype.doUIEffects = function (dropTargetNode, fromIndex, toIndex) {
|
7989
|
-
var questionModel = this.parentElement;
|
7990
|
-
var isDropToEmptyRankedContainer = this.dropTarget === "to-container" && questionModel.isEmpty();
|
7991
|
-
var isNeedToShowIndexAtShortcut = !this.isDropTargetUnranked || isDropToEmptyRankedContainer;
|
7992
|
-
var shortcutIndex = isNeedToShowIndexAtShortcut ? toIndex + 1 : null;
|
7993
|
-
this.updateDraggedElementShortcut(shortcutIndex);
|
7994
|
-
if (fromIndex !== toIndex) {
|
7995
|
-
dropTargetNode.classList.remove("sv-dragdrop-moveup");
|
7996
|
-
dropTargetNode.classList.remove("sv-dragdrop-movedown");
|
7997
|
-
questionModel.dropTargetNodeMove = null;
|
7998
|
-
}
|
7999
|
-
if (fromIndex > toIndex) {
|
8000
|
-
questionModel.dropTargetNodeMove = "down";
|
8001
|
-
}
|
8002
|
-
if (fromIndex < toIndex) {
|
8003
|
-
questionModel.dropTargetNodeMove = "up";
|
8004
|
-
}
|
8005
|
-
};
|
8006
8062
|
Object.defineProperty(DragDropRankingSelectToRank.prototype, "isDraggedElementRanked", {
|
8007
8063
|
get: function () {
|
8008
8064
|
return this.parentElement.rankingChoices.indexOf(this.draggedElement) !== -1;
|
@@ -8026,28 +8082,13 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
8026
8082
|
enumerable: false,
|
8027
8083
|
configurable: true
|
8028
8084
|
});
|
8029
|
-
Object.defineProperty(DragDropRankingSelectToRank.prototype, "isDropTargetUnranked", {
|
8030
|
-
get: function () {
|
8031
|
-
return !this.isDropTargetRanked;
|
8032
|
-
},
|
8033
|
-
enumerable: false,
|
8034
|
-
configurable: true
|
8035
|
-
});
|
8036
8085
|
DragDropRankingSelectToRank.prototype.updateChoices = function (questionModel, rankingChoices) {
|
8037
8086
|
questionModel.isValueSetByUser = true;
|
8038
8087
|
questionModel.rankingChoices = rankingChoices;
|
8039
8088
|
questionModel.updateUnRankingChoices(rankingChoices);
|
8040
8089
|
};
|
8041
|
-
DragDropRankingSelectToRank.prototype.clear = function () {
|
8042
|
-
var questionModel = this.parentElement;
|
8043
|
-
if (!!questionModel) {
|
8044
|
-
questionModel.rankingChoicesAnimation.cancel();
|
8045
|
-
questionModel.unRankingChoicesAnimation.cancel();
|
8046
|
-
}
|
8047
|
-
_super.prototype.clear.call(this);
|
8048
|
-
};
|
8049
8090
|
return DragDropRankingSelectToRank;
|
8050
|
-
}(
|
8091
|
+
}(_ranking_choices__WEBPACK_IMPORTED_MODULE_0__["DragDropRankingChoices"]));
|
8051
8092
|
|
8052
8093
|
|
8053
8094
|
|
@@ -9857,8 +9898,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9857
9898
|
|
9858
9899
|
var Version;
|
9859
9900
|
var ReleaseDate;
|
9860
|
-
Version = "" + "1.
|
9861
|
-
ReleaseDate = "" + "2024-
|
9901
|
+
Version = "" + "1.11.1";
|
9902
|
+
ReleaseDate = "" + "2024-06-06";
|
9862
9903
|
function checkLibraryVersion(ver, libraryName) {
|
9863
9904
|
if (Version != ver) {
|
9864
9905
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -11049,7 +11090,7 @@ var defaultBootstrapMaterialCss = _plugins_themes_bootstrapmaterial_cssbootstrap
|
|
11049
11090
|
/*!***************************************!*\
|
11050
11091
|
!*** ./src/entries/react-ui-model.ts ***!
|
11051
11092
|
\***************************************/
|
11052
|
-
/*! exports provided: Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, QuestionErrorComponent, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
|
11093
|
+
/*! exports provided: Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, ListItemContent, ListItemGroup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, QuestionErrorComponent, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
|
11053
11094
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
11054
11095
|
|
11055
11096
|
"use strict";
|
@@ -11109,6 +11150,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
11109
11150
|
|
11110
11151
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRankingItem", function() { return _react_reactquestion_ranking__WEBPACK_IMPORTED_MODULE_12__["SurveyQuestionRankingItem"]; });
|
11111
11152
|
|
11153
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRankingItemContent", function() { return _react_reactquestion_ranking__WEBPACK_IMPORTED_MODULE_12__["SurveyQuestionRankingItemContent"]; });
|
11154
|
+
|
11112
11155
|
/* harmony import */ var _react_components_rating_rating_item__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../react/components/rating/rating-item */ "./src/react/components/rating/rating-item.tsx");
|
11113
11156
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RatingItem", function() { return _react_components_rating_rating_item__WEBPACK_IMPORTED_MODULE_13__["RatingItem"]; });
|
11114
11157
|
|
@@ -11249,90 +11292,96 @@ __webpack_require__.r(__webpack_exports__);
|
|
11249
11292
|
/* harmony import */ var _react_components_popup_popup__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ../react/components/popup/popup */ "./src/react/components/popup/popup.tsx");
|
11250
11293
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Popup", function() { return _react_components_popup_popup__WEBPACK_IMPORTED_MODULE_54__["Popup"]; });
|
11251
11294
|
|
11252
|
-
/* harmony import */ var
|
11253
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11295
|
+
/* harmony import */ var _react_components_list_list_item_content__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ../react/components/list/list-item-content */ "./src/react/components/list/list-item-content.tsx");
|
11296
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItemContent", function() { return _react_components_list_list_item_content__WEBPACK_IMPORTED_MODULE_55__["ListItemContent"]; });
|
11297
|
+
|
11298
|
+
/* harmony import */ var _react_components_list_list_item_group__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ../react/components/list/list-item-group */ "./src/react/components/list/list-item-group.tsx");
|
11299
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItemGroup", function() { return _react_components_list_list_item_group__WEBPACK_IMPORTED_MODULE_56__["ListItemGroup"]; });
|
11254
11300
|
|
11255
|
-
/* harmony import */ var
|
11256
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11301
|
+
/* harmony import */ var _react_components_list_list__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ../react/components/list/list */ "./src/react/components/list/list.tsx");
|
11302
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "List", function() { return _react_components_list_list__WEBPACK_IMPORTED_MODULE_57__["List"]; });
|
11257
11303
|
|
11258
|
-
/* harmony import */ var
|
11259
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11304
|
+
/* harmony import */ var _react_components_title_title_actions__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ../react/components/title/title-actions */ "./src/react/components/title/title-actions.tsx");
|
11305
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TitleActions", function() { return _react_components_title_title_actions__WEBPACK_IMPORTED_MODULE_58__["TitleActions"]; });
|
11260
11306
|
|
11261
|
-
/* harmony import */ var
|
11262
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11307
|
+
/* harmony import */ var _react_components_title_title_element__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ../react/components/title/title-element */ "./src/react/components/title/title-element.tsx");
|
11308
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TitleElement", function() { return _react_components_title_title_element__WEBPACK_IMPORTED_MODULE_59__["TitleElement"]; });
|
11263
11309
|
|
11264
|
-
/* harmony import */ var
|
11265
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11310
|
+
/* harmony import */ var _react_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ../react/components/action-bar/action-bar */ "./src/react/components/action-bar/action-bar.tsx");
|
11311
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyActionBar", function() { return _react_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_60__["SurveyActionBar"]; });
|
11266
11312
|
|
11267
|
-
/* harmony import */ var
|
11268
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11313
|
+
/* harmony import */ var _react_components_survey_header_logo_image__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ../react/components/survey-header/logo-image */ "./src/react/components/survey-header/logo-image.tsx");
|
11314
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LogoImage", function() { return _react_components_survey_header_logo_image__WEBPACK_IMPORTED_MODULE_61__["LogoImage"]; });
|
11269
11315
|
|
11270
|
-
/* harmony import */ var
|
11271
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11316
|
+
/* harmony import */ var _react_components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ../react/components/survey-header/survey-header */ "./src/react/components/survey-header/survey-header.tsx");
|
11317
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyHeader", function() { return _react_components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_62__["SurveyHeader"]; });
|
11272
11318
|
|
11273
|
-
/* harmony import */ var
|
11274
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11319
|
+
/* harmony import */ var _react_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ../react/components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
|
11320
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgIcon", function() { return _react_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_63__["SvgIcon"]; });
|
11275
11321
|
|
11276
|
-
/* harmony import */ var
|
11277
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11322
|
+
/* harmony import */ var _react_components_matrix_actions_remove_button_remove_button__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ../react/components/matrix-actions/remove-button/remove-button */ "./src/react/components/matrix-actions/remove-button/remove-button.tsx");
|
11323
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDynamicRemoveButton", function() { return _react_components_matrix_actions_remove_button_remove_button__WEBPACK_IMPORTED_MODULE_64__["SurveyQuestionMatrixDynamicRemoveButton"]; });
|
11278
11324
|
|
11279
|
-
/* harmony import */ var
|
11280
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11325
|
+
/* harmony import */ var _react_components_matrix_actions_detail_button_detail_button__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ../react/components/matrix-actions/detail-button/detail-button */ "./src/react/components/matrix-actions/detail-button/detail-button.tsx");
|
11326
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDetailButton", function() { return _react_components_matrix_actions_detail_button_detail_button__WEBPACK_IMPORTED_MODULE_65__["SurveyQuestionMatrixDetailButton"]; });
|
11281
11327
|
|
11282
|
-
/* harmony import */ var
|
11283
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11328
|
+
/* harmony import */ var _react_components_matrix_actions_drag_drop_icon_drag_drop_icon__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ../react/components/matrix-actions/drag-drop-icon/drag-drop-icon */ "./src/react/components/matrix-actions/drag-drop-icon/drag-drop-icon.tsx");
|
11329
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDynamicDragDropIcon", function() { return _react_components_matrix_actions_drag_drop_icon_drag_drop_icon__WEBPACK_IMPORTED_MODULE_66__["SurveyQuestionMatrixDynamicDragDropIcon"]; });
|
11284
11330
|
|
11285
|
-
/* harmony import */ var
|
11286
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11331
|
+
/* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_add_btn__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-add-btn */ "./src/react/components/paneldynamic-actions/paneldynamic-add-btn.tsx");
|
11332
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicAddButton", function() { return _react_components_paneldynamic_actions_paneldynamic_add_btn__WEBPACK_IMPORTED_MODULE_67__["SurveyQuestionPanelDynamicAddButton"]; });
|
11287
11333
|
|
11288
|
-
/* harmony import */ var
|
11289
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11334
|
+
/* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_remove_btn__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-remove-btn */ "./src/react/components/paneldynamic-actions/paneldynamic-remove-btn.tsx");
|
11335
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicRemoveButton", function() { return _react_components_paneldynamic_actions_paneldynamic_remove_btn__WEBPACK_IMPORTED_MODULE_68__["SurveyQuestionPanelDynamicRemoveButton"]; });
|
11290
11336
|
|
11291
|
-
/* harmony import */ var
|
11292
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11337
|
+
/* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_prev_btn__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-prev-btn */ "./src/react/components/paneldynamic-actions/paneldynamic-prev-btn.tsx");
|
11338
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicPrevButton", function() { return _react_components_paneldynamic_actions_paneldynamic_prev_btn__WEBPACK_IMPORTED_MODULE_69__["SurveyQuestionPanelDynamicPrevButton"]; });
|
11293
11339
|
|
11294
|
-
/* harmony import */ var
|
11295
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11340
|
+
/* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_next_btn__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-next-btn */ "./src/react/components/paneldynamic-actions/paneldynamic-next-btn.tsx");
|
11341
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicNextButton", function() { return _react_components_paneldynamic_actions_paneldynamic_next_btn__WEBPACK_IMPORTED_MODULE_70__["SurveyQuestionPanelDynamicNextButton"]; });
|
11296
11342
|
|
11297
|
-
/* harmony import */ var
|
11298
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11343
|
+
/* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_progress_text__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-progress-text */ "./src/react/components/paneldynamic-actions/paneldynamic-progress-text.tsx");
|
11344
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicProgressText", function() { return _react_components_paneldynamic_actions_paneldynamic_progress_text__WEBPACK_IMPORTED_MODULE_71__["SurveyQuestionPanelDynamicProgressText"]; });
|
11299
11345
|
|
11300
|
-
/* harmony import */ var
|
11301
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11346
|
+
/* harmony import */ var _react_components_survey_actions_survey_nav_button__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ../react/components/survey-actions/survey-nav-button */ "./src/react/components/survey-actions/survey-nav-button.tsx");
|
11347
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyNavigationButton", function() { return _react_components_survey_actions_survey_nav_button__WEBPACK_IMPORTED_MODULE_72__["SurveyNavigationButton"]; });
|
11302
11348
|
|
11303
|
-
/* harmony import */ var
|
11304
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11349
|
+
/* harmony import */ var _react_components_question_error__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ../react/components/question-error */ "./src/react/components/question-error.tsx");
|
11350
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionErrorComponent", function() { return _react_components_question_error__WEBPACK_IMPORTED_MODULE_73__["QuestionErrorComponent"]; });
|
11305
11351
|
|
11306
|
-
/* harmony import */ var
|
11307
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11352
|
+
/* harmony import */ var _react_components_matrix_row__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ../react/components/matrix/row */ "./src/react/components/matrix/row.tsx");
|
11353
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixRow", function() { return _react_components_matrix_row__WEBPACK_IMPORTED_MODULE_74__["MatrixRow"]; });
|
11308
11354
|
|
11309
|
-
/* harmony import */ var
|
11310
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11355
|
+
/* harmony import */ var _react_components_skeleton__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ../react/components/skeleton */ "./src/react/components/skeleton.tsx");
|
11356
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Skeleton", function() { return _react_components_skeleton__WEBPACK_IMPORTED_MODULE_75__["Skeleton"]; });
|
11311
11357
|
|
11312
|
-
/* harmony import */ var
|
11313
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11358
|
+
/* harmony import */ var _react_components_notifier__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ../react/components/notifier */ "./src/react/components/notifier.tsx");
|
11359
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotifierComponent", function() { return _react_components_notifier__WEBPACK_IMPORTED_MODULE_76__["NotifierComponent"]; });
|
11314
11360
|
|
11315
|
-
/* harmony import */ var
|
11316
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11361
|
+
/* harmony import */ var _react_components_components_container__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ../react/components/components-container */ "./src/react/components/components-container.tsx");
|
11362
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentsContainer", function() { return _react_components_components_container__WEBPACK_IMPORTED_MODULE_77__["ComponentsContainer"]; });
|
11317
11363
|
|
11318
|
-
/* harmony import */ var
|
11319
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11364
|
+
/* harmony import */ var _react_components_character_counter__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ../react/components/character-counter */ "./src/react/components/character-counter.tsx");
|
11365
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CharacterCounterComponent", function() { return _react_components_character_counter__WEBPACK_IMPORTED_MODULE_78__["CharacterCounterComponent"]; });
|
11320
11366
|
|
11321
|
-
/* harmony
|
11367
|
+
/* harmony import */ var _react_components_header__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ../react/components/header */ "./src/react/components/header.tsx");
|
11368
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderMobile", function() { return _react_components_header__WEBPACK_IMPORTED_MODULE_79__["HeaderMobile"]; });
|
11322
11369
|
|
11323
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11370
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderCell", function() { return _react_components_header__WEBPACK_IMPORTED_MODULE_79__["HeaderCell"]; });
|
11324
11371
|
|
11325
|
-
/* harmony
|
11326
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyLocStringViewer", function() { return _react_string_viewer__WEBPACK_IMPORTED_MODULE_78__["SurveyLocStringViewer"]; });
|
11372
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Header", function() { return _react_components_header__WEBPACK_IMPORTED_MODULE_79__["Header"]; });
|
11327
11373
|
|
11328
|
-
/* harmony import */ var
|
11329
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11374
|
+
/* harmony import */ var _react_string_viewer__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ../react/string-viewer */ "./src/react/string-viewer.tsx");
|
11375
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyLocStringViewer", function() { return _react_string_viewer__WEBPACK_IMPORTED_MODULE_80__["SurveyLocStringViewer"]; });
|
11330
11376
|
|
11331
|
-
/* harmony import */ var
|
11332
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11377
|
+
/* harmony import */ var _react_string_editor__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ../react/string-editor */ "./src/react/string-editor.tsx");
|
11378
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyLocStringEditor", function() { return _react_string_editor__WEBPACK_IMPORTED_MODULE_81__["SurveyLocStringEditor"]; });
|
11333
11379
|
|
11334
|
-
/* harmony import */ var
|
11335
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
11380
|
+
/* harmony import */ var _react_components_loading_indicator__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ../react/components/loading-indicator */ "./src/react/components/loading-indicator.tsx");
|
11381
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LoadingIndicatorComponent", function() { return _react_components_loading_indicator__WEBPACK_IMPORTED_MODULE_82__["LoadingIndicatorComponent"]; });
|
11382
|
+
|
11383
|
+
/* harmony import */ var _react_svgbundle__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ../react/svgbundle */ "./src/react/svgbundle.tsx");
|
11384
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgBundleComponent", function() { return _react_svgbundle__WEBPACK_IMPORTED_MODULE_83__["SvgBundleComponent"]; });
|
11336
11385
|
|
11337
11386
|
// react
|
11338
11387
|
|
@@ -11414,6 +11463,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
11414
11463
|
|
11415
11464
|
|
11416
11465
|
|
11466
|
+
|
11467
|
+
|
11417
11468
|
|
11418
11469
|
|
11419
11470
|
|
@@ -11427,7 +11478,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
11427
11478
|
/*!******************************!*\
|
11428
11479
|
!*** ./src/entries/react.ts ***!
|
11429
11480
|
\******************************/
|
11430
|
-
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, QuestionErrorComponent, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
|
11481
|
+
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, ListItemContent, ListItemGroup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, QuestionErrorComponent, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
|
11431
11482
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
11432
11483
|
|
11433
11484
|
"use strict";
|
@@ -11952,6 +12003,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
11952
12003
|
|
11953
12004
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRankingItem", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionRankingItem"]; });
|
11954
12005
|
|
12006
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRankingItemContent", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionRankingItemContent"]; });
|
12007
|
+
|
11955
12008
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RatingItem", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["RatingItem"]; });
|
11956
12009
|
|
11957
12010
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RatingItemStar", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["RatingItemStar"]; });
|
@@ -12050,6 +12103,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
12050
12103
|
|
12051
12104
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Popup", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["Popup"]; });
|
12052
12105
|
|
12106
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItemContent", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["ListItemContent"]; });
|
12107
|
+
|
12108
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItemGroup", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["ListItemGroup"]; });
|
12109
|
+
|
12053
12110
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "List", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["List"]; });
|
12054
12111
|
|
12055
12112
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TitleActions", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["TitleActions"]; });
|
@@ -16078,7 +16135,7 @@ var FunctionOperand = /** @class */ (function (_super) {
|
|
16078
16135
|
return this.evaluateCore(processValue);
|
16079
16136
|
};
|
16080
16137
|
FunctionOperand.prototype.evaluateCore = function (processValue) {
|
16081
|
-
return _functionsfactory__WEBPACK_IMPORTED_MODULE_1__["FunctionFactory"].Instance.run(this.originalValue, this.parameters.evaluate(processValue), processValue.properties);
|
16138
|
+
return _functionsfactory__WEBPACK_IMPORTED_MODULE_1__["FunctionFactory"].Instance.run(this.originalValue, this.parameters.evaluate(processValue), processValue.properties, this.parameters.values);
|
16082
16139
|
};
|
16083
16140
|
FunctionOperand.prototype.toString = function (func) {
|
16084
16141
|
if (func === void 0) { func = undefined; }
|
@@ -16610,7 +16667,7 @@ var FunctionFactory = /** @class */ (function () {
|
|
16610
16667
|
}
|
16611
16668
|
return result.sort();
|
16612
16669
|
};
|
16613
|
-
FunctionFactory.prototype.run = function (name, params, properties) {
|
16670
|
+
FunctionFactory.prototype.run = function (name, params, properties, originalParams) {
|
16614
16671
|
if (properties === void 0) { properties = null; }
|
16615
16672
|
var func = this.functionHash[name];
|
16616
16673
|
if (!func) {
|
@@ -16625,7 +16682,7 @@ var FunctionFactory = /** @class */ (function () {
|
|
16625
16682
|
classRunner[key] = properties[key];
|
16626
16683
|
}
|
16627
16684
|
}
|
16628
|
-
return classRunner.func(params);
|
16685
|
+
return classRunner.func(params, originalParams);
|
16629
16686
|
};
|
16630
16687
|
FunctionFactory.Instance = new FunctionFactory();
|
16631
16688
|
return FunctionFactory;
|
@@ -16697,7 +16754,7 @@ function avg(params) {
|
|
16697
16754
|
return arr.length > 0 ? res / arr.length : 0;
|
16698
16755
|
}
|
16699
16756
|
FunctionFactory.Instance.register("avg", avg);
|
16700
|
-
function getInArrayParams(params) {
|
16757
|
+
function getInArrayParams(params, originalParams) {
|
16701
16758
|
if (params.length < 2 || params.length > 3)
|
16702
16759
|
return null;
|
16703
16760
|
var arr = params[0];
|
@@ -16708,10 +16765,16 @@ function getInArrayParams(params) {
|
|
16708
16765
|
var name = params[1];
|
16709
16766
|
if (typeof name !== "string" && !(name instanceof String))
|
16710
16767
|
return null;
|
16711
|
-
var expression = params.length
|
16768
|
+
var expression = params.length > 2 ? params[2] : undefined;
|
16712
16769
|
if (typeof expression !== "string" && !(expression instanceof String)) {
|
16713
16770
|
expression = undefined;
|
16714
16771
|
}
|
16772
|
+
if (!expression) {
|
16773
|
+
var operand = Array.isArray(originalParams) && originalParams.length > 2 ? originalParams[2] : undefined;
|
16774
|
+
if (operand && !!operand.toString()) {
|
16775
|
+
expression = operand.toString();
|
16776
|
+
}
|
16777
|
+
}
|
16715
16778
|
return { data: arr, name: name, expression: expression };
|
16716
16779
|
}
|
16717
16780
|
function convertToNumber(val) {
|
@@ -16727,9 +16790,9 @@ function processItemInArray(item, name, res, func, needToConvert, condition) {
|
|
16727
16790
|
var val = needToConvert ? convertToNumber(item[name]) : 1;
|
16728
16791
|
return func(res, val);
|
16729
16792
|
}
|
16730
|
-
function calcInArray(params, func, needToConvert) {
|
16793
|
+
function calcInArray(params, originalParams, func, needToConvert) {
|
16731
16794
|
if (needToConvert === void 0) { needToConvert = true; }
|
16732
|
-
var v = getInArrayParams(params);
|
16795
|
+
var v = getInArrayParams(params, originalParams);
|
16733
16796
|
if (!v)
|
16734
16797
|
return undefined;
|
16735
16798
|
var condition = !!v.expression ? new _conditions__WEBPACK_IMPORTED_MODULE_3__["ConditionRunner"](v.expression) : undefined;
|
@@ -16749,8 +16812,8 @@ function calcInArray(params, func, needToConvert) {
|
|
16749
16812
|
}
|
16750
16813
|
return res;
|
16751
16814
|
}
|
16752
|
-
function sumInArray(params) {
|
16753
|
-
var res = calcInArray(params, function (res, val) {
|
16815
|
+
function sumInArray(params, originalParams) {
|
16816
|
+
var res = calcInArray(params, originalParams, function (res, val) {
|
16754
16817
|
if (res == undefined)
|
16755
16818
|
res = 0;
|
16756
16819
|
if (val == undefined || val == null)
|
@@ -16760,8 +16823,8 @@ function sumInArray(params) {
|
|
16760
16823
|
return res !== undefined ? res : 0;
|
16761
16824
|
}
|
16762
16825
|
FunctionFactory.Instance.register("sumInArray", sumInArray);
|
16763
|
-
function minInArray(params) {
|
16764
|
-
return calcInArray(params, function (res, val) {
|
16826
|
+
function minInArray(params, originalParams) {
|
16827
|
+
return calcInArray(params, originalParams, function (res, val) {
|
16765
16828
|
if (res == undefined)
|
16766
16829
|
return val;
|
16767
16830
|
if (val == undefined || val == null)
|
@@ -16770,8 +16833,8 @@ function minInArray(params) {
|
|
16770
16833
|
});
|
16771
16834
|
}
|
16772
16835
|
FunctionFactory.Instance.register("minInArray", minInArray);
|
16773
|
-
function maxInArray(params) {
|
16774
|
-
return calcInArray(params, function (res, val) {
|
16836
|
+
function maxInArray(params, originalParams) {
|
16837
|
+
return calcInArray(params, originalParams, function (res, val) {
|
16775
16838
|
if (res == undefined)
|
16776
16839
|
return val;
|
16777
16840
|
if (val == undefined || val == null)
|
@@ -16780,8 +16843,8 @@ function maxInArray(params) {
|
|
16780
16843
|
});
|
16781
16844
|
}
|
16782
16845
|
FunctionFactory.Instance.register("maxInArray", maxInArray);
|
16783
|
-
function countInArray(params) {
|
16784
|
-
var res = calcInArray(params, function (res, val) {
|
16846
|
+
function countInArray(params, originalParams) {
|
16847
|
+
var res = calcInArray(params, originalParams, function (res, val) {
|
16785
16848
|
if (res == undefined)
|
16786
16849
|
res = 0;
|
16787
16850
|
if (val == undefined || val == null)
|
@@ -16791,11 +16854,11 @@ function countInArray(params) {
|
|
16791
16854
|
return res !== undefined ? res : 0;
|
16792
16855
|
}
|
16793
16856
|
FunctionFactory.Instance.register("countInArray", countInArray);
|
16794
|
-
function avgInArray(params) {
|
16795
|
-
var count = countInArray(params);
|
16857
|
+
function avgInArray(params, originalParams) {
|
16858
|
+
var count = countInArray(params, originalParams);
|
16796
16859
|
if (count == 0)
|
16797
16860
|
return 0;
|
16798
|
-
return sumInArray(params) / count;
|
16861
|
+
return sumInArray(params, originalParams) / count;
|
16799
16862
|
}
|
16800
16863
|
FunctionFactory.Instance.register("avgInArray", avgInArray);
|
16801
16864
|
function iif(params) {
|
@@ -16812,23 +16875,31 @@ function getDate(params) {
|
|
16812
16875
|
return new Date(params[0]);
|
16813
16876
|
}
|
16814
16877
|
FunctionFactory.Instance.register("getDate", getDate);
|
16878
|
+
function dateDiffMonths(date1Param, date2Param, type) {
|
16879
|
+
if (type === "days")
|
16880
|
+
return diffDays([date1Param, date2Param]);
|
16881
|
+
var date1 = !!date1Param ? new Date(date1Param) : new Date();
|
16882
|
+
var date2 = !!date2Param ? new Date(date2Param) : new Date();
|
16883
|
+
var age = date2.getFullYear() - date1.getFullYear();
|
16884
|
+
type = type || "years";
|
16885
|
+
var ageInMonths = age * 12 + date2.getMonth() - date1.getMonth();
|
16886
|
+
if (date2.getDate() < date1.getDate()) {
|
16887
|
+
ageInMonths -= 1;
|
16888
|
+
}
|
16889
|
+
return type === "months" ? ageInMonths : ~~(ageInMonths / 12);
|
16890
|
+
}
|
16815
16891
|
function age(params) {
|
16816
|
-
if (!params
|
16817
|
-
return null;
|
16818
|
-
if (!params[0])
|
16892
|
+
if (!Array.isArray(params) || params.length < 1 || !params[0])
|
16819
16893
|
return null;
|
16820
|
-
|
16821
|
-
var today = new Date();
|
16822
|
-
var age = today.getFullYear() - birthDate.getFullYear();
|
16823
|
-
if (age > 0) {
|
16824
|
-
var m = today.getMonth() - birthDate.getMonth();
|
16825
|
-
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
|
16826
|
-
age -= 1;
|
16827
|
-
}
|
16828
|
-
}
|
16829
|
-
return age;
|
16894
|
+
return dateDiffMonths(params[0], undefined, (params.length > 1 ? params[1] : "") || "years");
|
16830
16895
|
}
|
16831
16896
|
FunctionFactory.Instance.register("age", age);
|
16897
|
+
function dateDiff(params) {
|
16898
|
+
if (!Array.isArray(params) || params.length < 2 || !params[0] || !params[1])
|
16899
|
+
return null;
|
16900
|
+
return dateDiffMonths(params[0], params[1], (params.length > 2 ? params[2] : "") || "days");
|
16901
|
+
}
|
16902
|
+
FunctionFactory.Instance.register("dateDiff", dateDiff);
|
16832
16903
|
function isContainerReadyCore(container) {
|
16833
16904
|
if (!container)
|
16834
16905
|
return false;
|
@@ -18043,6 +18114,7 @@ var map = {
|
|
18043
18114
|
"./full-screen_16x16.svg": "./src/images/full-screen_16x16.svg",
|
18044
18115
|
"./loading.svg": "./src/images/loading.svg",
|
18045
18116
|
"./minimize_16x16.svg": "./src/images/minimize_16x16.svg",
|
18117
|
+
"./next_16x16.svg": "./src/images/next_16x16.svg",
|
18046
18118
|
"./no-image.svg": "./src/images/no-image.svg",
|
18047
18119
|
"./ranking-arrows.svg": "./src/images/ranking-arrows.svg",
|
18048
18120
|
"./ranking-dash.svg": "./src/images/ranking-dash.svg",
|
@@ -18527,6 +18599,17 @@ module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\
|
|
18527
18599
|
|
18528
18600
|
/***/ }),
|
18529
18601
|
|
18602
|
+
/***/ "./src/images/next_16x16.svg":
|
18603
|
+
/*!***********************************!*\
|
18604
|
+
!*** ./src/images/next_16x16.svg ***!
|
18605
|
+
\***********************************/
|
18606
|
+
/*! no static exports found */
|
18607
|
+
/***/ (function(module, exports) {
|
18608
|
+
|
18609
|
+
module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.64648 12.6465L6.34648 13.3465L11.7465 8.04648L6.34648 2.64648L5.64648 3.34648L10.2465 8.04648L5.64648 12.6465Z\"></path></svg>"
|
18610
|
+
|
18611
|
+
/***/ }),
|
18612
|
+
|
18530
18613
|
/***/ "./src/images/no-image.svg":
|
18531
18614
|
/*!*********************************!*\
|
18532
18615
|
!*** ./src/images/no-image.svg ***!
|
@@ -21435,8 +21518,10 @@ var defaultListCss = {
|
|
21435
21518
|
itemWithIcon: "sv-list__item--with-icon",
|
21436
21519
|
itemDisabled: "sv-list__item--disabled",
|
21437
21520
|
itemFocused: "sv-list__item--focused",
|
21521
|
+
itemHovered: "sv-list__item--hovered",
|
21438
21522
|
itemTextWrap: "sv-list__item-text--wrap",
|
21439
21523
|
itemIcon: "sv-list__item-icon",
|
21524
|
+
itemMarkerIcon: "sv-list-item__marker-icon",
|
21440
21525
|
itemSeparator: "sv-list__item-separator",
|
21441
21526
|
itemBody: "sv-list__item-body",
|
21442
21527
|
itemsContainer: "sv-list",
|
@@ -21462,10 +21547,17 @@ var ListModel = /** @class */ (function (_super) {
|
|
21462
21547
|
if (_this.allowSelection) {
|
21463
21548
|
_this.selectedItem = itemValue;
|
21464
21549
|
}
|
21550
|
+
var action = itemValue.action;
|
21551
|
+
if (!!action) {
|
21552
|
+
action(itemValue);
|
21553
|
+
}
|
21465
21554
|
if (!!_this.onSelectionChanged) {
|
21466
21555
|
_this.onSelectionChanged(itemValue);
|
21467
21556
|
}
|
21468
21557
|
};
|
21558
|
+
_this.onItemHover = function (itemValue) {
|
21559
|
+
_this.mouseOverHandler(itemValue);
|
21560
|
+
};
|
21469
21561
|
_this.isItemDisabled = function (itemValue) {
|
21470
21562
|
return itemValue.enabled !== undefined && !itemValue.enabled;
|
21471
21563
|
};
|
@@ -21488,6 +21580,7 @@ var ListModel = /** @class */ (function (_super) {
|
|
21488
21580
|
.append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
|
21489
21581
|
.append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
|
21490
21582
|
.append(_this.cssClasses.itemSelected, _this.isItemSelected(itemValue))
|
21583
|
+
.append(_this.cssClasses.itemHovered, itemValue.isHovered)
|
21491
21584
|
.append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
|
21492
21585
|
.append(itemValue.css)
|
21493
21586
|
.toString();
|
@@ -21533,6 +21626,26 @@ var ListModel = /** @class */ (function (_super) {
|
|
21533
21626
|
ListModel.prototype.isItemVisible = function (item) {
|
21534
21627
|
return item.visible && (!this.shouldProcessFilter || this.hasText(item, this.filterString));
|
21535
21628
|
};
|
21629
|
+
ListModel.prototype.getRenderedActions = function () {
|
21630
|
+
var actions = _super.prototype.getRenderedActions.call(this);
|
21631
|
+
if (this.filterString) {
|
21632
|
+
var newActions_1 = [];
|
21633
|
+
actions.forEach(function (action) {
|
21634
|
+
newActions_1.push(action);
|
21635
|
+
if (action.items) {
|
21636
|
+
action.items.forEach(function (item) {
|
21637
|
+
var a = new _actions_action__WEBPACK_IMPORTED_MODULE_2__["Action"](item);
|
21638
|
+
if (!a.iconName) {
|
21639
|
+
a.iconName = action.iconName;
|
21640
|
+
}
|
21641
|
+
newActions_1.push(a);
|
21642
|
+
});
|
21643
|
+
}
|
21644
|
+
});
|
21645
|
+
return newActions_1;
|
21646
|
+
}
|
21647
|
+
return actions;
|
21648
|
+
};
|
21536
21649
|
Object.defineProperty(ListModel.prototype, "visibleItems", {
|
21537
21650
|
get: function () {
|
21538
21651
|
var _this = this;
|
@@ -21593,6 +21706,14 @@ var ListModel = /** @class */ (function (_super) {
|
|
21593
21706
|
ListModel.prototype.getDefaultCssClasses = function () {
|
21594
21707
|
return defaultListCss;
|
21595
21708
|
};
|
21709
|
+
ListModel.prototype.popupAfterShowCallback = function (itemValue) {
|
21710
|
+
this.addScrollEventListener(function () {
|
21711
|
+
itemValue.hidePopup();
|
21712
|
+
});
|
21713
|
+
};
|
21714
|
+
ListModel.prototype.onItemLeave = function (itemValue) {
|
21715
|
+
itemValue.hidePopupDelayed(this.subItemsHideDelay);
|
21716
|
+
};
|
21596
21717
|
ListModel.prototype.areSameItems = function (item1, item2) {
|
21597
21718
|
if (!!this.areSameItemsCallback)
|
21598
21719
|
return this.areSameItemsCallback(item1, item2);
|
@@ -32516,7 +32637,7 @@ var PageModel = /** @class */ (function (_super) {
|
|
32516
32637
|
configurable: true
|
32517
32638
|
});
|
32518
32639
|
PageModel.prototype.calcCssClasses = function (css) {
|
32519
|
-
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowFadeIn: "", rowFadeOut: "",
|
32640
|
+
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowFadeIn: "", rowFadeOut: "", rowDelayedFadeIn: "" };
|
32520
32641
|
this.copyCssClasses(classes.page, css.page);
|
32521
32642
|
this.copyCssClasses(classes.error, css.error);
|
32522
32643
|
if (!!css.pageTitle) {
|
@@ -32540,12 +32661,12 @@ var PageModel = /** @class */ (function (_super) {
|
|
32540
32661
|
if (!!css.rowFadeIn) {
|
32541
32662
|
classes.rowFadeIn = css.rowFadeIn;
|
32542
32663
|
}
|
32664
|
+
if (!!css.rowDelayedFadeIn) {
|
32665
|
+
classes.rowDelayedFadeIn = css.rowDelayedFadeIn;
|
32666
|
+
}
|
32543
32667
|
if (!!css.rowFadeOut) {
|
32544
32668
|
classes.rowFadeOut = css.rowFadeOut;
|
32545
32669
|
}
|
32546
|
-
if (!!css.rowFadeOutActive) {
|
32547
|
-
classes.rowFadeOutActive = css.rowFadeOutActive;
|
32548
|
-
}
|
32549
32670
|
if (this.survey) {
|
32550
32671
|
this.survey.updatePageCssClasses(this, classes);
|
32551
32672
|
}
|
@@ -32822,8 +32943,8 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
32822
32943
|
_this._scrollableParent = undefined;
|
32823
32944
|
_this._updateVisibility = undefined;
|
32824
32945
|
_this.visibleElementsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_11__["AnimationGroup"](_this.getVisibleElementsAnimationOptions(), function (value) {
|
32946
|
+
_this.setWidth(value);
|
32825
32947
|
_this.setPropertyValue("visibleElements", value);
|
32826
|
-
_this.setWidth();
|
32827
32948
|
}, function () { return _this.visibleElements; });
|
32828
32949
|
_this.idValue = QuestionRowModel.getRowId();
|
32829
32950
|
_this.visible = panel.areInvisibleElementsShowing;
|
@@ -32912,7 +33033,9 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
32912
33033
|
el.style.setProperty("--animation-width", Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["getElementWidth"])(el) + "px");
|
32913
33034
|
};
|
32914
33035
|
return {
|
33036
|
+
getRerenderEvent: function () { return _this.onElementRerendered; },
|
32915
33037
|
isAnimationEnabled: function () { return _this.animationAllowed; },
|
33038
|
+
allowSyncRemovalAddition: false,
|
32916
33039
|
getAnimatedElement: function (element) { return element.getWrapperElement(); },
|
32917
33040
|
getLeaveOptions: function (element) {
|
32918
33041
|
var surveyElement = element;
|
@@ -32992,12 +33115,12 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
32992
33115
|
enumerable: false,
|
32993
33116
|
configurable: true
|
32994
33117
|
});
|
32995
|
-
QuestionRowModel.prototype.setWidth = function () {
|
33118
|
+
QuestionRowModel.prototype.setWidth = function (visibleElement) {
|
32996
33119
|
var _a;
|
32997
|
-
var visCount =
|
33120
|
+
var visCount = visibleElement.length;
|
32998
33121
|
if (visCount == 0)
|
32999
33122
|
return;
|
33000
|
-
var isSingleInRow =
|
33123
|
+
var isSingleInRow = visibleElement.length === 1;
|
33001
33124
|
var counter = 0;
|
33002
33125
|
var preSetWidthElements = [];
|
33003
33126
|
for (var i = 0; i < this.elements.length; i++) {
|
@@ -33128,6 +33251,7 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
33128
33251
|
el.style.setProperty("--animation-height", el.offsetHeight + "px");
|
33129
33252
|
};
|
33130
33253
|
return {
|
33254
|
+
getRerenderEvent: function () { return _this.onElementRerendered; },
|
33131
33255
|
isAnimationEnabled: function () { return _this.animationAllowed; },
|
33132
33256
|
getAnimatedElement: function (row) { return row.getRootElement(); },
|
33133
33257
|
getLeaveOptions: function (_) {
|
@@ -33135,9 +33259,10 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
33135
33259
|
onBeforeRunAnimation: beforeRunAnimation
|
33136
33260
|
};
|
33137
33261
|
},
|
33138
|
-
getEnterOptions: function (_) {
|
33262
|
+
getEnterOptions: function (_, animationInfo) {
|
33263
|
+
var cssClasses = _this.cssClasses;
|
33139
33264
|
return {
|
33140
|
-
cssClass:
|
33265
|
+
cssClass: new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(cssClasses.rowFadeIn).append(cssClasses.rowDelayedFadeIn, animationInfo.isDeletingRunning).toString(),
|
33141
33266
|
onBeforeRunAnimation: beforeRunAnimation
|
33142
33267
|
};
|
33143
33268
|
}
|
@@ -33401,7 +33526,7 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
33401
33526
|
configurable: true
|
33402
33527
|
});
|
33403
33528
|
PanelModelBase.prototype.calcCssClasses = function (css) {
|
33404
|
-
var classes = { panel: {}, error: {}, row: "", rowFadeIn: "", rowFadeOut: "",
|
33529
|
+
var classes = { panel: {}, error: {}, row: "", rowFadeIn: "", rowFadeOut: "", rowDelayedFadeIn: "", rowMultiple: "", pageRow: "", rowCompact: "" };
|
33405
33530
|
this.copyCssClasses(classes.panel, css.panel);
|
33406
33531
|
this.copyCssClasses(classes.error, css.error);
|
33407
33532
|
if (!!css.pageRow) {
|
@@ -33419,8 +33544,8 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
33419
33544
|
if (!!css.rowFadeOut) {
|
33420
33545
|
classes.rowFadeOut = css.rowFadeOut;
|
33421
33546
|
}
|
33422
|
-
if (!!css.
|
33423
|
-
classes.
|
33547
|
+
if (!!css.rowDelayedFadeIn) {
|
33548
|
+
classes.rowDelayedFadeIn = css.rowDelayedFadeIn;
|
33424
33549
|
}
|
33425
33550
|
if (!!css.rowMultiple) {
|
33426
33551
|
classes.rowMultiple = css.rowMultiple;
|
@@ -33740,16 +33865,13 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
33740
33865
|
? rec
|
33741
33866
|
: {
|
33742
33867
|
fireCallback: fireCallback,
|
33743
|
-
|
33868
|
+
focusOnFirstError: focusOnFirstError,
|
33744
33869
|
firstErrorQuestion: null,
|
33745
33870
|
result: false,
|
33746
33871
|
};
|
33747
33872
|
if (rec.result !== true)
|
33748
33873
|
rec.result = false;
|
33749
33874
|
this.hasErrorsCore(rec);
|
33750
|
-
if (rec.focuseOnFirstError && rec.firstErrorQuestion) {
|
33751
|
-
rec.firstErrorQuestion.focus(true);
|
33752
|
-
}
|
33753
33875
|
return !rec.result;
|
33754
33876
|
};
|
33755
33877
|
PanelModelBase.prototype.validateContainerOnly = function () {
|
@@ -33794,13 +33916,14 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
33794
33916
|
}
|
33795
33917
|
rec.result = true;
|
33796
33918
|
errors.push(new _error__WEBPACK_IMPORTED_MODULE_6__["OneAnswerRequiredError"](this.requiredErrorText, this));
|
33797
|
-
if (rec.
|
33919
|
+
if (rec.focusOnFirstError && !rec.firstErrorQuestion) {
|
33798
33920
|
rec.firstErrorQuestion = visQuestions[0];
|
33799
33921
|
}
|
33800
33922
|
};
|
33801
33923
|
PanelModelBase.prototype.hasErrorsCore = function (rec) {
|
33802
33924
|
var elements = this.elements;
|
33803
33925
|
var element = null;
|
33926
|
+
var firstErroredEl = null;
|
33804
33927
|
for (var i = 0; i < elements.length; i++) {
|
33805
33928
|
element = elements[i];
|
33806
33929
|
if (!element.isVisible)
|
@@ -33811,6 +33934,9 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
33811
33934
|
else {
|
33812
33935
|
var question = element;
|
33813
33936
|
if (!question.validate(rec.fireCallback, rec)) {
|
33937
|
+
if (!firstErroredEl) {
|
33938
|
+
firstErroredEl = question;
|
33939
|
+
}
|
33814
33940
|
if (!rec.firstErrorQuestion) {
|
33815
33941
|
rec.firstErrorQuestion = question;
|
33816
33942
|
}
|
@@ -33820,6 +33946,20 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
33820
33946
|
}
|
33821
33947
|
this.hasErrorsInPanels(rec);
|
33822
33948
|
this.updateContainsErrors();
|
33949
|
+
if (!firstErroredEl && this.errors.length > 0) {
|
33950
|
+
firstErroredEl = this.getFirstQuestionToFocus(false, true);
|
33951
|
+
if (!rec.firstErrorQuestion) {
|
33952
|
+
rec.firstErrorQuestion = firstErroredEl;
|
33953
|
+
}
|
33954
|
+
}
|
33955
|
+
if (rec.fireCallback && firstErroredEl) {
|
33956
|
+
if (firstErroredEl === rec.firstErrorQuestion && rec.focusOnFirstError) {
|
33957
|
+
firstErroredEl.focus(true);
|
33958
|
+
}
|
33959
|
+
else {
|
33960
|
+
firstErroredEl.expandAllParents();
|
33961
|
+
}
|
33962
|
+
}
|
33823
33963
|
};
|
33824
33964
|
PanelModelBase.prototype.getContainsErrors = function () {
|
33825
33965
|
var res = _super.prototype.getContainsErrors.call(this);
|
@@ -34332,21 +34472,10 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
34332
34472
|
}
|
34333
34473
|
};
|
34334
34474
|
PanelModelBase.prototype.notifyStateChanged = function (prevState) {
|
34335
|
-
var _this = this;
|
34336
34475
|
_super.prototype.notifyStateChanged.call(this, prevState);
|
34337
34476
|
if (this.isCollapsed) {
|
34338
34477
|
this.questions.forEach(function (q) { return q.onHidingContent(); });
|
34339
34478
|
}
|
34340
|
-
if (this.survey != null && !this.isLoadingFromJson && this.isExpanded && prevState === "collapsed") {
|
34341
|
-
var q_1 = this.getFirstQuestionToFocus(false);
|
34342
|
-
if (!!q_1) {
|
34343
|
-
setTimeout(function () {
|
34344
|
-
if (!_this.isDisposed && !!_this.survey) {
|
34345
|
-
_this.survey.scrollElementToTop(q_1, q_1, null, q_1.inputId, false);
|
34346
|
-
}
|
34347
|
-
}, 15);
|
34348
|
-
}
|
34349
|
-
}
|
34350
34479
|
};
|
34351
34480
|
Object.defineProperty(PanelModelBase.prototype, "isVisible", {
|
34352
34481
|
/**
|
@@ -34943,12 +35072,6 @@ var PanelModel = /** @class */ (function (_super) {
|
|
34943
35072
|
this.survey.panelVisibilityChanged(this, this.isVisible);
|
34944
35073
|
}
|
34945
35074
|
};
|
34946
|
-
PanelModel.prototype.hasErrorsCore = function (rec) {
|
34947
|
-
_super.prototype.hasErrorsCore.call(this, rec);
|
34948
|
-
if (this.isCollapsed && rec.result && rec.fireCallback) {
|
34949
|
-
this.expand();
|
34950
|
-
}
|
34951
|
-
};
|
34952
35075
|
PanelModel.prototype.getRenderedTitle = function (str) {
|
34953
35076
|
if (!str) {
|
34954
35077
|
if (this.isCollapsed || this.isExpanded)
|
@@ -35132,6 +35255,19 @@ var PanelModel = /** @class */ (function (_super) {
|
|
35132
35255
|
enumerable: false,
|
35133
35256
|
configurable: true
|
35134
35257
|
});
|
35258
|
+
PanelModel.prototype.onElementExpanded = function (elementIsRendered) {
|
35259
|
+
var _this = this;
|
35260
|
+
if (this.survey != null && !this.isLoadingFromJson) {
|
35261
|
+
var q_1 = this.getFirstQuestionToFocus(false);
|
35262
|
+
if (!!q_1) {
|
35263
|
+
setTimeout(function () {
|
35264
|
+
if (!_this.isDisposed && !!_this.survey) {
|
35265
|
+
_this.survey.scrollElementToTop(q_1, q_1, null, q_1.inputId, false, { behavior: "smooth" });
|
35266
|
+
}
|
35267
|
+
}, elementIsRendered ? 0 : 15);
|
35268
|
+
}
|
35269
|
+
}
|
35270
|
+
};
|
35135
35271
|
PanelModel.prototype.getCssRoot = function (cssClasses) {
|
35136
35272
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
|
35137
35273
|
.append(_super.prototype.getCssRoot.call(this, cssClasses))
|
@@ -36632,9 +36768,10 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
36632
36768
|
|
36633
36769
|
var PopupDropdownViewModel = /** @class */ (function (_super) {
|
36634
36770
|
__extends(PopupDropdownViewModel, _super);
|
36635
|
-
function PopupDropdownViewModel(model, targetElement) {
|
36771
|
+
function PopupDropdownViewModel(model, targetElement, areaElement) {
|
36636
36772
|
var _this = _super.call(this, model) || this;
|
36637
36773
|
_this.targetElement = targetElement;
|
36774
|
+
_this.areaElement = areaElement;
|
36638
36775
|
_this.scrollEventCallBack = function (event) {
|
36639
36776
|
if (_this.isOverlay && _utils_devices__WEBPACK_IMPORTED_MODULE_3__["IsTouch"]) {
|
36640
36777
|
event.stopPropagation();
|
@@ -36672,11 +36809,24 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
36672
36809
|
var width = Math.min(windowWidth, windowHeight);
|
36673
36810
|
this.isTablet = width >= PopupDropdownViewModel.tabletSizeBreakpoint;
|
36674
36811
|
};
|
36812
|
+
PopupDropdownViewModel.prototype.getAvailableAreaRect = function () {
|
36813
|
+
if (this.areaElement) {
|
36814
|
+
var areaRect = this.areaElement.getBoundingClientRect();
|
36815
|
+
return new _utils_popup__WEBPACK_IMPORTED_MODULE_1__["Rect"](areaRect.x, areaRect.y, areaRect.width, areaRect.height);
|
36816
|
+
}
|
36817
|
+
return new _utils_popup__WEBPACK_IMPORTED_MODULE_1__["Rect"](0, 0, _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getInnerWidth(), _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getInnerHeight());
|
36818
|
+
};
|
36819
|
+
PopupDropdownViewModel.prototype.getTargetElementRect = function () {
|
36820
|
+
var rect = this.targetElement.getBoundingClientRect();
|
36821
|
+
var areaRect = this.getAvailableAreaRect();
|
36822
|
+
return new _utils_popup__WEBPACK_IMPORTED_MODULE_1__["Rect"](rect.left - areaRect.left, rect.top - areaRect.top, rect.width, rect.height);
|
36823
|
+
};
|
36675
36824
|
PopupDropdownViewModel.prototype._updatePosition = function () {
|
36676
36825
|
var _a, _b, _c;
|
36677
36826
|
if (!this.targetElement)
|
36678
36827
|
return;
|
36679
|
-
var targetElementRect = this.
|
36828
|
+
var targetElementRect = this.getTargetElementRect();
|
36829
|
+
var area = this.getAvailableAreaRect();
|
36680
36830
|
var popupContainer = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelector(this.containerSelector);
|
36681
36831
|
if (!popupContainer)
|
36682
36832
|
return;
|
@@ -36693,12 +36843,13 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
36693
36843
|
if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].isAvailable()) {
|
36694
36844
|
var heightValues = [height, _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getInnerHeight() * 0.9, (_c = _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getVisualViewport()) === null || _c === void 0 ? void 0 : _c.height];
|
36695
36845
|
height = Math.ceil(Math.min.apply(Math, heightValues.filter(function (each) { return typeof each === "number"; })));
|
36696
|
-
verticalPosition = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].updateVerticalPosition(targetElementRect, height, this.model.
|
36846
|
+
verticalPosition = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].updateVerticalPosition(targetElementRect, height, this.model.horizontalPosition, this.model.verticalPosition, area.height);
|
36847
|
+
actualHorizontalPosition = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].updateHorizontalPosition(targetElementRect, width, this.model.horizontalPosition, area.width);
|
36697
36848
|
}
|
36698
36849
|
this.popupDirection = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePopupDirection(verticalPosition, actualHorizontalPosition);
|
36699
|
-
var pos = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePosition(targetElementRect, height, width + marginLeft + marginRight, verticalPosition, actualHorizontalPosition, this.
|
36850
|
+
var pos = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePosition(targetElementRect, height, width + marginLeft + marginRight, verticalPosition, actualHorizontalPosition, this.model.positionMode);
|
36700
36851
|
if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].isAvailable()) {
|
36701
|
-
var newVerticalDimensions = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].getCorrectedVerticalDimensions(pos.top, height,
|
36852
|
+
var newVerticalDimensions = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].getCorrectedVerticalDimensions(pos.top, height, area.height, verticalPosition, this.model.canShrink);
|
36702
36853
|
if (!!newVerticalDimensions) {
|
36703
36854
|
this.height = newVerticalDimensions.height + "px";
|
36704
36855
|
pos.top = newVerticalDimensions.top;
|
@@ -36720,6 +36871,8 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
36720
36871
|
pos.top -= rect.top;
|
36721
36872
|
pos.left -= rect.left;
|
36722
36873
|
}
|
36874
|
+
pos.left += area.left;
|
36875
|
+
pos.top += area.top;
|
36723
36876
|
this.left = pos.left + "px";
|
36724
36877
|
this.top = pos.top + "px";
|
36725
36878
|
if (this.showHeader) {
|
@@ -36757,10 +36910,11 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
36757
36910
|
PopupDropdownViewModel.prototype.getPopupHeaderTemplate = function () {
|
36758
36911
|
return "popup-pointer";
|
36759
36912
|
};
|
36760
|
-
PopupDropdownViewModel.prototype.setComponentElement = function (componentRoot, targetElement) {
|
36913
|
+
PopupDropdownViewModel.prototype.setComponentElement = function (componentRoot, targetElement, areaElement) {
|
36761
36914
|
_super.prototype.setComponentElement.call(this, componentRoot);
|
36762
36915
|
if (!!componentRoot && !!componentRoot.parentElement && !this.isModal) {
|
36763
36916
|
this.targetElement = targetElement || componentRoot.parentElement;
|
36917
|
+
this.areaElement = areaElement;
|
36764
36918
|
}
|
36765
36919
|
};
|
36766
36920
|
PopupDropdownViewModel.prototype.resetComponentElement = function () {
|
@@ -36918,6 +37072,7 @@ var PopupModalViewModel = /** @class */ (function (_super) {
|
|
36918
37072
|
PopupModalViewModel.prototype.createFooterActionBar = function () {
|
36919
37073
|
var _this = this;
|
36920
37074
|
_super.prototype.createFooterActionBar.call(this);
|
37075
|
+
this.footerToolbar.containerCss = "sv-footer-action-bar";
|
36921
37076
|
this.footerToolbarValue.addAction({
|
36922
37077
|
id: "apply",
|
36923
37078
|
visibleIndex: 20,
|
@@ -37574,7 +37729,11 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
37574
37729
|
this.model.onHiding();
|
37575
37730
|
};
|
37576
37731
|
PopupBaseViewModel.prototype.getLeaveOptions = function () {
|
37577
|
-
return { cssClass: "sv-popup--animate-leave"
|
37732
|
+
return { cssClass: "sv-popup--animate-leave", onBeforeRunAnimation: function (el) {
|
37733
|
+
el.setAttribute("inert", "");
|
37734
|
+
},
|
37735
|
+
onAfterRunAnimation: function (el) { return el.removeAttribute("inert"); }
|
37736
|
+
};
|
37578
37737
|
};
|
37579
37738
|
PopupBaseViewModel.prototype.getEnterOptions = function () {
|
37580
37739
|
return { cssClass: "sv-popup--animate-enter" };
|
@@ -37585,6 +37744,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
37585
37744
|
PopupBaseViewModel.prototype.isAnimationEnabled = function () {
|
37586
37745
|
return this.model.displayMode !== "overlay" && _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].animationEnabled;
|
37587
37746
|
};
|
37747
|
+
PopupBaseViewModel.prototype.getRerenderEvent = function () { return this.onElementRerendered; };
|
37588
37748
|
PopupBaseViewModel.prototype.getAnimationContainer = function () {
|
37589
37749
|
var _a;
|
37590
37750
|
return (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelector(this.fixedPopupContainer);
|
@@ -37869,7 +38029,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
37869
38029
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["getElement"])(_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.popupMountContainer).appendChild(container);
|
37870
38030
|
}
|
37871
38031
|
};
|
37872
|
-
PopupBaseViewModel.prototype.setComponentElement = function (componentRoot, targetElement) {
|
38032
|
+
PopupBaseViewModel.prototype.setComponentElement = function (componentRoot, targetElement, areaElement) {
|
37873
38033
|
if (!!componentRoot) {
|
37874
38034
|
this.containerElement = componentRoot;
|
37875
38035
|
}
|
@@ -38049,6 +38209,9 @@ var PopupModel = /** @class */ (function (_super) {
|
|
38049
38209
|
__decorate([
|
38050
38210
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
|
38051
38211
|
], PopupModel.prototype, "isModal", void 0);
|
38212
|
+
__decorate([
|
38213
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
|
38214
|
+
], PopupModel.prototype, "canShrink", void 0);
|
38052
38215
|
__decorate([
|
38053
38216
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
|
38054
38217
|
], PopupModel.prototype, "isFocusedContent", void 0);
|
@@ -39523,6 +39686,7 @@ var Question = /** @class */ (function (_super) {
|
|
39523
39686
|
.append(cssClasses.hasErrorBottom, hasError && this.getErrorLocation() == "bottom")
|
39524
39687
|
.append(cssClasses.small, !this.width)
|
39525
39688
|
.append(cssClasses.answered, this.isAnswered)
|
39689
|
+
.append(cssClasses.noPointerEventsMode, this.isReadOnlyAttr)
|
39526
39690
|
.toString();
|
39527
39691
|
};
|
39528
39692
|
Object.defineProperty(Question.prototype, "cssHeader", {
|
@@ -39765,7 +39929,7 @@ var Question = /** @class */ (function (_super) {
|
|
39765
39929
|
Question.prototype.focuscore = function (onError, scrollIfVisible) {
|
39766
39930
|
if (onError === void 0) { onError = false; }
|
39767
39931
|
if (!!this.survey) {
|
39768
|
-
this.expandAllParents(
|
39932
|
+
this.expandAllParents();
|
39769
39933
|
this.survey.scrollElementToTop(this, this, null, this.id, scrollIfVisible);
|
39770
39934
|
}
|
39771
39935
|
var id = !onError
|
@@ -39775,14 +39939,17 @@ var Question = /** @class */ (function (_super) {
|
|
39775
39939
|
this.fireCallback(this.focusCallback);
|
39776
39940
|
}
|
39777
39941
|
};
|
39778
|
-
Question.prototype.expandAllParents = function (
|
39942
|
+
Question.prototype.expandAllParents = function () {
|
39943
|
+
this.expandAllParentsCore(this);
|
39944
|
+
};
|
39945
|
+
Question.prototype.expandAllParentsCore = function (element) {
|
39779
39946
|
if (!element)
|
39780
39947
|
return;
|
39781
39948
|
if (element.isCollapsed) {
|
39782
39949
|
element.expand();
|
39783
39950
|
}
|
39784
|
-
this.
|
39785
|
-
this.
|
39951
|
+
this.expandAllParentsCore(element.parent);
|
39952
|
+
this.expandAllParentsCore(element.parentQuestion);
|
39786
39953
|
};
|
39787
39954
|
Question.prototype.focusIn = function () {
|
39788
39955
|
if (!this.survey || this.isDisposed || this.isContainer)
|
@@ -39991,6 +40158,20 @@ var Question = /** @class */ (function (_super) {
|
|
39991
40158
|
enumerable: false,
|
39992
40159
|
configurable: true
|
39993
40160
|
});
|
40161
|
+
Object.defineProperty(Question.prototype, "isReadOnlyAttr", {
|
40162
|
+
get: function () {
|
40163
|
+
return this.isReadOnly;
|
40164
|
+
},
|
40165
|
+
enumerable: false,
|
40166
|
+
configurable: true
|
40167
|
+
});
|
40168
|
+
Object.defineProperty(Question.prototype, "isDisabledAttr", {
|
40169
|
+
get: function () {
|
40170
|
+
return this.isDesignModeV2;
|
40171
|
+
},
|
40172
|
+
enumerable: false,
|
40173
|
+
configurable: true
|
40174
|
+
});
|
39994
40175
|
Question.prototype.onReadOnlyChanged = function () {
|
39995
40176
|
this.setPropertyValue("isInputReadOnly", this.isInputReadOnly);
|
39996
40177
|
_super.prototype.onReadOnlyChanged.call(this);
|
@@ -40606,6 +40787,13 @@ var Question = /** @class */ (function (_super) {
|
|
40606
40787
|
return;
|
40607
40788
|
this.setDefaultValue();
|
40608
40789
|
};
|
40790
|
+
Object.defineProperty(Question.prototype, "isValueDefault", {
|
40791
|
+
get: function () {
|
40792
|
+
return !this.isEmpty() && (this.isTwoValueEquals(this.defaultValue, this.value) || !this.isValueChangedDirectly && !!this.defaultValueExpression);
|
40793
|
+
},
|
40794
|
+
enumerable: false,
|
40795
|
+
configurable: true
|
40796
|
+
});
|
40609
40797
|
Object.defineProperty(Question.prototype, "isClearValueOnHidden", {
|
40610
40798
|
get: function () {
|
40611
40799
|
var clearIf = this.getClearIfInvisible();
|
@@ -40682,9 +40870,9 @@ var Question = /** @class */ (function (_super) {
|
|
40682
40870
|
};
|
40683
40871
|
}
|
40684
40872
|
if (!values)
|
40685
|
-
values = this.data.getFilteredValues();
|
40873
|
+
values = this.defaultValueExpression ? this.data.getFilteredValues() : {};
|
40686
40874
|
if (!properties)
|
40687
|
-
properties = this.data.getFilteredProperties();
|
40875
|
+
properties = this.defaultValueExpression ? this.data.getFilteredProperties() : {};
|
40688
40876
|
if (!!runner && runner.canRun) {
|
40689
40877
|
runner.onRunComplete = function (res) {
|
40690
40878
|
if (res == undefined)
|
@@ -41034,13 +41222,9 @@ var Question = /** @class */ (function (_super) {
|
|
41034
41222
|
Question.prototype.isTextValue = function () {
|
41035
41223
|
return false;
|
41036
41224
|
};
|
41037
|
-
|
41038
|
-
|
41039
|
-
|
41040
|
-
},
|
41041
|
-
enumerable: false,
|
41042
|
-
configurable: true
|
41043
|
-
});
|
41225
|
+
Question.prototype.getIsInputTextUpdate = function () {
|
41226
|
+
return !!this.survey ? this.survey.isUpdateValueTextOnTyping : false;
|
41227
|
+
};
|
41044
41228
|
Object.defineProperty(Question.prototype, "requireStrictCompare", {
|
41045
41229
|
get: function () { return false; },
|
41046
41230
|
enumerable: false,
|
@@ -41051,7 +41235,7 @@ var Question = /** @class */ (function (_super) {
|
|
41051
41235
|
};
|
41052
41236
|
Object.defineProperty(Question.prototype, "isInputTextUpdate", {
|
41053
41237
|
get: function () {
|
41054
|
-
return this.
|
41238
|
+
return this.getIsInputTextUpdate() && this.isTextValue();
|
41055
41239
|
},
|
41056
41240
|
enumerable: false,
|
41057
41241
|
configurable: true
|
@@ -41091,7 +41275,7 @@ var Question = /** @class */ (function (_super) {
|
|
41091
41275
|
};
|
41092
41276
|
Question.prototype.setCommentIntoData = function (newValue) {
|
41093
41277
|
if (this.data != null) {
|
41094
|
-
this.data.setComment(this.getValueName(), newValue, this.
|
41278
|
+
this.data.setComment(this.getValueName(), newValue, this.getIsInputTextUpdate() ? "text" : false);
|
41095
41279
|
}
|
41096
41280
|
};
|
41097
41281
|
Question.prototype.getValidName = function (name) {
|
@@ -42097,6 +42281,15 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
42097
42281
|
_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].locStrsChanged(this.choicesFromUrl);
|
42098
42282
|
_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].locStrsChanged(this.visibleChoices);
|
42099
42283
|
}
|
42284
|
+
if (this.isUsingCarryForward) {
|
42285
|
+
_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].locStrsChanged(this.visibleChoices);
|
42286
|
+
}
|
42287
|
+
};
|
42288
|
+
QuestionSelectBase.prototype.updatePrevOtherErrorValue = function (val) {
|
42289
|
+
var oldVal = this.otherValue;
|
42290
|
+
if (val !== oldVal) {
|
42291
|
+
this.prevOtherErrorValue = oldVal;
|
42292
|
+
}
|
42100
42293
|
};
|
42101
42294
|
Object.defineProperty(QuestionSelectBase.prototype, "otherValue", {
|
42102
42295
|
get: function () {
|
@@ -42105,6 +42298,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
42105
42298
|
return this.otherValueCore;
|
42106
42299
|
},
|
42107
42300
|
set: function (val) {
|
42301
|
+
this.updatePrevOtherErrorValue(val);
|
42108
42302
|
if (!this.showCommentArea) {
|
42109
42303
|
this.comment = val;
|
42110
42304
|
}
|
@@ -42557,6 +42751,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
42557
42751
|
this.value = val ? this.otherItem.value : undefined;
|
42558
42752
|
};
|
42559
42753
|
QuestionSelectBase.prototype.setQuestionComment = function (newValue) {
|
42754
|
+
this.updatePrevOtherErrorValue(newValue);
|
42560
42755
|
if (this.showCommentArea) {
|
42561
42756
|
_super.prototype.setQuestionComment.call(this, newValue);
|
42562
42757
|
return;
|
@@ -42601,6 +42796,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
42601
42796
|
return this.getPropertyValue("renderedValue", null);
|
42602
42797
|
},
|
42603
42798
|
set: function (val) {
|
42799
|
+
if (this.isReadOnlyAttr)
|
42800
|
+
return;
|
42604
42801
|
this.setPropertyValue("renderedValue", val);
|
42605
42802
|
var val = this.rendredValueToData(val);
|
42606
42803
|
if (!this.isTwoValueEquals(val, this.value)) {
|
@@ -43236,6 +43433,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
43236
43433
|
return questionPlainData;
|
43237
43434
|
};
|
43238
43435
|
QuestionSelectBase.prototype.getDisplayValueCore = function (keysAsText, value) {
|
43436
|
+
if (!this.useDisplayValuesInDynamicTexts)
|
43437
|
+
return value;
|
43239
43438
|
return this.getChoicesDisplayValue(this.visibleChoices, value);
|
43240
43439
|
};
|
43241
43440
|
QuestionSelectBase.prototype.getDisplayValueEmpty = function () {
|
@@ -43462,7 +43661,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
43462
43661
|
QuestionSelectBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
43463
43662
|
var _this = this;
|
43464
43663
|
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
43465
|
-
if (!this.hasOther || !this.isOtherSelected || this.otherValue
|
43664
|
+
if (!this.hasOther || !this.isOtherSelected || this.otherValue
|
43665
|
+
|| isOnValueChanged && !this.prevOtherErrorValue)
|
43466
43666
|
return;
|
43467
43667
|
var otherEmptyError = new _error__WEBPACK_IMPORTED_MODULE_5__["OtherEmptyError"](this.otherErrorText, this);
|
43468
43668
|
otherEmptyError.onUpdateErrorTextCallback = function (err) { err.text = _this.otherErrorText; };
|
@@ -44059,7 +44259,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
44059
44259
|
configurable: true
|
44060
44260
|
});
|
44061
44261
|
QuestionSelectBase.prototype.getItemEnabled = function (item) {
|
44062
|
-
return !this.
|
44262
|
+
return !this.isDisabledAttr && item.isEnabled;
|
44063
44263
|
};
|
44064
44264
|
QuestionSelectBase.prototype.afterRender = function (el) {
|
44065
44265
|
_super.prototype.afterRender.call(this, el);
|
@@ -44441,7 +44641,6 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
44441
44641
|
this.value = val == true ? this.getValueTrue() : this.getValueFalse();
|
44442
44642
|
this.booleanValueRendered = val;
|
44443
44643
|
}
|
44444
|
-
this.updateThumbMargin();
|
44445
44644
|
};
|
44446
44645
|
Object.defineProperty(QuestionBooleanModel.prototype, "defaultValue", {
|
44447
44646
|
get: function () {
|
@@ -44646,6 +44845,15 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
44646
44845
|
.append(this.cssClasses.labelFalse, !this.isIndeterminate && checked === this.swapOrder)
|
44647
44846
|
.toString();
|
44648
44847
|
};
|
44848
|
+
QuestionBooleanModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
|
44849
|
+
if (clearData === void 0) { clearData = false; }
|
44850
|
+
_super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
|
44851
|
+
this.updateThumbMargin();
|
44852
|
+
};
|
44853
|
+
QuestionBooleanModel.prototype.onValueChanged = function () {
|
44854
|
+
_super.prototype.onValueChanged.call(this);
|
44855
|
+
this.updateThumbMargin();
|
44856
|
+
};
|
44649
44857
|
Object.defineProperty(QuestionBooleanModel.prototype, "svgIcon", {
|
44650
44858
|
get: function () {
|
44651
44859
|
if (this.booleanValue && this.cssClasses.svgIconCheckedId)
|
@@ -45265,6 +45473,8 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
45265
45473
|
this.renderedValue = val;
|
45266
45474
|
};
|
45267
45475
|
QuestionCheckboxModel.prototype.clickItemHandler = function (item, checked) {
|
45476
|
+
if (this.isReadOnlyAttr)
|
45477
|
+
return;
|
45268
45478
|
if (item === this.selectAllItem) {
|
45269
45479
|
if (checked === true || checked === false) {
|
45270
45480
|
this.isAllSelected = checked;
|
@@ -47149,6 +47359,9 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
|
|
47149
47359
|
this.contentPanel.getValue() : this.getValueForContentPanel(this.value);
|
47150
47360
|
if (!val)
|
47151
47361
|
val = {};
|
47362
|
+
if (!val.getType) {
|
47363
|
+
val = _helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].getUnbindValue(val);
|
47364
|
+
}
|
47152
47365
|
if (this.isValueEmpty(newValue) && !this.isEditingSurveyElement) {
|
47153
47366
|
delete val[name];
|
47154
47367
|
}
|
@@ -48538,7 +48751,16 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
48538
48751
|
}
|
48539
48752
|
_this.clearFilesCore();
|
48540
48753
|
};
|
48754
|
+
_this.doDownloadFileFromContainer = function (event) {
|
48755
|
+
event.stopPropagation();
|
48756
|
+
var currentTarget = event.currentTarget;
|
48757
|
+
if (currentTarget && currentTarget.getElementsByTagName) {
|
48758
|
+
var link = currentTarget.getElementsByTagName("a")[0];
|
48759
|
+
link === null || link === void 0 ? void 0 : link.click();
|
48760
|
+
}
|
48761
|
+
};
|
48541
48762
|
_this.doDownloadFile = function (event, data) {
|
48763
|
+
event.stopPropagation();
|
48542
48764
|
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["detectIEOrEdge"])()) {
|
48543
48765
|
event.preventDefault();
|
48544
48766
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["loadFileFromBase64"])(data.content, data.name);
|
@@ -49453,8 +49675,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
49453
49675
|
}
|
49454
49676
|
this.clear();
|
49455
49677
|
};
|
49456
|
-
QuestionFileModel.prototype.doRemoveFile = function (data) {
|
49678
|
+
QuestionFileModel.prototype.doRemoveFile = function (data, event) {
|
49457
49679
|
var _this = this;
|
49680
|
+
event.stopPropagation();
|
49458
49681
|
if (this.needConfirmRemoveFile) {
|
49459
49682
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["confirmActionAsync"])(this.getConfirmRemoveMessage(data.name), function () { _this.removeFileCore(data); }, undefined, this.getLocale(), this.survey.rootElement);
|
49460
49683
|
return;
|
@@ -50824,6 +51047,16 @@ var MatrixRowModel = /** @class */ (function (_super) {
|
|
50824
51047
|
enumerable: false,
|
50825
51048
|
configurable: true
|
50826
51049
|
});
|
51050
|
+
Object.defineProperty(MatrixRowModel.prototype, "isReadOnlyAttr", {
|
51051
|
+
get: function () { return this.data.isReadOnlyAttr; },
|
51052
|
+
enumerable: false,
|
51053
|
+
configurable: true
|
51054
|
+
});
|
51055
|
+
Object.defineProperty(MatrixRowModel.prototype, "isDisabledAttr", {
|
51056
|
+
get: function () { return !this.item.enabled || this.data.isDisabledAttr; },
|
51057
|
+
enumerable: false,
|
51058
|
+
configurable: true
|
51059
|
+
});
|
50827
51060
|
Object.defineProperty(MatrixRowModel.prototype, "rowTextClasses", {
|
50828
51061
|
get: function () {
|
50829
51062
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]().append(this.data.cssClasses.rowTextCell).toString();
|
@@ -51662,6 +51895,7 @@ var QuestionMatrixDropdownModel = /** @class */ (function (_super) {
|
|
51662
51895
|
__extends(QuestionMatrixDropdownModel, _super);
|
51663
51896
|
function QuestionMatrixDropdownModel(name) {
|
51664
51897
|
var _this = _super.call(this, name) || this;
|
51898
|
+
_this.defaultValuesInRows = {};
|
51665
51899
|
_this.createLocalizableString("totalText", _this, true);
|
51666
51900
|
_this.registerPropertyChangedHandlers(["rows"], function () {
|
51667
51901
|
_this.clearGeneratedRows();
|
@@ -51784,6 +52018,29 @@ var QuestionMatrixDropdownModel = /** @class */ (function (_super) {
|
|
51784
52018
|
_super.prototype.clearValueIfInvisibleCore.call(this, reason);
|
51785
52019
|
this.clearInvisibleValuesInRows();
|
51786
52020
|
};
|
52021
|
+
QuestionMatrixDropdownModel.prototype.clearGeneratedRows = function () {
|
52022
|
+
var _this = this;
|
52023
|
+
if (!this.generatedVisibleRows)
|
52024
|
+
return;
|
52025
|
+
if (!this.isDisposed) {
|
52026
|
+
this.generatedVisibleRows.forEach(function (row) {
|
52027
|
+
_this.defaultValuesInRows[row.rowName] = row.getNamesWithDefaultValues();
|
52028
|
+
});
|
52029
|
+
}
|
52030
|
+
_super.prototype.clearGeneratedRows.call(this);
|
52031
|
+
};
|
52032
|
+
QuestionMatrixDropdownModel.prototype.getRowValueForCreation = function (val, rowValue) {
|
52033
|
+
var res = val[rowValue];
|
52034
|
+
if (!res)
|
52035
|
+
return res;
|
52036
|
+
var names = this.defaultValuesInRows[rowValue];
|
52037
|
+
if (!Array.isArray(names) || names.length === 0)
|
52038
|
+
return res;
|
52039
|
+
names.forEach(function (name) {
|
52040
|
+
delete res[name];
|
52041
|
+
});
|
52042
|
+
return res;
|
52043
|
+
};
|
51787
52044
|
QuestionMatrixDropdownModel.prototype.generateRows = function () {
|
51788
52045
|
var result = new Array();
|
51789
52046
|
var rows = !!this.filteredRows ? this.filteredRows : this.rows;
|
@@ -51793,9 +52050,10 @@ var QuestionMatrixDropdownModel = /** @class */ (function (_super) {
|
|
51793
52050
|
if (!val)
|
51794
52051
|
val = {};
|
51795
52052
|
for (var i = 0; i < rows.length; i++) {
|
51796
|
-
|
52053
|
+
var row = rows[i];
|
52054
|
+
if (this.isValueEmpty(row.value))
|
51797
52055
|
continue;
|
51798
|
-
result.push(this.createMatrixRow(
|
52056
|
+
result.push(this.createMatrixRow(row, this.getRowValueForCreation(val, row.value)));
|
51799
52057
|
}
|
51800
52058
|
return result;
|
51801
52059
|
};
|
@@ -52256,18 +52514,22 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
52256
52514
|
}
|
52257
52515
|
}
|
52258
52516
|
res.row = this.getAllValues();
|
52517
|
+
this.applyRowVariablesToValues(res, this.rowIndex);
|
52259
52518
|
return res;
|
52260
52519
|
};
|
52261
52520
|
MatrixDropdownRowModelBase.prototype.getFilteredProperties = function () {
|
52262
52521
|
return { survey: this.getSurvey(), row: this };
|
52263
52522
|
};
|
52523
|
+
MatrixDropdownRowModelBase.prototype.applyRowVariablesToValues = function (res, rowIndex) {
|
52524
|
+
res[MatrixDropdownRowModelBase.IndexVariableName] = rowIndex;
|
52525
|
+
res[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
|
52526
|
+
};
|
52264
52527
|
MatrixDropdownRowModelBase.prototype.runCondition = function (values, properties) {
|
52265
52528
|
if (!!this.data) {
|
52266
52529
|
values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.value;
|
52267
52530
|
}
|
52268
52531
|
var rowIndex = this.rowIndex;
|
52269
|
-
values
|
52270
|
-
values[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
|
52532
|
+
this.applyRowVariablesToValues(values, rowIndex);
|
52271
52533
|
var newProps = _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].createCopy(properties);
|
52272
52534
|
newProps[MatrixDropdownRowModelBase.RowVariableName] = this;
|
52273
52535
|
var rowValues = rowIndex > 0 ? this.data.getRowValue(this.rowIndex - 1) : this.value;
|
@@ -52282,6 +52544,15 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
52282
52544
|
this.detailPanel.runCondition(values, newProps);
|
52283
52545
|
}
|
52284
52546
|
};
|
52547
|
+
MatrixDropdownRowModelBase.prototype.getNamesWithDefaultValues = function () {
|
52548
|
+
var res = [];
|
52549
|
+
this.questions.forEach(function (q) {
|
52550
|
+
if (q.isValueDefault) {
|
52551
|
+
res.push(q.getValueName());
|
52552
|
+
}
|
52553
|
+
});
|
52554
|
+
return res;
|
52555
|
+
};
|
52285
52556
|
MatrixDropdownRowModelBase.prototype.clearValue = function (keepComment) {
|
52286
52557
|
var questions = this.questions;
|
52287
52558
|
for (var i = 0; i < questions.length; i++) {
|
@@ -55514,6 +55785,13 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
55514
55785
|
json[prop] = _this.jsonObj[prop];
|
55515
55786
|
});
|
55516
55787
|
}
|
55788
|
+
if (json["choicesOrder"] === "random") {
|
55789
|
+
json["choicesOrder"] = "none";
|
55790
|
+
var visChoices = this.templateQuestion["visibleChoices"];
|
55791
|
+
if (Array.isArray(visChoices)) {
|
55792
|
+
json["choices"] = visChoices;
|
55793
|
+
}
|
55794
|
+
}
|
55517
55795
|
new _jsonobject__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]().toObject(json, question);
|
55518
55796
|
question.isContentElement = this.templateQuestion.isContentElement;
|
55519
55797
|
this.previousChoicesId = undefined;
|
@@ -55536,8 +55814,12 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
55536
55814
|
}
|
55537
55815
|
if (!this.colOwner || this.isLoadingFromJson)
|
55538
55816
|
return;
|
55539
|
-
if (this.isShowInMultipleColumns
|
55540
|
-
|
55817
|
+
if (this.isShowInMultipleColumns) {
|
55818
|
+
if (name === "choicesOrder")
|
55819
|
+
return;
|
55820
|
+
if (["visibleChoices", "choices"].indexOf(name) > -1) {
|
55821
|
+
this.colOwner.onShowInMultipleColumnsChanged(this);
|
55822
|
+
}
|
55541
55823
|
}
|
55542
55824
|
if (!_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].hasOriginalProperty(this, name))
|
55543
55825
|
return;
|
@@ -56017,11 +56299,9 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
56017
56299
|
function QuestionMatrixDropdownRenderedTable(matrix) {
|
56018
56300
|
var _this = _super.call(this) || this;
|
56019
56301
|
_this.matrix = matrix;
|
56020
|
-
_this.renderedRowsChangedCallback = function () { };
|
56021
56302
|
_this._renderedRows = [];
|
56022
56303
|
_this.renderedRowsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationGroup"](_this.getRenderedRowsAnimationOptions(), function (val) {
|
56023
56304
|
_this._renderedRows = val;
|
56024
|
-
_this.renderedRowsChangedCallback();
|
56025
56305
|
}, function () { return _this._renderedRows; });
|
56026
56306
|
_this.hasActionCellInRowsValues = {};
|
56027
56307
|
_this.build();
|
@@ -56041,6 +56321,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
56041
56321
|
isAnimationEnabled: function () {
|
56042
56322
|
return _this.animationAllowed;
|
56043
56323
|
},
|
56324
|
+
getRerenderEvent: function () { return _this.onElementRerendered; },
|
56044
56325
|
getAnimatedElement: function (el) {
|
56045
56326
|
return el.getRootElement();
|
56046
56327
|
},
|
@@ -56901,7 +57182,6 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
56901
57182
|
__decorate([
|
56902
57183
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["propertyArray"])({
|
56903
57184
|
onPush: function (_, i, target) {
|
56904
|
-
target.renderedRowsChangedCallback();
|
56905
57185
|
target.updateRenderedRows();
|
56906
57186
|
},
|
56907
57187
|
onRemove: function (_, i, target) {
|
@@ -60051,6 +60331,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
60051
60331
|
.toString();
|
60052
60332
|
};
|
60053
60333
|
return {
|
60334
|
+
getRerenderEvent: function () { return _this.onElementRerendered; },
|
60054
60335
|
getAnimatedElement: function (panel) {
|
60055
60336
|
var _a, _b;
|
60056
60337
|
if (panel && _this.cssContent) {
|
@@ -61555,7 +61836,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
61555
61836
|
this.setOnCompleteAsyncInPanel(panels[i]);
|
61556
61837
|
}
|
61557
61838
|
for (var i = 0; i < panels.length; i++) {
|
61558
|
-
var pnlError = panels[i].hasErrors(fireCallback, !!rec && rec.
|
61839
|
+
var pnlError = panels[i].hasErrors(fireCallback, !!rec && rec.focusOnFirstError, rec);
|
61559
61840
|
pnlError = this.isValueDuplicated(panels[i], keyValues, rec, fireCallback) || pnlError;
|
61560
61841
|
if (!this.isRenderModeList && pnlError && !res) {
|
61561
61842
|
this.currentIndex = i;
|
@@ -62387,6 +62668,8 @@ var QuestionRadiogroupModel = /** @class */ (function (_super) {
|
|
62387
62668
|
configurable: true
|
62388
62669
|
});
|
62389
62670
|
QuestionRadiogroupModel.prototype.clickItemHandler = function (item) {
|
62671
|
+
if (this.isReadOnlyAttr)
|
62672
|
+
return;
|
62390
62673
|
this.renderedValue = item.value;
|
62391
62674
|
};
|
62392
62675
|
QuestionRadiogroupModel.prototype.getDefaultTitleActions = function () {
|
@@ -62459,6 +62742,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
62459
62742
|
/* harmony import */ var _src_settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../src/settings */ "./src/settings.ts");
|
62460
62743
|
/* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
|
62461
62744
|
/* harmony import */ var _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/dragOrClickHelper */ "./src/utils/dragOrClickHelper.ts");
|
62745
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
62462
62746
|
var __extends = (undefined && undefined.__extends) || (function () {
|
62463
62747
|
var extendStatics = function (d, b) {
|
62464
62748
|
extendStatics = Object.setPrototypeOf ||
|
@@ -62492,6 +62776,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
62492
62776
|
|
62493
62777
|
|
62494
62778
|
|
62779
|
+
|
62495
62780
|
/**
|
62496
62781
|
* A class that describes the Ranking question type.
|
62497
62782
|
*
|
@@ -62511,33 +62796,37 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62511
62796
|
if (_this.visibleChoices.length === 1 && !_this.selectToRankEnabled) {
|
62512
62797
|
_this.value = [];
|
62513
62798
|
_this.value.push(_this.visibleChoices[0].value);
|
62514
|
-
_this.
|
62799
|
+
_this.updateRankingChoices();
|
62515
62800
|
return;
|
62516
62801
|
}
|
62517
62802
|
if (_this.isEmpty()) {
|
62518
|
-
_this.
|
62803
|
+
_this.updateRankingChoices();
|
62519
62804
|
return;
|
62520
62805
|
}
|
62521
62806
|
if (_this.selectToRankEnabled) {
|
62522
|
-
_this.
|
62807
|
+
_this.updateRankingChoices();
|
62523
62808
|
return;
|
62524
62809
|
}
|
62525
62810
|
if (_this.visibleChoices.length > _this.value.length)
|
62526
62811
|
_this.addToValueByVisibleChoices();
|
62527
62812
|
if (_this.visibleChoices.length < _this.value.length)
|
62528
62813
|
_this.removeFromValueByVisibleChoices();
|
62529
|
-
_this.
|
62814
|
+
_this.updateRankingChoices();
|
62530
62815
|
};
|
62531
62816
|
_this.localeChanged = function () {
|
62532
62817
|
_super.prototype.localeChanged.call(_this);
|
62533
62818
|
_this.updateRankingChoicesSync();
|
62534
62819
|
};
|
62535
|
-
_this._rankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.
|
62536
|
-
_this.
|
62537
|
-
}, function () { return _this.
|
62538
|
-
_this._unRankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.
|
62539
|
-
_this.
|
62540
|
-
}, function () { return _this.
|
62820
|
+
_this._rankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.getChoicesAnimationOptions(true), function (val) {
|
62821
|
+
_this._renderedRankingChoices = val;
|
62822
|
+
}, function () { return _this.renderedRankingChoices; });
|
62823
|
+
_this._unRankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.getChoicesAnimationOptions(false), function (val) {
|
62824
|
+
_this._renderedUnRankingChoices = val;
|
62825
|
+
}, function () { return _this.renderedUnRankingChoices; });
|
62826
|
+
_this.rankingChoices = [];
|
62827
|
+
_this.unRankingChoices = [];
|
62828
|
+
_this._renderedRankingChoices = [];
|
62829
|
+
_this._renderedUnRankingChoices = [];
|
62541
62830
|
_this.handlePointerDown = function (event, choice, node) {
|
62542
62831
|
var target = event.target;
|
62543
62832
|
if (!_this.isDragStartNodeValid(target))
|
@@ -62561,6 +62850,8 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62561
62850
|
}
|
62562
62851
|
};
|
62563
62852
|
_this.handleKeydown = function (event, choice) {
|
62853
|
+
if (_this.isReadOnlyAttr)
|
62854
|
+
return;
|
62564
62855
|
if (!_this.isDesignMode) {
|
62565
62856
|
var key = event.key;
|
62566
62857
|
var index = _this.rankingChoices.indexOf(choice);
|
@@ -62568,27 +62859,16 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62568
62859
|
_this.handleKeydownSelectToRank(event, choice);
|
62569
62860
|
return;
|
62570
62861
|
}
|
62571
|
-
if (key === "ArrowUp" && index) {
|
62572
|
-
|
62573
|
-
|
62574
|
-
|
62575
|
-
if (key === "ArrowDown" && index !== _this.rankingChoices.length - 1) {
|
62576
|
-
_this.handleArrowKeys(index, choice, true);
|
62577
|
-
event.preventDefault();
|
62862
|
+
if ((key === "ArrowUp" && index) || (key === "ArrowDown" && index !== _this.rankingChoices.length - 1)) {
|
62863
|
+
var toIndex = key == "ArrowUp" ? index - 1 : index + 1;
|
62864
|
+
_this.dragDropRankingChoices.reorderRankedItem(_this, index, toIndex);
|
62865
|
+
_this.setValueAfterKeydown(toIndex, "", true, event);
|
62578
62866
|
}
|
62579
62867
|
}
|
62580
62868
|
};
|
62581
|
-
_this.handleArrowKeys = function (index, choice, isDown) {
|
62582
|
-
var delta = isDown ? 1 : -1;
|
62583
|
-
var choices = _this.rankingChoices;
|
62584
|
-
choices.splice(index, 1);
|
62585
|
-
choices.splice(index + delta, 0, choice);
|
62586
|
-
_this.setValue();
|
62587
|
-
setTimeout(function () {
|
62588
|
-
_this.focusItem(index + delta);
|
62589
|
-
}, 1);
|
62590
|
-
};
|
62591
62869
|
_this.focusItem = function (index, container) {
|
62870
|
+
if (!_this.domNode)
|
62871
|
+
return;
|
62592
62872
|
if (_this.selectToRankEnabled && container) {
|
62593
62873
|
var containerSelector = "[data-ranking='" + container + "']";
|
62594
62874
|
var itemsNodes = _this.domNode.querySelectorAll(containerSelector + " " + "." + _this.cssClasses.item);
|
@@ -62602,16 +62882,12 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62602
62882
|
_this.isValueSetByUser = false;
|
62603
62883
|
_this.setValue = function () {
|
62604
62884
|
var value = [];
|
62605
|
-
_this.rankingChoicesAnimation.cancel();
|
62606
|
-
_this.unRankingChoicesAnimation.cancel();
|
62607
62885
|
_this.rankingChoices.forEach(function (choice) {
|
62608
62886
|
value.push(choice.value);
|
62609
62887
|
});
|
62610
62888
|
_this.value = value;
|
62611
62889
|
_this.isValueSetByUser = true;
|
62612
62890
|
};
|
62613
|
-
_this.createNewArray("rankingChoices");
|
62614
|
-
_this.createNewArray("unRankingChoices");
|
62615
62891
|
_this.registerFunctionOnPropertyValueChanged("selectToRankEnabled", function () {
|
62616
62892
|
_this.clearValue(true);
|
62617
62893
|
_this.setDragDropRankingChoices();
|
@@ -62661,15 +62937,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62661
62937
|
return true;
|
62662
62938
|
};
|
62663
62939
|
QuestionRankingModel.prototype.getItemClassCore = function (item, options) {
|
62664
|
-
var itemIndex = this.rankingChoices.indexOf(item);
|
62665
|
-
var unrankedItemIndex = this.unRankingChoices.indexOf(item);
|
62666
|
-
var dropTargetIndex = this.rankingChoices.indexOf(this.currentDropTarget);
|
62667
|
-
var isDrop = (this.selectToRankEnabled && itemIndex > -1 && unrankedItemIndex > -1) || this.currentDropTarget === item;
|
62668
62940
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
|
62669
62941
|
.append(_super.prototype.getItemClassCore.call(this, item, options))
|
62670
|
-
.append(this.cssClasses.itemGhostMod,
|
62671
|
-
.append("sv-dragdrop-movedown", itemIndex === dropTargetIndex + 1 && this.dropTargetNodeMove === "down")
|
62672
|
-
.append("sv-dragdrop-moveup", itemIndex === dropTargetIndex - 1 && this.dropTargetNodeMove === "up")
|
62942
|
+
.append(this.cssClasses.itemGhostMod, this.currentDropTarget === item)
|
62673
62943
|
.toString();
|
62674
62944
|
};
|
62675
62945
|
QuestionRankingModel.prototype.getContainerClasses = function (containerType) {
|
@@ -62677,10 +62947,10 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62677
62947
|
var isToContainer = containerType === "to";
|
62678
62948
|
var isFromContainer = containerType === "from";
|
62679
62949
|
if (isToContainer) {
|
62680
|
-
isEmpty = this.
|
62950
|
+
isEmpty = this.renderedRankingChoices.length === 0;
|
62681
62951
|
}
|
62682
62952
|
else if (isFromContainer) {
|
62683
|
-
isEmpty = this.
|
62953
|
+
isEmpty = this.renderedUnRankingChoices.length === 0;
|
62684
62954
|
}
|
62685
62955
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
|
62686
62956
|
.append(this.cssClasses.container)
|
@@ -62741,7 +63011,12 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62741
63011
|
_super.prototype.onSurveyValueChanged.call(this, newValue);
|
62742
63012
|
if (this.isLoadingFromJson)
|
62743
63013
|
return;
|
62744
|
-
this.
|
63014
|
+
this.updateRankingChoices();
|
63015
|
+
};
|
63016
|
+
QuestionRankingModel.prototype.onSurveyLoad = function () {
|
63017
|
+
this.blockAnimations();
|
63018
|
+
_super.prototype.onSurveyLoad.call(this);
|
63019
|
+
this.releaseAnimations();
|
62745
63020
|
};
|
62746
63021
|
QuestionRankingModel.prototype.addToValueByVisibleChoices = function () {
|
62747
63022
|
var newValue = this.value.slice();
|
@@ -62762,19 +63037,32 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62762
63037
|
}
|
62763
63038
|
this.value = newValue;
|
62764
63039
|
};
|
62765
|
-
QuestionRankingModel.prototype.
|
63040
|
+
QuestionRankingModel.prototype.getChoicesAnimationOptions = function (isRankingChoices) {
|
62766
63041
|
var _this = this;
|
62767
63042
|
return {
|
62768
|
-
|
63043
|
+
getKey: function (item) {
|
63044
|
+
return item.value;
|
63045
|
+
},
|
63046
|
+
getRerenderEvent: function () {
|
63047
|
+
return _this.onElementRerendered;
|
63048
|
+
},
|
63049
|
+
isAnimationEnabled: function () { return _this.animationAllowed && !_this.isDesignMode && _this.isVisible && !!_this.domNode; },
|
63050
|
+
getReorderOptions: function (item, movedForward) {
|
63051
|
+
var cssClass = "";
|
63052
|
+
if (item !== _this.currentDropTarget) {
|
63053
|
+
cssClass = movedForward ? "sv-dragdrop-movedown" : "sv-dragdrop-moveup";
|
63054
|
+
}
|
63055
|
+
return { cssClass: cssClass };
|
63056
|
+
},
|
62769
63057
|
getLeaveOptions: function (item) {
|
62770
|
-
var choices = isRankingChoices ? _this.
|
63058
|
+
var choices = isRankingChoices ? _this.renderedRankingChoices : _this.renderedUnRankingChoices;
|
62771
63059
|
if (_this.renderedSelectToRankAreasLayout == "vertical" && choices.length == 1 && choices.indexOf(item) >= 0) {
|
62772
63060
|
return { cssClass: "sv-ranking-item--animate-item-removing-empty" };
|
62773
63061
|
}
|
62774
63062
|
return { cssClass: "sv-ranking-item--animate-item-removing" };
|
62775
63063
|
},
|
62776
63064
|
getEnterOptions: function (item) {
|
62777
|
-
var choices = isRankingChoices ? _this.
|
63065
|
+
var choices = isRankingChoices ? _this.renderedRankingChoices : _this.renderedUnRankingChoices;
|
62778
63066
|
if (_this.renderedSelectToRankAreasLayout == "vertical" && choices.length == 1 && choices.indexOf(item) >= 0) {
|
62779
63067
|
return { cssClass: "sv-ranking-item--animate-item-adding-empty" };
|
62780
63068
|
}
|
@@ -62782,9 +63070,20 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62782
63070
|
},
|
62783
63071
|
getAnimatedElement: function (item) {
|
62784
63072
|
var _a;
|
62785
|
-
var
|
62786
|
-
|
62787
|
-
|
63073
|
+
var cssClasses = _this.cssClasses;
|
63074
|
+
var containerSelector = "";
|
63075
|
+
if (_this.selectToRankEnabled) {
|
63076
|
+
if (!isRankingChoices && cssClasses.containerFromMode) {
|
63077
|
+
containerSelector = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_12__["classesToSelector"])(cssClasses.containerFromMode);
|
63078
|
+
}
|
63079
|
+
else if (isRankingChoices && cssClasses.containerToMode) {
|
63080
|
+
containerSelector = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_12__["classesToSelector"])(cssClasses.containerToMode);
|
63081
|
+
}
|
63082
|
+
}
|
63083
|
+
var index = isRankingChoices ? _this.renderedRankingChoices.indexOf(item) : _this.renderedUnRankingChoices.indexOf(item);
|
63084
|
+
return (_a = _this.domNode) === null || _a === void 0 ? void 0 : _a.querySelector(containerSelector + " [data-sv-drop-target-ranking-item='" + index + "']");
|
63085
|
+
},
|
63086
|
+
allowSyncRemovalAddition: true
|
62788
63087
|
};
|
62789
63088
|
};
|
62790
63089
|
Object.defineProperty(QuestionRankingModel.prototype, "rankingChoicesAnimation", {
|
@@ -62801,26 +63100,32 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62801
63100
|
enumerable: false,
|
62802
63101
|
configurable: true
|
62803
63102
|
});
|
62804
|
-
Object.defineProperty(QuestionRankingModel.prototype, "
|
63103
|
+
Object.defineProperty(QuestionRankingModel.prototype, "renderedRankingChoices", {
|
62805
63104
|
get: function () {
|
62806
|
-
return this.
|
63105
|
+
return this._renderedRankingChoices;
|
62807
63106
|
},
|
62808
63107
|
set: function (val) {
|
62809
|
-
this.
|
63108
|
+
this.rankingChoicesAnimation.sync(val);
|
62810
63109
|
},
|
62811
63110
|
enumerable: false,
|
62812
63111
|
configurable: true
|
62813
63112
|
});
|
62814
|
-
Object.defineProperty(QuestionRankingModel.prototype, "
|
63113
|
+
Object.defineProperty(QuestionRankingModel.prototype, "renderedUnRankingChoices", {
|
62815
63114
|
get: function () {
|
62816
|
-
return this.
|
63115
|
+
return this._renderedUnRankingChoices;
|
62817
63116
|
},
|
62818
63117
|
set: function (val) {
|
62819
|
-
this.
|
63118
|
+
this.unRankingChoicesAnimation.sync(val);
|
62820
63119
|
},
|
62821
63120
|
enumerable: false,
|
62822
63121
|
configurable: true
|
62823
63122
|
});
|
63123
|
+
QuestionRankingModel.prototype.updateRenderedRankingChoices = function () {
|
63124
|
+
this.renderedRankingChoices = this.rankingChoices;
|
63125
|
+
};
|
63126
|
+
QuestionRankingModel.prototype.updateRenderedUnRankingChoices = function () {
|
63127
|
+
this.renderedUnRankingChoices = this.unRankingChoices;
|
63128
|
+
};
|
62824
63129
|
QuestionRankingModel.prototype.updateRankingChoices = function (forceUpdate) {
|
62825
63130
|
var _this = this;
|
62826
63131
|
if (forceUpdate === void 0) { forceUpdate = false; }
|
@@ -62835,9 +63140,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62835
63140
|
// return;
|
62836
63141
|
// }
|
62837
63142
|
if (forceUpdate)
|
62838
|
-
this.
|
63143
|
+
this.rankingChoices = [];
|
62839
63144
|
if (this.isEmpty()) {
|
62840
|
-
this.
|
63145
|
+
this.rankingChoices = this.visibleChoices;
|
62841
63146
|
return;
|
62842
63147
|
}
|
62843
63148
|
this.value.forEach(function (valueItem) {
|
@@ -62846,7 +63151,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62846
63151
|
newRankingChoices.push(choice);
|
62847
63152
|
});
|
62848
63153
|
});
|
62849
|
-
this.
|
63154
|
+
this.rankingChoices = newRankingChoices;
|
62850
63155
|
};
|
62851
63156
|
QuestionRankingModel.prototype.updateUnRankingChoices = function (newRankingChoices) {
|
62852
63157
|
var unRankingChoices = [];
|
@@ -62926,6 +63231,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62926
63231
|
};
|
62927
63232
|
//cross framework destroy
|
62928
63233
|
QuestionRankingModel.prototype.beforeDestroyQuestionElement = function (el) {
|
63234
|
+
this.domNode = undefined;
|
62929
63235
|
_super.prototype.beforeDestroyQuestionElement.call(this, el);
|
62930
63236
|
};
|
62931
63237
|
QuestionRankingModel.prototype.supportSelectAll = function () { return false; };
|
@@ -62954,20 +63260,16 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62954
63260
|
if (!this.checkMaxSelectedChoicesUnreached() || !this.canStartDragDueItemEnabled(movedElement))
|
62955
63261
|
return;
|
62956
63262
|
toIndex = this.value.length;
|
62957
|
-
this.blockAnimations();
|
62958
63263
|
dnd.selectToRank(this, fromIndex, toIndex);
|
62959
|
-
this.
|
62960
|
-
this.setValueAfterKeydown(toIndex, "to-container", isNeedFocus);
|
63264
|
+
this.setValueAfterKeydown(toIndex, "to-container", isNeedFocus, event);
|
62961
63265
|
return;
|
62962
63266
|
}
|
62963
63267
|
if (!isMovedElementRanked)
|
62964
63268
|
return;
|
62965
63269
|
if (key === " ") {
|
62966
|
-
this.blockAnimations();
|
62967
63270
|
dnd.unselectFromRank(this, fromIndex);
|
62968
|
-
this.releaseAnimations();
|
62969
63271
|
toIndex = this.unRankingChoices.indexOf(movedElement); //'this.' leads to actual array after the 'unselectFromRank' method
|
62970
|
-
this.setValueAfterKeydown(toIndex, "from-container", isNeedFocus);
|
63272
|
+
this.setValueAfterKeydown(toIndex, "from-container", isNeedFocus, event);
|
62971
63273
|
return;
|
62972
63274
|
}
|
62973
63275
|
var delta = key === "ArrowUp" ? -1 : (key === "ArrowDown" ? 1 : 0);
|
@@ -62977,9 +63279,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
62977
63279
|
if (toIndex < 0 || toIndex >= rankingChoices.length)
|
62978
63280
|
return;
|
62979
63281
|
dnd.reorderRankedItem(this, fromIndex, toIndex);
|
62980
|
-
this.setValueAfterKeydown(toIndex, "to-container", isNeedFocus);
|
63282
|
+
this.setValueAfterKeydown(toIndex, "to-container", isNeedFocus, event);
|
62981
63283
|
};
|
62982
|
-
QuestionRankingModel.prototype.setValueAfterKeydown = function (index, container, isNeedFocus) {
|
63284
|
+
QuestionRankingModel.prototype.setValueAfterKeydown = function (index, container, isNeedFocus, event) {
|
62983
63285
|
var _this = this;
|
62984
63286
|
if (isNeedFocus === void 0) { isNeedFocus = true; }
|
62985
63287
|
this.setValue();
|
@@ -63019,6 +63321,19 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
63019
63321
|
enumerable: false,
|
63020
63322
|
configurable: true
|
63021
63323
|
});
|
63324
|
+
Object.defineProperty(QuestionRankingModel.prototype, "itemContentComponent", {
|
63325
|
+
/**
|
63326
|
+
* The name of a component used to render items.
|
63327
|
+
*/
|
63328
|
+
get: function () {
|
63329
|
+
return this.getPropertyValue("itemContentComponent", "sv-ranking-item-content");
|
63330
|
+
},
|
63331
|
+
set: function (value) {
|
63332
|
+
this.setPropertyValue("itemContentComponent", value);
|
63333
|
+
},
|
63334
|
+
enumerable: false,
|
63335
|
+
configurable: true
|
63336
|
+
});
|
63022
63337
|
Object.defineProperty(QuestionRankingModel.prototype, "selectToRankEnabled", {
|
63023
63338
|
/**
|
63024
63339
|
* Specifies whether users can select choices they want to rank.
|
@@ -63108,11 +63423,27 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
63108
63423
|
configurable: true
|
63109
63424
|
});
|
63110
63425
|
__decorate([
|
63111
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["
|
63112
|
-
|
63426
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["propertyArray"])({
|
63427
|
+
onSet: function (val, target) { return target.updateRenderedRankingChoices(); },
|
63428
|
+
onRemove: function (_, _i, target) { return target.updateRenderedRankingChoices(); },
|
63429
|
+
onPush: function (_, _i, target) { return target.updateRenderedRankingChoices(); },
|
63430
|
+
})
|
63431
|
+
], QuestionRankingModel.prototype, "rankingChoices", void 0);
|
63432
|
+
__decorate([
|
63433
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["propertyArray"])({ onSet: function (val, target) { return target.updateRenderedUnRankingChoices(); },
|
63434
|
+
onRemove: function (_, _i, target) { return target.updateRenderedUnRankingChoices(); },
|
63435
|
+
onPush: function (_, _i, target) { return target.updateRenderedUnRankingChoices(); },
|
63436
|
+
})
|
63437
|
+
], QuestionRankingModel.prototype, "unRankingChoices", void 0);
|
63438
|
+
__decorate([
|
63439
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["propertyArray"])()
|
63440
|
+
], QuestionRankingModel.prototype, "_renderedRankingChoices", void 0);
|
63441
|
+
__decorate([
|
63442
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["propertyArray"])()
|
63443
|
+
], QuestionRankingModel.prototype, "_renderedUnRankingChoices", void 0);
|
63113
63444
|
__decorate([
|
63114
63445
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ defaultValue: null })
|
63115
|
-
], QuestionRankingModel.prototype, "
|
63446
|
+
], QuestionRankingModel.prototype, "currentDropTarget", void 0);
|
63116
63447
|
__decorate([
|
63117
63448
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ defaultValue: true })
|
63118
63449
|
], QuestionRankingModel.prototype, "carryForwardStartUnranked", void 0);
|
@@ -63195,7 +63526,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_3__["Serializer"].addClass("ranking", [
|
|
63195
63526
|
dependsOn: "selectToRankEnabled", visibleIf: function (obj) {
|
63196
63527
|
return !!obj.selectToRankEnabled;
|
63197
63528
|
}, isSerializable: true },
|
63198
|
-
{ name: "itemComponent", visible: false, default: "" }
|
63529
|
+
{ name: "itemComponent", visible: false, default: "" },
|
63530
|
+
{ name: "itemContentComponent", visible: false, default: "sv-ranking-item-content" },
|
63199
63531
|
], function () {
|
63200
63532
|
return new QuestionRankingModel("");
|
63201
63533
|
}, "checkbox");
|
@@ -63838,6 +64170,8 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
63838
64170
|
return !isNaN(val) ? parseFloat(val) : val;
|
63839
64171
|
};
|
63840
64172
|
QuestionRatingModel.prototype.setValueFromClick = function (value) {
|
64173
|
+
if (this.isReadOnlyAttr)
|
64174
|
+
return;
|
63841
64175
|
if (this.value === parseFloat(value)) {
|
63842
64176
|
this.clearValue(true);
|
63843
64177
|
}
|
@@ -65899,8 +66233,11 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
65899
66233
|
enumerable: false,
|
65900
66234
|
configurable: true
|
65901
66235
|
});
|
66236
|
+
QuestionTextModel.prototype.getIsInputTextUpdate = function () {
|
66237
|
+
return this.maskTypeIsEmpty ? _super.prototype.getIsInputTextUpdate.call(this) : false;
|
66238
|
+
};
|
65902
66239
|
QuestionTextModel.prototype.supportGoNextPageAutomatic = function () {
|
65903
|
-
return !this.
|
66240
|
+
return !this.getIsInputTextUpdate() &&
|
65904
66241
|
["date", "datetime-local"].indexOf(this.inputType) < 0;
|
65905
66242
|
};
|
65906
66243
|
QuestionTextModel.prototype.supportGoNextPageError = function () {
|
@@ -66374,15 +66711,11 @@ var QuestionTextBase = /** @class */ (function (_super) {
|
|
66374
66711
|
enumerable: false,
|
66375
66712
|
configurable: true
|
66376
66713
|
});
|
66377
|
-
|
66378
|
-
|
66379
|
-
|
66380
|
-
|
66381
|
-
|
66382
|
-
},
|
66383
|
-
enumerable: false,
|
66384
|
-
configurable: true
|
66385
|
-
});
|
66714
|
+
QuestionTextBase.prototype.getIsInputTextUpdate = function () {
|
66715
|
+
if (this.textUpdateMode == "default")
|
66716
|
+
return _super.prototype.getIsInputTextUpdate.call(this);
|
66717
|
+
return this.textUpdateMode == "onTyping";
|
66718
|
+
};
|
66386
66719
|
Object.defineProperty(QuestionTextBase.prototype, "renderedPlaceholder", {
|
66387
66720
|
get: function () {
|
66388
66721
|
return this.getPropertyValue("renderedPlaceholder");
|
@@ -66771,7 +67104,7 @@ var SurveyQuestionBooleanCheckbox = /** @class */ (function (_super) {
|
|
66771
67104
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: cssClasses.checkboxLabel },
|
66772
67105
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
|
66773
67106
|
? ""
|
66774
|
-
: this.question.booleanValue, id: this.question.inputId, className: cssClasses.controlCheckbox, disabled: this.
|
67107
|
+
: this.question.booleanValue, id: this.question.inputId, className: cssClasses.controlCheckbox, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.booleanValue || false, onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
66775
67108
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.checkboxMaterialDecorator },
|
66776
67109
|
this.question.svgIcon ?
|
66777
67110
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: cssClasses.checkboxItemDecorator },
|
@@ -66839,7 +67172,7 @@ var SurveyQuestionBooleanRadio = /** @class */ (function (_super) {
|
|
66839
67172
|
var cssClasses = this.question.cssClasses;
|
66840
67173
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { role: "presentation", className: this.question.getRadioItemClass(cssClasses, value) },
|
66841
67174
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: cssClasses.radioLabel },
|
66842
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "radio", name: this.question.name, value: value, "aria-errormessage": this.question.ariaErrormessage, checked: value === this.question.booleanValueRendered, disabled: this.question.
|
67175
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "radio", name: this.question.name, value: value, "aria-errormessage": this.question.ariaErrormessage, checked: value === this.question.booleanValueRendered, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: cssClasses.itemRadioControl, onChange: this.handleOnChange }),
|
66843
67176
|
this.question.cssClasses.materialRadioDecorator ?
|
66844
67177
|
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.materialRadioDecorator }, this.question.itemSvgIcon ?
|
66845
67178
|
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: cssClasses.itemRadioDecorator },
|
@@ -66964,7 +67297,7 @@ var SurveyQuestionBoolean = /** @class */ (function (_super) {
|
|
66964
67297
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: itemClass, onClick: this.handleOnClick },
|
66965
67298
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
|
66966
67299
|
? ""
|
66967
|
-
: this.question.booleanValue, id: this.question.inputId, className: cssClasses.control, disabled: this.
|
67300
|
+
: this.question.booleanValue, id: this.question.inputId, className: cssClasses.control, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.booleanValue || false, onChange: this.handleOnChange, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }),
|
66968
67301
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.sliderGhost, onClick: function (event) { return _this.handleOnLabelClick(event, _this.question.swapOrder); } },
|
66969
67302
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.getLabelCss(this.question.swapOrder) }, this.renderLocString(this.question.locLabelLeft))),
|
66970
67303
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.switch, onClick: this.handleOnSwitchClick },
|
@@ -67620,11 +67953,11 @@ var SurveyFilePreview = /** @class */ (function (_super) {
|
|
67620
67953
|
var previews = this.question.previewValue.map(function (val, index) {
|
67621
67954
|
if (!val)
|
67622
67955
|
return null;
|
67623
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { key: _this.question.inputId + "_" + index, className: _this.question.cssClasses.previewItem, style: { display: _this.question.isPreviewVisible(index) ? undefined : "none" } },
|
67956
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { key: _this.question.inputId + "_" + index, className: _this.question.cssClasses.previewItem, onClick: function (event) { return _this.question.doDownloadFileFromContainer(event); }, style: { display: _this.question.isPreviewVisible(index) ? undefined : "none" } },
|
67624
67957
|
_this.renderFileSign(_this.question.cssClasses.fileSign, val),
|
67625
67958
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: _this.question.getImageWrapperCss(val) },
|
67626
67959
|
_this.question.canPreviewImage(val) ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("img", { src: val.content, style: { height: _this.question.imageHeight, width: _this.question.imageWidth }, alt: "File preview" })) : (_this.question.cssClasses.defaultImage ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { iconName: _this.question.cssClasses.defaultImageIconId, size: "auto", className: _this.question.cssClasses.defaultImage })) : null),
|
67627
|
-
val.name && !_this.question.isReadOnly ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: _this.question.getRemoveButtonCss(), onClick: function () { return _this.question.doRemoveFile(val); } },
|
67960
|
+
val.name && !_this.question.isReadOnly ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: _this.question.getRemoveButtonCss(), onClick: function (event) { return _this.question.doRemoveFile(val, event); } },
|
67628
67961
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: _this.question.cssClasses.removeFile }, _this.question.removeFileCaption),
|
67629
67962
|
(_this.question.cssClasses.removeFileSvgIconId) ?
|
67630
67963
|
(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { title: _this.question.removeFileCaption, iconName: _this.question.cssClasses.removeFileSvgIconId, size: "auto", className: _this.question.cssClasses.removeFileSvg })) : null)) : null),
|
@@ -67781,6 +68114,166 @@ _element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.re
|
|
67781
68114
|
});
|
67782
68115
|
|
67783
68116
|
|
68117
|
+
/***/ }),
|
68118
|
+
|
68119
|
+
/***/ "./src/react/components/list/list-item-content.tsx":
|
68120
|
+
/*!*********************************************************!*\
|
68121
|
+
!*** ./src/react/components/list/list-item-content.tsx ***!
|
68122
|
+
\*********************************************************/
|
68123
|
+
/*! exports provided: ListItemContent */
|
68124
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
68125
|
+
|
68126
|
+
"use strict";
|
68127
|
+
__webpack_require__.r(__webpack_exports__);
|
68128
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListItemContent", function() { return ListItemContent; });
|
68129
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
68130
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
68131
|
+
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../element-factory */ "./src/react/element-factory.tsx");
|
68132
|
+
/* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../reactquestion_element */ "./src/react/reactquestion_element.tsx");
|
68133
|
+
/* harmony import */ var _svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
|
68134
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
68135
|
+
var extendStatics = function (d, b) {
|
68136
|
+
extendStatics = Object.setPrototypeOf ||
|
68137
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
68138
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
68139
|
+
return extendStatics(d, b);
|
68140
|
+
};
|
68141
|
+
return function (d, b) {
|
68142
|
+
if (typeof b !== "function" && b !== null)
|
68143
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
68144
|
+
extendStatics(d, b);
|
68145
|
+
function __() { this.constructor = d; }
|
68146
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
68147
|
+
};
|
68148
|
+
})();
|
68149
|
+
|
68150
|
+
|
68151
|
+
|
68152
|
+
|
68153
|
+
var ListItemContent = /** @class */ (function (_super) {
|
68154
|
+
__extends(ListItemContent, _super);
|
68155
|
+
function ListItemContent() {
|
68156
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
68157
|
+
}
|
68158
|
+
Object.defineProperty(ListItemContent.prototype, "model", {
|
68159
|
+
get: function () {
|
68160
|
+
return this.props.model;
|
68161
|
+
},
|
68162
|
+
enumerable: false,
|
68163
|
+
configurable: true
|
68164
|
+
});
|
68165
|
+
Object.defineProperty(ListItemContent.prototype, "item", {
|
68166
|
+
get: function () {
|
68167
|
+
return this.props.item;
|
68168
|
+
},
|
68169
|
+
enumerable: false,
|
68170
|
+
configurable: true
|
68171
|
+
});
|
68172
|
+
ListItemContent.prototype.getStateElement = function () {
|
68173
|
+
return this.item;
|
68174
|
+
};
|
68175
|
+
ListItemContent.prototype.render = function () {
|
68176
|
+
if (!this.item)
|
68177
|
+
return null;
|
68178
|
+
var content = [];
|
68179
|
+
var text = this.renderLocString(this.item.locTitle, undefined, "locString");
|
68180
|
+
if (this.item.iconName) {
|
68181
|
+
var icon = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { key: "icon", className: this.model.cssClasses.itemIcon, iconName: this.item.iconName, size: this.item.iconSize, "aria-label": this.item.title });
|
68182
|
+
content.push(icon);
|
68183
|
+
content.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { key: "text" }, text));
|
68184
|
+
}
|
68185
|
+
else {
|
68186
|
+
content.push(text);
|
68187
|
+
}
|
68188
|
+
if (this.item.markerIconName) {
|
68189
|
+
var icon = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { key: "marker", className: this.item.cssClasses.itemMarkerIcon, iconName: this.item.markerIconName, size: this.item.markerIconSize });
|
68190
|
+
content.push(icon);
|
68191
|
+
}
|
68192
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, content);
|
68193
|
+
};
|
68194
|
+
return ListItemContent;
|
68195
|
+
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"]));
|
68196
|
+
|
68197
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.registerElement("sv-list-item-content", function (props) {
|
68198
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ListItemContent, props);
|
68199
|
+
});
|
68200
|
+
|
68201
|
+
|
68202
|
+
/***/ }),
|
68203
|
+
|
68204
|
+
/***/ "./src/react/components/list/list-item-group.tsx":
|
68205
|
+
/*!*******************************************************!*\
|
68206
|
+
!*** ./src/react/components/list/list-item-group.tsx ***!
|
68207
|
+
\*******************************************************/
|
68208
|
+
/*! exports provided: ListItemGroup */
|
68209
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
68210
|
+
|
68211
|
+
"use strict";
|
68212
|
+
__webpack_require__.r(__webpack_exports__);
|
68213
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListItemGroup", function() { return ListItemGroup; });
|
68214
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
68215
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
68216
|
+
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../element-factory */ "./src/react/element-factory.tsx");
|
68217
|
+
/* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../reactquestion_element */ "./src/react/reactquestion_element.tsx");
|
68218
|
+
/* harmony import */ var _popup_popup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../popup/popup */ "./src/react/components/popup/popup.tsx");
|
68219
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
68220
|
+
var extendStatics = function (d, b) {
|
68221
|
+
extendStatics = Object.setPrototypeOf ||
|
68222
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
68223
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
68224
|
+
return extendStatics(d, b);
|
68225
|
+
};
|
68226
|
+
return function (d, b) {
|
68227
|
+
if (typeof b !== "function" && b !== null)
|
68228
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
68229
|
+
extendStatics(d, b);
|
68230
|
+
function __() { this.constructor = d; }
|
68231
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
68232
|
+
};
|
68233
|
+
})();
|
68234
|
+
|
68235
|
+
|
68236
|
+
|
68237
|
+
|
68238
|
+
var ListItemGroup = /** @class */ (function (_super) {
|
68239
|
+
__extends(ListItemGroup, _super);
|
68240
|
+
function ListItemGroup() {
|
68241
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
68242
|
+
}
|
68243
|
+
Object.defineProperty(ListItemGroup.prototype, "model", {
|
68244
|
+
get: function () {
|
68245
|
+
return this.props.model;
|
68246
|
+
},
|
68247
|
+
enumerable: false,
|
68248
|
+
configurable: true
|
68249
|
+
});
|
68250
|
+
Object.defineProperty(ListItemGroup.prototype, "item", {
|
68251
|
+
get: function () {
|
68252
|
+
return this.props.item;
|
68253
|
+
},
|
68254
|
+
enumerable: false,
|
68255
|
+
configurable: true
|
68256
|
+
});
|
68257
|
+
ListItemGroup.prototype.getStateElement = function () {
|
68258
|
+
return this.item;
|
68259
|
+
};
|
68260
|
+
ListItemGroup.prototype.render = function () {
|
68261
|
+
var _a;
|
68262
|
+
if (!this.item)
|
68263
|
+
return null;
|
68264
|
+
var newElement = _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement("sv-list-item-content", { item: this.item, key: "content" + this.item.id, model: this.model });
|
68265
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null,
|
68266
|
+
newElement,
|
68267
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_popup_popup__WEBPACK_IMPORTED_MODULE_3__["Popup"], { model: (_a = this.item) === null || _a === void 0 ? void 0 : _a.popupModel }));
|
68268
|
+
};
|
68269
|
+
return ListItemGroup;
|
68270
|
+
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"]));
|
68271
|
+
|
68272
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.registerElement("sv-list-item-group", function (props) {
|
68273
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ListItemGroup, props);
|
68274
|
+
});
|
68275
|
+
|
68276
|
+
|
67784
68277
|
/***/ }),
|
67785
68278
|
|
67786
68279
|
/***/ "./src/react/components/list/list-item.tsx":
|
@@ -67798,7 +68291,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
67798
68291
|
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../element-factory */ "./src/react/element-factory.tsx");
|
67799
68292
|
/* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../reactquestion_element */ "./src/react/reactquestion_element.tsx");
|
67800
68293
|
/* harmony import */ var _reactSurvey__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../reactSurvey */ "./src/react/reactSurvey.tsx");
|
67801
|
-
/* harmony import */ var _svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
|
67802
68294
|
var __extends = (undefined && undefined.__extends) || (function () {
|
67803
68295
|
var extendStatics = function (d, b) {
|
67804
68296
|
extendStatics = Object.setPrototypeOf ||
|
@@ -67818,7 +68310,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
67818
68310
|
|
67819
68311
|
|
67820
68312
|
|
67821
|
-
|
67822
68313
|
var ListItem = /** @class */ (function (_super) {
|
67823
68314
|
__extends(ListItem, _super);
|
67824
68315
|
function ListItem() {
|
@@ -67853,25 +68344,9 @@ var ListItem = /** @class */ (function (_super) {
|
|
67853
68344
|
paddingInlineStart: this.model.getItemIndent(this.item)
|
67854
68345
|
};
|
67855
68346
|
var className = this.model.getItemClass(this.item);
|
67856
|
-
var
|
67857
|
-
|
67858
|
-
|
67859
|
-
if (this.item.iconName) {
|
67860
|
-
var icon = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__["SvgIcon"], { key: 1, className: this.model.cssClasses.itemIcon, iconName: this.item.iconName, size: this.item.iconSize, "aria-label": this.item.title });
|
67861
|
-
content.push(icon);
|
67862
|
-
content.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { key: 2 }, text));
|
67863
|
-
}
|
67864
|
-
else {
|
67865
|
-
content.push(text);
|
67866
|
-
}
|
67867
|
-
}
|
67868
|
-
else {
|
67869
|
-
var newElement = _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement(this.item.component, { item: this.item, key: this.item.id });
|
67870
|
-
if (!!newElement) {
|
67871
|
-
content.push(newElement);
|
67872
|
-
}
|
67873
|
-
}
|
67874
|
-
var contentWrap = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: contentWrapStyle, className: this.model.cssClasses.itemBody, title: this.item.locTitle.calculatedText }, content);
|
68347
|
+
var itemContent = this.item.component || "sv-list-item-content";
|
68348
|
+
var newElement = _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement(itemContent, { item: this.item, key: this.item.id, model: this.model });
|
68349
|
+
var contentWrap = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: contentWrapStyle, className: this.model.cssClasses.itemBody, title: this.item.locTitle.calculatedText, onMouseOver: function (event) { _this.model.onItemHover(_this.item); }, onMouseLeave: function (event) { _this.model.onItemLeave(_this.item); } }, newElement);
|
67875
68350
|
var separator = this.item.needSeparator ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.cssClasses.itemSeparator }) : null;
|
67876
68351
|
var isVisible = this.model.isItemVisible(this.item);
|
67877
68352
|
var style = {
|
@@ -68841,7 +69316,7 @@ var Popup = /** @class */ (function (_super) {
|
|
68841
69316
|
};
|
68842
69317
|
Popup.prototype.setTargetElement = function () {
|
68843
69318
|
var container = this.containerRef.current;
|
68844
|
-
this.popup.setComponentElement(container, this.props.getTarget ? this.props.getTarget(container) : undefined);
|
69319
|
+
this.popup.setComponentElement(container, this.props.getTarget ? this.props.getTarget(container) : undefined, this.props.getArea ? this.props.getArea(container) : undefined);
|
68845
69320
|
};
|
68846
69321
|
Popup.prototype.componentDidMount = function () {
|
68847
69322
|
_super.prototype.componentDidMount.call(this);
|
@@ -69170,7 +69645,7 @@ var RatingItemSmiley = /** @class */ (function (_super) {
|
|
69170
69645
|
RatingItemSmiley.prototype.render = function () {
|
69171
69646
|
var _this = this;
|
69172
69647
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, style: this.question.getItemStyle(this.item.itemValue, this.item.highlight), className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); } },
|
69173
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.
|
69648
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
69174
69649
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { size: "auto", iconName: this.question.getItemSmileyIconName(this.item.itemValue), title: this.item.text })));
|
69175
69650
|
};
|
69176
69651
|
return RatingItemSmiley;
|
@@ -69225,7 +69700,7 @@ var RatingItemStar = /** @class */ (function (_super) {
|
|
69225
69700
|
RatingItemStar.prototype.render = function () {
|
69226
69701
|
var _this = this;
|
69227
69702
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); } },
|
69228
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.
|
69703
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
69229
69704
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon, title: this.item.text }),
|
69230
69705
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt, title: this.item.text })));
|
69231
69706
|
};
|
@@ -69317,7 +69792,7 @@ var RatingItem = /** @class */ (function (_super) {
|
|
69317
69792
|
RatingItem.prototype.render = function () {
|
69318
69793
|
var itemText = this.renderLocString(this.item.locText);
|
69319
69794
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
|
69320
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.
|
69795
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
69321
69796
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.itemText }, itemText)));
|
69322
69797
|
};
|
69323
69798
|
RatingItem.prototype.componentDidMount = function () {
|
@@ -70089,7 +70564,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
70089
70564
|
var text = (this.question.selectedItemLocText) ? this.renderLocString(this.question.selectedItemLocText) : "";
|
70090
70565
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
70091
70566
|
// @ts-ignore
|
70092
|
-
selectElement = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass()
|
70567
|
+
selectElement = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, tabIndex: this.question.isDisabledAttr ? undefined : 0, className: this.question.getControlClass() },
|
70093
70568
|
text,
|
70094
70569
|
this.renderReadOnlyElement());
|
70095
70570
|
}
|
@@ -70123,7 +70598,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
70123
70598
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
|
70124
70599
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
70125
70600
|
// @ts-ignore
|
70126
|
-
disabled: this.question.
|
70601
|
+
disabled: this.question.isDisabledAttr, 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-errormessage": this.question.ariaErrormessage, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
|
70127
70602
|
dropdownListModel.showHintPrefix ?
|
70128
70603
|
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintPrefix },
|
70129
70604
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringPrefix))) : null,
|
@@ -70133,7 +70608,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
70133
70608
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
|
70134
70609
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringSuffix))) : null,
|
70135
70610
|
valueElement,
|
70136
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: dropdownListModel.filterReadOnly ? true : undefined, tabIndex: dropdownListModel.noTabIndex ? undefined : -1, disabled: this.question.
|
70611
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: dropdownListModel.filterReadOnly ? true : undefined, tabIndex: dropdownListModel.noTabIndex ? undefined : -1, disabled: this.question.isDisabledAttr, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
|
70137
70612
|
this.createClearButton()));
|
70138
70613
|
};
|
70139
70614
|
SurveyQuestionDropdownBase.prototype.createClearButton = function () {
|
@@ -70979,6 +71454,8 @@ var SurveyQuestionImagePickerItem = /** @class */ (function (_super) {
|
|
70979
71454
|
configurable: true
|
70980
71455
|
});
|
70981
71456
|
SurveyQuestionImagePickerItem.prototype.handleOnChange = function (event) {
|
71457
|
+
if (this.question.isReadOnlyAttr)
|
71458
|
+
return;
|
70982
71459
|
if (this.question.multiSelect) {
|
70983
71460
|
if (event.target.checked) {
|
70984
71461
|
this.question.value = this.question.value.concat(event.target.value);
|
@@ -71025,7 +71502,7 @@ var SurveyQuestionImagePickerItem = /** @class */ (function (_super) {
|
|
71025
71502
|
}
|
71026
71503
|
var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass },
|
71027
71504
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: cssClasses.label },
|
71028
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: cssClasses.itemControl, id: this.question.getItemId(item), type: this.question.inputType, name: this.question.questionName, checked: isChecked, value: item.value, disabled: !this.question.getItemEnabled(item), onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
71505
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: cssClasses.itemControl, id: this.question.getItemId(item), type: this.question.inputType, name: this.question.questionName, checked: isChecked, value: item.value, disabled: !this.question.getItemEnabled(item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
71029
71506
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.itemDecorator },
|
71030
71507
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.imageContainer },
|
71031
71508
|
!!this.question.cssClasses.checkedItemDecorator ?
|
@@ -73084,7 +73561,7 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
|
|
73084
73561
|
var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
|
73085
73562
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
|
73086
73563
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: labelClass },
|
73087
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", role: "option", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), checked: isChecked, onChange: this.handleOnChange }),
|
73564
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", role: "option", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange }),
|
73088
73565
|
this.cssClasses.materialDecorator ?
|
73089
73566
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
|
73090
73567
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
|
@@ -73169,7 +73646,7 @@ var SurveyQuestionComment = /** @class */ (function (_super) {
|
|
73169
73646
|
}
|
73170
73647
|
var counter = !!this.question.getMaxLength() ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_character_counter__WEBPACK_IMPORTED_MODULE_4__["CharacterCounterComponent"], { counter: this.question.characterCounter, remainingCharacterCounter: this.question.cssClasses.remainingCharacterCounter })) : null;
|
73171
73648
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
|
73172
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.question.inputId, className: this.question.className, disabled: this.question.
|
73649
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.question.inputId, className: this.question.className, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, ref: function (textarea) { return (_this.setControl(textarea)); }, maxLength: this.question.getMaxLength(), placeholder: placeholder, onBlur: onBlur, onInput: onInput, onKeyDown: function (event) { _this.question.onKeyDown(event); }, cols: this.question.cols, rows: this.question.rows, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage, style: { resize: this.question.resizeStyle } }),
|
73173
73650
|
counter));
|
73174
73651
|
};
|
73175
73652
|
return SurveyQuestionComment;
|
@@ -73469,6 +73946,9 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
73469
73946
|
};
|
73470
73947
|
SurveyElementBase.prototype.componentDidUpdate = function (prevProps, prevState) {
|
73471
73948
|
this.makeBaseElementsReact();
|
73949
|
+
this.getStateElements().forEach(function (el) {
|
73950
|
+
el.afterRerender();
|
73951
|
+
});
|
73472
73952
|
};
|
73473
73953
|
SurveyElementBase.prototype.allowComponentUpdate = function () {
|
73474
73954
|
this._allowComponentUpdate = true;
|
@@ -73540,12 +74020,14 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
73540
74020
|
SurveyElementBase.prototype.makeBaseElementsReact = function () {
|
73541
74021
|
var els = this.getStateElements();
|
73542
74022
|
for (var i = 0; i < els.length; i++) {
|
74023
|
+
els[i].enableOnElementRenderedEvent();
|
73543
74024
|
this.makeBaseElementReact(els[i]);
|
73544
74025
|
}
|
73545
74026
|
};
|
73546
74027
|
SurveyElementBase.prototype.unMakeBaseElementsReact = function () {
|
73547
74028
|
var els = this.getStateElements();
|
73548
74029
|
for (var i = 0; i < els.length; i++) {
|
74030
|
+
els[i].disableOnElementRenderedEvent();
|
73549
74031
|
this.unMakeBaseElementReact(els[i]);
|
73550
74032
|
}
|
73551
74033
|
};
|
@@ -73997,9 +74479,19 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
|
|
73997
74479
|
var clearButton = this.question.showRemoveButton ? this.renderClearButton(this.question.cssClasses.removeButton) : null;
|
73998
74480
|
var clearButtonBottom = this.question.showRemoveButtonBottom ? this.renderClearButton(this.question.cssClasses.removeButtonBottom) : null;
|
73999
74481
|
var fileNavigator = this.question.fileNavigatorVisible ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_1__["SurveyActionBar"], { model: this.question.fileNavigator })) : null;
|
74000
|
-
var fileInput
|
74001
|
-
|
74002
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "file",
|
74482
|
+
var fileInput;
|
74483
|
+
if (this.question.isReadOnlyAttr) {
|
74484
|
+
fileInput = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { readOnly: true, type: "file", 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" }, multiple: this.question.allowMultiple, placeholder: this.question.title, accept: this.question.acceptedTypes });
|
74485
|
+
}
|
74486
|
+
else if (this.question.isDisabledAttr) {
|
74487
|
+
fileInput = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { disabled: true, type: "file", 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" }, multiple: this.question.allowMultiple, placeholder: this.question.title, accept: this.question.acceptedTypes });
|
74488
|
+
}
|
74489
|
+
else if (this.question.hasFileUI) {
|
74490
|
+
fileInput = 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" }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, multiple: this.question.allowMultiple, title: this.question.inputTitle, accept: this.question.acceptedTypes, capture: this.question.renderCapture });
|
74491
|
+
}
|
74492
|
+
else {
|
74493
|
+
fileInput = null;
|
74494
|
+
}
|
74003
74495
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.fileRootCss },
|
74004
74496
|
fileInput,
|
74005
74497
|
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 },
|
@@ -74391,7 +74883,7 @@ var SurveyQuestionMatrixCell = /** @class */ (function (_super) {
|
|
74391
74883
|
mobileSpan));
|
74392
74884
|
};
|
74393
74885
|
SurveyQuestionMatrixCell.prototype.renderInput = function (inputId, isChecked) {
|
74394
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.row.
|
74886
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.row.isDisabledAttr, readOnly: this.row.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row.locText.renderedHtml, this.column.locText.renderedHtml), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }));
|
74395
74887
|
};
|
74396
74888
|
return SurveyQuestionMatrixCell;
|
74397
74889
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
@@ -74502,71 +74994,39 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
74502
74994
|
|
74503
74995
|
|
74504
74996
|
|
74505
|
-
var
|
74506
|
-
__extends(
|
74507
|
-
function
|
74508
|
-
|
74509
|
-
//Create rendered table in contructor and not on rendering
|
74510
|
-
var table = _this.question.renderedTable;
|
74511
|
-
_this.state = _this.getState();
|
74512
|
-
return _this;
|
74997
|
+
var SurveyQuestionMatrixTable = /** @class */ (function (_super) {
|
74998
|
+
__extends(SurveyQuestionMatrixTable, _super);
|
74999
|
+
function SurveyQuestionMatrixTable() {
|
75000
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
74513
75001
|
}
|
74514
|
-
Object.defineProperty(
|
75002
|
+
Object.defineProperty(SurveyQuestionMatrixTable.prototype, "question", {
|
74515
75003
|
get: function () {
|
74516
|
-
return this.
|
75004
|
+
return this.props.question;
|
74517
75005
|
},
|
74518
75006
|
enumerable: false,
|
74519
75007
|
configurable: true
|
74520
75008
|
});
|
74521
|
-
|
74522
|
-
|
74523
|
-
|
74524
|
-
|
74525
|
-
|
74526
|
-
|
74527
|
-
|
74528
|
-
|
74529
|
-
|
74530
|
-
|
74531
|
-
|
74532
|
-
|
74533
|
-
|
74534
|
-
|
74535
|
-
|
74536
|
-
this.
|
74537
|
-
_this.question.renderedTable.renderedRowsChangedCallback = function () {
|
74538
|
-
_this.updateStateOnCallback();
|
74539
|
-
};
|
74540
|
-
_this.updateStateOnCallback();
|
74541
|
-
};
|
74542
|
-
this.question.renderedTable.renderedRowsChangedCallback = function () {
|
74543
|
-
_this.updateStateOnCallback();
|
74544
|
-
};
|
74545
|
-
};
|
74546
|
-
SurveyQuestionMatrixDropdownBase.prototype.componentWillUnmount = function () {
|
74547
|
-
_super.prototype.componentWillUnmount.call(this);
|
74548
|
-
this.question.visibleRowsChangedCallback = function () { };
|
74549
|
-
this.question.onRenderedTableResetCallback = function () { };
|
74550
|
-
this.question.renderedTable.renderedRowsChangedCallback = function () { };
|
75009
|
+
Object.defineProperty(SurveyQuestionMatrixTable.prototype, "creator", {
|
75010
|
+
get: function () {
|
75011
|
+
return this.props.creator;
|
75012
|
+
},
|
75013
|
+
enumerable: false,
|
75014
|
+
configurable: true
|
75015
|
+
});
|
75016
|
+
Object.defineProperty(SurveyQuestionMatrixTable.prototype, "table", {
|
75017
|
+
get: function () {
|
75018
|
+
return this.question.renderedTable;
|
75019
|
+
},
|
75020
|
+
enumerable: false,
|
75021
|
+
configurable: true
|
75022
|
+
});
|
75023
|
+
SurveyQuestionMatrixTable.prototype.getStateElement = function () {
|
75024
|
+
return this.table;
|
74551
75025
|
};
|
74552
|
-
|
74553
|
-
return this.
|
75026
|
+
SurveyQuestionMatrixTable.prototype.wrapCell = function (cell, element, reason) {
|
75027
|
+
return this.props.wrapCell(cell, element, reason);
|
74554
75028
|
};
|
74555
|
-
|
74556
|
-
var _this = this;
|
74557
|
-
var header = this.renderHeader();
|
74558
|
-
var footers = this.renderFooter();
|
74559
|
-
var rows = this.renderRows();
|
74560
|
-
var divStyle = this.question.showHorizontalScroll
|
74561
|
-
? { overflowX: "scroll" }
|
74562
|
-
: {};
|
74563
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: divStyle, className: this.question.cssClasses.tableWrapper, ref: function (root) { return (_this.setControl(root)); } },
|
74564
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("table", { className: this.question.getTableCss() },
|
74565
|
-
header,
|
74566
|
-
rows,
|
74567
|
-
footers)));
|
74568
|
-
};
|
74569
|
-
SurveyQuestionMatrixDropdownBase.prototype.renderHeader = function () {
|
75029
|
+
SurveyQuestionMatrixTable.prototype.renderHeader = function () {
|
74570
75030
|
var table = this.question.renderedTable;
|
74571
75031
|
if (!table.showHeader)
|
74572
75032
|
return null;
|
@@ -74594,14 +75054,14 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
|
|
74594
75054
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("thead", null,
|
74595
75055
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tr", null, headers)));
|
74596
75056
|
};
|
74597
|
-
|
75057
|
+
SurveyQuestionMatrixTable.prototype.renderFooter = function () {
|
74598
75058
|
var table = this.question.renderedTable;
|
74599
75059
|
if (!table.showFooter)
|
74600
75060
|
return null;
|
74601
75061
|
var row = this.renderRow("footer", table.footerRow, this.question.cssClasses, "row-footer");
|
74602
75062
|
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tfoot", null, row);
|
74603
75063
|
};
|
74604
|
-
|
75064
|
+
SurveyQuestionMatrixTable.prototype.renderRows = function () {
|
74605
75065
|
var cssClasses = this.question.cssClasses;
|
74606
75066
|
var rows = [];
|
74607
75067
|
var renderedRows = this.question.renderedTable.renderedRows;
|
@@ -74610,7 +75070,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
|
|
74610
75070
|
}
|
74611
75071
|
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tbody", null, rows);
|
74612
75072
|
};
|
74613
|
-
|
75073
|
+
SurveyQuestionMatrixTable.prototype.renderRow = function (keyValue, row, cssClasses, reason) {
|
74614
75074
|
var matrixrow = [];
|
74615
75075
|
var cells = row.cells;
|
74616
75076
|
for (var i = 0; i < cells.length; i++) {
|
@@ -74619,7 +75079,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
|
|
74619
75079
|
var key = "row" + keyValue;
|
74620
75080
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], { key: key }, (reason == "row-footer") ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tr", null, matrixrow) : react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_matrix_row__WEBPACK_IMPORTED_MODULE_7__["MatrixRow"], { model: row, parentMatrix: this.question }, matrixrow)));
|
74621
75081
|
};
|
74622
|
-
|
75082
|
+
SurveyQuestionMatrixTable.prototype.renderCell = function (cell, index, cssClasses, reason) {
|
74623
75083
|
var key = "cell" + index;
|
74624
75084
|
if (cell.hasQuestion) {
|
74625
75085
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixDropdownCell, { key: key, cssClasses: cssClasses, cell: cell, creator: this.creator, reason: reason }));
|
@@ -74639,7 +75099,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
|
|
74639
75099
|
}
|
74640
75100
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { className: cell.className, key: key, style: cellStyle, colSpan: cell.colSpans, "data-responsive-title": cell.headers, title: cell.getTitle() }, cellContent));
|
74641
75101
|
};
|
74642
|
-
|
75102
|
+
SurveyQuestionMatrixTable.prototype.renderCellContent = function (cell, reason, cssClasses) {
|
74643
75103
|
var cellContent = null;
|
74644
75104
|
var cellStyle = null;
|
74645
75105
|
if (!!cell.width || !!cell.minWidth) {
|
@@ -74681,6 +75141,64 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
|
|
74681
75141
|
var readyCell = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, cellContent));
|
74682
75142
|
return this.wrapCell(cell, readyCell, reason);
|
74683
75143
|
};
|
75144
|
+
SurveyQuestionMatrixTable.prototype.renderElement = function () {
|
75145
|
+
var header = this.renderHeader();
|
75146
|
+
var footers = this.renderFooter();
|
75147
|
+
var rows = this.renderRows();
|
75148
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("table", { className: this.question.getTableCss() },
|
75149
|
+
header,
|
75150
|
+
rows,
|
75151
|
+
footers));
|
75152
|
+
};
|
75153
|
+
return SurveyQuestionMatrixTable;
|
75154
|
+
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElementBase"]));
|
75155
|
+
var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
|
75156
|
+
__extends(SurveyQuestionMatrixDropdownBase, _super);
|
75157
|
+
function SurveyQuestionMatrixDropdownBase(props) {
|
75158
|
+
var _this = _super.call(this, props) || this;
|
75159
|
+
//Create rendered table in contructor and not on rendering
|
75160
|
+
var table = _this.question.renderedTable;
|
75161
|
+
_this.state = _this.getState();
|
75162
|
+
return _this;
|
75163
|
+
}
|
75164
|
+
Object.defineProperty(SurveyQuestionMatrixDropdownBase.prototype, "question", {
|
75165
|
+
get: function () {
|
75166
|
+
return this.questionBase;
|
75167
|
+
},
|
75168
|
+
enumerable: false,
|
75169
|
+
configurable: true
|
75170
|
+
});
|
75171
|
+
SurveyQuestionMatrixDropdownBase.prototype.getState = function (prevState) {
|
75172
|
+
if (prevState === void 0) { prevState = null; }
|
75173
|
+
return { rowCounter: !prevState ? 0 : prevState.rowCounter + 1 };
|
75174
|
+
};
|
75175
|
+
SurveyQuestionMatrixDropdownBase.prototype.updateStateOnCallback = function () {
|
75176
|
+
if (this.isRendering)
|
75177
|
+
return;
|
75178
|
+
this.setState(this.getState(this.state));
|
75179
|
+
};
|
75180
|
+
SurveyQuestionMatrixDropdownBase.prototype.componentDidMount = function () {
|
75181
|
+
var _this = this;
|
75182
|
+
_super.prototype.componentDidMount.call(this);
|
75183
|
+
this.question.onRenderedTableResetCallback = function () {
|
75184
|
+
_this.updateStateOnCallback();
|
75185
|
+
};
|
75186
|
+
};
|
75187
|
+
SurveyQuestionMatrixDropdownBase.prototype.componentWillUnmount = function () {
|
75188
|
+
_super.prototype.componentWillUnmount.call(this);
|
75189
|
+
this.question.onRenderedTableResetCallback = function () { };
|
75190
|
+
};
|
75191
|
+
SurveyQuestionMatrixDropdownBase.prototype.renderElement = function () {
|
75192
|
+
return this.renderTableDiv();
|
75193
|
+
};
|
75194
|
+
SurveyQuestionMatrixDropdownBase.prototype.renderTableDiv = function () {
|
75195
|
+
var _this = this;
|
75196
|
+
var divStyle = this.question.showHorizontalScroll
|
75197
|
+
? { overflowX: "scroll" }
|
75198
|
+
: {};
|
75199
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: divStyle, className: this.question.cssClasses.tableWrapper, ref: function (root) { return (_this.setControl(root)); } },
|
75200
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixTable, { question: this.question, creator: this.creator, wrapCell: function (cell, element, reason) { return _this.wrapCell(cell, element, reason); } })));
|
75201
|
+
};
|
74684
75202
|
return SurveyQuestionMatrixDropdownBase;
|
74685
75203
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["SurveyQuestionElementBase"]));
|
74686
75204
|
|
@@ -75555,7 +76073,7 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
|
|
75555
76073
|
var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: controlLabelClass }, this.renderLocString(this.item.locText, this.textStyle)) : null;
|
75556
76074
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
|
75557
76075
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { onMouseDown: this.handleOnMouseDown, className: labelClass },
|
75558
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { "aria-errormessage": this.question.ariaErrormessage, className: this.cssClasses.itemControl, id: this.question.getItemId(this.item), type: "radio", name: this.question.questionName, checked: this.isChecked, value: this.item.value, disabled: !this.question.getItemEnabled(this.item), onChange: this.handleOnChange }),
|
76076
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { "aria-errormessage": this.question.ariaErrormessage, className: this.cssClasses.itemControl, id: this.question.getItemId(this.item), type: "radio", name: this.question.questionName, checked: this.isChecked, value: this.item.value, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange }),
|
75559
76077
|
this.cssClasses.materialDecorator ?
|
75560
76078
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
|
75561
76079
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
|
@@ -75581,18 +76099,20 @@ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__["ReactQuestionFactory"].Inst
|
|
75581
76099
|
/*!*********************************************!*\
|
75582
76100
|
!*** ./src/react/reactquestion_ranking.tsx ***!
|
75583
76101
|
\*********************************************/
|
75584
|
-
/*! exports provided: SurveyQuestionRanking, SurveyQuestionRankingItem */
|
76102
|
+
/*! exports provided: SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent */
|
75585
76103
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
75586
76104
|
|
75587
76105
|
"use strict";
|
75588
76106
|
__webpack_require__.r(__webpack_exports__);
|
75589
76107
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRanking", function() { return SurveyQuestionRanking; });
|
75590
76108
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRankingItem", function() { return SurveyQuestionRankingItem; });
|
76109
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRankingItemContent", function() { return SurveyQuestionRankingItemContent; });
|
75591
76110
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
75592
76111
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
75593
76112
|
/* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
|
75594
76113
|
/* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/react/reactquestion_factory.tsx");
|
75595
76114
|
/* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactsurveymodel */ "./src/react/reactsurveymodel.tsx");
|
76115
|
+
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
|
75596
76116
|
var __extends = (undefined && undefined.__extends) || (function () {
|
75597
76117
|
var extendStatics = function (d, b) {
|
75598
76118
|
extendStatics = Object.setPrototypeOf ||
|
@@ -75612,6 +76132,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
75612
76132
|
|
75613
76133
|
|
75614
76134
|
|
76135
|
+
|
75615
76136
|
var SurveyQuestionRanking = /** @class */ (function (_super) {
|
75616
76137
|
__extends(SurveyQuestionRanking, _super);
|
75617
76138
|
function SurveyQuestionRanking() {
|
@@ -75633,15 +76154,15 @@ var SurveyQuestionRanking = /** @class */ (function (_super) {
|
|
75633
76154
|
var unrankedItem = true;
|
75634
76155
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.rootClass, ref: function (root) { return (_this.setControl(root)); } },
|
75635
76156
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getContainerClasses("from"), "data-ranking": "from-container" },
|
75636
|
-
this.getItems(this.question.
|
75637
|
-
this.question.
|
76157
|
+
this.getItems(this.question.renderedUnRankingChoices, unrankedItem),
|
76158
|
+
this.question.renderedUnRankingChoices.length === 0 ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containerPlaceholder },
|
75638
76159
|
" ",
|
75639
76160
|
this.renderLocString(this.question.locSelectToRankEmptyRankedAreaText),
|
75640
76161
|
" ") : null),
|
75641
76162
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containersDivider }),
|
75642
76163
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getContainerClasses("to"), "data-ranking": "to-container" },
|
75643
76164
|
this.getItems(),
|
75644
|
-
this.question.
|
76165
|
+
this.question.renderedRankingChoices.length === 0 ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containerPlaceholder },
|
75645
76166
|
" ",
|
75646
76167
|
this.renderLocString(this.question.locSelectToRankEmptyUnrankedAreaText),
|
75647
76168
|
" ") : null)));
|
@@ -75649,7 +76170,7 @@ var SurveyQuestionRanking = /** @class */ (function (_super) {
|
|
75649
76170
|
};
|
75650
76171
|
SurveyQuestionRanking.prototype.getItems = function (choices, unrankedItem) {
|
75651
76172
|
var _this = this;
|
75652
|
-
if (choices === void 0) { choices = this.question.
|
76173
|
+
if (choices === void 0) { choices = this.question.renderedRankingChoices; }
|
75653
76174
|
var items = [];
|
75654
76175
|
var _loop_1 = function (i) {
|
75655
76176
|
var item = choices[i];
|
@@ -75782,6 +76303,7 @@ var SurveyQuestionRankingItem = /** @class */ (function (_super) {
|
|
75782
76303
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.dashSvgIcon })));
|
75783
76304
|
};
|
75784
76305
|
SurveyQuestionRankingItem.prototype.renderElement = function () {
|
76306
|
+
var itemContentComponent = _element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.createElement(this.question.itemContentComponent, { item: this.item, cssClasses: this.cssClasses });
|
75785
76307
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { tabIndex: this.itemTabIndex, className: this.itemClass, onKeyDown: this.handleKeydown, onPointerDown: this.handlePointerDown, onPointerUp: this.handlePointerUp, "data-sv-drop-target-ranking-item": this.index },
|
75786
76308
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { tabIndex: -1, style: { outline: "none" } },
|
75787
76309
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.itemGhostNode }),
|
@@ -75792,11 +76314,39 @@ var SurveyQuestionRankingItem = /** @class */ (function (_super) {
|
|
75792
76314
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.question.getIconFocusCss() },
|
75793
76315
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.arrowsSvgIcon }))),
|
75794
76316
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getItemIndexClasses(this.item) }, (!this.unrankedItem && this.indexText) ? this.indexText : this.renderEmptyIcon()),
|
75795
|
-
|
76317
|
+
itemContentComponent))));
|
75796
76318
|
};
|
75797
76319
|
return SurveyQuestionRankingItem;
|
75798
76320
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
75799
76321
|
|
76322
|
+
var SurveyQuestionRankingItemContent = /** @class */ (function (_super) {
|
76323
|
+
__extends(SurveyQuestionRankingItemContent, _super);
|
76324
|
+
function SurveyQuestionRankingItemContent() {
|
76325
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
76326
|
+
}
|
76327
|
+
Object.defineProperty(SurveyQuestionRankingItemContent.prototype, "item", {
|
76328
|
+
get: function () {
|
76329
|
+
return this.props.item;
|
76330
|
+
},
|
76331
|
+
enumerable: false,
|
76332
|
+
configurable: true
|
76333
|
+
});
|
76334
|
+
Object.defineProperty(SurveyQuestionRankingItemContent.prototype, "cssClasses", {
|
76335
|
+
get: function () {
|
76336
|
+
return this.props.cssClasses;
|
76337
|
+
},
|
76338
|
+
enumerable: false,
|
76339
|
+
configurable: true
|
76340
|
+
});
|
76341
|
+
SurveyQuestionRankingItemContent.prototype.renderElement = function () {
|
76342
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.controlLabel }, _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElementBase"].renderLocString(this.item.locText));
|
76343
|
+
};
|
76344
|
+
return SurveyQuestionRankingItemContent;
|
76345
|
+
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
76346
|
+
|
76347
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.registerElement("sv-ranking-item-content", function (props) {
|
76348
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionRankingItemContent, props);
|
76349
|
+
});
|
75800
76350
|
_reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__["ReactQuestionFactory"].Instance.registerQuestion("ranking", function (props) {
|
75801
76351
|
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionRanking, props);
|
75802
76352
|
});
|
@@ -76027,7 +76577,9 @@ var SurveyQuestionText = /** @class */ (function (_super) {
|
|
76027
76577
|
}
|
76028
76578
|
var counter = !!this.question.getMaxLength() ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_character_counter__WEBPACK_IMPORTED_MODULE_3__["CharacterCounterComponent"], { counter: this.question.characterCounter, remainingCharacterCounter: this.question.cssClasses.remainingCharacterCounter })) : null;
|
76029
76579
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
|
76030
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: this.question.inputId,
|
76580
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: this.question.inputId,
|
76581
|
+
// disabled={this.isDisplayMode}
|
76582
|
+
disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: inputClass, type: this.question.inputType,
|
76031
76583
|
//ref={this.controlRef}
|
76032
76584
|
ref: function (input) { return (_this.setControl(input)); }, style: this.question.inputStyle, maxLength: this.question.getMaxLength(), min: this.question.renderedMin, max: this.question.renderedMax, step: this.question.renderedStep, size: this.question.inputSize, placeholder: placeholder, list: this.question.dataListId, autoComplete: this.question.autocomplete, onBlur: this.question.onBlur, onFocus: this.question.onFocus, onChange: this.question.onChange, onKeyUp: this.question.onKeyUp, onKeyDown: this.question.onKeyDown, onCompositionUpdate: function (event) { return _this.question.onCompositionUpdate(event.nativeEvent); }, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }),
|
76033
76585
|
counter));
|
@@ -78366,12 +78918,12 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
78366
78918
|
}
|
78367
78919
|
return info;
|
78368
78920
|
};
|
78369
|
-
SurveyElement.ScrollElementToTop = function (elementId, scrollIfVisible) {
|
78921
|
+
SurveyElement.ScrollElementToTop = function (elementId, scrollIfVisible, scrollIntoViewOptions) {
|
78370
78922
|
var root = _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root;
|
78371
78923
|
if (!elementId || typeof root === "undefined")
|
78372
78924
|
return false;
|
78373
78925
|
var el = root.getElementById(elementId);
|
78374
|
-
return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible);
|
78926
|
+
return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible, scrollIntoViewOptions);
|
78375
78927
|
};
|
78376
78928
|
SurveyElement.ScrollElementToViewCore = function (el, checkLeft, scrollIfVisible, scrollIntoViewOptions) {
|
78377
78929
|
if (!el || !el.scrollIntoView)
|
@@ -79462,6 +80014,8 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
79462
80014
|
enumerable: false,
|
79463
80015
|
configurable: true
|
79464
80016
|
});
|
80017
|
+
SurveyElement.prototype.onElementExpanded = function (elementIsRendered) {
|
80018
|
+
};
|
79465
80019
|
SurveyElement.prototype.getExpandCollapseAnimationOptions = function () {
|
79466
80020
|
var _this = this;
|
79467
80021
|
var beforeRunAnimation = function (el) {
|
@@ -79472,12 +80026,16 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
79472
80026
|
_this.isAnimatingCollapseExpand = false;
|
79473
80027
|
};
|
79474
80028
|
return {
|
80029
|
+
getRerenderEvent: function () { return _this.onElementRerendered; },
|
79475
80030
|
getEnterOptions: function () {
|
79476
80031
|
var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
|
79477
80032
|
return {
|
79478
80033
|
cssClass: cssClasses.contentFadeIn,
|
79479
80034
|
onBeforeRunAnimation: beforeRunAnimation,
|
79480
|
-
onAfterRunAnimation:
|
80035
|
+
onAfterRunAnimation: function (el) {
|
80036
|
+
afterRunAnimation(el);
|
80037
|
+
_this.onElementExpanded(true);
|
80038
|
+
},
|
79481
80039
|
};
|
79482
80040
|
},
|
79483
80041
|
getLeaveOptions: function () {
|
@@ -79498,15 +80056,26 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
79498
80056
|
}
|
79499
80057
|
return undefined;
|
79500
80058
|
},
|
79501
|
-
isAnimationEnabled: function () { return _this.
|
80059
|
+
isAnimationEnabled: function () { return _this.isExpandCollapseAnimationEnabled; }
|
79502
80060
|
};
|
79503
80061
|
};
|
80062
|
+
Object.defineProperty(SurveyElement.prototype, "isExpandCollapseAnimationEnabled", {
|
80063
|
+
get: function () {
|
80064
|
+
return this.animationAllowed && !this.isDesignMode;
|
80065
|
+
},
|
80066
|
+
enumerable: false,
|
80067
|
+
configurable: true
|
80068
|
+
});
|
79504
80069
|
Object.defineProperty(SurveyElement.prototype, "renderedIsExpanded", {
|
79505
80070
|
get: function () {
|
79506
80071
|
return !!this._renderedIsExpanded;
|
79507
80072
|
},
|
79508
80073
|
set: function (val) {
|
80074
|
+
var oldValue = this._renderedIsExpanded;
|
79509
80075
|
this.animationCollapsed.sync(val);
|
80076
|
+
if (!this.isExpandCollapseAnimationEnabled && !oldValue && this.renderedIsExpanded) {
|
80077
|
+
this.onElementExpanded(false);
|
80078
|
+
}
|
79510
80079
|
},
|
79511
80080
|
enumerable: false,
|
79512
80081
|
configurable: true
|
@@ -80607,10 +81176,12 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
80607
81176
|
component: "sv-progress-requiredquestions",
|
80608
81177
|
data: _this
|
80609
81178
|
});
|
81179
|
+
var tocModel = new _surveyToc__WEBPACK_IMPORTED_MODULE_24__["TOCModel"](_this);
|
80610
81180
|
_this.addLayoutElement({
|
80611
81181
|
id: "toc-navigation",
|
80612
81182
|
component: "sv-navigation-toc",
|
80613
|
-
data:
|
81183
|
+
data: tocModel,
|
81184
|
+
processResponsiveness: function (width) { return tocModel.updateStickyTOCSize(_this.rootElement); }
|
80614
81185
|
});
|
80615
81186
|
_this.layoutElements.push({
|
80616
81187
|
id: "buttons-navigation",
|
@@ -84015,7 +84586,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
84015
84586
|
}
|
84016
84587
|
var visPages = this.visiblePages;
|
84017
84588
|
var res = true;
|
84018
|
-
var rec = { fireCallback: fireCallback,
|
84589
|
+
var rec = { fireCallback: fireCallback, focusOnFirstError: focusOnFirstError, firstErrorQuestion: null, result: false };
|
84019
84590
|
for (var i = 0; i < visPages.length; i++) {
|
84020
84591
|
if (!visPages[i].validate(fireCallback, focusOnFirstError, rec)) {
|
84021
84592
|
res = false;
|
@@ -85354,7 +85925,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
85354
85925
|
this.onGetMatrixRowActions.fire(this, options);
|
85355
85926
|
return options.actions;
|
85356
85927
|
};
|
85357
|
-
SurveyModel.prototype.scrollElementToTop = function (element, question, page, id, scrollIfVisible) {
|
85928
|
+
SurveyModel.prototype.scrollElementToTop = function (element, question, page, id, scrollIfVisible, scrollIntoViewOptions) {
|
85358
85929
|
var options = {
|
85359
85930
|
element: element,
|
85360
85931
|
question: question,
|
@@ -85364,7 +85935,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
85364
85935
|
};
|
85365
85936
|
this.onScrollingElementToTop.fire(this, options);
|
85366
85937
|
if (!options.cancel) {
|
85367
|
-
_survey_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElement"].ScrollElementToTop(options.elementId, scrollIfVisible);
|
85938
|
+
_survey_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElement"].ScrollElementToTop(options.elementId, scrollIfVisible, scrollIntoViewOptions);
|
85368
85939
|
}
|
85369
85940
|
};
|
85370
85941
|
/**
|
@@ -88816,10 +89387,15 @@ function createTOCListModel(survey, onAction) {
|
|
88816
89387
|
}
|
88817
89388
|
function getTocRootCss(survey, isMobile) {
|
88818
89389
|
if (isMobile === void 0) { isMobile = false; }
|
89390
|
+
var rootCss = TOCModel.RootStyle;
|
88819
89391
|
if (isMobile) {
|
88820
|
-
return "
|
89392
|
+
return rootCss + " " + TOCModel.RootStyle + "--mobile";
|
88821
89393
|
}
|
88822
|
-
|
89394
|
+
rootCss += (" " + TOCModel.RootStyle + "--" + (survey.tocLocation || "").toLowerCase());
|
89395
|
+
if (TOCModel.StickyPosition) {
|
89396
|
+
rootCss += " " + TOCModel.RootStyle + "--sticky";
|
89397
|
+
}
|
89398
|
+
return rootCss;
|
88823
89399
|
}
|
88824
89400
|
var TOCModel = /** @class */ (function () {
|
88825
89401
|
function TOCModel(survey) {
|
@@ -88833,7 +89409,37 @@ var TOCModel = /** @class */ (function () {
|
|
88833
89409
|
this.popupModel = new _popup__WEBPACK_IMPORTED_MODULE_5__["PopupModel"]("sv-list", { model: this.listModel });
|
88834
89410
|
this.popupModel.overlayDisplayMode = "overlay";
|
88835
89411
|
this.popupModel.displayMode = new _base__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return _this.isMobile ? "overlay" : "popup"; });
|
89412
|
+
if (TOCModel.StickyPosition) {
|
89413
|
+
survey.onAfterRenderSurvey.add(function (s, o) { return _this.initStickyTOCSubscriptions(o.htmlElement); });
|
89414
|
+
this.initStickyTOCSubscriptions(survey.rootElement);
|
89415
|
+
}
|
88836
89416
|
}
|
89417
|
+
TOCModel.prototype.initStickyTOCSubscriptions = function (rootElement) {
|
89418
|
+
var _this = this;
|
89419
|
+
if (TOCModel.StickyPosition && !!rootElement) {
|
89420
|
+
rootElement.addEventListener("scroll", function (event) {
|
89421
|
+
_this.updateStickyTOCSize(rootElement);
|
89422
|
+
});
|
89423
|
+
this.updateStickyTOCSize(rootElement);
|
89424
|
+
}
|
89425
|
+
};
|
89426
|
+
TOCModel.prototype.updateStickyTOCSize = function (rootElement) {
|
89427
|
+
if (!rootElement) {
|
89428
|
+
return;
|
89429
|
+
}
|
89430
|
+
var tocRootElement = rootElement.querySelector("." + TOCModel.RootStyle);
|
89431
|
+
if (!!tocRootElement) {
|
89432
|
+
tocRootElement.style.height = "";
|
89433
|
+
if (!this.isMobile && TOCModel.StickyPosition && !!rootElement) {
|
89434
|
+
var rootHeight = rootElement.getBoundingClientRect().height;
|
89435
|
+
var titleSelector = this.survey.headerView === "advanced" ? ".sv-header" : ".sv_custom_header+div div." + (this.survey.css.title || "sd-title");
|
89436
|
+
var titleElement = rootElement.querySelector(titleSelector);
|
89437
|
+
var titleElementHeight = titleElement ? titleElement.getBoundingClientRect().height : 0;
|
89438
|
+
var scrollCompensationHeight = rootElement.scrollTop > titleElementHeight ? 0 : titleElementHeight - rootElement.scrollTop;
|
89439
|
+
tocRootElement.style.height = (rootHeight - scrollCompensationHeight - 2) + "px";
|
89440
|
+
}
|
89441
|
+
}
|
89442
|
+
};
|
88837
89443
|
Object.defineProperty(TOCModel.prototype, "isMobile", {
|
88838
89444
|
get: function () {
|
88839
89445
|
return this.survey.isMobile;
|
@@ -88852,6 +89458,8 @@ var TOCModel = /** @class */ (function () {
|
|
88852
89458
|
this.popupModel.dispose();
|
88853
89459
|
this.listModel.dispose();
|
88854
89460
|
};
|
89461
|
+
TOCModel.RootStyle = "sv_progress-toc";
|
89462
|
+
TOCModel.StickyPosition = true;
|
88855
89463
|
return TOCModel;
|
88856
89464
|
}());
|
88857
89465
|
|
@@ -89962,8 +90570,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
89962
90570
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationBoolean", function() { return AnimationBoolean; });
|
89963
90571
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationGroup", function() { return AnimationGroup; });
|
89964
90572
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationTab", function() { return AnimationTab; });
|
89965
|
-
/* harmony import */ var
|
89966
|
-
/* harmony import */ var
|
90573
|
+
/* harmony import */ var _taskmanager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./taskmanager */ "./src/utils/taskmanager.ts");
|
90574
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./src/utils/utils.ts");
|
90575
|
+
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
|
89967
90576
|
var __extends = (undefined && undefined.__extends) || (function () {
|
89968
90577
|
var extendStatics = function (d, b) {
|
89969
90578
|
extendStatics = Object.setPrototypeOf ||
|
@@ -89981,6 +90590,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
89981
90590
|
})();
|
89982
90591
|
|
89983
90592
|
|
90593
|
+
|
89984
90594
|
var AnimationUtils = /** @class */ (function () {
|
89985
90595
|
function AnimationUtils() {
|
89986
90596
|
this.cancelQueue = [];
|
@@ -90024,7 +90634,7 @@ var AnimationUtils = /** @class */ (function () {
|
|
90024
90634
|
var animationsCount = this.getAnimationsCount(element);
|
90025
90635
|
var onEndCallback = function (isCancel) {
|
90026
90636
|
if (isCancel === void 0) { isCancel = true; }
|
90027
|
-
|
90637
|
+
_this.afterAnimationRun(element, options);
|
90028
90638
|
callback(isCancel);
|
90029
90639
|
clearTimeout(cancelTimeout);
|
90030
90640
|
_this.removeCancelCallback(onEndCallback);
|
@@ -90043,9 +90653,15 @@ var AnimationUtils = /** @class */ (function () {
|
|
90043
90653
|
}, this.getAnimationDuration(element) + 10);
|
90044
90654
|
}
|
90045
90655
|
else {
|
90656
|
+
this.afterAnimationRun(element, options);
|
90046
90657
|
callback(true);
|
90047
90658
|
}
|
90048
90659
|
};
|
90660
|
+
AnimationUtils.prototype.afterAnimationRun = function (element, options) {
|
90661
|
+
if (element && options) {
|
90662
|
+
options.onAfterRunAnimation && options.onAfterRunAnimation(element);
|
90663
|
+
}
|
90664
|
+
};
|
90049
90665
|
AnimationUtils.prototype.beforeAnimationRun = function (element, options) {
|
90050
90666
|
if (element && options) {
|
90051
90667
|
options.onBeforeRunAnimation && options.onBeforeRunAnimation(element);
|
@@ -90055,7 +90671,7 @@ var AnimationUtils = /** @class */ (function () {
|
|
90055
90671
|
return options.cssClass.replace(/\s+$/, "").split(/\s+/);
|
90056
90672
|
};
|
90057
90673
|
AnimationUtils.prototype.runAnimation = function (element, options, callback) {
|
90058
|
-
if (element && options.cssClass) {
|
90674
|
+
if (element && (options === null || options === void 0 ? void 0 : options.cssClass)) {
|
90059
90675
|
this.reflow(element);
|
90060
90676
|
this.getCssClasses(options).forEach(function (cssClass) {
|
90061
90677
|
element.classList.add(cssClass);
|
@@ -90073,30 +90689,24 @@ var AnimationUtils = /** @class */ (function () {
|
|
90073
90689
|
});
|
90074
90690
|
}
|
90075
90691
|
};
|
90076
|
-
AnimationUtils.prototype.onNextRender = function (callback,
|
90692
|
+
AnimationUtils.prototype.onNextRender = function (callback, isCancel) {
|
90077
90693
|
var _this = this;
|
90078
90694
|
if (isCancel === void 0) { isCancel = false; }
|
90079
|
-
if (!isCancel &&
|
90695
|
+
if (!isCancel && _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].isAvailable()) {
|
90080
90696
|
var cancelCallback_1 = function () {
|
90081
|
-
callback();
|
90697
|
+
callback(true);
|
90082
90698
|
cancelAnimationFrame(latestRAF_1);
|
90083
90699
|
};
|
90084
|
-
var latestRAF_1 =
|
90085
|
-
|
90086
|
-
callback();
|
90700
|
+
var latestRAF_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].requestAnimationFrame(function () {
|
90701
|
+
latestRAF_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].requestAnimationFrame(function () {
|
90702
|
+
callback(false);
|
90087
90703
|
_this.removeCancelCallback(cancelCallback_1);
|
90088
|
-
}
|
90089
|
-
else {
|
90090
|
-
latestRAF_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
|
90091
|
-
callback();
|
90092
|
-
_this.removeCancelCallback(cancelCallback_1);
|
90093
|
-
});
|
90094
|
-
}
|
90704
|
+
});
|
90095
90705
|
});
|
90096
90706
|
this.addCancelCallback(cancelCallback_1);
|
90097
90707
|
}
|
90098
90708
|
else {
|
90099
|
-
callback();
|
90709
|
+
callback(true);
|
90100
90710
|
}
|
90101
90711
|
};
|
90102
90712
|
AnimationUtils.prototype.cancel = function () {
|
@@ -90114,25 +90724,23 @@ var AnimationPropertyUtils = /** @class */ (function (_super) {
|
|
90114
90724
|
}
|
90115
90725
|
AnimationPropertyUtils.prototype.onEnter = function (options) {
|
90116
90726
|
var _this = this;
|
90117
|
-
|
90118
|
-
|
90119
|
-
|
90120
|
-
|
90121
|
-
_this.
|
90122
|
-
|
90123
|
-
});
|
90124
|
-
}, function () { return !!options.getAnimatedElement(); });
|
90727
|
+
var htmlElement = options.getAnimatedElement();
|
90728
|
+
var enterOptions = options.getEnterOptions ? options.getEnterOptions() : {};
|
90729
|
+
this.beforeAnimationRun(htmlElement, enterOptions);
|
90730
|
+
this.runAnimation(htmlElement, enterOptions, function () {
|
90731
|
+
_this.clearHtmlElement(htmlElement, enterOptions);
|
90732
|
+
});
|
90125
90733
|
};
|
90126
90734
|
AnimationPropertyUtils.prototype.onLeave = function (options, callback) {
|
90127
90735
|
var _this = this;
|
90128
90736
|
var htmlElement = options.getAnimatedElement();
|
90129
|
-
var leaveOptions = options.getLeaveOptions();
|
90737
|
+
var leaveOptions = options.getLeaveOptions ? options.getLeaveOptions() : {};
|
90130
90738
|
this.beforeAnimationRun(htmlElement, leaveOptions);
|
90131
90739
|
this.runAnimation(htmlElement, leaveOptions, function (isCancel) {
|
90132
90740
|
callback();
|
90133
90741
|
_this.onNextRender(function () {
|
90134
90742
|
_this.clearHtmlElement(htmlElement, leaveOptions);
|
90135
|
-
},
|
90743
|
+
}, isCancel);
|
90136
90744
|
});
|
90137
90745
|
};
|
90138
90746
|
return AnimationPropertyUtils;
|
@@ -90143,40 +90751,54 @@ var AnimationGroupUtils = /** @class */ (function (_super) {
|
|
90143
90751
|
function AnimationGroupUtils() {
|
90144
90752
|
return _super !== null && _super.apply(this, arguments) || this;
|
90145
90753
|
}
|
90146
|
-
AnimationGroupUtils.prototype.runGroupAnimation = function (options,
|
90754
|
+
AnimationGroupUtils.prototype.runGroupAnimation = function (options, addedItems, removedItems, reorderedItems, callback) {
|
90147
90755
|
var _this = this;
|
90148
|
-
|
90149
|
-
|
90150
|
-
|
90151
|
-
|
90152
|
-
|
90153
|
-
|
90154
|
-
|
90155
|
-
|
90156
|
-
|
90157
|
-
|
90158
|
-
|
90159
|
-
|
90160
|
-
|
90161
|
-
|
90162
|
-
|
90163
|
-
|
90164
|
-
|
90165
|
-
|
90166
|
-
|
90167
|
-
|
90168
|
-
|
90169
|
-
|
90170
|
-
|
90171
|
-
|
90172
|
-
|
90173
|
-
|
90174
|
-
|
90175
|
-
|
90176
|
-
|
90177
|
-
|
90178
|
-
|
90179
|
-
|
90756
|
+
var info = {
|
90757
|
+
isAddingRunning: addedItems.length > 0,
|
90758
|
+
isDeletingRunning: removedItems.length > 0,
|
90759
|
+
isReorderingRunning: reorderedItems.length > 0
|
90760
|
+
};
|
90761
|
+
var addedHtmlElements = addedItems.map(function (el) { return options.getAnimatedElement(el); });
|
90762
|
+
var enterOptions = addedItems.map(function (el) { return options.getEnterOptions ? options.getEnterOptions(el, info) : {}; });
|
90763
|
+
var removedHtmlElements = removedItems.map(function (el) { return options.getAnimatedElement(el); });
|
90764
|
+
var leaveOptions = removedItems.map(function (el) { return options.getLeaveOptions ? options.getLeaveOptions(el, info) : {}; });
|
90765
|
+
var reorderedHtmlElements = reorderedItems.map(function (el) { return options.getAnimatedElement(el.item); });
|
90766
|
+
var reorderedOptions = reorderedItems.map(function (el) { return options.getReorderOptions ? options.getReorderOptions(el.item, el.movedForward, info) : {}; });
|
90767
|
+
addedItems.forEach(function (_, i) {
|
90768
|
+
_this.beforeAnimationRun(addedHtmlElements[i], enterOptions[i]);
|
90769
|
+
});
|
90770
|
+
removedItems.forEach(function (_, i) {
|
90771
|
+
_this.beforeAnimationRun(removedHtmlElements[i], leaveOptions[i]);
|
90772
|
+
});
|
90773
|
+
reorderedItems.forEach(function (_, i) {
|
90774
|
+
_this.beforeAnimationRun(reorderedHtmlElements[i], reorderedOptions[i]);
|
90775
|
+
});
|
90776
|
+
var counter = addedItems.length + removedItems.length + reorderedHtmlElements.length;
|
90777
|
+
var onAnimationEndCallback = function (isCancel) {
|
90778
|
+
if (--counter <= 0) {
|
90779
|
+
callback && callback();
|
90780
|
+
_this.onNextRender(function () {
|
90781
|
+
addedItems.forEach(function (_, i) {
|
90782
|
+
_this.clearHtmlElement(addedHtmlElements[i], enterOptions[i]);
|
90783
|
+
});
|
90784
|
+
removedItems.forEach(function (_, i) {
|
90785
|
+
_this.clearHtmlElement(removedHtmlElements[i], leaveOptions[i]);
|
90786
|
+
});
|
90787
|
+
reorderedItems.forEach(function (_, i) {
|
90788
|
+
_this.clearHtmlElement(reorderedHtmlElements[i], reorderedOptions[i]);
|
90789
|
+
});
|
90790
|
+
}, isCancel);
|
90791
|
+
}
|
90792
|
+
};
|
90793
|
+
addedItems.forEach(function (_, i) {
|
90794
|
+
_this.runAnimation(addedHtmlElements[i], enterOptions[i], onAnimationEndCallback);
|
90795
|
+
});
|
90796
|
+
removedItems.forEach(function (_, i) {
|
90797
|
+
_this.runAnimation(removedHtmlElements[i], leaveOptions[i], onAnimationEndCallback);
|
90798
|
+
});
|
90799
|
+
reorderedItems.forEach(function (_, i) {
|
90800
|
+
_this.runAnimation(reorderedHtmlElements[i], reorderedOptions[i], onAnimationEndCallback);
|
90801
|
+
});
|
90180
90802
|
};
|
90181
90803
|
return AnimationGroupUtils;
|
90182
90804
|
}(AnimationUtils));
|
@@ -90187,11 +90809,51 @@ var AnimationProperty = /** @class */ (function () {
|
|
90187
90809
|
this.animationOptions = animationOptions;
|
90188
90810
|
this.update = update;
|
90189
90811
|
this.getCurrentValue = getCurrentValue;
|
90190
|
-
this._debouncedSync = Object(
|
90812
|
+
this._debouncedSync = Object(_taskmanager__WEBPACK_IMPORTED_MODULE_0__["debounce"])(function (newValue) {
|
90191
90813
|
_this.animation.cancel();
|
90192
|
-
|
90814
|
+
try {
|
90815
|
+
_this._sync(newValue);
|
90816
|
+
}
|
90817
|
+
catch (_a) {
|
90818
|
+
_this.update(newValue);
|
90819
|
+
}
|
90193
90820
|
});
|
90194
90821
|
}
|
90822
|
+
AnimationProperty.prototype.onNextRender = function (callback, onCancel) {
|
90823
|
+
var _this = this;
|
90824
|
+
var rerenderEvent = this.animationOptions.getRerenderEvent();
|
90825
|
+
if (!rerenderEvent) {
|
90826
|
+
if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].isAvailable()) {
|
90827
|
+
var raf_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].requestAnimationFrame(function () {
|
90828
|
+
callback();
|
90829
|
+
_this.cancelCallback = undefined;
|
90830
|
+
});
|
90831
|
+
this.cancelCallback = function () {
|
90832
|
+
onCancel && onCancel();
|
90833
|
+
cancelAnimationFrame(raf_1);
|
90834
|
+
_this.cancelCallback = undefined;
|
90835
|
+
};
|
90836
|
+
}
|
90837
|
+
else {
|
90838
|
+
throw new Error("Can't get next render");
|
90839
|
+
}
|
90840
|
+
}
|
90841
|
+
else {
|
90842
|
+
var clear_1 = function () {
|
90843
|
+
rerenderEvent.remove(nextRenderCallback_1);
|
90844
|
+
_this.cancelCallback = undefined;
|
90845
|
+
};
|
90846
|
+
var nextRenderCallback_1 = function () {
|
90847
|
+
callback();
|
90848
|
+
clear_1();
|
90849
|
+
};
|
90850
|
+
this.cancelCallback = function () {
|
90851
|
+
onCancel && onCancel();
|
90852
|
+
clear_1();
|
90853
|
+
};
|
90854
|
+
rerenderEvent.add(nextRenderCallback_1);
|
90855
|
+
}
|
90856
|
+
};
|
90195
90857
|
AnimationProperty.prototype.sync = function (newValue) {
|
90196
90858
|
if (this.animationOptions.isAnimationEnabled()) {
|
90197
90859
|
this._debouncedSync.run(newValue);
|
@@ -90202,8 +90864,9 @@ var AnimationProperty = /** @class */ (function () {
|
|
90202
90864
|
}
|
90203
90865
|
};
|
90204
90866
|
AnimationProperty.prototype.cancel = function () {
|
90205
|
-
this.animation.cancel();
|
90206
90867
|
this._debouncedSync.cancel();
|
90868
|
+
this.cancelCallback && this.cancelCallback();
|
90869
|
+
this.animation.cancel();
|
90207
90870
|
};
|
90208
90871
|
return AnimationProperty;
|
90209
90872
|
}());
|
@@ -90219,8 +90882,10 @@ var AnimationBoolean = /** @class */ (function (_super) {
|
|
90219
90882
|
var _this = this;
|
90220
90883
|
if (newValue !== this.getCurrentValue()) {
|
90221
90884
|
if (newValue) {
|
90885
|
+
this.onNextRender(function () {
|
90886
|
+
_this.animation.onEnter(_this.animationOptions);
|
90887
|
+
});
|
90222
90888
|
this.update(newValue);
|
90223
|
-
this.animation.onEnter(this.animationOptions);
|
90224
90889
|
}
|
90225
90890
|
else {
|
90226
90891
|
this.animation.onLeave(this.animationOptions, function () {
|
@@ -90244,15 +90909,34 @@ var AnimationGroup = /** @class */ (function (_super) {
|
|
90244
90909
|
}
|
90245
90910
|
AnimationGroup.prototype._sync = function (newValue) {
|
90246
90911
|
var _this = this;
|
90912
|
+
var _a, _b;
|
90247
90913
|
var oldValue = this.getCurrentValue();
|
90248
|
-
var
|
90249
|
-
var
|
90250
|
-
if (
|
90251
|
-
|
90914
|
+
var allowSyncRemovalAddition = (_a = this.animationOptions.allowSyncRemovalAddition) !== null && _a !== void 0 ? _a : true;
|
90915
|
+
var _c = Object(_utils__WEBPACK_IMPORTED_MODULE_1__["compareArrays"])(oldValue, newValue, (_b = this.animationOptions.getKey) !== null && _b !== void 0 ? _b : (function (item) { return item; })), addedItems = _c.addedItems, deletedItems = _c.deletedItems, reorderedItems = _c.reorderedItems, mergedItems = _c.mergedItems;
|
90916
|
+
if (!allowSyncRemovalAddition && (reorderedItems.length > 0 || addedItems.length > 0)) {
|
90917
|
+
deletedItems = [];
|
90918
|
+
mergedItems = newValue;
|
90919
|
+
}
|
90920
|
+
var runAnimationCallback = function () {
|
90921
|
+
_this.animation.runGroupAnimation(_this.animationOptions, addedItems, deletedItems, reorderedItems, function () {
|
90922
|
+
if (deletedItems.length > 0) {
|
90923
|
+
_this.update(newValue);
|
90924
|
+
}
|
90925
|
+
});
|
90926
|
+
};
|
90927
|
+
if ([addedItems, deletedItems, reorderedItems].some(function (arr) { return arr.length > 0; })) {
|
90928
|
+
if (deletedItems.length <= 0 || reorderedItems.length > 0 || addedItems.length > 0) {
|
90929
|
+
this.onNextRender(runAnimationCallback, function () {
|
90930
|
+
_this.update(newValue);
|
90931
|
+
});
|
90932
|
+
this.update(mergedItems);
|
90933
|
+
}
|
90934
|
+
else {
|
90935
|
+
runAnimationCallback();
|
90936
|
+
}
|
90252
90937
|
}
|
90253
90938
|
else {
|
90254
90939
|
this.update(newValue);
|
90255
|
-
this.animation.runGroupAnimation(this.animationOptions, itemsToAdd, []);
|
90256
90940
|
}
|
90257
90941
|
};
|
90258
90942
|
return AnimationGroup;
|
@@ -90271,10 +90955,12 @@ var AnimationTab = /** @class */ (function (_super) {
|
|
90271
90955
|
var oldValue = [].concat(this.getCurrentValue());
|
90272
90956
|
if (oldValue[0] !== newValue[0]) {
|
90273
90957
|
var tempValue = !!this.mergeValues ? this.mergeValues(newValue, oldValue) : [].concat(oldValue, newValue);
|
90958
|
+
this.onNextRender(function () {
|
90959
|
+
_this.animation.runGroupAnimation(_this.animationOptions, newValue, oldValue, [], function () {
|
90960
|
+
_this.update(newValue);
|
90961
|
+
});
|
90962
|
+
}, function () { return _this.update(newValue); });
|
90274
90963
|
this.update(tempValue, true);
|
90275
|
-
this.animation.runGroupAnimation(this.animationOptions, newValue, oldValue, function () {
|
90276
|
-
_this.update(newValue);
|
90277
|
-
});
|
90278
90964
|
}
|
90279
90965
|
else {
|
90280
90966
|
this.update(newValue);
|
@@ -90668,16 +91354,55 @@ var DragOrClickHelper = /** @class */ (function () {
|
|
90668
91354
|
/*!****************************!*\
|
90669
91355
|
!*** ./src/utils/popup.ts ***!
|
90670
91356
|
\****************************/
|
90671
|
-
/*! exports provided: PopupUtils */
|
91357
|
+
/*! exports provided: Rect, PopupUtils */
|
90672
91358
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
90673
91359
|
|
90674
91360
|
"use strict";
|
90675
91361
|
__webpack_require__.r(__webpack_exports__);
|
91362
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rect", function() { return Rect; });
|
90676
91363
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupUtils", function() { return PopupUtils; });
|
91364
|
+
var Rect = /** @class */ (function () {
|
91365
|
+
function Rect(x, y, width, height) {
|
91366
|
+
this.x = x;
|
91367
|
+
this.y = y;
|
91368
|
+
this.width = width;
|
91369
|
+
this.height = height;
|
91370
|
+
}
|
91371
|
+
Object.defineProperty(Rect.prototype, "left", {
|
91372
|
+
get: function () {
|
91373
|
+
return this.x;
|
91374
|
+
},
|
91375
|
+
enumerable: false,
|
91376
|
+
configurable: true
|
91377
|
+
});
|
91378
|
+
Object.defineProperty(Rect.prototype, "top", {
|
91379
|
+
get: function () {
|
91380
|
+
return this.y;
|
91381
|
+
},
|
91382
|
+
enumerable: false,
|
91383
|
+
configurable: true
|
91384
|
+
});
|
91385
|
+
Object.defineProperty(Rect.prototype, "right", {
|
91386
|
+
get: function () {
|
91387
|
+
return this.x + this.width;
|
91388
|
+
},
|
91389
|
+
enumerable: false,
|
91390
|
+
configurable: true
|
91391
|
+
});
|
91392
|
+
Object.defineProperty(Rect.prototype, "bottom", {
|
91393
|
+
get: function () {
|
91394
|
+
return this.y + this.height;
|
91395
|
+
},
|
91396
|
+
enumerable: false,
|
91397
|
+
configurable: true
|
91398
|
+
});
|
91399
|
+
return Rect;
|
91400
|
+
}());
|
91401
|
+
|
90677
91402
|
var PopupUtils = /** @class */ (function () {
|
90678
91403
|
function PopupUtils() {
|
90679
91404
|
}
|
90680
|
-
PopupUtils.calculatePosition = function (targetRect, height, width, verticalPosition, horizontalPosition,
|
91405
|
+
PopupUtils.calculatePosition = function (targetRect, height, width, verticalPosition, horizontalPosition, positionMode) {
|
90681
91406
|
if (positionMode === void 0) { positionMode = "flex"; }
|
90682
91407
|
var currentLeft = targetRect.left;
|
90683
91408
|
var currentTop = targetRect.top;
|
@@ -90695,29 +91420,33 @@ var PopupUtils = /** @class */ (function () {
|
|
90695
91420
|
currentTop = targetRect.top - height;
|
90696
91421
|
else
|
90697
91422
|
currentTop = targetRect.bottom;
|
90698
|
-
if (
|
90699
|
-
if (
|
90700
|
-
|
90701
|
-
|
90702
|
-
|
90703
|
-
|
90704
|
-
currentTop = currentTop - targetRect.height;
|
90705
|
-
}
|
91423
|
+
if (horizontalPosition != "center" && verticalPosition != "middle") {
|
91424
|
+
if (verticalPosition == "top") {
|
91425
|
+
currentTop = currentTop + targetRect.height;
|
91426
|
+
}
|
91427
|
+
else {
|
91428
|
+
currentTop = currentTop - targetRect.height;
|
90706
91429
|
}
|
90707
91430
|
}
|
90708
91431
|
return { left: Math.round(currentLeft), top: Math.round(currentTop) };
|
90709
91432
|
};
|
90710
|
-
PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight, verticalPosition) {
|
91433
|
+
PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight, verticalPosition, canShrink) {
|
91434
|
+
if (canShrink === void 0) { canShrink = true; }
|
90711
91435
|
var result;
|
91436
|
+
var maxHeight = windowHeight - PopupUtils.bottomIndent;
|
90712
91437
|
if (verticalPosition === "top") {
|
90713
91438
|
result = { height: height, top: top };
|
90714
91439
|
}
|
90715
91440
|
if (top < 0) {
|
90716
|
-
result = { height: height + top, top: 0 };
|
91441
|
+
result = { height: canShrink ? height + top : height, top: 0 };
|
90717
91442
|
}
|
90718
91443
|
else if (height + top > windowHeight) {
|
90719
|
-
var newHeight = Math.min(height,
|
90720
|
-
result = { height: newHeight, top: top };
|
91444
|
+
var newHeight = Math.min(height, maxHeight - top);
|
91445
|
+
result = { height: canShrink ? newHeight : height, top: canShrink ? top : top - (height - newHeight) };
|
91446
|
+
}
|
91447
|
+
if (result) {
|
91448
|
+
result.height = Math.min(result.height, maxHeight);
|
91449
|
+
result.top = Math.max(result.top, 0);
|
90721
91450
|
}
|
90722
91451
|
return result;
|
90723
91452
|
};
|
@@ -90758,18 +91487,15 @@ var PopupUtils = /** @class */ (function () {
|
|
90758
91487
|
}
|
90759
91488
|
return { width: newWidth - margins.left - margins.right, left: newLeft };
|
90760
91489
|
};
|
90761
|
-
PopupUtils.updateVerticalPosition = function (targetRect, height,
|
90762
|
-
|
90763
|
-
|
90764
|
-
|
90765
|
-
|
90766
|
-
windowHeight;
|
91490
|
+
PopupUtils.updateVerticalPosition = function (targetRect, height, horizontalPosition, verticalPosition, windowHeight) {
|
91491
|
+
if (verticalPosition === "middle")
|
91492
|
+
return verticalPosition;
|
91493
|
+
var deltaTop = height - (targetRect.top + (horizontalPosition !== "center" ? targetRect.height : 0));
|
91494
|
+
var deltaBottom = height + targetRect.bottom - (horizontalPosition !== "center" ? targetRect.height : 0) - windowHeight;
|
90767
91495
|
if (deltaTop > 0 && deltaBottom <= 0 && verticalPosition == "top") {
|
90768
91496
|
verticalPosition = "bottom";
|
90769
91497
|
}
|
90770
|
-
else if (deltaBottom > 0 &&
|
90771
|
-
deltaTop <= 0 &&
|
90772
|
-
verticalPosition == "bottom") {
|
91498
|
+
else if (deltaBottom > 0 && deltaTop <= 0 && verticalPosition == "bottom") {
|
90773
91499
|
verticalPosition = "top";
|
90774
91500
|
}
|
90775
91501
|
else if (deltaBottom > 0 && deltaTop > 0) {
|
@@ -90777,6 +91503,22 @@ var PopupUtils = /** @class */ (function () {
|
|
90777
91503
|
}
|
90778
91504
|
return verticalPosition;
|
90779
91505
|
};
|
91506
|
+
PopupUtils.updateHorizontalPosition = function (targetRect, width, horizontalPosition, windowWidth) {
|
91507
|
+
if (horizontalPosition === "center")
|
91508
|
+
return horizontalPosition;
|
91509
|
+
var deltaLeft = width - targetRect.left;
|
91510
|
+
var deltaRight = width + targetRect.right - windowWidth;
|
91511
|
+
if (deltaLeft > 0 && deltaRight <= 0 && horizontalPosition == "left") {
|
91512
|
+
horizontalPosition = "right";
|
91513
|
+
}
|
91514
|
+
else if (deltaRight > 0 && deltaLeft <= 0 && horizontalPosition == "right") {
|
91515
|
+
horizontalPosition = "left";
|
91516
|
+
}
|
91517
|
+
else if (deltaRight > 0 && deltaLeft > 0) {
|
91518
|
+
horizontalPosition = deltaLeft < deltaRight ? "left" : "right";
|
91519
|
+
}
|
91520
|
+
return horizontalPosition;
|
91521
|
+
};
|
90780
91522
|
PopupUtils.calculatePopupDirection = function (verticalPosition, horizontalPosition) {
|
90781
91523
|
var popupDirection;
|
90782
91524
|
if (horizontalPosition == "center" && verticalPosition != "middle") {
|
@@ -91141,7 +91883,7 @@ function debounce(func) {
|
|
91141
91883
|
/*!****************************!*\
|
91142
91884
|
!*** ./src/utils/utils.ts ***!
|
91143
91885
|
\****************************/
|
91144
|
-
/*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, showConfirmDialog, configConfirmDialog, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, confirmActionAsync, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, wrapUrlForBackgroundImage, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, getFirstVisibleChild, chooseFiles */
|
91886
|
+
/*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, showConfirmDialog, configConfirmDialog, compareArrays, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, confirmActionAsync, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, wrapUrlForBackgroundImage, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, getFirstVisibleChild, chooseFiles */
|
91145
91887
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
91146
91888
|
|
91147
91889
|
"use strict";
|
@@ -91156,6 +91898,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
91156
91898
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return Logger; });
|
91157
91899
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showConfirmDialog", function() { return showConfirmDialog; });
|
91158
91900
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "configConfirmDialog", function() { return configConfirmDialog; });
|
91901
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareArrays", function() { return compareArrays; });
|
91159
91902
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeValues", function() { return mergeValues; });
|
91160
91903
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementWidth", function() { return getElementWidth; });
|
91161
91904
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContainerVisible", function() { return isContainerVisible; });
|
@@ -91476,6 +92219,8 @@ function preventDefaults(event) {
|
|
91476
92219
|
event.stopPropagation();
|
91477
92220
|
}
|
91478
92221
|
function classesToSelector(str) {
|
92222
|
+
if (!str)
|
92223
|
+
return str;
|
91479
92224
|
var re = /\s*?([\w-]+)\s*?/g;
|
91480
92225
|
return str.replace(re, ".$1");
|
91481
92226
|
}
|
@@ -91624,6 +92369,100 @@ function chooseFiles(input, callback) {
|
|
91624
92369
|
};
|
91625
92370
|
input.click();
|
91626
92371
|
}
|
92372
|
+
function compareArrays(oldValue, newValue, getKey) {
|
92373
|
+
var oldItemsMap = new Map();
|
92374
|
+
var newItemsMap = new Map();
|
92375
|
+
var commonItemsInNewMap = new Map();
|
92376
|
+
var commonItemsInOldMap = new Map();
|
92377
|
+
oldValue.forEach(function (item) {
|
92378
|
+
var itemKey = getKey(item);
|
92379
|
+
if (!oldItemsMap.has(itemKey)) {
|
92380
|
+
oldItemsMap.set(getKey(item), item);
|
92381
|
+
}
|
92382
|
+
else {
|
92383
|
+
//if keys are set incorrectly do not process comparing
|
92384
|
+
throw new Error("keys must be unique");
|
92385
|
+
}
|
92386
|
+
});
|
92387
|
+
newValue.forEach(function (item) {
|
92388
|
+
var itemKey = getKey(item);
|
92389
|
+
if (!newItemsMap.has(itemKey)) {
|
92390
|
+
newItemsMap.set(itemKey, item);
|
92391
|
+
}
|
92392
|
+
else {
|
92393
|
+
//if keys are set incorrectly do not process comparing
|
92394
|
+
throw new Error("keys must be unique");
|
92395
|
+
}
|
92396
|
+
});
|
92397
|
+
var addedItems = [];
|
92398
|
+
var deletedItems = [];
|
92399
|
+
//calculating addedItems and items that exist in both arrays
|
92400
|
+
newItemsMap.forEach(function (item, key) {
|
92401
|
+
if (!oldItemsMap.has(key)) {
|
92402
|
+
addedItems.push(item);
|
92403
|
+
}
|
92404
|
+
else {
|
92405
|
+
commonItemsInNewMap.set(key, commonItemsInNewMap.size);
|
92406
|
+
}
|
92407
|
+
});
|
92408
|
+
//calculating deletedItems and items that exist in both arrays
|
92409
|
+
oldItemsMap.forEach(function (item, key) {
|
92410
|
+
if (!newItemsMap.has(key)) {
|
92411
|
+
deletedItems.push(item);
|
92412
|
+
}
|
92413
|
+
else {
|
92414
|
+
commonItemsInOldMap.set(key, commonItemsInOldMap.size);
|
92415
|
+
}
|
92416
|
+
});
|
92417
|
+
//calculating reordered items
|
92418
|
+
var reorderedItems = [];
|
92419
|
+
commonItemsInNewMap.forEach(function (index, key) {
|
92420
|
+
var oldIndex = commonItemsInOldMap.get(key);
|
92421
|
+
var item = newItemsMap.get(key);
|
92422
|
+
if (oldIndex !== index)
|
92423
|
+
reorderedItems.push({ item: item, movedForward: oldIndex < index });
|
92424
|
+
});
|
92425
|
+
//calculating merged array if multiple operations are applied at once
|
92426
|
+
var oldItemsWithCorrectOrder = new Array(oldValue.length);
|
92427
|
+
var commonItemsIndex = 0;
|
92428
|
+
var commonItemsKeysOrder = Array.from(commonItemsInNewMap.keys());
|
92429
|
+
oldValue.forEach(function (item, index) {
|
92430
|
+
if (commonItemsInNewMap.has(getKey(item))) {
|
92431
|
+
oldItemsWithCorrectOrder[index] = newItemsMap.get(commonItemsKeysOrder[commonItemsIndex]);
|
92432
|
+
commonItemsIndex++;
|
92433
|
+
}
|
92434
|
+
else {
|
92435
|
+
oldItemsWithCorrectOrder[index] = item;
|
92436
|
+
}
|
92437
|
+
});
|
92438
|
+
var valuesToInsertBeforeKey = new Map();
|
92439
|
+
var tempValuesArray = [];
|
92440
|
+
oldItemsWithCorrectOrder.forEach(function (item) {
|
92441
|
+
var itemKey = getKey(item);
|
92442
|
+
if (newItemsMap.has(itemKey)) {
|
92443
|
+
if (tempValuesArray.length > 0) {
|
92444
|
+
valuesToInsertBeforeKey.set(itemKey, tempValuesArray);
|
92445
|
+
tempValuesArray = [];
|
92446
|
+
}
|
92447
|
+
}
|
92448
|
+
else {
|
92449
|
+
tempValuesArray.push(item);
|
92450
|
+
}
|
92451
|
+
});
|
92452
|
+
var mergedItems = new Array();
|
92453
|
+
newItemsMap.forEach(function (item, key) {
|
92454
|
+
if (valuesToInsertBeforeKey.has(key)) {
|
92455
|
+
valuesToInsertBeforeKey.get(key).forEach(function (item) {
|
92456
|
+
mergedItems.push(item);
|
92457
|
+
});
|
92458
|
+
}
|
92459
|
+
mergedItems.push(item);
|
92460
|
+
});
|
92461
|
+
tempValuesArray.forEach(function (item) {
|
92462
|
+
mergedItems.push(item);
|
92463
|
+
});
|
92464
|
+
return { reorderedItems: reorderedItems, deletedItems: deletedItems, addedItems: addedItems, mergedItems: mergedItems };
|
92465
|
+
}
|
91627
92466
|
|
91628
92467
|
|
91629
92468
|
|