survey-react 1.9.121 → 1.9.122

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.121
2
+ * surveyjs - Survey JavaScript library v1.9.122
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
  */
@@ -1891,7 +1891,7 @@ var Base = /** @class */ (function () {
1891
1891
  * Returns `true` if a passed `value` is an empty string, array, or object or if it equals to `undefined` or `null`.
1892
1892
  *
1893
1893
  * @param value A value to be checked.
1894
- * @param trimString (Optional) When this parameter is `true`, the method ignores whitespace characters at the beginning and end of a string value. Pass `false` to disable this functionality.
1894
+ * @param trimString *(Optional)* When this parameter is `true`, the method ignores whitespace characters at the beginning and end of a string value. Pass `false` to disable this functionality.
1895
1895
  */
1896
1896
  Base.prototype.isValueEmpty = function (value, trimString) {
1897
1897
  if (trimString === void 0) { trimString = true; }
@@ -2098,7 +2098,7 @@ var Base = /** @class */ (function () {
2098
2098
  * If the property is not found or does not have a value, this method returns either `undefined`, `defaultValue` specified in the property configuration, or a value passed as the `defaultValue` parameter.
2099
2099
  *
2100
2100
  * @param name A property name.
2101
- * @param defaultValue (Optional) A value to return if the property is not found or does not have a value.
2101
+ * @param defaultValue *(Optional)* A value to return if the property is not found or does not have a value.
2102
2102
  */
2103
2103
  Base.prototype.getPropertyValue = function (name, defaultValue) {
2104
2104
  if (defaultValue === void 0) { defaultValue = null; }
@@ -2369,7 +2369,7 @@ var Base = /** @class */ (function () {
2369
2369
  * Registers a function to call when a property value changes.
2370
2370
  * @param propertyNames An array of one or multiple property names.
2371
2371
  * @param handler A function to call when one of the listed properties change.
2372
- * @param key (Optional) A key that identifies the current registration. If a function for one of the properties is already registered with the same key, the function will be overwritten. You can also use the key to subsequently unregister handlers.
2372
+ * @param key *(Optional)* A key that identifies the current registration. If a function for one of the properties is already registered with the same key, the function will be overwritten. You can also use the key to subsequently unregister handlers.
2373
2373
  * @see unregisterPropertyChangedHandlers
2374
2374
  */
2375
2375
  Base.prototype.registerPropertyChangedHandlers = function (propertyNames, handler, key) {
@@ -2381,7 +2381,7 @@ var Base = /** @class */ (function () {
2381
2381
  /**
2382
2382
  * Unregisters value change event handlers for the specified properties.
2383
2383
  * @param propertyNames An array of one or multiple property names.
2384
- * @param key (Optional) A key of the registration that you want to cancel.
2384
+ * @param key *(Optional)* A key of the registration that you want to cancel.
2385
2385
  * @see registerPropertyChangedHandlers
2386
2386
  */
2387
2387
  Base.prototype.unregisterPropertyChangedHandlers = function (propertyNames, key) {
@@ -5821,6 +5821,9 @@ var defaultV2Css = {
5821
5821
  rootDropdown: "sd-scrollable-container sd-scrollable-container--compact sd-selectbase",
5822
5822
  root: "sd-scrollable-container sd-rating",
5823
5823
  rootWrappable: "sd-scrollable-container sd-rating sd-rating--wrappable",
5824
+ rootLabelsTop: "sd-rating--labels-top",
5825
+ rootLabelsBottom: "sd-rating--labels-bottom",
5826
+ rootLabelsDiagonal: "sd-rating--labels-diagonal",
5824
5827
  item: "sd-rating__item",
5825
5828
  itemOnError: "sd-rating__item--error",
5826
5829
  itemHover: "sd-rating__item--allowhover",
@@ -8488,7 +8491,7 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
8488
8491
  if (!_onSelectionChanged) {
8489
8492
  _onSelectionChanged = function (item, status) {
8490
8493
  _this.resetFilterString();
8491
- if (item.value === "selectall") {
8494
+ if (item.id === "selectall") {
8492
8495
  _this.selectAllItems();
8493
8496
  }
8494
8497
  else if (status === "added" && item.value === _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].noneItemValue) {
@@ -9423,8 +9426,8 @@ __webpack_require__.r(__webpack_exports__);
9423
9426
  //import "../../modern.scss";
9424
9427
  var Version;
9425
9428
  var ReleaseDate;
9426
- Version = "" + "1.9.121";
9427
- ReleaseDate = "" + "2023-12-12";
9429
+ Version = "" + "1.9.122";
9430
+ ReleaseDate = "" + "2023-12-19";
9428
9431
  function checkLibraryVersion(ver, libraryName) {
9429
9432
  if (Version != ver) {
9430
9433
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -16551,7 +16554,7 @@ var Cover = /** @class */ (function (_super) {
16551
16554
  Cover.prototype.updateHeaderClasses = function () {
16552
16555
  this.headerClasses = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
16553
16556
  .append("sv-header")
16554
- .append("sv-header__without-background", (this.backgroundColor === "trasparent") && !this.backgroundImage)
16557
+ .append("sv-header__without-background", (this.backgroundColor === "transparent") && !this.backgroundImage)
16555
16558
  .append("sv-header__overlap", this.overlapEnabled)
16556
16559
  .toString();
16557
16560
  };
@@ -16670,6 +16673,13 @@ var Cover = /** @class */ (function (_super) {
16670
16673
  this.actualHeight = this.calculateActualHeight(logoHeight, titleHeight, descriptionHeight);
16671
16674
  }
16672
16675
  };
16676
+ Object.defineProperty(Cover.prototype, "hasBackground", {
16677
+ get: function () {
16678
+ return !!this.backgroundImage || this.backgroundColor !== "transparent";
16679
+ },
16680
+ enumerable: false,
16681
+ configurable: true
16682
+ });
16673
16683
  __decorate([
16674
16684
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: 0 })
16675
16685
  ], Cover.prototype, "actualHeight", void 0);
@@ -35939,9 +35949,9 @@ var Question = /** @class */ (function (_super) {
35939
35949
  return false;
35940
35950
  if (!!this.page && this.page.isStartPage)
35941
35951
  return false;
35942
- if (!this.survey || !this.valueName)
35952
+ if (!this.survey)
35943
35953
  return true;
35944
- return !this.survey.hasVisibleQuestionByValueName(this.valueName);
35954
+ return !this.survey.hasVisibleQuestionByValueName(this.getValueName());
35945
35955
  };
35946
35956
  Object.defineProperty(Question.prototype, "isParentVisible", {
35947
35957
  /**
@@ -39565,21 +39575,6 @@ var QuestionCheckboxBase = /** @class */ (function (_super) {
39565
39575
  enumerable: false,
39566
39576
  configurable: true
39567
39577
  });
39568
- QuestionCheckboxBase.prototype.clickItemHandler = function (item, checked) {
39569
- var newValue = [].concat(this.renderedValue || []);
39570
- var index = newValue.indexOf(item.value);
39571
- if (checked) {
39572
- if (index < 0) {
39573
- newValue.push(item.value);
39574
- }
39575
- }
39576
- else {
39577
- if (index > -1) {
39578
- newValue.splice(index, 1);
39579
- }
39580
- }
39581
- this.renderedValue = newValue;
39582
- };
39583
39578
  QuestionCheckboxBase.prototype.onParentChanged = function () {
39584
39579
  _super.prototype.onParentChanged.call(this);
39585
39580
  if (this.isFlowLayout) {
@@ -40413,9 +40408,10 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
40413
40408
  __extends(QuestionCheckboxModel, _super);
40414
40409
  function QuestionCheckboxModel(name) {
40415
40410
  var _this = _super.call(this, name) || this;
40416
- _this.selectAllItemValue = new _itemvalue__WEBPACK_IMPORTED_MODULE_4__["ItemValue"]("selectall");
40417
40411
  _this.invisibleOldValues = {};
40418
40412
  _this.isChangingValueOnClearIncorrect = false;
40413
+ _this.selectAllItemValue = new _itemvalue__WEBPACK_IMPORTED_MODULE_4__["ItemValue"]("");
40414
+ _this.selectAllItemValue.id = "selectall";
40419
40415
  var selectAllItemText = _this.createLocalizableString("selectAllText", _this.selectAllItem, true, "selectAllItemText");
40420
40416
  _this.selectAllItem.locOwner = _this;
40421
40417
  _this.selectAllItem.setLocText(selectAllItemText);
@@ -40573,6 +40569,31 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
40573
40569
  }
40574
40570
  this.renderedValue = val;
40575
40571
  };
40572
+ QuestionCheckboxModel.prototype.clickItemHandler = function (item, checked) {
40573
+ if (item === this.selectAllItem) {
40574
+ if (checked === true || checked === false) {
40575
+ this.isAllSelected = checked;
40576
+ }
40577
+ else {
40578
+ this.toggleSelectAll();
40579
+ }
40580
+ }
40581
+ else {
40582
+ var newValue = [].concat(this.renderedValue || []);
40583
+ var index = newValue.indexOf(item.value);
40584
+ if (checked) {
40585
+ if (index < 0) {
40586
+ newValue.push(item.value);
40587
+ }
40588
+ }
40589
+ else {
40590
+ if (index > -1) {
40591
+ newValue.splice(index, 1);
40592
+ }
40593
+ }
40594
+ this.renderedValue = newValue;
40595
+ }
40596
+ };
40576
40597
  QuestionCheckboxModel.prototype.isItemSelectedCore = function (item) {
40577
40598
  if (item === this.selectAllItem)
40578
40599
  return this.isAllSelected;
@@ -41573,6 +41594,16 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
41573
41594
  this.getElement().localeChanged();
41574
41595
  }
41575
41596
  };
41597
+ QuestionCustomModelBase.prototype.addUsedLocales = function (locales) {
41598
+ _super.prototype.addUsedLocales.call(this, locales);
41599
+ if (!!this.getElement()) {
41600
+ this.getElement().addUsedLocales(locales);
41601
+ }
41602
+ };
41603
+ QuestionCustomModelBase.prototype.needResponsiveWidth = function () {
41604
+ var el = this.getElement();
41605
+ return !!el ? el.needResponsiveWidth() : false;
41606
+ };
41576
41607
  QuestionCustomModelBase.prototype.createWrapper = function () { };
41577
41608
  QuestionCustomModelBase.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
41578
41609
  _super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
@@ -43405,6 +43436,9 @@ function dataUrl2File(dataUrl, fileName, type) {
43405
43436
  var buffer = new Uint8Array(str.split("").map(function (c) { return c.charCodeAt(0); })).buffer;
43406
43437
  return new File([buffer], fileName, { type: type });
43407
43438
  }
43439
+ /**
43440
+ * A base class for question types that support file upload: `QuestionFileModel` and `QuestionSignaturePadModel`.
43441
+ */
43408
43442
  var QuestionFileModelBase = /** @class */ (function (_super) {
43409
43443
  __extends(QuestionFileModelBase, _super);
43410
43444
  function QuestionFileModelBase() {
@@ -45490,10 +45524,8 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
45490
45524
  *
45491
45525
  * Possible values:
45492
45526
  *
45493
- * - `"image"` - Images in one of the following formats: JPEG, GIF, PNG, APNG, SVG, BMP, ICO.
45527
+ * - `"image"` (default) - Images in one of the following formats: JPEG, GIF, PNG, APNG, SVG, BMP, ICO.
45494
45528
  * - `"video"` - Videos in one of the following formats: MP4, MOV, WMV, FLV, AVI, MKV.
45495
- * - `"youtube"` - Links to YouTube videos.
45496
- * - `"auto"` (default) - Selects one of the above based on the `imageLink` property value of each choice item.
45497
45529
  */
45498
45530
  get: function () {
45499
45531
  return this.getPropertyValue("contentMode");
@@ -53168,7 +53200,7 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
53168
53200
  /**
53169
53201
  * Adds a new input item.
53170
53202
  * @param name An item name.
53171
- * @param title (Optional) An item title.
53203
+ * @param title *(Optional)* An item title.
53172
53204
  * @see items
53173
53205
  */
53174
53206
  QuestionMultipleTextModel.prototype.addItem = function (name, title) {
@@ -54356,7 +54388,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
54356
54388
  if (this.isRenderModeList || this.useTemplatePanel)
54357
54389
  return;
54358
54390
  var curPanel = this.getPropertyValue("currentPanel");
54359
- if (!!val && this.visiblePanels.indexOf(val) < 0 || val === curPanel)
54391
+ var index = !!val ? this.visiblePanels.indexOf(val) : -1;
54392
+ if (!!val && index < 0 || val === curPanel)
54360
54393
  return;
54361
54394
  if (curPanel) {
54362
54395
  curPanel.onHidingContent();
@@ -54365,6 +54398,13 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
54365
54398
  this.updateFooterActions();
54366
54399
  this.updateTabToolbarItemsPressedState();
54367
54400
  this.fireCallback(this.currentIndexChangedCallback);
54401
+ if (index > -1 && this.survey) {
54402
+ var options = {
54403
+ panel: val,
54404
+ visiblePanelIndex: index
54405
+ };
54406
+ this.survey.dynamicPanelCurrentIndexChanged(this, options);
54407
+ }
54368
54408
  },
54369
54409
  enumerable: false,
54370
54410
  configurable: true
@@ -55196,48 +55236,59 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55196
55236
  return newPanel;
55197
55237
  };
55198
55238
  /**
55199
- * Add a new dynamic panel based on the template Panel.
55200
- * @see template
55239
+ * Adds a new panel based on the [template](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#template).
55240
+ * @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.
55201
55241
  * @see panelCount
55202
55242
  * @see panels
55203
- * @see renderMode
55204
55243
  */
55205
- QuestionPanelDynamicModel.prototype.addPanel = function () {
55206
- this.panelCount++;
55244
+ QuestionPanelDynamicModel.prototype.addPanel = function (index) {
55245
+ var curIndex = this.currentIndex;
55246
+ if (index === undefined) {
55247
+ index = curIndex < 0 ? this.panelCount : curIndex + 1;
55248
+ }
55249
+ if (index < 0 || index > this.panelCount) {
55250
+ index = this.panelCount;
55251
+ }
55252
+ this.updateValueOnAddingPanel(curIndex < 0 ? this.panelCount - 1 : curIndex, index);
55207
55253
  if (!this.isRenderModeList) {
55208
- this.currentIndex = this.panelCount - 1;
55254
+ this.currentIndex = index;
55209
55255
  }
55256
+ if (this.survey)
55257
+ this.survey.dynamicPanelAdded(this);
55258
+ return this.panels[index];
55259
+ };
55260
+ QuestionPanelDynamicModel.prototype.updateValueOnAddingPanel = function (prevIndex, index) {
55261
+ this.panelCount++;
55210
55262
  var newValue = this.value;
55263
+ if (!Array.isArray(newValue) || newValue.length !== this.panelCount)
55264
+ return;
55211
55265
  var hasModified = false;
55266
+ var lastIndex = this.panelCount - 1;
55267
+ if (index < lastIndex) {
55268
+ hasModified = true;
55269
+ var rec = newValue[lastIndex];
55270
+ newValue.splice(lastIndex, 1);
55271
+ newValue.splice(index, 0, rec);
55272
+ }
55212
55273
  if (!this.isValueEmpty(this.defaultPanelValue)) {
55213
- if (!!newValue &&
55214
- Array.isArray(newValue) &&
55215
- newValue.length == this.panelCount) {
55216
- hasModified = true;
55217
- this.copyValue(newValue[newValue.length - 1], this.defaultPanelValue);
55218
- }
55219
- }
55220
- if (this.defaultValueFromLastPanel &&
55221
- !!newValue &&
55222
- Array.isArray(newValue) &&
55223
- newValue.length > 1 &&
55224
- newValue.length == this.panelCount) {
55225
55274
  hasModified = true;
55226
- this.copyValue(newValue[newValue.length - 1], newValue[newValue.length - 2]);
55275
+ this.copyValue(newValue[index], this.defaultPanelValue);
55276
+ }
55277
+ if (this.defaultValueFromLastPanel && newValue.length > 1) {
55278
+ var fromIndex = prevIndex > -1 && prevIndex <= lastIndex ? prevIndex : lastIndex;
55279
+ hasModified = true;
55280
+ this.copyValue(newValue[index], newValue[fromIndex]);
55227
55281
  }
55228
55282
  if (hasModified) {
55229
55283
  this.value = newValue;
55230
55284
  }
55231
- if (this.survey)
55232
- this.survey.dynamicPanelAdded(this);
55233
- return this.panels[this.panelCount - 1];
55234
55285
  };
55235
55286
  QuestionPanelDynamicModel.prototype.canLeaveCurrentPanel = function () {
55236
55287
  return !(this.renderMode !== "list" && this.currentPanel && this.currentPanel.hasErrors(true, true));
55237
55288
  };
55238
- QuestionPanelDynamicModel.prototype.copyValue = function (src, dest) {
55239
- for (var key in dest) {
55240
- src[key] = dest[key];
55289
+ QuestionPanelDynamicModel.prototype.copyValue = function (dest, src) {
55290
+ for (var key in src) {
55291
+ dest[key] = src[key];
55241
55292
  }
55242
55293
  };
55243
55294
  /**
@@ -57674,9 +57725,10 @@ var QuestionRatingModel = /** @class */ (function (_super) {
57674
57725
  Object.defineProperty(QuestionRatingModel.prototype, "minRateDescription", {
57675
57726
  /**
57676
57727
  * Specifies a description for the minimum (first) rate value.
57728
+ * @see rateDescriptionLocation
57729
+ * @see displayRateDescriptionsAsExtremeItems
57677
57730
  * @see rateValues
57678
57731
  * @see rateMin
57679
- * @see displayRateDescriptionsAsExtremeItems
57680
57732
  */
57681
57733
  get: function () {
57682
57734
  return this.getLocalizableStringText("minRateDescription");
@@ -57698,9 +57750,10 @@ var QuestionRatingModel = /** @class */ (function (_super) {
57698
57750
  Object.defineProperty(QuestionRatingModel.prototype, "maxRateDescription", {
57699
57751
  /**
57700
57752
  * Specifies a description for the maximum (last) rate value.
57753
+ * @see rateDescriptionLocation
57754
+ * @see displayRateDescriptionsAsExtremeItems
57701
57755
  * @see rateValues
57702
57756
  * @see rateMax
57703
- * @see displayRateDescriptionsAsExtremeItems
57704
57757
  */
57705
57758
  get: function () {
57706
57759
  return this.getLocalizableStringText("maxRateDescription");
@@ -57832,8 +57885,18 @@ var QuestionRatingModel = /** @class */ (function (_super) {
57832
57885
  get: function () {
57833
57886
  var baseClass = ((this.displayMode == "buttons" || (!!this.survey && this.survey.isDesignMode)) && this.cssClasses.rootWrappable) ?
57834
57887
  this.cssClasses.rootWrappable : this.cssClasses.root;
57888
+ var rootClassModifier = "";
57889
+ if (this.hasMaxLabel || this.hasMinLabel) {
57890
+ if (this.rateDescriptionLocation == "top")
57891
+ rootClassModifier = this.cssClasses.rootLabelsTop;
57892
+ if (this.rateDescriptionLocation == "bottom")
57893
+ rootClassModifier = this.cssClasses.rootLabelsBottom;
57894
+ if (this.rateDescriptionLocation == "topBottom")
57895
+ rootClassModifier = this.cssClasses.rootLabelsDiagonal;
57896
+ }
57835
57897
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
57836
57898
  .append(baseClass)
57899
+ .append(rootClassModifier)
57837
57900
  .append(this.cssClasses.itemSmall, this.itemSmallMode && this.rateType != "labels")
57838
57901
  .toString();
57839
57902
  },
@@ -58162,6 +58225,9 @@ var QuestionRatingModel = /** @class */ (function (_super) {
58162
58225
  }
58163
58226
  })
58164
58227
  ], QuestionRatingModel.prototype, "displayMode", void 0);
58228
+ __decorate([
58229
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
58230
+ ], QuestionRatingModel.prototype, "rateDescriptionLocation", void 0);
58165
58231
  __decorate([
58166
58232
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
58167
58233
  ], QuestionRatingModel.prototype, "rateType", void 0);
@@ -58291,6 +58357,12 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("rating", [
58291
58357
  return obj.rateType == "labels";
58292
58358
  }
58293
58359
  },
58360
+ {
58361
+ name: "rateDescriptionLocation",
58362
+ default: "leftRight",
58363
+ category: "layout",
58364
+ choices: ["leftRight", "top", "bottom", "topBottom"],
58365
+ },
58294
58366
  {
58295
58367
  name: "displayMode",
58296
58368
  default: "auto",
@@ -66531,9 +66603,6 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
66531
66603
  _this.handleOnChange = function (event) {
66532
66604
  _this.question.clickItemHandler(_this.item, event.target.checked);
66533
66605
  };
66534
- _this.selectAllChanged = function (event) {
66535
- _this.question.toggleSelectAll();
66536
- };
66537
66606
  return _this;
66538
66607
  }
66539
66608
  SurveyQuestionCheckboxItem.prototype.getStateElement = function () {
@@ -66607,16 +66676,12 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
66607
66676
  });
66608
66677
  SurveyQuestionCheckboxItem.prototype.renderCheckbox = function (isChecked, otherItem) {
66609
66678
  var id = this.question.getItemId(this.item);
66610
- var text = !this.hideCaption ? this.renderLocString(this.item.locText) : "";
66611
66679
  var itemClass = this.question.getItemClass(this.item);
66612
66680
  var labelClass = this.question.getLabelClass(this.item);
66613
- var onItemChanged = this.item == this.question.selectAllItem
66614
- ? this.selectAllChanged
66615
- : this.handleOnChange;
66616
66681
  var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
66617
66682
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
66618
66683
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: labelClass },
66619
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", role: "option", name: this.question.name + this.item.value, value: this.item.value != "selectall" ? this.item.value : undefined, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), checked: isChecked, onChange: onItemChanged }),
66684
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", role: "option", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), checked: isChecked, onChange: this.handleOnChange }),
66620
66685
  this.cssClasses.materialDecorator ?
66621
66686
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
66622
66687
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
@@ -73545,6 +73610,10 @@ var SurveyModel = /** @class */ (function (_super) {
73545
73610
  * [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
73546
73611
  */
73547
73612
  _this.onGetDynamicPanelTabTitle = _this.addEvent();
73613
+ /**
73614
+ * An event that is raised after the current panel is changed in a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
73615
+ */
73616
+ _this.onDynamicPanelCurrentIndexChanged = _this.addEvent();
73548
73617
  /**
73549
73618
  * An event that is raised to define whether a question answer is correct. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
73550
73619
  */
@@ -75978,7 +76047,7 @@ var SurveyModel = /** @class */ (function (_super) {
75978
76047
  /**
75979
76048
  * Merges a specified data object with the object from the [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property.
75980
76049
  *
75981
- * Refer to the following help topic for more information: [Merge Question Values](https://surveyjs.io/form-library/documentation/design-survey/merge-question-values).
76050
+ * Refer to the following help topic for more information: [Populate Form Fields | Multiple Question Values](https://surveyjs.io/form-library/documentation/design-survey/pre-populate-form-fields#multiple-question-values).
75982
76051
  *
75983
76052
  * @param data A data object to merge. It should have the following structure: `{ questionName: questionValue, ... }`
75984
76053
  * @see setValue
@@ -77538,6 +77607,7 @@ var SurveyModel = /** @class */ (function (_super) {
77538
77607
  };
77539
77608
  SurveyModel.prototype.setupPagesForPageModes = function (isSinglePage) {
77540
77609
  this.questionHashesClear();
77610
+ this.isCreatingPagesForPreview = true;
77541
77611
  var startIndex = this.getPageStartIndex();
77542
77612
  _super.prototype.startLoadingFromJson.call(this);
77543
77613
  var newPages = this.createPagesForQuestionOnPageMode(isSinglePage, startIndex);
@@ -77552,6 +77622,7 @@ var SurveyModel = /** @class */ (function (_super) {
77552
77622
  }
77553
77623
  this.doElementsOnLoad();
77554
77624
  this.updateCurrentPage();
77625
+ this.isCreatingPagesForPreview = false;
77555
77626
  };
77556
77627
  SurveyModel.prototype.createPagesForQuestionOnPageMode = function (isSinglePage, startIndex) {
77557
77628
  if (isSinglePage) {
@@ -78203,7 +78274,8 @@ var SurveyModel = /** @class */ (function (_super) {
78203
78274
  SurveyModel.prototype.afterRenderPage = function (htmlElement) {
78204
78275
  var _this = this;
78205
78276
  if (!this.isDesignMode && !this.focusingQuestionInfo) {
78206
- setTimeout(function () { return _this.scrollToTopOnPageChange(!_this.isFirstPageRendering); }, 1);
78277
+ var doScroll_1 = !this.isFirstPageRendering;
78278
+ setTimeout(function () { return _this.scrollToTopOnPageChange(doScroll_1); }, 1);
78207
78279
  }
78208
78280
  this.focusQuestionInfo();
78209
78281
  this.isFirstPageRendering = false;
@@ -78422,6 +78494,10 @@ var SurveyModel = /** @class */ (function (_super) {
78422
78494
  options.question = question;
78423
78495
  this.onGetDynamicPanelTabTitle.fire(this, options);
78424
78496
  };
78497
+ SurveyModel.prototype.dynamicPanelCurrentIndexChanged = function (question, options) {
78498
+ options.question = question;
78499
+ this.onDynamicPanelCurrentIndexChanged.fire(this, options);
78500
+ };
78425
78501
  SurveyModel.prototype.dragAndDropAllow = function (options) {
78426
78502
  this.onDragDropAllow.fire(this, options);
78427
78503
  return options.allow;
@@ -78505,13 +78581,8 @@ var SurveyModel = /** @class */ (function (_super) {
78505
78581
  * question,
78506
78582
  * question.name,
78507
78583
  * question.value,
78508
- * (status, data) => {
78509
- * if (status === "success") {
78510
- * // Handle success
78511
- * }
78512
- * if (status === "error") {
78513
- * // Handle error
78514
- * }
78584
+ * (data, errors) => {
78585
+ * // ...
78515
78586
  * }
78516
78587
  * );
78517
78588
  * ```
@@ -78700,7 +78771,7 @@ var SurveyModel = /** @class */ (function (_super) {
78700
78771
  /**
78701
78772
  * Returns a question with a specified [`name`](https://surveyjs.io/form-library/documentation/api-reference/question#name).
78702
78773
  * @param name A question name
78703
- * @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the question. Default value: `false` (uppercase and lowercase letters are treated as distinct).
78774
+ * @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the question. Default value: `false` (uppercase and lowercase letters are treated as distinct).
78704
78775
  * @returns A question with a specified name.
78705
78776
  * @see getAllQuestions
78706
78777
  * @see getQuestionByValueName
@@ -78728,7 +78799,7 @@ var SurveyModel = /** @class */ (function (_super) {
78728
78799
  *
78729
78800
  * > Since `valueName` does not have to be unique, multiple questions can have the same `valueName` value. In this case, the `getQuestionByValueName()` method returns the first such question. If you need to get all questions with the same `valueName`, call the `getQuestionsByValueName()` method.
78730
78801
  * @param valueName A question's `valueName` property value.
78731
- * @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the question. Default value: `false` (uppercase and lowercase letters are treated as distinct).
78802
+ * @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the question. Default value: `false` (uppercase and lowercase letters are treated as distinct).
78732
78803
  * @returns A question with a specified `valueName`.
78733
78804
  * @see getAllQuestions
78734
78805
  * @see getQuestionByName
@@ -78741,7 +78812,7 @@ var SurveyModel = /** @class */ (function (_super) {
78741
78812
  /**
78742
78813
  * Returns all questions with a specified [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/question#valueName). If a question's `valueName` is undefined, its [`name`](https://surveyjs.io/form-library/documentation/api-reference/question#name) property is used.
78743
78814
  * @param valueName A question's `valueName` property value.
78744
- * @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
78815
+ * @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
78745
78816
  * @returns An array of questions with a specified `valueName`.
78746
78817
  * @see getAllQuestions
78747
78818
  * @see getQuestionByName
@@ -78766,7 +78837,7 @@ var SurveyModel = /** @class */ (function (_super) {
78766
78837
  /**
78767
78838
  * Returns an array of questions with specified [names](https://surveyjs.io/form-library/documentation/api-reference/question#name).
78768
78839
  * @param names An array of question names.
78769
- * @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
78840
+ * @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
78770
78841
  * @returns An array of questions with specified names
78771
78842
  * @see getAllQuestions
78772
78843
  */
@@ -78884,7 +78955,7 @@ var SurveyModel = /** @class */ (function (_super) {
78884
78955
  /**
78885
78956
  * Returns a [panel](https://surveyjs.io/form-library/documentation/api-reference/panel-model) with a specified [`name`](https://surveyjs.io/form-library/documentation/api-reference/panel-model#name).
78886
78957
  * @param name A panel name.
78887
- * @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the panel. Default value: `false` (uppercase and lowercase letters are treated as distinct).
78958
+ * @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the panel. Default value: `false` (uppercase and lowercase letters are treated as distinct).
78888
78959
  * @returns A panel with a specified name.
78889
78960
  * @see getAllPanels
78890
78961
  */
@@ -79716,6 +79787,8 @@ var SurveyModel = /** @class */ (function (_super) {
79716
79787
  SurveyModel.prototype.setValue = function (name, newQuestionValue, locNotification, allowNotifyValueChanged, questionName) {
79717
79788
  if (locNotification === void 0) { locNotification = false; }
79718
79789
  if (allowNotifyValueChanged === void 0) { allowNotifyValueChanged = true; }
79790
+ if (this.isCreatingPagesForPreview)
79791
+ return;
79719
79792
  var newValue = newQuestionValue;
79720
79793
  if (allowNotifyValueChanged) {
79721
79794
  newValue = this.questionOnValueChanging(name, newQuestionValue);
@@ -80448,6 +80521,9 @@ var SurveyModel = /** @class */ (function (_super) {
80448
80521
  return this.getLocalizationFormatString(strName, surveySpent, surveyLimit);
80449
80522
  };
80450
80523
  SurveyModel.prototype.getDisplayClockTime = function (val) {
80524
+ if (val < 0) {
80525
+ val = 0;
80526
+ }
80451
80527
  var min = Math.floor(val / 60);
80452
80528
  var sec = val % 60;
80453
80529
  var secStr = sec.toString();
@@ -80803,7 +80879,19 @@ var SurveyModel = /** @class */ (function (_super) {
80803
80879
  }
80804
80880
  }
80805
80881
  else if (this.state === "running" && isStrCiEqual(layoutElement.id, "progress-" + this.progressBarType)) {
80806
- if (container === "center") {
80882
+ var headerLayoutElement = this.layoutElements.filter(function (a) { return a.id === "advanced-header"; })[0];
80883
+ var advHeader = headerLayoutElement && headerLayoutElement.data;
80884
+ var isBelowHeader = !advHeader || advHeader.hasBackground;
80885
+ if (container === "header" && !isBelowHeader) {
80886
+ layoutElement.index = -150;
80887
+ if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
80888
+ containerLayoutElements.push(layoutElement);
80889
+ }
80890
+ }
80891
+ if (container === "center" && isBelowHeader) {
80892
+ if (!!layoutElement.index) {
80893
+ delete layoutElement.index;
80894
+ }
80807
80895
  if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
80808
80896
  containerLayoutElements.push(layoutElement);
80809
80897
  }