survey-react 1.12.20 → 1.12.21

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.20
2
+ * surveyjs - Survey JavaScript library v1.12.21
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.20
2
+ * surveyjs - Survey JavaScript library v1.12.21
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.20
2
+ * surveyjs - Survey JavaScript library v1.12.21
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.20
2
+ * surveyjs - Survey JavaScript library v1.12.21
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.20",
3
+ "version": "1.12.21",
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.20
2
+ * surveyjs - Survey JavaScript library v1.12.21
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.20
2
+ * surveyjs - Survey JavaScript library v1.12.21
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
@@ -8317,7 +8317,7 @@ declare module "packages/survey-core/src/survey-events-api" {
8317
8317
  */
8318
8318
  text: string;
8319
8319
  }
8320
- export interface DynamicPanelItemValueChangedEvent extends PanelDynamicQuestionEventMixin {
8320
+ export interface DynamicPanelValueChangedEvent extends PanelDynamicQuestionEventMixin {
8321
8321
  /**
8322
8322
  * The panel's data object that includes all item values.
8323
8323
  */
@@ -8341,6 +8341,14 @@ declare module "packages/survey-core/src/survey-events-api" {
8341
8341
  */
8342
8342
  panel: PanelModel;
8343
8343
  }
8344
+ export interface DynamicPanelValueChangingEvent extends DynamicPanelValueChangedEvent {
8345
+ /**
8346
+ * The item's old value.
8347
+ */
8348
+ oldValue: any;
8349
+ }
8350
+ export interface DynamicPanelItemValueChangedEvent extends DynamicPanelValueChangedEvent {
8351
+ }
8344
8352
  export interface DynamicPanelCurrentIndexChangedEvent extends PanelDynamicQuestionEventMixin {
8345
8353
  /**
8346
8354
  * A panel for which the event is raised.
@@ -9905,7 +9913,7 @@ declare module "packages/survey-core/src/survey" {
9905
9913
  *
9906
9914
  * For information on event handler parameters, refer to descriptions within the interface.
9907
9915
  *
9908
- * To handle value changes in matrix cells or panels within a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model), use the [`onMatrixCellValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixCellValueChanged) or [`onDynamicPanelItemValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelItemValueChanged) event.
9916
+ * To handle value changes in matrix cells or panels within a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model), use the [`onMatrixCellValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixCellValueChanged) or [`onDynamicPanelValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelValueChanged) event.
9909
9917
  * @see setValue
9910
9918
  */
9911
9919
  onValueChanged: EventBase<SurveyModel, ValueChangedEvent>;
@@ -10435,7 +10443,12 @@ declare module "packages/survey-core/src/survey" {
10435
10443
  /**
10436
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.
10437
10445
  */
10446
+ onDynamicPanelValueChanged: EventBase<SurveyModel, DynamicPanelItemValueChangedEvent>;
10438
10447
  onDynamicPanelItemValueChanged: EventBase<SurveyModel, DynamicPanelItemValueChangedEvent>;
10448
+ /**
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.
10450
+ */
10451
+ onDynamicPanelValueChanging: EventBase<SurveyModel, DynamicPanelItemValueChangedEvent>;
10439
10452
  /**
10440
10453
  * 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.
10441
10454
  *
@@ -12085,6 +12098,7 @@ declare module "packages/survey-core/src/survey" {
12085
12098
  private hasQuestionVisibleIndeces;
12086
12099
  dynamicPanelRemoving(question: QuestionPanelDynamicModel, panelIndex: number, panel: PanelModel): boolean;
12087
12100
  dynamicPanelItemValueChanged(question: IQuestion, options: any): void;
12101
+ dynamicPanelItemValueChanging(question: IQuestion, options: any): void;
12088
12102
  dynamicPanelGetTabTitle(question: IQuestion, options: any): void;
12089
12103
  dynamicPanelCurrentIndexChanged(question: IQuestion, options: any): void;
12090
12104
  dragAndDropAllow(options: DragDropAllowEvent): boolean;
@@ -15216,7 +15230,8 @@ declare module "packages/survey-core/src/base-interfaces" {
15216
15230
  dynamicPanelAdded(question: IQuestion, panelIndex?: number, panel?: IPanel): void;
15217
15231
  dynamicPanelRemoved(question: IQuestion, panelIndex: number, panel: IPanel): void;
15218
15232
  dynamicPanelRemoving(question: IQuestion, panelIndex: number, panel: IPanel): boolean;
15219
- dynamicPanelItemValueChanged(question: IQuestion, options: any): any;
15233
+ dynamicPanelItemValueChanged(question: IQuestion, options: any): void;
15234
+ dynamicPanelItemValueChanging(question: IQuestion, options: any): void;
15220
15235
  dynamicPanelGetTabTitle(question: IQuestion, options: any): any;
15221
15236
  dynamicPanelCurrentIndexChanged(question: IQuestion, options: any): void;
15222
15237
  dragAndDropAllow(options: DragDropAllowEvent): boolean;
package/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.20
2
+ * surveyjs - Survey JavaScript library v1.12.21
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
  */
@@ -40356,7 +40356,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
40356
40356
  *
40357
40357
  * For information on event handler parameters, refer to descriptions within the interface.
40358
40358
  *
40359
- * To handle value changes in matrix cells or panels within a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model), use the [`onMatrixCellValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixCellValueChanged) or [`onDynamicPanelItemValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelItemValueChanged) event.
40359
+ * To handle value changes in matrix cells or panels within a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model), use the [`onMatrixCellValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixCellValueChanged) or [`onDynamicPanelValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelValueChanged) event.
40360
40360
  * @see setValue
40361
40361
  */
40362
40362
  _this.onValueChanged = _this.addEvent();
@@ -40886,7 +40886,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
40886
40886
  /**
40887
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.
40888
40888
  */
40889
- _this.onDynamicPanelItemValueChanged = _this.addEvent();
40889
+ _this.onDynamicPanelValueChanged = _this.addEvent();
40890
+ _this.onDynamicPanelItemValueChanged = _this.onDynamicPanelValueChanged;
40891
+ /**
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.
40893
+ */
40894
+ _this.onDynamicPanelValueChanging = _this.addEvent();
40890
40895
  /**
40891
40896
  * 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.
40892
40897
  *
@@ -45972,7 +45977,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45972
45977
  return;
45973
45978
  var id = question.inputId;
45974
45979
  var root = settings.environment.root;
45975
- if (!!id && htmlElement.id !== id && typeof root !== "undefined") {
45980
+ if (!!id && (!htmlElement || htmlElement.id !== id) && typeof root !== "undefined") {
45976
45981
  var el = root.getElementById(id);
45977
45982
  if (!!el) {
45978
45983
  htmlElement = el;
@@ -46173,9 +46178,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46173
46178
  };
46174
46179
  SurveyModel.prototype.dynamicPanelItemValueChanged = function (question, options) {
46175
46180
  options.question = question;
46176
- options.panelIndex = options.itemIndex;
46177
- options.panelData = options.itemValue;
46178
- this.onDynamicPanelItemValueChanged.fire(this, options);
46181
+ this.onDynamicPanelValueChanged.fire(this, options);
46182
+ };
46183
+ SurveyModel.prototype.dynamicPanelItemValueChanging = function (question, options) {
46184
+ options.question = question;
46185
+ this.onDynamicPanelValueChanging.fire(this, options);
46179
46186
  };
46180
46187
  SurveyModel.prototype.dynamicPanelGetTabTitle = function (question, options) {
46181
46188
  options.question = question;
@@ -69217,6 +69224,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
69217
69224
  }
69218
69225
  if (!qValue[index])
69219
69226
  qValue[index] = {};
69227
+ var oldVal = qValue[index][name];
69220
69228
  if (!this.isValueEmpty(val)) {
69221
69229
  qValue[index][name] = val;
69222
69230
  }
@@ -69226,17 +69234,20 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
69226
69234
  if (index >= 0 && index < this.panelsCore.length) {
69227
69235
  this.changingValueQuestion = this.panelsCore[index].getQuestionByValueName(name);
69228
69236
  }
69237
+ var options = {
69238
+ panel: item.panel,
69239
+ name: name,
69240
+ panelIndex: index,
69241
+ panelData: qValue[index],
69242
+ value: val,
69243
+ oldValue: oldVal
69244
+ };
69245
+ if (this.survey) {
69246
+ this.survey.dynamicPanelItemValueChanging(this, options);
69247
+ }
69229
69248
  this.value = qValue;
69230
69249
  this.changingValueQuestion = null;
69231
69250
  if (this.survey) {
69232
- var options = {
69233
- question: this,
69234
- panel: item.panel,
69235
- name: name,
69236
- itemIndex: index,
69237
- itemValue: qValue[index],
69238
- value: val,
69239
- };
69240
69251
  this.survey.dynamicPanelItemValueChanged(this, options);
69241
69252
  }
69242
69253
  this.isSetPanelItemData[name]--;
@@ -72621,9 +72632,9 @@ Serializer.addClass("currencymask", [
72621
72632
 
72622
72633
  var Version;
72623
72634
  var ReleaseDate;
72624
- Version = "" + "1.12.20";
72635
+ Version = "" + "1.12.21";
72625
72636
  settings.version = Version;
72626
- ReleaseDate = "" + "2025-01-21";
72637
+ ReleaseDate = "" + "2025-01-28";
72627
72638
  function checkLibraryVersion(ver, libraryName) {
72628
72639
  if (Version != ver) {
72629
72640
  var str = "survey-core has version '" + Version + "' and " + libraryName