survey-react 1.10.3 → 1.10.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 +3 -1
- 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 +13 -2
- package/survey.react.js +130 -73
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/modern.css
CHANGED
package/modern.min.css
CHANGED
package/package.json
CHANGED
package/survey.css
CHANGED
package/survey.min.css
CHANGED
package/survey.react.d.ts
CHANGED
@@ -3926,7 +3926,6 @@ declare module "question_file" {
|
|
3926
3926
|
private onChange;
|
3927
3927
|
protected onChangeQuestionValue(newValue: any): void;
|
3928
3928
|
protected calcCssClasses(css: any): any;
|
3929
|
-
updateElementCss(reNew?: boolean): void;
|
3930
3929
|
onSurveyLoad(): void;
|
3931
3930
|
protected needResponsiveness(): boolean;
|
3932
3931
|
protected supportResponsiveness(): boolean;
|
@@ -5889,6 +5888,7 @@ declare module "question_matrixdynamic" {
|
|
5889
5888
|
private lastDeletedRow;
|
5890
5889
|
private getInsertedDeletedIndex;
|
5891
5890
|
private isEditingObjectValueChanged;
|
5891
|
+
updateValueFromSurvey(newValue: any, clearData?: boolean): void;
|
5892
5892
|
protected onBeforeValueChanged(val: any): void;
|
5893
5893
|
protected createNewValue(): any;
|
5894
5894
|
protected deleteRowValue(newValue: any, row: MatrixDropdownRowModelBase): any;
|
@@ -15734,6 +15734,7 @@ declare module "settings" {
|
|
15734
15734
|
* A separator used in a shorthand notation that specifies a value and display text for an [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) object: `"value|text"`.
|
15735
15735
|
*
|
15736
15736
|
* Default value: `"|"`
|
15737
|
+
* @see [settings.choicesSeparator](https://surveyjs.io/form-library/documentation/api-reference/settings#choicesSeparator)
|
15737
15738
|
*/
|
15738
15739
|
itemValueSeparator: string;
|
15739
15740
|
/**
|
@@ -15884,6 +15885,13 @@ declare module "settings" {
|
|
15884
15885
|
dontKnowItem: number[];
|
15885
15886
|
otherItem: number[];
|
15886
15887
|
};
|
15888
|
+
/**
|
15889
|
+
* One or several characters used to separate choice options in a list.
|
15890
|
+
*
|
15891
|
+
* Default value: `", "`
|
15892
|
+
* @see [settings.itemValueSeparator](https://surveyjs.io/form-library/documentation/api-reference/settings#itemValueSeparator)
|
15893
|
+
*/
|
15894
|
+
choicesSeparator: string;
|
15887
15895
|
/**
|
15888
15896
|
* A list of supported validators by question type.
|
15889
15897
|
*/
|
@@ -17512,6 +17520,8 @@ declare module "question_rating" {
|
|
17512
17520
|
* @see rateType
|
17513
17521
|
*/
|
17514
17522
|
displayMode: "dropdown" | "buttons" | "auto";
|
17523
|
+
private updateRenderAsBasedOnDisplayMode;
|
17524
|
+
onSurveyLoad(): void;
|
17515
17525
|
/**
|
17516
17526
|
* Specifies the alignment of [`minRateDescription`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#minRateDescription) and [`maxRateDescription`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#maxRateDescription) texts.
|
17517
17527
|
*
|
@@ -18227,6 +18237,7 @@ declare module "mask/mask_numeric" {
|
|
18227
18237
|
*/
|
18228
18238
|
max: number;
|
18229
18239
|
private calccaretPosition;
|
18240
|
+
private numericalCompositionIsEmpty;
|
18230
18241
|
displayNumber(parsedNumber: INumericalComposition, insertThousandsSeparator?: boolean, matchWholeMask?: boolean): string;
|
18231
18242
|
convertNumber(parsedNumber: INumericalComposition): number;
|
18232
18243
|
validateNumber(number: INumericalComposition, matchWholeMask: boolean): boolean;
|
@@ -18387,7 +18398,7 @@ declare module "entries/chunks/model" {
|
|
18387
18398
|
export { AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner } from "validator";
|
18388
18399
|
export { ItemValue } from "itemvalue";
|
18389
18400
|
export { Base, Event, EventBase, ArrayChanges, ComputedUpdater } from "base";
|
18390
|
-
export { ISurvey, ISurveyElement, IElement, IQuestion, IPage, IPanel, ISurveyData, ITitleOwner, ISurveyLayoutElement, IPlainDataOptions as IPlainData, IShortcutText, ILoadFromJSONOptions } from "base-interfaces";
|
18401
|
+
export { ISurvey, ISurveyElement, IElement, IQuestion, IPage, IPanel, ISurveyData, ITitleOwner, ISurveyLayoutElement, IPlainDataOptions as IPlainData, IShortcutText, ILoadFromJSONOptions, ISaveToJSONOptions, HorizontalAlignment, VerticalAlignment } from "base-interfaces";
|
18391
18402
|
export { SurveyError } from "survey-error";
|
18392
18403
|
export { SurveyElementCore, SurveyElement, DragTypeOverMeEnum } from "survey-element";
|
18393
18404
|
export { CalculatedValue } from "calculatedValue";
|
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.10.
|
2
|
+
* surveyjs - Survey JavaScript library v1.10.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
|
*/
|
@@ -3970,13 +3970,18 @@ var ProcessValue = /** @class */ (function () {
|
|
3970
3970
|
};
|
3971
3971
|
ProcessValue.prototype.isAnyKeyChanged = function (keys, usedNames) {
|
3972
3972
|
for (var i = 0; i < usedNames.length; i++) {
|
3973
|
-
var
|
3974
|
-
if (
|
3973
|
+
var name_1 = usedNames[i];
|
3974
|
+
if (!name_1)
|
3975
|
+
continue;
|
3976
|
+
var lowerName = name_1.toLowerCase();
|
3977
|
+
if (keys.hasOwnProperty(name_1))
|
3978
|
+
return true;
|
3979
|
+
if (name_1 !== lowerName && keys.hasOwnProperty(lowerName))
|
3975
3980
|
return true;
|
3976
|
-
var firstName = this.getFirstName(
|
3981
|
+
var firstName = this.getFirstName(name_1);
|
3977
3982
|
if (!keys.hasOwnProperty(firstName))
|
3978
3983
|
continue;
|
3979
|
-
if (
|
3984
|
+
if (name_1 === firstName)
|
3980
3985
|
return true;
|
3981
3986
|
var keyValue = keys[firstName];
|
3982
3987
|
if (keyValue == undefined)
|
@@ -3986,9 +3991,9 @@ var ProcessValue = /** @class */ (function () {
|
|
3986
3991
|
return true;
|
3987
3992
|
var v = {};
|
3988
3993
|
v[firstName] = keyValue["oldValue"];
|
3989
|
-
var oldValue = this.getValue(
|
3994
|
+
var oldValue = this.getValue(name_1, v);
|
3990
3995
|
v[firstName] = keyValue["newValue"];
|
3991
|
-
var newValue = this.getValue(
|
3996
|
+
var newValue = this.getValue(name_1, v);
|
3992
3997
|
if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(oldValue, newValue, false, false, false))
|
3993
3998
|
return true;
|
3994
3999
|
}
|
@@ -7315,10 +7320,9 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
7315
7320
|
var pageY = event.pageY;
|
7316
7321
|
var clientX = event.clientX;
|
7317
7322
|
var clientY = event.clientY;
|
7318
|
-
|
7319
|
-
|
7320
|
-
|
7321
|
-
}
|
7323
|
+
//https://github.com/surveyjs/survey-creator/issues/5484
|
7324
|
+
rootElementX -= rootElementScrollLeft;
|
7325
|
+
rootElementY -= rootElementScrollTop;
|
7322
7326
|
var shortcutBottomCoordinate = this.getShortcutBottomCoordinate(clientY, shortcutHeight, shortcutYOffset);
|
7323
7327
|
var shortcutRightCoordinate = this.getShortcutRightCoordinate(clientX, shortcutWidth, shortcutXOffset);
|
7324
7328
|
if (shortcutRightCoordinate >= documentRight) { // right boundary
|
@@ -9820,8 +9824,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9820
9824
|
|
9821
9825
|
var Version;
|
9822
9826
|
var ReleaseDate;
|
9823
|
-
Version = "" + "1.10.
|
9824
|
-
ReleaseDate = "" + "2024-05-
|
9827
|
+
Version = "" + "1.10.4";
|
9828
|
+
ReleaseDate = "" + "2024-05-15";
|
9825
9829
|
function checkLibraryVersion(ver, libraryName) {
|
9826
9830
|
if (Version != ver) {
|
9827
9831
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -16531,6 +16535,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
16531
16535
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
|
16532
16536
|
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
16533
16537
|
/* harmony import */ var _console_warnings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./console-warnings */ "./src/console-warnings.ts");
|
16538
|
+
/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
|
16539
|
+
|
16534
16540
|
|
16535
16541
|
|
16536
16542
|
|
@@ -16653,7 +16659,7 @@ function avg(params) {
|
|
16653
16659
|
}
|
16654
16660
|
FunctionFactory.Instance.register("avg", avg);
|
16655
16661
|
function getInArrayParams(params) {
|
16656
|
-
if (params.length
|
16662
|
+
if (params.length < 2 || params.length > 3)
|
16657
16663
|
return null;
|
16658
16664
|
var arr = params[0];
|
16659
16665
|
if (!arr)
|
@@ -16663,16 +16669,22 @@ function getInArrayParams(params) {
|
|
16663
16669
|
var name = params[1];
|
16664
16670
|
if (typeof name !== "string" && !(name instanceof String))
|
16665
16671
|
return null;
|
16666
|
-
|
16672
|
+
var expression = params.length === 3 ? params[2] : undefined;
|
16673
|
+
if (typeof expression !== "string" && !(expression instanceof String)) {
|
16674
|
+
expression = undefined;
|
16675
|
+
}
|
16676
|
+
return { data: arr, name: name, expression: expression };
|
16667
16677
|
}
|
16668
16678
|
function convertToNumber(val) {
|
16669
16679
|
if (typeof val === "string")
|
16670
16680
|
return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(val) ? _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].getNumber(val) : undefined;
|
16671
16681
|
return val;
|
16672
16682
|
}
|
16673
|
-
function processItemInArray(item, name, res, func, needToConvert) {
|
16683
|
+
function processItemInArray(item, name, res, func, needToConvert, condition) {
|
16674
16684
|
if (!item || _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(item[name]))
|
16675
16685
|
return res;
|
16686
|
+
if (condition && !condition.run(item))
|
16687
|
+
return res;
|
16676
16688
|
var val = needToConvert ? convertToNumber(item[name]) : 1;
|
16677
16689
|
return func(res, val);
|
16678
16690
|
}
|
@@ -16681,15 +16693,19 @@ function calcInArray(params, func, needToConvert) {
|
|
16681
16693
|
var v = getInArrayParams(params);
|
16682
16694
|
if (!v)
|
16683
16695
|
return undefined;
|
16696
|
+
var condition = !!v.expression ? new _conditions__WEBPACK_IMPORTED_MODULE_3__["ConditionRunner"](v.expression) : undefined;
|
16697
|
+
if (condition && condition.isAsync) {
|
16698
|
+
condition = undefined;
|
16699
|
+
}
|
16684
16700
|
var res = undefined;
|
16685
16701
|
if (Array.isArray(v.data)) {
|
16686
16702
|
for (var i = 0; i < v.data.length; i++) {
|
16687
|
-
res = processItemInArray(v.data[i], v.name, res, func, needToConvert);
|
16703
|
+
res = processItemInArray(v.data[i], v.name, res, func, needToConvert, condition);
|
16688
16704
|
}
|
16689
16705
|
}
|
16690
16706
|
else {
|
16691
16707
|
for (var key in v.data) {
|
16692
|
-
res = processItemInArray(v.data[key], v.name, res, func, needToConvert);
|
16708
|
+
res = processItemInArray(v.data[key], v.name, res, func, needToConvert, condition);
|
16693
16709
|
}
|
16694
16710
|
}
|
16695
16711
|
return res;
|
@@ -31467,6 +31483,9 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
31467
31483
|
}
|
31468
31484
|
return result;
|
31469
31485
|
};
|
31486
|
+
InputMaskNumeric.prototype.numericalCompositionIsEmpty = function (number) {
|
31487
|
+
return !number.integralPart && !number.fractionalPart;
|
31488
|
+
};
|
31470
31489
|
InputMaskNumeric.prototype.displayNumber = function (parsedNumber, insertThousandsSeparator, matchWholeMask) {
|
31471
31490
|
if (insertThousandsSeparator === void 0) { insertThousandsSeparator = true; }
|
31472
31491
|
if (matchWholeMask === void 0) { matchWholeMask = false; }
|
@@ -31571,6 +31590,8 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
31571
31590
|
};
|
31572
31591
|
InputMaskNumeric.prototype.getNumberUnmaskedValue = function (str) {
|
31573
31592
|
var parsedNumber = this.parseNumber(str);
|
31593
|
+
if (this.numericalCompositionIsEmpty(parsedNumber))
|
31594
|
+
return undefined;
|
31574
31595
|
return this.convertNumber(parsedNumber);
|
31575
31596
|
};
|
31576
31597
|
InputMaskNumeric.prototype.getTextAlignment = function () {
|
@@ -42990,7 +43011,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
42990
43011
|
}
|
42991
43012
|
}
|
42992
43013
|
}
|
42993
|
-
return strs.join("
|
43014
|
+
return strs.join(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].choicesSeparator);
|
42994
43015
|
};
|
42995
43016
|
QuestionSelectBase.prototype.getItemDisplayValue = function (item, val) {
|
42996
43017
|
if (item === this.otherItem) {
|
@@ -48471,7 +48492,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
48471
48492
|
_super.prototype.updateElementCssCore.call(this, cssClasses);
|
48472
48493
|
this.prevFileAction.iconName = this.cssClasses.leftIconId;
|
48473
48494
|
this.nextFileAction.iconName = this.cssClasses.rightIconId;
|
48474
|
-
|
48495
|
+
this.updateCurrentMode();
|
48475
48496
|
};
|
48476
48497
|
QuestionFileModel.prototype.getFileIndexCaption = function () {
|
48477
48498
|
return this.getLocalizationFormatString("indexText", this.indexToShow + 1, this.pagesCount);
|
@@ -49113,11 +49134,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
49113
49134
|
this.actionsContainer.containerCss = classes.actionsContainer;
|
49114
49135
|
return classes;
|
49115
49136
|
};
|
49116
|
-
//todo remove in v2
|
49117
|
-
QuestionFileModel.prototype.updateElementCss = function (reNew) {
|
49118
|
-
_super.prototype.updateElementCss.call(this, reNew);
|
49119
|
-
this.updateCurrentMode();
|
49120
|
-
};
|
49121
49137
|
QuestionFileModel.prototype.onSurveyLoad = function () {
|
49122
49138
|
_super.prototype.onSurveyLoad.call(this);
|
49123
49139
|
this.updateCurrentMode();
|
@@ -49523,7 +49539,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
49523
49539
|
|
49524
49540
|
|
49525
49541
|
|
49526
|
-
var
|
49542
|
+
var youtubeDomains = ["www.youtube.com", "m.youtube.com", "youtube.com", "youtu.be"];
|
49527
49543
|
var videoSuffics = [".mp4", ".mov", ".wmv", ".flv", ".avi", ".mkv"];
|
49528
49544
|
var youtubeUrl = "https://www.youtube.com/";
|
49529
49545
|
var youtubeEmbed = "embed";
|
@@ -49531,8 +49547,9 @@ function isUrlYoutubeVideo(url) {
|
|
49531
49547
|
if (!url)
|
49532
49548
|
return false;
|
49533
49549
|
url = url.toLowerCase();
|
49534
|
-
|
49535
|
-
|
49550
|
+
url = url.replace(/^https?:\/\//, "");
|
49551
|
+
for (var i = 0; i < youtubeDomains.length; i++) {
|
49552
|
+
if (url.indexOf(youtubeDomains[i] + "/") === 0)
|
49536
49553
|
return true;
|
49537
49554
|
}
|
49538
49555
|
return false;
|
@@ -49548,7 +49565,7 @@ var QuestionImageModel = /** @class */ (function (_super) {
|
|
49548
49565
|
var _this = _super.call(this, name) || this;
|
49549
49566
|
var locImageLink = _this.createLocalizableString("imageLink", _this, false);
|
49550
49567
|
locImageLink.onGetTextCallback = function (text) {
|
49551
|
-
return getCorrectImageLink(text);
|
49568
|
+
return getCorrectImageLink(text, _this.contentMode == "youtube");
|
49552
49569
|
};
|
49553
49570
|
_this.createLocalizableString("altText", _this, false);
|
49554
49571
|
_this.registerPropertyChangedHandlers(["contentMode", "imageLink"], function () { return _this.calculateRenderedMode(); });
|
@@ -49780,9 +49797,10 @@ var QuestionImageModel = /** @class */ (function (_super) {
|
|
49780
49797
|
return QuestionImageModel;
|
49781
49798
|
}(_questionnonvalue__WEBPACK_IMPORTED_MODULE_0__["QuestionNonValue"]));
|
49782
49799
|
|
49783
|
-
function getCorrectImageLink(val) {
|
49800
|
+
function getCorrectImageLink(val, isYouTube) {
|
49784
49801
|
if (!val || !isUrlYoutubeVideo(val))
|
49785
|
-
return val;
|
49802
|
+
return isYouTube ? "" : val;
|
49803
|
+
//if(!val || !isUrlYoutubeVideo(val)) return val;
|
49786
49804
|
var res = val.toLocaleLowerCase();
|
49787
49805
|
if (res.indexOf(youtubeEmbed) > -1)
|
49788
49806
|
return val;
|
@@ -54479,9 +54497,9 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
54479
54497
|
* @see isRequired
|
54480
54498
|
* @see readOnly
|
54481
54499
|
*/
|
54482
|
-
get: function () { return this.
|
54500
|
+
get: function () { return this.templateQuestion.visible; },
|
54483
54501
|
set: function (val) {
|
54484
|
-
this.
|
54502
|
+
this.templateQuestion.visible = val;
|
54485
54503
|
},
|
54486
54504
|
enumerable: false,
|
54487
54505
|
configurable: true
|
@@ -56529,7 +56547,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
56529
56547
|
QuestionMatrixDropdownRenderedTable.prototype.getMultipleColumnChoices = function (column) {
|
56530
56548
|
var choices = column.templateQuestion.choices;
|
56531
56549
|
if (!!choices && Array.isArray(choices) && choices.length == 0)
|
56532
|
-
return this.matrix.choices;
|
56550
|
+
return [].concat(this.matrix.choices, column.getVisibleMultipleChoices());
|
56533
56551
|
choices = column.getVisibleMultipleChoices();
|
56534
56552
|
if (!choices || !Array.isArray(choices))
|
56535
56553
|
return null;
|
@@ -56709,11 +56727,11 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
56709
56727
|
function QuestionMatrixDynamicModel(name) {
|
56710
56728
|
var _this = _super.call(this, name) || this;
|
56711
56729
|
_this.rowCounter = 0;
|
56712
|
-
_this.initialRowCount = 2;
|
56713
56730
|
_this.setRowCountValueFromData = false;
|
56714
56731
|
_this.startDragMatrixRow = function (event, currentTarget) {
|
56715
56732
|
_this.dragDropMatrixRows.startDrag(event, _this.draggedRow, _this, event.target);
|
56716
56733
|
};
|
56734
|
+
_this.initialRowCount = _this.getDefaultPropertyValue("rowCount");
|
56717
56735
|
_this.createLocalizableString("confirmDeleteText", _this, false, "confirmDelete");
|
56718
56736
|
var locAddRowText = _this.createLocalizableString("addRowText", _this);
|
56719
56737
|
locAddRowText.onGetTextCallback = function (text) {
|
@@ -57590,6 +57608,12 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
57590
57608
|
this.setPropertyValueDirectly("rowCount", val.length);
|
57591
57609
|
return true;
|
57592
57610
|
};
|
57611
|
+
QuestionMatrixDynamicModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
|
57612
|
+
if (clearData === void 0) { clearData = false; }
|
57613
|
+
this.setRowCountValueFromData = true;
|
57614
|
+
_super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
|
57615
|
+
this.setRowCountValueFromData = false;
|
57616
|
+
};
|
57593
57617
|
QuestionMatrixDynamicModel.prototype.onBeforeValueChanged = function (val) {
|
57594
57618
|
if (!val || !Array.isArray(val))
|
57595
57619
|
return;
|
@@ -63023,6 +63047,9 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
63023
63047
|
_this.registerFunctionOnPropertiesValueChanged(["rateColorMode", "scaleColorMode"], function () {
|
63024
63048
|
_this.updateColors(_this.survey.themeVariables);
|
63025
63049
|
});
|
63050
|
+
_this.registerFunctionOnPropertiesValueChanged(["displayMode"], function () {
|
63051
|
+
_this.updateRenderAsBasedOnDisplayMode(true);
|
63052
|
+
});
|
63026
63053
|
_this.registerSychProperties(["autoGenerate"], function () {
|
63027
63054
|
if (!_this.autoGenerate && _this.rateValues.length === 0) {
|
63028
63055
|
_this.setPropertyValue("rateValues", _this.visibleRateValues);
|
@@ -63438,6 +63465,27 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
63438
63465
|
enumerable: false,
|
63439
63466
|
configurable: true
|
63440
63467
|
});
|
63468
|
+
QuestionRatingModel.prototype.updateRenderAsBasedOnDisplayMode = function (isOnChange) {
|
63469
|
+
if (this.isDesignMode) {
|
63470
|
+
if (isOnChange || this.renderAs === "dropdown") {
|
63471
|
+
this.renderAs = "default";
|
63472
|
+
}
|
63473
|
+
}
|
63474
|
+
else {
|
63475
|
+
if (isOnChange || this.displayMode !== "auto") {
|
63476
|
+
this.renderAs = this.displayMode === "dropdown" ? "dropdown" : "default";
|
63477
|
+
}
|
63478
|
+
}
|
63479
|
+
};
|
63480
|
+
QuestionRatingModel.prototype.onSurveyLoad = function () {
|
63481
|
+
_super.prototype.onSurveyLoad.call(this);
|
63482
|
+
if (this.renderAs === "dropdown" && this.displayMode === "auto") {
|
63483
|
+
this.displayMode = this.renderAs;
|
63484
|
+
}
|
63485
|
+
else {
|
63486
|
+
this.updateRenderAsBasedOnDisplayMode();
|
63487
|
+
}
|
63488
|
+
};
|
63441
63489
|
Object.defineProperty(QuestionRatingModel.prototype, "rateDisplayMode", {
|
63442
63490
|
get: function () {
|
63443
63491
|
return this.rateType;
|
@@ -63847,6 +63895,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
63847
63895
|
if (!this.survey)
|
63848
63896
|
return;
|
63849
63897
|
this.updateColors(this.survey.themeVariables);
|
63898
|
+
this.updateRenderAsBasedOnDisplayMode();
|
63850
63899
|
};
|
63851
63900
|
QuestionRatingModel.prototype.dispose = function () {
|
63852
63901
|
_super.prototype.dispose.call(this);
|
@@ -63877,18 +63926,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
63877
63926
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
63878
63927
|
], QuestionRatingModel.prototype, "displayRateDescriptionsAsExtremeItems", void 0);
|
63879
63928
|
__decorate([
|
63880
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])(
|
63881
|
-
onSet: function (val, target) {
|
63882
|
-
if (!target.isDesignMode) {
|
63883
|
-
if (val === "dropdown") {
|
63884
|
-
target.renderAs = "dropdown";
|
63885
|
-
}
|
63886
|
-
else {
|
63887
|
-
target.renderAs = "default";
|
63888
|
-
}
|
63889
|
-
}
|
63890
|
-
}
|
63891
|
-
})
|
63929
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
63892
63930
|
], QuestionRatingModel.prototype, "displayMode", void 0);
|
63893
63931
|
__decorate([
|
63894
63932
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
@@ -77015,6 +77053,7 @@ var settings = {
|
|
77015
77053
|
* A separator used in a shorthand notation that specifies a value and display text for an [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) object: `"value|text"`.
|
77016
77054
|
*
|
77017
77055
|
* Default value: `"|"`
|
77056
|
+
* @see [settings.choicesSeparator](https://surveyjs.io/form-library/documentation/api-reference/settings#choicesSeparator)
|
77018
77057
|
*/
|
77019
77058
|
itemValueSeparator: "|",
|
77020
77059
|
/**
|
@@ -77169,6 +77208,13 @@ var settings = {
|
|
77169
77208
|
dontKnowItem: [3],
|
77170
77209
|
otherItem: [4]
|
77171
77210
|
},
|
77211
|
+
/**
|
77212
|
+
* One or several characters used to separate choice options in a list.
|
77213
|
+
*
|
77214
|
+
* Default value: `", "`
|
77215
|
+
* @see [settings.itemValueSeparator](https://surveyjs.io/form-library/documentation/api-reference/settings#itemValueSeparator)
|
77216
|
+
*/
|
77217
|
+
choicesSeparator: ", ",
|
77172
77218
|
/**
|
77173
77219
|
* A list of supported validators by question type.
|
77174
77220
|
*/
|
@@ -79161,7 +79207,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
79161
79207
|
configurable: true
|
79162
79208
|
});
|
79163
79209
|
SurveyElement.prototype.getIsAnimationAllowed = function () {
|
79164
|
-
return _super.prototype.getIsAnimationAllowed.call(this) && !!this.survey;
|
79210
|
+
return _super.prototype.getIsAnimationAllowed.call(this) && !!this.survey && !this.survey["isEndLoadingFromJson"];
|
79165
79211
|
};
|
79166
79212
|
SurveyElement.prototype.dispose = function () {
|
79167
79213
|
_super.prototype.dispose.call(this);
|
@@ -86211,14 +86257,20 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
86211
86257
|
SurveyModel.prototype.setVariable = function (name, newValue) {
|
86212
86258
|
if (!name)
|
86213
86259
|
return;
|
86260
|
+
var oldValue = this.getVariable(name);
|
86214
86261
|
if (!!this.valuesHash) {
|
86215
86262
|
delete this.valuesHash[name];
|
86216
86263
|
}
|
86217
86264
|
name = name.toLowerCase();
|
86218
86265
|
this.variablesHash[name] = newValue;
|
86219
86266
|
this.notifyElementsOnAnyValueOrVariableChanged(name);
|
86220
|
-
|
86221
|
-
|
86267
|
+
if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(oldValue, newValue)) {
|
86268
|
+
this.runConditionOnValueChanged(name, newValue);
|
86269
|
+
var triggerKeys = {};
|
86270
|
+
triggerKeys[name] = { newValue: newValue, oldValue: oldValue };
|
86271
|
+
this.checkTriggers(triggerKeys, false, false, name);
|
86272
|
+
this.onVariableChanged.fire(this, { name: name, value: newValue });
|
86273
|
+
}
|
86222
86274
|
};
|
86223
86275
|
/**
|
86224
86276
|
* Returns the names of all variables in the survey.
|
@@ -86384,7 +86436,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
86384
86436
|
return;
|
86385
86437
|
if (this.checkIsCurrentPageHasErrors(false))
|
86386
86438
|
return;
|
86439
|
+
var curPage = this.currentPage;
|
86387
86440
|
var goNextPage = function () {
|
86441
|
+
if (curPage !== _this.currentPage)
|
86442
|
+
return;
|
86388
86443
|
if (!_this.isLastPage) {
|
86389
86444
|
_this.nextPage();
|
86390
86445
|
}
|
@@ -87373,32 +87428,34 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
87373
87428
|
}
|
87374
87429
|
}
|
87375
87430
|
else if (this.state === "running" && isStrCiEqual(layoutElement.id, this.progressBarComponentName)) {
|
87376
|
-
|
87377
|
-
|
87378
|
-
|
87379
|
-
|
87380
|
-
|
87381
|
-
|
87382
|
-
if (isStrCiEqual(this.showProgressBar, "belowHeader")) {
|
87383
|
-
isBelowHeader = true;
|
87384
|
-
}
|
87385
|
-
if (container === "header" && !isBelowHeader) {
|
87386
|
-
layoutElement.index = -150;
|
87387
|
-
if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
|
87388
|
-
containerLayoutElements.push(layoutElement);
|
87431
|
+
if (this.questionsOnPageMode != "singlePage") {
|
87432
|
+
var headerLayoutElement = this.findLayoutElement("advanced-header");
|
87433
|
+
var advHeader = headerLayoutElement && headerLayoutElement.data;
|
87434
|
+
var isBelowHeader = !advHeader || advHeader.hasBackground;
|
87435
|
+
if (isStrCiEqual(this.showProgressBar, "aboveHeader")) {
|
87436
|
+
isBelowHeader = false;
|
87389
87437
|
}
|
87390
|
-
|
87391
|
-
|
87392
|
-
if (!!layoutElement.index) {
|
87393
|
-
delete layoutElement.index;
|
87438
|
+
if (isStrCiEqual(this.showProgressBar, "belowHeader")) {
|
87439
|
+
isBelowHeader = true;
|
87394
87440
|
}
|
87395
|
-
if (
|
87396
|
-
|
87441
|
+
if (container === "header" && !isBelowHeader) {
|
87442
|
+
layoutElement.index = -150;
|
87443
|
+
if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
|
87444
|
+
containerLayoutElements.push(layoutElement);
|
87445
|
+
}
|
87397
87446
|
}
|
87398
|
-
|
87399
|
-
|
87400
|
-
|
87401
|
-
|
87447
|
+
if (container === "center" && isBelowHeader) {
|
87448
|
+
if (!!layoutElement.index) {
|
87449
|
+
delete layoutElement.index;
|
87450
|
+
}
|
87451
|
+
if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
|
87452
|
+
containerLayoutElements.push(layoutElement);
|
87453
|
+
}
|
87454
|
+
}
|
87455
|
+
if (container === "footer") {
|
87456
|
+
if (this.isShowProgressBarOnBottom && !this.isShowStartingPage) {
|
87457
|
+
containerLayoutElements.push(layoutElement);
|
87458
|
+
}
|
87402
87459
|
}
|
87403
87460
|
}
|
87404
87461
|
}
|