survey-react 1.9.132 → 1.9.133
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 +32 -12
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +13 -1
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +13 -1
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +22 -2
- package/survey.react.js +57 -11
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.133
|
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
|
*/
|
@@ -4791,6 +4791,7 @@ var modernCss = {
|
|
4791
4791
|
cell: "sv-table__cell",
|
4792
4792
|
headerCell: "sv-table__cell sv-table__cell--header",
|
4793
4793
|
row: "sv-table__row",
|
4794
|
+
rowTextCell: "sv-table__cell--row-text",
|
4794
4795
|
rowAdditional: "sv-table__row--additional",
|
4795
4796
|
detailRow: "sv-table__row--detail",
|
4796
4797
|
detailRowText: "sv-table__cell--detail-rowtext",
|
@@ -5137,6 +5138,7 @@ var defaultStandardCss = {
|
|
5137
5138
|
headerCell: "sv_matrix_cell_header",
|
5138
5139
|
row: "sv_matrix_row",
|
5139
5140
|
rowAdditional: "sv-matrix__row--additional",
|
5141
|
+
rowTextCell: "sv-table__cell--row-text",
|
5140
5142
|
detailRow: "sv_matrix_detail_row",
|
5141
5143
|
detailRowText: "sv_matrix_cell_detail_rowtext",
|
5142
5144
|
detailCell: "sv_matrix_cell_detail",
|
@@ -5495,6 +5497,7 @@ var defaultV2Css = {
|
|
5495
5497
|
progressText: "sd-progress__text",
|
5496
5498
|
progressButtonsRoot: "sd-progress-buttons",
|
5497
5499
|
progressButtonsNumbered: "sd-progress-buttons--numbered",
|
5500
|
+
progressButtonsFitSurveyWidth: "sd-progress-buttons--fit-survey-width",
|
5498
5501
|
progressButtonsContainerCenter: "sd-progress-buttons__container-center",
|
5499
5502
|
progressButtonsContainer: "sd-progress-buttons__container",
|
5500
5503
|
progressButtonsConnector: "sd-progress-buttons__connector",
|
@@ -9549,8 +9552,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9549
9552
|
//import "../../modern.scss";
|
9550
9553
|
var Version;
|
9551
9554
|
var ReleaseDate;
|
9552
|
-
Version = "" + "1.9.
|
9553
|
-
ReleaseDate = "" + "2024-
|
9555
|
+
Version = "" + "1.9.133";
|
9556
|
+
ReleaseDate = "" + "2024-03-05";
|
9554
9557
|
function checkLibraryVersion(ver, libraryName) {
|
9555
9558
|
if (Version != ver) {
|
9556
9559
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -16407,9 +16410,11 @@ function age(params) {
|
|
16407
16410
|
var birthDate = new Date(params[0]);
|
16408
16411
|
var today = new Date();
|
16409
16412
|
var age = today.getFullYear() - birthDate.getFullYear();
|
16410
|
-
|
16411
|
-
|
16412
|
-
|
16413
|
+
if (age > 0) {
|
16414
|
+
var m = today.getMonth() - birthDate.getMonth();
|
16415
|
+
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
|
16416
|
+
age -= 1;
|
16417
|
+
}
|
16413
16418
|
}
|
16414
16419
|
return age;
|
16415
16420
|
}
|
@@ -35517,6 +35522,9 @@ var ProgressButtons = /** @class */ (function (_super) {
|
|
35517
35522
|
if (this.showItemNumbers && this.survey.css.progressButtonsNumbered) {
|
35518
35523
|
result += " " + this.survey.css.progressButtonsNumbered;
|
35519
35524
|
}
|
35525
|
+
if (this.isFitToSurveyWidth) {
|
35526
|
+
result += " " + this.survey.css.progressButtonsFitSurveyWidth;
|
35527
|
+
}
|
35520
35528
|
return result;
|
35521
35529
|
};
|
35522
35530
|
ProgressButtons.prototype.getListElementCss = function (index) {
|
@@ -35574,11 +35582,32 @@ var ProgressButtons = /** @class */ (function (_super) {
|
|
35574
35582
|
if (!listContainerElement)
|
35575
35583
|
return;
|
35576
35584
|
var listContainerElements = element.querySelectorAll(".sd-progress-buttons__connector");
|
35577
|
-
var
|
35585
|
+
var circleWidth = this.showItemNumbers ? 17 : 7;
|
35586
|
+
var connectorWidth = listContainerElement.clientWidth / (listContainerElement.children.length - 1) - circleWidth;
|
35578
35587
|
for (var i = 0; i < listContainerElements.length; i++) {
|
35579
35588
|
listContainerElements[i].style.width = connectorWidth + "px";
|
35580
35589
|
}
|
35581
35590
|
};
|
35591
|
+
Object.defineProperty(ProgressButtons.prototype, "isFitToSurveyWidth", {
|
35592
|
+
get: function () {
|
35593
|
+
if (_defaultCss_defaultV2Css__WEBPACK_IMPORTED_MODULE_1__["surveyCss"].currentType !== "defaultV2") {
|
35594
|
+
return false;
|
35595
|
+
}
|
35596
|
+
return this.survey.progressBarInheritWidthFrom === "survey" && this.survey.widthMode == "static";
|
35597
|
+
},
|
35598
|
+
enumerable: false,
|
35599
|
+
configurable: true
|
35600
|
+
});
|
35601
|
+
Object.defineProperty(ProgressButtons.prototype, "progressWidth", {
|
35602
|
+
get: function () {
|
35603
|
+
if (this.isFitToSurveyWidth) {
|
35604
|
+
return this.survey.width;
|
35605
|
+
}
|
35606
|
+
return "";
|
35607
|
+
},
|
35608
|
+
enumerable: false,
|
35609
|
+
configurable: true
|
35610
|
+
});
|
35582
35611
|
Object.defineProperty(ProgressButtons.prototype, "showItemNumbers", {
|
35583
35612
|
get: function () {
|
35584
35613
|
if (_defaultCss_defaultV2Css__WEBPACK_IMPORTED_MODULE_1__["surveyCss"].currentType !== "defaultV2") {
|
@@ -56144,7 +56173,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletextite
|
|
56144
56173
|
});
|
56145
56174
|
_jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletext", [
|
56146
56175
|
{ name: "!items:textitems", className: "multipletextitem", isArray: true },
|
56147
|
-
{ name: "itemSize:number", minValue: 0 },
|
56176
|
+
{ name: "itemSize:number", minValue: 0, visible: false },
|
56148
56177
|
{ name: "colCount:number", default: 1, choices: [1, 2, 3, 4, 5] },
|
56149
56178
|
{ name: "itemErrorLocation", default: "default", choices: ["default", "top", "bottom"], visible: false },
|
56150
56179
|
{ name: "itemTitleWidth", category: "layout" }
|
@@ -60206,6 +60235,9 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
60206
60235
|
else {
|
60207
60236
|
rateValues = this.createRateValues();
|
60208
60237
|
}
|
60238
|
+
if (this.autoGenerate) {
|
60239
|
+
this.rateMax = rateValues[rateValues.length - 1].value;
|
60240
|
+
}
|
60209
60241
|
if (this.rateType == "smileys" && rateValues.length > 10)
|
60210
60242
|
rateValues = rateValues.slice(0, 10);
|
60211
60243
|
this.renderedRateItems = rateValues.map(function (v, i) {
|
@@ -67763,7 +67795,7 @@ var SurveyProgressButtons = /** @class */ (function (_super) {
|
|
67763
67795
|
};
|
67764
67796
|
SurveyProgressButtons.prototype.render = function () {
|
67765
67797
|
var _this = this;
|
67766
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.model.getRootCss(this.props.container), role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": "progress" },
|
67798
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.model.getRootCss(this.props.container), style: { "maxWidth": this.model.progressWidth }, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": "progress" },
|
67767
67799
|
this.state.canShowHeader ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsHeader },
|
67768
67800
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsPageTitle, title: this.model.headerText }, this.model.headerText)) : null,
|
67769
67801
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsContainer },
|
@@ -76498,7 +76530,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
76498
76530
|
_this.registerPropertyChangedHandlers(["questionStartIndex", "requiredText", "questionTitlePattern"], function () {
|
76499
76531
|
_this.resetVisibleIndexes();
|
76500
76532
|
});
|
76501
|
-
_this.registerPropertyChangedHandlers(["isLoading", "isCompleted", "isCompletedBefore", "mode", "isStartedState", "currentPage"], function () { _this.updateState(); });
|
76533
|
+
_this.registerPropertyChangedHandlers(["isLoading", "isCompleted", "isCompletedBefore", "mode", "isStartedState", "currentPage", "isShowingPreview"], function () { _this.updateState(); });
|
76502
76534
|
_this.registerPropertyChangedHandlers(["state", "currentPage", "showPreviewBeforeComplete"], function () { _this.onStateAndCurrentPageChanged(); });
|
76503
76535
|
_this.registerPropertyChangedHandlers(["logo", "logoPosition"], function () { _this.updateHasLogo(); });
|
76504
76536
|
_this.registerPropertyChangedHandlers(["backgroundImage"], function () { _this.updateRenderBackgroundImage(); });
|
@@ -77414,7 +77446,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
77414
77446
|
* @see [`settings.autoAdvanceDelay`](https://surveyjs.io/form-library/documentation/api-reference/settings#autoAdvanceDelay)
|
77415
77447
|
*/
|
77416
77448
|
get: function () {
|
77417
|
-
return this.getPropertyValue("allowCompleteSurveyAutomatic"
|
77449
|
+
return this.getPropertyValue("allowCompleteSurveyAutomatic");
|
77418
77450
|
},
|
77419
77451
|
set: function (val) {
|
77420
77452
|
this.setPropertyValue("allowCompleteSurveyAutomatic", val);
|
@@ -83962,6 +83994,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
83962
83994
|
__decorate([
|
83963
83995
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
83964
83996
|
], SurveyModel.prototype, "progressBarShowPageNumbers", void 0);
|
83997
|
+
__decorate([
|
83998
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
83999
|
+
], SurveyModel.prototype, "progressBarInheritWidthFrom", void 0);
|
83965
84000
|
__decorate([
|
83966
84001
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
83967
84002
|
], SurveyModel.prototype, "rootCss", void 0);
|
@@ -84125,6 +84160,13 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
84125
84160
|
category: "navigation",
|
84126
84161
|
visibleIf: function (obj) { return obj.showProgressBar !== "off" && obj.progressBarType === "pages"; }
|
84127
84162
|
},
|
84163
|
+
{
|
84164
|
+
name: "progressBarInheritWidthFrom",
|
84165
|
+
default: "container",
|
84166
|
+
choices: ["container", "survey"],
|
84167
|
+
category: "navigation",
|
84168
|
+
visibleIf: function (obj) { return obj.showProgressBar !== "off" && obj.progressBarType === "pages"; }
|
84169
|
+
},
|
84128
84170
|
{
|
84129
84171
|
name: "showTOC:switch",
|
84130
84172
|
default: false
|
@@ -84147,6 +84189,10 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
84147
84189
|
obj.setPropertyValue("goNextPageAutomatic", value);
|
84148
84190
|
}
|
84149
84191
|
},
|
84192
|
+
{
|
84193
|
+
name: "allowCompleteSurveyAutomatic:boolean", default: true,
|
84194
|
+
visibleIf: function (obj) { return obj.goNextPageAutomatic === true; }
|
84195
|
+
},
|
84150
84196
|
{
|
84151
84197
|
name: "clearInvisibleValues",
|
84152
84198
|
default: "onComplete",
|