survey-react 1.9.85 → 1.9.86
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 +102 -106
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +49 -51
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +19 -19
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +59 -6
- package/survey.react.js +121 -59
- 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.86
|
3
3
|
* Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -2578,6 +2578,9 @@ var Base = /** @class */ (function () {
|
|
2578
2578
|
if (defaultValue === void 0) { defaultValue = null; }
|
2579
2579
|
var res = this.getPropertyValueCore(this.propertyHash, name);
|
2580
2580
|
if (this.isPropertyEmpty(res)) {
|
2581
|
+
var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
|
2582
|
+
if (locStr)
|
2583
|
+
return locStr.text;
|
2581
2584
|
if (defaultValue != null)
|
2582
2585
|
return defaultValue;
|
2583
2586
|
var propDefaultValue = this.getDefaultValueFromProperty(name);
|
@@ -8471,10 +8474,10 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8471
8474
|
}
|
8472
8475
|
this.scrollToFocusedItem();
|
8473
8476
|
if (this.question.value && !this.listModel.filterString && this.question.searchEnabled && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"]) {
|
8474
|
-
this.applyInputString(this.listModel.focusedItem);
|
8477
|
+
this.applyInputString(this.listModel.focusedItem || this.question.selectedItem);
|
8475
8478
|
}
|
8476
8479
|
else {
|
8477
|
-
this.applyHintString(this.listModel.focusedItem);
|
8480
|
+
this.applyHintString(this.listModel.focusedItem || this.question.selectedItem);
|
8478
8481
|
}
|
8479
8482
|
this.ariaActivedescendant = (_a = this.listModel.focusedItem) === null || _a === void 0 ? void 0 : _a.elementId;
|
8480
8483
|
};
|
@@ -9588,7 +9591,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
9588
9591
|
// import "../../main.scss";
|
9589
9592
|
//import "../../modern.scss";
|
9590
9593
|
var Version;
|
9591
|
-
Version = "" + "1.9.
|
9594
|
+
Version = "" + "1.9.86";
|
9592
9595
|
function checkLibraryVersion(ver, libraryName) {
|
9593
9596
|
if (Version != ver) {
|
9594
9597
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -19708,10 +19711,10 @@ var ListModel = /** @class */ (function (_super) {
|
|
19708
19711
|
});
|
19709
19712
|
ListModel.prototype.onFilterStringChanged = function (text) {
|
19710
19713
|
var _this = this;
|
19711
|
-
this.isEmpty = this.renderedActions.filter(function (action) { return _this.isItemVisible(action); }).length === 0;
|
19712
19714
|
if (!!this.onFilterStringChangedCallback) {
|
19713
19715
|
this.onFilterStringChangedCallback(text);
|
19714
19716
|
}
|
19717
|
+
this.isEmpty = this.renderedActions.filter(function (action) { return _this.isItemVisible(action); }).length === 0;
|
19715
19718
|
};
|
19716
19719
|
ListModel.prototype.scrollToItem = function (selector, ms) {
|
19717
19720
|
var _this = this;
|
@@ -20161,9 +20164,7 @@ var LocalizableString = /** @class */ (function () {
|
|
20161
20164
|
return res;
|
20162
20165
|
};
|
20163
20166
|
LocalizableString.prototype.setLocaleText = function (loc, value) {
|
20164
|
-
|
20165
|
-
loc = _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].defaultLocaleName;
|
20166
|
-
}
|
20167
|
+
loc = this.getValueLoc(loc);
|
20167
20168
|
if (!this.storeDefaultText && value == this.getLocaleTextWithDefault(loc)) {
|
20168
20169
|
if (!!value || !!loc && loc !== this.defaultLoc)
|
20169
20170
|
return;
|
@@ -20368,19 +20369,24 @@ var LocalizableString = /** @class */ (function () {
|
|
20368
20369
|
LocalizableString.prototype.getValue = function (loc) {
|
20369
20370
|
if (!!this.sharedData)
|
20370
20371
|
return this.sharedData.getValue(loc);
|
20371
|
-
return this.values[loc];
|
20372
|
+
return this.values[this.getValueLoc(loc)];
|
20372
20373
|
};
|
20373
20374
|
LocalizableString.prototype.setValue = function (loc, value) {
|
20374
20375
|
if (!!this.sharedData)
|
20375
20376
|
this.sharedData.setValue(loc, value);
|
20376
20377
|
else
|
20377
|
-
this.values[loc] = value;
|
20378
|
+
this.values[this.getValueLoc(loc)] = value;
|
20378
20379
|
};
|
20379
20380
|
LocalizableString.prototype.deleteValue = function (loc) {
|
20380
20381
|
if (!!this.sharedData)
|
20381
20382
|
this.sharedData.deleteValue(loc);
|
20382
20383
|
else
|
20383
|
-
delete this.values[loc];
|
20384
|
+
delete this.values[this.getValueLoc(loc)];
|
20385
|
+
};
|
20386
|
+
LocalizableString.prototype.getValueLoc = function (loc) {
|
20387
|
+
if (this.disableLocalization)
|
20388
|
+
return _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].defaultLocaleName;
|
20389
|
+
return loc;
|
20384
20390
|
};
|
20385
20391
|
LocalizableString.prototype.getValuesKeys = function () {
|
20386
20392
|
if (!!this.sharedData)
|
@@ -27010,8 +27016,11 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
27010
27016
|
el.renderWidth = this.getRenderedWidthFromWidth(width);
|
27011
27017
|
preSetWidthElements.push(el);
|
27012
27018
|
}
|
27013
|
-
if (!(this.panel.isDefaultV2Theme || ((_a = this.panel.parentQuestion) === null || _a === void 0 ? void 0 : _a.isDefaultV2Theme))) {
|
27014
|
-
el.rightIndent =
|
27019
|
+
if (counter < visCount - 1 && !(this.panel.isDefaultV2Theme || ((_a = this.panel.parentQuestion) === null || _a === void 0 ? void 0 : _a.isDefaultV2Theme))) {
|
27020
|
+
el.rightIndent = 1;
|
27021
|
+
}
|
27022
|
+
else {
|
27023
|
+
el.rightIndent = 0;
|
27015
27024
|
}
|
27016
27025
|
counter++;
|
27017
27026
|
}
|
@@ -28801,8 +28810,19 @@ var PanelModel = /** @class */ (function (_super) {
|
|
28801
28810
|
enumerable: false,
|
28802
28811
|
configurable: true
|
28803
28812
|
});
|
28813
|
+
Object.defineProperty(PanelModel.prototype, "showErrorsAbovePanel", {
|
28814
|
+
get: function () {
|
28815
|
+
return this.isDefaultV2Theme;
|
28816
|
+
},
|
28817
|
+
enumerable: false,
|
28818
|
+
configurable: true
|
28819
|
+
});
|
28804
28820
|
PanelModel.prototype.getCssError = function (cssClasses) {
|
28805
|
-
var
|
28821
|
+
var isDefaultV2Theme = this.isDefaultV2Theme;
|
28822
|
+
var builder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
|
28823
|
+
.append(this.cssClasses.error.root)
|
28824
|
+
.append(this.cssClasses.error.outsideQuestion, isDefaultV2Theme)
|
28825
|
+
.append(this.cssClasses.error.aboveQuestion, isDefaultV2Theme);
|
28806
28826
|
return builder.append("panel-error-root", builder.isEmpty()).toString();
|
28807
28827
|
};
|
28808
28828
|
PanelModel.prototype.onVisibleChanged = function () {
|
@@ -34856,21 +34876,40 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
34856
34876
|
return this.hasUnknownValue(val, true, false);
|
34857
34877
|
};
|
34858
34878
|
QuestionSelectBase.prototype.updateSelectedItemValues = function () {
|
34879
|
+
var IsMultipleValue = this.getIsMultipleValue();
|
34880
|
+
if (IsMultipleValue) {
|
34881
|
+
this.updateMultipleSelectedItemValues();
|
34882
|
+
}
|
34883
|
+
else {
|
34884
|
+
this.updateSingleSelectedItemValues();
|
34885
|
+
}
|
34886
|
+
};
|
34887
|
+
QuestionSelectBase.prototype.updateSingleSelectedItemValues = function () {
|
34859
34888
|
var _this = this;
|
34860
|
-
if (!!this.survey && !this.isEmpty() && this.choices.
|
34861
|
-
var IsMultipleValue_1 = this.getIsMultipleValue();
|
34889
|
+
if (!!this.survey && !this.isEmpty() && !_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(this.choices, this.value)) {
|
34862
34890
|
this.survey.getChoiceDisplayValue({
|
34863
34891
|
question: this,
|
34864
|
-
values:
|
34892
|
+
values: [this.value],
|
34865
34893
|
setItems: function (displayValues) {
|
34866
34894
|
if (!displayValues || !displayValues.length)
|
34867
34895
|
return;
|
34868
|
-
|
34869
|
-
|
34870
|
-
|
34871
|
-
|
34872
|
-
|
34873
|
-
|
34896
|
+
_this.selectedItemValues = _this.createItemValue(_this.value, displayValues[0]);
|
34897
|
+
}
|
34898
|
+
});
|
34899
|
+
}
|
34900
|
+
};
|
34901
|
+
QuestionSelectBase.prototype.updateMultipleSelectedItemValues = function () {
|
34902
|
+
var _this = this;
|
34903
|
+
var valueArray = this.value;
|
34904
|
+
var hasItemWithValues = valueArray.some(function (val) { return !_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(_this.choices, val); });
|
34905
|
+
if (!!this.survey && !this.isEmpty() && hasItemWithValues) {
|
34906
|
+
this.survey.getChoiceDisplayValue({
|
34907
|
+
question: this,
|
34908
|
+
values: valueArray,
|
34909
|
+
setItems: function (displayValues) {
|
34910
|
+
if (!displayValues || !displayValues.length)
|
34911
|
+
return;
|
34912
|
+
_this.selectedItemValues = displayValues.map(function (displayValue, index) { return _this.createItemValue(_this.value[index], displayValue); });
|
34874
34913
|
}
|
34875
34914
|
});
|
34876
34915
|
}
|
@@ -51503,7 +51542,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
51503
51542
|
_this.createLocalizableString("ratingOptionsCaption", _this, false, true);
|
51504
51543
|
_this.registerFunctionOnPropertiesValueChanged(["rateMin", "rateMax",
|
51505
51544
|
"minRateDescription", "maxRateDescription", "rateStep", "displayRateDescriptionsAsExtremeItems"], function () { return _this.createRenderedRateItems(); });
|
51506
|
-
_this.registerFunctionOnPropertiesValueChanged(["
|
51545
|
+
_this.registerFunctionOnPropertiesValueChanged(["rateType"], function () {
|
51507
51546
|
_this.setIconsToRateValues();
|
51508
51547
|
_this.createRenderedRateItems();
|
51509
51548
|
_this.updateRateCount();
|
@@ -51636,6 +51675,8 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
51636
51675
|
* If you need to specify only the `value` property, you can set the `rateValues` property to an array of numbers, for example, `[ 3, 6, 10 ]`. These values are both saved in survey results and used as display text.
|
51637
51676
|
*
|
51638
51677
|
* If you do not specify the `rateValues` property, rate values are generated automatically based upon the [`rateMin`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMin), [`rateMax`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMax), [`rateStep`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateStep), and [`rateCount`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateCount) property values.
|
51678
|
+
*
|
51679
|
+
* [View Demo](/form-library/examples/rating-scale/ (linkStyle))
|
51639
51680
|
*/
|
51640
51681
|
get: function () {
|
51641
51682
|
return this.getPropertyValue("rateValues");
|
@@ -51652,6 +51693,8 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
51652
51693
|
* Specifies the first rate value in the generated sequence of rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
|
51653
51694
|
*
|
51654
51695
|
* Default value: 1
|
51696
|
+
*
|
51697
|
+
* [View Demo](/form-library/examples/rating-scale/ (linkStyle))
|
51655
51698
|
* @see rateMax
|
51656
51699
|
* @see rateStep
|
51657
51700
|
* @see rateCount
|
@@ -51670,6 +51713,8 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
51670
51713
|
* Specifies the last rate value in the generated sequence of rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
|
51671
51714
|
*
|
51672
51715
|
* Default value: 5
|
51716
|
+
*
|
51717
|
+
* [View Demo](/form-library/examples/rating-scale/ (linkStyle))
|
51673
51718
|
* @see rateMin
|
51674
51719
|
* @see rateStep
|
51675
51720
|
* @see rateCount
|
@@ -51688,6 +51733,8 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
51688
51733
|
* Specifies a step with which to generate rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
|
51689
51734
|
*
|
51690
51735
|
* Default value: 1
|
51736
|
+
*
|
51737
|
+
* [View Demo](/form-library/examples/rating-scale/ (linkStyle))
|
51691
51738
|
* @see rateMin
|
51692
51739
|
* @see rateMax
|
51693
51740
|
* @see rateCount
|
@@ -51874,12 +51921,12 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
51874
51921
|
enumerable: false,
|
51875
51922
|
configurable: true
|
51876
51923
|
});
|
51877
|
-
Object.defineProperty(QuestionRatingModel.prototype, "
|
51924
|
+
Object.defineProperty(QuestionRatingModel.prototype, "rateDisplayMode", {
|
51878
51925
|
get: function () {
|
51879
|
-
return this.
|
51926
|
+
return this.rateType;
|
51880
51927
|
},
|
51881
51928
|
set: function (val) {
|
51882
|
-
this.
|
51929
|
+
this.rateType = val;
|
51883
51930
|
},
|
51884
51931
|
enumerable: false,
|
51885
51932
|
configurable: true
|
@@ -52234,7 +52281,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
52234
52281
|
], QuestionRatingModel.prototype, "displayMode", void 0);
|
52235
52282
|
__decorate([
|
52236
52283
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "labels" })
|
52237
|
-
], QuestionRatingModel.prototype, "
|
52284
|
+
], QuestionRatingModel.prototype, "rateType", void 0);
|
52238
52285
|
__decorate([
|
52239
52286
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "monochrome" })
|
52240
52287
|
], QuestionRatingModel.prototype, "scaleColorMode", void 0);
|
@@ -52247,8 +52294,8 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
52247
52294
|
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("rating", [
|
52248
52295
|
{ name: "showCommentArea:switch", layout: "row", visible: true, category: "general" },
|
52249
52296
|
{
|
52250
|
-
name: "
|
52251
|
-
alternativeName: "
|
52297
|
+
name: "rateType",
|
52298
|
+
alternativeName: "rateDisplayMode",
|
52252
52299
|
default: "labels",
|
52253
52300
|
category: "rateValues",
|
52254
52301
|
choices: ["labels", "stars", "smileys"],
|
@@ -52358,6 +52405,9 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("rating", [
|
|
52358
52405
|
name: "displayMode",
|
52359
52406
|
default: "auto",
|
52360
52407
|
choices: ["auto", "buttons", "dropdown"],
|
52408
|
+
visibleIf: function (obj) {
|
52409
|
+
return obj.rateType == "labels";
|
52410
|
+
},
|
52361
52411
|
visibleIndex: 20
|
52362
52412
|
}
|
52363
52413
|
], function () {
|
@@ -53585,6 +53635,12 @@ function getCorrectMinMax(obj, min, max, isMax) {
|
|
53585
53635
|
return isMax ? min : max;
|
53586
53636
|
return val;
|
53587
53637
|
}
|
53638
|
+
function propertyEditorMinMaxUpdate(obj, propertyEditor) {
|
53639
|
+
if (!!obj && !!obj.inputType) {
|
53640
|
+
propertyEditor.inputType = obj.inputType !== "range" ? obj.inputType : "number";
|
53641
|
+
propertyEditor.textUpdateMode = "onBlur";
|
53642
|
+
}
|
53643
|
+
}
|
53588
53644
|
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
|
53589
53645
|
{
|
53590
53646
|
name: "inputType",
|
@@ -53624,9 +53680,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
|
|
53624
53680
|
return isMinMaxType(obj);
|
53625
53681
|
},
|
53626
53682
|
onPropertyEditorUpdate: function (obj, propertyEditor) {
|
53627
|
-
|
53628
|
-
propertyEditor.inputType = obj.inputType !== "range" ? obj.inputType : "number";
|
53629
|
-
}
|
53683
|
+
propertyEditorMinMaxUpdate(obj, propertyEditor);
|
53630
53684
|
},
|
53631
53685
|
onSettingValue: function (obj, val) {
|
53632
53686
|
return getCorrectMinMax(obj, val, obj.max, false);
|
@@ -53643,9 +53697,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
|
|
53643
53697
|
return getCorrectMinMax(obj, obj.min, val, true);
|
53644
53698
|
},
|
53645
53699
|
onPropertyEditorUpdate: function (obj, propertyEditor) {
|
53646
|
-
|
53647
|
-
propertyEditor.inputType = obj.inputType !== "range" ? obj.inputType : "number";
|
53648
|
-
}
|
53700
|
+
propertyEditorMinMaxUpdate(obj, propertyEditor);
|
53649
53701
|
},
|
53650
53702
|
},
|
53651
53703
|
{
|
@@ -53946,10 +53998,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
53946
53998
|
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
|
53947
53999
|
|
53948
54000
|
|
53949
|
-
//TODO replace completely with ElementFactory
|
53950
54001
|
var QuestionFactory = /** @class */ (function () {
|
53951
54002
|
function QuestionFactory() {
|
53952
|
-
this.creatorHash = {};
|
53953
54003
|
}
|
53954
54004
|
Object.defineProperty(QuestionFactory, "DefaultChoices", {
|
53955
54005
|
get: function () {
|
@@ -53987,26 +54037,23 @@ var QuestionFactory = /** @class */ (function () {
|
|
53987
54037
|
configurable: true
|
53988
54038
|
});
|
53989
54039
|
QuestionFactory.prototype.registerQuestion = function (questionType, questionCreator) {
|
53990
|
-
|
54040
|
+
ElementFactory.Instance.registerElement(questionType, questionCreator);
|
53991
54041
|
};
|
53992
|
-
QuestionFactory.prototype.
|
53993
|
-
|
54042
|
+
QuestionFactory.prototype.registerCustomQuestion = function (questionType) {
|
54043
|
+
ElementFactory.Instance.registerCustomQuestion(questionType);
|
54044
|
+
};
|
54045
|
+
QuestionFactory.prototype.unregisterElement = function (elementType, removeFromSerializer) {
|
54046
|
+
if (removeFromSerializer === void 0) { removeFromSerializer = false; }
|
54047
|
+
ElementFactory.Instance.unregisterElement(elementType, removeFromSerializer);
|
53994
54048
|
};
|
53995
54049
|
QuestionFactory.prototype.clear = function () {
|
53996
|
-
|
54050
|
+
ElementFactory.Instance.clear();
|
53997
54051
|
};
|
53998
54052
|
QuestionFactory.prototype.getAllTypes = function () {
|
53999
|
-
|
54000
|
-
for (var key in this.creatorHash) {
|
54001
|
-
result.push(key);
|
54002
|
-
}
|
54003
|
-
return result.sort();
|
54053
|
+
return ElementFactory.Instance.getAllTypes();
|
54004
54054
|
};
|
54005
54055
|
QuestionFactory.prototype.createQuestion = function (questionType, name) {
|
54006
|
-
|
54007
|
-
if (creator == null)
|
54008
|
-
return null;
|
54009
|
-
return creator(name);
|
54056
|
+
return ElementFactory.Instance.createElement(questionType, name);
|
54010
54057
|
};
|
54011
54058
|
QuestionFactory.Instance = new QuestionFactory();
|
54012
54059
|
return QuestionFactory;
|
@@ -54014,7 +54061,17 @@ var QuestionFactory = /** @class */ (function () {
|
|
54014
54061
|
|
54015
54062
|
var ElementFactory = /** @class */ (function () {
|
54016
54063
|
function ElementFactory() {
|
54064
|
+
var _this = this;
|
54017
54065
|
this.creatorHash = {};
|
54066
|
+
this.registerCustomQuestion = function (questionType) {
|
54067
|
+
var creator = function (name) {
|
54068
|
+
var el = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass(questionType);
|
54069
|
+
if (!!el)
|
54070
|
+
el.name = name;
|
54071
|
+
return el;
|
54072
|
+
};
|
54073
|
+
_this.registerElement(questionType, creator);
|
54074
|
+
};
|
54018
54075
|
}
|
54019
54076
|
ElementFactory.prototype.registerElement = function (elementType, elementCreator) {
|
54020
54077
|
this.creatorHash[elementType] = elementCreator;
|
@@ -54025,13 +54082,12 @@ var ElementFactory = /** @class */ (function () {
|
|
54025
54082
|
ElementFactory.prototype.unregisterElement = function (elementType, removeFromSerializer) {
|
54026
54083
|
if (removeFromSerializer === void 0) { removeFromSerializer = false; }
|
54027
54084
|
delete this.creatorHash[elementType];
|
54028
|
-
QuestionFactory.Instance.unregisterElement(elementType);
|
54029
54085
|
if (removeFromSerializer) {
|
54030
54086
|
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].removeClass(elementType);
|
54031
54087
|
}
|
54032
54088
|
};
|
54033
54089
|
ElementFactory.prototype.getAllTypes = function () {
|
54034
|
-
var result =
|
54090
|
+
var result = new Array();
|
54035
54091
|
for (var key in this.creatorHash) {
|
54036
54092
|
result.push(key);
|
54037
54093
|
}
|
@@ -54039,9 +54095,9 @@ var ElementFactory = /** @class */ (function () {
|
|
54039
54095
|
};
|
54040
54096
|
ElementFactory.prototype.createElement = function (elementType, name) {
|
54041
54097
|
var creator = this.creatorHash[elementType];
|
54042
|
-
if (creator
|
54043
|
-
return
|
54044
|
-
return
|
54098
|
+
if (!!creator)
|
54099
|
+
return creator(name);
|
54100
|
+
return null;
|
54045
54101
|
};
|
54046
54102
|
ElementFactory.Instance = new ElementFactory();
|
54047
54103
|
return ElementFactory;
|
@@ -58149,8 +58205,9 @@ var SurveyPanel = /** @class */ (function (_super) {
|
|
58149
58205
|
_this.panelBase.focusIn();
|
58150
58206
|
};
|
58151
58207
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { ref: this.rootRef, className: this.panelBase.getContainerCss(), onFocus: focusIn, id: this.panelBase.id },
|
58208
|
+
this.panel.showErrorsAbovePanel ? errors : null,
|
58152
58209
|
header,
|
58153
|
-
errors,
|
58210
|
+
this.panel.showErrorsAbovePanel ? null : errors,
|
58154
58211
|
content));
|
58155
58212
|
};
|
58156
58213
|
SurveyPanel.prototype.renderHeader = function () {
|
@@ -58512,7 +58569,8 @@ var Survey = /** @class */ (function (_super) {
|
|
58512
58569
|
var rootCss = this.survey.getRootCss();
|
58513
58570
|
var cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
|
58514
58571
|
var rootStyle = {
|
58515
|
-
backgroundImage: this.survey.renderBackgroundImage
|
58572
|
+
backgroundImage: this.survey.renderBackgroundImage,
|
58573
|
+
backgroundSize: this.survey.backgroundImageFit
|
58516
58574
|
};
|
58517
58575
|
var formStyle = {
|
58518
58576
|
backgroundColor: this.survey.renderBackgroundOpacity
|
@@ -71380,7 +71438,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
71380
71438
|
values[name] = this.getValue(name);
|
71381
71439
|
}
|
71382
71440
|
this.addCalculatedValuesIntoFilteredValues(values);
|
71383
|
-
this.checkTriggers(values, true);
|
71441
|
+
this.checkTriggers(values, true, isOnComplete);
|
71384
71442
|
};
|
71385
71443
|
SurveyModel.prototype.getCurrentPageQuestions = function (includeInvsible) {
|
71386
71444
|
if (includeInvsible === void 0) { includeInvsible = false; }
|
@@ -73095,6 +73153,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
73095
73153
|
__decorate([
|
73096
73154
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
73097
73155
|
], SurveyModel.prototype, "renderBackgroundImage", void 0);
|
73156
|
+
__decorate([
|
73157
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
73158
|
+
], SurveyModel.prototype, "backgroundImageFit", void 0);
|
73098
73159
|
__decorate([
|
73099
73160
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
73100
73161
|
], SurveyModel.prototype, "rootCss", void 0);
|
@@ -73341,6 +73402,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
73341
73402
|
},
|
73342
73403
|
"width",
|
73343
73404
|
{ name: "backgroundImage", serializationProperty: "locBackgroundImage", visible: false },
|
73405
|
+
{ name: "backgroundImageFit", default: "cover", choices: ["auto", "contain", "cover"], visible: false },
|
73344
73406
|
{ name: "backgroundOpacity:number", minValue: 0, maxValue: 1, default: 1, visible: false },
|
73345
73407
|
{ name: "showBrandInfo:boolean", default: false, visible: false }
|
73346
73408
|
]);
|