survey-react 1.11.3 → 1.11.4
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 +55 -15
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +22 -8
- package/survey.react.js +118 -84
- 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.11.
|
2
|
+
* surveyjs - Survey JavaScript library v1.11.4
|
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
|
*/
|
@@ -2925,7 +2925,8 @@ var Base = /** @class */ (function () {
|
|
2925
2925
|
configurable: true
|
2926
2926
|
});
|
2927
2927
|
Base.prototype.afterRerender = function () {
|
2928
|
-
|
2928
|
+
var _a;
|
2929
|
+
(_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this, undefined);
|
2929
2930
|
};
|
2930
2931
|
Base.currentDependencis = undefined;
|
2931
2932
|
return Base;
|
@@ -4639,6 +4640,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
4639
4640
|
|
4640
4641
|
var modernCss = {
|
4641
4642
|
root: "sv-root-modern",
|
4643
|
+
rootProgress: "sv-progress",
|
4642
4644
|
timerRoot: "sv-body__timer",
|
4643
4645
|
container: "sv-container-modern",
|
4644
4646
|
header: "sv-title sv-container-modern__title",
|
@@ -5106,6 +5108,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
5106
5108
|
|
5107
5109
|
var defaultStandardCss = {
|
5108
5110
|
root: "sv_main sv_default_css",
|
5111
|
+
rootProgress: "sv_progress",
|
5109
5112
|
container: "sv_container",
|
5110
5113
|
header: "sv_header",
|
5111
5114
|
bodyContainer: "sv-components-row",
|
@@ -5549,6 +5552,7 @@ var surveyCss = {
|
|
5549
5552
|
};
|
5550
5553
|
var defaultV2Css = {
|
5551
5554
|
root: "sd-root-modern",
|
5555
|
+
rootProgress: "sd-progress",
|
5552
5556
|
rootMobile: "sd-root-modern--mobile",
|
5553
5557
|
rootAnimationDisabled: "sd-root-modern--animation-disabled",
|
5554
5558
|
rootReadOnly: "sd-root--readonly",
|
@@ -8161,6 +8165,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8161
8165
|
_this.onSelectionChanged = onSelectionChanged;
|
8162
8166
|
_this.minPageSize = 25;
|
8163
8167
|
_this.loadingItemHeight = 40;
|
8168
|
+
_this.timer = undefined;
|
8164
8169
|
_this._markdownMode = false;
|
8165
8170
|
_this.filteredItems = undefined;
|
8166
8171
|
_this.selectedItemSelector = ".sv-list__item--selected";
|
@@ -8215,28 +8220,43 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8215
8220
|
this.listModel.isAllDataLoaded = this.question.choicesLazyLoadEnabled && this.itemsSettings.items.length == this.itemsSettings.totalCount;
|
8216
8221
|
this.question.choices = this.itemsSettings.items;
|
8217
8222
|
};
|
8223
|
+
DropdownListModel.prototype.loadQuestionChoices = function (callbackAfterItemsLoaded) {
|
8224
|
+
var _this = this;
|
8225
|
+
this.isRunningLoadQuestionChoices = true;
|
8226
|
+
this.question.survey.loadQuestionChoices({
|
8227
|
+
question: this.question,
|
8228
|
+
filter: this.filterString,
|
8229
|
+
skip: this.itemsSettings.skip,
|
8230
|
+
take: this.itemsSettings.take,
|
8231
|
+
setItems: function (items, totalCount) {
|
8232
|
+
_this.isRunningLoadQuestionChoices = false;
|
8233
|
+
_this.setItems(items || [], totalCount || 0);
|
8234
|
+
_this.popupRecalculatePosition(_this.itemsSettings.skip === _this.itemsSettings.take);
|
8235
|
+
if (!!callbackAfterItemsLoaded) {
|
8236
|
+
callbackAfterItemsLoaded();
|
8237
|
+
}
|
8238
|
+
}
|
8239
|
+
});
|
8240
|
+
this.itemsSettings.skip += this.itemsSettings.take;
|
8241
|
+
};
|
8218
8242
|
DropdownListModel.prototype.updateQuestionChoices = function (callbackAfterItemsLoaded) {
|
8219
8243
|
var _this = this;
|
8220
8244
|
if (this.isRunningLoadQuestionChoices)
|
8221
8245
|
return;
|
8222
8246
|
var isUpdate = (this.itemsSettings.skip + 1) < this.itemsSettings.totalCount;
|
8223
8247
|
if (!this.itemsSettings.skip || isUpdate) {
|
8224
|
-
this.
|
8225
|
-
|
8226
|
-
|
8227
|
-
|
8228
|
-
skip: this.itemsSettings.skip,
|
8229
|
-
take: this.itemsSettings.take,
|
8230
|
-
setItems: function (items, totalCount) {
|
8231
|
-
_this.isRunningLoadQuestionChoices = false;
|
8232
|
-
_this.setItems(items || [], totalCount || 0);
|
8233
|
-
_this.popupRecalculatePosition(_this.itemsSettings.skip === _this.itemsSettings.take);
|
8234
|
-
if (!!callbackAfterItemsLoaded) {
|
8235
|
-
callbackAfterItemsLoaded();
|
8236
|
-
}
|
8248
|
+
if (!!this.filterString && _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].dropdownSearchDelay > 0) {
|
8249
|
+
if (!!this.timer) {
|
8250
|
+
clearTimeout(this.timer);
|
8251
|
+
this.timer = undefined;
|
8237
8252
|
}
|
8238
|
-
|
8239
|
-
|
8253
|
+
this.timer = setTimeout(function () {
|
8254
|
+
_this.loadQuestionChoices(callbackAfterItemsLoaded);
|
8255
|
+
}, _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].dropdownSearchDelay);
|
8256
|
+
}
|
8257
|
+
else {
|
8258
|
+
this.loadQuestionChoices(callbackAfterItemsLoaded);
|
8259
|
+
}
|
8240
8260
|
}
|
8241
8261
|
};
|
8242
8262
|
DropdownListModel.prototype.updatePopupFocusFirstInputSelector = function () {
|
@@ -9904,8 +9924,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9904
9924
|
|
9905
9925
|
var Version;
|
9906
9926
|
var ReleaseDate;
|
9907
|
-
Version = "" + "1.11.
|
9908
|
-
ReleaseDate = "" + "2024-06-
|
9927
|
+
Version = "" + "1.11.4";
|
9928
|
+
ReleaseDate = "" + "2024-06-25";
|
9909
9929
|
function checkLibraryVersion(ver, libraryName) {
|
9910
9930
|
if (Version != ver) {
|
9911
9931
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -17133,6 +17153,11 @@ var DomWindowHelper = /** @class */ (function () {
|
|
17133
17153
|
return;
|
17134
17154
|
window.removeEventListener(type, listener);
|
17135
17155
|
};
|
17156
|
+
DomWindowHelper.matchMedia = function (mediaQueryString) {
|
17157
|
+
if (!DomWindowHelper.isAvailable() || typeof window.matchMedia === "undefined")
|
17158
|
+
return null;
|
17159
|
+
return window.matchMedia(mediaQueryString);
|
17160
|
+
};
|
17136
17161
|
return DomWindowHelper;
|
17137
17162
|
}());
|
17138
17163
|
|
@@ -30838,6 +30863,10 @@ var InputMaskBase = /** @class */ (function (_super) {
|
|
30838
30863
|
function InputMaskBase() {
|
30839
30864
|
return _super !== null && _super.apply(this, arguments) || this;
|
30840
30865
|
}
|
30866
|
+
InputMaskBase.prototype.getSurvey = function (live) {
|
30867
|
+
if (live === void 0) { live = false; }
|
30868
|
+
return this.owner;
|
30869
|
+
};
|
30841
30870
|
InputMaskBase.prototype.getType = function () {
|
30842
30871
|
return "masksettings";
|
30843
30872
|
};
|
@@ -33373,11 +33402,22 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
33373
33402
|
});
|
33374
33403
|
PanelModelBase.prototype.delete = function (doDispose) {
|
33375
33404
|
if (doDispose === void 0) { doDispose = true; }
|
33405
|
+
this.deletePanel();
|
33376
33406
|
this.removeFromParent();
|
33377
33407
|
if (doDispose) {
|
33378
33408
|
this.dispose();
|
33379
33409
|
}
|
33380
33410
|
};
|
33411
|
+
PanelModelBase.prototype.deletePanel = function () {
|
33412
|
+
var els = this.elements;
|
33413
|
+
for (var i = 0; i < els.length; i++) {
|
33414
|
+
var el = els[i];
|
33415
|
+
if (el.isPanel) {
|
33416
|
+
el.deletePanel();
|
33417
|
+
}
|
33418
|
+
this.onRemoveElementNotifySurvey(el);
|
33419
|
+
}
|
33420
|
+
};
|
33381
33421
|
PanelModelBase.prototype.removeFromParent = function () { };
|
33382
33422
|
PanelModelBase.prototype.canShowTitle = function () { return true; };
|
33383
33423
|
Object.defineProperty(PanelModelBase.prototype, "_showDescription", {
|
@@ -34362,17 +34402,20 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
34362
34402
|
this.updateRowsOnElementRemoved(element);
|
34363
34403
|
if (this.isRandomizing)
|
34364
34404
|
return;
|
34405
|
+
this.onRemoveElementNotifySurvey(element);
|
34406
|
+
if (!!this.removeElementCallback)
|
34407
|
+
this.removeElementCallback(element);
|
34408
|
+
this.onElementVisibilityChanged(this);
|
34409
|
+
};
|
34410
|
+
PanelModelBase.prototype.onRemoveElementNotifySurvey = function (element) {
|
34411
|
+
if (!this.survey)
|
34412
|
+
return;
|
34365
34413
|
if (!element.isPanel) {
|
34366
|
-
|
34367
|
-
this.survey.questionRemoved(element);
|
34414
|
+
this.survey.questionRemoved(element);
|
34368
34415
|
}
|
34369
34416
|
else {
|
34370
|
-
|
34371
|
-
this.survey.panelRemoved(element);
|
34417
|
+
this.survey.panelRemoved(element);
|
34372
34418
|
}
|
34373
|
-
if (!!this.removeElementCallback)
|
34374
|
-
this.removeElementCallback(element);
|
34375
|
-
this.onElementVisibilityChanged(this);
|
34376
34419
|
};
|
34377
34420
|
PanelModelBase.prototype.onElementVisibilityChanged = function (element) {
|
34378
34421
|
if (this.isLoadingFromJson || this.isRandomizing)
|
@@ -38448,7 +38491,8 @@ var ProgressButtons = /** @class */ (function (_super) {
|
|
38448
38491
|
return;
|
38449
38492
|
var listContainerElements = element.querySelectorAll(".sd-progress-buttons__connector");
|
38450
38493
|
var circleWidth = this.showItemNumbers ? 17 : 5;
|
38451
|
-
var
|
38494
|
+
var sideCorrection = this.survey.isMobile ? 0 : listContainerElement.children[0].clientWidth;
|
38495
|
+
var connectorWidth = (listContainerElement.clientWidth - sideCorrection) / (listContainerElement.children.length - 1) - circleWidth;
|
38452
38496
|
for (var i = 0; i < listContainerElements.length; i++) {
|
38453
38497
|
listContainerElements[i].style.width = connectorWidth + "px";
|
38454
38498
|
}
|
@@ -44761,23 +44805,6 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
44761
44805
|
enumerable: false,
|
44762
44806
|
configurable: true
|
44763
44807
|
});
|
44764
|
-
QuestionBooleanModel.prototype.updateThumbMargin = function () {
|
44765
|
-
var _this = this;
|
44766
|
-
if (!this.isIndeterminate && this.leftAnswerElement) {
|
44767
|
-
if (!this.swapOrder && this.value === this.getValueTrue() || this.swapOrder && this.value === this.getValueFalse()) {
|
44768
|
-
var el_1 = this.leftAnswerElement;
|
44769
|
-
setTimeout(function () {
|
44770
|
-
_this.thumbMargin = el_1.clientWidth + (_this.swapOrder ? 4 : 2) + "px";
|
44771
|
-
}, 50);
|
44772
|
-
}
|
44773
|
-
}
|
44774
|
-
this.thumbMargin = undefined;
|
44775
|
-
};
|
44776
|
-
QuestionBooleanModel.prototype.afterRender = function (el) {
|
44777
|
-
_super.prototype.afterRender.call(this, el);
|
44778
|
-
this.leftAnswerElement = el.querySelectorAll("." + this.cssClasses.sliderGhost)[0];
|
44779
|
-
this.updateThumbMargin();
|
44780
|
-
};
|
44781
44808
|
QuestionBooleanModel.prototype.beforeDestroyQuestionElement = function (el) {
|
44782
44809
|
_super.prototype.beforeDestroyQuestionElement.call(this, el);
|
44783
44810
|
this.leftAnswerElement = undefined;
|
@@ -44929,11 +44956,9 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
44929
44956
|
QuestionBooleanModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
|
44930
44957
|
if (clearData === void 0) { clearData = false; }
|
44931
44958
|
_super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
|
44932
|
-
this.updateThumbMargin();
|
44933
44959
|
};
|
44934
44960
|
QuestionBooleanModel.prototype.onValueChanged = function () {
|
44935
44961
|
_super.prototype.onValueChanged.call(this);
|
44936
|
-
this.updateThumbMargin();
|
44937
44962
|
};
|
44938
44963
|
Object.defineProperty(QuestionBooleanModel.prototype, "svgIcon", {
|
44939
44964
|
get: function () {
|
@@ -45061,12 +45086,6 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
45061
45086
|
__decorate([
|
45062
45087
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
45063
45088
|
], QuestionBooleanModel.prototype, "booleanValueRendered", void 0);
|
45064
|
-
__decorate([
|
45065
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
45066
|
-
], QuestionBooleanModel.prototype, "leftAnswerElement", void 0);
|
45067
|
-
__decorate([
|
45068
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
45069
|
-
], QuestionBooleanModel.prototype, "thumbMargin", void 0);
|
45070
45089
|
__decorate([
|
45071
45090
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
45072
45091
|
], QuestionBooleanModel.prototype, "showTitle", void 0);
|
@@ -45566,7 +45585,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
45566
45585
|
}
|
45567
45586
|
else {
|
45568
45587
|
if (this.isNoneItem(item)) {
|
45569
|
-
this.renderedValue = [item.value];
|
45588
|
+
this.renderedValue = checked ? [item.value] : [];
|
45570
45589
|
}
|
45571
45590
|
else {
|
45572
45591
|
var newValue = [].concat(this.renderedValue || []);
|
@@ -63033,9 +63052,6 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
63033
63052
|
_this.dragOrClickHelper = new _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_11__["DragOrClickHelper"](_this.startDrag);
|
63034
63053
|
return _this;
|
63035
63054
|
}
|
63036
|
-
QuestionRankingModel.prototype.getDefaultItemComponent = function () {
|
63037
|
-
return "";
|
63038
|
-
};
|
63039
63055
|
QuestionRankingModel.prototype.getType = function () {
|
63040
63056
|
return "ranking";
|
63041
63057
|
};
|
@@ -63458,19 +63474,12 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
63458
63474
|
enumerable: false,
|
63459
63475
|
configurable: true
|
63460
63476
|
});
|
63461
|
-
|
63462
|
-
|
63463
|
-
|
63464
|
-
|
63465
|
-
|
63466
|
-
|
63467
|
-
},
|
63468
|
-
set: function (value) {
|
63469
|
-
this.setPropertyValue("itemContentComponent", value);
|
63470
|
-
},
|
63471
|
-
enumerable: false,
|
63472
|
-
configurable: true
|
63473
|
-
});
|
63477
|
+
/**
|
63478
|
+
* The name of a component used to render items.
|
63479
|
+
*/
|
63480
|
+
QuestionRankingModel.prototype.getDefaultItemComponent = function () {
|
63481
|
+
return "sv-ranking-item";
|
63482
|
+
};
|
63474
63483
|
Object.defineProperty(QuestionRankingModel.prototype, "selectToRankEnabled", {
|
63475
63484
|
/**
|
63476
63485
|
* Specifies whether users can select choices they want to rank.
|
@@ -63663,8 +63672,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_3__["Serializer"].addClass("ranking", [
|
|
63663
63672
|
dependsOn: "selectToRankEnabled", visibleIf: function (obj) {
|
63664
63673
|
return !!obj.selectToRankEnabled;
|
63665
63674
|
}, isSerializable: true },
|
63666
|
-
{ name: "itemComponent", visible: false, default: "" },
|
63667
|
-
{ name: "itemContentComponent", visible: false, default: "sv-ranking-item-content" },
|
63675
|
+
{ name: "itemComponent", visible: false, default: "sv-ranking-item" },
|
63668
63676
|
], function () {
|
63669
63677
|
return new QuestionRankingModel("");
|
63670
63678
|
}, "checkbox");
|
@@ -65914,7 +65922,11 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
65914
65922
|
};
|
65915
65923
|
Object.defineProperty(QuestionTextModel.prototype, "maskTypeIsEmpty", {
|
65916
65924
|
get: function () {
|
65917
|
-
|
65925
|
+
switch (this.inputType) {
|
65926
|
+
case "tel":
|
65927
|
+
case "text": return this.maskType === "none";
|
65928
|
+
default: return true;
|
65929
|
+
}
|
65918
65930
|
},
|
65919
65931
|
enumerable: false,
|
65920
65932
|
configurable: true
|
@@ -65956,6 +65968,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
65956
65968
|
maskClassName = "masksettings";
|
65957
65969
|
}
|
65958
65970
|
var inputMask = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass(maskClassName);
|
65971
|
+
inputMask.owner = this.survey;
|
65959
65972
|
return inputMask;
|
65960
65973
|
};
|
65961
65974
|
QuestionTextModel.prototype.isTextValue = function () {
|
@@ -66652,7 +66665,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
|
|
66652
66665
|
visibleIndex: 0,
|
66653
66666
|
dependsOn: "inputType",
|
66654
66667
|
visibleIf: function (obj) {
|
66655
|
-
return obj.inputType === "text";
|
66668
|
+
return obj.inputType === "text" || obj.inputType === "tel";
|
66656
66669
|
}
|
66657
66670
|
},
|
66658
66671
|
{
|
@@ -66661,7 +66674,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
|
|
66661
66674
|
visibleIndex: 1,
|
66662
66675
|
dependsOn: "inputType",
|
66663
66676
|
visibleIf: function (obj) {
|
66664
|
-
return obj.inputType === "text";
|
66677
|
+
return obj.inputType === "text" || obj.inputType === "tel";
|
66665
66678
|
},
|
66666
66679
|
onGetValue: function (obj) {
|
66667
66680
|
return obj.maskSettings.getData();
|
@@ -67450,7 +67463,7 @@ var SurveyQuestionBoolean = /** @class */ (function (_super) {
|
|
67450
67463
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.sliderGhost, onClick: function (event) { return _this.handleOnLabelClick(event, _this.question.swapOrder); } },
|
67451
67464
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.getLabelCss(this.question.swapOrder) }, this.renderLocString(this.question.locLabelLeft))),
|
67452
67465
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.switch, onClick: this.handleOnSwitchClick },
|
67453
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.slider
|
67466
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.slider }, this.question.isDeterminated && cssClasses.sliderText ?
|
67454
67467
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.sliderText }, this.renderLocString(this.question.getCheckedLabel()))
|
67455
67468
|
: null)),
|
67456
67469
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.sliderGhost, onClick: function (event) { return _this.handleOnLabelClick(event, !_this.question.swapOrder); } },
|
@@ -67964,7 +67977,7 @@ var ComponentsContainer = /** @class */ (function (_super) {
|
|
67964
67977
|
return _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement(component.component, { survey: _this.props.survey, model: component.data, container: _this.props.container, key: component.id });
|
67965
67978
|
}));
|
67966
67979
|
}
|
67967
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "sv-components-column" }, components.map(function (component) {
|
67980
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "sv-components-column" + " sv-components-container-" + this.props.container }, components.map(function (component) {
|
67968
67981
|
return _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement(component.component, { survey: _this.props.survey, model: component.data, container: _this.props.container, key: component.id });
|
67969
67982
|
}));
|
67970
67983
|
};
|
@@ -76468,7 +76481,7 @@ var SurveyQuestionRankingItem = /** @class */ (function (_super) {
|
|
76468
76481
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.dashSvgIcon })));
|
76469
76482
|
};
|
76470
76483
|
SurveyQuestionRankingItem.prototype.renderElement = function () {
|
76471
|
-
var
|
76484
|
+
var itemContent = _element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.createElement(this.question.itemComponent, { item: this.item, cssClasses: this.cssClasses });
|
76472
76485
|
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 },
|
76473
76486
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { tabIndex: -1, style: { outline: "none" } },
|
76474
76487
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.itemGhostNode }),
|
@@ -76479,7 +76492,7 @@ var SurveyQuestionRankingItem = /** @class */ (function (_super) {
|
|
76479
76492
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.question.getIconFocusCss() },
|
76480
76493
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.arrowsSvgIcon }))),
|
76481
76494
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getItemIndexClasses(this.item) }, (!this.unrankedItem && this.indexText) ? this.indexText : this.renderEmptyIcon()),
|
76482
|
-
|
76495
|
+
itemContent))));
|
76483
76496
|
};
|
76484
76497
|
return SurveyQuestionRankingItem;
|
76485
76498
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
@@ -76509,7 +76522,7 @@ var SurveyQuestionRankingItemContent = /** @class */ (function (_super) {
|
|
76509
76522
|
return SurveyQuestionRankingItemContent;
|
76510
76523
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
76511
76524
|
|
76512
|
-
_element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.registerElement("sv-ranking-item
|
76525
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.registerElement("sv-ranking-item", function (props) {
|
76513
76526
|
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionRankingItemContent, props);
|
76514
76527
|
});
|
76515
76528
|
_reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__["ReactQuestionFactory"].Instance.registerQuestion("ranking", function (props) {
|
@@ -78090,6 +78103,7 @@ var settings = {
|
|
78090
78103
|
* This setting applies to all TagBox questions on a page. You can use the [closeOnSelect](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model#closeOnSelect) property to specify the same setting for an individual TagBox question.
|
78091
78104
|
*/
|
78092
78105
|
tagboxCloseOnSelect: false,
|
78106
|
+
dropdownSearchDelay: 500,
|
78093
78107
|
/**
|
78094
78108
|
* A function that activates a browser confirm dialog.
|
78095
78109
|
*
|
@@ -80849,7 +80863,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
80849
80863
|
*/
|
80850
80864
|
_this.onUpdatePageCssClasses = _this.addEvent();
|
80851
80865
|
/**
|
80852
|
-
* An event that is raised before rendering a choice item in Radio Button Group
|
80866
|
+
* An event that is raised before rendering a choice item in Radio Button Group and Checkboxes questions. Use it to override default CSS classes applied to choice items.
|
80853
80867
|
*
|
80854
80868
|
* For information on event handler parameters, refer to descriptions within the interface.
|
80855
80869
|
*
|
@@ -82177,6 +82191,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
82177
82191
|
* - `"onValueChanged"` - Triggers validation each time a question value is changed.
|
82178
82192
|
* - `"onComplete"` - Triggers validation when a user clicks the Complete button. If previous pages contain errors, the survey switches to the page with the first error.
|
82179
82193
|
*
|
82194
|
+
* > The `"onValueChanged"` doesn't work with date input fields because of the way browsers process date values. In most browsers, the value is considered changed as soon as a user starts entering the date in a text input field. This means that a user may only enter the day without having the chance to enter the month and year before validation is triggered. For this reason, date input fields are validated before the survey is switched to the next page or completed.
|
82195
|
+
*
|
82180
82196
|
* Refer to the following help topic for more information: [Data Validation](https://surveyjs.io/form-library/documentation/data-validation).
|
82181
82197
|
* @see validationEnabled
|
82182
82198
|
* @see validationAllowSwitchPages
|
@@ -85727,6 +85743,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
85727
85743
|
SurveyModel.prototype.getRootCss = function () {
|
85728
85744
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]()
|
85729
85745
|
.append(this.css.root)
|
85746
|
+
.append(this.css.rootProgress + "--" + this.progressBarType)
|
85730
85747
|
.append(this.css.rootMobile, this.isMobile)
|
85731
85748
|
.append(this.css.rootAnimationDisabled, !_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].animationEnabled)
|
85732
85749
|
.append(this.css.rootReadOnly, this.mode === "display" && !this.isDesignMode)
|
@@ -88629,6 +88646,15 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
88629
88646
|
}
|
88630
88647
|
};
|
88631
88648
|
SurveyModel.prototype.onScroll = function () {
|
88649
|
+
if (!!this.rootElement) {
|
88650
|
+
var topStickyContainer = this.rootElement.querySelector(".sv-components-container-center");
|
88651
|
+
if (!!topStickyContainer && topStickyContainer.getBoundingClientRect().y <= this.rootElement.getBoundingClientRect().y) {
|
88652
|
+
this.rootElement.classList && this.rootElement.classList.add("sv-root--sticky-top");
|
88653
|
+
}
|
88654
|
+
else {
|
88655
|
+
this.rootElement.classList && this.rootElement.classList.remove("sv-root--sticky-top");
|
88656
|
+
}
|
88657
|
+
}
|
88632
88658
|
if (this.onScrollCallback) {
|
88633
88659
|
this.onScrollCallback();
|
88634
88660
|
}
|
@@ -89620,7 +89646,7 @@ var TOCModel = /** @class */ (function () {
|
|
89620
89646
|
var titleElement = rootElement.querySelector(titleSelector);
|
89621
89647
|
var titleElementHeight = titleElement ? titleElement.getBoundingClientRect().height : 0;
|
89622
89648
|
var scrollCompensationHeight = rootElement.scrollTop > titleElementHeight ? 0 : titleElementHeight - rootElement.scrollTop;
|
89623
|
-
tocRootElement.style.height = (rootHeight - scrollCompensationHeight -
|
89649
|
+
tocRootElement.style.height = (rootHeight - scrollCompensationHeight - 1) + "px";
|
89624
89650
|
}
|
89625
89651
|
}
|
89626
89652
|
};
|
@@ -91427,7 +91453,7 @@ var CssClassBuilder = /** @class */ (function () {
|
|
91427
91453
|
/*!******************************!*\
|
91428
91454
|
!*** ./src/utils/devices.ts ***!
|
91429
91455
|
\******************************/
|
91430
|
-
/*! exports provided: IsMobile, mouseInfo, IsTouch, _setIsTouch */
|
91456
|
+
/*! exports provided: IsMobile, mouseInfo, IsTouch, _setIsTouch, detectMouseSupport */
|
91431
91457
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
91432
91458
|
|
91433
91459
|
"use strict";
|
@@ -91436,6 +91462,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
91436
91462
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mouseInfo", function() { return mouseInfo; });
|
91437
91463
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsTouch", function() { return IsTouch; });
|
91438
91464
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_setIsTouch", function() { return _setIsTouch; });
|
91465
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectMouseSupport", function() { return detectMouseSupport; });
|
91439
91466
|
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
|
91440
91467
|
|
91441
91468
|
// isMobile
|
@@ -91465,13 +91492,20 @@ var mouseInfo = {
|
|
91465
91492
|
},
|
91466
91493
|
hasMouse: true
|
91467
91494
|
};
|
91468
|
-
var
|
91469
|
-
mouseInfo.hasMouse =
|
91495
|
+
var matchMediaMethod = _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].matchMedia;
|
91496
|
+
mouseInfo.hasMouse = detectMouseSupport(matchMediaMethod);
|
91470
91497
|
var IsTouch = mouseInfo.isTouch;
|
91471
91498
|
//for tests
|
91472
91499
|
function _setIsTouch(val) {
|
91473
91500
|
IsTouch = val;
|
91474
91501
|
}
|
91502
|
+
function detectMouseSupport(matchMedia) {
|
91503
|
+
if (!matchMedia)
|
91504
|
+
return false;
|
91505
|
+
var pointerQuery = matchMedia("(pointer:fine)");
|
91506
|
+
var hoverQuery = matchMedia("(any-hover:hover)");
|
91507
|
+
return !!pointerQuery && pointerQuery.matches || !!hoverQuery && hoverQuery.matches;
|
91508
|
+
}
|
91475
91509
|
|
91476
91510
|
|
91477
91511
|
/***/ }),
|