survey-react 1.12.35 → 1.12.36

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.35
2
+ * surveyjs - Survey JavaScript library v1.12.36
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.35
2
+ * surveyjs - Survey JavaScript library v1.12.36
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.35
2
+ * surveyjs - Survey JavaScript library v1.12.36
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.35
2
+ * surveyjs - Survey JavaScript library v1.12.36
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.35",
3
+ "version": "1.12.36",
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.35
2
+ * surveyjs - Survey JavaScript library v1.12.36
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.35
2
+ * surveyjs - Survey JavaScript library v1.12.36
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
@@ -3387,6 +3387,7 @@ declare module "packages/survey-core/src/panel" {
3387
3387
  protected _scrollableParent: any;
3388
3388
  protected _updateVisibility: any;
3389
3389
  private get allowRendering();
3390
+ private lazyRenderingTimeout;
3390
3391
  startLazyRendering(rowContainerDiv: HTMLElement, findScrollableContainer?: typeof findScrollableParent): void;
3391
3392
  ensureVisibility(): void;
3392
3393
  stopLazyRendering(): void;
@@ -9238,6 +9239,7 @@ declare module "packages/survey-core/src/question_text" {
9238
9239
  get maskInstance(): IInputMask;
9239
9240
  get inputValue(): string;
9240
9241
  set inputValue(val: string);
9242
+ protected convertToCorrectValue(val: any): any;
9241
9243
  protected onChangeQuestionValue(newValue: any): void;
9242
9244
  private updateInputValue;
9243
9245
  private hasToConvertToUTC;
@@ -17782,6 +17784,7 @@ declare module "packages/survey-core/src/question_checkbox" {
17782
17784
  set isAllSelected(val: boolean);
17783
17785
  toggleSelectAll(): void;
17784
17786
  protected allElementsSelected(): boolean;
17787
+ private isNoneItemsSelected;
17785
17788
  /**
17786
17789
  * Selects all choice items, except "Other" and "None".
17787
17790
  *
@@ -28214,6 +28217,7 @@ declare module "packages/survey-react-ui/src/row" {
28214
28217
  protected canRender(): boolean;
28215
28218
  protected renderElementContent(): React.JSX.Element;
28216
28219
  protected renderElement(): React.JSX.Element;
28220
+ private lazyRenderingTimeout;
28217
28221
  componentDidMount(): void;
28218
28222
  shouldComponentUpdate(nextProps: any, nextState: any): boolean;
28219
28223
  private stopLazyRendering;
package/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.35
2
+ * surveyjs - Survey JavaScript library v1.12.36
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
  */
@@ -27573,7 +27573,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
27573
27573
  delete json["choices"];
27574
27574
  }
27575
27575
  delete json["itemComponent"];
27576
- if (this.jsonObj && json.type === "rating") {
27576
+ if (this.jsonObj && json.type === "rating" && this.isLoadingFromJson) {
27577
27577
  Object.keys(this.jsonObj).forEach(function (prop) {
27578
27578
  json[prop] = _this.jsonObj[prop];
27579
27579
  });
@@ -30653,6 +30653,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
30653
30653
  if (!!rows) {
30654
30654
  rows.forEach(function (row) { return row.updateElementVisibility(); });
30655
30655
  }
30656
+ this.updateShowTableAndAddRow();
30656
30657
  };
30657
30658
  QuestionMatrixDropdownModelBase.prototype.shouldRunColumnExpression = function () {
30658
30659
  return false;
@@ -36493,7 +36494,7 @@ var panel_QuestionRowModel = /** @class */ (function (_super) {
36493
36494
  _this.stopLazyRendering();
36494
36495
  }
36495
36496
  };
36496
- setTimeout(function () {
36497
+ this.lazyRenderingTimeout = setTimeout(function () {
36497
36498
  if (!!_this._scrollableParent &&
36498
36499
  !!_this._scrollableParent.addEventListener) {
36499
36500
  _this._scrollableParent.addEventListener("scroll", _this._updateVisibility);
@@ -36513,6 +36514,7 @@ var panel_QuestionRowModel = /** @class */ (function (_super) {
36513
36514
  !!this._scrollableParent.removeEventListener) {
36514
36515
  this._scrollableParent.removeEventListener("scroll", this._updateVisibility);
36515
36516
  }
36517
+ clearTimeout(this.lazyRenderingTimeout);
36516
36518
  this._scrollableParent = undefined;
36517
36519
  this._updateVisibility = undefined;
36518
36520
  };
@@ -45451,8 +45453,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45451
45453
  if (!this.currentPage && this.visiblePageCount > 0) {
45452
45454
  this.currentPage = this.visiblePages[0];
45453
45455
  }
45456
+ if (this.isShowingPreview) {
45457
+ this.pages.forEach(function (page) {
45458
+ page.onFirstRendering();
45459
+ });
45460
+ }
45454
45461
  this.pages.forEach(function (page) {
45455
- if (page.hasShown) {
45462
+ if (page.wasRendered) {
45456
45463
  page.updateElementCss(true);
45457
45464
  }
45458
45465
  });
@@ -46876,8 +46883,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46876
46883
  if (visibleOnly === void 0) { visibleOnly = false; }
46877
46884
  if (includeDesignTime === void 0) { includeDesignTime = false; }
46878
46885
  if (includeNested === void 0) { includeNested = false; }
46879
- if (includeNested)
46886
+ if (includeNested) {
46880
46887
  includeDesignTime = false;
46888
+ var pages = visibleOnly ? this.visiblePages : this.pages;
46889
+ pages.forEach(function (page) { return page.onFirstRendering(); });
46890
+ }
46881
46891
  var res = [];
46882
46892
  for (var i = 0; i < this.pages.length; i++) {
46883
46893
  this.pages[i].addQuestionsToList(res, visibleOnly, includeDesignTime);
@@ -56110,6 +56120,12 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
56110
56120
  enumerable: false,
56111
56121
  configurable: true
56112
56122
  });
56123
+ QuestionTextModel.prototype.convertToCorrectValue = function (val) {
56124
+ if (val !== undefined && val !== null && typeof val !== "string" && !this.maskTypeIsEmpty && this.maskSettings.saveMaskedValue) {
56125
+ return this.maskInstance.getMaskedValue(val);
56126
+ }
56127
+ return _super.prototype.convertToCorrectValue.call(this, val);
56128
+ };
56113
56129
  QuestionTextModel.prototype.onChangeQuestionValue = function (newValue) {
56114
56130
  _super.prototype.onChangeQuestionValue.call(this, newValue);
56115
56131
  this.updateInputValue();
@@ -56120,12 +56136,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
56120
56136
  this._inputValue = _value;
56121
56137
  }
56122
56138
  else if (this.maskSettings.saveMaskedValue) {
56123
- if (!_value) {
56124
- this._inputValue = this.maskInstance.getMaskedValue("");
56125
- }
56126
- else {
56127
- this.inputValue = _value;
56128
- }
56139
+ this._inputValue = (_value !== undefined && _value !== null) ? _value : this.maskInstance.getMaskedValue("");
56129
56140
  }
56130
56141
  else {
56131
56142
  this._inputValue = this.maskInstance.getMaskedValue(_value);
@@ -58380,11 +58391,8 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
58380
58391
  this.isAllSelected = !this.isAllSelected;
58381
58392
  };
58382
58393
  QuestionCheckboxModel.prototype.allElementsSelected = function () {
58383
- var noneItems = this.getNoneItems();
58384
- for (var i = 0; i < noneItems.length; i++) {
58385
- if (this.isItemSelected(noneItems[i]))
58386
- return false;
58387
- }
58394
+ if (this.isNoneItemsSelected())
58395
+ return false;
58388
58396
  var items = this.getVisibleEnableItems();
58389
58397
  if (items.length === 0)
58390
58398
  return false;
@@ -58403,6 +58411,14 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
58403
58411
  }
58404
58412
  return true;
58405
58413
  };
58414
+ QuestionCheckboxModel.prototype.isNoneItemsSelected = function () {
58415
+ var noneItems = this.getNoneItems();
58416
+ for (var i = 0; i < noneItems.length; i++) {
58417
+ if (this.isItemSelected(noneItems[i]))
58418
+ return true;
58419
+ }
58420
+ return false;
58421
+ };
58406
58422
  /**
58407
58423
  * Selects all choice items, except "Other" and "None".
58408
58424
  *
@@ -58603,7 +58619,7 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
58603
58619
  _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
58604
58620
  if (isOnValueChanged)
58605
58621
  return;
58606
- if (this.minSelectedChoices > 0 && this.checkMinSelectedChoicesUnreached()) {
58622
+ if (this.checkMinSelectedChoicesUnreached()) {
58607
58623
  var minError = new CustomError(this.getLocalizationFormatString("minSelectError", this.minSelectedChoices), this);
58608
58624
  errors.push(minError);
58609
58625
  }
@@ -58664,6 +58680,8 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
58664
58680
  return false;
58665
58681
  var val = this.value;
58666
58682
  var len = !Array.isArray(val) ? 0 : val.length;
58683
+ if (len === 1 && this.isNoneItemsSelected())
58684
+ return false;
58667
58685
  return len < this.minSelectedChoices;
58668
58686
  };
58669
58687
  QuestionCheckboxModel.prototype.getItemClassCore = function (item, options) {
@@ -73075,9 +73093,9 @@ Serializer.addClass("currencymask", [
73075
73093
 
73076
73094
  var Version;
73077
73095
  var ReleaseDate;
73078
- Version = "" + "1.12.35";
73096
+ Version = "" + "1.12.36";
73079
73097
  settings.version = Version;
73080
- ReleaseDate = "" + "2025-05-06";
73098
+ ReleaseDate = "" + "2025-05-13";
73081
73099
  function checkLibraryVersion(ver, libraryName) {
73082
73100
  if (Version != ver) {
73083
73101
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -83907,7 +83925,7 @@ var row_SurveyRow = /** @class */ (function (_super) {
83907
83925
  }
83908
83926
  if (!!el && !this.row.isNeedRender) {
83909
83927
  var rowContainerDiv = el;
83910
- setTimeout(function () {
83928
+ this.lazyRenderingTimeout = setTimeout(function () {
83911
83929
  _this.row.startLazyRendering(rowContainerDiv);
83912
83930
  }, 10);
83913
83931
  }
@@ -83925,6 +83943,7 @@ var row_SurveyRow = /** @class */ (function (_super) {
83925
83943
  return true;
83926
83944
  };
83927
83945
  SurveyRow.prototype.stopLazyRendering = function () {
83946
+ clearTimeout(this.lazyRenderingTimeout);
83928
83947
  this.row.stopLazyRendering();
83929
83948
  this.row.isNeedRender = !this.row.isLazyRendering();
83930
83949
  };