survey-react 1.12.18 → 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 CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.18
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
  */
package/defaultV2.min.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.18
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
  */
package/modern.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.18
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
  */
package/modern.min.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.18
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
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-react",
3
- "version": "1.12.18",
3
+ "version": "1.12.20",
4
4
  "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
5
5
  "keywords": [
6
6
  "Survey",
package/survey.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.18
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
  */
package/survey.min.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.18
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
  */
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;
@@ -12410,6 +12412,7 @@ declare module "packages/survey-core/src/survey" {
12410
12412
  protected doOnPageRemoved(page: PageModel): void;
12411
12413
  private generateNewName;
12412
12414
  protected tryGoNextPageAutomatic(name: string): void;
12415
+ private tryCompleteOrShowPreview;
12413
12416
  /**
12414
12417
  * Returns a comment value from a question with a specified `name`.
12415
12418
  * @param name A question name.
@@ -13545,6 +13548,7 @@ declare module "packages/survey-core/src/question" {
13545
13548
  private triggersInfo;
13546
13549
  private addTriggerInfo;
13547
13550
  private runTriggerInfo;
13551
+ private canExecuteTriggerByKeys;
13548
13552
  runTriggers(name: string, value: any, keys?: any): void;
13549
13553
  private runConditions;
13550
13554
  setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
@@ -18453,6 +18457,7 @@ declare module "packages/survey-core/src/question_rating" {
18453
18457
  import { DropdownListModel } from "packages/survey-core/src/dropdownListModel";
18454
18458
  import { ISurveyImpl } from "packages/survey-core/src/base-interfaces";
18455
18459
  import { ITheme } from "packages/survey-core/src/themes";
18460
+ import { HashTable } from "packages/survey-core/src/helpers";
18456
18461
  export class RenderedRatingItem extends Base {
18457
18462
  itemValue: ItemValue;
18458
18463
  private locString;
@@ -18565,8 +18570,16 @@ declare module "packages/survey-core/src/question_rating" {
18565
18570
  get visibleRateValues(): ItemValue[];
18566
18571
  protected supportEmptyValidation(): boolean;
18567
18572
  itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
18568
- private createRenderedRateItems;
18569
- renderedRateItems: Array<RenderedRatingItem>;
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[];
18570
18583
  private createRateValues;
18571
18584
  private getRatingItemValue;
18572
18585
  private correctValue;
@@ -18721,8 +18734,6 @@ declare module "packages/survey-core/src/question_rating" {
18721
18734
  get renderedValue(): any;
18722
18735
  set renderedValue(val: any);
18723
18736
  isItemSelected(item: ItemValue): boolean;
18724
- private visibleChoicesValue;
18725
- get visibleChoices(): ItemValue[];
18726
18737
  get readOnlyText(): any;
18727
18738
  needResponsiveWidth(): boolean;
18728
18739
  protected supportResponsiveness(): boolean;
package/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.18
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
- this.setPropertyValueDirectly(name, newVal);
10411
- return newVal;
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 new conditionProcessValue_ProcessValue().isAnyKeyChanged(keys, this.setValueExpressionRunner.getVariables());
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 (!new conditionProcessValue_ProcessValue().isAnyKeyChanged(keys, info.runner.getVariables()) && !info.runSecondCheck(keys))
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
  };
@@ -28801,6 +28817,7 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
28801
28817
  var res = new question_matrixdropdownrendered_QuestionMatrixDropdownRenderedCell();
28802
28818
  res.cell = cell;
28803
28819
  res.row = cell.row;
28820
+ res.column = cell.column;
28804
28821
  res.question = cell.question;
28805
28822
  res.matrix = this.matrix;
28806
28823
  res.item = choiceItem;
@@ -37896,8 +37913,10 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
37896
37913
  PanelModelBase.prototype.onElementStartWithNewLineChanged = function (element) {
37897
37914
  if (this.locCountRowUpdates > 0)
37898
37915
  return;
37916
+ this.blockAnimations();
37899
37917
  this.updateRowsBeforeElementRemoved(element);
37900
37918
  this.updateRowsOnElementAdded(element);
37919
+ this.releaseAnimations();
37901
37920
  };
37902
37921
  PanelModelBase.prototype.updateRowsVisibility = function (element) {
37903
37922
  var rows = this.rows;
@@ -40071,11 +40090,6 @@ function createTOCListModel(survey, onAction) {
40071
40090
  var items = getTOCItems(survey, onAction);
40072
40091
  var listOptions = {
40073
40092
  items: items,
40074
- onSelectionChanged: function (item) {
40075
- if (!!item.action()) {
40076
- listModel.selectedItem = item;
40077
- }
40078
- },
40079
40093
  searchEnabled: false,
40080
40094
  locOwner: survey,
40081
40095
  };
@@ -40108,7 +40122,6 @@ function getTOCItems(survey, onAction) {
40108
40122
  if (page.isPage) {
40109
40123
  return survey.tryNavigateToPage(page);
40110
40124
  }
40111
- return tryFocusPage(survey, page);
40112
40125
  },
40113
40126
  visible: new ComputedUpdater(function () {
40114
40127
  return page.isVisible && !(page["isStartPage"]);
@@ -43988,7 +44001,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43988
44001
  enumerable: false,
43989
44002
  configurable: true
43990
44003
  });
43991
- 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) {
43992
44015
  if (this.isDesignMode)
43993
44016
  return false;
43994
44017
  var index = this.visiblePages.indexOf(page);
@@ -43996,10 +44019,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43996
44019
  return false;
43997
44020
  if (index === this.currentPageNo)
43998
44021
  return false;
43999
- if (index < this.currentPageNo || this.checkErrorsMode === "onComplete" || this.validationAllowSwitchPages) {
44000
- this.currentPageNo = index;
44022
+ if (index < this.currentPageNo || this.checkErrorsMode === "onComplete" || this.validationAllowSwitchPages)
44001
44023
  return true;
44002
- }
44003
44024
  if (!this.validateCurrentPage())
44004
44025
  return false;
44005
44026
  for (var i = this.currentPageNo + 1; i < index; i++) {
@@ -44008,7 +44029,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44008
44029
  return false;
44009
44030
  page_1.passed = true;
44010
44031
  }
44011
- this.currentPage = page;
44012
44032
  return true;
44013
44033
  };
44014
44034
  SurveyModel.prototype.updateCurrentPage = function () {
@@ -45551,14 +45571,14 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45551
45571
  this.setPropertyValue("isValidatingOnServer", val);
45552
45572
  this.onIsValidatingOnServerChanged();
45553
45573
  };
45554
- SurveyModel.prototype.createServerValidationOptions = function (doComplete, isPreview) {
45574
+ SurveyModel.prototype.createServerValidationOptions = function (doComplete, isPreview, page) {
45555
45575
  var self = this;
45556
45576
  var options = {
45557
45577
  data: {},
45558
45578
  errors: {},
45559
45579
  survey: this,
45560
45580
  complete: function () {
45561
- self.completeServerValidation(options, isPreview);
45581
+ self.completeServerValidation(options, isPreview, page);
45562
45582
  },
45563
45583
  };
45564
45584
  if (doComplete && this.isValidateOnComplete) {
@@ -45578,7 +45598,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45578
45598
  return options;
45579
45599
  };
45580
45600
  SurveyModel.prototype.onIsValidatingOnServerChanged = function () { };
45581
- SurveyModel.prototype.doServerValidation = function (doComplete, isPreview) {
45601
+ SurveyModel.prototype.doServerValidation = function (doComplete, isPreview, page) {
45582
45602
  var _this = this;
45583
45603
  if (isPreview === void 0) { isPreview = false; }
45584
45604
  if (!this.onServerValidateQuestions ||
@@ -45590,14 +45610,14 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45590
45610
  var isFunc = typeof this.onServerValidateQuestions === "function";
45591
45611
  this.serverValidationEventCount = !isFunc ? this.onServerValidateQuestions.length : 1;
45592
45612
  if (isFunc) {
45593
- this.onServerValidateQuestions(this, this.createServerValidationOptions(doComplete, isPreview));
45613
+ this.onServerValidateQuestions(this, this.createServerValidationOptions(doComplete, isPreview, page));
45594
45614
  }
45595
45615
  else {
45596
- this.onServerValidateQuestions.fireByCreatingOptions(this, function () { return _this.createServerValidationOptions(doComplete, isPreview); });
45616
+ this.onServerValidateQuestions.fireByCreatingOptions(this, function () { return _this.createServerValidationOptions(doComplete, isPreview, page); });
45597
45617
  }
45598
45618
  return true;
45599
45619
  };
45600
- SurveyModel.prototype.completeServerValidation = function (options, isPreview) {
45620
+ SurveyModel.prototype.completeServerValidation = function (options, isPreview, page) {
45601
45621
  if (this.serverValidationEventCount > 1) {
45602
45622
  this.serverValidationEventCount--;
45603
45623
  if (!!options && !!options.errors && Object.keys(options.errors).length === 0)
@@ -45632,10 +45652,15 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45632
45652
  this.showPreviewCore();
45633
45653
  }
45634
45654
  else {
45635
- if (self.isLastPage)
45636
- self.doComplete();
45637
- else
45638
- self.doNextPage();
45655
+ if (page) {
45656
+ this.currentPage = page;
45657
+ }
45658
+ else {
45659
+ if (self.isLastPage)
45660
+ self.doComplete();
45661
+ else
45662
+ self.doNextPage();
45663
+ }
45639
45664
  }
45640
45665
  }
45641
45666
  };
@@ -47620,6 +47645,22 @@ var survey_SurveyModel = /** @class */ (function (_super) {
47620
47645
  return;
47621
47646
  if (!question.validate(false) && !question.supportGoNextPageError())
47622
47647
  return;
47648
+ if (!!this.currentSingleQuestion) {
47649
+ var curQuestion_1 = this.currentSingleQuestion;
47650
+ var goNextQuestion = function () {
47651
+ if (curQuestion_1 !== _this.currentSingleQuestion)
47652
+ return;
47653
+ if (!_this.isLastElement) {
47654
+ _this.performNext();
47655
+ }
47656
+ else {
47657
+ if (_this.allowCompleteSurveyAutomatic) {
47658
+ _this.tryCompleteOrShowPreview();
47659
+ }
47660
+ }
47661
+ };
47662
+ surveyTimerFunctions.safeTimeOut(goNextQuestion, settings.autoAdvanceDelay);
47663
+ }
47623
47664
  var questions = this.getCurrentPageQuestions();
47624
47665
  if (questions.indexOf(question) < 0)
47625
47666
  return;
@@ -47639,16 +47680,19 @@ var survey_SurveyModel = /** @class */ (function (_super) {
47639
47680
  _this.nextPage();
47640
47681
  }
47641
47682
  else {
47642
- if (_this.isShowPreviewBeforeComplete) {
47643
- _this.showPreview();
47644
- }
47645
- else {
47646
- _this.tryComplete();
47647
- }
47683
+ _this.tryCompleteOrShowPreview();
47648
47684
  }
47649
47685
  };
47650
47686
  surveyTimerFunctions.safeTimeOut(goNextPage, settings.autoAdvanceDelay);
47651
47687
  };
47688
+ SurveyModel.prototype.tryCompleteOrShowPreview = function () {
47689
+ if (this.isShowPreviewBeforeComplete) {
47690
+ this.showPreview();
47691
+ }
47692
+ else {
47693
+ this.tryComplete();
47694
+ }
47695
+ };
47652
47696
  /**
47653
47697
  * Returns a comment value from a question with a specified `name`.
47654
47698
  * @param name A question name.
@@ -55481,6 +55525,11 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
55481
55525
  this.setRenderedMinMax(values, properties);
55482
55526
  }
55483
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
+ };
55484
55533
  QuestionTextModel.prototype.isLayoutTypeSupported = function (layoutType) {
55485
55534
  return true;
55486
55535
  };
@@ -62909,24 +62958,24 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
62909
62958
  function QuestionRatingModel(name) {
62910
62959
  var _this = _super.call(this, name) || this;
62911
62960
  _this._syncPropertiesChanging = false;
62961
+ _this.iCounter = 0;
62912
62962
  _this.createItemValues("rateValues");
62913
- _this.createRenderedRateItems();
62914
62963
  _this.createLocalizableString("ratingOptionsCaption", _this, false, true);
62915
62964
  _this.registerFunctionOnPropertiesValueChanged(["rateMin", "rateMax",
62916
- "minRateDescription", "maxRateDescription", "rateStep", "displayRateDescriptionsAsExtremeItems"], function () { return _this.createRenderedRateItems(); });
62965
+ "minRateDescription", "maxRateDescription", "rateStep", "displayRateDescriptionsAsExtremeItems"], function () { return _this.resetRenderedItems(); });
62917
62966
  _this.registerFunctionOnPropertiesValueChanged(["rateType"], function () {
62918
62967
  _this.setIconsToRateValues();
62919
- _this.createRenderedRateItems();
62968
+ _this.resetRenderedItems();
62920
62969
  _this.updateRateCount();
62921
62970
  });
62922
62971
  _this.registerFunctionOnPropertiesValueChanged(["rateValues"], function () {
62923
62972
  _this.setIconsToRateValues();
62924
- _this.createRenderedRateItems();
62973
+ _this.resetRenderedItems();
62925
62974
  });
62926
62975
  _this.registerSychProperties(["rateValues"], function () {
62927
62976
  _this.autoGenerate = _this.rateValues.length == 0;
62928
62977
  _this.setIconsToRateValues();
62929
- _this.createRenderedRateItems();
62978
+ _this.resetRenderedItems();
62930
62979
  });
62931
62980
  _this.registerFunctionOnPropertiesValueChanged(["rateColorMode", "scaleColorMode"], function () {
62932
62981
  _this.updateColors(_this.survey.themeVariables);
@@ -62942,7 +62991,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
62942
62991
  _this.rateValues.splice(0, _this.rateValues.length);
62943
62992
  _this.updateRateMax();
62944
62993
  }
62945
- _this.createRenderedRateItems();
62994
+ _this.resetRenderedItems();
62946
62995
  });
62947
62996
  _this.createLocalizableString("minRateDescription", _this, true)
62948
62997
  .onStringChanged.add(function (sender, options) {
@@ -62973,7 +63022,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
62973
63022
  this.autoGenerate = !this.jsonObj.rateValues.length;
62974
63023
  this.updateRateCount();
62975
63024
  this.setIconsToRateValues();
62976
- this.createRenderedRateItems();
62977
63025
  };
62978
63026
  QuestionRatingModel.prototype.registerSychProperties = function (names, func) {
62979
63027
  var _this = this;
@@ -63077,7 +63125,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
63077
63125
  },
63078
63126
  set: function (val) {
63079
63127
  this.setPropertyValue("rateValues", val);
63080
- this.createRenderedRateItems();
63081
63128
  },
63082
63129
  enumerable: false,
63083
63130
  configurable: true
@@ -63186,6 +63233,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
63186
63233
  QuestionRatingModel.normalColorLight = getRGBColor("--sjs-special-yellow-light", "--sd-rating-normal-color-light");
63187
63234
  QuestionRatingModel.goodColorLight = getRGBColor("--sjs-special-green-light", "--sd-rating-good-color-light");
63188
63235
  this.colorsCalculated = true;
63236
+ this.resetRenderedItems();
63189
63237
  };
63190
63238
  QuestionRatingModel.prototype.getDisplayValueCore = function (keysAsText, value) {
63191
63239
  if (!this.useRateValues)
@@ -63206,22 +63254,55 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
63206
63254
  this.autoGenerate = false;
63207
63255
  _super.prototype.itemValuePropertyChanged.call(this, item, name, oldValue, newValue);
63208
63256
  };
63209
- QuestionRatingModel.prototype.createRenderedRateItems = function () {
63210
- var _this = this;
63211
- var rateValues = [];
63212
- if (this.useRateValues()) {
63213
- rateValues = this.rateValues;
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
+ });
63214
63271
  }
63215
63272
  else {
63216
- rateValues = this.createRateValues();
63273
+ isChanged = itemvalue_ItemValue.runConditionsForItems(this.rateValues, undefined, undefined, values, properties, true);
63217
63274
  }
63218
- if (this.autoGenerate) {
63219
- this.rateMax = rateValues[rateValues.length - 1].value;
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
+ }
63220
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();
63221
63298
  if (this.rateType == "smileys" && rateValues.length > 10)
63222
63299
  rateValues = rateValues.slice(0, 10);
63223
- this.visibleChoicesValue = rateValues.map(function (i, idx) { return _this.getRatingItemValue(i, idx); });
63224
- this.renderedRateItems = rateValues.map(function (v, i) {
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) {
63225
63306
  var renderedItem = null;
63226
63307
  if (_this.displayRateDescriptionsAsExtremeItems) {
63227
63308
  if (i == 0)
@@ -63234,6 +63315,39 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
63234
63315
  return renderedItem;
63235
63316
  });
63236
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
+ });
63237
63351
  QuestionRatingModel.prototype.createRateValues = function () {
63238
63352
  var res = [];
63239
63353
  var value = this.rateMin;
@@ -63707,13 +63821,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
63707
63821
  QuestionRatingModel.prototype.isItemSelected = function (item) {
63708
63822
  return item.value == this.value;
63709
63823
  };
63710
- Object.defineProperty(QuestionRatingModel.prototype, "visibleChoices", {
63711
- get: function () {
63712
- return this.visibleChoicesValue;
63713
- },
63714
- enumerable: false,
63715
- configurable: true
63716
- });
63717
63824
  Object.defineProperty(QuestionRatingModel.prototype, "readOnlyText", {
63718
63825
  get: function () {
63719
63826
  if (this.readOnly)
@@ -63782,7 +63889,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
63782
63889
  QuestionRatingModel.prototype.themeChanged = function (theme) {
63783
63890
  this.colorsCalculated = false;
63784
63891
  this.updateColors(theme.cssVariables);
63785
- this.createRenderedRateItems();
63786
63892
  };
63787
63893
  QuestionRatingModel.prototype.setSurveyImpl = function (value, isLight) {
63788
63894
  _super.prototype.setSurveyImpl.call(this, value, isLight);
@@ -63808,9 +63914,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
63808
63914
  question_rating_decorate([
63809
63915
  jsonobject_property()
63810
63916
  ], QuestionRatingModel.prototype, "rateCount", void 0);
63811
- question_rating_decorate([
63812
- propertyArray()
63813
- ], QuestionRatingModel.prototype, "renderedRateItems", void 0);
63814
63917
  question_rating_decorate([
63815
63918
  jsonobject_property({ defaultValue: false })
63816
63919
  ], QuestionRatingModel.prototype, "hasMinRateDescription", void 0);
@@ -72518,9 +72621,9 @@ Serializer.addClass("currencymask", [
72518
72621
 
72519
72622
  var Version;
72520
72623
  var ReleaseDate;
72521
- Version = "" + "1.12.18";
72624
+ Version = "" + "1.12.20";
72522
72625
  settings.version = Version;
72523
- ReleaseDate = "" + "2025-01-10";
72626
+ ReleaseDate = "" + "2025-01-21";
72524
72627
  function checkLibraryVersion(ver, libraryName) {
72525
72628
  if (Version != ver) {
72526
72629
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -89125,7 +89228,9 @@ var reactquestion_matrixdropdownbase_SurveyQuestionMatrixDropdownCell = /** @cla
89125
89228
  };
89126
89229
  SurveyQuestionMatrixDropdownCell.prototype.renderCellContent = function () {
89127
89230
  var content = _super.prototype.renderCellContent.call(this);
89128
- var responsiveTitle = this.cell.showResponsiveTitle ? (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", { className: this.cell.responsiveTitleCss }, this.renderLocString(this.cell.responsiveLocTitle))) : null;
89231
+ var responsiveTitle = this.cell.showResponsiveTitle ? (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", { className: this.cell.responsiveTitleCss },
89232
+ this.renderLocString(this.cell.responsiveLocTitle),
89233
+ external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](reactquestion_matrixdropdownbase_SurveyQuestionMatrixHeaderRequired, { column: this.cell.column, question: this.cell.matrix }))) : null;
89129
89234
  return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](external_root_React_commonjs2_react_commonjs_react_amd_react_["Fragment"], null,
89130
89235
  responsiveTitle,
89131
89236
  content);