survey-react 1.11.12 → 1.11.14

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.11.12
2
+ * surveyjs - Survey JavaScript library v1.11.14
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1941,6 +1941,7 @@ var englishStrings = {
1941
1941
  refuseItemText: "Refuse to answer",
1942
1942
  dontKnowItemText: "Don't know",
1943
1943
  selectAllItemText: "Select All",
1944
+ deselectAllItemText: "Deselect all",
1944
1945
  progressText: "Page {0} of {1}",
1945
1946
  indexText: "{0} of {1}",
1946
1947
  panelDynamicProgressText: "{0} of {1}",
@@ -2039,8 +2040,7 @@ var englishStrings = {
2039
2040
  // Uncomment the lines below if you create a custom dictionary.
2040
2041
  // Replace "en" with a custom locale code (for example, "fr" or "de"),
2041
2042
  // Replace `englishStrings` with the name of the variable that contains the custom dictionary.
2042
- // surveyLocalization.locales["en"] = englishStrings;
2043
- // surveyLocalization.localeNames["en"] = "English";
2043
+ //surveyLocalization.setupLocale("en", englishStrings, "English", "English");
2044
2044
 
2045
2045
  // CONCATENATED MODULE: ./packages/survey-core/src/surveyStrings.ts
2046
2046
 
@@ -2049,8 +2049,21 @@ var surveyLocalization = {
2049
2049
  defaultLocaleValue: "en",
2050
2050
  locales: {},
2051
2051
  localeNames: {},
2052
+ localeNamesInEnglish: {},
2052
2053
  localeDirections: {},
2053
2054
  supportedLocales: [],
2055
+ useEnglishNames: false,
2056
+ //TODO remove on next week
2057
+ get showNamesInEnglish() { return this.useEnglishNames; },
2058
+ set showNamesInEnglish(val) { this.useEnglishNames = val; },
2059
+ setupLocale: function (loc, strings, name, nameInEngish, direction) {
2060
+ this.locales[loc] = strings;
2061
+ this.localeNames[loc] = name;
2062
+ this.localeNamesInEnglish[loc] = nameInEngish;
2063
+ if (direction !== undefined) {
2064
+ this.localeDirections[loc] = direction;
2065
+ }
2066
+ },
2054
2067
  get currentLocale() {
2055
2068
  return this.currentLocaleValue === this.defaultLocaleValue ? "" : this.currentLocaleValue;
2056
2069
  },
@@ -2102,7 +2115,17 @@ var surveyLocalization = {
2102
2115
  }
2103
2116
  return this.onGetExternalString(strName, locale);
2104
2117
  },
2118
+ getLocaleName: function (loc, inEnglish) {
2119
+ if (!loc)
2120
+ return "";
2121
+ if (inEnglish === undefined)
2122
+ inEnglish = this.showNamesInEnglish;
2123
+ var firstNames = inEnglish ? this.localeNamesInEnglish : this.localeNames;
2124
+ var secondNames = inEnglish ? this.localeNames : this.localeNamesInEnglish;
2125
+ return firstNames[loc] || secondNames[loc] || loc;
2126
+ },
2105
2127
  getLocales: function (removeDefaultLoc) {
2128
+ var _this = this;
2106
2129
  if (removeDefaultLoc === void 0) { removeDefaultLoc = false; }
2107
2130
  var res = [];
2108
2131
  res.push("");
@@ -2119,12 +2142,7 @@ var surveyLocalization = {
2119
2142
  res.push(key);
2120
2143
  }
2121
2144
  var locName = function (loc) {
2122
- if (!loc)
2123
- return "";
2124
- var res = surveyLocalization.localeNames[loc];
2125
- if (!res)
2126
- res = loc;
2127
- return res.toLowerCase();
2145
+ return _this.getLocaleName(loc).toLowerCase();
2128
2146
  };
2129
2147
  res.sort(function (a, b) {
2130
2148
  var str1 = locName(a);
@@ -3359,13 +3377,27 @@ var JsonMetadata = /** @class */ (function () {
3359
3377
  invalidNames = [];
3360
3378
  for (var i_1 = 0; i_1 < dynamicProps.length; i_1++) {
3361
3379
  var dProp = dynamicProps[i_1];
3362
- if (!hash[dProp.name] && invalidNames.indexOf(dProp.name) < 0) {
3380
+ if (invalidNames.indexOf(dProp.name) < 0 && this.canAddDybamicProp(dProp, hash[dProp.name])) {
3363
3381
  res.push(dProp);
3364
3382
  }
3365
3383
  }
3366
3384
  this.dynamicPropsCache[cacheType] = res;
3367
3385
  return res;
3368
3386
  };
3387
+ JsonMetadata.prototype.canAddDybamicProp = function (dProp, orgProp) {
3388
+ if (!orgProp)
3389
+ return true;
3390
+ if (dProp === orgProp)
3391
+ return false;
3392
+ var classInfo = dProp.classInfo;
3393
+ while (classInfo && classInfo.parentName) {
3394
+ dProp = this.findProperty(classInfo.parentName, dProp.name);
3395
+ if (dProp && dProp === orgProp)
3396
+ return true;
3397
+ classInfo = !!dProp ? dProp.classInfo : undefined;
3398
+ }
3399
+ return false;
3400
+ };
3369
3401
  JsonMetadata.prototype.hasOriginalProperty = function (obj, propName) {
3370
3402
  return !!this.getOriginalProperty(obj, propName);
3371
3403
  };
@@ -4830,16 +4862,16 @@ function dateFromFirstParameterOrToday(params) {
4830
4862
  }
4831
4863
  return date;
4832
4864
  }
4833
- function year(params) {
4865
+ function functionsfactory_year(params) {
4834
4866
  var date = dateFromFirstParameterOrToday(params);
4835
4867
  return date.getFullYear();
4836
4868
  }
4837
- functionsfactory_FunctionFactory.Instance.register("year", year);
4838
- function month(params) {
4869
+ functionsfactory_FunctionFactory.Instance.register("year", functionsfactory_year);
4870
+ function functionsfactory_month(params) {
4839
4871
  var date = dateFromFirstParameterOrToday(params);
4840
4872
  return date.getMonth() + 1;
4841
4873
  }
4842
- functionsfactory_FunctionFactory.Instance.register("month", month);
4874
+ functionsfactory_FunctionFactory.Instance.register("month", functionsfactory_month);
4843
4875
  function day(params) {
4844
4876
  var date = dateFromFirstParameterOrToday(params);
4845
4877
  return date.getDate();
@@ -4853,6 +4885,13 @@ functionsfactory_FunctionFactory.Instance.register("weekday", weekday);
4853
4885
  function getQuestionValueByContext(context, name) {
4854
4886
  if (!context || !name)
4855
4887
  return undefined;
4888
+ var q = context.question;
4889
+ while (q && q.parent) {
4890
+ var res = q.parent.getQuestionByName(name);
4891
+ if (!!res)
4892
+ return res;
4893
+ q = q.parentQuestion;
4894
+ }
4856
4895
  var keys = ["row", "panel", "survey"];
4857
4896
  for (var i = 0; i < keys.length; i++) {
4858
4897
  var ctx = context[keys[i]];
@@ -4864,15 +4903,31 @@ function getQuestionValueByContext(context, name) {
4864
4903
  }
4865
4904
  return null;
4866
4905
  }
4906
+ function getDisplayValueReturnResult(q, params) {
4907
+ if (params.length > 1 && !helpers_Helpers.isValueEmpty(params[1]))
4908
+ return q.getDisplayValue(true, params[1]);
4909
+ return q.displayValue;
4910
+ }
4867
4911
  function displayValue(params) {
4912
+ var _this = this;
4868
4913
  var q = getQuestionValueByContext(this, params[0]);
4869
4914
  if (!q)
4870
4915
  return "";
4871
- if (params.length > 1 && !helpers_Helpers.isValueEmpty(params[1]))
4872
- return q.getDisplayValue(true, params[1]);
4873
- return q.displayValue;
4916
+ if (q.isReady) {
4917
+ this.returnResult(getDisplayValueReturnResult(q, params));
4918
+ }
4919
+ else {
4920
+ var displayValueOnReadyChanged_1 = function (sender, options) {
4921
+ if (sender.isReady) {
4922
+ sender.onReadyChanged.remove(displayValueOnReadyChanged_1);
4923
+ _this.returnResult(getDisplayValueReturnResult(sender, params));
4924
+ }
4925
+ };
4926
+ q.onReadyChanged.add(displayValueOnReadyChanged_1);
4927
+ }
4928
+ return undefined;
4874
4929
  }
4875
- functionsfactory_FunctionFactory.Instance.register("displayValue", displayValue);
4930
+ functionsfactory_FunctionFactory.Instance.register("displayValue", displayValue, true);
4876
4931
  function propertyValue(params) {
4877
4932
  if (params.length !== 2 || !params[0] || !params[1])
4878
4933
  return undefined;
@@ -5379,11 +5434,27 @@ var expressions_FunctionOperand = /** @class */ (function (_super) {
5379
5434
  return true;
5380
5435
  };
5381
5436
  FunctionOperand.prototype.hasAsyncFunction = function () {
5437
+ return this.isAsyncFunction() || this.parameters.hasAsyncFunction();
5438
+ };
5439
+ FunctionOperand.prototype.isAsyncFunction = function () {
5382
5440
  return functionsfactory_FunctionFactory.Instance.isAsyncFunction(this.originalValue);
5383
5441
  };
5384
5442
  FunctionOperand.prototype.addToAsyncList = function (list) {
5385
- if (this.hasAsyncFunction()) {
5386
- list.push(this);
5443
+ var item = undefined;
5444
+ if (this.isAsyncFunction()) {
5445
+ item = { operand: this };
5446
+ }
5447
+ if (this.parameters.hasAsyncFunction()) {
5448
+ var children = new Array();
5449
+ this.parameters.addToAsyncList(children);
5450
+ children.forEach(function (child) { return child.parent = item; });
5451
+ if (!item) {
5452
+ item = {};
5453
+ }
5454
+ item.children = children;
5455
+ }
5456
+ if (item) {
5457
+ list.push(item);
5387
5458
  }
5388
5459
  };
5389
5460
  FunctionOperand.prototype.isContentEqual = function (op) {
@@ -8742,7 +8813,6 @@ var conditions_ExpressionExecutor = /** @class */ (function () {
8742
8813
  return !!this.operand;
8743
8814
  };
8744
8815
  ExpressionExecutor.prototype.run = function (values, properties) {
8745
- var _this = this;
8746
8816
  if (properties === void 0) { properties = null; }
8747
8817
  if (!this.operand) {
8748
8818
  if (!!this.expression) {
@@ -8754,25 +8824,57 @@ var conditions_ExpressionExecutor = /** @class */ (function () {
8754
8824
  this.processValue.properties = properties;
8755
8825
  if (!this.isAsync)
8756
8826
  return this.runValues();
8757
- this.asyncFuncList = [];
8827
+ this.asyncFuncList = new Array();
8758
8828
  this.operand.addToAsyncList(this.asyncFuncList);
8759
8829
  for (var i = 0; i < this.asyncFuncList.length; i++) {
8760
- this.asyncFuncList[i].onAsyncReady = function () {
8761
- _this.doAsyncFunctionReady();
8762
- };
8763
- }
8764
- for (var i = 0; i < this.asyncFuncList.length; i++) {
8765
- this.asyncFuncList[i].evaluateAsync(this.processValue);
8830
+ this.runAsyncItem(this.asyncFuncList[i]);
8766
8831
  }
8767
8832
  return false;
8768
8833
  };
8769
- ExpressionExecutor.prototype.doAsyncFunctionReady = function () {
8834
+ ExpressionExecutor.prototype.runAsyncItem = function (item) {
8835
+ var _this = this;
8836
+ if (item.children) {
8837
+ item.children.forEach(function (child) { return _this.runAsyncItem(child); });
8838
+ }
8839
+ else {
8840
+ this.runAsyncItemCore(item);
8841
+ }
8842
+ };
8843
+ ExpressionExecutor.prototype.runAsyncItemCore = function (item) {
8844
+ var _this = this;
8845
+ if (item.operand) {
8846
+ item.operand.onAsyncReady = function () { return _this.doAsyncFunctionReady(item); };
8847
+ item.operand.evaluateAsync(this.processValue);
8848
+ }
8849
+ else {
8850
+ this.doAsyncFunctionReady(item);
8851
+ }
8852
+ };
8853
+ ExpressionExecutor.prototype.doAsyncFunctionReady = function (item) {
8854
+ if (item.parent && this.isAsyncChildrenReady(item)) {
8855
+ this.runAsyncItemCore(item.parent);
8856
+ return;
8857
+ }
8770
8858
  for (var i = 0; i < this.asyncFuncList.length; i++) {
8771
- if (!this.asyncFuncList[i].isReady)
8859
+ if (!this.isAsyncFuncReady(this.asyncFuncList[i]))
8772
8860
  return;
8773
8861
  }
8774
8862
  this.runValues();
8775
8863
  };
8864
+ ExpressionExecutor.prototype.isAsyncFuncReady = function (item) {
8865
+ if (item.operand && !item.operand.isReady)
8866
+ return false;
8867
+ return this.isAsyncChildrenReady(item);
8868
+ };
8869
+ ExpressionExecutor.prototype.isAsyncChildrenReady = function (item) {
8870
+ if (item.children) {
8871
+ for (var i = 0; i < item.children.length; i++) {
8872
+ if (!this.isAsyncFuncReady(item.children[i]))
8873
+ return false;
8874
+ }
8875
+ }
8876
+ return true;
8877
+ };
8776
8878
  ExpressionExecutor.prototype.runValues = function () {
8777
8879
  var res = this.operand.evaluate(this.processValue);
8778
8880
  if (!!this.onComplete) {
@@ -11128,6 +11230,9 @@ var list_ListModel = /** @class */ (function (_super) {
11128
11230
  list_decorate([
11129
11231
  jsonobject_property({ defaultValue: false })
11130
11232
  ], ListModel.prototype, "textWrapEnabled", void 0);
11233
+ list_decorate([
11234
+ jsonobject_property({ defaultValue: "sv-list-item-content" })
11235
+ ], ListModel.prototype, "itemComponent", void 0);
11131
11236
  return ListModel;
11132
11237
  }(container_ActionContainer));
11133
11238
 
@@ -11760,7 +11865,7 @@ var action_Action = /** @class */ (function (_super) {
11760
11865
  evt.stopPropagation();
11761
11866
  return true;
11762
11867
  };
11763
- Action.prototype.doMouseDown = function () {
11868
+ Action.prototype.doMouseDown = function (args) {
11764
11869
  this.isMouseDown = true;
11765
11870
  };
11766
11871
  Action.prototype.doFocus = function (args) {
@@ -15694,7 +15799,7 @@ var settings = {
15694
15799
  * Nested properties:
15695
15800
  *
15696
15801
  * - `lifetime`: `number`\
15697
- * Specifies a time period during which a notification is displayed; measured in milliseconds.
15802
+ * Specifies a time period during which a notification is displayed; measured in milliseconds. Default value: 2000.
15698
15803
  */
15699
15804
  notifications: {
15700
15805
  lifetime: 2000
@@ -17261,7 +17366,7 @@ var question_Question = /** @class */ (function (_super) {
17261
17366
  _this.registerFunctionOnPropertiesValueChanged(["no", "readOnly", "hasVisibleErrors", "containsErrors"], function () {
17262
17367
  _this.updateQuestionCss();
17263
17368
  });
17264
- _this.registerPropertyChangedHandlers(["isMobile"], function () { _this.onMobileChanged(); });
17369
+ _this.registerPropertyChangedHandlers(["_isMobile"], function () { _this.onMobileChanged(); });
17265
17370
  _this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
17266
17371
  return _this;
17267
17372
  }
@@ -17278,8 +17383,22 @@ var question_Question = /** @class */ (function (_super) {
17278
17383
  this.setIsMobile(this.survey._isMobile);
17279
17384
  };
17280
17385
  Question.prototype.setIsMobile = function (val) {
17281
- this.isMobile = val && (this.allowMobileInDesignMode() || !this.isDesignMode);
17386
+ var newVal = val && (this.allowMobileInDesignMode() || !this.isDesignMode);
17387
+ this.isMobile = newVal;
17282
17388
  };
17389
+ Question.prototype.getIsMobile = function () {
17390
+ return this._isMobile;
17391
+ };
17392
+ Object.defineProperty(Question.prototype, "isMobile", {
17393
+ get: function () {
17394
+ return this.getIsMobile();
17395
+ },
17396
+ set: function (val) {
17397
+ this._isMobile = val;
17398
+ },
17399
+ enumerable: false,
17400
+ configurable: true
17401
+ });
17283
17402
  Question.prototype.themeChanged = function (theme) { };
17284
17403
  Question.prototype.getDefaultTitle = function () { return this.name; };
17285
17404
  Question.prototype.createLocTitleProperty = function () {
@@ -18475,6 +18594,7 @@ var question_Question = /** @class */ (function (_super) {
18475
18594
  Question.prototype.getRootCss = function () {
18476
18595
  return new CssClassBuilder()
18477
18596
  .append(this.cssRoot)
18597
+ .append(this.cssClasses.mobile, this.isMobile)
18478
18598
  .append(this.cssClasses.readOnly, this.isReadOnlyStyle)
18479
18599
  .append(this.cssClasses.disabled, this.isDisabledStyle)
18480
18600
  .append(this.cssClasses.preview, this.isPreviewStyle)
@@ -19645,7 +19765,8 @@ var question_Question = /** @class */ (function (_super) {
19645
19765
  Object.defineProperty(Question.prototype, "validators", {
19646
19766
  /**
19647
19767
  * Question validators.
19648
- * @see [Data Validation](https://surveyjs.io/form-library/documentation/data-validation)
19768
+ *
19769
+ * [Data Validation](https://surveyjs.io/form-library/documentation/data-validation (linkStyle))
19649
19770
  */
19650
19771
  get: function () {
19651
19772
  return this.getPropertyValue("validators");
@@ -20418,7 +20539,7 @@ var question_Question = /** @class */ (function (_super) {
20418
20539
  Question.questionCounter = 100;
20419
20540
  question_decorate([
20420
20541
  jsonobject_property({ defaultValue: false })
20421
- ], Question.prototype, "isMobile", void 0);
20542
+ ], Question.prototype, "_isMobile", void 0);
20422
20543
  question_decorate([
20423
20544
  jsonobject_property()
20424
20545
  ], Question.prototype, "forceIsInputReadOnly", void 0);
@@ -22630,6 +22751,25 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22630
22751
  enumerable: false,
22631
22752
  configurable: true
22632
22753
  });
22754
+ Object.defineProperty(QuestionMatrixBaseModel.prototype, "displayMode", {
22755
+ get: function () {
22756
+ return this.getPropertyValue("displayMode");
22757
+ },
22758
+ /**
22759
+ * Specifies how to arrange matrix questions.
22760
+ *
22761
+ * Possible values:
22762
+ *
22763
+ * - `"table"` - Displays matrix questions in a table.
22764
+ * - `"list"` - Displays matrix questions one under another as a list.
22765
+ * - `"auto"` (default) - Uses the `"table"` mode if the survey has sufficient width to fit the table or the `"list"` mode otherwise.
22766
+ */
22767
+ set: function (val) {
22768
+ this.setPropertyValue("displayMode", val);
22769
+ },
22770
+ enumerable: false,
22771
+ configurable: true
22772
+ });
22633
22773
  //a11y
22634
22774
  QuestionMatrixBaseModel.prototype.getCellAriaLabel = function (rowTitle, columnTitle) {
22635
22775
  var row = (this.getLocalizationString("matrix_row") || "row").toLocaleLowerCase();
@@ -22643,6 +22783,12 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22643
22783
  enumerable: false,
22644
22784
  configurable: true
22645
22785
  });
22786
+ // EO a11y
22787
+ QuestionMatrixBaseModel.prototype.getIsMobile = function () {
22788
+ if (this.displayMode == "auto")
22789
+ return _super.prototype.getIsMobile.call(this);
22790
+ return this.displayMode === "list";
22791
+ };
22646
22792
  martixBase_decorate([
22647
22793
  jsonobject_property()
22648
22794
  ], QuestionMatrixBaseModel.prototype, "verticalAlign", void 0);
@@ -22663,7 +22809,13 @@ Serializer.addClass("matrixbase", [
22663
22809
  choices: ["top", "middle"],
22664
22810
  default: "middle",
22665
22811
  },
22666
- { name: "alternateRows:boolean", default: false }
22812
+ { name: "alternateRows:boolean", default: false },
22813
+ {
22814
+ name: "displayMode",
22815
+ default: "auto",
22816
+ choices: ["auto", "table", "list"],
22817
+ visible: false
22818
+ },
22667
22819
  ], undefined, "question");
22668
22820
 
22669
22821
  // CONCATENATED MODULE: ./packages/survey-core/src/textPreProcessor.ts
@@ -25966,6 +26118,14 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedCell = /** @cl
25966
26118
  enumerable: false,
25967
26119
  configurable: true
25968
26120
  });
26121
+ Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "isVisible", {
26122
+ get: function () {
26123
+ var _a;
26124
+ return (!this.hasQuestion && !this.isErrorsCell) || !((_a = this.matrix) === null || _a === void 0 ? void 0 : _a.isMobile) || this.question.isVisible;
26125
+ },
26126
+ enumerable: false,
26127
+ configurable: true
26128
+ });
25969
26129
  Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "showResponsiveTitle", {
25970
26130
  get: function () {
25971
26131
  var _a;
@@ -27011,9 +27171,6 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
27011
27171
  QuestionMatrixDropdownRenderedTable.prototype.createTextCell = function (locTitle) {
27012
27172
  var cell = new question_matrixdropdownrendered_QuestionMatrixDropdownRenderedCell();
27013
27173
  cell.locTitle = locTitle;
27014
- if (!!locTitle) {
27015
- locTitle.strChanged();
27016
- }
27017
27174
  if (!!this.cssClasses.cell) {
27018
27175
  cell.className = this.cssClasses.cell;
27019
27176
  }
@@ -27962,12 +28119,10 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
27962
28119
  "rowCount",
27963
28120
  "hasFooter",
27964
28121
  "detailPanelMode",
28122
+ "displayMode"
27965
28123
  ], function () {
27966
28124
  _this.resetRenderedTable();
27967
28125
  });
27968
- _this.registerPropertyChangedHandlers(["isMobile"], function () {
27969
- _this.resetRenderedTable();
27970
- });
27971
28126
  return _this;
27972
28127
  }
27973
28128
  Object.defineProperty(QuestionMatrixDropdownModelBase, "defaultCellType", {
@@ -29731,6 +29886,10 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29731
29886
  enumerable: false,
29732
29887
  configurable: true
29733
29888
  });
29889
+ QuestionMatrixDropdownModelBase.prototype.onMobileChanged = function () {
29890
+ _super.prototype.onMobileChanged.call(this);
29891
+ this.resetRenderedTable();
29892
+ };
29734
29893
  QuestionMatrixDropdownModelBase.prototype.getRootCss = function () {
29735
29894
  return new CssClassBuilder().append(_super.prototype.getRootCss.call(this)).append(this.cssClasses.rootScroll, this.horizontalScroll).toString();
29736
29895
  };
@@ -32142,6 +32301,7 @@ var defaultV2Css = {
32142
32301
  question: {
32143
32302
  contentFadeIn: "sd-element__content--fade-in",
32144
32303
  contentFadeOut: "sd-element__content--fade-out",
32304
+ mobile: "sd-question--mobile",
32145
32305
  fadeIn: "sd-element-wrapper--fade-in",
32146
32306
  fadeOut: "sd-element-wrapper--fade-out",
32147
32307
  mainRoot: "sd-element sd-question sd-row__question",
@@ -38501,14 +38661,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
38501
38661
  _this._isMobile = false;
38502
38662
  _this._isCompact = false;
38503
38663
  _this._isDesignMode = false;
38504
- /**
38505
- * Specifies whether data validation is enabled.
38506
- *
38507
- * Default value: `true`
38508
- * @see checkErrorsMode
38509
- * @see hideRequiredErrors
38510
- */
38511
- _this.validationEnabled = true;
38512
38664
  /**
38513
38665
  * Specifies whether respondents can switch the current page even if it contains validation errors.
38514
38666
  *
@@ -38526,6 +38678,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
38526
38678
  _this.isNavigationButtonPressed = false;
38527
38679
  _this.mouseDownPage = null;
38528
38680
  _this.isCalculatingProgressText = false;
38681
+ /**
38682
+ * An event that is raised when the survey's width or height is changed.
38683
+ */
38684
+ _this.onResize = new EventBase();
38529
38685
  _this.isCurrentPageRendering = true;
38530
38686
  _this.isCurrentPageRendered = undefined;
38531
38687
  _this.isTriggerIsRunning = false;
@@ -43195,7 +43351,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43195
43351
  isProcessed_1 = false;
43196
43352
  }
43197
43353
  else {
43198
- isProcessed_1 = _this.processResponsiveness(observedElement.offsetWidth, mobileWidth_1);
43354
+ isProcessed_1 = _this.processResponsiveness(observedElement.offsetWidth, mobileWidth_1, observedElement.offsetHeight);
43199
43355
  }
43200
43356
  });
43201
43357
  });
@@ -43209,13 +43365,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43209
43365
  this.rootElement = htmlElement;
43210
43366
  this.addScrollEventListener();
43211
43367
  };
43212
- SurveyModel.prototype.processResponsiveness = function (width, mobileWidth) {
43368
+ SurveyModel.prototype.processResponsiveness = function (width, mobileWidth, height) {
43213
43369
  var isMobile = width < mobileWidth;
43214
43370
  var isMobileChanged = this.isMobile !== isMobile;
43215
- if (isMobileChanged) {
43216
- this.setIsMobile(isMobile);
43217
- }
43371
+ this.setIsMobile(isMobile);
43218
43372
  this.layoutElements.forEach(function (layoutElement) { return layoutElement.processResponsiveness && layoutElement.processResponsiveness(width); });
43373
+ var options = {
43374
+ height: height,
43375
+ width: width,
43376
+ };
43377
+ this.onResize.fire(this, options);
43219
43378
  return isMobileChanged;
43220
43379
  };
43221
43380
  SurveyModel.prototype.triggerResponsiveness = function (hard) {
@@ -43624,36 +43783,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43624
43783
  this.uploadFilesCore(name, files, callback);
43625
43784
  }
43626
43785
  };
43627
- /**
43628
- * Downloads a file from a server.
43629
- *
43630
- * The following code shows how to call this method:
43631
- *
43632
- * ```js
43633
- * const question = survey.getQuestionByName("myFileQuestion");
43634
- * survey.downloadFile(
43635
- * question,
43636
- * question.name,
43637
- * // Download the first uploaded file
43638
- * question.value[0],
43639
- * (status, data) => {
43640
- * if (status === "success") {
43641
- * // Use `data` to retrieve the file
43642
- * }
43643
- * if (status === "error") {
43644
- * // Handle error
43645
- * }
43646
- * }
43647
- * );
43648
- * ```
43649
- *
43650
- * @param question A [File Upload question instance](https://surveyjs.io/form-library/documentation/api-reference/file-model).
43651
- * @param questionName The File Upload question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/file-model#name).
43652
- * @param fileValue An object from File Upload's [`value`](https://surveyjs.io/form-library/documentation/api-reference/file-model#value) array. This object contains metadata about the file you want to download.
43653
- * @param callback A callback function that allows you to get the download status (`"success"` or `"error"`) and the file identifier (URL, file name, etc.) that you can use to retrieve the file.
43654
- * @see onDownloadFile
43655
- * @see uploadFiles
43656
- */
43657
43786
  SurveyModel.prototype.downloadFile = function (question, questionName, fileValue, callback) {
43658
43787
  if (this.onDownloadFile.isEmpty) {
43659
43788
  !!callback && callback("skipped", fileValue.content || fileValue);
@@ -45439,6 +45568,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45439
45568
  * A survey width in CSS values.
45440
45569
  *
45441
45570
  * Default value: `undefined` (the survey inherits the width from its container)
45571
+ * @see onResize
45442
45572
  */
45443
45573
  get: function () {
45444
45574
  return this.getPropertyValue("width");
@@ -46228,6 +46358,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46228
46358
  survey_decorate([
46229
46359
  jsonobject_property()
46230
46360
  ], SurveyModel.prototype, "progressBarInheritWidthFrom", void 0);
46361
+ survey_decorate([
46362
+ jsonobject_property({ defaultValue: true })
46363
+ ], SurveyModel.prototype, "validationEnabled", void 0);
46231
46364
  survey_decorate([
46232
46365
  jsonobject_property()
46233
46366
  ], SurveyModel.prototype, "rootCss", void 0);
@@ -47227,6 +47360,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
47227
47360
  QuestionSelectBase.prototype.clearValue = function (keepComment) {
47228
47361
  _super.prototype.clearValue.call(this, keepComment);
47229
47362
  this.prevOtherValue = undefined;
47363
+ this.selectedItemValues = undefined;
47230
47364
  };
47231
47365
  QuestionSelectBase.prototype.updateCommentFromSurvey = function (newValue) {
47232
47366
  _super.prototype.updateCommentFromSurvey.call(this, newValue);
@@ -52900,8 +53034,11 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
52900
53034
  }
52901
53035
  if (this.inputType === "month") {
52902
53036
  var d = new Date(newValue);
52903
- var m = d.getMonth() + 1;
52904
- return d.getFullYear() + "-" + (m < 10 ? "0" : "") + m;
53037
+ var isUtc = d.toISOString().indexOf(newValue) == 0 && newValue.indexOf("T") == -1;
53038
+ var month = isUtc ? d.getUTCMonth() : d.getMonth();
53039
+ var year = isUtc ? d.getUTCFullYear() : d.getFullYear();
53040
+ var m = month + 1;
53041
+ return year + "-" + (m < 10 ? "0" : "") + m;
52905
53042
  }
52906
53043
  return newValue;
52907
53044
  };
@@ -53137,7 +53274,7 @@ Serializer.addClass("text", [
53137
53274
  return isMinMaxType(obj);
53138
53275
  },
53139
53276
  },
53140
- { name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"], visible: false },
53277
+ { name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"] },
53141
53278
  {
53142
53279
  name: "maskType",
53143
53280
  default: "none",
@@ -53628,6 +53765,15 @@ var question_multipletext_MultipleTextItemModel = /** @class */ (function (_supe
53628
53765
  configurable: true
53629
53766
  });
53630
53767
  Object.defineProperty(MultipleTextItemModel.prototype, "inputTextAlignment", {
53768
+ /**
53769
+ * Specifies text alignment within the input field.
53770
+ *
53771
+ * Possible values:
53772
+ *
53773
+ * - `"left"` - Aligns input text to the left side.
53774
+ * - `"right"` - Aligns input text to the right side.
53775
+ * - `"auto"` (default) - Applies right alignment if a [numeric or currency input mask](https://surveyjs.io/form-library/documentation/api-reference/multipletextitemmodel#maskType) is specified. Otherwise, applies left alignment.
53776
+ */
53631
53777
  get: function () {
53632
53778
  return this.editor.inputTextAlignment;
53633
53779
  },
@@ -54373,7 +54519,7 @@ Serializer.addClass("multipletextitem", [
54373
54519
  obj.maskSettings.setData(value);
54374
54520
  },
54375
54521
  },
54376
- { name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"], visible: false },
54522
+ { name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"] },
54377
54523
  { name: "title", serializationProperty: "locTitle" },
54378
54524
  { name: "maxLength:number", default: -1 },
54379
54525
  { name: "size:number", minValue: 0 },
@@ -54792,9 +54938,9 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
54792
54938
  _this.isChangingValueOnClearIncorrect = false;
54793
54939
  _this.selectAllItemValue = new itemvalue_ItemValue("");
54794
54940
  _this.selectAllItemValue.id = "selectall";
54795
- var selectAllItemText = _this.createLocalizableString("selectAllText", _this.selectAllItem, true, "selectAllItemText");
54941
+ _this.selectAllItemText = _this.createLocalizableString("selectAllText", _this.selectAllItem, true, "selectAllItemText");
54796
54942
  _this.selectAllItem.locOwner = _this;
54797
- _this.selectAllItem.setLocText(selectAllItemText);
54943
+ _this.selectAllItem.setLocText(_this.selectAllItemText);
54798
54944
  _this.registerPropertyChangedHandlers(["showSelectAllItem", "selectAllText"], function () {
54799
54945
  _this.onVisibleChoicesChanged();
54800
54946
  });
@@ -54901,28 +55047,7 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
54901
55047
  * @see showSelectAllItem
54902
55048
  */
54903
55049
  get: function () {
54904
- var noneItems = this.getNoneItems();
54905
- for (var i = 0; i < noneItems.length; i++) {
54906
- if (this.isItemSelected(noneItems[i]))
54907
- return false;
54908
- }
54909
- var items = this.getVisibleEnableItems();
54910
- if (items.length === 0)
54911
- return false;
54912
- var val = this.value;
54913
- if (!val || !Array.isArray(val) || val.length === 0)
54914
- return false;
54915
- if (val.length < items.length)
54916
- return false;
54917
- var rVal = [];
54918
- for (var i = 0; i < val.length; i++) {
54919
- rVal.push(this.getRealValue(val[i]));
54920
- }
54921
- for (var i = 0; i < items.length; i++) {
54922
- if (rVal.indexOf(items[i].value) < 0)
54923
- return false;
54924
- }
54925
- return true;
55050
+ return this.allElementsSelected();
54926
55051
  },
54927
55052
  set: function (val) {
54928
55053
  if (val) {
@@ -54938,6 +55063,30 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
54938
55063
  QuestionCheckboxModel.prototype.toggleSelectAll = function () {
54939
55064
  this.isAllSelected = !this.isAllSelected;
54940
55065
  };
55066
+ QuestionCheckboxModel.prototype.allElementsSelected = function () {
55067
+ var noneItems = this.getNoneItems();
55068
+ for (var i = 0; i < noneItems.length; i++) {
55069
+ if (this.isItemSelected(noneItems[i]))
55070
+ return false;
55071
+ }
55072
+ var items = this.getVisibleEnableItems();
55073
+ if (items.length === 0)
55074
+ return false;
55075
+ var val = this.value;
55076
+ if (!val || !Array.isArray(val) || val.length === 0)
55077
+ return false;
55078
+ if (val.length < items.length)
55079
+ return false;
55080
+ var rVal = [];
55081
+ for (var i = 0; i < val.length; i++) {
55082
+ rVal.push(this.getRealValue(val[i]));
55083
+ }
55084
+ for (var i = 0; i < items.length; i++) {
55085
+ if (rVal.indexOf(items[i].value) < 0)
55086
+ return false;
55087
+ }
55088
+ return true;
55089
+ };
54941
55090
  /**
54942
55091
  * Selects all choice items, except "Other" and "None".
54943
55092
  *
@@ -55801,6 +55950,9 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
55801
55950
  };
55802
55951
  DropdownMultiSelectListModel.prototype.selectAllItems = function () {
55803
55952
  this.question.toggleSelectAll();
55953
+ if (this.question.isAllSelected && this.question.hideSelectedItems) {
55954
+ this.popupModel.hide();
55955
+ }
55804
55956
  this.updateListState();
55805
55957
  };
55806
55958
  DropdownMultiSelectListModel.prototype.selectNoneItem = function () {
@@ -55931,6 +56083,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
55931
56083
  _this.createLocalizableString("placeholder", _this, false, true);
55932
56084
  _this.createLocalizableString("clearCaption", _this, false, true);
55933
56085
  _this.createLocalizableString("readOnlyText", _this, true);
56086
+ _this.deselectAllItemText = _this.createLocalizableString("deselectAllText", _this.selectAllItem, true, "deselectAllItemText");
55934
56087
  _this.registerPropertyChangedHandlers(["value", "renderAs", "showOtherItem", "otherText", "placeholder", "choices", "visibleChoices"], function () {
55935
56088
  _this.updateReadOnlyText();
55936
56089
  });
@@ -56120,6 +56273,14 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
56120
56273
  (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onFocus(event);
56121
56274
  _super.prototype.onFocusCore.call(this, event);
56122
56275
  };
56276
+ QuestionTagboxModel.prototype.allElementsSelected = function () {
56277
+ var result = _super.prototype.allElementsSelected.call(this);
56278
+ this.updateSelectAllItemText(result);
56279
+ return result;
56280
+ };
56281
+ QuestionTagboxModel.prototype.updateSelectAllItemText = function (isAllSelected) {
56282
+ this.selectAllItem.setLocText(isAllSelected ? this.deselectAllItemText : this.selectAllItemText);
56283
+ };
56123
56284
  QuestionTagboxModel.prototype.dispose = function () {
56124
56285
  _super.prototype.dispose.call(this);
56125
56286
  if (!!this.dropdownListModel) {
@@ -57692,7 +57853,6 @@ questionfactory_QuestionFactory.Instance.registerQuestion("comment", function (n
57692
57853
 
57693
57854
  // CONCATENATED MODULE: ./packages/survey-core/src/utils/camera.ts
57694
57855
 
57695
-
57696
57856
  var camera_Camera = /** @class */ (function () {
57697
57857
  function Camera() {
57698
57858
  this.canFlipValue = undefined;
@@ -57795,27 +57955,25 @@ var camera_Camera = /** @class */ (function () {
57795
57955
  audio: false
57796
57956
  };
57797
57957
  };
57798
- Camera.prototype.startVideo = function (videoElementId, callback, imageWidth, imageHeight) {
57958
+ Camera.prototype.startVideo = function (videoElement, callback, imageWidth, imageHeight) {
57799
57959
  var _this = this;
57800
- var _a;
57801
- var videoEl = (_a = settings.environment.root) === null || _a === void 0 ? void 0 : _a.getElementById(videoElementId);
57802
- if (!videoEl) {
57960
+ if (!videoElement) {
57803
57961
  callback(undefined);
57804
57962
  return;
57805
57963
  }
57806
- videoEl.style.width = "100%";
57807
- videoEl.style.height = "auto";
57808
- videoEl.style.height = "100%";
57809
- videoEl.style.objectFit = "contain";
57964
+ videoElement.style.width = "100%";
57965
+ videoElement.style.height = "auto";
57966
+ videoElement.style.height = "100%";
57967
+ videoElement.style.objectFit = "contain";
57810
57968
  var mediaConstraints = this.getMediaConstraints({ width: imageWidth, height: imageHeight });
57811
57969
  navigator.mediaDevices.getUserMedia(mediaConstraints).then(function (stream) {
57812
57970
  var _a;
57813
- videoEl.srcObject = stream;
57971
+ videoElement.srcObject = stream;
57814
57972
  if (!((_a = Camera.cameraList[Camera.cameraIndex]) === null || _a === void 0 ? void 0 : _a.deviceId) && !!stream.getTracks()[0].getCapabilities().facingMode) {
57815
57973
  Camera.canSwitchFacingMode = true;
57816
57974
  _this.updateCanFlipValue();
57817
57975
  }
57818
- videoEl.play();
57976
+ videoElement.play();
57819
57977
  callback(stream);
57820
57978
  })
57821
57979
  .catch(function (error) {
@@ -57825,15 +57983,14 @@ var camera_Camera = /** @class */ (function () {
57825
57983
  Camera.prototype.getImageSize = function (videoEl) {
57826
57984
  return { width: videoEl.videoWidth, height: videoEl.videoHeight };
57827
57985
  };
57828
- Camera.prototype.snap = function (videoElementId, callback) {
57986
+ Camera.prototype.snap = function (videoElement, callback) {
57987
+ if (!videoElement)
57988
+ return false;
57829
57989
  if (!DomDocumentHelper.isAvailable())
57830
57990
  return false;
57831
57991
  var root = DomDocumentHelper.getDocument();
57832
- var videoEl = root === null || root === void 0 ? void 0 : root.getElementById(videoElementId);
57833
- if (!videoEl)
57834
- return false;
57835
57992
  var canvasEl = root.createElement("canvas");
57836
- var imageSize = this.getImageSize(videoEl);
57993
+ var imageSize = this.getImageSize(videoElement);
57837
57994
  canvasEl.height = imageSize.height;
57838
57995
  canvasEl.width = imageSize.width;
57839
57996
  var context = canvasEl.getContext("2d");
@@ -57844,7 +58001,7 @@ var camera_Camera = /** @class */ (function () {
57844
58001
  }
57845
58002
  */
57846
58003
  context.clearRect(0, 0, canvasEl.width, canvasEl.height);
57847
- context.drawImage(videoEl, 0, 0, canvasEl.width, canvasEl.height);
58004
+ context.drawImage(videoElement, 0, 0, canvasEl.width, canvasEl.height);
57848
58005
  canvasEl.toBlob(callback, "image/png");
57849
58006
  return true;
57850
58007
  };
@@ -58307,9 +58464,17 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
58307
58464
  _this.startVideoInCamera();
58308
58465
  }, 0);
58309
58466
  };
58467
+ Object.defineProperty(QuestionFileModel.prototype, "videoHtmlElement", {
58468
+ get: function () {
58469
+ var _a;
58470
+ return (_a = this.rootElement) === null || _a === void 0 ? void 0 : _a.querySelector("#" + this.videoId);
58471
+ },
58472
+ enumerable: false,
58473
+ configurable: true
58474
+ });
58310
58475
  QuestionFileModel.prototype.startVideoInCamera = function () {
58311
58476
  var _this = this;
58312
- this.camera.startVideo(this.videoId, function (stream) {
58477
+ this.camera.startVideo(this.videoHtmlElement, function (stream) {
58313
58478
  _this.videoStream = stream;
58314
58479
  if (!stream) {
58315
58480
  _this.stopVideo();
@@ -58330,7 +58495,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
58330
58495
  _this.loadFiles([file]);
58331
58496
  }
58332
58497
  };
58333
- this.camera.snap(this.videoId, blobCallback);
58498
+ this.camera.snap(this.videoHtmlElement, blobCallback);
58334
58499
  this.stopVideo();
58335
58500
  };
58336
58501
  QuestionFileModel.prototype.canFlipCamera = function () {
@@ -59819,12 +59984,14 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
59819
59984
  return;
59820
59985
  if (QuestionRatingModel.colorsCalculated)
59821
59986
  return;
59987
+ function getColorFromProperty(varName) {
59988
+ var style = getComputedStyle(DomDocumentHelper.getDocumentElement());
59989
+ return style.getPropertyValue && style.getPropertyValue(varName);
59990
+ }
59822
59991
  function getRGBColor(colorName, varName) {
59823
59992
  var str = !!themeVariables && themeVariables[colorName];
59824
- if (!str) {
59825
- var style = getComputedStyle(DomDocumentHelper.getDocumentElement());
59826
- str = style.getPropertyValue && style.getPropertyValue(varName);
59827
- }
59993
+ if (!str)
59994
+ str = getColorFromProperty(varName);
59828
59995
  if (!str)
59829
59996
  return null;
59830
59997
  var canvasElement = DomDocumentHelper.createElement("canvas");
@@ -59832,6 +59999,9 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
59832
59999
  return null;
59833
60000
  var ctx = canvasElement.getContext("2d");
59834
60001
  ctx.fillStyle = str;
60002
+ if (ctx.fillStyle == "#000000") {
60003
+ ctx.fillStyle = getColorFromProperty(varName);
60004
+ }
59835
60005
  var newStr = ctx.fillStyle;
59836
60006
  if (newStr.startsWith("rgba")) {
59837
60007
  return newStr.substring(5, newStr.length - 1).split(",").map(function (c) { return +(c.trim()); });
@@ -60101,7 +60271,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
60101
60271
  QuestionRatingModel.prototype.setValueFromClick = function (value) {
60102
60272
  if (this.isReadOnlyAttr)
60103
60273
  return;
60104
- if (this.value === parseFloat(value)) {
60274
+ if (this.value === ((typeof (this.value) === "string") ? value : parseFloat(value))) {
60105
60275
  this.clearValue(true);
60106
60276
  }
60107
60277
  else {
@@ -62715,7 +62885,7 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
62715
62885
  };
62716
62886
  };
62717
62887
  QuestionSignaturePadModel.prototype.refreshCanvas = function () {
62718
- if (!this.canvas)
62888
+ if (!this.signaturePad || !this.canvas)
62719
62889
  return;
62720
62890
  if (!this.value) {
62721
62891
  this.canvas.getContext("2d").clearRect(0, 0, this.canvas.width * this.scale, this.canvas.height * this.scale);
@@ -63445,7 +63615,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
63445
63615
  _this.registerPropertyChangedHandlers(["panelsState"], function () {
63446
63616
  _this.setPanelsState();
63447
63617
  });
63448
- _this.registerPropertyChangedHandlers(["isMobile", "newPanelPosition", "showRangeInProgress", "renderMode"], function () {
63618
+ _this.registerPropertyChangedHandlers(["newPanelPosition", "displayMode", "showProgressBar"], function () {
63449
63619
  _this.updateFooterActions();
63450
63620
  });
63451
63621
  _this.registerPropertyChangedHandlers(["allowAddPanel"], function () { _this.updateNoEntriesTextDefaultLoc(); });
@@ -63601,7 +63771,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
63601
63771
  });
63602
63772
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateTabTitle", {
63603
63773
  /**
63604
- * A template for tab titles. Applies when [`renderMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#renderMode) is `"tab"`.
63774
+ * A template for tab titles. Applies when [`displayMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#displayMode) is `"tab"`.
63605
63775
  *
63606
63776
  * The template can contain the following placeholders:
63607
63777
  *
@@ -63613,7 +63783,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
63613
63783
  * [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
63614
63784
  * @see templateTitle
63615
63785
  * @see tabTitlePlaceholder
63616
- * @see renderMode
63786
+ * @see displayMode
63617
63787
  */
63618
63788
  get: function () {
63619
63789
  return this.locTemplateTabTitle.text;
@@ -63793,11 +63963,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
63793
63963
  /**
63794
63964
  * A zero-based index of the currently displayed panel.
63795
63965
  *
63796
- * When `renderMode` is `"list"` or Dynamic Panel is empty (`panelCount` is 0), this property contains -1.
63966
+ * When `displayMode` is `"list"` or Dynamic Panel is empty (`panelCount` is 0), this property contains -1.
63797
63967
  * @see currentPanel
63798
63968
  * @see panels
63799
63969
  * @see panelCount
63800
- * @see renderMode
63970
+ * @see displayMode
63801
63971
  */
63802
63972
  get: function () {
63803
63973
  if (this.isRenderModeList)
@@ -63820,11 +63990,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
63820
63990
  /**
63821
63991
  * A `PanelModel` object that is the currently displayed panel.
63822
63992
  *
63823
- * When `renderMode` is `"list"` or Dynamic Panel is empty (`panelCount` is 0), this property contains `null`.
63993
+ * When `displayMode` is `"list"` or Dynamic Panel is empty (`panelCount` is 0), this property contains `null`.
63824
63994
  * @see currentIndex
63825
63995
  * @see panels
63826
63996
  * @see panelCount
63827
- * @see renderMode
63997
+ * @see displayMode
63828
63998
  */
63829
63999
  get: function () {
63830
64000
  if (this.isDesignMode)
@@ -64074,8 +64244,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64074
64244
  });
64075
64245
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelPrevText", {
64076
64246
  /**
64077
- * A caption for the Previous button. Applies only if `renderMode` is different from `"list"`.
64078
- * @see renderMode
64247
+ * A caption for the Previous button. Applies only if `displayMode` is different from `"list"`.
64248
+ * @see displayMode
64079
64249
  * @see isPrevButtonVisible
64080
64250
  */
64081
64251
  get: function () {
@@ -64096,8 +64266,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64096
64266
  });
64097
64267
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelNextText", {
64098
64268
  /**
64099
- * A caption for the Next button. Applies only if `renderMode` is different from `"list"`.
64100
- * @see renderMode
64269
+ * A caption for the Next button. Applies only if `displayMode` is different from `"list"`.
64270
+ * @see displayMode
64101
64271
  * @see isNextButtonVisible
64102
64272
  */
64103
64273
  get: function () {
@@ -64158,21 +64328,15 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64158
64328
  configurable: true
64159
64329
  });
64160
64330
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "isProgressTopShowing", {
64161
- /**
64162
- * Returns true when the renderMode equals to "progressTop" or "progressTopBottom"
64163
- */
64164
64331
  get: function () {
64165
- return this.renderMode === "progressTop" || this.renderMode === "progressTopBottom";
64332
+ return this.displayMode == "carousel" && (this.progressBarLocation === "top" || this.progressBarLocation === "topBottom");
64166
64333
  },
64167
64334
  enumerable: false,
64168
64335
  configurable: true
64169
64336
  });
64170
64337
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "isProgressBottomShowing", {
64171
- /**
64172
- * Returns true when the renderMode equals to "progressBottom" or "progressTopBottom"
64173
- */
64174
64338
  get: function () {
64175
- return this.renderMode === "progressBottom" || this.renderMode === "progressTopBottom";
64339
+ return this.displayMode == "carousel" && (this.progressBarLocation === "bottom" || this.progressBarLocation === "topBottom");
64176
64340
  },
64177
64341
  enumerable: false,
64178
64342
  configurable: true
@@ -64212,9 +64376,6 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64212
64376
  configurable: true
64213
64377
  });
64214
64378
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "isRangeShowing", {
64215
- /**
64216
- * Returns true when showRangeInProgress equals to true, renderMode doesn't equal to "list" and visiblePanelCount is >= 2.
64217
- */
64218
64379
  get: function () {
64219
64380
  return (this.showRangeInProgress && this.currentIndex >= 0 && this.visiblePanelCount > 1);
64220
64381
  },
@@ -64291,7 +64452,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64291
64452
  for (var i = this.panelCount; i < val; i++) {
64292
64453
  var panel = this.createNewPanel();
64293
64454
  this.panelsCore.push(panel);
64294
- if (this.renderMode == "list" && this.panelsState != "default") {
64455
+ if (this.displayMode == "list" && this.panelsState != "default") {
64295
64456
  if (this.panelsState === "expanded") {
64296
64457
  panel.expand();
64297
64458
  }
@@ -64327,7 +64488,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64327
64488
  });
64328
64489
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelsState", {
64329
64490
  /**
64330
- * Specifies whether users can expand and collapse panels. Applies if `renderMode` is `"list"` and the `templateTitle` property is specified.
64491
+ * Specifies whether users can expand and collapse panels. Applies if `displayMode` is `"list"` and the `templateTitle` property is specified.
64331
64492
  *
64332
64493
  * Possible values:
64333
64494
  *
@@ -64335,7 +64496,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64335
64496
  * - `"expanded"` - All panels are displayed in full and can be collapsed in the UI.
64336
64497
  * - `"collapsed"` - All panels display only their titles and descriptions and can be expanded in the UI.
64337
64498
  * - `"firstExpanded"` - Only the first panel is displayed in full; other panels are collapsed and can be expanded in the UI.
64338
- * @see renderMode
64499
+ * @see displayMode
64339
64500
  * @see templateTitle
64340
64501
  */
64341
64502
  get: function () {
@@ -64361,7 +64522,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64361
64522
  }
64362
64523
  };
64363
64524
  QuestionPanelDynamicModel.prototype.setPanelsState = function () {
64364
- if (this.useTemplatePanel || this.renderMode != "list" || !this.templateTitle)
64525
+ if (this.useTemplatePanel || this.displayMode != "list" || !this.templateTitle)
64365
64526
  return;
64366
64527
  for (var i = 0; i < this.panelsCore.length; i++) {
64367
64528
  var state = this.panelsState;
@@ -64574,46 +64735,68 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64574
64735
  });
64575
64736
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "showRangeInProgress", {
64576
64737
  /**
64577
- * Shows the range from 1 to panelCount when renderMode doesn't equal to "list". Set to false to hide this element.
64578
- * @see panelCount
64579
- * @see renderMode
64738
+ * Obsolete. Use the [`showProgressBar`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#showProgressBar) property instead.
64739
+ * @deprecated
64580
64740
  */
64581
64741
  get: function () {
64582
- return this.getPropertyValue("showRangeInProgress");
64742
+ return this.showProgressBar;
64743
+ // return this.getPropertyValue("showRangeInProgress");
64583
64744
  },
64584
64745
  set: function (val) {
64585
- this.setPropertyValue("showRangeInProgress", val);
64586
- this.fireCallback(this.currentIndexChangedCallback);
64746
+ this.showProgressBar = val;
64747
+ // this.setPropertyValue("showRangeInProgress", val);
64587
64748
  },
64588
64749
  enumerable: false,
64589
64750
  configurable: true
64590
64751
  });
64591
64752
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "renderMode", {
64592
64753
  /**
64593
- * Specifies how to render panels.
64594
- *
64595
- * Possible values:
64596
- *
64597
- * - `"list"` (default) - Renders panels one under the other. [View Demo](https://surveyjs.io/form-library/examples/how-to-use-expressions-in-dynamic-panel/)
64598
- * - `"progressTop"` - Renders each panel as a card and displays a progress bar at the top. [View Demo](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/)
64599
- * - `"progressBottom"` - Renders each panel panel as a card and displays a progress bar at the bottom.
64600
- * - `"progressTopBottom"` - Renders each panel as a card and displays a progress bar at the top and bottom.
64601
- * - `"tab"` - Renders each panel within a tab. Use the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) to specify a template for tab titles. [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/)
64754
+ * Obsolete. Use the [`displayMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#displayMode) property instead.
64755
+ * @deprecated
64602
64756
  */
64603
64757
  get: function () {
64604
- return this.getPropertyValue("renderMode");
64758
+ var displayMode = this.displayMode;
64759
+ if (displayMode == "carousel") {
64760
+ var progressBarLocation = this.progressBarLocation;
64761
+ if (progressBarLocation == "top") {
64762
+ return "progressTop";
64763
+ }
64764
+ else if (progressBarLocation == "bottom") {
64765
+ return "progressBottom";
64766
+ }
64767
+ else if (progressBarLocation == "topBottom") {
64768
+ return "progressTopBottom";
64769
+ }
64770
+ }
64771
+ return displayMode;
64605
64772
  },
64606
64773
  set: function (val) {
64607
- this.setPropertyValue("renderMode", val);
64608
- this.fireCallback(this.renderModeChangedCallback);
64609
- this.blockAnimations();
64610
- this.updateRenderedPanels();
64611
- this.releaseAnimations();
64612
- this.updatePanelsAnimation();
64774
+ if ((val || "").startsWith("progress")) {
64775
+ if (val == "progressTop") {
64776
+ this.progressBarLocation = "top";
64777
+ }
64778
+ else if (val == "progressBottom") {
64779
+ this.progressBarLocation = "bottom";
64780
+ }
64781
+ else if (val == "progressTopBottom") {
64782
+ this.progressBarLocation = "topBottom";
64783
+ }
64784
+ this.displayMode = "carousel";
64785
+ }
64786
+ else {
64787
+ this.displayMode = val;
64788
+ }
64789
+ // this.updatePanelView();
64613
64790
  },
64614
64791
  enumerable: false,
64615
64792
  configurable: true
64616
64793
  });
64794
+ QuestionPanelDynamicModel.prototype.updatePanelView = function () {
64795
+ this.blockAnimations();
64796
+ this.updateRenderedPanels();
64797
+ this.releaseAnimations();
64798
+ this.updatePanelsAnimation();
64799
+ };
64617
64800
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "tabAlign", {
64618
64801
  get: function () {
64619
64802
  return this.getPropertyValue("tabAlign");
@@ -64629,14 +64812,14 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64629
64812
  });
64630
64813
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "isRenderModeList", {
64631
64814
  get: function () {
64632
- return this.renderMode === "list";
64815
+ return this.displayMode === "list";
64633
64816
  },
64634
64817
  enumerable: false,
64635
64818
  configurable: true
64636
64819
  });
64637
64820
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "isRenderModeTab", {
64638
64821
  get: function () {
64639
- return this.renderMode === "tab";
64822
+ return this.displayMode === "tab";
64640
64823
  },
64641
64824
  enumerable: false,
64642
64825
  configurable: true
@@ -64827,12 +65010,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64827
65010
  return true;
64828
65011
  };
64829
65012
  /**
64830
- * Add a new dynamic panel based on the template Panel. It checks if canAddPanel returns true and then calls addPanel method.
64831
- * If a renderMode is different from "list" and the current panel has erros, then
64832
- * @see template
65013
+ * Adds a new panel based on the [template](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#template).
65014
+ *
65015
+ * Unlike the [`addPanel()`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#addPanel) method, `addPanelUI()` performs additional actions: checks whether a new panel [can be added](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#canAddPanel), expands and focuses the new panel, and runs animated effects.
64833
65016
  * @see panelCount
64834
65017
  * @see panels
64835
- * @see canAddPanel
64836
65018
  */
64837
65019
  QuestionPanelDynamicModel.prototype.addPanelUI = function () {
64838
65020
  if (!this.canAddPanel)
@@ -64840,7 +65022,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64840
65022
  if (!this.canLeaveCurrentPanel())
64841
65023
  return null;
64842
65024
  var newPanel = this.addPanel();
64843
- if (this.renderMode === "list" && this.panelsState !== "default") {
65025
+ if (this.displayMode === "list" && this.panelsState !== "default") {
64844
65026
  newPanel.expand();
64845
65027
  }
64846
65028
  this.focusNewPanelCallback = function () {
@@ -64859,7 +65041,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64859
65041
  };
64860
65042
  /**
64861
65043
  * Adds a new panel based on the [template](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#template).
64862
- * @param index *(Optional)* An index at which to insert the new panel. `undefined` adds the panel to the end or inserts it after the current panel if [`renderMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#renderMode) is `"tab"`. A negative index (for instance, -1) adds the panel to the end in all cases, regardless of the `renderMode` value.
65044
+ * @param index *(Optional)* An index at which to insert the new panel. `undefined` adds the panel to the end or inserts it after the current panel if [`displayMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#renderMode) is `"tab"`. A negative index (for instance, -1) adds the panel to the end in all cases, regardless of the `displayMode` value.
64863
65045
  * @see panelCount
64864
65046
  * @see panels
64865
65047
  * @see allowAddPanel
@@ -64908,7 +65090,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64908
65090
  }
64909
65091
  };
64910
65092
  QuestionPanelDynamicModel.prototype.canLeaveCurrentPanel = function () {
64911
- return !(this.renderMode !== "list" && this.currentPanel && this.currentPanel.hasErrors(true, true));
65093
+ return !(this.displayMode !== "list" && this.currentPanel && this.currentPanel.hasErrors(true, true));
64912
65094
  };
64913
65095
  QuestionPanelDynamicModel.prototype.copyValue = function (dest, src) {
64914
65096
  for (var key in src) {
@@ -64916,13 +65098,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64916
65098
  }
64917
65099
  };
64918
65100
  /**
64919
- * Call removePanel function. Do nothing is canRemovePanel returns false. If confirmDelete set to true, it shows the confirmation dialog first.
64920
- * @param value a panel or panel index
64921
- * @see removePanel
64922
- * @see confirmDelete
64923
- * @see confirmDeleteText
64924
- * @see canRemovePanel
65101
+ * Deletes a panel from the [`panels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#panels) array.
64925
65102
  *
65103
+ * Unlike the [`removePanel()`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#removePanel) method, `removePanelUI()` performs additional actions: checks whether the panel [can be removed](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#canRemovePanel) and displays a confirmation dialog (if the [`confirmDelete`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#confirmDelete) property is enabled).
65104
+ * @param value A `PanelModel` instance or zero-based panel index.
65105
+ * @see addPanelUI
64926
65106
  */
64927
65107
  QuestionPanelDynamicModel.prototype.removePanelUI = function (value) {
64928
65108
  var _this = this;
@@ -64946,8 +65126,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64946
65126
  (this.isValueEmpty(this.defaultPanelValue) || !this.isTwoValueEquals(panelValue, this.defaultPanelValue));
64947
65127
  };
64948
65128
  /**
64949
- * Switches Dynamic Panel to the next panel. Returns `true` in case of success, or `false` if `renderMode` is `"list"` or the current panel contains validation errors.
64950
- * @see renderMode
65129
+ * Switches Dynamic Panel to the next panel. Returns `true` in case of success, or `false` if `displayMode` is `"list"` or the current panel contains validation errors.
65130
+ * @see displayMode
64951
65131
  */
64952
65132
  QuestionPanelDynamicModel.prototype.goToNextPanel = function () {
64953
65133
  if (this.currentIndex < 0)
@@ -64965,6 +65145,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64965
65145
  return;
64966
65146
  this.currentIndex--;
64967
65147
  };
65148
+ /**
65149
+ * Deletes a panel from the [`panels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#panels) array.
65150
+ * @param value A `PanelModel` instance or zero-based panel index.
65151
+ * @see addPanel
65152
+ */
64968
65153
  QuestionPanelDynamicModel.prototype.removePanel = function (value) {
64969
65154
  var visIndex = this.getVisualPanelIndex(value);
64970
65155
  if (visIndex < 0 || visIndex >= this.visiblePanelCount)
@@ -65419,11 +65604,12 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
65419
65604
  for (var i = 0; i < panels.length; i++) {
65420
65605
  this.setOnCompleteAsyncInPanel(panels[i]);
65421
65606
  }
65422
- for (var i = 0; i < panels.length; i++) {
65423
- var pnlError = panels[i].hasErrors(fireCallback, !!rec && rec.focusOnFirstError, rec);
65424
- pnlError = this.isValueDuplicated(panels[i], keyValues, rec, fireCallback) || pnlError;
65425
- if (!this.isRenderModeList && pnlError && !res) {
65426
- this.currentIndex = i;
65607
+ var focusOnError = !!rec && rec.focusOnFirstError;
65608
+ for (var i_1 = 0; i_1 < panels.length; i_1++) {
65609
+ var pnlError = panels[i_1].hasErrors(fireCallback, focusOnError, rec);
65610
+ pnlError = this.isValueDuplicated(panels[i_1], keyValues, rec, fireCallback) || pnlError;
65611
+ if (!this.isRenderModeList && pnlError && !res && focusOnError) {
65612
+ this.currentIndex = i_1;
65427
65613
  }
65428
65614
  res = pnlError || res;
65429
65615
  }
@@ -65761,7 +65947,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
65761
65947
  return new CssClassBuilder()
65762
65948
  .append(this.cssClasses.button)
65763
65949
  .append(this.cssClasses.buttonAdd)
65764
- .append(this.cssClasses.buttonAdd + "--list-mode", this.renderMode === "list")
65950
+ .append(this.cssClasses.buttonAdd + "--list-mode", this.displayMode === "list")
65765
65951
  .toString();
65766
65952
  };
65767
65953
  QuestionPanelDynamicModel.prototype.getPrevButtonCss = function () {
@@ -66016,10 +66202,36 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
66016
66202
  }
66017
66203
  return classes;
66018
66204
  };
66205
+ QuestionPanelDynamicModel.prototype.onMobileChanged = function () {
66206
+ _super.prototype.onMobileChanged.call(this);
66207
+ this.updateFooterActions();
66208
+ };
66019
66209
  QuestionPanelDynamicModel.maxCheckCount = 3;
66020
66210
  question_paneldynamic_decorate([
66021
66211
  propertyArray({})
66022
66212
  ], QuestionPanelDynamicModel.prototype, "_renderedPanels", void 0);
66213
+ question_paneldynamic_decorate([
66214
+ jsonobject_property({
66215
+ onSet: function (val, target) {
66216
+ target.fireCallback(target.renderModeChangedCallback);
66217
+ target.updatePanelView();
66218
+ }
66219
+ })
66220
+ ], QuestionPanelDynamicModel.prototype, "displayMode", void 0);
66221
+ question_paneldynamic_decorate([
66222
+ jsonobject_property({
66223
+ onSet: function (val, target) {
66224
+ target.fireCallback(target.currentIndexChangedCallback);
66225
+ }
66226
+ })
66227
+ ], QuestionPanelDynamicModel.prototype, "showProgressBar", void 0);
66228
+ question_paneldynamic_decorate([
66229
+ jsonobject_property({
66230
+ onSet: function (val, target) {
66231
+ // target.updatePanelView();
66232
+ }
66233
+ })
66234
+ ], QuestionPanelDynamicModel.prototype, "progressBarLocation", void 0);
66023
66235
  question_paneldynamic_decorate([
66024
66236
  jsonobject_property({ defaultValue: false, onSet: function (_, target) { target.updateFooterActions(); } })
66025
66237
  ], QuestionPanelDynamicModel.prototype, "legacyNavigation", void 0);
@@ -66036,8 +66248,14 @@ Serializer.addClass("paneldynamic", [
66036
66248
  isLightSerializable: false
66037
66249
  },
66038
66250
  { name: "templateTitle:text", serializationProperty: "locTemplateTitle" },
66039
- { name: "templateTabTitle", serializationProperty: "locTemplateTabTitle", visibleIf: function (obj) { return obj.renderMode === "tab"; } },
66040
- { name: "tabTitlePlaceholder", serializationProperty: "locTabTitlePlaceholder", visibleIf: function (obj) { return obj.renderMode === "tab"; } },
66251
+ {
66252
+ name: "templateTabTitle", serializationProperty: "locTemplateTabTitle",
66253
+ visibleIf: function (obj) { return obj.displayMode === "tab"; }
66254
+ },
66255
+ {
66256
+ name: "tabTitlePlaceholder", serializationProperty: "locTabTitlePlaceholder",
66257
+ visibleIf: function (obj) { return obj.displayMode === "tab"; }
66258
+ },
66041
66259
  {
66042
66260
  name: "templateDescription:text",
66043
66261
  serializationProperty: "locTemplateDescription",
@@ -66064,7 +66282,7 @@ Serializer.addClass("paneldynamic", [
66064
66282
  name: "panelsState",
66065
66283
  default: "default",
66066
66284
  choices: ["default", "collapsed", "expanded", "firstExpanded"],
66067
- visibleIf: function (obj) { return obj.renderMode === "list"; }
66285
+ visibleIf: function (obj) { return obj.displayMode === "list"; }
66068
66286
  },
66069
66287
  { name: "keyName" },
66070
66288
  {
@@ -66090,12 +66308,12 @@ Serializer.addClass("paneldynamic", [
66090
66308
  {
66091
66309
  name: "panelPrevText",
66092
66310
  serializationProperty: "locPanelPrevText",
66093
- visibleIf: function (obj) { return obj.renderMode !== "list"; }
66311
+ visibleIf: function (obj) { return obj.displayMode !== "list"; }
66094
66312
  },
66095
66313
  {
66096
66314
  name: "panelNextText",
66097
66315
  serializationProperty: "locPanelNextText",
66098
- visibleIf: function (obj) { return obj.renderMode !== "list"; }
66316
+ visibleIf: function (obj) { return obj.displayMode !== "list"; }
66099
66317
  },
66100
66318
  {
66101
66319
  name: "showQuestionNumbers",
@@ -66105,16 +66323,30 @@ Serializer.addClass("paneldynamic", [
66105
66323
  {
66106
66324
  name: "showRangeInProgress:boolean",
66107
66325
  default: true,
66108
- visibleIf: function (obj) { return obj.renderMode !== "list"; }
66326
+ visible: false
66327
+ // visibleIf: (obj: any) => { return obj.displayMode !== "list"; }
66109
66328
  },
66110
66329
  {
66111
66330
  name: "renderMode",
66112
66331
  default: "list",
66113
66332
  choices: ["list", "progressTop", "progressBottom", "progressTopBottom", "tab"],
66333
+ visible: false,
66334
+ },
66335
+ { name: "displayMode", default: "list", choices: ["list", "carousel", "tab"] },
66336
+ {
66337
+ name: "showProgressBar:boolean",
66338
+ default: true,
66339
+ visibleIf: function (obj) { return obj.displayMode === "carousel"; }
66340
+ },
66341
+ {
66342
+ name: "progressBarLocation",
66343
+ default: "top",
66344
+ choices: ["top", "bottom", "topBottom"],
66345
+ visibleIf: function (obj) { return obj.showProgressBar; }
66114
66346
  },
66115
66347
  {
66116
66348
  name: "tabAlign", default: "center", choices: ["left", "center", "right"],
66117
- visibleIf: function (obj) { return obj.renderMode === "tab"; }
66349
+ visibleIf: function (obj) { return obj.displayMode === "tab"; }
66118
66350
  },
66119
66351
  {
66120
66352
  name: "templateTitleLocation",
@@ -68383,6 +68615,9 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
68383
68615
  var _this = this;
68384
68616
  var date = new Date(str);
68385
68617
  this.initInputDateTimeData();
68618
+ if (!this.hasTimePart) {
68619
+ date = new Date(str + "T00:00:00");
68620
+ }
68386
68621
  if (!this.hasDatePart) {
68387
68622
  date = new Date(this.defaultDate + str);
68388
68623
  }
@@ -69006,8 +69241,8 @@ Serializer.addClass("currencymask", [
69006
69241
 
69007
69242
  var Version;
69008
69243
  var ReleaseDate;
69009
- Version = "" + "1.11.12";
69010
- ReleaseDate = "" + "2024-08-20";
69244
+ Version = "" + "1.11.14";
69245
+ ReleaseDate = "" + "2024-09-04";
69011
69246
  function checkLibraryVersion(ver, libraryName) {
69012
69247
  if (Version != ver) {
69013
69248
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -71941,9 +72176,7 @@ var arabicSurveyStrings = {
71941
72176
  ok: "موافق",
71942
72177
  cancel: "إلغاء الأمر"
71943
72178
  };
71944
- surveyLocalization.locales["ar"] = arabicSurveyStrings;
71945
- surveyLocalization.localeNames["ar"] = "العربية";
71946
- surveyLocalization.localeDirections["ar"] = "rtl";
72179
+ surveyLocalization.setupLocale("ar", arabicSurveyStrings, "العربية", "Arabic", "rtl");
71947
72180
  // The following strings have been translated by a machine translation service
71948
72181
  // Remove those strings that you have corrected manually
71949
72182
  // indexText: "{0} of {1}" => "{0} من {1}"
@@ -72086,8 +72319,7 @@ var basqueSurveyStrings = {
72086
72319
  ok: "Ados",
72087
72320
  cancel: "Ezeztatu"
72088
72321
  };
72089
- surveyLocalization.locales["eu"] = basqueSurveyStrings;
72090
- surveyLocalization.localeNames["eu"] = "Euskara";
72322
+ surveyLocalization.setupLocale("eu", basqueSurveyStrings, "euskara", "Basque");
72091
72323
  // The following strings have been translated by a machine translation service
72092
72324
  // Remove those strings that you have corrected manually
72093
72325
  // indexText: "{0} of {1}" => "{1} {0}"
@@ -72223,8 +72455,7 @@ var bulgarianStrings = {
72223
72455
  ok: "Добре",
72224
72456
  cancel: "Отмени"
72225
72457
  };
72226
- surveyLocalization.locales["bg"] = bulgarianStrings;
72227
- surveyLocalization.localeNames["bg"] = "български";
72458
+ surveyLocalization.setupLocale("bg", bulgarianStrings, "български", "Bulgarian");
72228
72459
  // The following strings have been translated by a machine translation service
72229
72460
  // Remove those strings that you have corrected manually
72230
72461
  // indexText: "{0} of {1}" => "{0} на {1}"
@@ -72367,8 +72598,7 @@ var catalanSurveyStrings = {
72367
72598
  ok: "D'ACORD",
72368
72599
  cancel: "Cancel·lar"
72369
72600
  };
72370
- surveyLocalization.locales["ca"] = catalanSurveyStrings;
72371
- surveyLocalization.localeNames["ca"] = "català";
72601
+ surveyLocalization.setupLocale("ca", catalanSurveyStrings, "català", "Catalan");
72372
72602
  // The following strings have been translated by a machine translation service
72373
72603
  // Remove those strings that you have corrected manually
72374
72604
  // previewText: "Preview" => "Preestrena"
@@ -72551,8 +72781,7 @@ var croatianStrings = {
72551
72781
  ok: "OK",
72552
72782
  cancel: "Otkazati"
72553
72783
  };
72554
- surveyLocalization.locales["hr"] = croatianStrings;
72555
- surveyLocalization.localeNames["hr"] = "hrvatski";
72784
+ surveyLocalization.setupLocale("hr", croatianStrings, "hrvatski", "Croatian");
72556
72785
  // The following strings have been translated by a machine translation service
72557
72786
  // Remove those strings that you have corrected manually
72558
72787
  // indexText: "{0} of {1}" => "{0} {1}"
@@ -72693,8 +72922,7 @@ var czechSurveyStrings = {
72693
72922
  ok: "OK",
72694
72923
  cancel: "Zrušit"
72695
72924
  };
72696
- surveyLocalization.locales["cs"] = czechSurveyStrings;
72697
- surveyLocalization.localeNames["cs"] = "čeština";
72925
+ surveyLocalization.setupLocale("cs", czechSurveyStrings, "čeština", "Czech");
72698
72926
  // The following strings have been translated by a machine translation service
72699
72927
  // Remove those strings that you have corrected manually
72700
72928
  // indexText: "{0} of {1}" => "{0} z {1}"
@@ -72837,8 +73065,7 @@ var danishSurveyStrings = {
72837
73065
  ok: "OK",
72838
73066
  cancel: "Aflyse"
72839
73067
  };
72840
- surveyLocalization.locales["da"] = danishSurveyStrings;
72841
- surveyLocalization.localeNames["da"] = "dansk";
73068
+ surveyLocalization.setupLocale("da", danishSurveyStrings, "dansk", "Danish");
72842
73069
  // The following strings have been translated by a machine translation service
72843
73070
  // Remove those strings that you have corrected manually
72844
73071
  // indexText: "{0} of {1}" => "{0} af {1}"
@@ -72981,8 +73208,7 @@ var dutchSurveyStrings = {
72981
73208
  ok: "OK",
72982
73209
  cancel: "Annuleren"
72983
73210
  };
72984
- surveyLocalization.locales["nl"] = dutchSurveyStrings;
72985
- surveyLocalization.localeNames["nl"] = "nederlands";
73211
+ surveyLocalization.setupLocale("nl", dutchSurveyStrings, "nederlands", "Dutch");
72986
73212
  // The following strings have been translated by a machine translation service
72987
73213
  // Remove those strings that you have corrected manually
72988
73214
  // indexText: "{0} of {1}" => "{0} van {1}"
@@ -73022,8 +73248,7 @@ surveyLocalization.localeNames["nl"] = "nederlands";
73022
73248
  * - Copy the Dutch set once and move forward as if it are 2 totally different languages
73023
73249
  * - Override the relevant strings only
73024
73250
  */
73025
- surveyLocalization.locales["nl-BE"] = dutchSurveyStrings;
73026
- surveyLocalization.localeNames["nl-BE"] = "vlaams";
73251
+ surveyLocalization.setupLocale("nl-BE", dutchSurveyStrings, "vlaams", "Flemish");
73027
73252
 
73028
73253
  // CONCATENATED MODULE: ./packages/survey-core/src/localization/estonian.ts
73029
73254
 
@@ -73134,8 +73359,7 @@ var estonianSurveyStrings = {
73134
73359
  ok: "OK",
73135
73360
  cancel: "Tühistama"
73136
73361
  };
73137
- surveyLocalization.locales["et"] = estonianSurveyStrings;
73138
- surveyLocalization.localeNames["et"] = "eesti keel";
73362
+ surveyLocalization.setupLocale("et", estonianSurveyStrings, "eesti keel", "Estonian");
73139
73363
  // The following strings have been translated by a machine translation service
73140
73364
  // Remove those strings that you have corrected manually
73141
73365
  // indexText: "{0} of {1}" => "{0} {1}"
@@ -73278,8 +73502,7 @@ var finnishSurveyStrings = {
73278
73502
  ok: "OKEI",
73279
73503
  cancel: "Perua"
73280
73504
  };
73281
- surveyLocalization.locales["fi"] = finnishSurveyStrings;
73282
- surveyLocalization.localeNames["fi"] = "suomi";
73505
+ surveyLocalization.setupLocale("fi", finnishSurveyStrings, "suomi", "Finnish");
73283
73506
  // The following strings have been translated by a machine translation service
73284
73507
  // Remove those strings that you have corrected manually
73285
73508
  // panelDynamicTabTextFormat: "Panel {panelIndex}" => "Paneeli {panelIndex}"
@@ -73410,8 +73633,7 @@ var frenchSurveyStrings = {
73410
73633
  ok: "D’ACCORD",
73411
73634
  cancel: "Annuler"
73412
73635
  };
73413
- surveyLocalization.locales["fr"] = frenchSurveyStrings;
73414
- surveyLocalization.localeNames["fr"] = "français";
73636
+ surveyLocalization.setupLocale("fr", frenchSurveyStrings, "français", "French");
73415
73637
  // The following strings have been translated by a machine translation service
73416
73638
  // Remove those strings that you have corrected manually
73417
73639
  // panelDynamicTabTextFormat: "Panel {panelIndex}" => "Panel {panelIndex}"
@@ -73542,8 +73764,7 @@ var georgianSurveyStrings = {
73542
73764
  ok: "კარგი",
73543
73765
  cancel: "გაუქმება"
73544
73766
  };
73545
- surveyLocalization.locales["ka"] = georgianSurveyStrings;
73546
- surveyLocalization.localeNames["ka"] = "ქართული";
73767
+ surveyLocalization.setupLocale("ka", georgianSurveyStrings, "ქართული", "Georgian");
73547
73768
  // The following strings have been translated by a machine translation service
73548
73769
  // Remove those strings that you have corrected manually
73549
73770
  // previewText: "Preview" => "გადახედვა"
@@ -73739,8 +73960,7 @@ var germanSurveyStrings = {
73739
73960
  ok: "OK",
73740
73961
  cancel: "Abbrechen"
73741
73962
  };
73742
- surveyLocalization.locales["de"] = germanSurveyStrings;
73743
- surveyLocalization.localeNames["de"] = "deutsch";
73963
+ surveyLocalization.setupLocale("de", germanSurveyStrings, "deutsch", "German");
73744
73964
  // The following strings have been translated by a machine translation service
73745
73965
  // Remove those strings that you have corrected manually
73746
73966
  // tabTitlePlaceholder: "New Panel" => "Neues Panel"
@@ -73854,8 +74074,7 @@ var greekSurveyStrings = {
73854
74074
  ok: "OK",
73855
74075
  cancel: "Ακυρώνω"
73856
74076
  };
73857
- surveyLocalization.locales["gr"] = greekSurveyStrings;
73858
- surveyLocalization.localeNames["gr"] = "ελληνικά";
74077
+ surveyLocalization.setupLocale("gr", greekSurveyStrings, "ελληνικά", "Greek");
73859
74078
  // The following strings have been translated by a machine translation service
73860
74079
  // Remove those strings that you have corrected manually
73861
74080
  // panelDynamicTabTextFormat: "Panel {panelIndex}" => "Πίνακας {panelIndex}"
@@ -73983,8 +74202,7 @@ var hebrewSurveyStrings = {
73983
74202
  ok: "אוקיי",
73984
74203
  cancel: "ביטל"
73985
74204
  };
73986
- surveyLocalization.locales["he"] = hebrewSurveyStrings;
73987
- surveyLocalization.localeNames["he"] = "עברית";
74205
+ surveyLocalization.setupLocale("he", hebrewSurveyStrings, "עברית", "Hebrew");
73988
74206
  // The following strings have been translated by a machine translation service
73989
74207
  // Remove those strings that you have corrected manually
73990
74208
  // indexText: "{0} of {1}" => "{0} מתוך {1}"
@@ -74128,8 +74346,7 @@ var hindiStrings = {
74128
74346
  ok: "ठीक है",
74129
74347
  cancel: "रद्द करना"
74130
74348
  };
74131
- surveyLocalization.locales["hi"] = hindiStrings;
74132
- surveyLocalization.localeNames["hi"] = "hindi";
74349
+ surveyLocalization.setupLocale("hi", hindiStrings, "hindi", "Hindi");
74133
74350
  // The following strings have been translated by a machine translation service
74134
74351
  // Remove those strings that you have corrected manually
74135
74352
  // noneItemText: "None" => "कोई नहीं"
@@ -74272,8 +74489,7 @@ var hungarianSurveyStrings = {
74272
74489
  ok: "OKÉ",
74273
74490
  cancel: "Érvénytelenít"
74274
74491
  };
74275
- surveyLocalization.locales["hu"] = hungarianSurveyStrings;
74276
- surveyLocalization.localeNames["hu"] = "magyar";
74492
+ surveyLocalization.setupLocale("hu", hungarianSurveyStrings, "magyar", "Hungarian");
74277
74493
  // The following strings have been translated by a machine translation service
74278
74494
  // Remove those strings that you have corrected manually
74279
74495
  // indexText: "{0} of {1}" => "{0} {1} közül"
@@ -74415,8 +74631,7 @@ var icelandicSurveyStrings = {
74415
74631
  ok: "ÓKEI",
74416
74632
  cancel: "Afturkalla"
74417
74633
  };
74418
- surveyLocalization.locales["is"] = icelandicSurveyStrings;
74419
- surveyLocalization.localeNames["is"] = "íslenska";
74634
+ surveyLocalization.setupLocale("is", icelandicSurveyStrings, "íslenska", "Icelandic");
74420
74635
  // The following strings have been translated by a machine translation service
74421
74636
  // Remove those strings that you have corrected manually
74422
74637
  // indexText: "{0} of {1}" => "{0} af {1}"
@@ -74559,8 +74774,7 @@ var indonesianStrings = {
74559
74774
  ok: "OKE",
74560
74775
  cancel: "Membatalkan"
74561
74776
  };
74562
- surveyLocalization.locales["id"] = indonesianStrings;
74563
- surveyLocalization.localeNames["id"] = "bahasa Indonesia";
74777
+ surveyLocalization.setupLocale("id", indonesianStrings, "bahasa indonesia", "Indonesian");
74564
74778
  // The following strings have been translated by a machine translation service
74565
74779
  // Remove those strings that you have corrected manually
74566
74780
  // indexText: "{0} of {1}" => "{0} dari {1}"
@@ -74703,8 +74917,7 @@ var italianSurveyStrings = {
74703
74917
  ok: "OK",
74704
74918
  cancel: "Annulla"
74705
74919
  };
74706
- surveyLocalization.locales["it"] = italianSurveyStrings;
74707
- surveyLocalization.localeNames["it"] = "italiano";
74920
+ surveyLocalization.setupLocale("it", italianSurveyStrings, "italiano", "Italian");
74708
74921
  // The following strings have been translated by a machine translation service
74709
74922
  // Remove those strings that you have corrected manually
74710
74923
  // panelDynamicTabTextFormat: "Panel {panelIndex}" => "Pannello {panelIndex}"
@@ -74835,8 +75048,7 @@ var japaneseSurveyStrings = {
74835
75048
  ok: "わかりました",
74836
75049
  cancel: "キャンセル"
74837
75050
  };
74838
- surveyLocalization.locales["ja"] = japaneseSurveyStrings;
74839
- surveyLocalization.localeNames["ja"] = "日本語";
75051
+ surveyLocalization.setupLocale("ja", japaneseSurveyStrings, "日本語", "Japanese");
74840
75052
  // The following strings have been translated by a machine translation service
74841
75053
  // Remove those strings that you have corrected manually
74842
75054
  // indexText: "{0} of {1}" => "{1}の{0}"
@@ -74979,8 +75191,7 @@ var kazakhStrings = {
74979
75191
  ok: "ЖАҚСЫ",
74980
75192
  cancel: "Болдырмау"
74981
75193
  };
74982
- surveyLocalization.locales["kk"] = kazakhStrings;
74983
- surveyLocalization.localeNames["kk"] = "Kazakh";
75194
+ surveyLocalization.setupLocale("kk", kazakhStrings, "kazakh", "Kazakh");
74984
75195
  // The following strings have been translated by a machine translation service
74985
75196
  // Remove those strings that you have corrected manually
74986
75197
  // indexText: "{0} of {1}" => "{1} {0}"
@@ -75123,8 +75334,7 @@ var koreanStrings = {
75123
75334
  ok: "그래",
75124
75335
  cancel: "취소"
75125
75336
  };
75126
- surveyLocalization.locales["ko"] = koreanStrings;
75127
- surveyLocalization.localeNames["ko"] = "한국어";
75337
+ surveyLocalization.setupLocale("ko", koreanStrings, "한국어", "Korean");
75128
75338
  // The following strings have been translated by a machine translation service
75129
75339
  // Remove those strings that you have corrected manually
75130
75340
  // panelDynamicTabTextFormat: "Panel {panelIndex}" => "패널 {panelIndex}"
@@ -75254,8 +75464,7 @@ var latvianSurveyStrings = {
75254
75464
  ok: "LABI",
75255
75465
  cancel: "Atcelt"
75256
75466
  };
75257
- surveyLocalization.locales["lv"] = latvianSurveyStrings;
75258
- surveyLocalization.localeNames["lv"] = "latviešu";
75467
+ surveyLocalization.setupLocale("lv", latvianSurveyStrings, "latviešu", "Latvian");
75259
75468
  // The following strings have been translated by a machine translation service
75260
75469
  // Remove those strings that you have corrected manually
75261
75470
  // panelDynamicTabTextFormat: "Panel {panelIndex}" => "Panelis {panelIndex}"
@@ -75386,8 +75595,7 @@ var lithuaniaSurveyStrings = {
75386
75595
  ok: "GERAI",
75387
75596
  cancel: "Atšaukti"
75388
75597
  };
75389
- surveyLocalization.locales["lt"] = lithuaniaSurveyStrings;
75390
- surveyLocalization.localeNames["lt"] = "lietuvių";
75598
+ surveyLocalization.setupLocale("lt", lithuaniaSurveyStrings, "lietuvių", "Lithuanian");
75391
75599
  // The following strings have been translated by a machine translation service
75392
75600
  // Remove those strings that you have corrected manually
75393
75601
  // indexText: "{0} of {1}" => "{1} {0}"
@@ -75530,8 +75738,7 @@ var macedonianSurveyStrings = {
75530
75738
  ok: "ДОБРО",
75531
75739
  cancel: "Откажи"
75532
75740
  };
75533
- surveyLocalization.locales["mk"] = macedonianSurveyStrings;
75534
- surveyLocalization.localeNames["mk"] = "Македонски";
75741
+ surveyLocalization.setupLocale("mk", macedonianSurveyStrings, "македонски", "Macedonian");
75535
75742
  // The following strings have been translated by a machine translation service
75536
75743
  // Remove those strings that you have corrected manually
75537
75744
  // indexText: "{0} of {1}" => "{0} на {1}"
@@ -75668,8 +75875,7 @@ var malaySurveyStrings = {
75668
75875
  ok: "OK",
75669
75876
  cancel: "Batal"
75670
75877
  };
75671
- surveyLocalization.locales["ms"] = malaySurveyStrings;
75672
- surveyLocalization.localeNames["ms"] = "melayu";
75878
+ surveyLocalization.setupLocale("ms", malaySurveyStrings, "melayu", "Malay");
75673
75879
  // The following strings have been translated by a machine translation service
75674
75880
  // Remove those strings that you have corrected manually
75675
75881
  // indexText: "{0} of {1}" => "{0} {1}"
@@ -75802,8 +76008,7 @@ var norwegianSurveyStrings = {
75802
76008
  ok: "OK",
75803
76009
  cancel: "Annullere"
75804
76010
  };
75805
- surveyLocalization.locales["no"] = norwegianSurveyStrings;
75806
- surveyLocalization.localeNames["no"] = "norsk";
76011
+ surveyLocalization.setupLocale("no", norwegianSurveyStrings, "norsk", "Norwegian");
75807
76012
  // The following strings have been translated by a machine translation service
75808
76013
  // Remove those strings that you have corrected manually
75809
76014
  // indexText: "{0} of {1}" => "{0} av {1}"
@@ -75946,8 +76151,7 @@ var persianSurveyStrings = {
75946
76151
  ok: "باشه",
75947
76152
  cancel: "لغو"
75948
76153
  };
75949
- surveyLocalization.locales["fa"] = persianSurveyStrings;
75950
- surveyLocalization.localeNames["fa"] = "فارْسِى";
76154
+ surveyLocalization.setupLocale("fa", persianSurveyStrings, "فارْسِى", "Persian");
75951
76155
  // The following strings have been translated by a machine translation service
75952
76156
  // Remove those strings that you have corrected manually
75953
76157
  // indexText: "{0} of {1}" => "{0} {1}"
@@ -76090,8 +76294,7 @@ var polishSurveyStrings = {
76090
76294
  ok: "OK",
76091
76295
  cancel: "Anuluj"
76092
76296
  };
76093
- surveyLocalization.locales["pl"] = polishSurveyStrings;
76094
- surveyLocalization.localeNames["pl"] = "polski";
76297
+ surveyLocalization.setupLocale("pl", polishSurveyStrings, "polski", "Polish");
76095
76298
  // The following strings have been translated by a machine translation service
76096
76299
  // Remove those strings that you have corrected manually
76097
76300
  // panelDynamicTabTextFormat: "Panel {panelIndex}" => "Panel {panelIndex}"
@@ -76222,8 +76425,7 @@ var portugueseSurveyStrings = {
76222
76425
  ok: "OKEY",
76223
76426
  cancel: "Cancelar"
76224
76427
  };
76225
- surveyLocalization.locales["pt"] = portugueseSurveyStrings;
76226
- surveyLocalization.localeNames["pt"] = "português";
76428
+ surveyLocalization.setupLocale("pt", portugueseSurveyStrings, "português", "Portuguese");
76227
76429
  // The following strings have been translated by a machine translation service
76228
76430
  // Remove those strings that you have corrected manually
76229
76431
  // panelDynamicTabTextFormat: "Panel {panelIndex}" => "Painel {panelIndex}"
@@ -76354,8 +76556,7 @@ var portugueseBrSurveyStrings = {
76354
76556
  ok: "OKEY",
76355
76557
  cancel: "Cancelar"
76356
76558
  };
76357
- surveyLocalization.locales["pt-br"] = portugueseBrSurveyStrings;
76358
- surveyLocalization.localeNames["pt-br"] = "português brasileiro";
76559
+ surveyLocalization.setupLocale("pt-br", portugueseBrSurveyStrings, "português brasileiro", "Brazilian Portuguese");
76359
76560
  // The following strings have been translated by a machine translation service
76360
76561
  // Remove those strings that you have corrected manually
76361
76562
  // pagePrevText: "Previous" => "Anterior"
@@ -76545,8 +76746,7 @@ var romanianSurveyStrings = {
76545
76746
  ok: "OK",
76546
76747
  cancel: "Anula"
76547
76748
  };
76548
- surveyLocalization.locales["ro"] = romanianSurveyStrings;
76549
- surveyLocalization.localeNames["ro"] = "română";
76749
+ surveyLocalization.setupLocale("ro", romanianSurveyStrings, "română", "Romanian");
76550
76750
  // The following strings have been translated by a machine translation service
76551
76751
  // Remove those strings that you have corrected manually
76552
76752
  // indexText: "{0} of {1}" => "{0} de {1}"
@@ -76689,8 +76889,7 @@ var russianSurveyStrings = {
76689
76889
  ok: "Хорошо",
76690
76890
  cancel: "Отмена"
76691
76891
  };
76692
- surveyLocalization.locales["ru"] = russianSurveyStrings;
76693
- surveyLocalization.localeNames["ru"] = "русский";
76892
+ surveyLocalization.setupLocale("ru", russianSurveyStrings, "русский", "Russian");
76694
76893
  // The following strings have been translated by a machine translation service
76695
76894
  // Remove those strings that you have corrected manually
76696
76895
  // panelDynamicTabTextFormat: "Panel {panelIndex}" => "Панель {panelIndex}"
@@ -76818,8 +77017,7 @@ var serbianStrings = {
76818
77017
  cancel: "Otkaži"
76819
77018
  };
76820
77019
  //Uncomment these two lines on creating a translation file. You should replace "en" and enStrings with your locale ("fr", "de" and so on) and your variable.
76821
- surveyLocalization.locales["rs"] = serbianStrings;
76822
- surveyLocalization.localeNames["rs"] = "Srpski";
77020
+ surveyLocalization.setupLocale("rs", serbianStrings, "srpski", "Serbian");
76823
77021
  // The following strings have been translated by a machine translation service
76824
77022
  // Remove those strings that you have corrected manually
76825
77023
  // indexText: "{0} of {1}" => "{0} {1}"
@@ -76956,8 +77154,7 @@ var simplifiedChineseSurveyStrings = {
76956
77154
  ok: "还行",
76957
77155
  cancel: "取消"
76958
77156
  };
76959
- surveyLocalization.locales["zh-cn"] = simplifiedChineseSurveyStrings;
76960
- surveyLocalization.localeNames["zh-cn"] = "简体中文";
77157
+ surveyLocalization.setupLocale("zh-cn", simplifiedChineseSurveyStrings, "简体中文", "Simplified Chinese ");
76961
77158
  // The following strings have been translated by a machine translation service
76962
77159
  // Remove those strings that you have corrected manually
76963
77160
  // indexText: "{0} of {1}" => "{1}{0}"
@@ -77094,8 +77291,7 @@ var slovakSurveyStrings = {
77094
77291
  ok: "OK",
77095
77292
  cancel: "Zrušiť"
77096
77293
  };
77097
- surveyLocalization.locales["sk"] = slovakSurveyStrings;
77098
- surveyLocalization.localeNames["sk"] = "slovak";
77294
+ surveyLocalization.setupLocale("sk", slovakSurveyStrings, "slovak", "Slovak");
77099
77295
  // The following strings have been translated by a machine translation service
77100
77296
  // Remove those strings that you have corrected manually
77101
77297
  // indexText: "{0} of {1}" => "{0} {1}"
@@ -77228,8 +77424,7 @@ var spanishSurveyStrings = {
77228
77424
  ok: "De acuerdo",
77229
77425
  cancel: "Cancelar"
77230
77426
  };
77231
- surveyLocalization.locales["es"] = spanishSurveyStrings;
77232
- surveyLocalization.localeNames["es"] = "español";
77427
+ surveyLocalization.setupLocale("es", spanishSurveyStrings, "español", "Spanish");
77233
77428
  // The following strings have been translated by a machine translation service
77234
77429
  // Remove those strings that you have corrected manually
77235
77430
  // panelDynamicTabTextFormat: "Panel {panelIndex}" => "Panel {panelIndex}"
@@ -77360,8 +77555,7 @@ var swahiliStrings = {
77360
77555
  ok: "Sawa kabisa",
77361
77556
  cancel: "Katisha"
77362
77557
  };
77363
- surveyLocalization.locales["sw"] = swahiliStrings;
77364
- surveyLocalization.localeNames["sw"] = "swahili";
77558
+ surveyLocalization.setupLocale("sw", swahiliStrings, "swahili", "Swahili");
77365
77559
  // The following strings have been translated by a machine translation service
77366
77560
  // Remove those strings that you have corrected manually
77367
77561
  // indexText: "{0} of {1}" => "{0} ya {1}"
@@ -77504,8 +77698,7 @@ var swedishSurveyStrings = {
77504
77698
  ok: "OKEJ",
77505
77699
  cancel: "Annullera"
77506
77700
  };
77507
- surveyLocalization.locales["sv"] = swedishSurveyStrings;
77508
- surveyLocalization.localeNames["sv"] = "svenska";
77701
+ surveyLocalization.setupLocale("sv", swedishSurveyStrings, "svenska", "Swedish");
77509
77702
  // The following strings have been translated by a machine translation service
77510
77703
  // Remove those strings that you have corrected manually
77511
77704
  // panelDynamicTabTextFormat: "Panel {panelIndex}" => "Panel {panelIndex}"
@@ -77618,8 +77811,7 @@ var tajikSurveyStrings = {
77618
77811
  // noEntriesText: "There are no entries yet.\nClick the button below to add a new entry.",
77619
77812
  // more: "More"
77620
77813
  };
77621
- surveyLocalization.locales["tg"] = tajikSurveyStrings;
77622
- surveyLocalization.localeNames["tg"] = "тоҷикӣ";
77814
+ surveyLocalization.setupLocale("tg", tajikSurveyStrings, "тоҷикӣ", "Tajik");
77623
77815
 
77624
77816
  // CONCATENATED MODULE: ./packages/survey-core/src/localization/thai.ts
77625
77817
 
@@ -77730,8 +77922,7 @@ var thaiStrings = {
77730
77922
  ok: "ตกลง, ได้",
77731
77923
  cancel: "ยกเลิก"
77732
77924
  };
77733
- surveyLocalization.locales["th"] = thaiStrings;
77734
- surveyLocalization.localeNames["th"] = "ไทย";
77925
+ surveyLocalization.setupLocale("th", thaiStrings, "ไทย", "Thai");
77735
77926
  // The following strings have been translated by a machine translation service
77736
77927
  // Remove those strings that you have corrected manually
77737
77928
  // indexText: "{0} of {1}" => "{0} of {1}"
@@ -77873,8 +78064,7 @@ var traditionalChineseSurveyStrings = {
77873
78064
  ok: "還行",
77874
78065
  cancel: "取消"
77875
78066
  };
77876
- surveyLocalization.locales["zh-tw"] = traditionalChineseSurveyStrings;
77877
- surveyLocalization.localeNames["zh-tw"] = "繁體中文";
78067
+ surveyLocalization.setupLocale("zh-tw", traditionalChineseSurveyStrings, "繁體中文", "Tranditional Chinese");
77878
78068
  // The following strings have been translated by a machine translation service
77879
78069
  // Remove those strings that you have corrected manually
77880
78070
  // previewText: "Preview" => "預覽"
@@ -78051,8 +78241,7 @@ var turkishSurveyStrings = {
78051
78241
  ok: "TAMAM",
78052
78242
  cancel: "İptal"
78053
78243
  };
78054
- surveyLocalization.locales["tr"] = turkishSurveyStrings;
78055
- surveyLocalization.localeNames["tr"] = "türkçe";
78244
+ surveyLocalization.setupLocale("tr", turkishSurveyStrings, "türkçe", "Turkish");
78056
78245
  // The following strings have been translated by a machine translation service
78057
78246
  // Remove those strings that you have corrected manually
78058
78247
  // takePhotoCaption: "Take Photo" => "Fotoğraf Çekin"
@@ -78176,8 +78365,7 @@ var ukrainianSurveyStrings = {
78176
78365
  ok: "ГАРАЗД",
78177
78366
  cancel: "Скасувати"
78178
78367
  };
78179
- surveyLocalization.locales["ua"] = ukrainianSurveyStrings;
78180
- surveyLocalization.localeNames["ua"] = "українська";
78368
+ surveyLocalization.setupLocale("ua", ukrainianSurveyStrings, "українська", "Ukrainian");
78181
78369
  // The following strings have been translated by a machine translation service
78182
78370
  // Remove those strings that you have corrected manually
78183
78371
  // indexText: "{0} of {1}" => "{0} {1}"
@@ -78320,8 +78508,7 @@ var vietnameseSurveyStrings = {
78320
78508
  cancel: "Hủy"
78321
78509
  };
78322
78510
  //Uncomment these two lines on creating a translation file. You should replace "en" and enStrings with your locale ("fr", "de" and so on) and your variable.
78323
- surveyLocalization.locales["vi"] = vietnameseSurveyStrings;
78324
- surveyLocalization.localeNames["vi"] = "Việt Nam";
78511
+ surveyLocalization.setupLocale("vi", vietnameseSurveyStrings, "việt nam", "Vietnamese");
78325
78512
  // The following strings have been translated by a machine translation service
78326
78513
  // Remove those strings that you have corrected manually
78327
78514
  // indexText: "{0} of {1}" => "{0} của {1}"
@@ -78463,8 +78650,7 @@ var welshSurveyStrings = {
78463
78650
  ok: "OCÊ",
78464
78651
  cancel: "Canslo"
78465
78652
  };
78466
- surveyLocalization.locales["cy"] = welshSurveyStrings;
78467
- surveyLocalization.localeNames["cy"] = "cymraeg";
78653
+ surveyLocalization.setupLocale("cy", welshSurveyStrings, "cymraeg", "Welsh");
78468
78654
  // The following strings have been translated by a machine translation service
78469
78655
  // Remove those strings that you have corrected manually
78470
78656
  // indexText: "{0} of {1}" => "{0} o {1}"
@@ -78606,8 +78792,7 @@ var teluguStrings = {
78606
78792
  ok: "సరే",
78607
78793
  cancel: "రద్దు"
78608
78794
  };
78609
- surveyLocalization.locales["tel"] = teluguStrings;
78610
- surveyLocalization.localeNames["tel"] = "Telugu";
78795
+ surveyLocalization.setupLocale("tel", teluguStrings, "telugu", "Telugu");
78611
78796
  // The following strings have been translated by a machine translation service
78612
78797
  // Remove those strings that you have corrected manually
78613
78798
  // noneItemText: "None" => "ఎవరు కాదు"
@@ -78753,8 +78938,7 @@ var philippinesStrings = {
78753
78938
  // Uncomment the lines below if you create a custom dictionary.
78754
78939
  // Replace "en" with a custom locale code (for example, "fr" or "de"),
78755
78940
  // Replace `englishStrings` with the name of the variable that contains the custom dictionary.
78756
- surveyLocalization.locales["fil"] = philippinesStrings;
78757
- surveyLocalization.localeNames["fil"] = "Filipino";
78941
+ surveyLocalization.setupLocale("fil", philippinesStrings, "filipino", "Filipino");
78758
78942
  // The following strings have been translated by a machine translation service
78759
78943
  // Remove those strings that you have corrected manually
78760
78944
  // tabTitlePlaceholder: "New Panel" => "Bagong Panel"
@@ -79823,7 +80007,7 @@ var action_bar_item_SurveyActionBarItem = /** @class */ (function (_super) {
79823
80007
  var title = this.item.tooltip || this.item.title;
79824
80008
  var buttonContent = this.renderButtonContent();
79825
80009
  var tabIndex = this.item.disableTabStop ? -1 : undefined;
79826
- var button = attachKey2click(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("button", { className: className, type: "button", disabled: this.item.disabled, onMouseDown: function () { return _this.item.doMouseDown(); }, onFocus: function (args) { return _this.item.doFocus(args); }, onClick: function (args) { return _this.item.doAction(args); }, title: title, tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
80010
+ var button = attachKey2click(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("button", { className: className, type: "button", disabled: this.item.disabled, onMouseDown: function (args) { return _this.item.doMouseDown(args); }, onFocus: function (args) { return _this.item.doFocus(args); }, onClick: function (args) { return _this.item.doAction(args); }, title: title, tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
79827
80011
  return button;
79828
80012
  };
79829
80013
  return SurveyActionBarItem;
@@ -81075,14 +81259,17 @@ var reactquestion_SurveyQuestionErrorCell = /** @class */ (function (_super) {
81075
81259
  SurveyQuestionErrorCell.prototype.update = function () {
81076
81260
  this.setState({ changed: this.state.changed + 1 });
81077
81261
  };
81262
+ SurveyQuestionErrorCell.prototype.getQuestionPropertiesToTrack = function () {
81263
+ return ["errors"];
81264
+ };
81078
81265
  SurveyQuestionErrorCell.prototype.registerCallback = function (question) {
81079
81266
  var _this = this;
81080
- question.registerFunctionOnPropertyValueChanged("errors", function () {
81267
+ question.registerFunctionOnPropertiesValueChanged(this.getQuestionPropertiesToTrack(), function () {
81081
81268
  _this.update();
81082
81269
  }, "__reactSubscription");
81083
81270
  };
81084
81271
  SurveyQuestionErrorCell.prototype.unRegisterCallback = function (question) {
81085
- question.unRegisterFunctionOnPropertyValueChanged("errors", "__reactSubscription");
81272
+ question.unRegisterFunctionOnPropertiesValueChanged(this.getQuestionPropertiesToTrack(), "__reactSubscription");
81086
81273
  };
81087
81274
  SurveyQuestionErrorCell.prototype.componentDidUpdate = function (prevProps) {
81088
81275
  if (prevProps.question && prevProps.question !== this.question) {
@@ -84839,6 +85026,11 @@ var reactquestion_matrixdropdownbase_SurveyQuestionMatrixTable = /** @class */ (
84839
85026
  if (cell.hasQuestion) {
84840
85027
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](reactquestion_matrixdropdownbase_SurveyQuestionMatrixDropdownCell, { key: key, cssClasses: cssClasses, cell: cell, creator: this.creator, reason: reason }));
84841
85028
  }
85029
+ if (cell.isErrorsCell) {
85030
+ if (cell.isErrorsCell) {
85031
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](reactquestion_matrixdropdownbase_SurveyQuestionMatrixDropdownErrorsCell, { cell: cell, key: key, keyValue: key, question: cell.question, creator: this.creator }));
85032
+ }
85033
+ }
84842
85034
  var calcReason = reason;
84843
85035
  if (!calcReason) {
84844
85036
  calcReason = cell.hasTitle ? "row-header" : "";
@@ -84886,11 +85078,6 @@ var reactquestion_matrixdropdownbase_SurveyQuestionMatrixTable = /** @class */ (
84886
85078
  if (cell.hasPanel) {
84887
85079
  cellContent = (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](panel_SurveyPanel, { key: cell.panel.id, element: cell.panel, survey: this.question.survey, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode, creator: this.creator }));
84888
85080
  }
84889
- if (cell.isErrorsCell) {
84890
- if (cell.isErrorsCell) {
84891
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](reactquestion_SurveyQuestionErrorCell, { question: cell.question, creator: this.creator }));
84892
- }
84893
- }
84894
85081
  if (!cellContent)
84895
85082
  return null;
84896
85083
  var readyCell = (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](external_root_React_commonjs2_react_commonjs_react_amd_react_["Fragment"], null, cellContent));
@@ -84974,6 +85161,35 @@ var reactquestion_matrixdropdownbase_SurveyQuestionMatrixActionsCell = /** @clas
84974
85161
  };
84975
85162
  return SurveyQuestionMatrixActionsCell;
84976
85163
  }(ReactSurveyElement));
85164
+ var reactquestion_matrixdropdownbase_SurveyQuestionMatrixDropdownErrorsCell = /** @class */ (function (_super) {
85165
+ reactquestion_matrixdropdownbase_extends(SurveyQuestionMatrixDropdownErrorsCell, _super);
85166
+ function SurveyQuestionMatrixDropdownErrorsCell(props) {
85167
+ return _super.call(this, props) || this;
85168
+ }
85169
+ Object.defineProperty(SurveyQuestionMatrixDropdownErrorsCell.prototype, "key", {
85170
+ get: function () {
85171
+ return this.props.keyValue;
85172
+ },
85173
+ enumerable: false,
85174
+ configurable: true
85175
+ });
85176
+ Object.defineProperty(SurveyQuestionMatrixDropdownErrorsCell.prototype, "cell", {
85177
+ get: function () {
85178
+ return this.props.cell;
85179
+ },
85180
+ enumerable: false,
85181
+ configurable: true
85182
+ });
85183
+ SurveyQuestionMatrixDropdownErrorsCell.prototype.render = function () {
85184
+ if (!this.cell.isVisible)
85185
+ return null;
85186
+ return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("td", { className: this.cell.className, key: this.key, colSpan: this.cell.colSpans, title: this.cell.getTitle() }, _super.prototype.render.call(this));
85187
+ };
85188
+ SurveyQuestionMatrixDropdownErrorsCell.prototype.getQuestionPropertiesToTrack = function () {
85189
+ return _super.prototype.getQuestionPropertiesToTrack.call(this).concat(["visible"]);
85190
+ };
85191
+ return SurveyQuestionMatrixDropdownErrorsCell;
85192
+ }(reactquestion_SurveyQuestionErrorCell));
84977
85193
  ReactElementFactory.Instance.registerElement("sv-matrixdynamic-actions-cell", function (props) {
84978
85194
  return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](reactquestion_matrixdropdownbase_SurveyQuestionMatrixActionsCell, props);
84979
85195
  });
@@ -85071,6 +85287,12 @@ var reactquestion_matrixdropdownbase_SurveyQuestionMatrixDropdownCell = /** @cla
85071
85287
  SurveyQuestionMatrixDropdownCell.prototype.getHeaderText = function () {
85072
85288
  return this.cell.headers;
85073
85289
  };
85290
+ SurveyQuestionMatrixDropdownCell.prototype.renderElement = function () {
85291
+ if (!this.cell.isVisible) {
85292
+ return null;
85293
+ }
85294
+ return _super.prototype.renderElement.call(this);
85295
+ };
85074
85296
  SurveyQuestionMatrixDropdownCell.prototype.renderCellContent = function () {
85075
85297
  var content = _super.prototype.renderCellContent.call(this);
85076
85298
  var responsiveTitle = this.cell.showResponsiveTitle ? (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", { className: this.cell.responsiveTitleCss }, this.renderLocString(this.cell.responsiveLocTitle))) : null;
@@ -85874,7 +86096,7 @@ var list_item_ListItem = /** @class */ (function (_super) {
85874
86096
  paddingInlineStart: this.model.getItemIndent(this.item)
85875
86097
  };
85876
86098
  var className = this.model.getItemClass(this.item);
85877
- var itemContent = this.item.component || "sv-list-item-content";
86099
+ var itemContent = this.item.component || this.model.itemComponent;
85878
86100
  var newElement = ReactElementFactory.Instance.createElement(itemContent, { item: this.item, key: this.item.id, model: this.model });
85879
86101
  var contentWrap = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { style: contentWrapStyle, className: this.model.cssClasses.itemBody, title: this.item.locTitle.calculatedText, onMouseOver: function (event) { _this.model.onItemHover(_this.item); }, onMouseLeave: function (event) { _this.model.onItemLeave(_this.item); } }, newElement);
85880
86102
  var separator = this.item.needSeparator ? external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.model.cssClasses.itemSeparator }) : null;