survey-react 1.12.25 → 1.12.27

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/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.25
2
+ * surveyjs - Survey JavaScript library v1.12.27
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
  */
@@ -12292,7 +12292,9 @@ var popup_PopupModel = /** @class */ (function (_super) {
12292
12292
  };
12293
12293
  PopupModel.prototype.updateDisplayMode = function (menuType) {
12294
12294
  if (this.displayMode !== menuType) {
12295
- this.setWidthByTarget = menuType === "dropdown";
12295
+ var isDropdown = menuType === "dropdown";
12296
+ this.setWidthByTarget = isDropdown;
12297
+ this.isFocusedContent = !isDropdown;
12296
12298
  }
12297
12299
  switch (menuType) {
12298
12300
  case "dropdown": {
@@ -14831,6 +14833,9 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14831
14833
  configurable: true
14832
14834
  });
14833
14835
  SurveyElement.prototype.canHaveFrameStyles = function () {
14836
+ var _a;
14837
+ if (((_a = this.survey) === null || _a === void 0 ? void 0 : _a.currentSingleQuestion) === this)
14838
+ return true;
14834
14839
  return (this.parent !== undefined && (!this.hasParent || this.parent && this.parent.showPanelAsPage));
14835
14840
  };
14836
14841
  SurveyElement.prototype.getHasFrameV2 = function () {
@@ -16531,6 +16536,7 @@ var Logger = /** @class */ (function () {
16531
16536
  }());
16532
16537
 
16533
16538
  function showConfirmDialog(message, callback, options) {
16539
+ if (options === void 0) { options = {}; }
16534
16540
  var locStr = new localizablestring_LocalizableString(undefined);
16535
16541
  var popupViewModel = settings.showDialog({
16536
16542
  componentName: "sv-string-viewer",
@@ -18954,7 +18960,7 @@ var TriggerExpressionInfo = /** @class */ (function () {
18954
18960
  this.name = name;
18955
18961
  this.canRun = canRun;
18956
18962
  this.doComplete = doComplete;
18957
- this.runSecondCheck = function (keys) { return false; };
18963
+ this.getSecondRunner = function () { return undefined; };
18958
18964
  }
18959
18965
  return TriggerExpressionInfo;
18960
18966
  }());
@@ -19003,7 +19009,7 @@ var question_Question = /** @class */ (function (_super) {
19003
19009
  _this.finishSetValueOnExpression();
19004
19010
  });
19005
19011
  var setValueIfInfo = _this.addTriggerInfo("setValueIf", function () { return true; }, function () { return _this.runSetValueExpression(); });
19006
- setValueIfInfo.runSecondCheck = function (keys) { return _this.checkExpressionIf(keys); };
19012
+ setValueIfInfo.getSecondRunner = function () { return _this.getSetValueExpressionRunner(); };
19007
19013
  _this.registerPropertyChangedHandlers(["width"], function () {
19008
19014
  _this.updateQuestionCss();
19009
19015
  if (!!_this.parent) {
@@ -19309,13 +19315,21 @@ var question_Question = /** @class */ (function (_super) {
19309
19315
  if (val == this.visible)
19310
19316
  return;
19311
19317
  this.setPropertyValue("visible", val);
19312
- this.onVisibleChanged();
19318
+ this.onVisibleChangedCore();
19313
19319
  this.notifySurveyVisibilityChanged();
19314
19320
  },
19315
19321
  enumerable: false,
19316
19322
  configurable: true
19317
19323
  });
19318
19324
  Question.prototype.onVisibleChanged = function () {
19325
+ var prevVal = this.getPropertyValue("isVisible");
19326
+ this.onVisibleChangedCore();
19327
+ var newVal = this.getPropertyValue("isVisible");
19328
+ if (prevVal !== undefined && prevVal !== newVal) {
19329
+ this.notifySurveyVisibilityChanged();
19330
+ }
19331
+ };
19332
+ Question.prototype.onVisibleChangedCore = function () {
19319
19333
  this.updateIsVisibleProp();
19320
19334
  if (!this.isVisible && this.errors && this.errors.length > 0) {
19321
19335
  this.errors = [];
@@ -19530,11 +19544,9 @@ var question_Question = /** @class */ (function (_super) {
19530
19544
  this.setValueExpressionRunner.run(this.getDataFilteredValues(), this.getDataFilteredProperties());
19531
19545
  }
19532
19546
  };
19533
- Question.prototype.checkExpressionIf = function (keys) {
19547
+ Question.prototype.getSetValueExpressionRunner = function () {
19534
19548
  this.ensureSetValueExpressionRunner();
19535
- if (!this.setValueExpressionRunner)
19536
- return false;
19537
- return this.canExecuteTriggerByKeys(keys, this.setValueExpressionRunner);
19549
+ return this.setValueExpressionRunner;
19538
19550
  };
19539
19551
  Question.prototype.addTriggerInfo = function (name, canRun, doComplete) {
19540
19552
  var info = new TriggerExpressionInfo(name, canRun, doComplete);
@@ -19543,10 +19555,7 @@ var question_Question = /** @class */ (function (_super) {
19543
19555
  };
19544
19556
  Question.prototype.runTriggerInfo = function (info, keys) {
19545
19557
  var expression = this[info.name];
19546
- if (!expression || info.isRunning || !info.canRun()) {
19547
- if (info.runSecondCheck(keys)) {
19548
- info.doComplete();
19549
- }
19558
+ if (!expression && !info.getSecondRunner() || info.isRunning || !info.canRun()) {
19550
19559
  return;
19551
19560
  }
19552
19561
  if (!info.runner) {
@@ -19561,16 +19570,35 @@ var question_Question = /** @class */ (function (_super) {
19561
19570
  else {
19562
19571
  info.runner.expression = expression;
19563
19572
  }
19564
- if (!this.canExecuteTriggerByKeys(keys, info.runner) && !info.runSecondCheck(keys))
19573
+ if (!this.canExecuteTriggerByKeys(keys, info.runner, info.getSecondRunner()))
19565
19574
  return;
19566
19575
  info.isRunning = true;
19567
- info.runner.run(this.getDataFilteredValues(), this.getDataFilteredProperties());
19576
+ if (!expression && info.getSecondRunner()) {
19577
+ info.doComplete();
19578
+ info.isRunning = false;
19579
+ }
19580
+ else {
19581
+ info.runner.run(this.getDataFilteredValues(), this.getDataFilteredProperties());
19582
+ }
19568
19583
  };
19569
- Question.prototype.canExecuteTriggerByKeys = function (keys, runner) {
19584
+ Question.prototype.canExecuteTriggerByKeys = function (keys, runner, secondRunner) {
19585
+ if (!runner && !!secondRunner) {
19586
+ runner = secondRunner;
19587
+ secondRunner = undefined;
19588
+ }
19589
+ var run1 = this.canExecuteTriggerByKeysCore(keys, runner);
19590
+ if (run1 === "var")
19591
+ return true;
19592
+ if (!secondRunner)
19593
+ return run1 === "func";
19594
+ var run2 = this.canExecuteTriggerByKeysCore(keys, secondRunner);
19595
+ return run2 !== "";
19596
+ };
19597
+ Question.prototype.canExecuteTriggerByKeysCore = function (keys, runner) {
19570
19598
  var vars = runner.getVariables();
19571
19599
  if ((!vars || vars.length === 0) && runner.hasFunction())
19572
- return true;
19573
- return new conditionProcessValue_ProcessValue().isAnyKeyChanged(keys, vars);
19600
+ return "func";
19601
+ return new conditionProcessValue_ProcessValue().isAnyKeyChanged(keys, vars) ? "var" : "";
19574
19602
  };
19575
19603
  Question.prototype.runTriggers = function (name, value, keys) {
19576
19604
  var _this = this;
@@ -19947,11 +19975,8 @@ var question_Question = /** @class */ (function (_super) {
19947
19975
  });
19948
19976
  Object.defineProperty(Question.prototype, "renderedCommentPlaceholder", {
19949
19977
  get: function () {
19950
- var _this = this;
19951
- var func = function () {
19952
- return !_this.isReadOnly ? _this.commentPlaceHolder : undefined;
19953
- };
19954
- return this.getPropertyValue("renderedCommentPlaceholder", undefined, func);
19978
+ var _a;
19979
+ return (_a = this.getPropertyValue("renderedCommentPlaceholder")) !== null && _a !== void 0 ? _a : (!this.isReadOnly ? this.commentPlaceHolder : undefined);
19955
19980
  },
19956
19981
  enumerable: false,
19957
19982
  configurable: true
@@ -26542,17 +26567,17 @@ Serializer.addClass("expression", [
26542
26567
  { name: "minimumFractionDigits:number", default: -1 },
26543
26568
  { name: "useGrouping:boolean", default: true },
26544
26569
  { name: "precision:number", default: -1, category: "data" },
26545
- { name: "enableIf", visible: false },
26546
- { name: "isRequired", visible: false },
26547
- { name: "readOnly", visible: false },
26548
- { name: "requiredErrorText", visible: false },
26549
- { name: "resetValueIf", visible: false },
26550
- { name: "setValueIf", visible: false },
26551
- { name: "setValueExpression", visible: false },
26552
- { name: "defaultValueExpression", visible: false },
26553
- { name: "defaultValue", visible: false },
26554
- { name: "correctAnswer", visible: false },
26555
- { name: "requiredIf", visible: false }
26570
+ { name: "enableIf", visible: false, isSerializable: false },
26571
+ { name: "isRequired", visible: false, isSerializable: false },
26572
+ { name: "readOnly", visible: false, isSerializable: false },
26573
+ { name: "requiredErrorText", visible: false, isSerializable: false },
26574
+ { name: "resetValueIf", visible: false, isSerializable: false },
26575
+ { name: "setValueIf", visible: false, isSerializable: false },
26576
+ { name: "setValueExpression", visible: false, isSerializable: false },
26577
+ { name: "defaultValueExpression", visible: false, isSerializable: false },
26578
+ { name: "defaultValue", visible: false, isSerializable: false },
26579
+ { name: "correctAnswer", visible: false, isSerializable: false },
26580
+ { name: "requiredIf", visible: false, isSerializable: false }
26556
26581
  ], function () {
26557
26582
  return new question_expression_QuestionExpressionModel("");
26558
26583
  }, "question");
@@ -30551,11 +30576,14 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
30551
30576
  this.runFuncForCellQuestions(function (q) { q.localeChanged(); });
30552
30577
  };
30553
30578
  QuestionMatrixDropdownModelBase.prototype.runFuncForCellQuestions = function (func) {
30554
- if (!!this.generatedVisibleRows) {
30555
- for (var i = 0; i < this.generatedVisibleRows.length; i++) {
30556
- var row = this.generatedVisibleRows[i];
30557
- for (var j = 0; j < row.cells.length; j++) {
30558
- func(row.cells[j].question);
30579
+ var rows = this.generatedVisibleRows;
30580
+ if (!!rows) {
30581
+ for (var i = 0; i < rows.length; i++) {
30582
+ var row = rows[i];
30583
+ if (row.isVisible) {
30584
+ for (var j = 0; j < row.cells.length; j++) {
30585
+ func(row.cells[j].question);
30586
+ }
30559
30587
  }
30560
30588
  }
30561
30589
  }
@@ -31148,6 +31176,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
31148
31176
  return [];
31149
31177
  };
31150
31178
  QuestionMatrixDropdownModelBase.prototype.getProgressInfo = function () {
31179
+ this.getIsRequireToGenerateRows() && this.generateVisibleRowsIfNeeded();
31151
31180
  if (!!this.generatedVisibleRows)
31152
31181
  return survey_element_SurveyElement.getProgressInfoByElements(this.getCellQuestions(), this.isRequired);
31153
31182
  var res = base_Base.createProgressInfo();
@@ -31158,6 +31187,9 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
31158
31187
  }
31159
31188
  return res;
31160
31189
  };
31190
+ QuestionMatrixDropdownModelBase.prototype.getIsRequireToGenerateRows = function () {
31191
+ return !!this.rowsVisibleIf;
31192
+ };
31161
31193
  QuestionMatrixDropdownModelBase.prototype.updateProgressInfoByValues = function (res) { };
31162
31194
  QuestionMatrixDropdownModelBase.prototype.updateProgressInfoByRow = function (res, rowValue) {
31163
31195
  for (var i = 0; i < this.columns.length; i++) {
@@ -32136,6 +32168,15 @@ var question_matrixdropdown_QuestionMatrixDropdownModel = /** @class */ (functio
32136
32168
  QuestionMatrixDropdownModel.prototype.getSearchableItemValueKeys = function (keys) {
32137
32169
  keys.push("rows");
32138
32170
  };
32171
+ QuestionMatrixDropdownModel.prototype.getIsRequireToGenerateRows = function () {
32172
+ if (_super.prototype.getIsRequireToGenerateRows.call(this))
32173
+ return true;
32174
+ for (var i = 0; i < this.rows.length; i++) {
32175
+ if (!!this.rows[i].visibleIf)
32176
+ return true;
32177
+ }
32178
+ return false;
32179
+ };
32139
32180
  QuestionMatrixDropdownModel.prototype.updateProgressInfoByValues = function (res) {
32140
32181
  var val = this.value;
32141
32182
  if (!val)
@@ -34628,6 +34669,8 @@ var defaultV2Css = {
34628
34669
  imagepicker: {
34629
34670
  mainRoot: "sd-element sd-question sd-row__question",
34630
34671
  root: "sd-selectbase sd-imagepicker",
34672
+ rootResponsive: "sd-imagepicker--responsive",
34673
+ rootStatic: "sd-imagepicker--static",
34631
34674
  rootColumn: "sd-imagepicker--column",
34632
34675
  item: "sd-imagepicker__item",
34633
34676
  itemOnError: "sd-imagepicker__item--error",
@@ -44753,7 +44796,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44753
44796
  var q = this.currentSingleQuestion;
44754
44797
  if (!q)
44755
44798
  return this.nextPage();
44756
- if (!q.validate(true))
44799
+ if (this.validationEnabled && !q.validate(true))
44757
44800
  return false;
44758
44801
  var questions = this.getSingleQuestions();
44759
44802
  var index = questions.indexOf(q);
@@ -45043,7 +45086,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45043
45086
  SurveyModel.prototype.fireValidatedErrorsOnPage = function (page) {
45044
45087
  if (this.onValidatedErrorsOnCurrentPage.isEmpty || !page)
45045
45088
  return;
45046
- var questionsOnPage = page.questions;
45089
+ var questionsOnPage = this.getNestedQuestionsByQuestionArray(page.questions, true);
45047
45090
  var questions = new Array();
45048
45091
  var errors = new Array();
45049
45092
  for (var i = 0; i < questionsOnPage.length; i++) {
@@ -45145,7 +45188,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45145
45188
  return false;
45146
45189
  }
45147
45190
  this.showPreviewCore();
45148
- return true;
45191
+ return this.isShowingPreview;
45149
45192
  };
45150
45193
  SurveyModel.prototype.showPreviewCore = function () {
45151
45194
  var options = { allowShowPreview: true, allow: true };
@@ -45165,6 +45208,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45165
45208
  return;
45166
45209
  this.gotoPageFromPreview = currentPage;
45167
45210
  this.isShowingPreview = false;
45211
+ var q = this.currentSingleQuestion;
45212
+ if (!!(q === null || q === void 0 ? void 0 : q.page)) {
45213
+ q.page.updateRows();
45214
+ this.currentPage = q.page;
45215
+ }
45168
45216
  };
45169
45217
  SurveyModel.prototype.cancelPreviewByPage = function (panel) {
45170
45218
  this.cancelPreview(panel);
@@ -45327,6 +45375,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45327
45375
  rootPage.setSurveyImpl(this);
45328
45376
  this.pageContainerValue = rootPage;
45329
45377
  this.currentPage = rootPage;
45378
+ if (!!this.currentSingleQuestionValue) {
45379
+ this.visiblePages.forEach(function (page) { return page.updateRows(); });
45380
+ }
45330
45381
  }
45331
45382
  if (!this.isSinglePage && !this.isShowingPreview) {
45332
45383
  this.disposeContainerPage();
@@ -45357,13 +45408,18 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45357
45408
  for (var i = 0; i < pages.length; i++) {
45358
45409
  var p = pages[i];
45359
45410
  if (!p.isStartPage && p.isVisible) {
45360
- p.addQuestionsToList(res, true);
45411
+ var qs = [];
45412
+ p.addQuestionsToList(qs, true);
45413
+ qs.forEach(function (q) { if (q.isVisible)
45414
+ res.push(q); });
45361
45415
  }
45362
45416
  }
45363
45417
  return res;
45364
45418
  };
45365
45419
  Object.defineProperty(SurveyModel.prototype, "currentSingleQuestion", {
45366
- get: function () { return this.currentSingleQuestionValue; },
45420
+ get: function () {
45421
+ return !this.isShowingPreview ? this.currentSingleQuestionValue : undefined;
45422
+ },
45367
45423
  set: function (val) {
45368
45424
  var oldVal = this.currentSingleQuestion;
45369
45425
  if (val !== oldVal && !this.isCompleted) {
@@ -45682,6 +45738,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45682
45738
  this.startTimerFromUI();
45683
45739
  this.onStarted.fire(this, {});
45684
45740
  this.updateVisibleIndexes();
45741
+ this.currentPageNo = 0;
45685
45742
  if (!!this.currentPage) {
45686
45743
  this.currentPage.locStrsChanged();
45687
45744
  }
@@ -46760,6 +46817,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46760
46817
  }
46761
46818
  if (!includeNested)
46762
46819
  return res;
46820
+ return this.getNestedQuestionsByQuestionArray(res, visibleOnly);
46821
+ };
46822
+ SurveyModel.prototype.getNestedQuestionsByQuestionArray = function (res, visibleOnly) {
46763
46823
  var res2 = [];
46764
46824
  res.forEach(function (q) {
46765
46825
  res2.push(q);
@@ -46931,6 +46991,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46931
46991
  question.onSurveyValueChanged(newValue);
46932
46992
  }
46933
46993
  }
46994
+ this.updateProgressText(true);
46934
46995
  this.fireOnValueChanged(valueName, newValue, !!questionName ? this.getQuestionByName(questionName) : undefined);
46935
46996
  if (this.isDisposed)
46936
46997
  return;
@@ -55359,7 +55420,7 @@ var InputElementAdapter = /** @class */ (function () {
55359
55420
  this.inputMaskInstancePropertyChangedHandler = function (sender, options) {
55360
55421
  if (options.name !== "saveMaskedValue") {
55361
55422
  var maskedValue = _this.inputMaskInstance.getMaskedValue(_this.prevUnmaskedValue);
55362
- _this.inputElement.value = maskedValue;
55423
+ _this.setInputValue(maskedValue);
55363
55424
  }
55364
55425
  };
55365
55426
  this.clickHandler = function (event) {
@@ -55370,7 +55431,7 @@ var InputElementAdapter = /** @class */ (function () {
55370
55431
  this.beforeInputHandler = function (event) {
55371
55432
  var args = _this.createArgs(event);
55372
55433
  var result = _this.inputMaskInstance.processInput(args);
55373
- _this.inputElement.value = result.value;
55434
+ _this.setInputValue(result.value);
55374
55435
  _this.inputElement.setSelectionRange(result.caretPosition, result.caretPosition);
55375
55436
  if (!result.cancelPreventDefault) {
55376
55437
  event.preventDefault();
@@ -55378,17 +55439,23 @@ var InputElementAdapter = /** @class */ (function () {
55378
55439
  };
55379
55440
  this.changeHandler = function (event) {
55380
55441
  var result = _this.inputMaskInstance.processInput({ prevValue: "", insertedChars: event.target.value, selectionStart: 0, selectionEnd: 0 });
55381
- _this.inputElement.value = result.value;
55442
+ _this.setInputValue(result.value);
55382
55443
  };
55383
55444
  var _value = value;
55384
55445
  if (_value === null || _value === undefined) {
55385
55446
  _value = "";
55386
55447
  }
55387
- this.inputElement.value = inputMaskInstance.getMaskedValue(_value);
55448
+ this.setInputValue(inputMaskInstance.getMaskedValue(_value));
55388
55449
  this.prevUnmaskedValue = _value;
55389
55450
  inputMaskInstance.onPropertyChanged.add(this.inputMaskInstancePropertyChangedHandler);
55390
55451
  this.addInputEventListener();
55391
55452
  }
55453
+ InputElementAdapter.prototype.setInputValue = function (value) {
55454
+ if (this.inputElement.maxLength >= 0 && this.inputElement.maxLength < value.length) {
55455
+ value = value.slice(0, this.inputElement.maxLength);
55456
+ }
55457
+ this.inputElement.value = value;
55458
+ };
55392
55459
  InputElementAdapter.prototype.createArgs = function (event) {
55393
55460
  var args = {
55394
55461
  insertedChars: event.data,
@@ -62570,7 +62637,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
62570
62637
  if (this.needConfirmRemoveFile) {
62571
62638
  confirmActionAsync({
62572
62639
  message: this.getConfirmRemoveMessage(data.name),
62573
- funcOnYes: function () { _this.clearFilesCore(); },
62640
+ funcOnYes: function () { _this.removeFileCore(data); },
62574
62641
  locale: this.getLocale(),
62575
62642
  rootElement: this.survey.rootElement,
62576
62643
  cssClass: this.cssClasses.confirmDialog
@@ -63748,21 +63815,13 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
63748
63815
  });
63749
63816
  Object.defineProperty(QuestionRatingModel.prototype, "ratingRootCss", {
63750
63817
  get: function () {
63751
- var baseClassModifier = ((this.displayMode == "buttons" || (!!this.survey && this.survey.isDesignMode)) && this.cssClasses.rootWrappable) ?
63752
- this.cssClasses.rootWrappable : "";
63753
- var rootClassModifier = "";
63754
- if (this.hasMaxLabel || this.hasMinLabel) {
63755
- if (this.rateDescriptionLocation == "top")
63756
- rootClassModifier = this.cssClasses.rootLabelsTop;
63757
- if (this.rateDescriptionLocation == "bottom")
63758
- rootClassModifier = this.cssClasses.rootLabelsBottom;
63759
- if (this.rateDescriptionLocation == "topBottom")
63760
- rootClassModifier = this.cssClasses.rootLabelsDiagonal;
63761
- }
63818
+ var hasLabel = this.hasMaxLabel || this.hasMinLabel;
63762
63819
  return new CssClassBuilder()
63763
63820
  .append(this.cssClasses.root)
63764
- .append(baseClassModifier)
63765
- .append(rootClassModifier)
63821
+ .append(this.cssClasses.rootWrappable, this.displayMode == "buttons" || (!!this.survey && this.survey.isDesignMode) || (this.displayMode == "auto" && !this.supportResponsiveness()))
63822
+ .append(this.cssClasses.rootLabelsTop, hasLabel && this.rateDescriptionLocation == "top")
63823
+ .append(this.cssClasses.rootLabelsBottom, hasLabel && this.rateDescriptionLocation == "bottom")
63824
+ .append(this.cssClasses.rootLabelsDiagonal, hasLabel && this.rateDescriptionLocation == "topBottom")
63766
63825
  .append(this.cssClasses.itemSmall, this.itemSmallMode && this.rateType != "labels")
63767
63826
  .toString();
63768
63827
  },
@@ -63988,7 +64047,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
63988
64047
  };
63989
64048
  // TODO: return responsiveness after design improvement
63990
64049
  QuestionRatingModel.prototype.supportResponsiveness = function () {
63991
- return true;
64050
+ return !this.inMatrixMode;
63992
64051
  };
63993
64052
  QuestionRatingModel.prototype.onBeforeSetCompactRenderer = function () {
63994
64053
  if (!this.dropdownListModelValue) {
@@ -64822,6 +64881,7 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
64822
64881
  }
64823
64882
  _this._width && _this.processResponsiveness(0, _this._width);
64824
64883
  };
64884
+ _this.gridColCount = undefined;
64825
64885
  _this.colCount = 0;
64826
64886
  _this.registerPropertyChangedHandlers(["minImageWidth", "maxImageWidth", "minImageHeight", "maxImageHeight", "visibleChoices", "colCount", "isResponsiveValue"], function () {
64827
64887
  if (!!_this._width) {
@@ -65100,7 +65160,13 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
65100
65160
  this.addNewItemToVisibleChoices(items, isAddAll);
65101
65161
  };
65102
65162
  QuestionImagePickerModel.prototype.getSelectBaseRootCss = function () {
65103
- return new CssClassBuilder().append(_super.prototype.getSelectBaseRootCss.call(this)).append(this.cssClasses.rootColumn, this.getCurrentColCount() == 1).toString();
65163
+ var isResponsive = this.isResponsive;
65164
+ return new CssClassBuilder()
65165
+ .append(_super.prototype.getSelectBaseRootCss.call(this))
65166
+ .append(this.cssClasses.rootResponsive, isResponsive)
65167
+ .append(this.cssClasses.rootStatic, !isResponsive)
65168
+ .append(this.cssClasses.rootColumn, this.getCurrentColCount() == 1)
65169
+ .toString();
65104
65170
  };
65105
65171
  Object.defineProperty(QuestionImagePickerModel.prototype, "isResponsive", {
65106
65172
  get: function () {
@@ -65138,6 +65204,14 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
65138
65204
  }
65139
65205
  return this.responsiveColCount;
65140
65206
  };
65207
+ QuestionImagePickerModel.prototype.getContainerStyle = function () {
65208
+ if (!this.isResponsive)
65209
+ return {};
65210
+ return {
65211
+ gridAutoFlow: !this.gridColCount ? "column" : null,
65212
+ gridTemplateColumns: this.gridColCount ? "repeat(" + this.gridColCount + ", 1fr)" : null
65213
+ };
65214
+ };
65141
65215
  QuestionImagePickerModel.prototype.processResponsiveness = function (_, availableWidth) {
65142
65216
  this._width = availableWidth = Math.floor(availableWidth);
65143
65217
  var calcAvailableColumnsCount = function (availableWidth, minWidth, gap) {
@@ -65155,24 +65229,25 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
65155
65229
  var minHeight = this.minImageHeight * this.imageScale;
65156
65230
  var colCount = this.colCount;
65157
65231
  var width_1;
65232
+ var availableColumnsCount = calcAvailableColumnsCount(availableWidth, minWidth, gap);
65158
65233
  if (colCount === 0) {
65159
65234
  if ((gap + minWidth) * itemsCount - gap > availableWidth) {
65160
- var itemsInRow = calcAvailableColumnsCount(availableWidth, minWidth, gap);
65161
- width_1 = Math.floor((availableWidth - gap * (itemsInRow - 1)) / itemsInRow);
65235
+ width_1 = Math.floor((availableWidth - gap * (availableColumnsCount - 1)) / availableColumnsCount);
65162
65236
  }
65163
65237
  else {
65164
65238
  width_1 = Math.floor(((availableWidth - gap * (itemsCount - 1)) / itemsCount));
65165
65239
  }
65240
+ this.gridColCount = Math.max(Math.min(itemsCount, availableColumnsCount), 1);
65166
65241
  }
65167
65242
  else {
65168
- var availableColumnsCount = calcAvailableColumnsCount(availableWidth, minWidth, gap);
65169
65243
  if (availableColumnsCount < colCount) {
65170
- this.responsiveColCount = availableColumnsCount >= 1 ? availableColumnsCount : 1;
65244
+ this.responsiveColCount = Math.max(availableColumnsCount, 1);
65171
65245
  colCount = this.responsiveColCount;
65172
65246
  }
65173
65247
  else {
65174
65248
  this.responsiveColCount = colCount;
65175
65249
  }
65250
+ this.gridColCount = this.responsiveColCount;
65176
65251
  width_1 = Math.floor((availableWidth - gap * (colCount - 1)) / colCount);
65177
65252
  }
65178
65253
  width_1 = Math.max(minWidth, Math.min(width_1, maxWidth));
@@ -65238,6 +65313,9 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
65238
65313
  question_imagepicker_decorate([
65239
65314
  jsonobject_property({})
65240
65315
  ], QuestionImagePickerModel.prototype, "responsiveColCount", void 0);
65316
+ question_imagepicker_decorate([
65317
+ jsonobject_property()
65318
+ ], QuestionImagePickerModel.prototype, "gridColCount", void 0);
65241
65319
  return QuestionImagePickerModel;
65242
65320
  }(QuestionCheckboxBase));
65243
65321
 
@@ -72247,7 +72325,7 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
72247
72325
  var maxYear = dateTime.max.getFullYear();
72248
72326
  if (checkOnlyLeapYears) {
72249
72327
  minYear = Math.ceil(minYear / 4) * 4;
72250
- maxYear = Math.floor(minYear / 4) * 4;
72328
+ maxYear = Math.floor(maxYear / 4) * 4;
72251
72329
  if (minYear > maxYear) {
72252
72330
  minYear = undefined;
72253
72331
  maxYear = undefined;
@@ -72411,7 +72489,7 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
72411
72489
  var isoMin, isoMax;
72412
72490
  if (this.hasDatePart) {
72413
72491
  isoMin = this.min || "0001-01-01";
72414
- isoMax = this.max || "9999-12-31";
72492
+ isoMax = this.max || "9996-12-31";
72415
72493
  }
72416
72494
  else {
72417
72495
  isoMin = this.defaultDate + (this.min || "00:00:00");
@@ -72764,9 +72842,9 @@ Serializer.addClass("currencymask", [
72764
72842
 
72765
72843
  var Version;
72766
72844
  var ReleaseDate;
72767
- Version = "" + "1.12.25";
72845
+ Version = "" + "1.12.27";
72768
72846
  settings.version = Version;
72769
- ReleaseDate = "" + "2025-02-25";
72847
+ ReleaseDate = "" + "2025-03-12";
72770
72848
  function checkLibraryVersion(ver, libraryName) {
72771
72849
  if (Version != ver) {
72772
72850
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -83016,6 +83094,21 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
83016
83094
  var _this = _super.call(this, props) || this;
83017
83095
  _this._allowComponentUpdate = true;
83018
83096
  _this.prevStateElements = [];
83097
+ _this.propertyValueChangedHandler = function (hash, key, val) {
83098
+ if (hash[key] !== val) {
83099
+ hash[key] = val;
83100
+ if (!_this.canUsePropInState(key))
83101
+ return;
83102
+ if (_this.isRendering)
83103
+ return;
83104
+ _this.changedStatePropNameValue = key;
83105
+ _this.setState(function (state) {
83106
+ var newState = {};
83107
+ newState[key] = val;
83108
+ return newState;
83109
+ });
83110
+ }
83111
+ };
83019
83112
  return _this;
83020
83113
  }
83021
83114
  SurveyElementBase.renderLocString = function (locStr, style, key) {
@@ -83124,6 +83217,9 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
83124
83217
  };
83125
83218
  SurveyElementBase.prototype.unMakeBaseElementsReact = function () {
83126
83219
  var els = this.getStateElements();
83220
+ this.unMakeBaseElementsReactive(els);
83221
+ };
83222
+ SurveyElementBase.prototype.unMakeBaseElementsReactive = function (els) {
83127
83223
  for (var i = 0; i < els.length; i++) {
83128
83224
  this.unMakeBaseElementReact(els[i]);
83129
83225
  }
@@ -83155,6 +83251,9 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
83155
83251
  SurveyElementBase.prototype.canMakeReact = function (stateElement) {
83156
83252
  return !!stateElement && !!stateElement.iteratePropertiesHash;
83157
83253
  };
83254
+ SurveyElementBase.prototype.isCurrentStateElement = function (stateElement) {
83255
+ return !!stateElement && !!stateElement.setPropertyValueCoreHandler && stateElement.setPropertyValueCoreHandler === this.propertyValueChangedHandler;
83256
+ };
83158
83257
  SurveyElementBase.prototype.makeBaseElementReact = function (stateElement) {
83159
83258
  var _this = this;
83160
83259
  if (!this.canMakeReact(stateElement))
@@ -83177,21 +83276,7 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
83177
83276
  };
83178
83277
  }
83179
83278
  });
83180
- stateElement.setPropertyValueCoreHandler = function (hash, key, val) {
83181
- if (hash[key] !== val) {
83182
- hash[key] = val;
83183
- if (!_this.canUsePropInState(key))
83184
- return;
83185
- if (_this.isRendering)
83186
- return;
83187
- _this.changedStatePropNameValue = key;
83188
- _this.setState(function (state) {
83189
- var newState = {};
83190
- newState[key] = val;
83191
- return newState;
83192
- });
83193
- }
83194
- };
83279
+ stateElement.setPropertyValueCoreHandler = this.propertyValueChangedHandler;
83195
83280
  };
83196
83281
  SurveyElementBase.prototype.canUsePropInState = function (key) {
83197
83282
  return true;
@@ -83199,6 +83284,11 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
83199
83284
  SurveyElementBase.prototype.unMakeBaseElementReact = function (stateElement) {
83200
83285
  if (!this.canMakeReact(stateElement))
83201
83286
  return;
83287
+ if (!this.isCurrentStateElement(stateElement)) {
83288
+ // eslint-disable-next-line no-console
83289
+ // console.warn("Looks like the component is bound to another survey element. It is not supported and can lead to issues.");
83290
+ // return;
83291
+ }
83202
83292
  stateElement.setPropertyValueCoreHandler = undefined;
83203
83293
  stateElement.iteratePropertiesHash(function (hash, key) {
83204
83294
  var val = hash[key];
@@ -83602,8 +83692,10 @@ var row_SurveyRow = /** @class */ (function (_super) {
83602
83692
  };
83603
83693
  SurveyRow.prototype.componentWillUnmount = function () {
83604
83694
  _super.prototype.componentWillUnmount.call(this);
83605
- this.row.setRootElement(undefined);
83606
- this.stopLazyRendering();
83695
+ if (this.isCurrentStateElement(this.getStateElement())) {
83696
+ this.row.setRootElement(undefined);
83697
+ this.stopLazyRendering();
83698
+ }
83607
83699
  };
83608
83700
  SurveyRow.prototype.createElement = function (element, elementIndex) {
83609
83701
  var index = elementIndex ? "-" + elementIndex : 0;
@@ -85216,10 +85308,6 @@ var page_SurveyPage = /** @class */ (function (_super) {
85216
85308
  enumerable: false,
85217
85309
  configurable: true
85218
85310
  });
85219
- // shouldComponentUpdate(nextProps: any, nextState: any): boolean {
85220
- // if(!super.shouldComponentUpdate(nextProps, nextState)) return false;
85221
- // return true;
85222
- // }
85223
85311
  SurveyPage.prototype.renderElement = function () {
85224
85312
  var title = this.renderTitle();
85225
85313
  var description = this.renderDescription();
@@ -90822,7 +90910,7 @@ var imagepicker_SurveyQuestionImagePicker = /** @class */ (function (_super) {
90822
90910
  });
90823
90911
  SurveyQuestionImagePicker.prototype.renderElement = function () {
90824
90912
  var cssClasses = this.question.cssClasses;
90825
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss() },
90913
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss(), style: this.question.getContainerStyle() },
90826
90914
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
90827
90915
  this.question.hasColumns ? this.getColumns(cssClasses) : this.getItems(cssClasses)));
90828
90916
  };