survey-react 1.9.83 → 1.9.84

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.9.83
2
+ * surveyjs - Survey JavaScript library v1.9.84
3
3
  * Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1908,7 +1908,11 @@ var ActionContainer = /** @class */ (function (_super) {
1908
1908
  };
1909
1909
  ActionContainer.prototype.locStrsChanged = function () {
1910
1910
  _super.prototype.locStrsChanged.call(this);
1911
- this.actions.forEach(function (item) { return item.locStrsChanged(); });
1911
+ this.actions.forEach(function (item) {
1912
+ if (item.locTitle)
1913
+ item.locTitle.strChanged();
1914
+ item.locStrsChanged();
1915
+ });
1912
1916
  };
1913
1917
  ActionContainer.prototype.raiseUpdate = function (isResetInitialized) {
1914
1918
  this.isEmpty = !this.actions.some(function (action) { return action.visible; });
@@ -2016,6 +2020,11 @@ var ActionContainer = /** @class */ (function (_super) {
2016
2020
  }
2017
2021
  return null;
2018
2022
  };
2023
+ ActionContainer.prototype.dispose = function () {
2024
+ _super.prototype.dispose.call(this);
2025
+ this.actions.forEach(function (action) { return action.dispose(); });
2026
+ this.actions.length = 0;
2027
+ };
2019
2028
  __decorate([
2020
2029
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["propertyArray"])({
2021
2030
  onSet: function (_, target) {
@@ -7415,7 +7424,7 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
7415
7424
  _super.prototype.ghostPositionChanged.call(this);
7416
7425
  };
7417
7426
  DragDropMatrixRows.prototype.doClear = function () {
7418
- this.parentElement["resetRenderedTable"]();
7427
+ this.parentElement.clearOnDrop();
7419
7428
  this.fromIndex = null;
7420
7429
  this.toIndex = null;
7421
7430
  };
@@ -8524,6 +8533,15 @@ var DropdownListModel = /** @class */ (function (_super) {
8524
8533
  this.inputString = null;
8525
8534
  }
8526
8535
  };
8536
+ DropdownListModel.prototype.dispose = function () {
8537
+ _super.prototype.dispose.call(this);
8538
+ if (!!this.listModel) {
8539
+ this.listModel.dispose();
8540
+ }
8541
+ if (!!this.popupModel) {
8542
+ this.popupModel.dispose();
8543
+ }
8544
+ };
8527
8545
  DropdownListModel.prototype.scrollToFocusedItem = function () {
8528
8546
  this.listModel.scrollToFocusedItem();
8529
8547
  };
@@ -9532,7 +9550,7 @@ __webpack_require__.r(__webpack_exports__);
9532
9550
  // import "../../main.scss";
9533
9551
  //import "../../modern.scss";
9534
9552
  var Version;
9535
- Version = "" + "1.9.83";
9553
+ Version = "" + "1.9.84";
9536
9554
  function checkLibraryVersion(ver, libraryName) {
9537
9555
  if (Version != ver) {
9538
9556
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -16564,7 +16582,7 @@ var Helpers = /** @class */ (function () {
16564
16582
  };
16565
16583
  Helpers.convertValToQuestionVal = function (val, inputType) {
16566
16584
  if (val instanceof Date) {
16567
- if (inputType === "datetime")
16585
+ if (inputType === "datetime-local")
16568
16586
  return Helpers.convertDateTimeToString(val);
16569
16587
  return Helpers.convertDateToString(val);
16570
16588
  }
@@ -17651,6 +17669,9 @@ var ItemValue = /** @class */ (function (_super) {
17651
17669
  __decorate([
17652
17670
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
17653
17671
  ], ItemValue.prototype, "selectedValue", void 0);
17672
+ __decorate([
17673
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
17674
+ ], ItemValue.prototype, "icon", void 0);
17654
17675
  return ItemValue;
17655
17676
  }(_actions_action__WEBPACK_IMPORTED_MODULE_6__["BaseAction"]));
17656
17677
 
@@ -17689,7 +17710,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("itemvalue", [
17689
17710
  visibleIf: function (obj) {
17690
17711
  return !obj || obj.ownerPropertyName !== "rateValues";
17691
17712
  },
17692
- },
17713
+ }
17693
17714
  ], function (value) { return new ItemValue(value); });
17694
17715
 
17695
17716
 
@@ -19434,6 +19455,9 @@ var JsonObject = /** @class */ (function () {
19434
19455
  if (!!value[i].name) {
19435
19456
  newValue.newObj.name = value[i].name;
19436
19457
  }
19458
+ if (!!value[i].valueName) {
19459
+ newValue.newObj.valueName = value[i].valueName.toString();
19460
+ }
19437
19461
  result.push(newValue.newObj);
19438
19462
  this.toObjectCore(value[i], newValue.newObj);
19439
19463
  }
@@ -19792,6 +19816,12 @@ var ListModel = /** @class */ (function (_super) {
19792
19816
  this.scrollableContainer.removeEventListener("scroll", this.scrollHandler);
19793
19817
  }
19794
19818
  };
19819
+ ListModel.prototype.dispose = function () {
19820
+ _super.prototype.dispose.call(this);
19821
+ if (!!this.loadingIndicatorValue) {
19822
+ this.loadingIndicatorValue.dispose();
19823
+ }
19824
+ };
19795
19825
  ListModel.INDENT = 16;
19796
19826
  ListModel.MINELEMENTCOUNT = 10;
19797
19827
  __decorate([
@@ -21291,7 +21321,7 @@ var englishStrings = {
21291
21321
  progressText: "Page {0} of {1}",
21292
21322
  indexText: "{0} of {1}",
21293
21323
  panelDynamicProgressText: "{0} of {1}",
21294
- panelDynamicTabTextFormat: "Panel {0}",
21324
+ panelDynamicTabTextFormat: "Panel {panelIndex}",
21295
21325
  questionsProgressText: "Answered {0}/{1} questions",
21296
21326
  emptySurvey: "The survey doesn't contain visible pages or questions.",
21297
21327
  completingSurvey: "Thank you for completing the survey",
@@ -26673,7 +26703,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("page", [
26673
26703
  {
26674
26704
  name: "navigationTitle",
26675
26705
  visibleIf: function (obj) {
26676
- return !!obj.survey && obj.survey.progressBarType === "buttons";
26706
+ return !!obj.survey && (obj.survey.progressBarType === "buttons" || obj.survey.showTOC);
26677
26707
  },
26678
26708
  serializationProperty: "locNavigationTitle",
26679
26709
  },
@@ -31051,8 +31081,9 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
31051
31081
  _super.prototype.dispose.call(this);
31052
31082
  this.unmountPopupContainer();
31053
31083
  this.container = undefined;
31054
- this.model.onVisibilityChanged.clear();
31055
- this.model.onRecalculatePosition.clear();
31084
+ if (!!this.footerToolbarValue) {
31085
+ this.footerToolbarValue.dispose();
31086
+ }
31056
31087
  };
31057
31088
  PopupBaseViewModel.prototype.initializePopupContainer = function () {
31058
31089
  if (!this.createdContainer) {
@@ -31380,7 +31411,7 @@ var Question = /** @class */ (function (_super) {
31380
31411
  _this.registerPropertyChangedHandlers(["showCommentArea", "showOtherItem"], function () {
31381
31412
  _this.initCommentFromSurvey();
31382
31413
  });
31383
- _this.registerFunctionOnPropertiesValueChanged(["no"], function () {
31414
+ _this.registerFunctionOnPropertiesValueChanged(["no", "readOnly"], function () {
31384
31415
  _this.updateQuestionCss();
31385
31416
  });
31386
31417
  _this.registerPropertyChangedHandlers(["isMobile"], function () { _this.onMobileChanged(); });
@@ -31611,11 +31642,16 @@ var Question = /** @class */ (function (_super) {
31611
31642
  get: function () {
31612
31643
  if (this.survey && this.survey.areEmptyElementsHidden && this.isEmpty())
31613
31644
  return false;
31614
- return this.visible || this.areInvisibleElementsShowing;
31645
+ if (this.areInvisibleElementsShowing)
31646
+ return true;
31647
+ return this.isVisibleCore();
31615
31648
  },
31616
31649
  enumerable: false,
31617
31650
  configurable: true
31618
31651
  });
31652
+ Question.prototype.isVisibleCore = function () {
31653
+ return this.visible;
31654
+ };
31619
31655
  Object.defineProperty(Question.prototype, "visibleIndex", {
31620
31656
  /**
31621
31657
  * Returns the visible index of the question in the survey. It can be from 0 to all visible questions count - 1
@@ -34185,7 +34221,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34185
34221
  _this.onVisibleChoicesChanged();
34186
34222
  });
34187
34223
  _this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
34188
- _this.updateVisibilityBasedOnChoices();
34224
+ _this.onVisibleChanged();
34189
34225
  });
34190
34226
  _this.createNewArray("visibleChoices");
34191
34227
  _this.setNewRestfulProperty();
@@ -34233,8 +34269,11 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34233
34269
  QuestionSelectBase.prototype.getItemValueType = function () {
34234
34270
  return "itemvalue";
34235
34271
  };
34236
- QuestionSelectBase.prototype.createItemValue = function (value) {
34237
- return _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].createClass(this.getItemValueType(), value);
34272
+ QuestionSelectBase.prototype.createItemValue = function (value, text) {
34273
+ var res = _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].createClass(this.getItemValueType(), value);
34274
+ if (!!text)
34275
+ res.text = text;
34276
+ return res;
34238
34277
  };
34239
34278
  QuestionSelectBase.prototype.supportGoNextPageError = function () {
34240
34279
  return !this.isOtherSelected || !!this.otherValue;
@@ -34499,7 +34538,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34499
34538
  if (!itemValue && !selectedItemValues) {
34500
34539
  this.updateSelectedItemValues();
34501
34540
  }
34502
- return itemValue || selectedItemValues || (this.isOtherSelected ? this.otherItem : new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](this.value));
34541
+ return itemValue || selectedItemValues || (this.isOtherSelected ? this.otherItem : this.createItemValue(this.value));
34503
34542
  };
34504
34543
  QuestionSelectBase.prototype.onGetSingleSelectedItem = function (selectedItemByValue) { };
34505
34544
  QuestionSelectBase.prototype.setConditionalChoicesRunner = function () {
@@ -34722,10 +34761,10 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34722
34761
  if (!displayValues || !displayValues.length)
34723
34762
  return;
34724
34763
  if (IsMultipleValue_1) {
34725
- _this.selectedItemValues = displayValues.map(function (displayValue, index) { return new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](_this.value[index], displayValue); });
34764
+ _this.selectedItemValues = displayValues.map(function (displayValue, index) { return _this.createItemValue(_this.value[index], displayValue); });
34726
34765
  }
34727
34766
  else {
34728
- _this.selectedItemValues = new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](_this.value, displayValues[0]);
34767
+ _this.selectedItemValues = _this.createItemValue(_this.value, displayValues[0]);
34729
34768
  }
34730
34769
  }
34731
34770
  });
@@ -35057,7 +35096,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
35057
35096
  QuestionSelectBase.prototype.addToVisibleChoices = function (items, isAddAll) {
35058
35097
  if (isAddAll) {
35059
35098
  if (!this.newItemValue) {
35060
- this.newItemValue = new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"]("newitem"); //TODO
35099
+ this.newItemValue = this.createItemValue("newitem"); //TODO
35061
35100
  }
35062
35101
  if (this.canShowOptionItem(this.newItemValue, isAddAll, false)) {
35063
35102
  items.push(this.newItemValue);
@@ -35201,12 +35240,14 @@ var QuestionSelectBase = /** @class */ (function (_super) {
35201
35240
  }
35202
35241
  }
35203
35242
  if (this.choicesFromQuestionMode === "selected" && question.isOtherSelected && !!question.comment) {
35204
- res.push(new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](question.otherItem.value, question.comment));
35243
+ res.push(this.createItemValue(question.otherItem.value, question.comment));
35205
35244
  }
35206
35245
  return res;
35207
35246
  };
35208
35247
  QuestionSelectBase.prototype.copyChoiceItem = function (item) {
35209
- return new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](item.value, item.text);
35248
+ var res = this.createItemValue(item.value);
35249
+ res.setData(item);
35250
+ return res;
35210
35251
  };
35211
35252
  Object.defineProperty(QuestionSelectBase.prototype, "hasActiveChoices", {
35212
35253
  get: function () {
@@ -35473,17 +35514,18 @@ var QuestionSelectBase = /** @class */ (function (_super) {
35473
35514
  if (this.isLoadingFromJson)
35474
35515
  return;
35475
35516
  this.updateVisibleChoices();
35476
- this.updateVisibilityBasedOnChoices();
35517
+ this.onVisibleChanged();
35477
35518
  if (!!this.visibleChoicesChangedCallback) {
35478
35519
  this.visibleChoicesChangedCallback();
35479
35520
  }
35480
35521
  this.updateChoicesDependedQuestions();
35481
35522
  };
35482
- QuestionSelectBase.prototype.updateVisibilityBasedOnChoices = function () {
35483
- if (this.hideIfChoicesEmpty) {
35484
- var filteredChoices = this.getFilteredChoices();
35485
- this.visible = !filteredChoices || filteredChoices.length > 0;
35486
- }
35523
+ QuestionSelectBase.prototype.isVisibleCore = function () {
35524
+ var superVal = _super.prototype.isVisibleCore.call(this);
35525
+ if (!this.hideIfChoicesEmpty || !superVal)
35526
+ return superVal;
35527
+ var filteredChoices = this.getFilteredChoices();
35528
+ return !filteredChoices || filteredChoices.length > 0;
35487
35529
  };
35488
35530
  QuestionSelectBase.prototype.sortVisibleChoices = function (array) {
35489
35531
  var order = this.choicesOrder.toLowerCase();
@@ -38711,6 +38753,12 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
38711
38753
  event.stopPropagation();
38712
38754
  }
38713
38755
  };
38756
+ QuestionDropdownModel.prototype.dispose = function () {
38757
+ _super.prototype.dispose.call(this);
38758
+ if (!!this.dropdownListModelValue) {
38759
+ this.dropdownListModelValue.dispose();
38760
+ }
38761
+ };
38714
38762
  __decorate([
38715
38763
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
38716
38764
  ], QuestionDropdownModel.prototype, "allowClear", void 0);
@@ -43172,7 +43220,8 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
43172
43220
  this.resetRenderedTable();
43173
43221
  }
43174
43222
  else {
43175
- this.renderedTable.onAddedRow();
43223
+ var index = this.visibleRows.length - 1;
43224
+ this.renderedTable.onAddedRow(this.visibleRows[index], index);
43176
43225
  }
43177
43226
  };
43178
43227
  QuestionMatrixDropdownModelBase.prototype.onEndRowRemoving = function (row) {
@@ -43215,6 +43264,13 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
43215
43264
  }
43216
43265
  _super.prototype.clearGeneratedRows.call(this);
43217
43266
  };
43267
+ Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "isRendredTableCreated", {
43268
+ get: function () {
43269
+ return !!this.renderedTableValue;
43270
+ },
43271
+ enumerable: false,
43272
+ configurable: true
43273
+ });
43218
43274
  Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "renderedTable", {
43219
43275
  get: function () {
43220
43276
  if (!this.renderedTableValue) {
@@ -45768,14 +45824,31 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
45768
45824
  this.setPropertyValue("showAddRowOnTop", showAddRowOnTop);
45769
45825
  this.setPropertyValue("showAddRowOnBottom", showAddRowOnBottom);
45770
45826
  };
45771
- QuestionMatrixDropdownRenderedTable.prototype.onAddedRow = function () {
45827
+ QuestionMatrixDropdownRenderedTable.prototype.onAddedRow = function (row, index) {
45772
45828
  if (this.getRenderedDataRowCount() >= this.matrix.visibleRows.length)
45773
45829
  return;
45774
- var row = this.matrix.visibleRows[this.matrix.visibleRows.length - 1];
45775
- this.rowsActions.push(this.buildRowActions(row));
45776
- this.addHorizontalRow(this.rows, row, this.matrix.visibleRows.length == 1 && !this.matrix.showHeader);
45830
+ var rowIndex = this.getRenderedRowIndexByIndex(index);
45831
+ this.rowsActions.splice(index, 0, this.buildRowActions(row));
45832
+ this.addHorizontalRow(this.rows, row, this.matrix.visibleRows.length == 1 && !this.matrix.showHeader, rowIndex);
45777
45833
  this.updateShowTableAndAddRow();
45778
45834
  };
45835
+ QuestionMatrixDropdownRenderedTable.prototype.getRenderedRowIndexByIndex = function (index) {
45836
+ var res = 0;
45837
+ var dataRowIndex = 0;
45838
+ for (var i = 0; i < this.rows.length; i++) {
45839
+ if (dataRowIndex === index) {
45840
+ if (this.rows[i].isDetailRow)
45841
+ res++;
45842
+ break;
45843
+ }
45844
+ res++;
45845
+ if (!this.rows[i].isDetailRow)
45846
+ dataRowIndex++;
45847
+ }
45848
+ if (dataRowIndex < index)
45849
+ return this.rows.length;
45850
+ return res;
45851
+ };
45779
45852
  QuestionMatrixDropdownRenderedTable.prototype.getRenderedDataRowCount = function () {
45780
45853
  var res = 0;
45781
45854
  for (var i = 0; i < this.rows.length; i++) {
@@ -45939,12 +46012,16 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
45939
46012
  }
45940
46013
  return renderedRows;
45941
46014
  };
45942
- QuestionMatrixDropdownRenderedTable.prototype.addHorizontalRow = function (renderedRows, row, useAsHeader) {
46015
+ QuestionMatrixDropdownRenderedTable.prototype.addHorizontalRow = function (renderedRows, row, useAsHeader, index) {
46016
+ if (index === void 0) { index = -1; }
45943
46017
  var renderedRow = this.createHorizontalRow(row, useAsHeader);
45944
46018
  renderedRow.row = row;
45945
- renderedRows.push(renderedRow);
46019
+ if (index < 0) {
46020
+ index = renderedRows.length;
46021
+ }
46022
+ renderedRows.splice(index, 0, renderedRow);
45946
46023
  if (row.isDetailPanelShowing) {
45947
- renderedRows.push(this.createDetailPanelRow(row, renderedRow));
46024
+ renderedRows.splice(index + 1, 0, this.createDetailPanelRow(row, renderedRow));
45948
46025
  }
45949
46026
  };
45950
46027
  QuestionMatrixDropdownRenderedTable.prototype.getRowDragCell = function (rowIndex) {
@@ -46421,17 +46498,6 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
46421
46498
  _this.startDragMatrixRow = function (event, currentTarget) {
46422
46499
  _this.dragDropMatrixRows.startDrag(event, _this.draggedRow, _this, event.target);
46423
46500
  };
46424
- _this.moveRowByIndex = function (fromIndex, toIndex) {
46425
- var value = _this.createNewValue();
46426
- if (!value)
46427
- return;
46428
- var movableRow = value[fromIndex];
46429
- if (!movableRow)
46430
- return;
46431
- value.splice(fromIndex, 1);
46432
- value.splice(toIndex, 0, movableRow);
46433
- _this.value = value;
46434
- };
46435
46501
  _this.createLocalizableString("confirmDeleteText", _this, false, "confirmDelete");
46436
46502
  var locAddRowText = _this.createLocalizableString("addRowText", _this);
46437
46503
  locAddRowText.onGetTextCallback = function (text) {
@@ -46561,6 +46627,20 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
46561
46627
  }
46562
46628
  this.value = newValue;
46563
46629
  };
46630
+ QuestionMatrixDynamicModel.prototype.moveRowByIndex = function (fromIndex, toIndex) {
46631
+ var value = this.createNewValue();
46632
+ if (!Array.isArray(value) && Math.max(fromIndex, toIndex) >= value.length)
46633
+ return;
46634
+ var movableRow = value[fromIndex];
46635
+ value.splice(fromIndex, 1);
46636
+ value.splice(toIndex, 0, movableRow);
46637
+ this.value = value;
46638
+ };
46639
+ QuestionMatrixDynamicModel.prototype.clearOnDrop = function () {
46640
+ if (!this.isEditingSurveyElement) {
46641
+ this.resetRenderedTable();
46642
+ }
46643
+ };
46564
46644
  Object.defineProperty(QuestionMatrixDynamicModel.prototype, "rowCount", {
46565
46645
  /**
46566
46646
  * The number of rows in the matrix.
@@ -47204,6 +47284,51 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
47204
47284
  QuestionMatrixDynamicModel.prototype.createMatrixRow = function (value) {
47205
47285
  return new MatrixDynamicRowModel(this.rowCounter++, this, value);
47206
47286
  };
47287
+ QuestionMatrixDynamicModel.prototype.getInsertedDeletedIndex = function (rows, val) {
47288
+ var len = Math.min(rows.length, val.length);
47289
+ for (var i = 0; i < len; i++) {
47290
+ if (val[i] !== rows[i].editingObj)
47291
+ return i;
47292
+ }
47293
+ return len;
47294
+ };
47295
+ QuestionMatrixDynamicModel.prototype.isEditingObjectValueChanged = function () {
47296
+ var val = this.value;
47297
+ if (!this.generatedVisibleRows || !this.isValueSurveyElement(val))
47298
+ return false;
47299
+ var lastDelRow = this.lastDeletedRow;
47300
+ this.lastDeletedRow = undefined;
47301
+ var rows = this.generatedVisibleRows;
47302
+ if (!Array.isArray(val) || Math.abs(rows.length - val.length) > 1)
47303
+ return false;
47304
+ var index = this.getInsertedDeletedIndex(rows, val);
47305
+ if (rows.length > val.length) {
47306
+ this.lastDeletedRow = rows[index];
47307
+ var row = rows[index];
47308
+ rows.splice(index, 1);
47309
+ if (this.isRendredTableCreated) {
47310
+ this.renderedTable.onRemovedRow(row);
47311
+ }
47312
+ }
47313
+ else {
47314
+ var newRow = undefined;
47315
+ if (!!lastDelRow && lastDelRow.editingObj === val[index]) {
47316
+ newRow = lastDelRow;
47317
+ }
47318
+ else {
47319
+ newRow = this.createMatrixRow(val[index]);
47320
+ }
47321
+ rows.splice(index, 0, newRow);
47322
+ if (!lastDelRow) {
47323
+ this.onMatrixRowCreated(newRow);
47324
+ }
47325
+ if (this.isRendredTableCreated) {
47326
+ this.renderedTable.onAddedRow(newRow, index);
47327
+ }
47328
+ }
47329
+ this.setPropertyValueDirectly("rowCount", val.length);
47330
+ return true;
47331
+ };
47207
47332
  QuestionMatrixDynamicModel.prototype.onBeforeValueChanged = function (val) {
47208
47333
  if (!val || !Array.isArray(val))
47209
47334
  return;
@@ -47212,6 +47337,8 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
47212
47337
  return;
47213
47338
  if (!this.setRowCountValueFromData && newRowCount < this.initialRowCount)
47214
47339
  return;
47340
+ if (this.isEditingObjectValueChanged())
47341
+ return;
47215
47342
  this.setRowCountValueFromData = true;
47216
47343
  this.rowCountValue = newRowCount;
47217
47344
  if (!this.generatedVisibleRows)
@@ -48200,17 +48327,18 @@ __webpack_require__.r(__webpack_exports__);
48200
48327
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionPanelDynamicModel", function() { return QuestionPanelDynamicModel; });
48201
48328
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
48202
48329
  /* harmony import */ var _survey_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./survey-element */ "./src/survey-element.ts");
48203
- /* harmony import */ var _textPreProcessor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./textPreProcessor */ "./src/textPreProcessor.ts");
48204
- /* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./question */ "./src/question.ts");
48205
- /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
48206
- /* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
48207
- /* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./error */ "./src/error.ts");
48208
- /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
48209
- /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
48210
- /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
48211
- /* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./actions/action */ "./src/actions/action.ts");
48212
- /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./base */ "./src/base.ts");
48213
- /* harmony import */ var _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./actions/adaptive-container */ "./src/actions/adaptive-container.ts");
48330
+ /* harmony import */ var _localizablestring__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./localizablestring */ "./src/localizablestring.ts");
48331
+ /* harmony import */ var _textPreProcessor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./textPreProcessor */ "./src/textPreProcessor.ts");
48332
+ /* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./question */ "./src/question.ts");
48333
+ /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
48334
+ /* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
48335
+ /* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./error */ "./src/error.ts");
48336
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
48337
+ /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
48338
+ /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
48339
+ /* harmony import */ var _actions_action__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./actions/action */ "./src/actions/action.ts");
48340
+ /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./base */ "./src/base.ts");
48341
+ /* harmony import */ var _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./actions/adaptive-container */ "./src/actions/adaptive-container.ts");
48214
48342
  var __extends = (undefined && undefined.__extends) || (function () {
48215
48343
  var extendStatics = function (d, b) {
48216
48344
  extendStatics = Object.setPrototypeOf ||
@@ -48250,6 +48378,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
48250
48378
 
48251
48379
 
48252
48380
 
48381
+
48253
48382
  var QuestionPanelDynamicItemTextProcessor = /** @class */ (function (_super) {
48254
48383
  __extends(QuestionPanelDynamicItemTextProcessor, _super);
48255
48384
  function QuestionPanelDynamicItemTextProcessor(data, panelItem, variableName) {
@@ -48325,7 +48454,7 @@ var QuestionPanelDynamicItemTextProcessor = /** @class */ (function (_super) {
48325
48454
  return false;
48326
48455
  };
48327
48456
  return QuestionPanelDynamicItemTextProcessor;
48328
- }(_textPreProcessor__WEBPACK_IMPORTED_MODULE_2__["QuestionTextProcessor"]));
48457
+ }(_textPreProcessor__WEBPACK_IMPORTED_MODULE_3__["QuestionTextProcessor"]));
48329
48458
  var QuestionPanelDynamicItem = /** @class */ (function () {
48330
48459
  function QuestionPanelDynamicItem(data, panel) {
48331
48460
  this.data = data;
@@ -48365,11 +48494,11 @@ var QuestionPanelDynamicItem = /** @class */ (function () {
48365
48494
  };
48366
48495
  QuestionPanelDynamicItem.prototype.setVariable = function (name, newValue) { };
48367
48496
  QuestionPanelDynamicItem.prototype.getComment = function (name) {
48368
- var result = this.getValue(name + _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].commentSuffix);
48497
+ var result = this.getValue(name + _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].commentSuffix);
48369
48498
  return result ? result : "";
48370
48499
  };
48371
48500
  QuestionPanelDynamicItem.prototype.setComment = function (name, newValue, locNotification) {
48372
- this.setValue(name + _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].commentSuffix, newValue);
48501
+ this.setValue(name + _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].commentSuffix, newValue);
48373
48502
  };
48374
48503
  QuestionPanelDynamicItem.prototype.findQuestionByName = function (name) {
48375
48504
  if (!name)
@@ -48394,7 +48523,9 @@ var QuestionPanelDynamicItem = /** @class */ (function () {
48394
48523
  }
48395
48524
  values[QuestionPanelDynamicItem.ItemVariableName] = this.getAllValues();
48396
48525
  if (!!this.data) {
48397
- values[QuestionPanelDynamicItem.IndexVariableName.toLowerCase()] = this.data.getItemIndex(this);
48526
+ var indexStr = QuestionPanelDynamicItem.IndexVariableName;
48527
+ delete values[indexStr];
48528
+ values[indexStr.toLowerCase()] = this.data.getItemIndex(this);
48398
48529
  var q = this.data;
48399
48530
  if (!!q && !!q.parentQuestion && !!q.parent) {
48400
48531
  values[QuestionPanelDynamicItem.ParentItemVariableName] = q.parent.getValue();
@@ -48441,7 +48572,7 @@ var QuestionPanelDynamicTemplateSurveyImpl = /** @class */ (function () {
48441
48572
  /**
48442
48573
  * A class that describes the Dynamic Panel question type.
48443
48574
  *
48444
- * Dynamic Panel allows respondents to add panels based on a template panel and delete them. Specify the [`templateElements`](https://surveyjs.io/form-library/documentation/questionpaneldynamicmodel#templateElements) property to configure template panel elements.
48575
+ * Dynamic Panel allows respondents to add panels based on a panel template and delete them. Specify the [`templateElements`](https://surveyjs.io/form-library/documentation/questionpaneldynamicmodel#templateElements) property to configure panel template elements.
48445
48576
  *
48446
48577
  * [View Demo](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/ (linkStyle))
48447
48578
  */
@@ -48449,7 +48580,6 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48449
48580
  __extends(QuestionPanelDynamicModel, _super);
48450
48581
  function QuestionPanelDynamicModel(name) {
48451
48582
  var _this = _super.call(this, name) || this;
48452
- _this.loadingPanelCount = 0;
48453
48583
  _this.isAddingNewPanels = false;
48454
48584
  _this.onReadyChangedCallback = function () {
48455
48585
  _this.recalculateIsReadyValue();
@@ -48473,6 +48603,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48473
48603
  _this.createLocalizableString("panelPrevText", _this, false, "pagePrevText");
48474
48604
  _this.createLocalizableString("panelNextText", _this, false, "pageNextText");
48475
48605
  _this.createLocalizableString("noEntriesText", _this, false, "noEntriesText");
48606
+ _this.createLocalizableString("templateTabTitle", _this, true, "panelDynamicTabTextFormat");
48476
48607
  _this.registerPropertyChangedHandlers(["panelsState"], function () {
48477
48608
  _this.setPanelsState();
48478
48609
  });
@@ -48525,7 +48656,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48525
48656
  QuestionPanelDynamicModel.prototype.onTemplateElementPropertyChanged = function (element, options) {
48526
48657
  if (this.isLoadingFromJson || this.useTemplatePanel || this.panels.length == 0)
48527
48658
  return;
48528
- var property = _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].findProperty(element.getType(), options.name);
48659
+ var property = _jsonobject__WEBPACK_IMPORTED_MODULE_5__["Serializer"].findProperty(element.getType(), options.name);
48529
48660
  if (!property)
48530
48661
  return;
48531
48662
  var panels = this.panels;
@@ -48588,7 +48719,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48588
48719
  };
48589
48720
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateElements", {
48590
48721
  /**
48591
- * An array of questions and panels included in the template panel.
48722
+ * An array of questions and panels included in a panel template.
48592
48723
  * @see template
48593
48724
  * @see panels
48594
48725
  * @see panelCount
@@ -48601,7 +48732,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48601
48732
  });
48602
48733
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateTitle", {
48603
48734
  /**
48604
- * A title for the template panel.
48735
+ * A template for panel titles.
48605
48736
  * @see template
48606
48737
  * @see templateDescription
48607
48738
  * @see templateElements
@@ -48624,9 +48755,31 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48624
48755
  enumerable: false,
48625
48756
  configurable: true
48626
48757
  });
48758
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateTabTitle", {
48759
+ /**
48760
+ * A template for tab titles. Applies when [`renderMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#renderMode) is `"tab"`.
48761
+ * @see templateTitle
48762
+ * @see renderMode
48763
+ */
48764
+ get: function () {
48765
+ return this.locTemplateTabTitle.text;
48766
+ },
48767
+ set: function (newValue) {
48768
+ this.locTemplateTabTitle.text = newValue;
48769
+ },
48770
+ enumerable: false,
48771
+ configurable: true
48772
+ });
48773
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "locTemplateTabTitle", {
48774
+ get: function () {
48775
+ return this.getLocalizableString("templateTabTitle");
48776
+ },
48777
+ enumerable: false,
48778
+ configurable: true
48779
+ });
48627
48780
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateDescription", {
48628
48781
  /**
48629
- * A description for the template panel.
48782
+ * A template for panel descriptions.
48630
48783
  * @see template
48631
48784
  * @see templateTitle
48632
48785
  * @see templateElements
@@ -48662,7 +48815,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48662
48815
  });
48663
48816
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "panels", {
48664
48817
  /**
48665
- * An array of `PanelModel` objects created based on the template panel.
48818
+ * An array of `PanelModel` objects created based on a panel template.
48666
48819
  * @see PanelModel
48667
48820
  * @see template
48668
48821
  * @see panelCount
@@ -48988,7 +49141,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48988
49141
  };
48989
49142
  QuestionPanelDynamicModel.prototype.setIsMobile = function (val) {
48990
49143
  (this.panels || []).forEach(function (panel) { return panel.elements.forEach(function (element) {
48991
- if (element instanceof _question__WEBPACK_IMPORTED_MODULE_3__["Question"]) {
49144
+ if (element instanceof _question__WEBPACK_IMPORTED_MODULE_4__["Question"]) {
48992
49145
  element.isMobile = val;
48993
49146
  }
48994
49147
  }); });
@@ -49001,14 +49154,14 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49001
49154
  */
49002
49155
  get: function () {
49003
49156
  return this.isLoadingFromJson || this.useTemplatePanel
49004
- ? this.loadingPanelCount
49157
+ ? this.getPropertyValue("panelCount")
49005
49158
  : this.panels.length;
49006
49159
  },
49007
49160
  set: function (val) {
49008
49161
  if (val < 0)
49009
49162
  return;
49010
49163
  if (this.isLoadingFromJson || this.useTemplatePanel) {
49011
- this.loadingPanelCount = val;
49164
+ this.setPropertyValue("panelCount", val);
49012
49165
  return;
49013
49166
  }
49014
49167
  if (val == this.panels.length || this.useTemplatePanel)
@@ -49146,8 +49299,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49146
49299
  set: function (val) {
49147
49300
  if (val <= 0)
49148
49301
  return;
49149
- if (val > _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].panelMaximumPanelCount)
49150
- val = _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].panelMaximumPanelCount;
49302
+ if (val > _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].panelMaximumPanelCount)
49303
+ val = _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].panelMaximumPanelCount;
49151
49304
  if (val == this.maxPanelCount)
49152
49305
  return;
49153
49306
  this.setPropertyValue("maxPanelCount", val);
@@ -49195,7 +49348,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49195
49348
  });
49196
49349
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "templateTitleLocation", {
49197
49350
  /**
49198
- * Gets or sets the location of question titles within the template panel relative to their input fields.
49351
+ * Gets or sets the location of question titles relative to their input fields.
49199
49352
  *
49200
49353
  * - `"default"` (default) - Inherits the setting from the Dynamic Panel's `titleLocation` property, which in turn inherits the [`questionTitleLocation`](https://surveyjs.io/form-library/documentation/surveymodel#questionTitleLocation) property value specified for the Dynamic Panel's container (page or survey).
49201
49354
  * - `"top"` - Displays question titles above input fields.
@@ -49268,7 +49421,15 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49268
49421
  });
49269
49422
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "renderMode", {
49270
49423
  /**
49271
- * By default the property equals to "list" and all dynamic panels are rendered one by one on the page. You may change it to: "progressTop", "progressBottom" or "progressTopBottom" to render only one dynamic panel at once. The progress and navigation elements can be rendred on top, bottom or both.
49424
+ * Specifies how to render panels.
49425
+ *
49426
+ * Possible values:
49427
+ *
49428
+ * - `"list"` - Renders panels one under the other. [View Demo](https://surveyjs.io/form-library/examples/how-to-use-expressions-in-dynamic-panel/)
49429
+ * - `"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/)
49430
+ * - `"progressBottom"` - Renders each panel panel as a card and displays a progress bar at the bottom.
49431
+ * - `"progressTopBottom"` - Renders each panel as a card and displays a progress bar at the top and bottom.
49432
+ * - `"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.
49272
49433
  */
49273
49434
  get: function () {
49274
49435
  return this.getPropertyValue("renderMode");
@@ -49562,7 +49723,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49562
49723
  QuestionPanelDynamicModel.prototype.removePanelUI = function (value) {
49563
49724
  if (!this.canRemovePanel)
49564
49725
  return;
49565
- if (!this.confirmDelete || Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["confirmAction"])(this.confirmDeleteText)) {
49726
+ if (!this.confirmDelete || Object(_utils_utils__WEBPACK_IMPORTED_MODULE_9__["confirmAction"])(this.confirmDeleteText)) {
49566
49727
  this.removePanel(value);
49567
49728
  }
49568
49729
  };
@@ -49624,12 +49785,22 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49624
49785
  }
49625
49786
  return -1;
49626
49787
  };
49788
+ QuestionPanelDynamicModel.prototype.getPanelIndexById = function (id) {
49789
+ for (var i = 0; i < this.panels.length; i++) {
49790
+ if (this.panels[i].id === id)
49791
+ return i;
49792
+ }
49793
+ return -1;
49794
+ };
49627
49795
  QuestionPanelDynamicModel.prototype.locStrsChanged = function () {
49628
49796
  _super.prototype.locStrsChanged.call(this);
49629
49797
  var panels = this.panels;
49630
49798
  for (var i = 0; i < panels.length; i++) {
49631
49799
  panels[i].locStrsChanged();
49632
49800
  }
49801
+ if (this.additionalTitleToolbar) {
49802
+ this.additionalTitleToolbar.locStrsChanged();
49803
+ }
49633
49804
  };
49634
49805
  QuestionPanelDynamicModel.prototype.clearIncorrectValues = function () {
49635
49806
  for (var i = 0; i < this.panels.length; i++) {
@@ -49661,8 +49832,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49661
49832
  var q = panel.getQuestionByName(key);
49662
49833
  if (!!q)
49663
49834
  continue;
49664
- if (this.iscorrectValueWithPostPrefix(panel, key, _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].commentSuffix) ||
49665
- this.iscorrectValueWithPostPrefix(panel, key, _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].matrixTotalValuePostFix))
49835
+ if (this.iscorrectValueWithPostPrefix(panel, key, _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].commentSuffix) ||
49836
+ this.iscorrectValueWithPostPrefix(panel, key, _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].matrixTotalValuePostFix))
49666
49837
  continue;
49667
49838
  delete values[key];
49668
49839
  isChanged = true;
@@ -49691,7 +49862,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49691
49862
  for (var i = 0; i < questions.length; i++) {
49692
49863
  questions[i].addConditionObjectsByContext(panelObjs, context);
49693
49864
  }
49694
- for (var index = 0; index < _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].panelDynamicMaxPanelCountInCondition; index++) {
49865
+ for (var index = 0; index < _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].panelDynamicMaxPanelCountInCondition; index++) {
49695
49866
  var indexStr = "[" + index + "].";
49696
49867
  var prefixName = this.getValueName() + indexStr;
49697
49868
  var prefixText = this.processedTitle + indexStr;
@@ -49756,8 +49927,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49756
49927
  QuestionPanelDynamicModel.prototype.onSurveyLoad = function () {
49757
49928
  this.template.readOnly = this.isReadOnly;
49758
49929
  this.template.onSurveyLoad();
49759
- if (this.loadingPanelCount > 0) {
49760
- this.panelCount = this.loadingPanelCount;
49930
+ if (this.getPropertyValue("panelCount") > 0) {
49931
+ this.panelCount = this.getPropertyValue("panelCount");
49761
49932
  }
49762
49933
  if (this.useTemplatePanel) {
49763
49934
  this.rebuildPanels();
@@ -49996,7 +50167,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49996
50167
  for (var i = 0; i < keyValues.length; i++) {
49997
50168
  if (value == keyValues[i]) {
49998
50169
  if (fireCallback) {
49999
- question.addError(new _error__WEBPACK_IMPORTED_MODULE_6__["KeyDuplicationError"](this.keyDuplicationError, this));
50170
+ question.addError(new _error__WEBPACK_IMPORTED_MODULE_7__["KeyDuplicationError"](this.keyDuplicationError, this));
50000
50171
  }
50001
50172
  if (!!rec && !rec.firstErrorQuestion) {
50002
50173
  rec.firstErrorQuestion = question;
@@ -50011,10 +50182,10 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50011
50182
  var _this = this;
50012
50183
  var actions = panel.footerActions;
50013
50184
  if (this.panelRemoveButtonLocation !== "right") {
50014
- actions.push(new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
50185
+ actions.push(new _actions_action__WEBPACK_IMPORTED_MODULE_11__["Action"]({
50015
50186
  id: "remove-panel-" + panel.id,
50016
50187
  component: "sv-paneldynamic-remove-btn",
50017
- visible: new _base__WEBPACK_IMPORTED_MODULE_11__["ComputedUpdater"](function () { return [_this.canRemovePanel, panel.state !== "collapsed", _this.panelRemoveButtonLocation !== "right"].every(function (val) { return val === true; }); }),
50188
+ visible: new _base__WEBPACK_IMPORTED_MODULE_12__["ComputedUpdater"](function () { return [_this.canRemovePanel, panel.state !== "collapsed", _this.panelRemoveButtonLocation !== "right"].every(function (val) { return val === true; }); }),
50018
50189
  data: { question: this, panel: panel }
50019
50190
  }));
50020
50191
  }
@@ -50027,7 +50198,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50027
50198
  var _this = this;
50028
50199
  var panel = this.createAndSetupNewPanelObject();
50029
50200
  var json = this.template.toJSON();
50030
- new _jsonobject__WEBPACK_IMPORTED_MODULE_4__["JsonObject"]().toObject(json, panel);
50201
+ new _jsonobject__WEBPACK_IMPORTED_MODULE_5__["JsonObject"]().toObject(json, panel);
50031
50202
  panel.renderWidth = "100%";
50032
50203
  panel.updateCustomWidgets();
50033
50204
  new QuestionPanelDynamicItem(this, panel);
@@ -50059,15 +50230,15 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50059
50230
  : this.getTitleLocationCore();
50060
50231
  };
50061
50232
  QuestionPanelDynamicModel.prototype.createNewPanelObject = function () {
50062
- return _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].createClass("panel");
50233
+ return _jsonobject__WEBPACK_IMPORTED_MODULE_5__["Serializer"].createClass("panel");
50063
50234
  };
50064
50235
  QuestionPanelDynamicModel.prototype.setPanelCountBasedOnValue = function () {
50065
50236
  if (this.isValueChangingInternally || this.useTemplatePanel)
50066
50237
  return;
50067
50238
  var val = this.value;
50068
50239
  var newPanelCount = val && Array.isArray(val) ? val.length : 0;
50069
- if (newPanelCount == 0 && this.loadingPanelCount > 0) {
50070
- newPanelCount = this.loadingPanelCount;
50240
+ if (newPanelCount == 0 && this.getPropertyValue("panelCount") > 0) {
50241
+ newPanelCount = this.getPropertyValue("panelCount");
50071
50242
  }
50072
50243
  this.panelCount = newPanelCount;
50073
50244
  };
@@ -50104,7 +50275,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50104
50275
  for (var i = 0; i < questions.length; i++) {
50105
50276
  var q = questions[i];
50106
50277
  q.updateValueFromSurvey(values[q.getValueName()]);
50107
- q.updateCommentFromSurvey(values[q.getValueName() + _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].commentSuffix]);
50278
+ q.updateCommentFromSurvey(values[q.getValueName() + _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].commentSuffix]);
50108
50279
  }
50109
50280
  };
50110
50281
  QuestionPanelDynamicModel.prototype.panelSurveyValueChanged = function (panel) {
@@ -50268,12 +50439,12 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50268
50439
  configurable: true
50269
50440
  });
50270
50441
  QuestionPanelDynamicModel.prototype.getRootCss = function () {
50271
- return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(_super.prototype.getRootCss.call(this)).append(this.cssClasses.empty, this.getShowNoEntriesPlaceholder()).toString();
50442
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]().append(_super.prototype.getRootCss.call(this)).append(this.cssClasses.empty, this.getShowNoEntriesPlaceholder()).toString();
50272
50443
  };
50273
50444
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "cssHeader", {
50274
50445
  get: function () {
50275
50446
  var showTab = this.isRenderModeTab && !!this.panelCount;
50276
- return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
50447
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
50277
50448
  .append(this.cssClasses.header)
50278
50449
  .append(this.cssClasses.headerTop, this.hasTitleOnTop || showTab)
50279
50450
  .append(this.cssClasses.headerTab, showTab)
@@ -50283,33 +50454,33 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50283
50454
  configurable: true
50284
50455
  });
50285
50456
  QuestionPanelDynamicModel.prototype.getPanelWrapperCss = function () {
50286
- return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
50457
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
50287
50458
  .append(this.cssClasses.panelWrapper)
50288
50459
  .append(this.cssClasses.panelWrapperInRow, this.panelRemoveButtonLocation === "right")
50289
50460
  .toString();
50290
50461
  };
50291
50462
  QuestionPanelDynamicModel.prototype.getPanelRemoveButtonCss = function () {
50292
- return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
50463
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
50293
50464
  .append(this.cssClasses.button)
50294
50465
  .append(this.cssClasses.buttonRemove)
50295
50466
  .append(this.cssClasses.buttonRemoveRight, this.panelRemoveButtonLocation === "right")
50296
50467
  .toString();
50297
50468
  };
50298
50469
  QuestionPanelDynamicModel.prototype.getAddButtonCss = function () {
50299
- return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
50470
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
50300
50471
  .append(this.cssClasses.button)
50301
50472
  .append(this.cssClasses.buttonAdd)
50302
50473
  .append(this.cssClasses.buttonAdd + "--list-mode", this.renderMode === "list")
50303
50474
  .toString();
50304
50475
  };
50305
50476
  QuestionPanelDynamicModel.prototype.getPrevButtonCss = function () {
50306
- return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
50477
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
50307
50478
  .append(this.cssClasses.buttonPrev)
50308
50479
  .append(this.cssClasses.buttonPrevDisabled, !this.isPrevButtonVisible)
50309
50480
  .toString();
50310
50481
  };
50311
50482
  QuestionPanelDynamicModel.prototype.getNextButtonCss = function () {
50312
- return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
50483
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
50313
50484
  .append(this.cssClasses.buttonNext)
50314
50485
  .append(this.cssClasses.buttonNextDisabled, !this.isNextButtonVisible)
50315
50486
  .toString();
@@ -50347,7 +50518,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50347
50518
  if (!this.isRenderModeTab)
50348
50519
  return null;
50349
50520
  if (!this.additionalTitleToolbarValue) {
50350
- this.additionalTitleToolbarValue = new _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_12__["AdaptiveActionContainer"]();
50521
+ this.additionalTitleToolbarValue = new _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_13__["AdaptiveActionContainer"]();
50351
50522
  this.additionalTitleToolbarValue.containerCss = this.getAdditionalTitleToolbarCss();
50352
50523
  this.additionalTitleToolbarValue.cssClasses = {
50353
50524
  item: "sv-tab-item",
@@ -50378,37 +50549,37 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50378
50549
  var _this = this;
50379
50550
  this.footerToolbarValue = this.createActionContainer();
50380
50551
  var items = [];
50381
- var prevTextBtn = new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
50552
+ var prevTextBtn = new _actions_action__WEBPACK_IMPORTED_MODULE_11__["Action"]({
50382
50553
  id: "sv-pd-prev-btn",
50383
50554
  title: this.panelPrevText,
50384
50555
  action: function () {
50385
50556
  _this.goToPrevPanel();
50386
50557
  }
50387
50558
  });
50388
- var nextTextBtn = new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
50559
+ var nextTextBtn = new _actions_action__WEBPACK_IMPORTED_MODULE_11__["Action"]({
50389
50560
  id: "sv-pd-next-btn",
50390
50561
  title: this.panelNextText,
50391
50562
  action: function () {
50392
50563
  _this.goToNextPanel();
50393
50564
  }
50394
50565
  });
50395
- var addBtn = new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
50566
+ var addBtn = new _actions_action__WEBPACK_IMPORTED_MODULE_11__["Action"]({
50396
50567
  id: "sv-pd-add-btn",
50397
50568
  component: "sv-paneldynamic-add-btn",
50398
- visible: new _base__WEBPACK_IMPORTED_MODULE_11__["ComputedUpdater"](function () { return _this.canAddPanel; }),
50569
+ visible: new _base__WEBPACK_IMPORTED_MODULE_12__["ComputedUpdater"](function () { return _this.canAddPanel; }),
50399
50570
  data: { question: this }
50400
50571
  });
50401
- var prevBtnIcon = new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
50572
+ var prevBtnIcon = new _actions_action__WEBPACK_IMPORTED_MODULE_11__["Action"]({
50402
50573
  id: "sv-prev-btn-icon",
50403
50574
  component: "sv-paneldynamic-prev-btn",
50404
50575
  data: { question: this }
50405
50576
  });
50406
- var progressText = new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
50577
+ var progressText = new _actions_action__WEBPACK_IMPORTED_MODULE_11__["Action"]({
50407
50578
  id: "sv-pd-progress-text",
50408
50579
  component: "sv-paneldynamic-progress-text",
50409
50580
  data: { question: this }
50410
50581
  });
50411
- var nextBtnIcon = new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
50582
+ var nextBtnIcon = new _actions_action__WEBPACK_IMPORTED_MODULE_11__["Action"]({
50412
50583
  id: "sv-pd-next-btn-icon",
50413
50584
  component: "sv-paneldynamic-next-btn",
50414
50585
  data: { question: this }
@@ -50437,22 +50608,22 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50437
50608
  var _this = this;
50438
50609
  if (!this.isRenderModeTab)
50439
50610
  return;
50440
- var index = this.getPanelIndex(panel);
50441
- var title = this.getLocalizationFormatString("panelDynamicTabTextFormat", index + 1);
50442
- var newItem = new _actions_action__WEBPACK_IMPORTED_MODULE_10__["Action"]({
50443
- id: index.toString(),
50611
+ var locTitle = new _localizablestring__WEBPACK_IMPORTED_MODULE_2__["LocalizableString"](panel, true);
50612
+ locTitle.sharedData = this.locTemplateTabTitle;
50613
+ var newItem = new _actions_action__WEBPACK_IMPORTED_MODULE_11__["Action"]({
50614
+ id: panel.id,
50444
50615
  css: "sv-tab-item__root",
50445
- pressed: index === this.currentIndex,
50446
- title: title,
50616
+ pressed: this.getPanelIndexById(panel.id) === this.currentIndex,
50617
+ locTitle: locTitle,
50447
50618
  action: function () {
50448
- _this.currentIndex = parseInt(newItem.id);
50619
+ _this.currentIndex = _this.getPanelIndexById(newItem.id);
50449
50620
  _this.updateTabToolbarItemsPressedState();
50450
50621
  }
50451
50622
  });
50452
50623
  return newItem;
50453
50624
  };
50454
50625
  QuestionPanelDynamicModel.prototype.getAdditionalTitleToolbarCss = function () {
50455
- return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
50626
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
50456
50627
  .append("sv-tabs-toolbar")
50457
50628
  .append("sv-tabs-toolbar--left", this.tabAlign === "left")
50458
50629
  .append("sv-tabs-toolbar--right", this.tabAlign === "right")
@@ -50460,10 +50631,12 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50460
50631
  .toString();
50461
50632
  };
50462
50633
  QuestionPanelDynamicModel.prototype.updateTabToolbarItemsPressedState = function () {
50463
- var _this = this;
50464
50634
  if (!this.isRenderModeTab)
50465
50635
  return;
50466
- this.additionalTitleToolbar.renderedActions.forEach(function (action) { return action.pressed = parseInt(action.id) === _this.currentIndex; });
50636
+ if (this.currentIndex < 0 || this.currentIndex >= this.panels.length)
50637
+ return;
50638
+ var panel = this.panels[this.currentIndex];
50639
+ this.additionalTitleToolbar.renderedActions.forEach(function (action) { return action.pressed = action.id === panel.id; });
50467
50640
  };
50468
50641
  QuestionPanelDynamicModel.prototype.updateTabToolbar = function () {
50469
50642
  var _this = this;
@@ -50485,8 +50658,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50485
50658
  if (!this.isRenderModeTab)
50486
50659
  return;
50487
50660
  panels.forEach(function (panel) {
50488
- var index = _this.getPanelIndex(panel);
50489
- var removedItem = _this.additionalTitleToolbar.getActionById(index.toString());
50661
+ var removedItem = _this.additionalTitleToolbar.getActionById(panel.id);
50490
50662
  _this.additionalTitleToolbar.actions.splice(_this.additionalTitleToolbar.actions.indexOf(removedItem), 1);
50491
50663
  });
50492
50664
  this.updateTabToolbarItemsPressedState();
@@ -50500,12 +50672,12 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50500
50672
  });
50501
50673
  QuestionPanelDynamicModel.maxCheckCount = 3;
50502
50674
  __decorate([
50503
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_4__["property"])({ defaultValue: false, onSet: function (_, target) { target.updateFooterActions(); } })
50675
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_5__["property"])({ defaultValue: false, onSet: function (_, target) { target.updateFooterActions(); } })
50504
50676
  ], QuestionPanelDynamicModel.prototype, "legacyNavigation", void 0);
50505
50677
  return QuestionPanelDynamicModel;
50506
- }(_question__WEBPACK_IMPORTED_MODULE_3__["Question"]));
50678
+ }(_question__WEBPACK_IMPORTED_MODULE_4__["Question"]));
50507
50679
 
50508
- _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("paneldynamic", [
50680
+ _jsonobject__WEBPACK_IMPORTED_MODULE_5__["Serializer"].addClass("paneldynamic", [
50509
50681
  { name: "showCommentArea:switch", layout: "row", visible: true, category: "general" },
50510
50682
  {
50511
50683
  name: "templateElements",
@@ -50515,6 +50687,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("paneldynamic",
50515
50687
  isLightSerializable: false
50516
50688
  },
50517
50689
  { name: "templateTitle:text", serializationProperty: "locTemplateTitle" },
50690
+ { name: "templateTabTitle", serializationProperty: "locTemplateTabTitle", visibleIf: function (obj) { return obj.renderMode === "tab"; } },
50518
50691
  {
50519
50692
  name: "templateDescription:text",
50520
50693
  serializationProperty: "locTemplateDescription",
@@ -50532,7 +50705,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("paneldynamic",
50532
50705
  { name: "minPanelCount:number", default: 0, minValue: 0 },
50533
50706
  {
50534
50707
  name: "maxPanelCount:number",
50535
- default: _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].panelMaximumPanelCount,
50708
+ default: _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].panelMaximumPanelCount,
50536
50709
  },
50537
50710
  "defaultPanelValue:panelvalue",
50538
50711
  "defaultValueFromLastPanel:boolean",
@@ -50568,6 +50741,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("paneldynamic",
50568
50741
  },
50569
50742
  {
50570
50743
  name: "tabAlign", default: "center", choices: ["center", "left", "right"],
50744
+ visibleIf: function (obj) { return obj.renderMode === "tab"; }
50571
50745
  },
50572
50746
  {
50573
50747
  name: "templateTitleLocation",
@@ -50582,7 +50756,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("paneldynamic",
50582
50756
  ], function () {
50583
50757
  return new QuestionPanelDynamicModel("");
50584
50758
  }, "question");
50585
- _questionfactory__WEBPACK_IMPORTED_MODULE_5__["QuestionFactory"].Instance.registerQuestion("paneldynamic", function (name) {
50759
+ _questionfactory__WEBPACK_IMPORTED_MODULE_6__["QuestionFactory"].Instance.registerQuestion("paneldynamic", function (name) {
50586
50760
  return new QuestionPanelDynamicModel(name);
50587
50761
  });
50588
50762
 
@@ -51207,10 +51381,16 @@ var QuestionRatingModel = /** @class */ (function (_super) {
51207
51381
  _this.createItemValues("rateValues");
51208
51382
  _this.createRenderedRateItems();
51209
51383
  _this.createLocalizableString("ratingOptionsCaption", _this, false, true);
51210
- _this.registerFunctionOnPropertiesValueChanged(["rateMin", "rateMax", "rateDisplayMode",
51384
+ _this.registerFunctionOnPropertiesValueChanged(["rateMin", "rateMax",
51211
51385
  "minRateDescription", "maxRateDescription", "rateStep", "displayRateDescriptionsAsExtremeItems"], function () { return _this.createRenderedRateItems(); });
51386
+ _this.registerFunctionOnPropertiesValueChanged(["rateDisplayMode"], function () {
51387
+ _this.setIconsToRateValues();
51388
+ _this.createRenderedRateItems();
51389
+ _this.updateRateCount();
51390
+ });
51212
51391
  _this.registerFunctionOnPropertiesValueChanged(["rateValues"], function () {
51213
51392
  _this.autoGenerate = false;
51393
+ _this.setIconsToRateValues();
51214
51394
  _this.createRenderedRateItems();
51215
51395
  });
51216
51396
  _this.registerFunctionOnPropertiesValueChanged(["autoGenerate"], function () {
@@ -51226,6 +51406,11 @@ var QuestionRatingModel = /** @class */ (function (_super) {
51226
51406
  _this.initPropertyDependencies();
51227
51407
  return _this;
51228
51408
  }
51409
+ QuestionRatingModel.prototype.setIconsToRateValues = function () {
51410
+ var _this = this;
51411
+ if (this.rateType == "smileys")
51412
+ this.rateValues.map(function (item) { return item.icon = _this.getItemSmiley(item); });
51413
+ };
51229
51414
  QuestionRatingModel.prototype.startLoadingFromJson = function (jsonObj) {
51230
51415
  _super.prototype.startLoadingFromJson.call(this, jsonObj);
51231
51416
  this.jsonObj = jsonObj;
@@ -51243,6 +51428,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
51243
51428
  if (this.jsonObj.autoGenerate === undefined && this.jsonObj.rateValues !== undefined)
51244
51429
  this.autoGenerate = !this.jsonObj.rateValues.length;
51245
51430
  this.updateRateCount();
51431
+ this.setIconsToRateValues();
51246
51432
  this.createRenderedRateItems();
51247
51433
  };
51248
51434
  QuestionRatingModel.prototype.registerSychProperties = function (names, func) {
@@ -51265,12 +51451,17 @@ var QuestionRatingModel = /** @class */ (function (_super) {
51265
51451
  this.rateMin = this.rateMax - this.rateStep * (this.rateCount - 1);
51266
51452
  };
51267
51453
  QuestionRatingModel.prototype.updateRateCount = function () {
51454
+ var newCount = 0;
51268
51455
  if (this.useRateValues()) {
51269
- this.rateCount = this.rateValues.length;
51456
+ newCount = this.rateValues.length;
51270
51457
  }
51271
51458
  else {
51272
- this.rateCount = Math.trunc((this.rateMax - this.rateMin) / (this.rateStep || 1)) + 1;
51459
+ newCount = Math.trunc((this.rateMax - this.rateMin) / (this.rateStep || 1)) + 1;
51273
51460
  }
51461
+ if (newCount > 10 && this.rateDisplayMode == "smileys") {
51462
+ newCount = 10;
51463
+ }
51464
+ this.rateCount = newCount;
51274
51465
  };
51275
51466
  QuestionRatingModel.prototype.initPropertyDependencies = function () {
51276
51467
  var _this = this;
@@ -51280,11 +51471,14 @@ var QuestionRatingModel = /** @class */ (function (_super) {
51280
51471
  }
51281
51472
  else {
51282
51473
  if (_this.rateCount < _this.rateValues.length) {
51474
+ if (_this.rateCount >= 10 && _this.rateDisplayMode == "smileys")
51475
+ return;
51283
51476
  _this.rateValues.splice(_this.rateCount, _this.rateValues.length - _this.rateCount);
51284
51477
  }
51285
51478
  else {
51286
- for (var i = _this.rateValues.length; i < _this.rateCount; i++)
51287
- _this.rateValues.push(new _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"](undefined));
51479
+ for (var i = _this.rateValues.length; i < _this.rateCount; i++) {
51480
+ _this.rateValues.push(new _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"](_surveyStrings__WEBPACK_IMPORTED_MODULE_5__["surveyLocalization"].getString("choices_Item") + (i + 1)));
51481
+ }
51288
51482
  }
51289
51483
  }
51290
51484
  });
@@ -51564,9 +51758,12 @@ var QuestionRatingModel = /** @class */ (function (_super) {
51564
51758
  else {
51565
51759
  this.value = value;
51566
51760
  }
51761
+ for (var i = 0; i < this.renderedRateItems.length; i++) {
51762
+ this.renderedRateItems[i].highlight = "none";
51763
+ }
51567
51764
  };
51568
51765
  QuestionRatingModel.prototype.onItemMouseIn = function (item) {
51569
- if (this.isReadOnly || !item.itemValue.isEnabled)
51766
+ if (this.isReadOnly || !item.itemValue.isEnabled || this.isDesignMode)
51570
51767
  return;
51571
51768
  var high = true;
51572
51769
  var selected = this.value != null;
@@ -51605,6 +51802,9 @@ var QuestionRatingModel = /** @class */ (function (_super) {
51605
51802
  QuestionRatingModel.prototype.getItemSmileyIconName = function (item) {
51606
51803
  return "icon-" + this.getItemSmiley(item);
51607
51804
  };
51805
+ QuestionRatingModel.prototype.getItemClassByText = function (item, text) {
51806
+ return this.getItemClass(item);
51807
+ };
51608
51808
  QuestionRatingModel.prototype.getItemClass = function (item, highlight) {
51609
51809
  var _this = this;
51610
51810
  if (highlight === void 0) { highlight = "none"; }
@@ -51777,6 +51977,12 @@ var QuestionRatingModel = /** @class */ (function (_super) {
51777
51977
  }
51778
51978
  return classes;
51779
51979
  };
51980
+ QuestionRatingModel.prototype.dispose = function () {
51981
+ _super.prototype.dispose.call(this);
51982
+ if (!!this.dropdownListModelValue) {
51983
+ this.dropdownListModelValue.dispose();
51984
+ }
51985
+ };
51780
51986
  __decorate([
51781
51987
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: true })
51782
51988
  ], QuestionRatingModel.prototype, "autoGenerate", void 0);
@@ -51831,7 +52037,6 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("rating", [
51831
52037
  },
51832
52038
  {
51833
52039
  name: "autoGenerate",
51834
- displayName: "How to specify rate values?",
51835
52040
  category: "rateValues",
51836
52041
  default: true,
51837
52042
  choices: [{ value: true, text: "Generate" }, { value: false, text: "Enter manually" }],
@@ -51841,7 +52046,16 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("rating", [
51841
52046
  name: "rateCount:number",
51842
52047
  default: 5,
51843
52048
  category: "rateValues",
51844
- visibleIndex: 1
52049
+ visibleIndex: 1,
52050
+ onSettingValue: function (obj, val) {
52051
+ if (val < 2)
52052
+ return 2;
52053
+ if (val > _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].ratingMaximumRateValueCount && val > obj.rateValues.length)
52054
+ return _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].ratingMaximumRateValueCount;
52055
+ if (val > 10 && obj.rateDisplayMode == "smileys")
52056
+ return 10;
52057
+ return val;
52058
+ },
51845
52059
  },
51846
52060
  {
51847
52061
  name: "rateValues:itemvalue[]",
@@ -52445,6 +52659,12 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
52445
52659
  QuestionTagboxModel.prototype.getInputId = function () {
52446
52660
  return this.inputId + "_0";
52447
52661
  };
52662
+ QuestionTagboxModel.prototype.dispose = function () {
52663
+ _super.prototype.dispose.call(this);
52664
+ if (!!this.dropdownListModelValue) {
52665
+ this.dropdownListModelValue.dispose();
52666
+ }
52667
+ };
52448
52668
  __decorate([
52449
52669
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
52450
52670
  ], QuestionTagboxModel.prototype, "allowClear", void 0);
@@ -52635,7 +52855,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
52635
52855
  },
52636
52856
  set: function (val) {
52637
52857
  val = val.toLowerCase();
52638
- if (val == "datetime_local")
52858
+ if (val === "datetime_local" || val === "datetime")
52639
52859
  val = "datetime-local";
52640
52860
  this.setPropertyValue("inputType", val.toLowerCase());
52641
52861
  if (!this.isLoadingFromJson) {
@@ -52895,8 +53115,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
52895
53115
  return isValid;
52896
53116
  };
52897
53117
  QuestionTextModel.prototype.convertFuncValuetoQuestionValue = function (val) {
52898
- var inpuType = this.inputType.replace("-local", "");
52899
- return _helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].convertValToQuestionVal(val, inpuType);
53118
+ return _helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].convertValToQuestionVal(val, this.inputType);
52900
53119
  };
52901
53120
  QuestionTextModel.prototype.getMinMaxErrorText = function (errorText, value) {
52902
53121
  if (_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isValueEmpty(value))
@@ -52980,10 +53199,10 @@ var QuestionTextModel = /** @class */ (function (_super) {
52980
53199
  configurable: true
52981
53200
  });
52982
53201
  QuestionTextModel.prototype.supportGoNextPageAutomatic = function () {
52983
- return ["date", "datetime", "datetime-local"].indexOf(this.inputType) < 0;
53202
+ return ["date", "datetime-local"].indexOf(this.inputType) < 0;
52984
53203
  };
52985
53204
  QuestionTextModel.prototype.supportGoNextPageError = function () {
52986
- return ["date", "datetime", "datetime-local"].indexOf(this.inputType) < 0;
53205
+ return ["date", "datetime-local"].indexOf(this.inputType) < 0;
52987
53206
  };
52988
53207
  Object.defineProperty(QuestionTextModel.prototype, "dataList", {
52989
53208
  /**
@@ -53057,7 +53276,6 @@ var minMaxTypes = [
53057
53276
  "number",
53058
53277
  "range",
53059
53278
  "date",
53060
- "datetime",
53061
53279
  "datetime-local",
53062
53280
  "month",
53063
53281
  "time",
@@ -55818,7 +56036,7 @@ var RatingItem = /** @class */ (function (_super) {
55818
56036
  };
55819
56037
  RatingItem.prototype.render = function () {
55820
56038
  var itemText = this.renderLocString(this.item.locText);
55821
- return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { className: this.question.getItemClass(this.item.itemValue) },
56039
+ return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
55822
56040
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
55823
56041
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.itemText }, itemText)));
55824
56042
  };
@@ -63317,11 +63535,11 @@ var settings = {
63317
63535
  imagepicker: ["answercount"],
63318
63536
  },
63319
63537
  /**
63320
- * Specifies a minimum date that users can enter into a [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) question with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"date"`, `"datetime"`, or `"datetime-local"`. Set this property to a string with the folllowing format: `"yyyy-mm-dd"`.
63538
+ * Specifies a minimum date that users can enter into a [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) question with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"date"` or `"datetime-local"`. Set this property to a string with the folllowing format: `"yyyy-mm-dd"`.
63321
63539
  */
63322
63540
  minDate: "",
63323
63541
  /**
63324
- * Specifies a maximum date that users can enter into a [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) question with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"date"`, `"datetime"`, or `"datetime-local"`. Set this property to a string with the folllowing format: `"yyyy-mm-dd"`.
63542
+ * Specifies a maximum date that users can enter into a [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) question with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"date"` or `"datetime-local"`. Set this property to a string with the folllowing format: `"yyyy-mm-dd"`.
63325
63543
  */
63326
63544
  maxDate: "",
63327
63545
  showModal: undefined,
@@ -63358,7 +63576,6 @@ var settings = {
63358
63576
  inputTypes: [
63359
63577
  "color",
63360
63578
  "date",
63361
- "datetime",
63362
63579
  "datetime-local",
63363
63580
  "email",
63364
63581
  "month",
@@ -68795,7 +69012,7 @@ var SurveyModel = /** @class */ (function (_super) {
68795
69012
  if (!page)
68796
69013
  return "none";
68797
69014
  if (page.navigationButtonsVisibility === "show") {
68798
- return "bottom";
69015
+ return this.showNavigationButtons === "none" ? "bottom" : this.showNavigationButtons;
68799
69016
  }
68800
69017
  if (page.navigationButtonsVisibility === "hide") {
68801
69018
  return "none";
@@ -72521,12 +72738,12 @@ var SurveyModel = /** @class */ (function (_super) {
72521
72738
  }
72522
72739
  else if (isStrCiEqual(layoutElement.id, "navigationbuttons")) {
72523
72740
  if (container === "contentTop") {
72524
- if (["top", "both"].indexOf(this.showNavigationButtons) !== -1 && this.isNavigationButtonsShowingOnTop) {
72741
+ if (["top", "both"].indexOf(this.isNavigationButtonsShowing) !== -1) {
72525
72742
  containerLayoutElements.push(layoutElement);
72526
72743
  }
72527
72744
  }
72528
72745
  if (container === "contentBottom") {
72529
- if (["bottom", "both"].indexOf(this.showNavigationButtons) !== -1 && this.isNavigationButtonsShowingOnBottom) {
72746
+ if (["bottom", "both"].indexOf(this.isNavigationButtonsShowing) !== -1) {
72530
72747
  containerLayoutElements.push(layoutElement);
72531
72748
  }
72532
72749
  }