survey-react 1.12.19 → 1.12.20
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 +1 -1
- package/defaultV2.min.css +1 -1
- 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 +15 -5
- package/survey.react.js +138 -57
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/defaultV2.css
CHANGED
package/defaultV2.min.css
CHANGED
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
@@ -9107,6 +9107,7 @@ declare module "packages/survey-core/src/question_text" {
|
|
9107
9107
|
set inputType(val: string);
|
9108
9108
|
getMaxLength(): any;
|
9109
9109
|
runCondition(values: HashTable<any>, properties: HashTable<any>): void;
|
9110
|
+
protected getDisplayValueCore(keysAsText: boolean, value: any): any;
|
9110
9111
|
isLayoutTypeSupported(layoutType: string): boolean;
|
9111
9112
|
/**
|
9112
9113
|
* A value passed on to the [`size`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/size) attribute of the underlying `<input>` element.
|
@@ -11560,6 +11561,7 @@ declare module "packages/survey-core/src/survey" {
|
|
11560
11561
|
get currentPage(): any;
|
11561
11562
|
set currentPage(value: any);
|
11562
11563
|
tryNavigateToPage(page: PageModel): boolean;
|
11564
|
+
private performValidationOnPageChanging;
|
11563
11565
|
private updateCurrentPage;
|
11564
11566
|
private get isCurrentPageAvailable();
|
11565
11567
|
private isPageExistsInSurvey;
|
@@ -11980,7 +11982,7 @@ declare module "packages/survey-core/src/survey" {
|
|
11980
11982
|
private setIsValidatingOnServer;
|
11981
11983
|
private createServerValidationOptions;
|
11982
11984
|
protected onIsValidatingOnServerChanged(): void;
|
11983
|
-
protected doServerValidation(doComplete: boolean, isPreview?: boolean): boolean;
|
11985
|
+
protected doServerValidation(doComplete: boolean, isPreview?: boolean, page?: PageModel): boolean;
|
11984
11986
|
private completeServerValidation;
|
11985
11987
|
protected doNextPage(): void;
|
11986
11988
|
setCompleted(trigger: Trigger): void;
|
@@ -13546,6 +13548,7 @@ declare module "packages/survey-core/src/question" {
|
|
13546
13548
|
private triggersInfo;
|
13547
13549
|
private addTriggerInfo;
|
13548
13550
|
private runTriggerInfo;
|
13551
|
+
private canExecuteTriggerByKeys;
|
13549
13552
|
runTriggers(name: string, value: any, keys?: any): void;
|
13550
13553
|
private runConditions;
|
13551
13554
|
setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
|
@@ -18454,6 +18457,7 @@ declare module "packages/survey-core/src/question_rating" {
|
|
18454
18457
|
import { DropdownListModel } from "packages/survey-core/src/dropdownListModel";
|
18455
18458
|
import { ISurveyImpl } from "packages/survey-core/src/base-interfaces";
|
18456
18459
|
import { ITheme } from "packages/survey-core/src/themes";
|
18460
|
+
import { HashTable } from "packages/survey-core/src/helpers";
|
18457
18461
|
export class RenderedRatingItem extends Base {
|
18458
18462
|
itemValue: ItemValue;
|
18459
18463
|
private locString;
|
@@ -18566,8 +18570,16 @@ declare module "packages/survey-core/src/question_rating" {
|
|
18566
18570
|
get visibleRateValues(): ItemValue[];
|
18567
18571
|
protected supportEmptyValidation(): boolean;
|
18568
18572
|
itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
|
18569
|
-
|
18570
|
-
|
18573
|
+
protected runConditionCore(values: HashTable<any>, properties: HashTable<any>): void;
|
18574
|
+
protected runRateItesmCondition(values: HashTable<any>, properties: HashTable<any>): void;
|
18575
|
+
private getRateValuesCore;
|
18576
|
+
private calculateRateValues;
|
18577
|
+
private calculateRenderedRateItems;
|
18578
|
+
private calculateVisibleChoices;
|
18579
|
+
private iCounter;
|
18580
|
+
private resetRenderedItems;
|
18581
|
+
get renderedRateItems(): Array<RenderedRatingItem>;
|
18582
|
+
get visibleChoices(): ItemValue[];
|
18571
18583
|
private createRateValues;
|
18572
18584
|
private getRatingItemValue;
|
18573
18585
|
private correctValue;
|
@@ -18722,8 +18734,6 @@ declare module "packages/survey-core/src/question_rating" {
|
|
18722
18734
|
get renderedValue(): any;
|
18723
18735
|
set renderedValue(val: any);
|
18724
18736
|
isItemSelected(item: ItemValue): boolean;
|
18725
|
-
private visibleChoicesValue;
|
18726
|
-
get visibleChoices(): ItemValue[];
|
18727
18737
|
get readOnlyText(): any;
|
18728
18738
|
needResponsiveWidth(): boolean;
|
18729
18739
|
protected supportResponsiveness(): boolean;
|
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.12.
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.20
|
3
3
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -10407,8 +10407,15 @@ var base_Base = /** @class */ (function () {
|
|
10407
10407
|
if (!!calcFunc) {
|
10408
10408
|
var newVal = calcFunc();
|
10409
10409
|
if (newVal !== undefined) {
|
10410
|
-
|
10411
|
-
|
10410
|
+
if (Array.isArray(newVal)) {
|
10411
|
+
var array = this.createNewArray(name);
|
10412
|
+
array.splice.apply(array, base_spreadArray([0, 0], newVal));
|
10413
|
+
return array;
|
10414
|
+
}
|
10415
|
+
else {
|
10416
|
+
this.setPropertyValueDirectly(name, newVal);
|
10417
|
+
return newVal;
|
10418
|
+
}
|
10412
10419
|
}
|
10413
10420
|
}
|
10414
10421
|
var propDefaultValue = this.getDefaultPropertyValue(name);
|
@@ -19521,7 +19528,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
19521
19528
|
this.ensureSetValueExpressionRunner();
|
19522
19529
|
if (!this.setValueExpressionRunner)
|
19523
19530
|
return false;
|
19524
|
-
return
|
19531
|
+
return this.canExecuteTriggerByKeys(keys, this.setValueExpressionRunner);
|
19525
19532
|
};
|
19526
19533
|
Question.prototype.addTriggerInfo = function (name, canRun, doComplete) {
|
19527
19534
|
var info = new TriggerExpressionInfo(name, canRun, doComplete);
|
@@ -19548,11 +19555,17 @@ var question_Question = /** @class */ (function (_super) {
|
|
19548
19555
|
else {
|
19549
19556
|
info.runner.expression = expression;
|
19550
19557
|
}
|
19551
|
-
if (!
|
19558
|
+
if (!this.canExecuteTriggerByKeys(keys, info.runner) && !info.runSecondCheck(keys))
|
19552
19559
|
return;
|
19553
19560
|
info.isRunning = true;
|
19554
19561
|
info.runner.run(this.getDataFilteredValues(), this.getDataFilteredProperties());
|
19555
19562
|
};
|
19563
|
+
Question.prototype.canExecuteTriggerByKeys = function (keys, runner) {
|
19564
|
+
var vars = runner.getVariables();
|
19565
|
+
if ((!vars || vars.length === 0) && runner.hasFunction())
|
19566
|
+
return true;
|
19567
|
+
return new conditionProcessValue_ProcessValue().isAnyKeyChanged(keys, vars);
|
19568
|
+
};
|
19556
19569
|
Question.prototype.runTriggers = function (name, value, keys) {
|
19557
19570
|
var _this = this;
|
19558
19571
|
if (this.isSettingQuestionValue || (this.parentQuestion && this.parentQuestion.getValueName() === name))
|
@@ -28034,6 +28047,9 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
28034
28047
|
},
|
28035
28048
|
getEnterOptions: function (_, info) {
|
28036
28049
|
return { cssClass: _this.cssClasses.rowEnter, onBeforeRunAnimation: onBeforeRunAnimation, onAfterRunAnimation: onAfterRunAnimation };
|
28050
|
+
},
|
28051
|
+
getKey: function (item) {
|
28052
|
+
return item.id;
|
28037
28053
|
}
|
28038
28054
|
};
|
28039
28055
|
};
|
@@ -40074,11 +40090,6 @@ function createTOCListModel(survey, onAction) {
|
|
40074
40090
|
var items = getTOCItems(survey, onAction);
|
40075
40091
|
var listOptions = {
|
40076
40092
|
items: items,
|
40077
|
-
onSelectionChanged: function (item) {
|
40078
|
-
if (!!item.action()) {
|
40079
|
-
listModel.selectedItem = item;
|
40080
|
-
}
|
40081
|
-
},
|
40082
40093
|
searchEnabled: false,
|
40083
40094
|
locOwner: survey,
|
40084
40095
|
};
|
@@ -40111,7 +40122,6 @@ function getTOCItems(survey, onAction) {
|
|
40111
40122
|
if (page.isPage) {
|
40112
40123
|
return survey.tryNavigateToPage(page);
|
40113
40124
|
}
|
40114
|
-
return tryFocusPage(survey, page);
|
40115
40125
|
},
|
40116
40126
|
visible: new ComputedUpdater(function () {
|
40117
40127
|
return page.isVisible && !(page["isStartPage"]);
|
@@ -43991,7 +44001,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
43991
44001
|
enumerable: false,
|
43992
44002
|
configurable: true
|
43993
44003
|
});
|
43994
|
-
SurveyModel.prototype.tryNavigateToPage = function (page) {
|
44004
|
+
SurveyModel.prototype.tryNavigateToPage = function (page /*, serverValidationRes?: (res: boolean)=> void*/) {
|
44005
|
+
if (!this.performValidationOnPageChanging(page))
|
44006
|
+
return false;
|
44007
|
+
var index = this.visiblePages.indexOf(page);
|
44008
|
+
var res = index < this.currentPageNo || !this.doServerValidation(false, false, page);
|
44009
|
+
if (res) {
|
44010
|
+
this.currentPage = page;
|
44011
|
+
}
|
44012
|
+
return res;
|
44013
|
+
};
|
44014
|
+
SurveyModel.prototype.performValidationOnPageChanging = function (page) {
|
43995
44015
|
if (this.isDesignMode)
|
43996
44016
|
return false;
|
43997
44017
|
var index = this.visiblePages.indexOf(page);
|
@@ -43999,10 +44019,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
43999
44019
|
return false;
|
44000
44020
|
if (index === this.currentPageNo)
|
44001
44021
|
return false;
|
44002
|
-
if (index < this.currentPageNo || this.checkErrorsMode === "onComplete" || this.validationAllowSwitchPages)
|
44003
|
-
this.currentPageNo = index;
|
44022
|
+
if (index < this.currentPageNo || this.checkErrorsMode === "onComplete" || this.validationAllowSwitchPages)
|
44004
44023
|
return true;
|
44005
|
-
}
|
44006
44024
|
if (!this.validateCurrentPage())
|
44007
44025
|
return false;
|
44008
44026
|
for (var i = this.currentPageNo + 1; i < index; i++) {
|
@@ -44011,7 +44029,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44011
44029
|
return false;
|
44012
44030
|
page_1.passed = true;
|
44013
44031
|
}
|
44014
|
-
this.currentPage = page;
|
44015
44032
|
return true;
|
44016
44033
|
};
|
44017
44034
|
SurveyModel.prototype.updateCurrentPage = function () {
|
@@ -45554,14 +45571,14 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45554
45571
|
this.setPropertyValue("isValidatingOnServer", val);
|
45555
45572
|
this.onIsValidatingOnServerChanged();
|
45556
45573
|
};
|
45557
|
-
SurveyModel.prototype.createServerValidationOptions = function (doComplete, isPreview) {
|
45574
|
+
SurveyModel.prototype.createServerValidationOptions = function (doComplete, isPreview, page) {
|
45558
45575
|
var self = this;
|
45559
45576
|
var options = {
|
45560
45577
|
data: {},
|
45561
45578
|
errors: {},
|
45562
45579
|
survey: this,
|
45563
45580
|
complete: function () {
|
45564
|
-
self.completeServerValidation(options, isPreview);
|
45581
|
+
self.completeServerValidation(options, isPreview, page);
|
45565
45582
|
},
|
45566
45583
|
};
|
45567
45584
|
if (doComplete && this.isValidateOnComplete) {
|
@@ -45581,7 +45598,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45581
45598
|
return options;
|
45582
45599
|
};
|
45583
45600
|
SurveyModel.prototype.onIsValidatingOnServerChanged = function () { };
|
45584
|
-
SurveyModel.prototype.doServerValidation = function (doComplete, isPreview) {
|
45601
|
+
SurveyModel.prototype.doServerValidation = function (doComplete, isPreview, page) {
|
45585
45602
|
var _this = this;
|
45586
45603
|
if (isPreview === void 0) { isPreview = false; }
|
45587
45604
|
if (!this.onServerValidateQuestions ||
|
@@ -45593,14 +45610,14 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45593
45610
|
var isFunc = typeof this.onServerValidateQuestions === "function";
|
45594
45611
|
this.serverValidationEventCount = !isFunc ? this.onServerValidateQuestions.length : 1;
|
45595
45612
|
if (isFunc) {
|
45596
|
-
this.onServerValidateQuestions(this, this.createServerValidationOptions(doComplete, isPreview));
|
45613
|
+
this.onServerValidateQuestions(this, this.createServerValidationOptions(doComplete, isPreview, page));
|
45597
45614
|
}
|
45598
45615
|
else {
|
45599
|
-
this.onServerValidateQuestions.fireByCreatingOptions(this, function () { return _this.createServerValidationOptions(doComplete, isPreview); });
|
45616
|
+
this.onServerValidateQuestions.fireByCreatingOptions(this, function () { return _this.createServerValidationOptions(doComplete, isPreview, page); });
|
45600
45617
|
}
|
45601
45618
|
return true;
|
45602
45619
|
};
|
45603
|
-
SurveyModel.prototype.completeServerValidation = function (options, isPreview) {
|
45620
|
+
SurveyModel.prototype.completeServerValidation = function (options, isPreview, page) {
|
45604
45621
|
if (this.serverValidationEventCount > 1) {
|
45605
45622
|
this.serverValidationEventCount--;
|
45606
45623
|
if (!!options && !!options.errors && Object.keys(options.errors).length === 0)
|
@@ -45635,10 +45652,15 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45635
45652
|
this.showPreviewCore();
|
45636
45653
|
}
|
45637
45654
|
else {
|
45638
|
-
if (
|
45639
|
-
|
45640
|
-
|
45641
|
-
|
45655
|
+
if (page) {
|
45656
|
+
this.currentPage = page;
|
45657
|
+
}
|
45658
|
+
else {
|
45659
|
+
if (self.isLastPage)
|
45660
|
+
self.doComplete();
|
45661
|
+
else
|
45662
|
+
self.doNextPage();
|
45663
|
+
}
|
45642
45664
|
}
|
45643
45665
|
}
|
45644
45666
|
};
|
@@ -55503,6 +55525,11 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
55503
55525
|
this.setRenderedMinMax(values, properties);
|
55504
55526
|
}
|
55505
55527
|
};
|
55528
|
+
QuestionTextModel.prototype.getDisplayValueCore = function (keysAsText, value) {
|
55529
|
+
if (!this.maskTypeIsEmpty && !helpers_Helpers.isValueEmpty(value))
|
55530
|
+
return this.maskInstance.getMaskedValue(value);
|
55531
|
+
return _super.prototype.getDisplayValueCore.call(this, keysAsText, value);
|
55532
|
+
};
|
55506
55533
|
QuestionTextModel.prototype.isLayoutTypeSupported = function (layoutType) {
|
55507
55534
|
return true;
|
55508
55535
|
};
|
@@ -62931,24 +62958,24 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
62931
62958
|
function QuestionRatingModel(name) {
|
62932
62959
|
var _this = _super.call(this, name) || this;
|
62933
62960
|
_this._syncPropertiesChanging = false;
|
62961
|
+
_this.iCounter = 0;
|
62934
62962
|
_this.createItemValues("rateValues");
|
62935
|
-
_this.createRenderedRateItems();
|
62936
62963
|
_this.createLocalizableString("ratingOptionsCaption", _this, false, true);
|
62937
62964
|
_this.registerFunctionOnPropertiesValueChanged(["rateMin", "rateMax",
|
62938
|
-
"minRateDescription", "maxRateDescription", "rateStep", "displayRateDescriptionsAsExtremeItems"], function () { return _this.
|
62965
|
+
"minRateDescription", "maxRateDescription", "rateStep", "displayRateDescriptionsAsExtremeItems"], function () { return _this.resetRenderedItems(); });
|
62939
62966
|
_this.registerFunctionOnPropertiesValueChanged(["rateType"], function () {
|
62940
62967
|
_this.setIconsToRateValues();
|
62941
|
-
_this.
|
62968
|
+
_this.resetRenderedItems();
|
62942
62969
|
_this.updateRateCount();
|
62943
62970
|
});
|
62944
62971
|
_this.registerFunctionOnPropertiesValueChanged(["rateValues"], function () {
|
62945
62972
|
_this.setIconsToRateValues();
|
62946
|
-
_this.
|
62973
|
+
_this.resetRenderedItems();
|
62947
62974
|
});
|
62948
62975
|
_this.registerSychProperties(["rateValues"], function () {
|
62949
62976
|
_this.autoGenerate = _this.rateValues.length == 0;
|
62950
62977
|
_this.setIconsToRateValues();
|
62951
|
-
_this.
|
62978
|
+
_this.resetRenderedItems();
|
62952
62979
|
});
|
62953
62980
|
_this.registerFunctionOnPropertiesValueChanged(["rateColorMode", "scaleColorMode"], function () {
|
62954
62981
|
_this.updateColors(_this.survey.themeVariables);
|
@@ -62964,7 +62991,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
62964
62991
|
_this.rateValues.splice(0, _this.rateValues.length);
|
62965
62992
|
_this.updateRateMax();
|
62966
62993
|
}
|
62967
|
-
_this.
|
62994
|
+
_this.resetRenderedItems();
|
62968
62995
|
});
|
62969
62996
|
_this.createLocalizableString("minRateDescription", _this, true)
|
62970
62997
|
.onStringChanged.add(function (sender, options) {
|
@@ -62995,7 +63022,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
62995
63022
|
this.autoGenerate = !this.jsonObj.rateValues.length;
|
62996
63023
|
this.updateRateCount();
|
62997
63024
|
this.setIconsToRateValues();
|
62998
|
-
this.createRenderedRateItems();
|
62999
63025
|
};
|
63000
63026
|
QuestionRatingModel.prototype.registerSychProperties = function (names, func) {
|
63001
63027
|
var _this = this;
|
@@ -63099,7 +63125,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63099
63125
|
},
|
63100
63126
|
set: function (val) {
|
63101
63127
|
this.setPropertyValue("rateValues", val);
|
63102
|
-
this.createRenderedRateItems();
|
63103
63128
|
},
|
63104
63129
|
enumerable: false,
|
63105
63130
|
configurable: true
|
@@ -63208,6 +63233,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63208
63233
|
QuestionRatingModel.normalColorLight = getRGBColor("--sjs-special-yellow-light", "--sd-rating-normal-color-light");
|
63209
63234
|
QuestionRatingModel.goodColorLight = getRGBColor("--sjs-special-green-light", "--sd-rating-good-color-light");
|
63210
63235
|
this.colorsCalculated = true;
|
63236
|
+
this.resetRenderedItems();
|
63211
63237
|
};
|
63212
63238
|
QuestionRatingModel.prototype.getDisplayValueCore = function (keysAsText, value) {
|
63213
63239
|
if (!this.useRateValues)
|
@@ -63228,22 +63254,55 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63228
63254
|
this.autoGenerate = false;
|
63229
63255
|
_super.prototype.itemValuePropertyChanged.call(this, item, name, oldValue, newValue);
|
63230
63256
|
};
|
63231
|
-
QuestionRatingModel.prototype.
|
63232
|
-
|
63233
|
-
|
63234
|
-
|
63235
|
-
|
63257
|
+
QuestionRatingModel.prototype.runConditionCore = function (values, properties) {
|
63258
|
+
_super.prototype.runConditionCore.call(this, values, properties);
|
63259
|
+
this.runRateItesmCondition(values, properties);
|
63260
|
+
};
|
63261
|
+
QuestionRatingModel.prototype.runRateItesmCondition = function (values, properties) {
|
63262
|
+
var _a;
|
63263
|
+
if (!this.useRateValues())
|
63264
|
+
return;
|
63265
|
+
var isChanged = false;
|
63266
|
+
if ((_a = this.survey) === null || _a === void 0 ? void 0 : _a.areInvisibleElementsShowing) {
|
63267
|
+
this.rateValues.forEach(function (item) {
|
63268
|
+
isChanged = isChanged || !item.isVisible;
|
63269
|
+
item.setIsVisible(item, true);
|
63270
|
+
});
|
63236
63271
|
}
|
63237
63272
|
else {
|
63238
|
-
|
63273
|
+
isChanged = itemvalue_ItemValue.runConditionsForItems(this.rateValues, undefined, undefined, values, properties, true);
|
63239
63274
|
}
|
63240
|
-
if (
|
63241
|
-
this.
|
63275
|
+
if (isChanged) {
|
63276
|
+
this.resetRenderedItems();
|
63277
|
+
if (!this.isEmpty() && !this.isReadOnly) {
|
63278
|
+
var item = itemvalue_ItemValue.getItemByValue(this.rateValues, this.value);
|
63279
|
+
if (item && !item.isVisible) {
|
63280
|
+
this.clearValue();
|
63281
|
+
}
|
63282
|
+
}
|
63242
63283
|
}
|
63284
|
+
};
|
63285
|
+
QuestionRatingModel.prototype.getRateValuesCore = function () {
|
63286
|
+
if (!this.useRateValues())
|
63287
|
+
return this.createRateValues();
|
63288
|
+
var items = new Array();
|
63289
|
+
this.rateValues.forEach(function (item) {
|
63290
|
+
if (item.isVisible) {
|
63291
|
+
items.push(item);
|
63292
|
+
}
|
63293
|
+
});
|
63294
|
+
return items;
|
63295
|
+
};
|
63296
|
+
QuestionRatingModel.prototype.calculateRateValues = function () {
|
63297
|
+
var rateValues = this.getRateValuesCore();
|
63243
63298
|
if (this.rateType == "smileys" && rateValues.length > 10)
|
63244
63299
|
rateValues = rateValues.slice(0, 10);
|
63245
|
-
|
63246
|
-
|
63300
|
+
return rateValues;
|
63301
|
+
};
|
63302
|
+
QuestionRatingModel.prototype.calculateRenderedRateItems = function () {
|
63303
|
+
var _this = this;
|
63304
|
+
var rateValues = this.calculateRateValues();
|
63305
|
+
return rateValues.map(function (v, i) {
|
63247
63306
|
var renderedItem = null;
|
63248
63307
|
if (_this.displayRateDescriptionsAsExtremeItems) {
|
63249
63308
|
if (i == 0)
|
@@ -63256,6 +63315,39 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63256
63315
|
return renderedItem;
|
63257
63316
|
});
|
63258
63317
|
};
|
63318
|
+
QuestionRatingModel.prototype.calculateVisibleChoices = function () {
|
63319
|
+
var _this = this;
|
63320
|
+
var rateValues = this.calculateRateValues();
|
63321
|
+
return rateValues.map(function (i, idx) { return _this.getRatingItemValue(i, idx); });
|
63322
|
+
};
|
63323
|
+
QuestionRatingModel.prototype.resetRenderedItems = function () {
|
63324
|
+
if (this.autoGenerate) {
|
63325
|
+
var rateValues = this.getRateValuesCore();
|
63326
|
+
this.rateMax = rateValues[rateValues.length - 1].value;
|
63327
|
+
}
|
63328
|
+
if (Array.isArray(this.getPropertyValueWithoutDefault("renderedRateItems"))) {
|
63329
|
+
this.setArrayPropertyDirectly("renderedRateItems", this.calculateRenderedRateItems());
|
63330
|
+
}
|
63331
|
+
if (Array.isArray(this.getPropertyValueWithoutDefault("visibleChoices"))) {
|
63332
|
+
this.setArrayPropertyDirectly("visibleChoices", this.calculateVisibleChoices);
|
63333
|
+
}
|
63334
|
+
};
|
63335
|
+
Object.defineProperty(QuestionRatingModel.prototype, "renderedRateItems", {
|
63336
|
+
get: function () {
|
63337
|
+
var _this = this;
|
63338
|
+
return this.getPropertyValue("renderedRateItems", undefined, function () { return _this.calculateRenderedRateItems(); });
|
63339
|
+
},
|
63340
|
+
enumerable: false,
|
63341
|
+
configurable: true
|
63342
|
+
});
|
63343
|
+
Object.defineProperty(QuestionRatingModel.prototype, "visibleChoices", {
|
63344
|
+
get: function () {
|
63345
|
+
var _this = this;
|
63346
|
+
return this.getPropertyValue("visibleChoices", undefined, function () { return _this.calculateVisibleChoices(); });
|
63347
|
+
},
|
63348
|
+
enumerable: false,
|
63349
|
+
configurable: true
|
63350
|
+
});
|
63259
63351
|
QuestionRatingModel.prototype.createRateValues = function () {
|
63260
63352
|
var res = [];
|
63261
63353
|
var value = this.rateMin;
|
@@ -63729,13 +63821,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63729
63821
|
QuestionRatingModel.prototype.isItemSelected = function (item) {
|
63730
63822
|
return item.value == this.value;
|
63731
63823
|
};
|
63732
|
-
Object.defineProperty(QuestionRatingModel.prototype, "visibleChoices", {
|
63733
|
-
get: function () {
|
63734
|
-
return this.visibleChoicesValue;
|
63735
|
-
},
|
63736
|
-
enumerable: false,
|
63737
|
-
configurable: true
|
63738
|
-
});
|
63739
63824
|
Object.defineProperty(QuestionRatingModel.prototype, "readOnlyText", {
|
63740
63825
|
get: function () {
|
63741
63826
|
if (this.readOnly)
|
@@ -63804,7 +63889,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63804
63889
|
QuestionRatingModel.prototype.themeChanged = function (theme) {
|
63805
63890
|
this.colorsCalculated = false;
|
63806
63891
|
this.updateColors(theme.cssVariables);
|
63807
|
-
this.createRenderedRateItems();
|
63808
63892
|
};
|
63809
63893
|
QuestionRatingModel.prototype.setSurveyImpl = function (value, isLight) {
|
63810
63894
|
_super.prototype.setSurveyImpl.call(this, value, isLight);
|
@@ -63830,9 +63914,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63830
63914
|
question_rating_decorate([
|
63831
63915
|
jsonobject_property()
|
63832
63916
|
], QuestionRatingModel.prototype, "rateCount", void 0);
|
63833
|
-
question_rating_decorate([
|
63834
|
-
propertyArray()
|
63835
|
-
], QuestionRatingModel.prototype, "renderedRateItems", void 0);
|
63836
63917
|
question_rating_decorate([
|
63837
63918
|
jsonobject_property({ defaultValue: false })
|
63838
63919
|
], QuestionRatingModel.prototype, "hasMinRateDescription", void 0);
|
@@ -72540,9 +72621,9 @@ Serializer.addClass("currencymask", [
|
|
72540
72621
|
|
72541
72622
|
var Version;
|
72542
72623
|
var ReleaseDate;
|
72543
|
-
Version = "" + "1.12.
|
72624
|
+
Version = "" + "1.12.20";
|
72544
72625
|
settings.version = Version;
|
72545
|
-
ReleaseDate = "" + "2025-01-
|
72626
|
+
ReleaseDate = "" + "2025-01-21";
|
72546
72627
|
function checkLibraryVersion(ver, libraryName) {
|
72547
72628
|
if (Version != ver) {
|
72548
72629
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|