survey-react 1.12.32 → 1.12.33

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/modern.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.32
2
+ * surveyjs - Survey JavaScript library v1.12.33
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.32
2
+ * surveyjs - Survey JavaScript library v1.12.33
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.32",
3
+ "version": "1.12.33",
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.32
2
+ * surveyjs - Survey JavaScript library v1.12.33
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.32
2
+ * surveyjs - Survey JavaScript library v1.12.33
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
@@ -3635,6 +3635,7 @@ declare module "packages/survey-core/src/panel" {
3635
3635
  updateElementVisibility(): void;
3636
3636
  getFirstQuestionToFocus(withError?: boolean, ignoreCollapseState?: boolean): Question;
3637
3637
  getFirstVisibleQuestion(): Question;
3638
+ getFirstVisibleElement(): IElement;
3638
3639
  /**
3639
3640
  * Focuses the first question in this panel/page.
3640
3641
  * @see focusFirstErrorQuestion
@@ -4241,6 +4242,7 @@ declare module "packages/survey-core/src/question_file" {
4241
4242
  get multipleRendered(): string;
4242
4243
  get showChooseButton(): boolean;
4243
4244
  get showFileDecorator(): boolean;
4245
+ get showDragAreaPlaceholder(): boolean;
4244
4246
  get allowShowPreview(): boolean;
4245
4247
  get showPreviewContainer(): boolean;
4246
4248
  get showRemoveButtonCore(): boolean;
@@ -9281,6 +9283,7 @@ declare module "packages/survey-core/src/question_text" {
9281
9283
  onCompositionUpdate: (event: any) => void;
9282
9284
  onKeyUp: (event: any) => void;
9283
9285
  private updateDateValidationMessage;
9286
+ readOnlyBlocker: (event: any) => boolean;
9284
9287
  onKeyDown: (event: any) => void;
9285
9288
  onChange: (event: any) => void;
9286
9289
  protected onBlurCore(event: any): void;
@@ -14665,6 +14668,7 @@ declare module "packages/survey-core/src/question_matrixdropdownbase" {
14665
14668
  getAllValues(): any;
14666
14669
  getFilteredValues(): any;
14667
14670
  getFilteredProperties(): any;
14671
+ private getDataRowValue;
14668
14672
  private applyRowVariablesToValues;
14669
14673
  runCondition(values: HashTable<any>, properties: HashTable<any>, rowsVisibleIf?: string): void;
14670
14674
  updateElementVisibility(): void;
package/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.32
2
+ * surveyjs - Survey JavaScript library v1.12.33
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
  */
@@ -25814,7 +25814,9 @@ var question_custom_QuestionCompositeModel = /** @class */ (function (_super) {
25814
25814
  if (!!q && q.comment !== newValue) {
25815
25815
  q.comment = newValue;
25816
25816
  }
25817
- this.value = val;
25817
+ if (!this.settingNewValue) {
25818
+ this.value = val;
25819
+ }
25818
25820
  };
25819
25821
  QuestionCompositeModel.prototype.getComment = function (name) {
25820
25822
  var q = this.getQuestionByName(name);
@@ -29418,7 +29420,7 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
29418
29420
  this.isCreatingDetailPanel = true;
29419
29421
  this.detailPanelValue = this.data.createRowDetailPanel(this);
29420
29422
  var questions = this.detailPanelValue.questions;
29421
- var value = this.data.getRowValue(this.data.getRowIndex(this));
29423
+ var value = this.getDataRowValue();
29422
29424
  if (!helpers_Helpers.isValueEmpty(value)) {
29423
29425
  for (var i = 0; i < questions.length; i++) {
29424
29426
  var key = questions[i].getValueName();
@@ -29443,12 +29445,27 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
29443
29445
  }
29444
29446
  }
29445
29447
  res.row = this.getAllValues();
29448
+ if (this.data) {
29449
+ var rowVal = this.getDataRowValue();
29450
+ if (rowVal) {
29451
+ for (var key in rowVal) {
29452
+ if (res.row[key] === undefined) {
29453
+ res.row[key] = rowVal[key];
29454
+ }
29455
+ }
29456
+ }
29457
+ }
29446
29458
  this.applyRowVariablesToValues(res, this.rowIndex);
29447
29459
  return res;
29448
29460
  };
29449
29461
  MatrixDropdownRowModelBase.prototype.getFilteredProperties = function () {
29450
29462
  return { survey: this.getSurvey(), row: this };
29451
29463
  };
29464
+ MatrixDropdownRowModelBase.prototype.getDataRowValue = function () {
29465
+ if (!this.data)
29466
+ return null;
29467
+ return this.data.getRowValue(this.data.getRowIndex(this));
29468
+ };
29452
29469
  MatrixDropdownRowModelBase.prototype.applyRowVariablesToValues = function (res, rowIndex) {
29453
29470
  res[MatrixDropdownRowModelBase.IndexVariableName] = rowIndex;
29454
29471
  res[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
@@ -29462,7 +29479,7 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
29462
29479
  this.applyRowVariablesToValues(values, rowIndex);
29463
29480
  var newProps = helpers_Helpers.createCopy(properties);
29464
29481
  newProps[MatrixDropdownRowModelBase.RowVariableName] = this;
29465
- var rowValues = rowIndex > 0 ? this.data.getRowValue(this.rowIndex - 1) : this.value;
29482
+ var rowValues = rowIndex > 0 ? this.getDataRowValue() : this.value;
29466
29483
  if (!!rowsVisibleIf) {
29467
29484
  values[MatrixDropdownRowModelBase.RowVariableName] = rowValues;
29468
29485
  this.setRowsVisibleIfValues(values);
@@ -37579,6 +37596,14 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
37579
37596
  }
37580
37597
  return null;
37581
37598
  };
37599
+ PanelModelBase.prototype.getFirstVisibleElement = function () {
37600
+ var els = this.elements;
37601
+ for (var i = 0; i < els.length; i++) {
37602
+ if (els[i].isVisible)
37603
+ return els[i];
37604
+ }
37605
+ return null;
37606
+ };
37582
37607
  /**
37583
37608
  * Focuses the first question in this panel/page.
37584
37609
  * @see focusFirstErrorQuestion
@@ -39818,7 +39843,7 @@ var page_PageModel = /** @class */ (function (_super) {
39818
39843
  */
39819
39844
  PageModel.prototype.scrollToTop = function () {
39820
39845
  if (!!this.survey) {
39821
- this.survey.scrollElementToTop(this, null, this, this.id);
39846
+ this.survey.scrollElementToTop(this, null, this, this.id, true, { block: "start" });
39822
39847
  }
39823
39848
  };
39824
39849
  /**
@@ -42773,7 +42798,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
42773
42798
  get: function () {
42774
42799
  if (this.isDesignMode)
42775
42800
  return this.isPropertyVisible("description");
42776
- return !!this.hasDescription;
42801
+ return !!this.hasDescription && this.showTitle;
42777
42802
  },
42778
42803
  enumerable: false,
42779
42804
  configurable: true
@@ -48038,6 +48063,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
48038
48063
  if (!newValue) {
48039
48064
  this.changeCurrentSingleElementOnVisibilityChanged();
48040
48065
  }
48066
+ var el = this.currentSingleElement;
48067
+ var curPage = this.currentPage;
48068
+ if (!!el && !!curPage && el.page !== curPage) {
48069
+ this.currentSingleElement = curPage.getFirstVisibleElement();
48070
+ }
48041
48071
  this.onPageVisibleChanged.fire(this, {
48042
48072
  page: page,
48043
48073
  visible: newValue,
@@ -55517,7 +55547,7 @@ var InputElementAdapter = /** @class */ (function () {
55517
55547
  if (_value === null || _value === undefined) {
55518
55548
  _value = "";
55519
55549
  }
55520
- this.setInputValue(inputMaskInstance.getMaskedValue(_value));
55550
+ this.setInputValue(inputMaskInstance.saveMaskedValue ? _value : inputMaskInstance.getMaskedValue(_value));
55521
55551
  this.prevUnmaskedValue = _value;
55522
55552
  inputMaskInstance.onPropertyChanged.add(this.inputMaskInstancePropertyChangedHandler);
55523
55553
  this.addInputEventListener();
@@ -55654,7 +55684,16 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
55654
55684
  }
55655
55685
  _this.updateRemainingCharacterCounter(event.target.value);
55656
55686
  };
55687
+ _this.readOnlyBlocker = function (event) {
55688
+ if (_this.isReadOnlyAttr) {
55689
+ event.preventDefault();
55690
+ return true;
55691
+ }
55692
+ };
55657
55693
  _this.onKeyDown = function (event) {
55694
+ if (_this.readOnlyBlocker(event)) {
55695
+ return;
55696
+ }
55658
55697
  _this.onKeyDownPreprocess && _this.onKeyDownPreprocess(event);
55659
55698
  if (_this.isInputTextUpdate) {
55660
55699
  _this._isWaitingForEnter = event.keyCode === 229;
@@ -56664,7 +56703,9 @@ var question_multipletext_MultipleTextItemModel = /** @class */ (function (_supe
56664
56703
  _this.title = title;
56665
56704
  }
56666
56705
  _this.editor.onPropertyChanged.add(function (sender, options) {
56667
- _this.onPropertyChanged.fire(_this, options);
56706
+ if (options.name !== "maskSettings") {
56707
+ _this.onPropertyChanged.fire(_this, options);
56708
+ }
56668
56709
  });
56669
56710
  return _this;
56670
56711
  }
@@ -62308,6 +62349,13 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
62308
62349
  enumerable: false,
62309
62350
  configurable: true
62310
62351
  });
62352
+ Object.defineProperty(QuestionFileModel.prototype, "showDragAreaPlaceholder", {
62353
+ get: function () {
62354
+ return !this.isAnswered;
62355
+ },
62356
+ enumerable: false,
62357
+ configurable: true
62358
+ });
62311
62359
  Object.defineProperty(QuestionFileModel.prototype, "allowShowPreview", {
62312
62360
  get: function () {
62313
62361
  var isShowLoadingIndicator = this.showLoadingIndicator;
@@ -72951,9 +72999,9 @@ Serializer.addClass("currencymask", [
72951
72999
 
72952
73000
  var Version;
72953
73001
  var ReleaseDate;
72954
- Version = "" + "1.12.32";
73002
+ Version = "" + "1.12.33";
72955
73003
  settings.version = Version;
72956
- ReleaseDate = "" + "2025-04-13";
73004
+ ReleaseDate = "" + "2025-04-24";
72957
73005
  function checkLibraryVersion(ver, libraryName) {
72958
73006
  if (Version != ver) {
72959
73007
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -86987,7 +87035,7 @@ var reactquestion_ranking_SurveyQuestionRankingItem = /** @class */ (function (_
86987
87035
  };
86988
87036
  SurveyQuestionRankingItem.prototype.renderElement = function () {
86989
87037
  var itemContent = ReactElementFactory.Instance.createElement(this.question.itemComponent, { item: this.item, cssClasses: this.cssClasses });
86990
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { tabIndex: this.itemTabIndex, className: this.itemClass, onKeyDown: this.handleKeydown, onPointerDown: this.handlePointerDown, onPointerUp: this.handlePointerUp, "data-sv-drop-target-ranking-item": this.index },
87038
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { id: this.question.getItemId(this.item), tabIndex: this.itemTabIndex, className: this.itemClass, onKeyDown: this.handleKeydown, onPointerDown: this.handlePointerDown, onPointerUp: this.handlePointerUp, "data-sv-drop-target-ranking-item": this.index },
86991
87039
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { tabIndex: -1, style: { outline: "none" } },
86992
87040
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: this.cssClasses.itemGhostNode }),
86993
87041
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: this.cssClasses.itemContent },
@@ -88251,7 +88299,7 @@ var reactquestion_file_SurveyQuestionFile = /** @class */ (function (_super) {
88251
88299
  var actionsContainer = this.question.actionsContainerVisible ? external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](action_bar_SurveyActionBar, { model: this.question.actionsContainer }) : null;
88252
88300
  var noFileChosen = this.question.isEmpty() ? (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", { className: this.question.cssClasses.noFileChosen }, this.question.noFileChosenCaption)) : null;
88253
88301
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: this.question.getFileDecoratorCss() },
88254
- external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", { className: this.question.cssClasses.dragAreaPlaceholder }, this.renderLocString(this.question.locRenderedPlaceholder)),
88302
+ this.question.showDragAreaPlaceholder ? external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", { className: this.question.cssClasses.dragAreaPlaceholder }, this.renderLocString(this.question.locRenderedPlaceholder)) : false,
88255
88303
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: this.question.cssClasses.wrapper },
88256
88304
  chooseButton,
88257
88305
  actionsContainer,
@@ -88872,7 +88920,7 @@ var reactquestion_text_SurveyQuestionText = /** @class */ (function (_super) {
88872
88920
  // disabled={this.isDisplayMode}
88873
88921
  disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: inputClass, type: this.question.inputType,
88874
88922
  //ref={this.controlRef}
88875
- ref: function (input) { return (_this.setControl(input)); }, style: this.question.inputStyle, maxLength: this.question.getMaxLength(), min: this.question.renderedMin, max: this.question.renderedMax, step: this.question.renderedStep, size: this.question.inputSize, placeholder: placeholder, list: this.question.dataListId, autoComplete: this.question.autocomplete, onBlur: function (event) { _this.question.onBlur(event); }, onFocus: function (event) { _this.question.onFocus(event); }, onChange: this.question.onChange, onKeyUp: this.question.onKeyUp, onKeyDown: this.question.onKeyDown, onCompositionUpdate: function (event) { return _this.question.onCompositionUpdate(event.nativeEvent); }, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }),
88923
+ ref: function (input) { return (_this.setControl(input)); }, style: this.question.inputStyle, maxLength: this.question.getMaxLength(), min: this.question.renderedMin, max: this.question.renderedMax, step: this.question.renderedStep, size: this.question.inputSize, placeholder: placeholder, list: this.question.dataListId, autoComplete: this.question.autocomplete, onBlur: function (event) { _this.question.onBlur(event); }, onFocus: function (event) { _this.question.onFocus(event); }, onChange: this.question.onChange, onClick: this.question.readOnlyBlocker, onPointerDown: this.question.readOnlyBlocker, onKeyUp: this.question.onKeyUp, onKeyDown: this.question.onKeyDown, onCompositionUpdate: function (event) { return _this.question.onCompositionUpdate(event.nativeEvent); }, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }),
88876
88924
  counter));
88877
88925
  };
88878
88926
  SurveyQuestionText.prototype.renderElement = function () {