survey-react 1.12.36 → 1.12.38

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.36
2
+ * surveyjs - Survey JavaScript library v1.12.38
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.36
2
+ * surveyjs - Survey JavaScript library v1.12.38
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.36",
3
+ "version": "1.12.38",
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.36
2
+ * surveyjs - Survey JavaScript library v1.12.38
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.36
2
+ * surveyjs - Survey JavaScript library v1.12.38
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
@@ -59,6 +59,7 @@ declare module "packages/survey-core/src/helpers" {
59
59
  static randomizeArray<T>(array: Array<T>): Array<T>;
60
60
  static getUnbindValue(value: any): any;
61
61
  static createCopy(obj: any): any;
62
+ static createCopyWithPrefix(obj: any, prefix?: string): any;
62
63
  static isConvertibleToNumber(value: any): boolean;
63
64
  static isValueObject(val: any, excludeArray?: boolean): boolean;
64
65
  static isNumber(value: any): boolean;
@@ -226,6 +227,7 @@ declare module "packages/survey-core/src/surveyStrings" {
226
227
  }): void;
227
228
  currentLocale: string;
228
229
  defaultLocale: string;
230
+ getCorrectLocaleName(loc: string): string;
229
231
  getLocaleStrings(loc: string): any;
230
232
  getString: (strName: string, locale?: string) => any;
231
233
  getLocaleName(loc: string, inEnglish?: boolean): string;
@@ -421,9 +423,11 @@ declare module "packages/survey-core/src/expressions/expressions" {
421
423
  hasFunction(): boolean;
422
424
  hasAsyncFunction(): boolean;
423
425
  addToAsyncList(list: Array<AsyncFunctionItem>): void;
426
+ addOperandsToList(list: Array<Operand>): void;
424
427
  isEqual(op: Operand): boolean;
425
428
  protected abstract isContentEqual(op: Operand): boolean;
426
429
  protected areOperatorsEquals(op1: Operand, op2: Operand): boolean;
430
+ protected addChildrenToList(list: Array<Operand>): void;
427
431
  }
428
432
  export class BinaryOperand extends Operand {
429
433
  private operatorName;
@@ -447,6 +451,7 @@ declare module "packages/survey-core/src/expressions/expressions" {
447
451
  toString(func?: (op: Operand) => string): string;
448
452
  setVariables(variables: Array<string>): void;
449
453
  hasFunction(): boolean;
454
+ protected addChildrenToList(list: Array<Operand>): void;
450
455
  hasAsyncFunction(): boolean;
451
456
  addToAsyncList(list: Array<AsyncFunctionItem>): void;
452
457
  }
@@ -461,6 +466,7 @@ declare module "packages/survey-core/src/expressions/expressions" {
461
466
  toString(func?: (op: Operand) => string): string;
462
467
  protected isContentEqual(op: Operand): boolean;
463
468
  hasFunction(): boolean;
469
+ protected addChildrenToList(list: Array<Operand>): void;
464
470
  hasAsyncFunction(): boolean;
465
471
  addToAsyncList(list: Array<AsyncFunctionItem>): void;
466
472
  evaluate(processValue?: ProcessValue): boolean;
@@ -474,6 +480,7 @@ declare module "packages/survey-core/src/expressions/expressions" {
474
480
  evaluate(processValue?: ProcessValue): Array<any>;
475
481
  setVariables(variables: Array<string>): void;
476
482
  hasFunction(): boolean;
483
+ protected addChildrenToList(list: Array<Operand>): void;
477
484
  hasAsyncFunction(): boolean;
478
485
  addToAsyncList(list: Array<AsyncFunctionItem>): void;
479
486
  protected isContentEqual(op: Operand): boolean;
@@ -519,6 +526,7 @@ declare module "packages/survey-core/src/expressions/expressions" {
519
526
  isReady(proccessValue: ProcessValue): boolean;
520
527
  private getAsynValue;
521
528
  hasFunction(): boolean;
529
+ protected addChildrenToList(list: Array<Operand>): void;
522
530
  hasAsyncFunction(): boolean;
523
531
  private isAsyncFunction;
524
532
  addToAsyncList(list: Array<AsyncFunctionItem>): void;
@@ -3226,6 +3234,8 @@ declare module "packages/survey-core/src/question_custom" {
3226
3234
  protected getQuestionByName(name: string): IQuestion;
3227
3235
  protected getDefaultTitle(): string;
3228
3236
  setValue(name: string, newValue: any, locNotification: any, allowNotifyValueChanged?: boolean): any;
3237
+ updateCommentFromSurvey(newValue: any): any;
3238
+ get requireUpdateCommentValue(): boolean;
3229
3239
  protected onSetData(): void;
3230
3240
  hasErrors(fireCallback?: boolean, rec?: any): boolean;
3231
3241
  focus(onError?: boolean): void;
@@ -3248,6 +3258,7 @@ declare module "packages/survey-core/src/question_custom" {
3248
3258
  private createDynamicProperties;
3249
3259
  protected initElement(el: SurveyElement): void;
3250
3260
  updateElementCss(reNew?: boolean): void;
3261
+ setIsMobile(val: boolean): void;
3251
3262
  protected updateElementCssCore(cssClasses: any): void;
3252
3263
  protected getDisplayValueCore(keyAsText: boolean, value: any): any;
3253
3264
  }
@@ -3305,6 +3316,7 @@ declare module "packages/survey-core/src/question_custom" {
3305
3316
  protected getDisplayValueCore(keyAsText: boolean, value: any): any;
3306
3317
  private setAfterRenderCallbacks;
3307
3318
  get ariaRole(): string;
3319
+ setIsMobile(val: boolean): void;
3308
3320
  }
3309
3321
  }
3310
3322
  declare module "packages/survey-core/src/questionfactory" {
@@ -7225,6 +7237,7 @@ declare module "packages/survey-core/src/question_paneldynamic" {
7225
7237
  private hasPanelBuildFirstTime;
7226
7238
  private isBuildingPanelsFirstTime;
7227
7239
  private buildPanelsFirstTime;
7240
+ private runTriggersOnBuildPanelsFirstTime;
7228
7241
  private get showAddPanelButton();
7229
7242
  private get wasNotRenderedInSurvey();
7230
7243
  private get canBuildPanels();
@@ -7234,6 +7247,7 @@ declare module "packages/survey-core/src/question_paneldynamic" {
7234
7247
  runTriggers(name: string, value: any, keys?: any): void;
7235
7248
  private reRunCondition;
7236
7249
  protected runPanelsCondition(panels: PanelModel[], values: HashTable<any>, properties: HashTable<any>): void;
7250
+ private isValueChangedWithoutPanels;
7237
7251
  onAnyValueChanged(name: string, questionName: string): void;
7238
7252
  private hasKeysDuplicated;
7239
7253
  private updatePanelsContainsErrors;
@@ -11899,6 +11913,8 @@ declare module "packages/survey-core/src/survey" {
11899
11913
  * @see nextPage
11900
11914
  */
11901
11915
  prevPage(): boolean;
11916
+ private doSkipOnPrevPage;
11917
+ private prevPageSingleElement;
11902
11918
  /**
11903
11919
  * Completes the survey if it currently displays the last page and the page contains no validation errors. If both these conditions are met, this method returns `true`; otherwise, `false`.
11904
11920
  *
@@ -14690,7 +14706,7 @@ declare module "packages/survey-core/src/question_matrixdropdownbase" {
14690
14706
  private setValueCore;
14691
14707
  private updateQuestionsValue;
14692
14708
  private updateSharedQuestionsValue;
14693
- runTriggers(name: string, value: any): void;
14709
+ runTriggers(name: string, value: any, keys?: any): void;
14694
14710
  private hasQuestonError;
14695
14711
  get isEmpty(): boolean;
14696
14712
  getQuestionByColumn(column: MatrixDropdownColumn): Question;
@@ -15009,6 +15025,7 @@ declare module "packages/survey-core/src/question_matrixdropdownbase" {
15009
15025
  private isGenereatingRows;
15010
15026
  protected getVisibleRows(): Array<MatrixDropdownRowModelBase>;
15011
15027
  private generateVisibleRowsIfNeeded;
15028
+ private runTriggersOnNewRows;
15012
15029
  private getVisibleFromGenerated;
15013
15030
  private updateValueOnRowsGeneration;
15014
15031
  get totalValue(): any;
@@ -15078,6 +15095,7 @@ declare module "packages/survey-core/src/question_matrixdropdownbase" {
15078
15095
  protected createQuestionCore(row: MatrixDropdownRowModelBase, column: MatrixDropdownColumn): Question;
15079
15096
  protected deleteRowValue(newValue: any, row: MatrixDropdownRowModelBase): any;
15080
15097
  private isDoingonAnyValueChanged;
15098
+ private isValueChangedWithoutRows;
15081
15099
  onAnyValueChanged(name: string, questionName: string): void;
15082
15100
  protected isObject(value: any): boolean;
15083
15101
  private getOnCellValueChangedOptions;
package/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.36
2
+ * surveyjs - Survey JavaScript library v1.12.38
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
  */
@@ -2419,11 +2419,15 @@ var helpers_Helpers = /** @class */ (function () {
2419
2419
  return value;
2420
2420
  };
2421
2421
  Helpers.createCopy = function (obj) {
2422
+ return this.createCopyWithPrefix(obj, undefined);
2423
+ };
2424
+ Helpers.createCopyWithPrefix = function (obj, prefix) {
2422
2425
  var res = {};
2423
2426
  if (!obj)
2424
2427
  return res;
2425
2428
  for (var key in obj) {
2426
- res[key] = obj[key];
2429
+ var newKey = prefix ? prefix + key : key;
2430
+ res[newKey] = obj[key];
2427
2431
  }
2428
2432
  return res;
2429
2433
  };
@@ -2886,17 +2890,20 @@ var surveyLocalization = {
2886
2890
  return this.currentLocaleValue === this.defaultLocaleValue ? "" : this.currentLocaleValue;
2887
2891
  },
2888
2892
  set currentLocale(val) {
2889
- if (val === "cz")
2890
- val = "cs";
2891
- this.currentLocaleValue = val;
2893
+ this.currentLocaleValue = this.getCorrectLocaleName(val);
2892
2894
  },
2893
2895
  get defaultLocale() {
2894
2896
  return this.defaultLocaleValue;
2895
2897
  },
2896
2898
  set defaultLocale(val) {
2897
- if (val === "cz")
2898
- val = "cs";
2899
- this.defaultLocaleValue = val;
2899
+ this.defaultLocaleValue = this.getCorrectLocaleName(val);
2900
+ },
2901
+ getCorrectLocaleName: function (loc) {
2902
+ if (loc === "cz")
2903
+ loc = "cs";
2904
+ if (loc === "ua")
2905
+ loc = "uk";
2906
+ return loc;
2900
2907
  },
2901
2908
  getLocaleStrings: function (loc) {
2902
2909
  return this.locales[loc];
@@ -3258,6 +3265,9 @@ var jsonobject_JsonObjectProperty = /** @class */ (function () {
3258
3265
  },
3259
3266
  set: function (newValue) {
3260
3267
  this.defaultValueValue = newValue;
3268
+ if (newValue !== undefined) {
3269
+ this.defaultValueFunc = undefined;
3270
+ }
3261
3271
  },
3262
3272
  enumerable: false,
3263
3273
  configurable: true
@@ -5851,12 +5861,17 @@ var Operand = /** @class */ (function () {
5851
5861
  };
5852
5862
  Operand.prototype.hasAsyncFunction = function () { return false; };
5853
5863
  Operand.prototype.addToAsyncList = function (list) { };
5864
+ Operand.prototype.addOperandsToList = function (list) {
5865
+ list.push(this);
5866
+ this.addChildrenToList(list);
5867
+ };
5854
5868
  Operand.prototype.isEqual = function (op) {
5855
5869
  return !!op && op.getType() === this.getType() && this.isContentEqual(op);
5856
5870
  };
5857
5871
  Operand.prototype.areOperatorsEquals = function (op1, op2) {
5858
5872
  return !op1 && !op2 || !!op1 && op1.isEqual(op2);
5859
5873
  };
5874
+ Operand.prototype.addChildrenToList = function (list) { };
5860
5875
  Operand.counter = 1;
5861
5876
  return Operand;
5862
5877
  }());
@@ -5976,6 +5991,12 @@ var BinaryOperand = /** @class */ (function (_super) {
5976
5991
  return ((!!this.left && this.left.hasFunction()) ||
5977
5992
  (!!this.right && this.right.hasFunction()));
5978
5993
  };
5994
+ BinaryOperand.prototype.addChildrenToList = function (list) {
5995
+ if (!!this.left)
5996
+ this.left.addOperandsToList(list);
5997
+ if (!!this.right)
5998
+ this.right.addOperandsToList(list);
5999
+ };
5979
6000
  BinaryOperand.prototype.hasAsyncFunction = function () {
5980
6001
  return ((!!this.left && this.left.hasAsyncFunction()) ||
5981
6002
  (!!this.right && this.right.hasAsyncFunction()));
@@ -6036,6 +6057,9 @@ var UnaryOperand = /** @class */ (function (_super) {
6036
6057
  UnaryOperand.prototype.hasFunction = function () {
6037
6058
  return this.expression.hasFunction();
6038
6059
  };
6060
+ UnaryOperand.prototype.addChildrenToList = function (list) {
6061
+ this.expression.addOperandsToList(list);
6062
+ };
6039
6063
  UnaryOperand.prototype.hasAsyncFunction = function () {
6040
6064
  return this.expression.hasAsyncFunction();
6041
6065
  };
@@ -6090,6 +6114,11 @@ var ArrayOperand = /** @class */ (function (_super) {
6090
6114
  ArrayOperand.prototype.hasFunction = function () {
6091
6115
  return this.values.some(function (operand) { return operand.hasFunction(); });
6092
6116
  };
6117
+ ArrayOperand.prototype.addChildrenToList = function (list) {
6118
+ this.values.forEach(function (el) {
6119
+ el.addOperandsToList(list);
6120
+ });
6121
+ };
6093
6122
  ArrayOperand.prototype.hasAsyncFunction = function () {
6094
6123
  return this.values.some(function (operand) { return operand.hasAsyncFunction(); });
6095
6124
  };
@@ -6298,6 +6327,9 @@ var expressions_FunctionOperand = /** @class */ (function (_super) {
6298
6327
  return proccessValue.asyncValues[this.id];
6299
6328
  };
6300
6329
  FunctionOperand.prototype.hasFunction = function () { return true; };
6330
+ FunctionOperand.prototype.addChildrenToList = function (list) {
6331
+ this.parameters.addOperandsToList(list);
6332
+ };
6301
6333
  FunctionOperand.prototype.hasAsyncFunction = function () {
6302
6334
  return this.isAsyncFunction() || this.parameters.hasAsyncFunction();
6303
6335
  };
@@ -25346,6 +25378,18 @@ var question_custom_QuestionCustomModel = /** @class */ (function (_super) {
25346
25378
  return;
25347
25379
  _super.prototype.setValue.call(this, name, newValue, locNotification, allowNotifyValueChanged);
25348
25380
  };
25381
+ QuestionCustomModel.prototype.updateCommentFromSurvey = function (newValue) {
25382
+ _super.prototype.updateCommentFromSurvey.call(this, newValue);
25383
+ var q = this.contentQuestion;
25384
+ if (!!q) {
25385
+ q.updateCommentFromSurvey(newValue);
25386
+ }
25387
+ };
25388
+ Object.defineProperty(QuestionCustomModel.prototype, "requireUpdateCommentValue", {
25389
+ get: function () { var _a; return (_a = this.contentQuestion) === null || _a === void 0 ? void 0 : _a.requireUpdateCommentValue; },
25390
+ enumerable: false,
25391
+ configurable: true
25392
+ });
25349
25393
  QuestionCustomModel.prototype.onSetData = function () {
25350
25394
  _super.prototype.onSetData.call(this);
25351
25395
  if (!!this.survey && !this.isEmpty()) {
@@ -25537,6 +25581,12 @@ var question_custom_QuestionCustomModel = /** @class */ (function (_super) {
25537
25581
  }
25538
25582
  _super.prototype.updateElementCss.call(this, reNew);
25539
25583
  };
25584
+ QuestionCustomModel.prototype.setIsMobile = function (val) {
25585
+ _super.prototype.setIsMobile.call(this, val);
25586
+ if (!!this.contentQuestion) {
25587
+ this.contentQuestion.setIsMobile(val);
25588
+ }
25589
+ };
25540
25590
  QuestionCustomModel.prototype.updateElementCssCore = function (cssClasses) {
25541
25591
  if (!!this.contentQuestion) {
25542
25592
  cssClasses = this.contentQuestion.cssClasses;
@@ -25949,6 +25999,14 @@ var question_custom_QuestionCompositeModel = /** @class */ (function (_super) {
25949
25999
  enumerable: false,
25950
26000
  configurable: true
25951
26001
  });
26002
+ QuestionCompositeModel.prototype.setIsMobile = function (val) {
26003
+ _super.prototype.setIsMobile.call(this, val);
26004
+ if (!!this.contentPanel) {
26005
+ this.contentPanel.questions.forEach(function (q) {
26006
+ q.setIsMobile(val);
26007
+ });
26008
+ }
26009
+ };
25952
26010
  QuestionCompositeModel.ItemVariableName = "composite";
25953
26011
  return QuestionCompositeModel;
25954
26012
  }(question_custom_QuestionCustomModelBase));
@@ -26959,9 +27017,10 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
26959
27017
  * @see readOnly
26960
27018
  */
26961
27019
  get: function () {
26962
- return this.templateQuestion.isRequired;
27020
+ return this.getPropertyValue("isRequired");
26963
27021
  },
26964
27022
  set: function (val) {
27023
+ this.setPropertyValue("isRequired", val);
26965
27024
  this.templateQuestion.isRequired = val;
26966
27025
  },
26967
27026
  enumerable: false,
@@ -27679,7 +27738,14 @@ Serializer.addClass("matrixdropdowncolumn", [
27679
27738
  },
27680
27739
  },
27681
27740
  { name: "colCount", default: -1, choices: [-1, 0, 1, 2, 3, 4] },
27682
- "isRequired:boolean",
27741
+ { name: "isRequired:boolean", defaultFunc: function (obj) {
27742
+ var _a;
27743
+ var q = (_a = obj) === null || _a === void 0 ? void 0 : _a.templateQuestion;
27744
+ if (!!q) {
27745
+ return Serializer.findProperty(q.getType(), "isRequired").getDefaultValue(q) || false;
27746
+ }
27747
+ return false;
27748
+ } },
27683
27749
  "isUnique:boolean",
27684
27750
  {
27685
27751
  name: "requiredErrorText:text",
@@ -29632,10 +29698,10 @@ var question_matrixdropdownbase_MatrixDropdownRowModelBase = /** @class */ (func
29632
29698
  }
29633
29699
  }
29634
29700
  };
29635
- MatrixDropdownRowModelBase.prototype.runTriggers = function (name, value) {
29636
- if (!name)
29701
+ MatrixDropdownRowModelBase.prototype.runTriggers = function (name, value, keys) {
29702
+ if (!name && !keys)
29637
29703
  return;
29638
- this.questions.forEach(function (q) { return q.runTriggers(name, value); });
29704
+ this.questions.forEach(function (q) { return q.runTriggers(name, value, keys); });
29639
29705
  };
29640
29706
  MatrixDropdownRowModelBase.prototype.hasQuestonError = function (question) {
29641
29707
  if (!question)
@@ -29980,7 +30046,6 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29980
30046
  var _this = _super.call(this, name) || this;
29981
30047
  _this.isRowChanging = false;
29982
30048
  _this.lockResetRenderedTable = false;
29983
- _this.isDoingonAnyValueChanged = false;
29984
30049
  _this.createItemValues("choices");
29985
30050
  _this.createLocalizableString("placeholder", _this, false, true);
29986
30051
  _this.createLocalizableString("keyDuplicationError", _this, false, true);
@@ -30938,6 +31003,10 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
30938
31003
  this.generatedVisibleRows.forEach(function (row) { return _this.onMatrixRowCreated(row); });
30939
31004
  if (this.data) {
30940
31005
  this.runCellsCondition(this.data.getFilteredValues(), this.data.getFilteredProperties());
31006
+ if (this.isValueChangedWithoutRows) {
31007
+ this.isValueChangedWithoutRows = false;
31008
+ this.runTriggersOnNewRows();
31009
+ }
30941
31010
  }
30942
31011
  if (!!this.generatedVisibleRows) {
30943
31012
  this.updateValueOnRowsGeneration(this.generatedVisibleRows);
@@ -30945,6 +31014,17 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
30945
31014
  }
30946
31015
  }
30947
31016
  };
31017
+ QuestionMatrixDropdownModelBase.prototype.runTriggersOnNewRows = function () {
31018
+ var _this = this;
31019
+ var val = this.value;
31020
+ this.generatedVisibleRows.forEach(function (row) {
31021
+ var rowValue = _this.getRowValueCore(row, val);
31022
+ if (!helpers_Helpers.isValueEmpty(rowValue)) {
31023
+ var triggeredValue = helpers_Helpers.createCopyWithPrefix(rowValue, question_matrixdropdownbase_MatrixDropdownRowModelBase.RowVariableName + ".");
31024
+ row.runTriggers("", undefined, triggeredValue);
31025
+ }
31026
+ });
31027
+ };
30948
31028
  QuestionMatrixDropdownModelBase.prototype.getVisibleFromGenerated = function (rows) {
30949
31029
  var res = [];
30950
31030
  if (!rows)
@@ -31547,10 +31627,14 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
31547
31627
  : newValue;
31548
31628
  };
31549
31629
  QuestionMatrixDropdownModelBase.prototype.onAnyValueChanged = function (name, questionName) {
31550
- if (this.isUpdateLocked ||
31551
- this.isDoingonAnyValueChanged ||
31552
- !this.generatedVisibleRows)
31630
+ if (this.isUpdateLocked || this.isDoingonAnyValueChanged)
31553
31631
  return;
31632
+ if (!this.generatedVisibleRows) {
31633
+ if (name === this.getValueName()) {
31634
+ this.isValueChangedWithoutRows = true;
31635
+ }
31636
+ return;
31637
+ }
31554
31638
  this.isDoingonAnyValueChanged = true;
31555
31639
  var rows = this.generatedVisibleRows;
31556
31640
  for (var i = 0; i < rows.length; i++) {
@@ -44170,8 +44254,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44170
44254
  return;
44171
44255
  if (newPage == this.currentPage)
44172
44256
  return;
44257
+ var curEl = this.currentSingleElement;
44258
+ if (!this.isShowingPreview && !!curEl && newPage !== curEl.page) {
44259
+ this.currentSingleElement = newPage.getFirstVisibleElement();
44260
+ return;
44261
+ }
44173
44262
  var oldValue = this.currentPage;
44174
- if (!this.isShowingPreview && !this.currentSingleElement && !this.currentPageChanging(newPage, oldValue))
44263
+ if (!this.isShowingPreview && !curEl && !this.currentPageChanging(newPage, oldValue))
44175
44264
  return;
44176
44265
  this.setPropertyValue("currentPage", newPage);
44177
44266
  if (!!newPage) {
@@ -44525,6 +44614,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44525
44614
  this.isCompleted = false;
44526
44615
  this.isCompletedBefore = false;
44527
44616
  this.isLoading = false;
44617
+ this.skippedPages = [];
44528
44618
  this.completedByTriggers = undefined;
44529
44619
  if (clearData) {
44530
44620
  this.setDataCore(null, true);
@@ -44861,20 +44951,14 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44861
44951
  keys = q.getValue();
44862
44952
  }
44863
44953
  }
44864
- this.checkTriggers(keys, false, false, true, q.name);
44865
- this.currentSingleElement = questions[index + 1];
44954
+ this.checkTriggers(keys, true, false, true, q.name);
44955
+ if (q === this.currentSingleElement) {
44956
+ this.currentSingleElement = questions[index + 1];
44957
+ }
44866
44958
  return true;
44867
44959
  };
44868
44960
  SurveyModel.prototype.performPrevious = function () {
44869
- var q = this.currentSingleElement;
44870
- if (!q)
44871
- return this.prevPage();
44872
- var questions = this.getSingleElements();
44873
- var index = questions.indexOf(q);
44874
- if (index === 0)
44875
- return false;
44876
- this.currentSingleElement = questions[index - 1];
44877
- return true;
44961
+ return this.prevPage();
44878
44962
  };
44879
44963
  SurveyModel.prototype.hasErrorsOnNavigate = function (doComplete) {
44880
44964
  var _this = this;
@@ -45170,22 +45254,46 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45170
45254
  * @see nextPage
45171
45255
  */
45172
45256
  SurveyModel.prototype.prevPage = function () {
45173
- var _this = this;
45174
- if (this.currentSingleElement)
45175
- return this.performPrevious();
45176
45257
  if (this.isFirstPage || this.state === "starting")
45177
45258
  return false;
45178
45259
  this.resetNavigationButton();
45179
- var skipped = this.skippedPages.find(function (sp) { return sp.to == _this.currentPage; });
45180
- if (skipped) {
45181
- this.currentPage = skipped.from;
45260
+ var curElement = this.currentSingleElement;
45261
+ if (this.doSkipOnPrevPage(curElement))
45262
+ return true;
45263
+ if (curElement)
45264
+ return this.prevPageSingleElement(curElement);
45265
+ var vPages = this.visiblePages;
45266
+ var index = vPages.indexOf(this.currentPage);
45267
+ this.currentPage = vPages[index - 1];
45268
+ return true;
45269
+ };
45270
+ SurveyModel.prototype.doSkipOnPrevPage = function (curElement) {
45271
+ var toEl = curElement || this.currentPage;
45272
+ var skipped = this.skippedPages.find(function (sp) { return sp.to === toEl; });
45273
+ var elTo = undefined;
45274
+ if (!!skipped) {
45182
45275
  this.skippedPages.splice(this.skippedPages.indexOf(skipped), 1);
45276
+ var el = skipped.from;
45277
+ if (!el.isDisposed && el.isVisible) {
45278
+ elTo = el;
45279
+ }
45183
45280
  }
45184
- else {
45185
- var vPages = this.visiblePages;
45186
- var index = vPages.indexOf(this.currentPage);
45187
- this.currentPage = vPages[index - 1];
45281
+ if (!!elTo) {
45282
+ if (!!curElement) {
45283
+ this.currentSingleElement = elTo;
45284
+ }
45285
+ else {
45286
+ this.currentPage = elTo;
45287
+ }
45188
45288
  }
45289
+ return !!elTo;
45290
+ };
45291
+ SurveyModel.prototype.prevPageSingleElement = function (curElement) {
45292
+ var questions = this.getSingleElements();
45293
+ var index = questions.indexOf(curElement);
45294
+ if (index <= 0)
45295
+ return false;
45296
+ this.currentSingleElement = questions[index - 1];
45189
45297
  return true;
45190
45298
  };
45191
45299
  /**
@@ -45543,6 +45651,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45543
45651
  SurveyModel.prototype.onQuestionsOnPageModeChanged = function (oldValue) {
45544
45652
  if (this.isShowingPreview || this.isDesignMode)
45545
45653
  return;
45654
+ this.skippedPages = [];
45546
45655
  this.currentSingleElement = undefined;
45547
45656
  if (oldValue === "singlePage") {
45548
45657
  this.updatePagesContainer();
@@ -48944,7 +49053,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
48944
49053
  if (oldQuestion === question)
48945
49054
  return false;
48946
49055
  this.focusingQuestionInfo = { question: question, onError: onError };
48947
- this.skippedPages.push({ from: this.currentPage, to: question.page });
49056
+ var curElement = this.currentSingleElement;
49057
+ this.skippedPages.push({ from: curElement || this.currentPage, to: curElement ? question : question.page });
48948
49058
  var isNeedWaitForPageRendered = this.activePage !== question.page && !question.page.isStartPage;
48949
49059
  if (isNeedWaitForPageRendered) {
48950
49060
  this.currentPage = question.page;
@@ -55724,7 +55834,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
55724
55834
  _this.updateRemainingCharacterCounter(event.target.value);
55725
55835
  };
55726
55836
  _this.readOnlyBlocker = function (event) {
55727
- if (_this.isReadOnlyAttr) {
55837
+ if (_this.isReadOnlyAttr && ["color", "range"].indexOf(_this.inputType) > -1) {
55728
55838
  event.preventDefault();
55729
55839
  return true;
55730
55840
  }
@@ -69193,6 +69303,10 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
69193
69303
  this.setPanelsSurveyImpl();
69194
69304
  this.setPanelsState();
69195
69305
  this.assignOnPropertyChangedToTemplate();
69306
+ if (this.data && this.isValueChangedWithoutPanels) {
69307
+ this.isValueChangedWithoutPanels = false;
69308
+ this.runTriggersOnBuildPanelsFirstTime();
69309
+ }
69196
69310
  if (!!this.survey) {
69197
69311
  for (var i = 0; i < this.panelCount; i++) {
69198
69312
  this.notifyOnPanelAddedRemoved(true, i);
@@ -69206,6 +69320,17 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
69206
69320
  this.isBuildingPanelsFirstTime = false;
69207
69321
  this.releaseAnimations();
69208
69322
  };
69323
+ QuestionPanelDynamicModel.prototype.runTriggersOnBuildPanelsFirstTime = function () {
69324
+ var _this = this;
69325
+ var val = this.value;
69326
+ this.visiblePanelsCore.forEach(function (p) {
69327
+ var panelValue = _this.getPanelItemData(p.data);
69328
+ if (!helpers_Helpers.isValueEmpty(panelValue)) {
69329
+ var triggeredValue_1 = helpers_Helpers.createCopyWithPrefix(panelValue, question_paneldynamic_QuestionPanelDynamicItem.ItemVariableName + ".");
69330
+ p.questions.forEach(function (q) { return q.runTriggers("", undefined, triggeredValue_1); });
69331
+ }
69332
+ });
69333
+ };
69209
69334
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "showAddPanelButton", {
69210
69335
  get: function () { return this.allowAddPanel && !this.isReadOnly; },
69211
69336
  enumerable: false,
@@ -69263,6 +69388,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
69263
69388
  cachedValues[question_paneldynamic_QuestionPanelDynamicItem.ParentItemVariableName] = this.parent.getValue();
69264
69389
  }
69265
69390
  this.isValueChangingInternally = true;
69391
+ var visibleIndex = 0;
69266
69392
  for (var i = 0; i < panels.length; i++) {
69267
69393
  var panel = panels[i];
69268
69394
  var panelValues = this.getPanelItemData(panel.data);
@@ -69271,14 +69397,21 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
69271
69397
  var panelName = question_paneldynamic_QuestionPanelDynamicItem.ItemVariableName;
69272
69398
  newValues[panelName] = panelValues;
69273
69399
  newValues[question_paneldynamic_QuestionPanelDynamicItem.IndexVariableName.toLowerCase()] = i;
69400
+ newValues[question_paneldynamic_QuestionPanelDynamicItem.VisibleIndexVariableName.toLowerCase()] = visibleIndex;
69274
69401
  var newProps = helpers_Helpers.createCopy(properties);
69275
69402
  newProps[panelName] = panel;
69276
69403
  panel.runCondition(newValues, newProps);
69404
+ if (panel.isVisible) {
69405
+ visibleIndex++;
69406
+ }
69277
69407
  }
69278
69408
  this.isValueChangingInternally = false;
69279
69409
  };
69280
69410
  QuestionPanelDynamicModel.prototype.onAnyValueChanged = function (name, questionName) {
69281
69411
  _super.prototype.onAnyValueChanged.call(this, name, questionName);
69412
+ if (!this.hasPanelBuildFirstTime && name === this.getValueName()) {
69413
+ this.isValueChangedWithoutPanels = true;
69414
+ }
69282
69415
  for (var i = 0; i < this.panelsCore.length; i++) {
69283
69416
  this.panelsCore[i].onAnyValueChanged(name, questionName);
69284
69417
  this.panelsCore[i].onAnyValueChanged(question_paneldynamic_QuestionPanelDynamicItem.ItemVariableName, "");
@@ -72592,7 +72725,7 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
72592
72725
  };
72593
72726
  InputMaskDateTime.prototype.getMaxDateForMonth = function (year, month) {
72594
72727
  if (month == 2)
72595
- return year % 4 == 0 && year % 100 != 0 || year % 400 ? 29 : 28;
72728
+ return year % 4 == 0 && year % 100 != 0 || year % 400 == 0 ? 29 : 28;
72596
72729
  return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1];
72597
72730
  };
72598
72731
  InputMaskDateTime.prototype.isDateValid = function (dateTime) {
@@ -73093,9 +73226,9 @@ Serializer.addClass("currencymask", [
73093
73226
 
73094
73227
  var Version;
73095
73228
  var ReleaseDate;
73096
- Version = "" + "1.12.36";
73229
+ Version = "" + "1.12.38";
73097
73230
  settings.version = Version;
73098
- ReleaseDate = "" + "2025-05-13";
73231
+ ReleaseDate = "" + "2025-05-26";
73099
73232
  function checkLibraryVersion(ver, libraryName) {
73100
73233
  if (Version != ver) {
73101
73234
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -82470,7 +82603,7 @@ var ukrainianSurveyStrings = {
82470
82603
  ok: "ГАРАЗД",
82471
82604
  cancel: "Скасувати"
82472
82605
  };
82473
- setupLocale({ localeCode: "ua", strings: ukrainianSurveyStrings, nativeName: "українська", englishName: "Ukrainian" });
82606
+ setupLocale({ localeCode: "uk", strings: ukrainianSurveyStrings, nativeName: "українська", englishName: "Ukrainian" });
82474
82607
  // The following strings have been translated by a machine translation service
82475
82608
  // Remove those strings that you have corrected manually
82476
82609
  // indexText: "{0} of {1}" => "{0} {1}"