survey-react 1.12.21 → 1.12.22

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.21
2
+ * surveyjs - Survey JavaScript library v1.12.22
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.21
2
+ * surveyjs - Survey JavaScript library v1.12.22
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.21
2
+ * surveyjs - Survey JavaScript library v1.12.22
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.21
2
+ * surveyjs - Survey JavaScript library v1.12.22
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.21",
3
+ "version": "1.12.22",
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.21
2
+ * surveyjs - Survey JavaScript library v1.12.22
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.21
2
+ * surveyjs - Survey JavaScript library v1.12.22
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
@@ -2723,6 +2723,7 @@ declare module "packages/survey-core/src/textPreProcessor" {
2723
2723
  processValue(name: string, returnDisplayValue: boolean): TextPreProcessorValue;
2724
2724
  get hasAllValuesOnLastRun(): boolean;
2725
2725
  private getItems;
2726
+ private isValidItemName;
2726
2727
  private getName;
2727
2728
  }
2728
2729
  export class QuestionTextProcessor implements ITextProcessor {
@@ -3263,6 +3264,9 @@ declare module "packages/survey-core/src/question_custom" {
3263
3264
  protected getQuestionByName(name: string): IQuestion;
3264
3265
  private settingNewValue;
3265
3266
  setValue(name: string, newValue: any, locNotification: any, allowNotifyValueChanged?: boolean): any;
3267
+ setComment(name: string, newValue: string, locNotification: any): any;
3268
+ getComment(name: string): string;
3269
+ private getCommentName;
3266
3270
  private runPanelTriggers;
3267
3271
  getFilteredValues(): any;
3268
3272
  private updateValueCoreWithPanelValue;
@@ -3469,7 +3473,7 @@ declare module "packages/survey-core/src/panel" {
3469
3473
  set questionsOrder(val: string);
3470
3474
  private canRandomize;
3471
3475
  protected isRandomizing: boolean;
3472
- randomizeElements(isRandom: boolean): void;
3476
+ randomizeElements(isRandom: boolean): boolean;
3473
3477
  /**
3474
3478
  * Returns `true` if elements in this panel/page are arranged in random order.
3475
3479
  * @see questionsOrder
@@ -3606,6 +3610,7 @@ declare module "packages/survey-core/src/panel" {
3606
3610
  protected getContainsErrors(): boolean;
3607
3611
  updateElementVisibility(): void;
3608
3612
  getFirstQuestionToFocus(withError?: boolean, ignoreCollapseState?: boolean): Question;
3613
+ getFirstVisibleQuestion(): Question;
3609
3614
  /**
3610
3615
  * Focuses the first question in this panel/page.
3611
3616
  * @see focusFirstErrorQuestion
@@ -7607,7 +7612,7 @@ declare module "packages/survey-core/src/survey-events-api" {
7607
7612
  */
7608
7613
  isNextPage: boolean;
7609
7614
  /**
7610
- * Returns `true` if the respondent is going backward, that is, `newCurrentPage` is earlier in the survey than `oldCurrentPage`.
7615
+ * Returns `true` if the respondent is going backward, that is, `newCurrentPage` or `newCurrentQuestion` is earlier in the survey than `oldCurrentPage` or `oldCurrentQuestion`.
7611
7616
  */
7612
7617
  isGoingBackward: boolean;
7613
7618
  /**
@@ -7623,9 +7628,20 @@ declare module "packages/survey-core/src/survey-events-api" {
7623
7628
  */
7624
7629
  newCurrentPage: PageModel;
7625
7630
  /**
7626
- * A page that used to be current.
7631
+ * A page that used to be current.\
7632
+ * In [question-per-page mode](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode), the `oldCurrentPage` and `newCurrentPage` parameters may contain the same `PageModel` instance. This is because the survey doesn't create artificial pages to display only one question per page. If both the previous and current questions belong to the same page in the survey JSON schema, they have the same parent `PageModel` instance.
7627
7633
  */
7628
7634
  oldCurrentPage: PageModel;
7635
+ /**
7636
+ * The current question.\
7637
+ * This parameter has a value only in [question-per-page mode](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode).
7638
+ */
7639
+ oldCurrentQuestion?: Question;
7640
+ /**
7641
+ * A question that used to be current.\
7642
+ * This parameter has a value only in [question-per-page mode](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode).
7643
+ */
7644
+ newCurrentQuestion?: Question;
7629
7645
  }
7630
7646
  export interface CurrentPageChangingEvent extends CurrentPageChangedEvent {
7631
7647
  /**
@@ -8328,10 +8344,6 @@ declare module "packages/survey-core/src/survey-events-api" {
8328
8344
  * The panel's index within Dynamic Panel.
8329
8345
  */
8330
8346
  panelIndex: number;
8331
- /**
8332
- * The item's new value.
8333
- */
8334
- value: any;
8335
8347
  /**
8336
8348
  * The item's name.
8337
8349
  */
@@ -8340,6 +8352,10 @@ declare module "packages/survey-core/src/survey-events-api" {
8340
8352
  * A panel that nests the item with a changed value.
8341
8353
  */
8342
8354
  panel: PanelModel;
8355
+ /**
8356
+ * The item's new value.
8357
+ */
8358
+ value: any;
8343
8359
  }
8344
8360
  export interface DynamicPanelValueChangingEvent extends DynamicPanelValueChangedEvent {
8345
8361
  /**
@@ -9790,7 +9806,7 @@ declare module "packages/survey-core/src/survey" {
9790
9806
  import { ActionContainer } from "packages/survey-core/src/actions/container";
9791
9807
  import { QuestionPanelDynamicModel } from "packages/survey-core/src/question_paneldynamic";
9792
9808
  import { Notifier } from "packages/survey-core/src/notifier";
9793
- import { TriggerExecutedEvent, CompletingEvent, CompleteEvent, ShowingPreviewEvent, NavigateToUrlEvent, CurrentPageChangingEvent, CurrentPageChangedEvent, ValueChangingEvent, ValueChangedEvent, VariableChangedEvent, QuestionVisibleChangedEvent, PageVisibleChangedEvent, PanelVisibleChangedEvent, QuestionCreatedEvent, QuestionAddedEvent, QuestionRemovedEvent, PanelAddedEvent, PanelRemovedEvent, PageAddedEvent, ValidateQuestionEvent, SettingQuestionErrorsEvent, ValidatePanelEvent, ErrorCustomTextEvent, ValidatedErrorsOnCurrentPageEvent, ProcessHtmlEvent, GetQuestionTitleEvent, GetTitleTagNameEvent, GetQuestionNumberEvent, GetPageNumberEvent, GetPanelNumberEvent, GetProgressTextEvent, TextMarkdownEvent, SendResultEvent, GetResultEvent, UploadFilesEvent, DownloadFileEvent, ClearFilesEvent, LoadChoicesFromServerEvent, ProcessTextValueEvent, UpdateQuestionCssClassesEvent, UpdatePanelCssClassesEvent, UpdatePageCssClassesEvent, UpdateChoiceItemCssEvent, AfterRenderSurveyEvent, AfterRenderPageEvent, AfterRenderQuestionEvent, AfterRenderQuestionInputEvent, AfterRenderPanelEvent, FocusInQuestionEvent, FocusInPanelEvent, ShowingChoiceItemEvent, ChoicesLazyLoadEvent, GetChoiceDisplayValueEvent, MatrixRowAddedEvent, MatrixBeforeRowAddedEvent, MatrixRowRemovingEvent, MatrixRowRemovedEvent, MatrixAllowRemoveRowEvent, MatrixDetailPanelVisibleChangedEvent, MatrixCellCreatingEvent, MatrixCellCreatedEvent, MatrixAfterCellRenderEvent, MatrixCellValueChangedEvent, MatrixCellValueChangingEvent, MatrixCellValidateEvent, DynamicPanelModifiedEvent, DynamicPanelRemovingEvent, DynamicPanelItemValueChangedEvent, DynamicPanelGetTabTitleEvent, DynamicPanelCurrentIndexChangedEvent, CheckAnswerCorrectEvent, DragDropAllowEvent, ScrollToTopEvent, GetQuestionTitleActionsEvent, GetPanelTitleActionsEvent, GetPageTitleActionsEvent, GetPanelFooterActionsEvent, GetMatrixRowActionsEvent, GetExpressionDisplayValueEvent, ServerValidateQuestionsEvent, MultipleTextItemAddedEvent, MatrixColumnAddedEvent, GetQuestionDisplayValueEvent, PopupVisibleChangedEvent, ChoicesSearchEvent, OpenFileChooserEvent, OpenDropdownMenuEvent, ResizeEvent, ProgressTextEvent, ScrollingElementToTopEvent, IsAnswerCorrectEvent } from "packages/survey-core/src/survey-events-api";
9809
+ import { TriggerExecutedEvent, CompletingEvent, CompleteEvent, ShowingPreviewEvent, NavigateToUrlEvent, CurrentPageChangingEvent, CurrentPageChangedEvent, ValueChangingEvent, ValueChangedEvent, VariableChangedEvent, QuestionVisibleChangedEvent, PageVisibleChangedEvent, PanelVisibleChangedEvent, QuestionCreatedEvent, QuestionAddedEvent, QuestionRemovedEvent, PanelAddedEvent, PanelRemovedEvent, PageAddedEvent, ValidateQuestionEvent, SettingQuestionErrorsEvent, ValidatePanelEvent, ErrorCustomTextEvent, ValidatedErrorsOnCurrentPageEvent, ProcessHtmlEvent, GetQuestionTitleEvent, GetTitleTagNameEvent, GetQuestionNumberEvent, GetPageNumberEvent, GetPanelNumberEvent, GetProgressTextEvent, TextMarkdownEvent, SendResultEvent, GetResultEvent, UploadFilesEvent, DownloadFileEvent, ClearFilesEvent, LoadChoicesFromServerEvent, ProcessTextValueEvent, UpdateQuestionCssClassesEvent, UpdatePanelCssClassesEvent, UpdatePageCssClassesEvent, UpdateChoiceItemCssEvent, AfterRenderSurveyEvent, AfterRenderPageEvent, AfterRenderQuestionEvent, AfterRenderQuestionInputEvent, AfterRenderPanelEvent, FocusInQuestionEvent, FocusInPanelEvent, ShowingChoiceItemEvent, ChoicesLazyLoadEvent, GetChoiceDisplayValueEvent, MatrixRowAddedEvent, MatrixBeforeRowAddedEvent, MatrixRowRemovingEvent, MatrixRowRemovedEvent, MatrixAllowRemoveRowEvent, MatrixDetailPanelVisibleChangedEvent, MatrixCellCreatingEvent, MatrixCellCreatedEvent, MatrixAfterCellRenderEvent, MatrixCellValueChangedEvent, MatrixCellValueChangingEvent, MatrixCellValidateEvent, DynamicPanelModifiedEvent, DynamicPanelRemovingEvent, DynamicPanelItemValueChangedEvent, DynamicPanelValueChangingEvent, DynamicPanelGetTabTitleEvent, DynamicPanelCurrentIndexChangedEvent, CheckAnswerCorrectEvent, DragDropAllowEvent, ScrollToTopEvent, GetQuestionTitleActionsEvent, GetPanelTitleActionsEvent, GetPageTitleActionsEvent, GetPanelFooterActionsEvent, GetMatrixRowActionsEvent, GetExpressionDisplayValueEvent, ServerValidateQuestionsEvent, MultipleTextItemAddedEvent, MatrixColumnAddedEvent, GetQuestionDisplayValueEvent, PopupVisibleChangedEvent, ChoicesSearchEvent, OpenFileChooserEvent, OpenDropdownMenuEvent, ResizeEvent, ProgressTextEvent, ScrollingElementToTopEvent, IsAnswerCorrectEvent } from "packages/survey-core/src/survey-events-api";
9794
9810
  import { QuestionMatrixDropdownModelBase } from "packages/survey-core/src/question_matrixdropdownbase";
9795
9811
  import { QuestionMatrixDynamicModel } from "packages/survey-core/src/question_matrixdynamic";
9796
9812
  import { QuestionFileModel } from "packages/survey-core/src/question_file";
@@ -10441,14 +10457,17 @@ declare module "packages/survey-core/src/survey" {
10441
10457
  onTimer: EventBase<SurveyModel, {}>;
10442
10458
  onTimerPanelInfoText: EventBase<SurveyModel, any>;
10443
10459
  /**
10444
- * An event that is raised after an item value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
10460
+ * An event that is raised after a value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
10445
10461
  */
10446
10462
  onDynamicPanelValueChanged: EventBase<SurveyModel, DynamicPanelItemValueChangedEvent>;
10463
+ /**
10464
+ * @deprecated Use the [`onDynamicPanelValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelValueChanged) event instead.
10465
+ */
10447
10466
  onDynamicPanelItemValueChanged: EventBase<SurveyModel, DynamicPanelItemValueChangedEvent>;
10448
10467
  /**
10449
- * An event that is raised after an item value is changing in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
10468
+ * An event that is raised before a value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
10450
10469
  */
10451
- onDynamicPanelValueChanging: EventBase<SurveyModel, DynamicPanelItemValueChangedEvent>;
10470
+ onDynamicPanelValueChanging: EventBase<SurveyModel, DynamicPanelValueChangingEvent>;
10452
10471
  /**
10453
10472
  * An event that is raised before a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) renders [tab titles](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle). Use this event to change individual tab titles.
10454
10473
  *
@@ -11680,7 +11699,8 @@ declare module "packages/survey-core/src/survey" {
11680
11699
  mergeValues(src: any, dest: any): void;
11681
11700
  private updateValuesWithDefaults;
11682
11701
  protected updateCustomWidgets(page: PageModel): void;
11683
- protected currentPageChanging(newValue: PageModel, oldValue: PageModel): boolean;
11702
+ protected currentPageChanging(newValue: PageModel, oldValue: PageModel, newQuestion?: Question, oldQuestion?: Question): boolean;
11703
+ private currentPageChangingFromOptions;
11684
11704
  protected currentPageChanged(newValue: PageModel, oldValue: PageModel): void;
11685
11705
  private notifyQuestionsOnHidingContent;
11686
11706
  private createPageChangeEventOptions;
@@ -11775,6 +11795,7 @@ declare module "packages/survey-core/src/survey" {
11775
11795
  performNext(): boolean;
11776
11796
  performPrevious(): boolean;
11777
11797
  private hasErrorsOnNavigate;
11798
+ private canGoTroughValidation;
11778
11799
  private asyncValidationQuesitons;
11779
11800
  private checkForAsyncQuestionValidation;
11780
11801
  private clearAsyncValidationQuesitons;
@@ -11888,7 +11909,7 @@ declare module "packages/survey-core/src/survey" {
11888
11909
  * Possible values:
11889
11910
  *
11890
11911
  * - `"singlePage"` - Combines all survey pages into a single page.
11891
- * - `"questionPerPage"` - Creates a separate page for every question.
11912
+ * - `"questionPerPage"` - Displays each question on a separate page.
11892
11913
  * - `"standard"` (default) - Retains the original structure specified in the JSON schema.
11893
11914
  */
11894
11915
  get questionsOnPageMode(): string;
package/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.21
2
+ * surveyjs - Survey JavaScript library v1.12.22
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
  */
@@ -10508,6 +10508,8 @@ var base_Base = /** @class */ (function () {
10508
10508
  * @param val A new value for the property.
10509
10509
  */
10510
10510
  Base.prototype.setPropertyValue = function (name, val) {
10511
+ if (this.isDisposedValue)
10512
+ return;
10511
10513
  if (!this.isLoadingFromJson) {
10512
10514
  var prop = this.getPropertyByName(name);
10513
10515
  if (!!prop) {
@@ -10524,9 +10526,11 @@ var base_Base = /** @class */ (function () {
10524
10526
  }
10525
10527
  }
10526
10528
  else {
10527
- this.setPropertyValueDirectly(name, val);
10528
- if (!this.isDisposedValue && !this.isTwoValueEquals(oldValue, val)) {
10529
- this.propertyValueChanged(name, oldValue, val);
10529
+ if (val !== oldValue) {
10530
+ this.setPropertyValueDirectly(name, val);
10531
+ if (!this.isTwoValueEquals(oldValue, val)) {
10532
+ this.propertyValueChanged(name, oldValue, val);
10533
+ }
10530
10534
  }
10531
10535
  }
10532
10536
  };
@@ -23995,9 +23999,12 @@ var choicesRestful_ChoicesRestful = /** @class */ (function (_super) {
23995
23999
  if (this.processedPath.indexOf(";") > -1) {
23996
24000
  pathes = this.path.split(";");
23997
24001
  }
23998
- else {
24002
+ else if (this.processedPath.indexOf(",") > -1) {
23999
24003
  pathes = this.processedPath.split(",");
24000
24004
  }
24005
+ else {
24006
+ pathes = this.processedPath.split(".");
24007
+ }
24001
24008
  if (pathes.length == 0)
24002
24009
  pathes.push(this.processedPath);
24003
24010
  return pathes;
@@ -24586,13 +24593,18 @@ var textPreProcessor_TextPreProcessor = /** @class */ (function () {
24586
24593
  var item = new TextPreProcessorItem();
24587
24594
  item.start = start;
24588
24595
  item.end = i;
24589
- items.push(item);
24596
+ if (this.isValidItemName(text.substring(start + 1, i - 1))) {
24597
+ items.push(item);
24598
+ }
24590
24599
  }
24591
24600
  start = -1;
24592
24601
  }
24593
24602
  }
24594
24603
  return items;
24595
24604
  };
24605
+ TextPreProcessor.prototype.isValidItemName = function (name) {
24606
+ return !!name && name.indexOf(":") < 0;
24607
+ };
24596
24608
  TextPreProcessor.prototype.getName = function (name) {
24597
24609
  if (!name)
24598
24610
  return;
@@ -24722,6 +24734,7 @@ var question_custom_extends = (undefined && undefined.__extends) || (function ()
24722
24734
 
24723
24735
 
24724
24736
 
24737
+
24725
24738
  var question_custom_ComponentQuestionJSON = /** @class */ (function () {
24726
24739
  function ComponentQuestionJSON(name, json) {
24727
24740
  this.name = name;
@@ -25724,6 +25737,36 @@ var question_custom_QuestionCompositeModel = /** @class */ (function (_super) {
25724
25737
  this.settingNewValue = false;
25725
25738
  this.runPanelTriggers(QuestionCompositeModel.ItemVariableName + "." + name, newValue);
25726
25739
  };
25740
+ QuestionCompositeModel.prototype.setComment = function (name, newValue, locNotification) {
25741
+ var val = this.getUnbindValue(this.value);
25742
+ var commentName = this.getCommentName(name);
25743
+ if (!val && !newValue || !!newValue && !!val && val[commentName] === newValue)
25744
+ return;
25745
+ if (!!newValue) {
25746
+ if (!val) {
25747
+ val = {};
25748
+ }
25749
+ val[commentName] = newValue;
25750
+ }
25751
+ else {
25752
+ delete val[commentName];
25753
+ }
25754
+ var q = this.getQuestionByName(name);
25755
+ if (!!q && q.comment !== newValue) {
25756
+ q.comment = newValue;
25757
+ }
25758
+ this.value = val;
25759
+ };
25760
+ QuestionCompositeModel.prototype.getComment = function (name) {
25761
+ var q = this.getQuestionByName(name);
25762
+ if (!!q)
25763
+ return q.comment;
25764
+ var val = this.value;
25765
+ return !!val && val[this.getCommentName(name)] || "";
25766
+ };
25767
+ QuestionCompositeModel.prototype.getCommentName = function (name) {
25768
+ return name + settings.commentSuffix;
25769
+ };
25727
25770
  QuestionCompositeModel.prototype.runPanelTriggers = function (name, value) {
25728
25771
  if (!!this.contentPanel) {
25729
25772
  this.contentPanel.questions.forEach(function (q) {
@@ -25803,19 +25846,24 @@ var question_custom_QuestionCompositeModel = /** @class */ (function (_super) {
25803
25846
  _super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
25804
25847
  };
25805
25848
  QuestionCompositeModel.prototype.setValuesIntoQuestions = function (newValue) {
25806
- if (!this.contentPanel)
25849
+ if (!this.contentPanel || this.settingNewValue)
25807
25850
  return;
25808
25851
  newValue = this.getValueForContentPanel(newValue);
25809
25852
  var oldSettingNewValue = this.settingNewValue;
25810
25853
  this.settingNewValue = true;
25811
25854
  var questions = this.contentPanel.questions;
25812
25855
  for (var i = 0; i < questions.length; i++) {
25813
- var key = questions[i].getValueName();
25814
- var val = !!newValue ? newValue[key] : undefined;
25815
25856
  var q = questions[i];
25857
+ var key = q.getValueName();
25858
+ var commentKey = this.getCommentName(key);
25859
+ var val = !!newValue ? newValue[key] : undefined;
25860
+ var commentVal = !!newValue && newValue[commentKey] || "";
25816
25861
  if (!this.isTwoValueEquals(q.value, val) && (val !== undefined || !q.isEmpty())) {
25817
25862
  q.value = val;
25818
25863
  }
25864
+ if (q.comment !== commentVal) {
25865
+ q.comment = commentVal;
25866
+ }
25819
25867
  }
25820
25868
  this.settingNewValue = oldSettingNewValue;
25821
25869
  };
@@ -36871,7 +36919,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36871
36919
  };
36872
36920
  PanelModelBase.prototype.randomizeElements = function (isRandom) {
36873
36921
  if (!this.canRandomize(isRandom) || this.isRandomizing)
36874
- return;
36922
+ return false;
36875
36923
  this.isRandomizing = true;
36876
36924
  var oldElements = [];
36877
36925
  var elements = this.elements;
@@ -36883,6 +36931,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36883
36931
  this.updateRows();
36884
36932
  this.updateVisibleIndexes();
36885
36933
  this.isRandomizing = false;
36934
+ return true;
36886
36935
  };
36887
36936
  Object.defineProperty(PanelModelBase.prototype, "areQuestionsRandomized", {
36888
36937
  /**
@@ -37441,6 +37490,14 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
37441
37490
  }
37442
37491
  return null;
37443
37492
  };
37493
+ PanelModelBase.prototype.getFirstVisibleQuestion = function () {
37494
+ var qs = this.questions;
37495
+ for (var i = 0; i < qs.length; i++) {
37496
+ if (qs[i].isVisible)
37497
+ return qs[i];
37498
+ }
37499
+ return null;
37500
+ };
37444
37501
  /**
37445
37502
  * Focuses the first question in this panel/page.
37446
37503
  * @see focusFirstErrorQuestion
@@ -39653,6 +39710,7 @@ var page_PageModel = /** @class */ (function (_super) {
39653
39710
  configurable: true
39654
39711
  });
39655
39712
  PageModel.prototype.setWasShown = function (val) {
39713
+ var _a;
39656
39714
  if (val == this.hasShownValue)
39657
39715
  return;
39658
39716
  this.hasShownValue = val;
@@ -39664,7 +39722,12 @@ var page_PageModel = /** @class */ (function (_super) {
39664
39722
  els[i].randomizeElements(this.areQuestionsRandomized);
39665
39723
  }
39666
39724
  }
39667
- this.randomizeElements(this.areQuestionsRandomized);
39725
+ if (this.randomizeElements(this.areQuestionsRandomized)) {
39726
+ var singleQuestion = (_a = this.survey) === null || _a === void 0 ? void 0 : _a.currentSingleQuestion;
39727
+ if ((singleQuestion === null || singleQuestion === void 0 ? void 0 : singleQuestion.page) === this) {
39728
+ this.survey.currentSingleQuestion = this.getFirstVisibleQuestion();
39729
+ }
39730
+ }
39668
39731
  };
39669
39732
  /**
39670
39733
  * Scrolls this page to the top.
@@ -40884,12 +40947,15 @@ var survey_SurveyModel = /** @class */ (function (_super) {
40884
40947
  _this.onTimer = _this.onTimerTick;
40885
40948
  _this.onTimerPanelInfoText = _this.addEvent();
40886
40949
  /**
40887
- * An event that is raised after an item value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
40950
+ * An event that is raised after a value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
40888
40951
  */
40889
40952
  _this.onDynamicPanelValueChanged = _this.addEvent();
40953
+ /**
40954
+ * @deprecated Use the [`onDynamicPanelValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelValueChanged) event instead.
40955
+ */
40890
40956
  _this.onDynamicPanelItemValueChanged = _this.onDynamicPanelValueChanged;
40891
40957
  /**
40892
- * An event that is raised after an item value is changing in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
40958
+ * An event that is raised before a value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
40893
40959
  */
40894
40960
  _this.onDynamicPanelValueChanging = _this.addEvent();
40895
40961
  /**
@@ -43319,6 +43385,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43319
43385
  return this.getPropertyValue("showProgressBar");
43320
43386
  },
43321
43387
  set: function (newValue) {
43388
+ if (newValue === true)
43389
+ newValue = "auto";
43390
+ if (newValue === false)
43391
+ newValue = "off";
43322
43392
  this.setPropertyValue("showProgressBar", newValue.toLowerCase());
43323
43393
  },
43324
43394
  enumerable: false,
@@ -43990,7 +44060,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43990
44060
  if (newPage == this.currentPage)
43991
44061
  return;
43992
44062
  var oldValue = this.currentPage;
43993
- if (!this.isShowingPreview && !this.currentPageChanging(newPage, oldValue))
44063
+ if (!this.isShowingPreview && !this.currentSingleQuestion && !this.currentPageChanging(newPage, oldValue))
43994
44064
  return;
43995
44065
  this.setPropertyValue("currentPage", newPage);
43996
44066
  if (!!newPage) {
@@ -44019,6 +44089,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44019
44089
  SurveyModel.prototype.performValidationOnPageChanging = function (page) {
44020
44090
  if (this.isDesignMode)
44021
44091
  return false;
44092
+ if (this.canGoTroughValidation())
44093
+ return true;
44022
44094
  var index = this.visiblePages.indexOf(page);
44023
44095
  if (index < 0 || index >= this.visiblePageCount)
44024
44096
  return false;
@@ -44382,20 +44454,22 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44382
44454
  return;
44383
44455
  page.updateCustomWidgets();
44384
44456
  };
44385
- SurveyModel.prototype.currentPageChanging = function (newValue, oldValue) {
44386
- var options = this.createPageChangeEventOptions(newValue, oldValue);
44457
+ SurveyModel.prototype.currentPageChanging = function (newValue, oldValue, newQuestion, oldQuestion) {
44458
+ var options = this.createPageChangeEventOptions(newValue, oldValue, newQuestion, oldQuestion);
44459
+ return this.currentPageChangingFromOptions(options);
44460
+ };
44461
+ SurveyModel.prototype.currentPageChangingFromOptions = function (options) {
44387
44462
  options.allow = true;
44388
44463
  options.allowChanging = true;
44389
44464
  this.onCurrentPageChanging.fire(this, options);
44390
44465
  var allow = options.allowChanging && options.allow;
44391
- if (allow) {
44466
+ if (allow && options.newCurrentPage !== options.oldCurrentPage) {
44392
44467
  this.isCurrentPageRendering = true;
44393
44468
  }
44394
44469
  return allow;
44395
44470
  };
44396
44471
  SurveyModel.prototype.currentPageChanged = function (newValue, oldValue) {
44397
44472
  this.notifyQuestionsOnHidingContent(oldValue);
44398
- var options = this.createPageChangeEventOptions(newValue, oldValue);
44399
44473
  if (oldValue && !oldValue.isDisposed && !oldValue.passed) {
44400
44474
  if (oldValue.validate(false)) {
44401
44475
  oldValue.passed = true;
@@ -44404,22 +44478,31 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44404
44478
  if (this.isCurrentPageRendered === true) {
44405
44479
  this.isCurrentPageRendered = false;
44406
44480
  }
44407
- this.onCurrentPageChanged.fire(this, options);
44481
+ if (!this.currentSingleQuestion) {
44482
+ var options = this.createPageChangeEventOptions(newValue, oldValue);
44483
+ this.onCurrentPageChanged.fire(this, options);
44484
+ }
44408
44485
  };
44409
44486
  SurveyModel.prototype.notifyQuestionsOnHidingContent = function (page) {
44410
44487
  if (page && !page.isDisposed) {
44411
44488
  page.questions.forEach(function (q) { return q.onHidingContent(); });
44412
44489
  }
44413
44490
  };
44414
- SurveyModel.prototype.createPageChangeEventOptions = function (newValue, oldValue) {
44491
+ SurveyModel.prototype.createPageChangeEventOptions = function (newValue, oldValue, newQuestion, oldQuestion) {
44415
44492
  var diff = !!newValue && !!oldValue ? newValue.visibleIndex - oldValue.visibleIndex : 0;
44493
+ var qDiff = diff;
44494
+ if (qDiff === 0 && !!oldQuestion && !!newQuestion) {
44495
+ qDiff = newValue.elements.indexOf(newQuestion) - newValue.elements.indexOf(oldQuestion);
44496
+ }
44416
44497
  return {
44498
+ oldCurrentQuestion: oldQuestion,
44499
+ newCurrentQuestion: newQuestion,
44417
44500
  oldCurrentPage: oldValue,
44418
44501
  newCurrentPage: newValue,
44419
44502
  isNextPage: diff === 1,
44420
44503
  isPrevPage: diff === -1,
44421
- isGoingForward: diff > 0,
44422
- isGoingBackward: diff < 0,
44504
+ isGoingForward: qDiff > 0,
44505
+ isGoingBackward: qDiff < 0,
44423
44506
  isAfterPreview: this.changeCurrentPageFromPreview === true
44424
44507
  };
44425
44508
  };
@@ -44642,6 +44725,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44642
44725
  * @see completeLastPage
44643
44726
  */
44644
44727
  SurveyModel.prototype.nextPage = function () {
44728
+ if (this.currentSingleQuestion)
44729
+ return this.performNext();
44645
44730
  if (this.isLastPage)
44646
44731
  return false;
44647
44732
  return this.doCurrentPageComplete(false);
@@ -44672,7 +44757,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44672
44757
  };
44673
44758
  SurveyModel.prototype.hasErrorsOnNavigate = function (doComplete) {
44674
44759
  var _this = this;
44675
- if (!this.isEditMode || this.ignoreValidation)
44760
+ if (this.canGoTroughValidation())
44676
44761
  return false;
44677
44762
  var skipValidation = doComplete && this.validationAllowComplete || !doComplete && this.validationAllowSwitchPages;
44678
44763
  var func = function (hasErrors) {
@@ -44687,6 +44772,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44687
44772
  }
44688
44773
  return this.validateCurrentPage(func) !== true && !skipValidation;
44689
44774
  };
44775
+ SurveyModel.prototype.canGoTroughValidation = function () { return !this.isEditMode || !this.validationEnabled; };
44690
44776
  SurveyModel.prototype.checkForAsyncQuestionValidation = function (questions, func) {
44691
44777
  var _this = this;
44692
44778
  this.clearAsyncValidationQuesitons();
@@ -44964,6 +45050,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44964
45050
  */
44965
45051
  SurveyModel.prototype.prevPage = function () {
44966
45052
  var _this = this;
45053
+ if (this.currentSingleQuestion)
45054
+ return this.performPrevious();
44967
45055
  if (this.isFirstPage || this.state === "starting")
44968
45056
  return false;
44969
45057
  this.resetNavigationButton();
@@ -45105,7 +45193,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45105
45193
  * Possible values:
45106
45194
  *
45107
45195
  * - `"singlePage"` - Combines all survey pages into a single page.
45108
- * - `"questionPerPage"` - Creates a separate page for every question.
45196
+ * - `"questionPerPage"` - Displays each question on a separate page.
45109
45197
  * - `"standard"` (default) - Retains the original structure specified in the JSON schema.
45110
45198
  */
45111
45199
  get: function () {
@@ -45245,7 +45333,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45245
45333
  Object.defineProperty(SurveyModel.prototype, "currentSingleQuestion", {
45246
45334
  get: function () { return this.currentSingleQuestionValue; },
45247
45335
  set: function (val) {
45248
- if (val !== this.currentSingleQuestion) {
45336
+ var oldVal = this.currentSingleQuestion;
45337
+ if (val !== oldVal) {
45338
+ var options = !!val && !!oldVal ? this.createPageChangeEventOptions(val.page, oldVal.page, val, oldVal) : undefined;
45339
+ if (!!options && !this.currentPageChangingFromOptions(options))
45340
+ return;
45249
45341
  this.currentSingleQuestionValue = val;
45250
45342
  if (!!val) {
45251
45343
  var page = val.page;
@@ -45259,6 +45351,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45259
45351
  }
45260
45352
  }
45261
45353
  this.updateButtonsVisibility();
45354
+ if (!!options) {
45355
+ this.onCurrentPageChanged.fire(this, options);
45356
+ }
45262
45357
  }
45263
45358
  else {
45264
45359
  this.visiblePages.forEach(function (page) { return page.updateRows(); });
@@ -46129,7 +46224,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46129
46224
  return options.error ? new CustomError(options.error, this) : null;
46130
46225
  };
46131
46226
  SurveyModel.prototype.dynamicPanelAdded = function (question, panelIndex, panel) {
46132
- if (!this.isLoadingFromJson && this.hasQuestionVisibleIndeces(question, true)) {
46227
+ if (!this.isLoadingFromJson && this.hasQuestionVisibleIndeces(question)) {
46133
46228
  this.updateVisibleIndexes(question.page);
46134
46229
  }
46135
46230
  if (this.onDynamicPanelAdded.isEmpty)
@@ -46146,7 +46241,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46146
46241
  for (var i = 0; i < questions.length; i++) {
46147
46242
  questions[i].clearOnDeletingContainer();
46148
46243
  }
46149
- if (this.hasQuestionVisibleIndeces(question, false)) {
46244
+ if (this.hasQuestionVisibleIndeces(question)) {
46150
46245
  this.updateVisibleIndexes(question.page);
46151
46246
  }
46152
46247
  this.onDynamicPanelRemoved.fire(this, {
@@ -46155,10 +46250,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46155
46250
  panel: panel,
46156
46251
  });
46157
46252
  };
46158
- SurveyModel.prototype.hasQuestionVisibleIndeces = function (question, checkIndex) {
46159
- if (checkIndex) {
46160
- question.setVisibleIndex(this.getStartVisibleIndex());
46161
- }
46253
+ SurveyModel.prototype.hasQuestionVisibleIndeces = function (question) {
46162
46254
  var qList = question.getNestedQuestions(true);
46163
46255
  for (var i = 0; i < qList.length; i++) {
46164
46256
  if (qList[i].visibleIndex > -1)
@@ -51085,6 +51177,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
51085
51177
  var chQuestion = this.choicesFromQuestion;
51086
51178
  if (!!name && chQuestion && (name === chQuestion || questionName === chQuestion)) {
51087
51179
  this.onVisibleChoicesChanged();
51180
+ this.clearIncorrectValues();
51088
51181
  }
51089
51182
  };
51090
51183
  QuestionSelectBase.prototype.updateValueFromSurvey = function (newValue, clearData) {
@@ -56899,6 +56992,9 @@ var question_multipletext_QuestionMultipleTextModel = /** @class */ (function (_
56899
56992
  QuestionMultipleTextModel.prototype.onSurveyLoad = function () {
56900
56993
  this.editorsOnSurveyLoad();
56901
56994
  _super.prototype.onSurveyLoad.call(this);
56995
+ if (!helpers_Helpers.isValueEmpty(this.rows)) {
56996
+ this.calcVisibleRows();
56997
+ }
56902
56998
  };
56903
56999
  QuestionMultipleTextModel.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
56904
57000
  if (updateIsAnswered === void 0) { updateIsAnswered = true; }
@@ -69715,21 +69811,10 @@ Serializer.addClass("paneldynamic", [
69715
69811
  default: "off",
69716
69812
  choices: ["off", "onPanel", "onSurvey"],
69717
69813
  },
69718
- {
69719
- name: "showRangeInProgress:boolean",
69720
- default: true,
69721
- visible: false
69722
- // visibleIf: (obj: any) => { return obj.displayMode !== "list"; }
69723
- },
69724
- {
69725
- name: "renderMode",
69726
- default: "list",
69727
- choices: ["list", "progressTop", "progressBottom", "progressTopBottom", "tab"],
69728
- visible: false,
69729
- },
69814
+ { name: "renderMode", visible: false, isSerializable: false },
69730
69815
  { name: "displayMode", default: "list", choices: ["list", "carousel", "tab"] },
69731
69816
  {
69732
- name: "showProgressBar:boolean",
69817
+ name: "showProgressBar:boolean", alternativeName: "showRangeInProgress",
69733
69818
  default: true,
69734
69819
  visibleIf: function (obj) { return obj.displayMode === "carousel"; }
69735
69820
  },
@@ -72632,9 +72717,9 @@ Serializer.addClass("currencymask", [
72632
72717
 
72633
72718
  var Version;
72634
72719
  var ReleaseDate;
72635
- Version = "" + "1.12.21";
72720
+ Version = "" + "1.12.22";
72636
72721
  settings.version = Version;
72637
- ReleaseDate = "" + "2025-01-28";
72722
+ ReleaseDate = "" + "2025-02-05";
72638
72723
  function checkLibraryVersion(ver, libraryName) {
72639
72724
  if (Version != ver) {
72640
72725
  var str = "survey-core has version '" + Version + "' and " + libraryName