survey-react 1.12.28 → 1.12.30

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.28
2
+ * surveyjs - Survey JavaScript library v1.12.30
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.28
2
+ * surveyjs - Survey JavaScript library v1.12.30
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.28
2
+ * surveyjs - Survey JavaScript library v1.12.30
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.28
2
+ * surveyjs - Survey JavaScript library v1.12.30
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.28",
3
+ "version": "1.12.30",
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.28
2
+ * surveyjs - Survey JavaScript library v1.12.30
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.28
2
+ * surveyjs - Survey JavaScript library v1.12.30
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
@@ -7,6 +7,7 @@ declare module "packages/survey-core/src/global_variables_utils" {
7
7
  static getVisualViewport(): VisualViewport | null;
8
8
  static getInnerWidth(): number;
9
9
  static getInnerHeight(): number;
10
+ static getDevicePixelRatio(): number;
10
11
  static getWindow(): Window;
11
12
  static hasOwn(propertyName: string): boolean;
12
13
  static getSelection(): Selection | null;
@@ -4752,6 +4753,7 @@ declare module "packages/survey-core/src/question_baseselect" {
4752
4753
  protected setQuestionComment(newValue: string): void;
4753
4754
  private onUpdateCommentOnAutoOtherMode;
4754
4755
  private setOtherValueInternally;
4756
+ private getValueOnSettingOther;
4755
4757
  clearValue(keepComment?: boolean): void;
4756
4758
  updateCommentFromSurvey(newValue: any): any;
4757
4759
  get renderedValue(): any;
@@ -7193,6 +7195,7 @@ declare module "packages/survey-core/src/question_paneldynamic" {
7193
7195
  * @see addPanel
7194
7196
  */
7195
7197
  removePanel(value: any): void;
7198
+ private notifyOnPanelAddedRemoved;
7196
7199
  private getVisualPanelIndex;
7197
7200
  private getPanelVisibleIndexById;
7198
7201
  locStrsChanged(): void;
@@ -11972,11 +11975,12 @@ declare module "packages/survey-core/src/survey" {
11972
11975
  private disposeContainerPage;
11973
11976
  private updatePagesContainer;
11974
11977
  private currentSingleElementValue;
11975
- private getSingleQuestions;
11978
+ private getSingleElements;
11976
11979
  get currentSingleElement(): IElement;
11977
11980
  set currentSingleElement(val: IElement);
11978
11981
  get currentSingleQuestion(): Question;
11979
11982
  set currentSingleQuestion(val: Question);
11983
+ private changeCurrentSingleElementOnVisibilityChanged;
11980
11984
  private changeCurrentPageFromPreview;
11981
11985
  protected onQuestionsOnPageModeChanged(oldValue: string): void;
11982
11986
  private getPageStartIndex;
@@ -12141,9 +12145,8 @@ declare module "packages/survey-core/src/survey" {
12141
12145
  private get isValidateOnValueChange();
12142
12146
  private get isValidateOnComplete();
12143
12147
  matrixCellValidate(question: QuestionMatrixDropdownModelBase, options: MatrixCellValidateEvent): SurveyError;
12144
- dynamicPanelAdded(question: QuestionPanelDynamicModel, panelIndex?: number, panel?: PanelModel): void;
12145
- dynamicPanelRemoved(question: QuestionPanelDynamicModel, panelIndex: number, panel: PanelModel): void;
12146
- private hasQuestionVisibleIndeces;
12148
+ dynamicPanelAdded(question: QuestionPanelDynamicModel, panelIndex: number, panel: PanelModel, updateIndexes: boolean): void;
12149
+ dynamicPanelRemoved(question: QuestionPanelDynamicModel, panelIndex: number, panel: PanelModel, updateIndexes: boolean): void;
12147
12150
  dynamicPanelRemoving(question: QuestionPanelDynamicModel, panelIndex: number, panel: PanelModel): boolean;
12148
12151
  dynamicPanelItemValueChanged(question: IQuestion, options: any): void;
12149
12152
  dynamicPanelItemValueChanging(question: IQuestion, options: any): void;
@@ -15280,8 +15283,8 @@ declare module "packages/survey-core/src/base-interfaces" {
15280
15283
  getValidateVisitedEmptyFields(): boolean;
15281
15284
  multipleTextItemAdded(question: IQuestion, item: any): void;
15282
15285
  matrixCellValidate(question: IQuestion, options: any): SurveyError;
15283
- dynamicPanelAdded(question: IQuestion, panelIndex?: number, panel?: IPanel): void;
15284
- dynamicPanelRemoved(question: IQuestion, panelIndex: number, panel: IPanel): void;
15286
+ dynamicPanelAdded(question: IQuestion, panelIndex: number, panel: IPanel, updateIndexes: boolean): void;
15287
+ dynamicPanelRemoved(question: IQuestion, panelIndex: number, panel: IPanel, updateIndexes: boolean): void;
15285
15288
  dynamicPanelRemoving(question: IQuestion, panelIndex: number, panel: IPanel): boolean;
15286
15289
  dynamicPanelItemValueChanged(question: IQuestion, options: any): void;
15287
15290
  dynamicPanelItemValueChanging(question: IQuestion, options: any): void;
@@ -17222,7 +17225,7 @@ declare module "packages/survey-core/src/dropdownListModel" {
17222
17225
  private applyInputString;
17223
17226
  private cleanHtml;
17224
17227
  protected fixInputCase(): void;
17225
- protected applyHintString(item: ItemValue): void;
17228
+ protected applyHintString(): void;
17226
17229
  get inputStringRendered(): string;
17227
17230
  set inputStringRendered(val: string);
17228
17231
  get placeholderRendered(): any;
package/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.28
2
+ * surveyjs - Survey JavaScript library v1.12.30
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
  */
@@ -2101,6 +2101,11 @@ var DomWindowHelper = /** @class */ (function () {
2101
2101
  return null;
2102
2102
  return window.innerHeight;
2103
2103
  };
2104
+ DomWindowHelper.getDevicePixelRatio = function () {
2105
+ if (!DomWindowHelper.isAvailable())
2106
+ return null;
2107
+ return window.devicePixelRatio;
2108
+ };
2104
2109
  DomWindowHelper.getWindow = function () {
2105
2110
  if (!DomWindowHelper.isAvailable())
2106
2111
  return;
@@ -44496,7 +44501,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44496
44501
  if (goToFirstPage) {
44497
44502
  this.currentPage = this.firstVisiblePage;
44498
44503
  if (this.currentSingleElement) {
44499
- var questions = this.getSingleQuestions();
44504
+ var questions = this.getSingleElements();
44500
44505
  this.currentSingleElement = questions.length > 0 ? questions[0] : undefined;
44501
44506
  }
44502
44507
  }
@@ -44805,7 +44810,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44805
44810
  return this.nextPage();
44806
44811
  if (this.validationEnabled && !q.validate(true))
44807
44812
  return false;
44808
- var questions = this.getSingleQuestions();
44813
+ var questions = this.getSingleElements();
44809
44814
  var index = questions.indexOf(q);
44810
44815
  if (index < 0 || index === questions.length - 1)
44811
44816
  return false;
@@ -44826,7 +44831,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44826
44831
  var q = this.currentSingleElement;
44827
44832
  if (!q)
44828
44833
  return this.prevPage();
44829
- var questions = this.getSingleQuestions();
44834
+ var questions = this.getSingleElements();
44830
44835
  var index = questions.indexOf(q);
44831
44836
  if (index === 0)
44832
44837
  return false;
@@ -45417,17 +45422,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45417
45422
  });
45418
45423
  this.updateButtonsVisibility();
45419
45424
  };
45420
- SurveyModel.prototype.getSingleQuestions = function () {
45425
+ SurveyModel.prototype.getSingleElements = function (includeEl) {
45421
45426
  var res = new Array();
45422
45427
  var pages = this.pages;
45423
45428
  var _loop_3 = function () {
45424
45429
  var p = pages[i];
45425
45430
  if (!p.isStartPage && p.isVisible) {
45426
- var qs_1 = [];
45427
- //p.addQuestionsToList(qs, true);
45428
- p.elements.forEach(function (el) { return qs_1.push(el); });
45429
- qs_1.forEach(function (q) { if (q.isVisible)
45430
- res.push(q); });
45431
+ var els_1 = [];
45432
+ p.elements.forEach(function (el) { return els_1.push(el); });
45433
+ els_1.forEach(function (el) { if (el === includeEl || el.isVisible)
45434
+ res.push(el); });
45431
45435
  }
45432
45436
  };
45433
45437
  for (var i = 0; i < pages.length; i++) {
@@ -45484,6 +45488,15 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45484
45488
  enumerable: false,
45485
45489
  configurable: true
45486
45490
  });
45491
+ SurveyModel.prototype.changeCurrentSingleElementOnVisibilityChanged = function () {
45492
+ var el = this.currentSingleElement;
45493
+ if (!el || el.isVisible)
45494
+ return;
45495
+ var els = this.getSingleElements(el);
45496
+ var index = els.indexOf(el);
45497
+ var newEl = (index > 0) ? els[index - 1] : (index < els.length - 1 ? els[index + 1] : undefined);
45498
+ this.currentSingleElement = newEl;
45499
+ };
45487
45500
  SurveyModel.prototype.onQuestionsOnPageModeChanged = function (oldValue) {
45488
45501
  if (this.isShowingPreview || this.isDesignMode)
45489
45502
  return;
@@ -45495,9 +45508,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45495
45508
  this.updatePagesContainer();
45496
45509
  }
45497
45510
  if (this.isSingleVisibleQuestion) {
45498
- var questions = this.getSingleQuestions();
45499
- if (questions.length > 0) {
45500
- this.currentSingleElement = questions[0];
45511
+ var els = this.getSingleElements();
45512
+ if (els.length > 0) {
45513
+ this.currentSingleElement = els[0];
45501
45514
  }
45502
45515
  }
45503
45516
  };
@@ -45585,19 +45598,19 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45585
45598
  });
45586
45599
  SurveyModel.prototype.updateIsFirstLastPageState = function () {
45587
45600
  var curPage = this.currentPage;
45588
- this.setPropertyValue("isFirstPage", !!curPage && curPage === this.firstVisiblePage);
45589
- this.setPropertyValue("isLastPage", !!curPage && curPage === this.lastVisiblePage);
45590
45601
  var fVal = undefined;
45591
45602
  var lVal = undefined;
45592
45603
  var q = this.currentSingleElement;
45593
45604
  if (!!q) {
45594
- var questions = this.getSingleQuestions();
45605
+ var questions = this.getSingleElements();
45595
45606
  var index = questions.indexOf(q);
45596
45607
  if (index >= 0) {
45597
45608
  fVal = index === 0;
45598
45609
  lVal = index === questions.length - 1;
45599
45610
  }
45600
45611
  }
45612
+ this.setPropertyValue("isFirstPage", !!curPage && curPage === this.firstVisiblePage && (!q || fVal === true));
45613
+ this.setPropertyValue("isLastPage", !!curPage && curPage === this.lastVisiblePage && (!q || lVal === true));
45601
45614
  this.setPropertyValue("isFirstElement", fVal);
45602
45615
  this.setPropertyValue("isLastElement", lVal);
45603
45616
  };
@@ -46345,25 +46358,18 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46345
46358
  this.onMatrixCellValidate.fire(this, options);
46346
46359
  return options.error ? new CustomError(options.error, this) : null;
46347
46360
  };
46348
- SurveyModel.prototype.dynamicPanelAdded = function (question, panelIndex, panel) {
46349
- if (!this.isLoadingFromJson && this.hasQuestionVisibleIndeces(question)) {
46361
+ SurveyModel.prototype.dynamicPanelAdded = function (question, panelIndex, panel, updateIndexes) {
46362
+ if (!this.isLoadingFromJson && updateIndexes) {
46350
46363
  this.updateVisibleIndexes(question.page);
46351
46364
  }
46352
- if (this.onDynamicPanelAdded.isEmpty)
46353
- return;
46354
- var panels = question.panels;
46355
- if (panelIndex === undefined) {
46356
- panelIndex = panels.length - 1;
46357
- panel = panels[panelIndex];
46358
- }
46359
46365
  this.onDynamicPanelAdded.fire(this, { question: question, panel: panel, panelIndex: panelIndex });
46360
46366
  };
46361
- SurveyModel.prototype.dynamicPanelRemoved = function (question, panelIndex, panel) {
46367
+ SurveyModel.prototype.dynamicPanelRemoved = function (question, panelIndex, panel, updateIndexes) {
46362
46368
  var questions = !!panel ? panel.questions : [];
46363
46369
  for (var i = 0; i < questions.length; i++) {
46364
46370
  questions[i].clearOnDeletingContainer();
46365
46371
  }
46366
- if (this.hasQuestionVisibleIndeces(question)) {
46372
+ if (updateIndexes) {
46367
46373
  this.updateVisibleIndexes(question.page);
46368
46374
  }
46369
46375
  this.onDynamicPanelRemoved.fire(this, {
@@ -46372,14 +46378,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46372
46378
  panel: panel,
46373
46379
  });
46374
46380
  };
46375
- SurveyModel.prototype.hasQuestionVisibleIndeces = function (question) {
46376
- var qList = question.getNestedQuestions(true);
46377
- for (var i = 0; i < qList.length; i++) {
46378
- if (qList[i].visibleIndex > -1)
46379
- return true;
46380
- }
46381
- return false;
46382
- };
46383
46381
  SurveyModel.prototype.dynamicPanelRemoving = function (question, panelIndex, panel) {
46384
46382
  var options = {
46385
46383
  question: question,
@@ -48010,6 +48008,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
48010
48008
  if (resetIndexes) {
48011
48009
  this.updateVisibleIndexes(question.page);
48012
48010
  }
48011
+ if (!newValue) {
48012
+ this.changeCurrentSingleElementOnVisibilityChanged();
48013
+ }
48013
48014
  this.onQuestionVisibleChanged.fire(this, {
48014
48015
  question: question,
48015
48016
  name: question.name,
@@ -48023,6 +48024,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
48023
48024
  this.updateCurrentPage();
48024
48025
  }
48025
48026
  this.updateVisibleIndexes();
48027
+ if (!newValue) {
48028
+ this.changeCurrentSingleElementOnVisibilityChanged();
48029
+ }
48026
48030
  this.onPageVisibleChanged.fire(this, {
48027
48031
  page: page,
48028
48032
  visible: newValue,
@@ -48030,6 +48034,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
48030
48034
  };
48031
48035
  SurveyModel.prototype.panelVisibilityChanged = function (panel, newValue) {
48032
48036
  this.updateVisibleIndexes(panel.page);
48037
+ if (!newValue) {
48038
+ this.changeCurrentSingleElementOnVisibilityChanged();
48039
+ }
48033
48040
  this.onPanelVisibleChanged.fire(this, {
48034
48041
  panel: panel,
48035
48042
  visible: newValue,
@@ -50380,11 +50387,30 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
50380
50387
  this.isSettingComment = true;
50381
50388
  this.otherValueCore = newValue;
50382
50389
  if (this.isOtherSelected && !this.isRenderedValueSetting) {
50383
- this.value = this.rendredValueToData(this.renderedValue);
50390
+ this.value = this.getValueOnSettingOther(newValue);
50384
50391
  }
50385
50392
  this.isSettingComment = false;
50386
50393
  }
50387
50394
  };
50395
+ QuestionSelectBase.prototype.getValueOnSettingOther = function (otherValue) {
50396
+ var val = this.rendredValueToData(this.renderedValue);
50397
+ if (this.showCommentArea || this.getStoreOthersAsComment())
50398
+ return val;
50399
+ var item = itemvalue_ItemValue.getItemByValue(this.visibleChoices, otherValue);
50400
+ if (!item || item === this.otherItem)
50401
+ return val;
50402
+ this.otherValueCore = "";
50403
+ if (!Array.isArray(val))
50404
+ return otherValue;
50405
+ var index = val.indexOf(this.otherItem.value);
50406
+ if (index > -1) {
50407
+ val.splice(index, 1);
50408
+ }
50409
+ if (val.indexOf(otherValue) < 0) {
50410
+ val.push(otherValue);
50411
+ }
50412
+ return val;
50413
+ };
50388
50414
  QuestionSelectBase.prototype.clearValue = function (keepComment) {
50389
50415
  _super.prototype.clearValue.call(this, keepComment);
50390
50416
  this.prevOtherValue = undefined;
@@ -53410,6 +53436,8 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
53410
53436
  }
53411
53437
  var updateAfterFilterStringChanged = function () {
53412
53438
  _this.setFilterStringToListModel(_this.filterString);
53439
+ if (_this.filterString)
53440
+ _this.applyHintString();
53413
53441
  _this.popupRecalculatePosition(true);
53414
53442
  };
53415
53443
  if (this.question.choicesLazyLoadEnabled) {
@@ -53457,7 +53485,8 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
53457
53485
  if (hintStringMiddle && this.inputString != hintStringMiddle)
53458
53486
  this.inputString = hintStringMiddle;
53459
53487
  };
53460
- DropdownListModel.prototype.applyHintString = function (item) {
53488
+ DropdownListModel.prototype.applyHintString = function () {
53489
+ var item = this.listModel.focusedItem || this.question.selectedItem;
53461
53490
  var hasHtml = item === null || item === void 0 ? void 0 : item.locText.hasHtml;
53462
53491
  if (hasHtml || this.question.inputFieldComponentName) {
53463
53492
  this._markdownMode = true;
@@ -53477,9 +53506,6 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
53477
53506
  if (!val) {
53478
53507
  this.hintString = "";
53479
53508
  }
53480
- else {
53481
- this.applyHintString(this.listModel.focusedItem || this.question.selectedItem);
53482
- }
53483
53509
  },
53484
53510
  enumerable: false,
53485
53511
  configurable: true
@@ -53540,7 +53566,7 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
53540
53566
  });
53541
53567
  Object.defineProperty(DropdownListModel.prototype, "hintStringSuffix", {
53542
53568
  get: function () {
53543
- return this.hintString.substring(this.hintStringLC.indexOf(this.inputStringLC) + this.inputStringLC.length);
53569
+ return this.hintStringLC.indexOf(this.inputStringLC) >= 0 ? this.hintString.substring(this.hintStringLC.indexOf(this.inputStringLC) + this.inputStringLC.length) : "";
53544
53570
  },
53545
53571
  enumerable: false,
53546
53572
  configurable: true
@@ -53669,7 +53695,7 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
53669
53695
  this.applyInputString(this.listModel.focusedItem || this.question.selectedItem);
53670
53696
  }
53671
53697
  else {
53672
- this.applyHintString(this.listModel.focusedItem || this.question.selectedItem);
53698
+ this.applyHintString();
53673
53699
  }
53674
53700
  this.fixInputCase();
53675
53701
  this.ariaActivedescendant = (_a = this.listModel.focusedItem) === null || _a === void 0 ? void 0 : _a.elementId;
@@ -59202,7 +59228,7 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
59202
59228
  var newValue = [].concat(this.question.renderedValue || []);
59203
59229
  newValue.splice(newValue.indexOf(id), 1);
59204
59230
  this.question.renderedValue = newValue;
59205
- this.applyHintString(this.listModel.focusedItem);
59231
+ this.applyHintString();
59206
59232
  this.updateListState();
59207
59233
  };
59208
59234
  DropdownMultiSelectListModel.prototype.clear = function () {
@@ -59245,7 +59271,7 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
59245
59271
  DropdownMultiSelectListModel.prototype.afterScrollToFocusedItem = function () {
59246
59272
  var _a;
59247
59273
  if (!((_a = this.listModel.focusedItem) === null || _a === void 0 ? void 0 : _a.selected)) {
59248
- this.applyHintString(this.listModel.focusedItem || this.question.selectedItem);
59274
+ this.applyHintString();
59249
59275
  }
59250
59276
  else {
59251
59277
  this.hintString = "";
@@ -63615,10 +63641,10 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
63615
63641
  return null;
63616
63642
  var value = item.value;
63617
63643
  var description;
63618
- if (value === this.rateMin) {
63644
+ if (index === 0) {
63619
63645
  description = this.minRateDescription && this.locMinRateDescription;
63620
63646
  }
63621
- if (value === this.rateMax || index === settings.ratingMaximumRateValueCount) {
63647
+ if (index === (this.rateCount - 1)) {
63622
63648
  description = this.maxRateDescription && this.locMaxRateDescription;
63623
63649
  }
63624
63650
  var newItem = new RatingItemValue(value, item.text, description);
@@ -66330,8 +66356,7 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
66330
66356
  _this._loadedData = undefined;
66331
66357
  _this.updateValueHandler = function () {
66332
66358
  _this._loadedData = undefined;
66333
- _this.scaleCanvas(false, true);
66334
- _this.loadPreview(_this.value);
66359
+ _this.scaleCanvas(true, true);
66335
66360
  };
66336
66361
  return _this;
66337
66362
  }
@@ -66439,7 +66464,13 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
66439
66464
  QuestionSignaturePadModel.prototype.fromDataUrl = function (data) {
66440
66465
  this._loadedData = data;
66441
66466
  if (this.signaturePad) {
66442
- this.signaturePad.fromDataURL(data, { width: this.canvas.width * this.scale, height: this.canvas.height * this.scale });
66467
+ var devicePixelRatio_1 = DomWindowHelper.getDevicePixelRatio();
66468
+ var ratio = (this.dataFormat === "svg" && !!devicePixelRatio_1) ? devicePixelRatio_1 : 1;
66469
+ var options = {
66470
+ width: this.canvas.width * this.scale / ratio,
66471
+ height: this.canvas.height * this.scale / ratio
66472
+ };
66473
+ this.signaturePad.fromDataURL(data, options);
66443
66474
  }
66444
66475
  };
66445
66476
  Object.defineProperty(QuestionSignaturePadModel.prototype, "loadedData", {
@@ -67065,12 +67096,20 @@ var question_paneldynamic_QuestionPanelDynamicItem = /** @class */ (function ()
67065
67096
  return;
67066
67097
  this.data.setPanelItemData(this, name, helpers_Helpers.getUnbindValue(newValue));
67067
67098
  var questions = this.panel.questions;
67068
- var triggerName = QuestionPanelDynamicItem.ItemVariableName + "." + name;
67069
67099
  for (var i = 0; i < questions.length; i++) {
67070
67100
  var q = questions[i];
67071
67101
  if (q.getValueName() !== name) {
67072
67102
  q.checkBindings(name, newValue);
67073
67103
  }
67104
+ var suffix = settings.commentSuffix;
67105
+ if (name.endsWith(suffix)) {
67106
+ name = name.substring(0, name.length - suffix.length);
67107
+ var cQ = this.panel.getQuestionByName(name);
67108
+ if (!!cQ) {
67109
+ newValue = cQ.value;
67110
+ }
67111
+ }
67112
+ var triggerName = QuestionPanelDynamicItem.ItemVariableName + "." + name;
67074
67113
  q.runTriggers(triggerName, newValue);
67075
67114
  }
67076
67115
  };
@@ -68664,8 +68703,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
68664
68703
  if (!this.isRenderModeList) {
68665
68704
  this.currentIndex = index;
68666
68705
  }
68667
- if (this.survey)
68668
- this.survey.dynamicPanelAdded(this);
68706
+ this.notifyOnPanelAddedRemoved(true, index);
68669
68707
  return this.panelsCore[index];
68670
68708
  };
68671
68709
  QuestionPanelDynamicModel.prototype.updateValueOnAddingPanel = function (prevIndex, index) {
@@ -68798,10 +68836,26 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
68798
68836
  this.value = value;
68799
68837
  this.updateFooterActions();
68800
68838
  this.fireCallback(this.panelCountChangedCallback);
68801
- if (this.survey)
68802
- this.survey.dynamicPanelRemoved(this, index, panel);
68839
+ this.notifyOnPanelAddedRemoved(false, index, panel);
68803
68840
  this.isValueChangingInternally = false;
68804
68841
  };
68842
+ QuestionPanelDynamicModel.prototype.notifyOnPanelAddedRemoved = function (isAdded, index, panel) {
68843
+ if (!panel) {
68844
+ panel = this.panelsCore[index];
68845
+ }
68846
+ if (this.survey) {
68847
+ var updateIndeces = this.showQuestionNumbers === "onSurvey";
68848
+ if (isAdded) {
68849
+ this.survey.dynamicPanelAdded(this, index, panel, updateIndeces);
68850
+ }
68851
+ else {
68852
+ this.survey.dynamicPanelRemoved(this, index, panel, updateIndeces);
68853
+ }
68854
+ }
68855
+ if (isAdded && !!panel && this.showQuestionNumbers === "onPanel") {
68856
+ panel.setVisibleIndex(0);
68857
+ }
68858
+ };
68805
68859
  QuestionPanelDynamicModel.prototype.getVisualPanelIndex = function (val) {
68806
68860
  if (helpers_Helpers.isNumber(val))
68807
68861
  return val;
@@ -68994,7 +69048,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
68994
69048
  this.assignOnPropertyChangedToTemplate();
68995
69049
  if (!!this.survey) {
68996
69050
  for (var i = 0; i < this.panelCount; i++) {
68997
- this.survey.dynamicPanelAdded(this);
69051
+ this.notifyOnPanelAddedRemoved(true, i);
68998
69052
  }
68999
69053
  }
69000
69054
  this.updateIsReady();
@@ -72876,9 +72930,9 @@ Serializer.addClass("currencymask", [
72876
72930
 
72877
72931
  var Version;
72878
72932
  var ReleaseDate;
72879
- Version = "" + "1.12.28";
72933
+ Version = "" + "1.12.30";
72880
72934
  settings.version = Version;
72881
- ReleaseDate = "" + "2025-03-18";
72935
+ ReleaseDate = "" + "2025-03-31";
72882
72936
  function checkLibraryVersion(ver, libraryName) {
72883
72937
  if (Version != ver) {
72884
72938
  var str = "survey-core has version '" + Version + "' and " + libraryName